Comment by mvkel

2 days ago

> the workflow I’ve settled into is radically different from what most people do with AI coding tools

This looks exactly like what anthropic recommends as the best practice for using Claude Code. Textbook.

It also exposes a major downside of this approach: if you don't plan perfectly, you'll have to start over from scratch if anything goes wrong.

I've found a much better approach in doing a design -> plan -> execute in batches, where the plan is no more than 1,500 lines, used as a proxy for complexity.

My 30,000 LOC app has about 100,000 lines of plan behind it. Can't build something that big as a one-shot.

if you don't plan perfectly, you'll have to start over from scratch if anything goes wrong

This is my experience too, but it's pushed me to make much smaller plans and to commit things to a feature branch far more atomically so I can revert a step to the previous commit, or bin the entire feature by going back to main. I do this far more now than I ever did when I was writing the code by hand.

This is how developers should work regardless of how the code is being developed. I think this is a small but very real way AI has actually made me a better developer (unless I stop doing it when I don't use AI... not tried that yet.)

  • I do this too. Relatively small changes, atomic commits with extensive reasoning in the message (keeps important context around). This is a best practice anyway, but used to be excruciatingly much effort. Now it’s easy!

    Except that I’m still struggling with the LLM understanding its audience/context of its utterances. Very often, after a correction, it will focus a lot on the correction itself making for weird-sounding/confusing statements in commit messages and comments.

    • > Very often, after a correction, it will focus a lot on the correction itself making for weird-sounding/confusing statements in commit messages and comments.

      I've experienced that too. Usually when I request correction, I add something like "Include only production level comments, (not changes)". Recently I also added special instruction for this to CLAUDE.md.

  • LLMs are really eager to start coding (as interns are eager to start working), so the sentence “don’t implement yet” has to be used very often at the beginning of any project.

  • Developers should work by wasting lots of time making the wrong thing?

    I bet if they did a work and motion study on this approach they'd find the classic:

    "Thinks they're more productive, AI has actually made them less productive"

    But lots of lovely dopamine from this false progress that gets thrown away!

    • Developers should work by wasting lots of time making the wrong thing?

      Yes. In fact, that's not emphatic enough: HELL YES!

      More specifically, developers should experiment. They should test their hypothesis. They should try out ideas by designing a solution and creating a proof of concept, then throw that away and build a proper version based on what they learned.

      If your approach to building something is to implement the first idea you have and move on then you are going to waste so much more time later refactoring things to fix architecture that paints you into corners, reimplementing things that didn't work for future use cases, fixing edge cases than you hadn't considered, and just paying off a mountain of tech debt.

      I'd actually go so far as to say that if you aren't experimenting and throwing away solutions that don't quite work then you're only amassing tech debt and you're not really building anything that will last. If it does it's through luck rather than skill.

      Also, this has nothing to do with AI. Developers should be working this way even if they handcraft their artisanal code carefully in vi.

      2 replies →

    • > Developers should work by wasting lots of time making the wrong thing?

      Yes? I can't even count how many times I worked on something my company deemed was valuable only for it to be deprecated or thrown away soon after. Or, how many times I solved a problem but apparently misunderstood the specs slightly and had to redo it. Or how many times we've had to refactor our code because scope increased. In fact, the very existence of the concepts of refactoring and tech debt proves that devs often spend a lot of time making the "wrong" thing.

      Is it a waste? No, it solved the problem as understood at the time. And we learned stuff along the way.

      1 reply →

> design -> plan -> execute in batches

This is the way for me as well. Have a high-level master design and plan, but break it apart into phases that are manageable. One-shotting anything beyond a todo list and expecting decent quality is still a pipe dream.

This is actually embarrassing. His "radically different" workflow is... using the built-in Plan mode that they recommend you use? What?

  • It's not, to be fair.

    > I use my own `.md` plan files rather than Claude Code’s built-in plan mode. The built-in plan mode sucks.

    • From Claude docs: Planning is most useful when you’re uncertain about the approach, when the change modifies multiple files, or when you’re unfamiliar with the code being modified. If this isn't true, skip the plan.

> if you don't plan perfectly, you'll have to start over from scratch if anything goes wrong.

You just revert what the AI agent changed and revise/iterate on the previous step - no need to start over. This can of course involve restricting the work to a smaller change so that the agent isn't overwhelmed by complexity.

100,000 lines is approx. one million words. The average person reads at 250wpm. The entire thing would take 66 hours just to read, assuming you were approaching it like a fiction book, not thinking anything over

How can you know that 100k lines plan is not just slop?

Just because plan is elaborate doesn’t mean it makes sense.

wtf, why would you write 100k lines of plan to produce 30k loc.. JUST WRITE THE CODE!!!

  • That's not (or should not be what's happening).

    They write a short high level plan (let's say 200 words). The plan asks the agent to write a more detailed implementation plan (written by the LLM, let's say 2000-5000 words).

    They read this plan and adjust as needed, even sending it to the agent for re-dos.

    Once the implementation plan is done, they ask the agent to write the actual code changes.

    Then they review that and ask for fixes, adjustments, etc.

    This can be comparable to writing the code yourself but also leaves a detailed trail of what was done and why, which I basically NEVER see in human generated code.

    That alone is worth gold, by itself.

    And on top of that, if you're using an unknown platform or stack, it's basically a rocket ship. You bootstrap much faster. Of course, stay on top of the architecture, do controlled changes, learn about the platform as you go, etc.

    • I take this concept and I meta-prompt it even more.

      I have a road map (AI generated, of course) for a side project I'm toying around with to experiment with LLM-driven development. I read the road map and I understand and approve it. Then, using some skills I found on skills.sh and slightly modified, my workflow is as such:

      1. Brainstorm the next slice

      It suggests a few items from the road map that should be worked on, with some high level methodology to implement. It asks me what the scope ought to be and what invariants ought to be considered. I ask it what tradeoffs could be, why, and what it recommends, given the product constraints. I approve a given slice of work.

      NB: this is the part I learn the most from. I ask it why X process would be better than Y process given the constraints and it either corrects itself or it explains why. "Why use an outbox pattern? What other patterns could we use and why aren't they the right fit?"

      2. Generate slice

      After I approve what to work on next, it generates a high level overview of the slice, including files touched, saved in a MD file that is persisted. I read through the slice, ensure that it is indeed working on what I expect it to be working on, and that it's not scope creeping or undermining scope, and I approve it. It then makes a plan based off of this.

      3. Generate plan

      It writes a rather lengthy plan, with discrete task bullets at the top. Beneath, each step has to-dos for the llm to follow, such as generating tests, running migrations, etc, with commit messages for each step. I glance through this for any potential red flags.

      4. Execute

      This part is self explanatory. It reads the plan and does its thing.

      I've been extremely happy with this workflow. I'll probably write a blog post about it at some point.

      7 replies →

    • Yep with a human in the loop to process these larger sprawling plan docs (inflated with the intent of the designer iteratively)

      Some get deleted from repo others archived, others merged or referenced elsewhere. It's kind of organic.

Dunno. My 80k+ LOC personal life planner, with a native android app, eink display view still one shots most features/bugs I encounter. I just open a new instance let it know what I want and 5min later it's done.

  • Both can be true. I have personally experienced both.

    Some problems AI surprised me immensely with fast, elegant efficient solutions and problem solving. I've also experienced AI doing totally absurd things that ended up taking multiple times longer than if I did it manually. Sometimes in the same project.

  • If you wouldn't mind sharing more about this in the future I'd love to read about it.

    I've been thinking about doing something like that myself because I'm one of those people who have tried countless apps but there's always a couple deal breakers that cause me to drop the app.

    I figured trying to agentically develop a planner app with the exact feature set I need would be an interesting and fun experiment.

    • same as you, I tried all sorts of apps. Todoist, habitica, fantastical, wunderlist, karakeep and more and more for all sorts of things. All are OK for most users, but none was GREAT for me. That's why I thought to give LLM's a proper spin. Get all the features I want, in the way I want. And anything I can come up with/see on the web over time, I can add myself within minutes instead of waiting for months for some 3rd party to perhaps add it. + No subscription fee.

      You can see my app in action here: https://news.ycombinator.com/item?id=47119434

      While I can share the code and it might make a good foundation for forks, creating one from scratch with claude's $100 subscription will take ~2-3 weeks to get it into the state you see in the video. And that is me prompting the LLM for ~30-60 minutes most days of those 2-3 weeks.

      1 reply →

  • In 5 min you are one shotting smaller changes to the larger code base right? Not the entire 80k likes which was the other comments point afaict.

  • What is a personal life planner?

    • Todos, habits, goals, calendar, meals, notes, bookmarks, shopping lists, finances. More or less that with Google cal integration, garmin Integration (Auto updates workout habits, weight goals) family sharing/gamification, daily/weekly reviews, ai summaries and more. All built by just prompting Claude for feature after feature, with me writing 0 lines.

      5 replies →