Live data from Hacker News

How I use Claude Code: Separation of planning and execution

boristane.com

611–620 of 630 posts

Re: How I use Claude Code: Separation of planning and execution

#611
post #271

I try these staging-document patterns, but suspect they have 2 fundamental flaws that stem mostly from our own biases. First, Claude evolves. The original post work pattern evolved over 9 months, before claude's recent step changes. It's likely claude's present plan mode is better than this workaround, but if you stick to the workaround, you'd never know. Second, the staging docs that represent some context - whether…

[dead]

Re: How I use Claude Code: Separation of planning and execution

#612

I think the real value here isn’t “planning vs not planning,” it’s forcing the model to surface its assumptions before they harden into code. LLMs don’t usually fail at syntax. They fail at invisible assumptions about architecture, constraints, invariants, etc. A written plan becomes a debugging surface for those assumptions.

I recently learned a trick to improve an LLM's thinking (maybe it's well know?):

Requesting { "output": "x" } consistently fails, despite detailed instructions.

Changing to requesting { "output": "x", "reasoning": "y" } produces the desired outcome.

Re: How I use Claude Code: Separation of planning and execution

#613
post #442

Earlier quoted context omitted.

Sub agent also helps a lot in that regard. Have an agent do the planning, have an implementation agent do the code and have another one do the review. Clear responsabilities helps a lot. There also blue team / red team that works. The idea is always the same: help LLM to reason properly with less and more clear instructions.

This approach sounds clean in theory, but in production you're building a black box. When your planning agent hands off to an implementation agent and that hands off to a review agent — where did the bug originate? Which agent's context was polluted? Good luck tracing that. I went the opposite direction: single agent per task, strict quality gates between steps, full execution logs. No sub-agents. Every decision is t…

> Every decision is traceable to one context window

There are no models that can do all the mentioned steps in a single usable context window. This is why subagents or multi-agent orchestrators exist in the first place.

Re: How I use Claude Code: Separation of planning and execution

#614

I go a bit further than this and have had great success with 3 doc types and 2 skills: - Specs: these are generally static, but updatable as the project evolves. And they're broken out to an index file that gives a project overview, a high-level arch file, and files for all the main modules. Roughly ~1k lines of spec for 10k lines of code, and try to limit any particular spec file to 300 lines. I'm intimately familia…

This looks very similar to what I'm doing. Few questions:

- How do you adress spec drift? A new feature can easily affect 2 or 3 specs. Do you update them manually? Is a new feature part of a new spec or you update the spec and then plan based on spec changes?

- How do you address plan drift? A plan may change as implementer surfaces some issues with the spec for example.

Re: How I use Claude Code: Separation of planning and execution

#615
post #423
post #369

Earlier quoted context omitted.

A lot of words to say that for all intents and purposes... it's nondeterministic. > Yes, it's a departure from the fully deterministic systems we're used to. A system either produces the same output given the same input[1], or doesn't. LLMs are nondeterministic by design . Sure, you can configure them with a zero temperature, a static seed, and so on, but they're of no use to anyone in that configuration. The nondete…

Humans are nondeterministic. So this is a moot point and a futile exercise in arguing semantics.

This is possibly the single worst argument I've seen in defense of all the LLM shenanigans. Makes me laugh every time.

Re: How I use Claude Code: Separation of planning and execution

#616
post #613

Earlier quoted context omitted.

This approach sounds clean in theory, but in production you're building a black box. When your planning agent hands off to an implementation agent and that hands off to a review agent — where did the bug originate? Which agent's context was polluted? Good luck tracing that. I went the opposite direction: single agent per task, strict quality gates between steps, full execution logs. No sub-agents. Every decision is t…

> Every decision is traceable to one context window There are no models that can do all the mentioned steps in a single usable context window. This is why subagents or multi-agent orchestrators exist in the first place.

You're right that no model handles everything in one context window — that's exactly why I built context rotation. Each task runs in a single agent context (one responsibility, clear scope), and when the window fills up, the system automatically rotates: writes a structured handover, clears, and resumes in a fresh window.

The key distinction: sub-agents run within a parent context with shared state (black box). My approach uses independent parallel agents (separate terminals, separate context windows) that report back to an orchestrator. Large tasks get split into smaller dispatches upfront — each scoped to fit a single context window. The orchestrator can dispatch research to 3 agents in parallel, collect their outputs, then dispatch a synthesis task to a single agent that merges the findings.

So it's not "one context window for everything" — it's right-sized tasks with full observability per agent, and a governance layer managing the sequence and merging results.

Re: How I use Claude Code: Separation of planning and execution

#617
post #613

Earlier quoted context omitted.

> Every decision is traceable to one context window There are no models that can do all the mentioned steps in a single usable context window. This is why subagents or multi-agent orchestrators exist in the first place.

You're right that no model handles everything in one context window — that's exactly why I built context rotation. Each task runs in a single agent context (one responsibility, clear scope), and when the window fills up, the system automatically rotates: writes a structured handover, clears, and resumes in a fresh window. The key distinction: sub-agents run within a parent context with shared state (black box). My ap…

That sounds interesting. I do hate how there's no observability into subagents and you just get a summary.

How do they report back to the orchestrator? Tmux?

Re: How I use Claude Code: Separation of planning and execution

#618
post #12

> Notice the language: “deeply”, “in great details”, “intricacies”, “go through everything”. This isn’t fluff. Without these words, Claude will skim. It’ll read a file, see what a function does at the signature level, and move on. You need to signal that surface-level reading is not acceptable. This makes no sense to my intuition of how an LLM works. It's not that I don't believe this works, but my mental model doesn…

[dead]

Re: How I use Claude Code: Separation of planning and execution

#619

Earlier quoted context omitted.

I mean, all I can really say is... if writing some logging takes you one or two days, are you sure you _really_ know how to code?

Well someone who says logging is easy never knows the difficulty of deciding "what" to log. And audit log is different beast altogether than normal logging

Audit logging is different because it's actually more straightforward than "normal logging". You just make a log entry for each state change, basically. Especially if you're storing the log entries as "objects" instead of plain text.

Besides, do you think that a LLM would be better at deciding what to log than a human that has even just a little experience with the actual system in question?

Re: How I use Claude Code: Separation of planning and execution

#620
post #617

Earlier quoted context omitted.

You're right that no model handles everything in one context window — that's exactly why I built context rotation. Each task runs in a single agent context (one responsibility, clear scope), and when the window fills up, the system automatically rotates: writes a structured handover, clears, and resumes in a fresh window. The key distinction: sub-agents run within a parent context with shared state (black box). My ap…

That sounds interesting. I do hate how there's no observability into subagents and you just get a summary. How do they report back to the orchestrator? Tmux?

Yes, tmux. The setup is a 2x2 grid:

T0 (orchestrator) | T1 (Track A) T2 (Track B) | T3 (Track C)

When a worker finishes, it writes a structured report to a shared unified_reports/ directory. A file watcher (receipt processor) detects it, parses the report into a structured NDJSON receipt (status, files changed, open items, git ref), and delivers it to T0's pane.

T0 then reviews the receipt, runs a quality advisory (automated pass/warn/hold verdict), and decides: close open items, complete the PR, or redispatch. Everything is filesystem-based — no API, no database, no shared memory between agents. Each terminal has its own context window, its own Claude Code (or Codex/Gemini) session, and the only communication channel is structured files on disk.

The receipt ledger is append-only NDJSON, so you can always trace: which agent did what, when, on which dispatch, with which git commit.

I open-sourced the setup recently if you want to dig into the details.

Post reply on HN