Why this session exists. Claude Code has made output cheap. One /batch prompt splits a change across 5 to 30 worktree-isolated subagents. Three claude --cloud commands start three cloud sessions that keep running after you close your laptop. A forked subagent can try several approaches in parallel from the same starting point. Anthropic reports that it merged about 2,500 code changes a day in May 2026 and over 30,000 a day by September (Redesigning source control at Anthropic). When diffs cost almost nothing, two inputs become scarce. Judgment decides which change is worth making and which tradeoffs to accept. Attention is the minutes you have to decide, approve and verify. This session teaches product engineering at that bottleneck through concrete Claude Code habits: the prompts, modes, files and settings that turn cheap output into outcomes you own.
Facts on this page are as of 2026-10-24 (Claude Code v2.1.310). Version-gated features say "requires v2.1.xxx+" where they appear.
What you'll be able to do afterwards:
Write prompts, /goal conditions and CLAUDE.md definitions of done that name an outcome and its evidence, not an output.
Point your attention at decisions instead of routine approvals, using permission modes, allowlists, notification hooks and /goal. A toy model shows where rubber-stamping starts.
Fence scope in three layers (spec, permission rules, review) and fill an ownership canvas that generates SPEC.md, a PR template and a /goal condition.
Use plan mode, AskUserQuestion interviews, effort levels and adversarial review subagents as judgment tools.
Explore architecture with Explore subagents, trace dependencies with code intelligence plugins and git history, assess operational impact, and describe a change as a system diff with a reusable skill.
Spend leverage on information: scouting runs, looped prototyping with live feedback, parallel variants in worktrees, forks or cloud sessions, and synthetic inputs generated headlessly against a schema.
How it connects. This session builds on the explore-plan-implement-commit loop and parallel work in core-4, and on the quality loops in core-5. It previews intent and interviews in delivery-2, execution and merge points in delivery-3, system diffs as a verification gate in delivery-4, and post-release signals in delivery-5. The multi-agent mechanics behind parallel variants are in agents-4.
Running example. One feature recurs on every page so you can follow a single decision through each lens: self-serve plan downgrades in a B2B SaaS billing page. An admin moves a workspace from the Business plan (up to 25 seats) to Team (up to 10 seats). The change touches the billing UI (web/billing/), the billing API (api/billing/), the payment provider's webhooks (api/webhooks/), an entitlements service (services/entitlements/), seat limits, emails, analytics, finance reports and the support console. The paths are illustrative.
About the numbersThe simulations on this page are toy models with illustrative parameters. They make a mechanism visible: an attention cliff, diminishing returns from variants, coverage growth from pairwise testing. They aren't measurements of Claude Code, any model, or any team. Change the parameters and read the shape, not the exact values.
Shift
With Claude Code, the marginal cost of a diff is a few minutes of your attention and a few dollars of tokens. Anything that cheap gets overproduced, so the constraint moves. Three moves define the rest of the Delivery milestone. Aim Claude at outcomes rather than output. Own the problem the way a product engineer does, not the ticket. Treat your attention as the scarcest budget in the loop.
Outcome Over Output
An output is what a session produces: a diff, a PR, a green test run, lines of code. An outcome is a measurable change in user behavior or system properties that you meant to cause. In the running example, it might be "the share of downgrade attempts that finish without a support ticket rises from 60% to 90%" or "cancellations from customers who first tried to downgrade fall". The chain runs activity → output → outcome → impact, and every arrow is a hypothesis that can fail.
How it works in Claude Code. Claude optimizes the task you state and stops when it judges that task done. "Add a downgrade button to the billing page" has a crisp, output-level finish line: the button renders and the tests pass. Nothing in that prompt lets Claude, a /goal evaluator or a reviewer subagent tell whether an admin with 12 seats can actually get to Team without hitting a seat-limit error. You don't fix this with more words. You fix it with different words: name the user, the observable end state, the evidence Claude can produce in the session, the guardrails, and when to stop and ask. Anthropic's Opus 5.5 guidance puts it in one line: "Say what 'done' looks like and when you want it to stop and ask. Then let it work." (claude.dev)
Each band's width is elapsed time. Claude Code compresses activity and output to almost nothing: sessions, tokens, diffs, PRs fold into slivers. Outcome and impact keep their weeks, and the arrows into them (the ? marks) are still hypotheses that need users, data and judgment to check. The row under the ribbon names the instrument that measures each stage; only the right half tells you whether the work mattered. Switch between before and with Claude Code, or replay the fold. The day counts are illustrative.
Claude Code's own dashboards measure output. The Team and Enterprise analytics dashboard counts lines of code accepted, suggestion accept rate, and PRs labelled claude-code-assisted, and ranks a leaderboard by contribution volume. The docs note that "Lines of code accepted" "does not track subsequent deletions". OpenTelemetry exports claude_code.lines_of_code.count, claude_code.pull_request.count and claude_code.commit.count. These are adoption and throughput signals. They're useful for capacity planning and harmful as success metrics: optimize them and you get more code, not a better product. Outcome data lives in product analytics, logs and the support queue. Delivery-5 shows how to bring it into a session through MCP servers or CLIs (analytics, monitoring).
✗ Output prompt
Add a "Downgrade plan" button to the billing page that calls the billing API with the new plan id.
Finish line: the button renders. Claude will probably wire the happy path, add a unit test and stop. Nobody has decided what happens to the two extra seats, when the price changes, or what the admin sees.
✓ Outcome prompt
Outcome: a Business admin can move to Team without contacting support, including when they have more seats than Team allows. Evidence: an e2e test for 8 and 12 seats, plus a screenshot of each confirmation step. Guardrails: no change to invoices already issued, nothing under db/migrations/. Stop and ask before choosing proration behavior.
Finish line: an observable user result with evidence Claude can produce now. One product decision stays explicitly with you.
How to apply it. Put the outcome contract where every session sees it, and put the per-task outcome in a goal condition that can be evaluated:
File: CLAUDE.md (excerpt)
## Definition of done
- Name the user-visible outcome in the PR description, and how we will observe it
after release (metric, log line, or dashboard).
- Show evidence instead of asserting success: paste the command and its output,
or the path of the screenshot you took.
- Stop and ask before changing db/migrations/ or api/webhooks/.
- If the outcome can't be demonstrated in this session, say so and list what would
demonstrate it.
/goal a Business admin with 12 seats can downgrade to Team in the e2e suite: the flow
shows the seat-reduction step, the plan change is scheduled for the end of the billing
period, and `npm run test:e2e -- downgrade` exits 0; `git diff --name-only origin/main...HEAD` shows
nothing under db/migrations/; or stop after 25 turns
The /goal evaluator "doesn't run commands or read files independently". It judges what Claude has surfaced in the conversation, so write the condition as something Claude's own output can show: a test result, an exit code, a file that exists. The condition can be up to 4,000 characters, and a turn clause bounds the run (goal). The definition of done in CLAUDE.md is advisory context. That's fine for a quality bar, but not for a hard rule (see Scope).
Pick a task, then switch on the parts of an outcome prompt. The assembled prompt updates live, with the part you just added marked, and the three columns list what Claude, a /goal evaluator or a reviewer can't check while a part is missing. The verifiability score just counts parts; it doesn't measure prompt quality.
Pitfalls"Tests pass" is still output. It shows the code does what the tests say, not that users get the outcome. Velocity theater: rewarding PR counts in a world of five parallel sessions rewards PR splitting. Over-specifying the output (exact component tree, exact SQL) leaves Claude no room to find a better route to the outcome; specify the what and the guardrails, and leave the how to the plan.
Why an outcome must be demonstrable inside the session (leading and lagging indicators)
Most product outcomes are lagging: cancellations over 30 days, support tickets per 1,000 admins, net revenue retention. No session can demonstrate them, and a /goal evaluator that only reads the transcript can't judge them. So every outcome prompt has two halves:
A leading indicator Claude can demonstrate now, and that you believe predicts the outcome. For example, the complete downgrade flow passes e2e for the seat counts customers actually have, and the plan_downgrade_completed analytics event fires with the properties the dashboard needs.
A post-release check that tests the belief: the metric, the window, and the guardrail metrics that must not move, such as refunds or failed payments. Delivery-5 turns this into a decision log.
Claude Code's analytics illustrate the measurement trap from the other side. For attribution, "Sessions from 21 days before to 2 days after the PR merge date are considered". The docs call the metrics "deliberately conservative" and an underestimate. That's a sound measure of adoption, and it says nothing about whether the merged PRs improved anything for users. Use it to answer is the team using the tool?, never is the team succeeding? (analytics).
Product Engineer Versus Product Manager
A product engineer owns a problem end to end inside an agreed scope: understanding the users, shaping the solution, building it, verifying it and learning from the release. A product manager owns the portfolio around it: strategy, prioritization across teams, pricing and packaging, customer commitments, and the "why now". The roles always overlapped. Claude Code moves the boundary because the expensive part of the engineer's day, implementation, shrank. The freed time goes to discovery and definition work that used to sit with the PM, and the PE can now do that work with the same tool they build with.
How it works. The PE uses Claude Code across the whole loop, not just "build". Each stage leaves an artifact in the repo, so the next session, a teammate, a cloud session or a reviewer starts from the same state:
Stage
Claude Code moves
Artifact you keep
Who decides
Discover
Codebase questions ("trace a plan change from web/billing to the database"), Explore subagents, support and analytics data through MCP servers or CLIs, /btw for side questions
Exploration report, open questions
PE, with PM context
Define
AskUserQuestion interview, then SPEC.md; plan mode for the approach
SPEC.md, plan file, decision record
PE writes; PM reviews the why, the users and the metric
Build
Plan approval, auto mode, worktrees, subagents, /goal
Branch, commits
PE
Verify
/code-review, /verify, a review subagent checking against SPEC.md, a system diff
PR with evidence
PE plus a human reviewer
Learn
Analytics, logs and tickets after release; updates to CLAUDE.md and skills
Decision log, updated rules
PE and PM together
Top: the classic handoff as a game of telephone. Each whisper from role to role loses context and adds waiting time, until the release hears "add a downgrade button". Bottom: one owner runs the loop with Claude Code, and the artifacts (SPEC.md, the plan, the PR evidence, the decision log) carry the request between stages word for word. The PM's input enters at Define and Learn, the two stages where business context matters most. Step through the whispers; the wording is illustrative.
What insiders report. In a community interview, Claude Code team members said Claude Tag "now lands 65% of the product engineering PRs for the Claude Code team" (Simon Willison, community). Anthropic's source-control post adds the qualitative side: "Very often, we found that the role of the engineers was to tell Claude 'no.'" (Anthropic Engineering). Read the two together. When Claude does most of the typing, the PE's leverage is the quality of their "no": rejecting the wrong scope, the wrong tradeoff, the over-engineered abstraction.
How to apply it. Agree a contract between the roles. The PM brings the problem statement, target users, the outcome metric and its guardrails, and the non-negotiable constraints (pricing, legal, deadlines). The PE turns that into SPEC.md with Claude, owns the plan and the PR, and reports the post-release check. Make the PR carry the contract. The Claude Code team's review checklist includes a PR template with "Testing", "Risk" and "How to revert" (claude.dev):
File: .github/pull_request_template.md
## Problem and outcome
Who is affected, what changes for them, and the metric we expect to move.
## Evidence
Commands run and their output, screenshots, links to e2e runs.
## System diff
Behavior, data, contracts, dependencies, operations (run /system-diff).
## Risk
What could go wrong, who would notice first, and what is behind a flag.
## How to revert
Code revert, flag flip, data repair steps. Mark one-way doors explicitly.
PitfallsThe PE as a prompt relay: pasting the PM's ticket into Claude and shipping what comes back. You now ship faster without anyone exercising engineering judgment. The PM writing specs straight for Claude: this skips the person who knows the system's constraints, so the spec reads well and ignores the webhook retry semantics. Nobody owns the release: output stops at merge, and the learning stage never happens.
Attention as the Bottleneck
Your attention budget is the minutes of focused judgment you can spend in a day. You spend it approving tool calls, answering questions, prompting the next turn, reading output, switching between sessions and reviewing diffs. Claude Code multiplies the demand on that budget: every parallel session is another stream of prompts. The failure mode is approval fatigue. Anthropic measured that "Claude Code users approve 93% of permission prompts" (auto mode post). When nearly every prompt gets a yes, the prompt stops being a decision, and the risky 7% gets the same reflexive yes.
How Claude Code addresses it. Each source of interruption has a matching control:
Attention sink
Claude Code control
Notes
Per-tool approvals
Auto mode; allow rules; /fewer-permission-prompts; the sandbox's auto-allow (/sandbox)
Auto mode is the built-in starting mode for interactive terminal and VS Code sessions (requires v2.1.283+). The docs list it as best for "Long tasks, reducing prompt fatigue". /fewer-permission-prompts scans your transcripts and writes an allowlist of common read-only calls to project .claude/settings.json.
Per-turn prompting ("continue", "now run the tests")
permission_prompt fires after a prompt has waited about six seconds, and idle_prompt about 60 seconds after Claude finishes. Agent view sorts Ready for review and Needs input above Working.
Re-entry after a break
Session recap, /recap
A one-line recap appears when you return after about three minutes away, in sessions with at least three turns.
A question blocks while you're away
askUserQuestionTimeout
"60s", "5m", "10m" or "never" (default). Permission prompts, including plan approval, "never auto-resolve on idle".
Side questions polluting context
/btw
/btw answers "without adding anything to the history".
Where attention should go. Spend it at the two ends of the loop and as little as possible in the middle. At the front: intent, the interview, plan approval. At the back: evidence, the code diff, the system diff. Approving npm test for the fortieth time is attention spent in the middle, and it trains you to approve without reading.
File: ~/.claude/settings.json (user scope; settings files are strict JSON, so no comments. osascript is macOS-only; the hooks guide gives the Linux and Windows commands)
{
"permissions": {
"allow": ["Bash(npm run lint)", "Bash(npm run test *)", "Bash(git diff *)"],
"ask": ["Bash(git push *)"],
"deny": ["Read(./.env)", "Edit(/db/migrations/**)"]
}
}
The allow rules spare you prompts in Manual and acceptEdits modes. When a session enters auto mode, Claude Code drops broad allow rules such as Bash(*), wildcarded interpreters and package-manager run commands, and lets the classifier decide those calls instead. No mode auto-approves the ask rule: auto mode still prompts for it, and dontAsk denies the call. The deny rules block in every mode (permission modes). Matcher syntax: a value containing only letters, digits, _, -, spaces, , and | is an exact list of notification types (hooks).
Each session pours grains into the top bulb: permission prompts (●), context switches (◆) and diffs to review (■), one grain per minute of attention they demand. The neck is your review attention, 60 minutes an hour. What can't pass heaps up as the review queue, and some of it slips down the side chute, approved without being read. Switch on the filters above the neck (the auto-mode classifier, /goal with checks, deterministic gates, a verifier subagent) and they divert grains that don't need a person into the tray, so the neck spends its minutes on judgment. Then add sessions. Toy model: every rate is illustrative, and it shares its parameters with the attention budget simulator below, so a change in one shows in the other.
Toy model with illustrative parameters. A permission prompt costs a few seconds plus a context-switch penalty that grows with the number of sessions. Past a threshold rate, you start approving risky calls without reading them, which is approval fatigue. Review time scales with the output each session produces. The bar is one hour: the largest demand is marked, and the hatched remainder is the focus you have left. It starts at Manual with four sessions; then try auto mode with /goal and notifications. The hourglass above uses the same model.
Pitfalls"Save attention" with bypass mode.bypassPermissions is for "Isolated containers and VMs only" and "offers no protection against prompt injection or unintended actions". Auto mode is the middle ground. Reading the 93% as evidence of safety: it's evidence that prompts stopped carrying information. Parallel sessions without notifications: you either poll terminals (attention leak) or miss a blocked session for an hour. Agent view stops idle, unattached sessions after about an hour unless you pin them.
Auto mode internals: what the classifier sees, how it falls back, and its measured error rates
Auto mode runs a second model, the classifier, over each tool call that isn't already safe. It blocks "anything irreversible, destructive, or aimed outside your environment". By default the classifier requests go to Claude Sonnet 5; CLAUDE_CODE_AUTO_MODE_MODEL overrides that (requires v2.1.302+). It sees user messages, tool calls and CLAUDE.md, but "Tool results are stripped from those requests, so hostile content in a file or web page can't manipulate the classifier directly." By default it trusts the working directory and the git remotes configured at session start (permission modes, auto mode config).
Fallback. "if the classifier blocks an action 3 times in a row or 20 times total, auto mode pauses and Claude Code resumes prompting". The thresholds aren't configurable. In a claude -p run without a permission-prompt tool, the action is denied and "Claude keeps working".
Error rates. Anthropic's engineering post reports a 0.4% false-positive rate on real traffic and a "17% FNR" on a set of real overeager actions; a later post rounds this to catching about 83% of overeager behavior. The docs say it plainly: "Auto mode reduces permission prompts but does not guarantee safety." Pair it with deny rules and the sandbox (auto mode post, containment post).
Two attention-relevant side effects. First, boundaries you state in chat ("don't touch billing") "are not stored as rules" and "can be lost if context compaction removes the message that stated it. For a hard guarantee, add a deny rule instead." Second, "Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it." Auto mode saves attention partly by asking fewer questions. When a decision belongs to you, ask for the interview explicitly (see Judgment).
Exercise: an attention audit
For one working session on a real task, keep a tally of every interruption by type: permission prompt, "continue" prompt, question, terminal check, review. Then change three things: run /fewer-permission-prompts and review the allowlist it proposes; add the Notification hook above; and give the next comparable task a /goal condition with a turn cap. Repeat the tally. Which category dropped, and did any risky call now go through without you seeing it?
Show a reference solution
A typical result in Manual mode: most interruptions are permission prompts for test commands and for read-only calls outside the built-in read-only set (gh, cloud CLIs, MCP reads), followed by "continue" prompts. Built-in read-only commands such as ls, cat and grep never prompt. /fewer-permission-prompts removes most of the first group. Read its proposal, because it writes to the committed project settings and your teammates inherit it. /goal removes most "continue" prompts. The notification hook doesn't reduce interruptions. It turns polling into push, which matters most with two or more sessions. Check the second question deliberately: open /permissions and confirm that git push and anything touching migrations still hit an ask or deny rule. If you moved to auto mode, open /permissions and select the Recently denied tab to see what the classifier stopped.
Key takeaways
Claude stops when the task you stated is done. State outcomes with evidence it can produce in-session, plus guardrails and a stop-and-ask rule.
Claude Code's analytics and OpenTelemetry metrics measure adoption and output. Outcome data comes from your product's own signals.
The product engineer runs the whole loop with Claude Code and leaves an artifact at each stage. Their leverage is the quality of their "no".
Approval fatigue is real (93% approval). Remove routine prompts with auto mode, allowlists and /goal, push the rest with notification hooks, and keep ask and deny rules for the decisions that matter.
Ownership
Claude Code executes. It owns nothing. For every change, someone must answer four questions: what may this touch (scope), who experiences it (user impact), why is it worth it (business value), and what does it make harder later (technical consequences). Ownership in Claude Code means answering them before the session and encoding the answers where Claude works: the spec, the permission rules, the goal condition, the PR.
Scope
Scope is the set of things a change may affect, and just as important, the things it may not. In Claude Code, scope lives in three layers with different strengths:
Layer
Where it lives
Strength
Intent
SPEC.md "In scope / Out of scope", the approved plan, CLAUDE.md
Advisory. Claude reads it as context, and it can be lost when context is compacted.
Permission
Deny and ask rules, a worktree, a subagent's tools, the sandbox
Enforced by Claude Code, not by the model. "Deny rules block in every mode, including bypassPermissions." One exception: without managed settings or a Team or Enterprise /login, an installed mod "can approve a call that a deny rule refuses", so treat installed mods as trusted code.
Evaluation
/goal constraints, a review subagent prompted to check that nothing outside the task's scope changed
Checked after the fact. Catches drift that the other two layers allowed.
Why it matters more with Claude Code. Current models are proactive. In a community write-up, Fable, given a screenshot and a one-line prompt, built its own screenshot pipeline and a measurement server for what turned out to be "a two-line CSS fix", at about $12 (Simon Willison, community). That initiative is valuable inside a fence and expensive outside one. A scope fence is the combination of all three layers for one task.
How to apply it. Put durable fences (secrets, migrations owned by another team) in committed project settings. Put task-specific fences in .claude/settings.local.json at the git root. Claude Code adds that file to your global git excludes the first time it writes the file; "if you create the file by hand, add it to .gitignore yourself" (settings). A /path pattern in either project file anchors at the primary working directory; a bare or ./ path is relative to the current directory (permissions):
File: .claude/settings.local.json (a fence for the downgrade task only)
Two precision notes. "Read and Edit deny rules apply to Claude's built-in file tools, to file commands Claude Code recognizes in Bash, such as cat, head, tail, sed, and tee, and to the targets of Bash redirections", but not to "arbitrary subprocesses" like a Node script that writes files itself. For OS-level enforcement, turn on the sandbox: with it on, Read and Edit deny rules also restrict sandboxed shell commands. And Edit(...) is the only write rule Claude Code consults. A Write(...) path rule is accepted and ignored, with a startup warning.
Each area of the downgrade codebase is a plot, and its border is its fence: open ground is edit, glass is read only, a gate is ask first, and a wall is off limits. Click a plot (or focus it and press Enter) to change its fence. The builder emits all three layers: the SPEC.md scope section, a .claude/settings.local.json fence, and a /goal constraint plus a reviewer prompt. Paths are illustrative.
PitfallsProse-only fences ("please don't touch migrations") are intent, not permission. Fences without an escape hatch: if the fence blocks something the task truly needs, Claude may work around it, for example by duplicating logic outside the fence. Add "If the fence blocks the task, stop and explain why" to the prompt. Fencing with Bash deny rules alone:Bash(rm *) doesn't stop /bin/rm or bash -c. A Bash deny rule "isn't a security boundary around the program".
User Impact
User impact is who experiences different behavior after the change, how it differs, and how they'd notice. Visible changes are easy to list. The silent ones cause the tickets: a changed email, a different API error code, a new default, a timing shift such as "takes effect at period end" instead of "immediately".
How it works with Claude Code. Claude can enumerate impact from the code far faster than you can, because it can read every route, role check, flag, template and serializer the branch touches. It can't see who actually uses those paths. That needs usage data, which delivery-5 brings in through MCP servers and CLIs. Ask for the code-derived map first, then check it against data:
List every user-visible behavior that changes on this branch compared with origin/main.
Group by segment: workspace admin, member, billing contact, API client, support agent.
For each change give: what the user sees before and after, the file:line that causes it,
whether it is behind a feature flag, and whether any email, webhook payload or API
response changes shape. Mark anything you inferred rather than read.
Then walk the flow instead of reading about it. The bundled /run skill launches and drives your app so Claude can see a change working. /verify builds and runs the app to confirm a change does what it should, "rather than relying on tests or type checks". Since v2.1.215, /verify "runs only when you invoke it", so it's your end-of-flow check, not something Claude calls mid-task. /run-skill-generator teaches them how your app starts. The Chrome integration (claude --chrome or /chrome, which needs the Claude in Chrome extension 1.0.36 or later) lets Claude click through localhost, read console errors and save screenshots. In the Desktop app, preview servers verify changes automatically (Chrome, Desktop).
Example: the downgrade's impact mapAdmins see a new plan-change flow, plus a seat-reduction step if they're over 10 seats. Members who lose a seat get read-only access and an email; nobody had decided this until the impact map asked. Billing contacts receive a changed renewal email. API clients see subscription.plan change at period end rather than immediately. Support agents see a new "pending downgrade" state in the console. Three of these five are silent, and only one was in the original ticket.
PitfallsTreating the code map as the impact. Claude reports what code paths change. It can't tell you that 40% of Business workspaces have 11 to 14 seats, which makes the seat-reduction step the main flow rather than an edge case. Forgetting non-human users: API clients, webhook consumers and data pipelines are users too, and they're often the ones who break.
Business Value
Business value connects the outcome to a metric the business cares about, and weighs it against the full cost of the change: building, reviewing, running and maintaining it. For self-serve downgrades, the value hypothesis is subtle. The feature reduces revenue per downgrading customer (contraction) in exchange for fewer cancellations (churn) and fewer support tickets. If you get the sign of either effect wrong, a well-built feature loses money.
The feature pulls three levers with opposite signs: churn should fall (good), contraction rises (bad) and support load falls (good). The arrows on the first edges say which way the feature pushes each lever; the ± badges are link polarity. Net revenue retention moves only if the churn effect outweighs the contraction effect. The dashed box at the bottom, marked by default, is the cost side, which Claude Code shrinks but doesn't remove. Hover or focus a lever to follow its path. Every edge is a hypothesis to check after release.
The cost side in Claude Code terms. Token cost is visible: /usage (aliases /cost, /stats) shows a local estimate at list price. The docs put the enterprise average at "around $13 per developer per active day", under $30 a day for 90% of users (costs), and "Running several sessions or subagents at once multiplies token usage" (run agents in parallel). The hidden costs are larger: your review minutes, the permanent maintenance of every line, and the support surface of every new state. Cheap building changes the economics in one useful way. A 30-minute prototype can buy information before you commit to the full build (see Leverage).
How to apply it. Ask Claude to draft the value hypothesis, and insist that every number is labelled as an assumption. Claude can structure the argument and find the instrumentation points in code. It can't know your churn rate unless you give it data:
Before planning, write docs/value/downgrade.md with: the metric this should move and the
expected direction; the leading indicator we can see within two weeks of release, and the
event or log line in our code that would measure it (cite file:line or say it doesn't
exist yet); the guardrail metrics that must not move; and the cheapest experiment that
could falsify the hypothesis. Label every number as an assumption unless I gave it to you.
PitfallsInvented numbers with confident prose. Claude will happily estimate a "15-25% churn reduction" if you ask for one. Treat every unlabelled number as confabulation until it has a source. Value-blind velocity: cheap building tempts teams to ship everything on the backlog. The cost of a change is mostly paid after merge. Missing instrumentation: if the leading indicator has no event in code, add it to scope now. After release is too late.
Technical Consequences
Technical consequences are what the change makes harder or easier later: new coupling, new states to support, schema changes, security exposure, performance cost, and the next engineer's ability to understand the code. Claude writes the code in minutes, but the consequences last for years, and you own them.
Claude Code's review tools, by concern.
/code-review [low|medium|high|xhigh|max|ultra] reviews the current diff "for correctness bugs" in a fresh subagent; ultra runs the deep cloud review.
/simplify runs "Four review agents ... in parallel, covering reuse of existing helpers, simplification, efficiency, and whether the change is at the right level of abstraction". It "doesn't look for correctness bugs".
/security-review reviews "the diff between your branch and origin's default branch" for injection, auth and data exposure; it needs an origin remote.
A custom review subagent checks the diff against SPEC.md and your consequence questions (commands).
Reversibility is a consequence. Know what Claude Code can and can't undo before you approve a step:
Change
Undo with
Limit
File edits by Claude's tools
Checkpoints: /rewind or Esc Esc
"A file that only Bash commands changed isn't tracked and stays as it is" (Bash changes to a file Claude already edited with its file tools are undone); subagent edits are usually not restored
Committed code
git (revert, reset)
"Checkpoints are separate from git"; pushed history affects others
Data migrations, sent emails, payment-provider calls, webhooks
Nothing in Claude Code
These are one-way doors; gate them with ask rules and human approval
Before implementing, answer for the plan you chose: What will be harder to change after this
lands? Which new states must support handle forever (for example "pending downgrade")? Which
steps are one-way (data, money, messages) and how do we rehearse them? What breaks if the
payment provider's webhook arrives twice, late, or never?
Fill the four lenses (prefilled with the downgrade example), and set risk and reversibility; the stamp in the canvas corner shows both. The outputs update as you type: the canvas becomes a SPEC.md header, a PR description and a /goal condition. When reversibility is one-way, the stamp is marked and the outputs add an explicit human-approval step and an ask-rule suggestion.
Consequence-aware settings: ask rules for one-way doors
An explicit ask rule is one of the few things "no mode auto-approves", including auto mode and bypassPermissions (permission modes). That makes ask rules the natural encoding for one-way doors: the session stays autonomous for everything reversible, and stops at the irreversible steps.
mcp__billing__* assumes an MCP server you registered under the name billing; tool rules use the mcp__<server>__<tool> form. Remember the limits. Bash rules match the command string (wrappers like timeout and nohup are stripped, while npx and docker exec are not), so a determined workaround can still run the same program another way. For production credentials, the real boundary is that the session never holds them. The containment guidance is "if credentials never enter the sandbox, they can't be exfiltrated" (containment post).
Key takeaways
Scope has three layers: intent (advisory), permission (enforced) and evaluation (checked). A fence uses all three.
Claude maps user impact from code quickly; usage data tells you which impacts matter. Look hardest for the silent changes.
Business value needs a falsifiable hypothesis with labelled assumptions and an instrumented leading indicator. Claude's numbers are drafts.
Use /code-review for correctness, /simplify for structure and /security-review for exposure. Checkpoints don't undo files that only Bash changed, data or messages, so gate one-way doors with ask rules.
Judgment
Claude makes hundreds of small decisions in a session: which file to change, which edge case matters, which library to reuse, which behavior to assume when the spec is silent. Judgment is deciding which of those decisions you make yourself, which you delegate, and making Claude's implicit choices visible so you can review them. Two Claude Code features carry most of the weight. Plan mode has Claude research and propose before it changes anything. AskUserQuestion has Claude ask you to decide.
Assumptions
An assumption is a belief someone acts on without checking it. In a Claude Code session there are three kinds: about the code ("seat limits are enforced in the API"), about users ("admins want the downgrade to take effect immediately"), and about the world ("the payment provider prorates automatically"). Claude resolves code assumptions cheaply by reading. It can't resolve the other two, but it will still pick an answer if you let it.
How it works. Claude fills gaps to keep moving, and two settings push it further. The Proactive output style "makes reasonable assumptions about routine decisions rather than stopping to ask". Auto mode "nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it" (output styles, permission modes). That's the right default for routine decisions and the wrong one for product decisions. You change it by asking explicitly, in two ways.
1. An assumption ledger makes Claude's beliefs reviewable before they become code:
Before you plan, list the assumptions this task depends on as a table: assumption, kind
(code / user / external), status (verified with file:line / inferred / unknown), and what
breaks if it's wrong. Don't resolve user or external unknowns yourself. Mark anything you
couldn't confirm, and say where you looked.
2. An interview turns the unknowns into decisions. The docs give this prompt shape (best practices), here for the downgrade:
I want to build self-serve plan downgrades but haven't thought it through yet. Interview me
until you could write the spec, then write it to SPEC.md.
How AskUserQuestion works. Each call carries 1 to 4 questions. Each question has a header of at most 12 characters, 2 to 4 options with a label and a description, and a multiSelect flag. You can also type your own answer through the Other row, and Claude Code relays a typed answer "with neutral wording so Claude follows what you wrote". The tool isn't available inside subagents, so interviews happen in the main conversation. dontAsk mode denies it. Questions wait for you unless you set askUserQuestionTimeout (tools reference, user input).
A faithful rendering of one interview round for the downgrade, with four questions, headers of 12 characters or fewer, and 2 to 4 options each. Pick answers and submit. The transcript shows the tool_use input and the answers Claude receives. The spec panel turns each decision into a SPEC.md line and an acceptance criterion. Unanswered questions stay assumptions.
After the interview, the docs recommend that you "start a fresh session to build from it, so the build begins with a clean context and a written definition of done." Delivery-2 develops interviews and specs fully.
PitfallsInterviewing for facts the code can answer. Have Claude read first, then ask only what reading couldn't settle. Answering on autopilot: an interview is where attention should go, so take your time on it. Assuming Proactive or auto mode will ask about product decisions: both are designed to ask less.
Tradeoffs
A tradeoff is a choice where improving one property costs another. For downgrades: "take effect immediately with prorated credit" is fair to the customer and complex to build; "take effect at period end" is simple and pleasant for finance, but leaves the customer paying for seats they can't use. Judgment means making the tradeoff explicitly, with criteria, before code commits you to one side.
Plan mode is the tradeoff tool. "Plan mode tells Claude to research and propose changes without making them." Enter it with /plan [description], start with claude --permission-mode plan, or press Shift+Tab until the status bar shows ⏸ plan mode on. From auto mode that takes three presses, so /plan is faster. In plan mode, Claude delegates research to the read-only Plan subagent, then presents the plan with three choices: Yes, and use auto mode, Yes, manually approve edits, or No, keep planning. Ctrl+G opens the plan in your editor. showClearContextOnPlanAccept adds an option that approves and clears the planning context, and plansDirectory moves plan files from ~/.claude/plans into the repo. The opusplan model alias "uses opus during plan mode, then switches to sonnet for execution" (permission modes, model config).
/plan Propose three approaches for downgrade timing: immediate with prorated credit,
end of billing period, and immediate without credit. For each give: files that change,
new states we must support, reversibility, effort, user experience for an admin with 12
seats, and which assumption from the ledger it bets on. Recommend one and say what
evidence would change your mind.
Step through one plan-mode cycle, or throw the switch yourself. The session runs on plan mode's read-only rails through the research and the proposed plan, takes the Ctrl+G siding to edit it, then reaches the switch: each approval option sends it down a track labelled with the permission mode the implementation runs in, and "No, keep planning" loops it back for a new plan.
Record the decision. A plan file is a working document; a decision record outlives it. Ask Claude to write one when you approve:
File: docs/decisions/0042-downgrade-timing.md
# 0042: Downgrade timing
Status: accepted (2026-10-20)
Decision: downgrades take effect at the end of the billing period.
Options considered: immediate + prorated credit; period end; immediate, no credit.
Why: no new invoice states, no credit-note handling, and support confirmed admins
mainly want to stop the next charge. Proration stays possible later (two-way door).
Revisit if: more than 10% of downgrade attempts are followed by a support ticket
asking for an immediate change.
Pitfalls"Pick the best approach" without criteria hands the tradeoff to Claude's defaults. Treating plan mode as strictly read-only: when auto mode is available, the classifier approves shell commands during planning. Set useAutoModeDuringPlan to false if you want prompts instead. Planning everything: if you could describe the diff in one sentence, skip the plan. Raising effort to settle a tradeoff: effort deepens reasoning about an approach, but it doesn't choose your values for you.
Taste
Taste is a set of consistent, defensible preferences about what good looks like that tests don't capture: how a flow feels, how copy sounds, how an API is shaped, where an abstraction belongs. Claude has defaults for all of these, and they're reasonable and generic. Anthropic's Opus 5.5 guidance notes that "avoid a generic look" just swaps one default for another, and recommends naming the styles you don't want (claude.dev).
How to encode taste in Claude Code:
Point to exemplars in your codebase. The docs' example: "follow the pattern in HotDogWidget.php and build a calendar widget that lets you pick a month and page between years. no new libraries" (best practices).
Keep principles short, in CLAUDE.md. Aim for under 200 lines per file, and write them plainly: current models "follow a plainly worded line, and piling on emphasis mostly makes Claude over-apply the rule."
Put domain taste in a skill that loads only when relevant, with negative examples and a reason for each.
Enforce structural taste with /simplify (reuse, abstraction level), and keep correctness for /code-review.
File: .claude/skills/billing-ux/SKILL.md
---
name: billing-ux
description: Copy and interaction rules for any billing, plan or payment screen. Use when
writing or reviewing UI text, confirmation dialogs or emails about plans, seats or charges.
---
# Billing UX
- Say what happens to money and access, with a date: "You'll move to Team on Nov 30.
You won't be charged for Business after that."
- One primary action per step. Destructive steps name the consequence on the button
("Remove 2 seats"), never "OK" or "Continue".
- Don't use urgency or loss framing ("You'll lose everything!"); we're not trying to
scare people out of downgrading.
- Don't hide the downgrade behind "Contact sales" for plans that allow self-serve.
- Look at web/billing/CancelFlow.tsx for the pattern to follow.
✗ Taste as a vibe
Make the downgrade flow clean, modern and user-friendly. Claude produces its default "clean": a modal with a gradient header, three bullet points of loss framing and an "Are you sure?" button.
✓ Taste as rules, exemplars and anti-examples
Follow the billing-ux skill and the CancelFlow.tsx pattern. No modal; use the two-step page layout from CancelFlow. No loss framing. The output matches your product, and the reviewer has rules to check against.
PitfallsChasing every review finding. The docs warn: "If you fix every finding, you end up with extra abstraction layers and tests for cases that can't happen." The Claude Code team caps review rounds: after three, "the reviewer asks the author to step back" (claude.dev). Taste that lives only in your head: it can't reach cloud sessions or teammates. Few-shot examples by default: whether examples help is model-dependent and contested for current models, so evaluate them on your own tasks.
Edge Cases
An edge case is an input or state at the boundary of normal operation, where behavior is most likely wrong: exactly at the seat limit, a downgrade on the last day of the period, a payment that's past due, two admins acting at once, a webhook that arrives twice. Product judgment decides which edge cases matter and what the right behavior is. Claude is excellent at finding them, and has no authority to decide policy for them.
How effort interacts. Effort levels run low, medium, high, xhigh and max, and medium is the default on Opus 5.5, Sonnet 5.5 and Haiku 5.5. A Claude Code team member describes the effect precisely: "increasing effort tends to reduce failures due to missing edgecases... but does not fix when the model has the wrong approach". The author's loop is "getting the model to interview me then implementing on low effort, reviewing what it built, and then running verification on high effort" (Spending your effort; one insider's practice, not a rule).
ultrathink asks for deeper reasoning on one turn "without changing your session effort setting" (from v2.1.311, typed in the terminal, it can run that turn at xhigh); "think hard" is ordinary text (model config).
Enumerate edge cases for the downgrade by family: boundaries (seat counts at and around
the limit), timing (first/last day of period, trials), money (past-due, credits, annual
plans), concurrency (two admins, webhook retries), partial failure (provider succeeds,
our write fails), permissions (who may downgrade). For each: reachable today (cite code)?
expected behavior (quote SPEC.md, or write ASK if SPEC.md is silent)? test exists?
Every ASK in that table is a product decision to route through an interview, not something Claude should decide. Then verify with fresh eyes. The docs' spec-review prompt (best practices), pointed at the downgrade:
use a subagent to review the downgrade diff against SPEC.md, check every requirement is
implemented and the listed edge cases have tests, report gaps that affect correctness and
skip style
Toy model. Each downgrade edge case sits on the field at an illustrative "difficulty". The search beam reaches as far as effort, a by-family prompt and an adversarial review subagent together allow, and every case inside it is found. With the wrong approach (computing proration in the browser), cases that depend on the approach are found but stay hollow: they can't be handled correctly, however high the effort.
PitfallsEdge cases without expected behavior: Claude fills the gap with a policy you never chose. Tests for unreachable cases: ask "reachable today?" and cite code. Max effort everywhere: the docs warn that "max may show diminishing returns and is prone to overthinking". Use it for verification passes and hard autonomous problems, not for drafting.
Uncertainty
Uncertainty is what you don't know yet, and it comes in kinds that Claude Code resolves very differently. Treating them alike is the most common judgment error with agents: people ask Claude to "decide" something that only users or data can settle, or they run user research to answer a question the code could have answered in 30 seconds.
Hover or focus a question to see how it gets resolved; the marked lane is the expensive one. Facts about the code are cheap to resolve: an Explore subagent, a code intelligence plugin or a direct question settles them in minutes. /btw helps only when the answer is already in context, because it has no tools. Facts about users and the market need data or a prototype in front of people. Claude can build the prototype, but it can't be the user. Facts about Claude's own output need checks it can run: tests, screenshots, a fresh reviewer. The most expensive mistake is mixing up the columns.
Claude's uncertainty is not calibrated prose. Phrases like "this should work" or "I'm confident" aren't probabilities. Ask for evidence instead of confidence: "Mark anything you couldn't confirm, and say where you looked" (claude.dev), and "ask Claude for evidence: the command it ran and its output, or the screenshot" (best practices). Confabulation is most likely exactly where you can't check: library behavior, external APIs, the payment provider's proration rules. For those, have Claude read the vendor docs with WebFetch, or write a tiny test against the sandbox API.
Buying information. When uncertainty about users or approach is high, the cheapest move is often to spend Claude time on something you intend to throw away: a clickable prototype of two downgrade flows to show five customers, or a scouting run in a throwaway worktree. The question is the value of information: would the answer change what you build, and is it worth more than it costs to get? With Claude Code, the cost side of that calculation dropped by an order of magnitude, so more questions are now worth answering empirically.
Value of information in one paragraph, with the downgrade numbers
Suppose you believe there's a 60% chance admins prefer end-of-period timing and a 40% chance they need immediate downgrades. If you build period-end and you're wrong, you expect a rework costing about 8 engineer-days plus some churn. If you build immediate-with-proration and you're wrong, you've spent about 6 extra days on complexity nobody needed. The expected loss of deciding now is roughly min(0.4 × 8, 0.6 × 6) = 3.2 days. A two-day test (Claude builds both flows as clickable prototypes in an afternoon, and support shows them to customers over the following day) that resolves most of the uncertainty is worth running if it costs less than about 3 days of equivalent effort. It does, so run it. All numbers are illustrative.
Exercise: classify, then resolve
In a real repo, start a session in plan mode (/plan) for a feature you're about to build. Ask for the assumption ledger from the Assumptions concept. Sort each unknown into code, user or external. Resolve every code unknown with one prompt that delegates to Explore subagents. Then run an AskUserQuestion interview for the user unknowns, and for each external unknown write down the cheapest check (a vendor doc, a sandbox call, a prototype).
Show a reference solution
Prompt for the code unknowns: Use Explore subagents (medium thoroughness) to verify each assumption marked 'code' in the ledger. For each, return verified/false with file:line, and update the ledger. Expect most code unknowns to resolve, and expect one or two "verified" assumptions to turn out false. Seat limits enforced in the UI but not the API is a classic. For user unknowns, the interview should produce three to six decisions. If Claude asks something the ledger already answered, note it: either your ledger wasn't in context, or the question wasn't specific enough. For external unknowns, the best check is usually a short script against the provider's test mode, written by Claude and run by you. The output of the exercise is a ledger with no "unknown" rows except ones you deliberately accept, each with a reason.
Key takeaways
Make assumptions visible with a ledger, and turn the product ones into decisions with an AskUserQuestion interview. Proactive style and auto mode are designed to ask less.
Plan mode is the tradeoff tool. Ask for options with explicit criteria, edit the plan with Ctrl+G, choose the approval mode, and record the decision.
Encode taste as exemplars, short principles, a skill with anti-examples, and /simplify. Cap review rounds.
Effort widens edge-case coverage but doesn't fix a wrong approach. Expected behavior for edge cases is policy, and policy is yours.
Resolve uncertainty by kind: read code, test with users, verify output. Cheap prototypes changed the value-of-information math.
Systems Thinking
A diff is a perturbation to a system made of code, data, dependencies, running infrastructure and people. Claude Code sees the repository it can read. You see the system, or you make Claude see enough of it. This topic covers four habits: explore the architecture before you change it, trace dependencies beyond the import graph, assess operational impact, and describe the change as a system diff rather than a code diff.
Architecture Exploration
Architecture exploration means building a working model of the system before you change it: the components, how requests and data flow between them, who owns which data, and which invariants the code enforces. Without that model you review Claude's diff line by line, but you can't judge it as a whole.
How Claude Code explores. Ask it the questions you'd ask a senior engineer, such as how logging works, or "trace the login process from front-end to database" (common workflows). For anything bigger than a lookup, delegate to the built-in Explore subagent, "A fast, read-only agent optimized for searching and analyzing codebases". When invoking it, Claude picks a thoroughness level: "quick for targeted lookups, medium for balanced exploration, or very thorough for comprehensive analysis". The exploration happens in the subagent's own context window, and only a summary comes back, which "keeps exploration results out of your main conversation context". In plan mode, the read-only Plan subagent does the same job (subagents).
Three Explore details matter for systems work:
"Explore and Plan start without your CLAUDE.md files and the git status snapshot". Architectural rules you wrote in CLAUDE.md don't reach them, so put the constraints that matter into the prompt.
Explore runs on the main conversation's model; when that's Fable, a subscription or Console session runs Explore on the model the opus alias resolves to. A project or user subagent named Explore overrides the built-in, so model: haiku makes exploration cheaper.
Explore and Plan are one-shot. They "return no agent ID, so Claude can't resume them". For iterative mapping, use a custom subagent.
Use three Explore subagents in parallel, medium thoroughness:
1. Trace a plan change from web/billing to the database. List every hop with file:line.
2. Find every consumer of the subscription.updated webhook, in this repo and in analytics/.
3. Find where seat limits are enforced: UI, API, entitlements service, database constraints.
Our rule: entitlements are the only source of truth for plan limits (not in your context, so
check it). Each subagent returns components, data written, invariants, and open questions.
Then merge the results into docs/architecture/billing.md with a Mermaid flow diagram.
File: .claude/agents/arch-mapper.md
---
name: arch-mapper
description: Read-only architecture mapper. Use when asked how a feature flows through the
system, which component owns which data, or what a change would touch. Never edits.
disallowedTools: Write, Edit, NotebookEdit
model: sonnet
effort: medium
---
You map architecture. For the question you receive:
1. Trace the flow end to end and cite file:line for every hop.
2. List components, the data each reads and writes, and invariants enforced in code.
3. Separate what you verified from what you inferred.
4. End with open questions a human must answer. Never propose changes.
Unlike Explore, a custom subagent loads your CLAUDE.md hierarchy (unless you set omitClaudeMd) and the git status snapshot, and Claude can resume it with SendMessage. While you're still learning a codebase, the Explanatory output style adds short "Insight" blocks that explain the choices behind the code Claude writes.
What a subagent starts with, and what that means for exploration quality
Startup context. Explore and Plan skip your CLAUDE.md files and the git status snapshot. Other built-in and custom subagents load the full CLAUDE.md hierarchy unless their definition sets omitClaudeMd. Only Explore and Plan skip git status, and "You can't change which subagents receive git status." There's a useful exception: "For Explore, Plan, and subagents with omitClaudeMd, a subdirectory's CLAUDE.md and matching path-scoped rules still load when the subagent works with files there." Subsystem rules written as nested CLAUDE.md files or paths:-scoped rules in .claude/rules/ do reach an Explore subagent once it reads files in that subsystem. Rules in the root CLAUDE.md don't (subagents).
Cost and caching. A non-fork subagent has a separate prompt cache from the main session. On a Claude subscription within your plan's included usage, the main conversation's cache lives one hour (on usage credits, an API key or a cloud provider, everything gets five minutes), while subagents "fall outside the main-conversation TTL bucket, so they get five minutes even on a subscription" unless you set subagentPromptCacheTtl (v2.1.242+). Exploration fan-outs re-pay their prefix more often than you might expect. A fork's first request reads the parent's cache, so forks are the cheap way to explore from the current context (prompt caching).
Limits. Subagents run in the background by default (since v2.1.198), nest "up to three layers below the main conversation" (CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH), and run up to 20 at once (CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS, v2.1.217+). Claude Code warns at startup once combined subagent descriptions pass 15,000 tokens. To stop the built-in Explore and Plan agents entirely, so Claude reads files directly, set CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS=1 (requires v2.1.198+).
Toy model with illustrative token counts. Choose which questions to explore and how thoroughly, then race the three strategies: inline, sequential Explore subagents, and parallel Explore subagents. Each runner carries a gauge of how much it has put into your main context, and the stopwatch at its finish is wall time; your chosen strategy is marked, and the planner writes its prompt. Read the shape: delegation keeps your main context small, and parallelism cuts wall time, not tokens.
Pitfalls"The infinite exploration": "investigate" with no scope, and Claude reads hundreds of files. Scope the question, or hand it to a subagent so "only the findings come back" (common workflows). Trusting generated diagrams: a Mermaid diagram is a claim. Spot-check two or three hops against the cited lines. Exploring only the happy path: ask explicitly for retries, failures and background jobs.
Dependencies
A dependency is anything that changes behavior when your change lands, or that your change relies on. Import graphs show only the first of five kinds:
Code: callers, callees and shared helpers.
Data: every reader of a column or event, including analytics SQL, ETL jobs and finance exports.
Runtime: queues, webhooks, cron jobs, feature flags and configuration.
External: the payment provider, the email service, identity providers.
People: teams that own consumers, contracts and on-call rotations.
Claude Code tools by kind. For code, a code intelligence plugin gives Claude "go to definition" and "find references" through a language server: install the server binary, then for example /plugin install typescript-lsp@claude-plugins-official. These plugins work in terminal sessions; cloud sessions don't start plugin language servers. Git history answers "why" questions: ask Claude to read a file's git history and summarize how its API came to be. Other repositories join with --add-dir, which grants file access (and loads that directory's skills, commands and agents, but not its CLAUDE.md by default). External systems are reached through MCP servers or CLIs (code intelligence, permissions).
Find every reader of subscriptions.plan_id and every consumer of the subscription.updated
event. Include SQL strings and dbt models under analytics/, background jobs, and the support
console. For each: file:line, what it assumes about plan changes (immediate vs scheduled),
and whether a period-end downgrade breaks that assumption. Tell me how you searched
(references, grep patterns, git log -S) so I know what you might have missed.
Click a node (or focus it and press Enter), or use the selector, to make it the change origin. Downstream dependents fill by distance: the deeper the fill, the fewer hops from the change, and each node is tagged with its dependency kind. Open the list for each affected component and the Claude Code move that checks it. The graph is illustrative; your system's graph is what the Explore prompt above produces.
PitfallsThe repo is Claude's horizon. Consumers in other repositories, BI tools and partner integrations are invisible unless you add them with --add-dir, an MCP server or a service catalog. Static search misses dynamic coupling: string-built SQL, reflection, event names assembled at runtime. That's why the prompt asks Claude to say how it searched. Code intelligence in the cloud: a cloud session falls back to text search, because plugin language servers don't start there.
Operational Impact
Operational impact is how the change alters running the system: load, latency, cost, new failure modes, alerts, on-call burden, support volume, and how you roll it out and back. The downgrade adds a scheduled job (apply pending downgrades at period end), a new webhook path, a new support state, and a burst of emails on the first of the month. None of that shows up in a code diff.
Observing production from Claude Code. Give Claude read-only access to the signals it needs. The docs say "Prefer CLI tools when available": tools like gh, aws, gcloud and sentry-cli "are still more context-efficient than MCP servers because they don't add any per-tool listing". Use read-only tokens for observation work (costs, agent automations). Filter logs before Claude reads them: MCP tool output triggers a warning above 10,000 tokens and is capped at 25,000 by default (MAX_MCP_OUTPUT_TOKENS).
Auto mode and your environment. The classifier blocks actions "aimed outside your environment". By default it trusts the working directory and the remotes configured at session start. Administrators and individuals describe trusted infrastructure in autoMode.environment, which is read from ~/.claude/settings.json, managed settings or --settings. "The classifier doesn't read autoMode from project settings in .claude/settings.json or .claude/settings.local.json", so a repository can't widen its own trust (auto mode config).
Push output to send a pulse round the reinforcing loop; turn new gates on to engage the balancing one. More Claude output is the external push: it cuts review depth per change. The reinforcing loop (R, two negative links): shallower review lets more defects escape, defects cause incidents, incidents mean firefighting, firefighting eats the time for judgment, and less judgment makes review shallower still. The balancing loop (B, one negative link): incidents prompt new deterministic gates (hooks, CI, /code-review, system diffs), and gates cut escaped defects. Ops review that happens last is the first thing the reinforcing loop squeezes out.
Assess operational impact of this branch. Use `gh` and our read-only Sentry token only.
1. New or changed background jobs, schedules, queues and webhooks: frequency and peak load.
2. New failure modes: what happens if the payment provider is down at period end?
3. Alerts and dashboards that need to change, and which runbook covers the new state.
4. Rollout: what's behind a flag, what can be rolled back by flag, what needs a data repair.
Write the result into the PR's Risk and How to revert sections.
Teaching auto mode what "production" means for your organization
The classifier can only protect what it knows about. autoMode.environment takes prose entries, "not regex or tool patterns", which the classifier reads "as natural-language rules". The docs' checklist includes "Sensitive remote targets: the namespaces, hosts, or containers that count as production, so remote shells and port-forwards into them need your explicit approval". Keep "$defaults" in each list, or you replace the built-in entries for that section (auto mode config):
File: ~/.claude/settings.json (or managed settings, never the repo)
{
"autoMode": {
"environment": [
"$defaults",
"Source control: github.com/acme and all repos under it",
"Sensitive remote targets: Kubernetes namespaces prod-* and the billing-db hosts count as production",
"Key internal services: payment provider test mode at sandbox.payments.example.com"
],
"soft_deny": [
"$defaults",
"Never run database migrations outside the migrations CLI, even against dev databases"
]
}
}
Precedence is hard_deny, then soft_deny, then allow, then explicit user intent. Note the docs' warning that "a developer-added allow entry can override an organization soft_deny entry", so organization rules that must hold belong in hard_deny (requires v2.1.136+), backed by permission deny rules. Run claude auto-mode config to see the effective rules. /auto-mode-setup drafts environment entries from your project and recent sessions (requires v2.1.228+ and a Pro, Max or Team plan; availability has been widening, so check whether it appears in your session).
PitfallsProduction write credentials "to check the logs". Observation needs read-only access, so issue a separate token. Logs with personal data in context: transcripts are stored as plaintext JSONL under ~/.claude/projects/, so filter or redact before Claude reads. Ops as an afterthought: the scheduled job at period end is the riskiest part of the downgrade, so design it in plan mode, not in the PR comments.
System Diffs
A system diff describes a change by what the system does differently, not by which lines moved. It covers behavior, data, contracts, dependencies, operations, permissions, cost and rollback. A reviewer who reads the system diff first can judge the change as a whole, then use the code diff to check the claims. Anthropic's source-control post describes reviewers who "examine the intent of the change as opposed to reading every line of code" (Anthropic Engineering; insider practice).
Code diff (what /diff shows)
api/billing/plan_change.ts- await provider.updatePlan(sub.id, plan)+ if (isDowngrade(sub.plan, plan)) {+ await scheduled.create({ subId: sub.id,+ plan, at: sub.periodEnd })+ return { status: "pending_downgrade" }+ }+ await provider.updatePlan(sub.id, plan)jobs/apply_pending_downgrades.ts (new, 64 lines)(the migration ships in the data team's PR)
System diff (what the reviewer needs)
BehaviorDowngrades become scheduled; upgrades stay immediate.
DataNew table scheduled_plan_changes, one row per pending downgrade. Migrations were off limits, so Claude stopped and asked, and the data team shipped the table in its own PR.
ContractsThe API returns pending_downgrade, a new status that clients must handle.
DependenciesThe finance export reads plan_id and now lags by up to one period.
OperationsA new daily job; peak load on the first of the month; a new alert is needed.
RollbackA flag disables new scheduling; pending rows need a repair script (one-way).
Hover or focus a diff line and leaders run to the system rows it causes; hover a row to see which lines cause it. Seven changed lines and one new job on the left, with the migration in a separate PR. On the right, a new API status, a lagging finance export and a one-way rollback, none of which is visible in the code. The reviewer's first question ("can clients handle pending_downgrade?") comes from the right-hand view.
Claude Code mechanics./diff reviews the working-tree changes "including the edits Claude has made so far". In fullscreen rendering it opens a diff panel; in the classic renderer it opens a dialog. Both come from the built-in cc-plugin-diff mod (interactive mode). A system diff is a different artifact you generate. The clean way is a skill that uses dynamic context injection: !`command` lines run before Claude sees the skill, and their output replaces the placeholder (skills):
File: .claude/skills/system-diff/SKILL.md
---
name: system-diff
description: Describe the current branch as a system diff (behavior, data, contracts,
dependencies, operations, permissions, rollback) for the PR description. Use before
opening a PR or when asked what a change does to the system.
disable-model-invocation: true
allowed-tools: Bash(git diff *) Bash(git log *)
---
## Change under review
- Commits: !`git log --oneline origin/main..HEAD`
- Files: !`git diff --stat origin/main...HEAD`
## Your task
Read the diff and every file it touches. Write a system diff with one section each for
Behavior, Data, Contracts, Dependencies, Operations, Permissions, Cost and Rollback.
Each claim cites file:line. Mark one-way changes. Write "none found, searched X" rather
than leaving a section empty. Finish with the three questions a reviewer should ask first.
A failed injected command "aborts the entire skill invocation", so this skill fails in a repo without origin/main; adjust the ref to your default branch. Outside auto mode, an injected command whose permission check returns anything other than allow also aborts the invocation, which is why allowed-tools pre-approves the two git commands. disable-model-invocation: true keeps the skill's description out of context, so it runs only when you type /system-diff.
Each spoke is a trait a change can have. Tick what the change touches by clicking its spoke (or focusing it and pressing Enter); hover a spoke and its reviewer question prints at the tip. The builder emits a review checklist, a SKILL.md tailored to those traits, or a PR section, and adds the specific question each trait demands. Defaults match the downgrade.
Delivery-4 turns system diffs into a verification gate, with behavior, data, architecture and operational changes checked against evidence.
Key takeaways
Explore before changing. Explore subagents keep exploration out of your context but start without CLAUDE.md, so put the rules that matter in the prompt.
Dependencies come in five kinds: code, data, runtime, external and people. Use code intelligence plugins, git history, --add-dir and MCP servers or CLIs, and ask Claude how it searched.
Assess operational impact during planning, with read-only observation. A repository can't widen auto mode's trusted environment.
Generate a system diff with a skill that uses dynamic context injection. Reviewers read it first and use the code diff to check its claims.
Leverage
The cheapest Claude Code output is the output you use to learn something and then throw away. Leverage means spending cheap output on information and options, not volume. Scout before committing. Close the prototype loop with live feedback. Build several variants and compare real artifacts. Generate synthetic inputs that exercise the edges. Each pattern trades tokens for knowledge, and each has a cost in attention that you have to budget.
Exploration with Claude Code
Exploration is spending Claude time to learn where the difficulty is before you commit to an approach. Architecture exploration (the previous topic) reads the system; leverage exploration acts on it, cheaply and disposably.
The scouting run. Josh Bleecher Snyder's practice, as relayed by Simon Willison, is to "send out a scout": give the agent a hard version of the task you don't intend to land, to learn where it struggles (Simon Willison, community). In Claude Code, the scout lives in a throwaway worktree, so nothing it does touches your checkout:
# a throwaway checkout on branch worktree-scout-downgrade
claude --worktree scout-downgrade
Implement self-serve downgrades end to end as fast as you can. This is a scouting run; we
will delete it. When you finish or get stuck, write SCOUT.md: what was harder than expected,
which files fought back, what you had to assume, which tests broke and why, and what you'd
do differently. Don't polish anything.
On exit, Claude checks the worktree for work that removal would delete, and asks you whether to keep or remove it. Keep SCOUT.md (copy it out), discard the code. Add .claude/worktrees/ to .gitignore, and remember that "A worktree is a fresh checkout", so untracked files such as .env are missing unless a .worktreeinclude file copies them (worktrees).
Cheaper probes.
/btw answers a side question with no tools, and the answer never enters history.
/subtask <task> starts a forked subagent that inherits the conversation and returns its result to it (requires v2.1.212+).
Explore subagents for read-only sweeps.
Git-history questions for "why is it like this".
The fork behind /subtask shares the main session's prompt cache on its first request, so it "costs less than a fresh subagent for tasks that need the same context" (subagents).
What you build: a prompt pack for exploring an unfamiliar codebase, with an answer contract and a grader that assigns each claim an evidence level. The levels rank cited > read > grepped > drift > listed > no anchor > unseen. They run from cited (1.0: the file:line checks out against the repo) down to unseen (0). drift is a citation that doesn't show what the claim says, and listed means the file appeared only in a Glob listing. The default run is offline: it prints the prompt pack, then grades a recorded run and a cited sample. --real runs the map prompt read-only in a temp copy of the sample repo; --prompt <id> and --model haiku are optional. A recorded Haiku run cost $0.0037 over 7 turns.
cd labs && python3 delivery-1/explore_report.py
# opt-in, costs money, read-only, capped:
python3 delivery-1/explore_report.py --real --prompt map --model haiku --max-budget-usd 0.05
# grade your own answer's citations against a repo:
python3 delivery-1/explore_report.py --answer FILE --repo DIR
What to observe: the evidence scores. The recorded run scores 0.48: its claims rest on reads, a grep, and a file name seen only in a Glob listing (tinyapp/__init__.py). The cited sample scores 0.92 with one drift line, a citation (tinyapp/cart.py:12) that doesn't show what the claim says. The answer contract also asks Claude for "Unknowns" and "Next questions" sections; only the answer bullets are scored.
PitfallsScout code merged by inertia: the scout "almost works", so it ships. Name the branch scout-* and delete it on purpose. Exploration in the main context: a scouting run in your main session fills it with failed attempts. The docs: "after two failed corrections run /clear and write a better prompt instead of a third." Scouting without a report: the value is the learning, so make the report the deliverable.
Looped Prototyping
Looped prototyping is iterating change → run → observe → adjust until the prototype answers your question. The speed of the loop is set by the observe step. If you're the one who looks at the screen and describes what's wrong, every iteration costs your attention. If Claude can observe the result itself, the loop runs without you, and your attention goes to the final comparison.
Feedback channels Claude Code can observe directly.
Tests and builds: the cheapest channel, but they check only what they assert.
The Chrome integration:claude --chrome or /chrome lets Claude open localhost, click through flows, "read console errors and DOM state directly", and save screenshots to disk (Chrome).
Desktop preview servers: Claude starts your dev server from .claude/launch.json and, with autoVerify on (the default), "takes screenshots, checks for errors, and confirms changes work before completing its response" (Desktop).
/run: a bundled skill that launches and drives your app to see a change working, "not only passing tests". Its sibling /verify "runs only when you invoke it" (since v2.1.215; before that Claude could run it on its own). It belongs at the end of the loop, as your check on the final result, not inside the loop.
Keep the loop running without you./goal starts the next turn until a condition holds. /loop [interval] [prompt] repeats a prompt on an interval, or Claude self-paces when you omit the interval. A Stop hook applies a check to every session in its scope. Add a turn clause to bound the cost, and use low effort for sketches: the effort post's rule of thumb is low for sketches and high where verification matters.
/goal the two downgrade flow prototypes (A: single page, B: two-step with seat review) both
run at localhost:3000/billing/downgrade?variant=a|b, each shows the 12-seat case without
console errors, and you saved screenshots to prototypes/downgrade/a.png and b.png;
or stop after 15 turns
Toy model with illustrative timings. Pick who observes the result and what starts the next turn, then run the loop to punch the card row by row: one row per iteration, a punched hole wherever you spend minutes, a printed tick where Claude works, and a dashed cell for the minutes Claude sits waiting on you. The bars at the foot compare your minutes with the baseline, where you look and prompt every turn. Watch your minutes: with self-observation and /goal, wall time drops too because nobody waits for you, but the bigger change is that the only punches left are at the start (the goal) and the end (the comparison).
PitfallsPrototypes promoted to production: keep them under prototypes/ or on a branch, and re-implement from the spec. Auto-verify checks only what it can see: a screenshot proves rendering, not correct proration. Image-heavy loops cost more: many images are listed among the things that invalidate the prompt cache, so ask for screenshots at milestones, not after every edit.
Parallel Variants
Parallel variants are two to four independent implementations of the same intent, built at the same time so you can compare real artifacts instead of arguing about plans. They pay off when the uncertainty is about the approach (UX, architecture, an algorithm) and evaluation is cheaper than prediction. They don't pay off for well-understood work, where the variants converge and you've paid for the same diff several times.
Where variants run in Claude Code.
Surface
How
Isolation and context
Good for
Worktree sessions
claude --worktree downgrade-a in each terminal
Separate checkout and branch worktree-<name>; fresh context
Variants you drive and inspect yourself
Forked subagents
Ask for forks with isolation: "worktree" from one plan
Inherit the whole conversation, edits go to separate worktrees, the first request shares the cache
"try several approaches in parallel from the same starting point"
Background copies
/fork <prompt>, or claude --bg "<prompt>"
A session in agent view (research preview) that moves into its own worktree before editing
Longer variants you monitor from claude agents
Cloud sessions
claude --cloud "<task>", once per variant
A fresh VM per session. With a GitHub remote and the Claude GitHub App, it clones your pushed branch, so push first; with no remote or no App, Claude Code uploads a bundle of your local repo
Long or heavy variants that survive a closed laptop
Desktop
Parallel sessions, each in its own worktree
Visual diff review per session
UI variants side by side
/batch is not a variants tool. It "decomposes the work into 5 to 30 independent units" of one change, and each unit's subagent publishes its own change. Use it to parallelize a decided change, not to explore alternatives (commands, agent view, cloud).
A single approved plan and a shared rubric fan out into three isolated variants, drawn as three identical cards. Each produces the same evidence in the same rows: tests, a screenshot and a /code-review pass, so comparing means reading across. You compare on the rubric, keep one branch, and delete the others. Hover a row to read it across; click a card to keep it instead. The results are illustrative. Merging pieces of several variants usually produces something none of them tested.
Read PLAN.md section 2 (three downgrade-flow variants) and prototypes/RUBRIC.md.
Start three forked subagents with worktree isolation, one per variant. Each one implements
its variant behind ?variant=, runs the e2e suite, saves a screenshot of the 12-seat case
to prototypes/downgrade/<variant>.png, and scores itself against the rubric with evidence.
Don't merge anything. Report a comparison table when all three finish.
Commit the plan firstNew worktrees, including subagent worktrees, branch from the remote default branch by default: worktree.baseRef is "fresh", so "the worktree starts from a clean tree matching the remote". An uncommitted PLAN.md, RUBRIC.md or feature-branch code won't exist in the variants. Commit the plan and rubric on your branch, and set "worktree": { "baseRef": "head" } so new worktrees branch "from your current local HEAD" (worktrees). A scouting run is fine on "fresh".
Toy model. Each row is N variants, drawn as N illustrative quality scores with the best one filled. The quality of the best of N grows with N, with diminishing returns (the expected maximum of N normal draws, the caret on each strip), scaled by how uncertain the approach is. Token cost grows roughly linearly, and review minutes grow linearly, less with a shared rubric. The boxed row is the N with the best net value under these illustrative parameters. Pick a surface to get the commands.
The arithmetic of variants: diminishing returns, correlation and cache
Diminishing returns. If variant quality is roughly normal with spread σ, the expected best of N independent draws sits at about 0, 0.56, 0.85, 1.03, 1.16 and 1.27 σ above the mean for N = 1 to 6. The second variant buys 0.56σ; the next four together buy only 0.70σ more. Review cost, meanwhile, grows linearly. That's why two or three variants is the usual sweet spot, and why the variant widget peaks early.
Correlation shrinks N. The numbers above assume independent variants. Variants generated from the same prompt, model and context are correlated: they make similar choices, so the effective N is smaller than the count. Force diversity at the plan level. Give each variant a different approach, constraint or exemplar ("A: single page; B: two-step with seat review; C: inline in the members table"), not just "build three versions".
Cost mechanics. Each worktree or cloud session starts with a cold cache; forks read the parent's cache on their first request. Session and weekly limits are "shared across all models" (costs). For cloud sessions, "Running multiple tasks in parallel consumes more rate limits proportionately" (cloud docs).
The cloud field guide puts it as five sessions using your limits "about five times as fast as one" (field guide). Budget the review too: with a rubric and a screenshot per variant, comparing three variants should take minutes, not three full reviews.
What you build: a planner for parallel variants. It checks that the variant hypotheses actually differ, budgets the runs, writes out/run_variants.sh for you to review and run, and then gates and scores the results on a shared evidence checklist. By default it only plans and never starts Claude Code. --materialize creates real git worktrees in a temp copy and cleans them up; --collect DIR reads results back.
cd labs && python3 delivery-1/variants.py
What to observe:
The distinctness check in step 1. The samples pass because no two hypotheses share more than 11% of their words. A near-duplicate pair would get a warning that the two "may differ only in trivia".
The budget warning ("over budget by $0.30"). The generated script refuses to run until you lower a cap or drop a variant, or set ALLOW_OVER_BUDGET=1.
The per-variant evidence checklist, with columns such as diff, suite-green, api-unchanged and small-diff, where ? means not reviewed yet.
The gate-then-score ranking, in which one variant fails the gate on error_max_turns.
The cleanup commands for the losers: git worktree unlock, git worktree remove, then git branch -D worktree-<name>. The unlock comes first because worktrees created by claude -p --worktree keep Claude Code's lock (worktrees).
The commands in out/run_variants.sh. Each one limits the tools, pre-approves only that variant's check command, blocks MCP tools, and passes --settings '{"disableAllHooks": true, "worktree": {"baseRef": "head"}}', so the variants branch from your work.
PitfallsCost multiplies: "Running several sessions or subagents at once multiplies token usage" (run agents in parallel), and for cloud sessions "Running multiple tasks in parallel consumes more rate limits proportionately". Review is the bottleneck: three variants without a rubric means three full reviews, and you pick the last one you looked at. Frankenstein merges: combining the best parts of each variant creates a fourth, untested one. Pick one, then port specific ideas through a new plan. Missing .env in worktrees: use .worktreeinclude.
Synthetic Inputs
Synthetic inputs are generated data that exercise behavior you can't easily reach with real data: fixtures, seed database rows, webhook payloads, CSV files, personas and scripted user flows. For the downgrade, real accounts with "annual plan, 14 seats, past-due, last day of period" may not exist in staging, and you mustn't copy production customers into prompts anyway.
Three ways to generate them with Claude Code.
In-session code: ask Claude to write a deterministic generator (seeded, committed) rather than literal data, so the fixtures are reproducible and reviewable.
Headless with a schema:claude -p with --output-format json and --json-schema returns structured output in the structured_output field (headless).
Synthetic user flows: with Chrome or /run, Claude walks scripted personas through localhost.
# Generate scenario fixtures against a schema. Read-only tools, capped, non-interactive.
claude -p "Read tests/fixtures/downgrade_dimensions.json and SPEC.md. Produce scenarios that
cover every pair of dimension values at least once (pairwise). Take each expected behavior
from SPEC.md and write ASK where it says nothing. Use synthetic workspace names and
example.com emails only." \
--permission-mode dontAsk --allowedTools "Read" --max-turns 6 --max-budget-usd 0.50 \
--output-format json \
--json-schema "$(cat tests/fixtures/scenario.schema.json)" \
| jq -e 'if .terminal_reason == "completed" and has("structured_output") then .structured_output
else error("no structured_output; terminal_reason: \(.terminal_reason)") end' > scenarios.tmp \
&& mv scenarios.tmp tests/fixtures/downgrade_scenarios.json
Gate on the result, not on subtype alone. A failed final request still reports subtype: "success", with its cause in terminal_reason, such as "api_error" (Agent SDK reference). And "If a run ends without valid structured output, for example because Claude declined the request, the response has no structured_output field" (headless). A declined run reports stop_reason: "refusal", and its terminal_reason can still read "completed", so the field check matters. The filter checks both, so a failed run never writes null into the fixture file, and the temp file and mv keep it from truncating the fixtures you already have.
File: tests/fixtures/scenario.schema.json (plain JSON, because the command passes it to --json-schema)
claude -p starts in Manual mode when nothing sets a permission mode (requires v2.1.302+). --permission-mode dontAsk plus an exact --allowedTools list is the documented locked-down pattern. Claude Code treats format in a schema "as an annotation and doesn't enforce it". In the expected field, Claude proposes behavior, and every proposal must be checked against SPEC.md: a generated expectation is an assumption.
Choose the dimensions and values for downgrade scenarios, then compare exhaustive coverage with greedy pairwise coverage, which covers every pair of values at least once. Each square is one pair of values; scrub or play through the generated cases and the pairs each case covers fill in (the newest case is marked). Pairwise reaches every pair with far fewer cases than the cross product. The table shows the generated cases (deterministic), and the command panel shows the matching headless call.
PitfallsSynthetic data mirrors the model's priors: it's plausible and lacks the weirdness of real accounts. Mix it with anonymized real shapes once you have them (delivery-5). Real customer data in prompts: don't paste production rows to "make it realistic". Regenerating fixtures on every run: tests become nondeterministic. Generate once, commit, and review like code. Unlabelled synthetic data leaking into analytics or demos: prefix ids and use example.com addresses.
How small can pairwise get, and when is it not enough?
Pairwise coverage needs at least as many cases as the product of the two largest dimensions, because every value of one must meet every value of the other. For the downgrade dimensions (2 × 3 × 3 × 3), the cross product has 54 cases and the pairwise lower bound is 3 × 3 = 9. Greedy algorithms like the one in the planner usually land at or a little above the bound. The cross product grows multiplicatively with each dimension, while pairwise grows roughly logarithmically in the number of dimensions.
Why pairs? NIST's combinatorial testing research "showed that most software bugs and failures are caused by one or two parameters, with progressively fewer by three or more" (NIST ACTS). Pairwise is a strong default, not a guarantee. Raise the strength (3-way) on money paths, where a failure needs three conditions at once (annual plan, past-due payment, last day of the cycle), and add the specific combinations your edge-case sweep flagged as tests of their own.
Keep generation and judgment separate. Let Claude generate the inputs (deterministic and schema-checked); take the expected column from SPEC.md, or mark it ASK and route it to an interview. A fixture file whose expectations were invented by the same model that wrote the code tests nothing but consistency.
Exercise: one feature, three leverage moves
Pick a small UI feature in a real repo. (1) Send out a scout in claude --worktree scout-<name> and keep only SCOUT.md. (2) From the scout's findings, write a two-variant plan and a five-line rubric, then build both variants with forked subagents in worktrees, each saving a screenshot. (3) Generate pairwise synthetic inputs for the winner with a headless --json-schema call, and add them as test fixtures. Track tokens with /usage and your own minutes for each step.
Show a reference solution
Typical findings: the scout surfaces one or two hard parts you hadn't planned for (state that lives in two places, a test helper that hard-codes plans), and that alone often changes the plan. The variants step costs the most tokens and the least of your attention, provided you wrote the rubric first; without it, comparison takes longer than building. The synthetic step finds edge cases the variants didn't handle. Pairwise across four or five small dimensions usually needs 9 to 16 cases instead of 50 to 100. A good write-up compares cost per step with what each step taught you, and names the step you'd skip next time for this kind of feature.
Key takeaways
Spend cheap output on information: scouts in throwaway worktrees, forks for side questions, /btw for quick checks. The report is the deliverable, and the code is disposable.
A prototype loop is as fast as its observe step. Chrome, Desktop preview servers with autoVerify, and /run let Claude observe. /goal and /loop keep the loop going. /verify is user-invoked, so you run it on the result at the end.
Parallel variants pay when the approach is uncertain. Fan out from one plan with one rubric, compare on evidence, and keep one branch. /batch parallelizes a decided change; it doesn't explore alternatives.
Generate synthetic inputs as committed, deterministic fixtures, with a schema for headless runs. Generated expectations are assumptions to check against the spec.
Session wrap-up
Product engineering with Claude Code is the discipline of pointing cheap output at things that matter, and spending your scarce attention where it changes outcomes. Each topic maps to Claude Code habits:
Topic
The shift in one line
Claude Code habits
Shift
Outcomes, ownership and attention replace output
Outcome prompts, a definition of done in CLAUDE.md, /goal with evidence, auto mode plus ask and deny rules, notification hooks
Ownership
Answer four questions before the session
A three-layer scope fence, an impact map from code, a value hypothesis with labelled assumptions, /code-review, /simplify, /security-review, ask rules on one-way doors
Judgment
Decide what you decide
Assumption ledgers, AskUserQuestion interviews, plan mode with criteria and decision records, taste skills, effort for edge cases, evidence over confidence
Agents-4 explains the mechanics behind forks, worktrees and parallel orchestration; Autonomy-1 extends the attention budget into calibrated autonomy.
Labs index
A codebase exploration prompt pack and a grader that gives every claim an evidence level, from cited (1.0) down to unseen (0), then an evidence score. drift marks a citation that doesn't show what the claim says. Offline by default; --real is read-only, capped and runs in a temp copy.
Plans parallel prototype variants in worktrees. It checks that the hypotheses differ, writes out/run_variants.sh for you to review, and ranks results gate-then-score on a per-variant evidence checklist. It prints the cleanup commands for the losers. Plan only by default; --materialize uses real worktrees in a temp copy.
Day 1: add a definition of done to your project CLAUDE.md and a Notification hook to your user settings. Run /fewer-permission-prompts and review what it proposes.
Day 2: for your next feature, run the assumption ledger and an AskUserQuestion interview, write SPEC.md, and start a fresh session to build from it.
Day 3: plan with three approaches and explicit criteria, edit the plan with Ctrl+G, and write a decision record.
Day 4: create the /system-diff skill and the PR template, and use both on your next PR.
Day 5: send out a scout on the hardest item in your backlog, then decide whether to build parallel variants. Run the two delivery-1 labs.