Arch Step
Use this workflow only after explicit selection as $arch-step or a
binding task instruction requiring it.
The primary object is one canonical full-arch plan doc. Commands exist to move that doc toward a finished, internally consistent, decision-complete artifact. They are not independent mini-workflows.
When to use
- The user wants the full arch workflow for medium or large work and does not need a different workflow family.
- The ask is generic full arch language such as "do the full arch flow," "continue this architecture doc," "implement the plan," or "audit implementation against the plan."
- The work needs one canonical plan doc plus real architectural convergence onto existing repo patterns, shared code paths, or single-source-of-truth boundaries.
- The user wants explicit stage control instead of a more holistic or phase-family-driven flow.
- The ask is command-shaped:
new,reformat,research,deep-dive,external-research,phase-plan,auto-plan,plan-enhance,fold-in,overbuild-protector,consistency-pass,review-gate,implement,implement-loop,auto-implement,full-auto,audit-implementation,status, oradvance. - The user wants one canonical plan driven as far as possible through planning and implementation with native goal-mode continuation.
- The user wants one specific plan-doc shape with exact headings, stable markers, and consistent stage ownership.
- The user wants
advanceto print the full checklist, choose exactly one next command, and optionally execute that one step. - The user wants
statusto evaluate the actual plan artifact, not emit a generic checklist.
When not to use
- The user wants a read-only router or "what's next?" answer. Use
arch-flow. - The remaining job is docs cleanup or consolidation after full-arch code work is clean. Use
arch-docs; it can use the current plan/worklog as context. - The task is a one-pass mini plan, a 1-3 phase small-feature flow, a bug flow, or an open-ended loop. Use
arch-mini-plan,lilarch,bugs-flow, native goal mode, ornorth-star-investigation. - The user is asking which arch skill to use. Use
arch-skills-guide.
Non-negotiables
DOC_PATHis the primary state. Commands are subordinate to the artifact.auto-planstage order is enforced by generated command receipts inDOC_PATH. Do not hand-edit receipts or accept marker-only plan text as proof that a stage ran.- Every invocation must check both structure and quality before doing command-local work.
- No command may leave the doc less canonical, less honest, or more contradictory than it found it.
- Present-but-weak sections are not done.
- A plan is not ready, complete, or implementation-ready while any unresolved decision remains about requested behavior, adjacent surfaces that must stay in sync, compatibility posture, architecture, canonical owner path, required deletes, fallback policy, acceptance evidence, or implementation scope.
- Section 0 must contain the binding Scope and Simplicity Contract from
references/artifact-contract.md. Initial architecture may add only its evidenced minimal same-contract convergence closure; sign off that closure before implementation. After sign-off, only explicit human approval expands scope. Apply../_shared/scope-and-convergence.md. - Correctness and approved intent outrank speed, scope trimming, or "minimum implementation."
- The agent has no authority to cut requested behavior, acceptance criteria, or required implementation work unless the user or the governing plan already marked that item out of scope.
- Cutting, downgrading, deferring, or "simplifying away" approved behavior, acceptance criteria, or phase obligations is a hard stop. Surface to the user with what you want to cut, why, what Section 0 / TL;DR / Section 7 say about it, and the exact approval you need. Do not proceed until the user explicitly approves; record the approved cut in the Decision Log using the
Scope cut (user-approved)shape. - Section 7 uses the depth-first doctrine in
../_shared/depth-first-planning.md: protect the full destination map, prove the first real working slice through the highest-risk seam, then expand along named axes. - Phase boundaries are proof boundaries. Phase count is an outcome of dependency edges, proof gates, reversibility or migration boundaries, and user-review boundaries; split only when a phase blends separately provable work.
- A phase is not complete while any checklist item or exit criterion in that phase remains unmet.
- For modern Section 7 docs,
Workis explanatory only. Every required phase obligation must live inChecklist (must all be done)orExit criteria (all required), and fresh audit must validate both before a phase can stay complete. - During
implementandimplement-loop, the approved plan stays authoritative for requirements, scope, acceptance criteria, and phase obligations. Execution may record progress truth, but it may not rewrite the plan to make unfinished work disappear. - During
implementandimplement-loop, execution scope is the current approved ordered implementation frontier: the earliest incomplete or reopened phase plus later phases whose prerequisites and proof gates are reachable in this implementation arc. Named later expansion is not current missing work until its proof gate is due; silent removal from the destination map is still a scope cut. - Credible proof supports continued implementation. It does not justify stopping after one local fix, one phase, or one convenient subset while later approved phases are still reachable.
- If the doc is materially non-canonical, repair only the safe owned portion or route to
reformat. - Keep one planning source of truth. Do not create sidecar plan docs or competing checklists.
- All planning commands are docs-only. Only
implementandimplement-loopmay change code;full-automay reach code changes only by routing toimplement-loop. - Distinguish the human-authorized outcome from the initial minimal convergence closure. Both must be recorded before scope sign-off; neither later review nor implementation may infer more scope from repo adjacency.
- Search for the canonical existing path before designing a new one. Reuse it, refactor it as much as required to fully own the change, or justify why it cannot own the change.
- During initial planning, convergence may include the smallest evidenced touched-file or adopter set needed to eliminate a directly competing owner. After scope sign-off, a newly found path requires a human decision even when it would make the architecture cleaner.
- Any refactor, shared-path extraction, or consolidation must preserve existing behavior and name a credible verification signal before it is considered done.
- Use repo evidence first. Ask only for true product, UX, external-constraint, access, or doc-path gaps.
- Before asking the user any plan-shaping question, consult approved intent on the plan doc: Section 0 (North Star), TL;DR, and the Section 7 phase frontier. Only ask when intent plus repo evidence genuinely leave two credible branches. Record intent-derived resolutions in the Decision Log using the
Intent-derivedshape. - If repo evidence cannot settle a plan-shaping decision, ask the user instead of guessing, defaulting, or parking the choice as a pseudo-complete plan.
- Before hardening target architecture or Section 7, inspect adjacent surfaces tied to the exact changed contract, source of truth, or migration boundary. Put directly competing paths in the pre-approval minimal closure, sequence them inside the approved destination map, exclude merely similar neighbors, or ask the exact blocker question. Pattern parity alone is not scope authority.
- Compatibility posture is a first-class plan decision separate from
fallback_policy. Resolve whether the change preserves the existing contract, performs a clean cutover, or uses an explicitly approved timeboxed bridge. Do not silently assume backward compatibility just because it feels safer. - When the changed behavior is agent- or LLM-driven, inspect current prompt surfaces, runtime or agent configuration, native model capabilities, and existing tool/file/context exposure before designing. If that capability picture is still unclear after inspection, ask narrowly instead of assuming the agent cannot do it.
- For agent-backed systems, prefer prompt engineering, grounding/context shaping, and better use of native capabilities before custom harnesses, wrappers, parsers, OCR stacks, fuzzy matchers, or deterministic sidecars.
- Any new tooling for agent-backed behavior must justify why prompt-first and capability-first options were insufficient, and it must augment the agent instead of replacing the reasoning the product is supposed to get from the model.
- If the real lever is prompt repair, say so plainly and recommend
prompt-authoringinstead of inventing deterministic scaffolding. - When porting agent instructions, prompt doctrine, or other instruction-bearing content, preserve explicit operational structure by default. Do not silently condense ordered steps, conditions, hard negatives, or escalation logic unless the artifact records why that condensation is safe and keeps the source text recoverable.
- Default to fail-loud boundaries, hard cutover, and explicit deletes. Runtime shims are forbidden unless the plan explicitly approves them.
auto-planis one command. In native goal mode, keep advancing the real planning sequence until the artifact is decision-complete or a true blocker stops it. Outside goal mode, run one bounded pass and name the exact next command.implement-loopis one command. In native goal mode, keep running implementation-frontier work and freshaudit-implementationuntil the audit is clean or a true blocker stops it. Outside goal mode, run one bounded pass and name the exact next command.full-autois a re-entrant doctrine mode that reads artifact truth and routes to the next existing command. It must plan before implementation and must not bypass readiness gates.- Git is the history for retired live truth surfaces. Do not preserve dead competing code paths, stale live docs, or stale comments for posterity. Delete them. If a touched doc, comment, or instruction still matters after the change, update it to current reality in the same run.
- Broader docs audit, consolidation, and final plan/worklog retirement after a clean full-arch code audit belong to
arch-docs, not to extra hiddenarch-stepcommands. - Core commands apply scope-triage and convergence rules even when helper commands are not run.
- Any command that creates or resumes another agent must apply
../_shared/agent-orchestration-policy.md.consistency-passuses two new clean same-host native read-only explorers with disjoint lenses and parent-owned synthesis. In Codex, setfork_turns: "none"; in Claude Code, use clean named or custom subagents rather than a conversation fork. Give every review child explicit no-edit/no-write guidance, use a read-only capability when the host confirms one, let each explorer use its own native sub-agents while forbidding it to start external agents, and compare current repo state before accepting its return. advancemust choose from structure first, quality second, stage order third. Helper commands stay explicit.statusis compact, read-only, and grounded in the actual artifact.advanceowns the longer checklist surface and optional one-step execution.- No-progress rule. After two consecutive passes with no real change (no repo file edit, no plan/doc edit, no new evidence a fresh audit has not seen), stop with the exact blocker instead of firing another identical pass.
- No invented budgets. Do not call work blocked because it feels expensive. In goal mode, keep moving until the objective is complete or a real blocker meets the native goal-mode stop rule.
- Exhaust the frontier before auditing. Do not hand to audit after one local fix when later approved phases are reachable. Finish the current approved ordered implementation frontier or record the real blocker plainly.
- Respect the tree state the user gave you. Do not stash changes, create new branches, split the work across multiple PRs, or rewrite history. Commit hygiene, branch strategy, and PR shape are the user's decisions.
- Parallel-agent edits are a pause signal, not a revert signal. If the working tree contains edits this pass did not make (foreign file, unexpected compiler error, unfamiliar commit), pause briefly to let the other agent land its fix. Do not revert. Escalate to the user only after two pause-retry cycles fail.
First move
- Read
references/artifact-contract.md. - Read
references/shared-doctrine.md. - Resolve the requested command and
DOC_PATHwhen the command needs an existing doc. - If the ask is generic full-arch execution rather than a named command:
- no full-arch doc yet: treat the first move as
new - doc exists or the user gave a doc path: treat the first move as
advance
- no full-arch doc yet: treat the first move as
- Inspect the current doc against:
- required frontmatter
# TL;DRplanning_passes- exact canonical headings
- command-owned blocks
- obvious contradictions across TL;DR, Section 0, target architecture, call-site audit, phase plan, verification, rollout, and decision log
- canonical-path ownership and behavior-preservation claims
- Read
references/section-quality.mdfor the sections this command depends on. - Read the matching command reference. If the command is
full-auto, readreferences/full-auto.md. - If the command is
advance, readreferences/advance.md, choose the one move that most improves artifact integrity or flow progress, and stop unlessRUN=1explicitly asks for that one step to execute.
Workflow
Public command surface
newreformatresearchdeep-diveexternal-researchphase-planauto-planplan-enhancefold-inoverbuild-protectorconsistency-passreview-gateimplementimplement-loopauto-implementfull-autoaudit-implementationstatusadvance
Top-level model
arch-step always reasons about one canonical full-arch artifact with this exact shape:
- required frontmatter
# TL;DRplanning_passes# 0)through# 10)with exact canonical headings and subsection structure- optional helper blocks folded into the same plan doc
WORKLOG_PATHonce implementation begins
The finished artifact is not just a heading set. It is one internally consistent, decision-complete plan that says the same thing about outcome, requested behavior scope, architectural convergence scope, architecture, verification, rollout, and drift history from multiple angles.
advance selection rule
Choose exactly one next command using this precedence:
- No plan doc yet: run
new. - Existing doc is not canonical enough to trust: run
reformat. - North Star is still draft or too weak to support planning: stop for confirmation or repair the artifact with
reformat. - After North Star confirmation, stop and wait for the user's explicit next command; do not auto-advance into
researchor any later stage. - Earliest required structure or owned block is missing: run the command that repairs it.
- Required structure exists but the next critical sections are still weak or still contain unresolved decisions: run the command that strengthens them or stop and ask the user the exact blocker question.
- Otherwise follow the canonical core arc:
neworreformat- North Star confirmation
researchdeep-diveexternal-researchwhen warranteddeep-diveagain when external research materially changed the designphase-planimplementaudit-implementation
- If the code audit is clean and the feature still needs docs cleanup, hand off to
arch-docs.
Do not auto-run more than one command.
Helper commands
These stay explicit and do not auto-run from advance:
plan-enhancefold-inoverbuild-protectorconsistency-passreview-gate
Default placement is after phase-plan and before implement, unless the user explicitly asks otherwise. They are extra hardening surfaces, not the only place where scope, convergence, or preservation discipline exists.
Explicit automatic commands
These stay explicit unless the user directly asks for them:
auto-planimplement-loopauto-implement
full-auto is not in this list because it routes over the existing commands.
Re-entrant full-auto mode
full-auto is an explicit mode for one canonical full-arch plan. It does not add
a new controller, state file, runner, hook behavior, or heuristic layer.
It reads DOC_PATH, WORKLOG_PATH, and the implementation audit block, then
invokes the next existing command only when the artifact is ready for that command.
Read references/full-auto.md before using this mode. The main rule is simple:
plan first with auto-plan, prove implementation readiness with the normal
full-arch readiness inventory and the stage receipt gate, then implement with
implement-loop. If the North Star is still draft, a decision gap remains, the
receipt gate is not ready, or consistency-pass does not approve implementation,
stop honestly instead of chaining.
auto-plan
A bounded automatic planning command. DOC_PATH is always the planning ledger.
Workflow:
- Read doc truth and North Star status.
- Run
python3 skills/arch-step/scripts/arch_stage_gate.py status --doc <DOC_PATH>and take only the gate-reported next stage. - The stage command must run
beginbefore its doc edits andcompleteafter its doc edits so the generated receipt proves that command path ran. - In native goal mode, continue taking the next gate-reported stage until
readyreturnsREADY next=implement-loop, or until a true blocker stops the run. - Outside native goal mode, run one bounded stage and end with the exact next command.
arch-step-specific rules:
- User-facing invocation:
$arch-step auto-planor$arch-step auto-plan <DOC_PATH>. - Rerunning
auto-planon a partially complete doc is legal; resume from the first incomplete stage already visible inDOC_PATH. - Prefer the current session's canonical full-arch doc when
DOC_PATHis omitted. - Do not treat plan markers alone as completion. Existing content without receipts is not auto-plan-ready; rerun the missing stage command.
- Do not claim the planning arc is complete or emit the
implement-loophandoff while any decision gaps remain. - Before saying the doc is ready for
implement-loop, runpython3 skills/arch-step/scripts/arch_stage_gate.py ready --doc <DOC_PATH>and require exit 0. - If the North Star approval is missing, name it and stop.
implement-loop / auto-implement
implement-loop is an implementation-frontier delivery command; auto-implement is an exact synonym resolving to the same behavior.
Workflow:
- Read the approved plan and current audit/worklog truth.
- Implement the current approved ordered implementation frontier.
- Run
audit-implementationafter the implementation pass. - If audit is clean, hand off to
$arch-docs. - If audit is not clean and work remains reachable, continue from the reopened or incomplete phase. In native goal mode, repeat until clean or truly blocked. Outside native goal mode, report the next exact implementation command.
arch-step-specific rules:
- User-facing invocation:
$arch-step implement-loop <DOC_PATH>or$arch-step auto-implement <DOC_PATH>. Do not introduce a second command, mode, or control surface. - Before implementation starts, run
python3 skills/arch-step/scripts/arch_stage_gate.py ready --doc <DOC_PATH>; if it fails, report the planning stage it names instead of implementing from a marker-only plan. - Implementation covers the current approved ordered implementation frontier in order: the earliest incomplete or reopened phase plus later phases whose prerequisites and proof gates are reachable in this implementation arc.
- Execution does not rewrite requirements, scope, acceptance criteria, or phase obligations mid-coding. If the approved contract needs to expand, stop for explicit human approval and re-approve it; an agent-authored plan repair is not authority.
- The implementation pass may ship code and sync plan/worklog truth, but the audit must be a real
audit-implementationpass against current repo state before the loop can finish clean.
Output expectations
- Keep console output high-signal and natural.
- Start with a one-line North Star reminder.
- Then give the punchline plainly.
- Put exhaustive detail in
DOC_PATHorWORKLOG_PATH, not in console output. - For generic full-arch asks that did not name a command, say which command you resolved to and why.
statusshould emit:- one artifact line
- one line per core stage
- one helper summary line
- one best-next-move line
advanceshould emit:- the full ordered checklist with evidence notes
- the exact next move, even when that handoff is
arch-docs - optional one-step execution only when
RUN=1
Reference map
references/artifact-contract.md- canonical full-arch plan artifact, exact section shape, frontmatter, block inventory, and worklog contractreferences/shared-doctrine.md- cross-cutting doctrine: question policy, alignment checks, evidence, SSOT, scope defaults, and consistency repair../_shared/agent-orchestration-policy.md- transport, context, continuation, isolation, topology, and return-evidence rules for the consistency explorers../_shared/scope-and-convergence.md- human scope authority, initial planning convergence, scope sign-off, finding dispositions, and scope-cycling prohibition../_shared/depth-first-planning.md- destination map, first working slice, expansion map, proof gates, scope-cut distinction, and failure-mode recognition testsreferences/section-quality.md- purpose, strong/weak bar, trust rules, and failure modes for each section and supporting blockreferences/arch-new.md- bootstrap the canonical artifact and stop for North Star confirmationreferences/arch-reformat.md- convert an existing doc into the canonical artifact without losing meaningreferences/arch-research.md- research grounding contractreferences/arch-deep-dive.md- current architecture, target architecture, call-site audit, and planning-pass rulesreferences/arch-external-research.md- external research contract and plan-integration rulesreferences/arch-phase-plan.md- authoritative phase-plan contractreferences/arch-auto-plan.md- bounded automatic planning over research, deep-dive twice, phase-plan, and consistency-passreferences/full-auto.md- re-entrant mode overauto-plan, the stage receipt gate, andimplement-loopreferences/arch-plan-enhance.md- best-possible hardening of the main planreferences/arch-fold-in.md- fold references into the main artifact and wire them into phasesreferences/arch-overbuild-protector.md- explicit scope triage and remediation using the same rubric core commands should already applyreferences/arch-consistency-pass.md- end-to-end cold-read consistency review before implementationreferences/arch-review-gate.md- local idiomatic and completeness reviewreferences/arch-implement.md- implementation, worklog, and completion disciplinereferences/arch-implement-loop.md- implementation-frontier implement/audit loop and proof contractreferences/arch-audit-implementation.md- code-completeness audit and phase reopeningreferences/status.md- compact artifact-first status rulesreferences/advance.md- full checklist, next-command selection, and optional one-step execution