Project
Architect.
Seven-phase planning skill that turns a fuzzy idea into a frozen set of stage contracts — with parallel research agents, 400K token budgeting, and HTML overlays at every human-review gate.
Seven phases, one frozen plan.
The architect walks a project from a blank slate to a frozen set of stage contracts. Every phase has a gate the human approves before the architect proceeds. Every gate writes a markdown checkpoint to disk so the next session can resume from the last approved phase — and renders an HTML overlay so the human actually reads what they're approving.
Seven phases, five HTML review gates, seven markdown checkpoints — all under one 400K context budget
Ask only the three to five questions whose answers would fork the architecture. Save the rest for Phase 3.
Start narrow, ask only what forks.
A planning skill that asks 15 generic questions earns nothing but user fatigue. The architect's first move is to classify the project size (Small / Medium / Large → 1, 3, or 5 stages), then ask only the 3–5 questions whose answers would fork the technology stack, the deployment model, the data architecture, or the core API. Everything else is deferred to Phase 3.
The fork test, applied to every candidate question.
Each Phase 1 question must pass a single test: if the answer were different, would the architecture be different? If the answer is no, the question is logged for Phase 3 and skipped now. Each question must also explain its architectural impact in parentheses, so the user knows what they're committing to.
The example the skill carries in its own documentation: "Is this deployed to cloud or on-premise? (Forks: containerization strategy, database choice, auth model)." The parenthetical makes the question feel less like a survey and more like a decision with consequences.
docs/architect-outputs/phase-1.md captures every Q+A verbatim. Session-recovery rereads it to resume without restarting the conversation.Three Explore agents, one synthesised report.
Technology selection is parallelised. The architect dispatches up to three Explore subagents — one per technology domain (backend, frontend, data/infra) — each instructed to rank candidates by performance first, capability second, power ceiling third, maturity fourth. Team familiarity is not a selection criterion: unfamiliar tools can be learned, but performance ceilings cannot be worked around.
Three agents fan out, return ranked tables, architect synthesises into one comparable matrix
Performance first, familiarity never.
Each Explore agent receives the same context — project description, Phase 1 answers, hard constraints — and an explicit instruction: find the most efficient and powerful technology for the use case; team familiarity is NOT a factor. The output per agent is a comparison table ranked by performance, with benchmarks and capability scores cited.
The architect synthesises the three reports into a single Technology Mapping Report with the same columns across all domains. The Blueprint-aesthetic HTML overlay (/architect-html-renderer:tech-mapping) renders the comparison side-by-side so the user can pick decisively at the Phase 2 gate.
Numbered ambiguity, three-tier scope.
After the user provides domain context, the architect enumerates every remaining ambiguity as a numbered list with its architectural impact, then classifies every feature into one of three tiers: Essential v1 (system doesn't work without it), Valuable v2 (significant value, defer with extension point), Possible Future (note in timeline only).
Stop asking when no remaining answer changes the architecture.
The skill defines explicit merge-point detection: stop asking ambiguity questions when (a) no remaining answer would change the architecture, (b) the user signals readiness ("just build it"), (c) the last three answers were "your call," or (d) all core entities and business rules are documented. Beyond that, asking more is just stalling.
The tier classification is shown to the user in an Editorial-aesthetic HTML overlay (/architect-html-renderer:scope-tiers) — three columns, each feature with its architectural-impact line, future-tier items annotated with their promotion condition.
A 400K token budget, drawn at design time.
The most consequential phase. The architect designs the staged architecture (1 / 3 / 5 stages per project size), computes the token budget against the 400K context window, draws the dependency graph between stages, and produces stage docs in dual resolution (a 400K-sized compact version for tight loads, a 1M-sized full version with ASCII diagrams). For projects with both backend and frontend, a mandatory observability layer is part of the architecture — telemetry isn't retrofittable.
Fixed + variable ≤ 41% of context window · target ≥60% headroom for code per task
Dual-resolution stage docs and a Mermaid dependency graph.
Each stage has two docs: the 400K version (~150 lines, bullets and tables only) for compact context loads, and the 1M version (~400 lines, ASCII diagrams + code patterns + interface definitions) for the full-context model. The architect produces both. Workers and auditors choose which to load based on the model they're running on.
The architecture review HTML overlay (/architect-html-renderer:architecture-review) is load-bearing — every downstream contract depends on this approval. The page shows the cross-stage Mermaid dependency graph, the directory tree, per-stage drill-down panels, and the token budget visualisation in a single Blueprint-aesthetic view.
Iterative contract drafting, then a clean handover.
Phase 5 drafts the stage contracts in tight HIL collaboration. Each contract has a deliverables table, interface contracts with exact signatures, verification commands with expected output, and a completion checklist. The architect iterates with the human until each contract passes a single quality test: can a worker with only this contract and the project rules determine, with zero ambiguity, whether their work is complete?
Per-stage contracts, then CLAUDE.md as the directory.
The contract review HTML overlay (/architect-html-renderer:contract-review) is invoked once per stage. The Blueprint page renders the deliverables table, every interface signature in its own block with a parameter table and return type, each verification command paired with its expected output, and the batch dependency chain as a Mermaid diagram.
Phase 6 hands over three layers of documentation. Stage contracts are immutable after planning — workers and auditors grade against them. .context.md files are living docs updated by workers as they implement, one per architectural boundary, capped at 8–10 total. project_summary.md is the append-only session log written by the scribe. CLAUDE.md routes to all of them — it is a directory, not a warehouse.
contracts/.The architect's read-once review surface.
Markdown specs past ~100 lines stop being read — both by humans and by future-you. The HTML overlay at each gate is the intervention. Five purpose-built renderer commands in architect-html-renderer turn every architect output into a scannable page in the right aesthetic for that artefact. The markdown stays canonical and git-tracked; the HTML overlay is ephemeral, regenerable, and never enters the repo.
Two aesthetics. Five renderers. One design system.
The shared design system lives as a rule file at ~/.claude/rules/cto-orchestration/design-system.md. It explicitly assigns one aesthetic per artefact: Blueprint (deep slate + accent blue, IBM Plex Sans + IBM Plex Mono, subtle grid background) for engineering review, Editorial (warm cream + deep navy, Instrument Serif + JetBrains Mono) for decisions read across the project's lifetime. The discipline is what makes five different renderers feel like one system.
Everything in version control.
Four layers, all editable as markdown / Astro / inline HTML, all in ~/.claude/.
Skill layer
- SKILL.mdSeven-phase workflow
- references/Deep guides per phase
- templates/Seven deliverable templates
- scripts/init-project-docs.sh
Templates
- stage-doc-400k.template.mdCompact stage reference
- stage-doc-1m.template.mdFull stage reference
- stage-contract.template.mdHIL contract structure
- domain-context.template.mdEntities + business rules
- context-md.template.mdPer-module living doc
- project-summary.template.mdAppend-only session log
- batch-plan.template.mdExecution batches
Renderers
- tech-mappingBlueprint comparison
- scope-tiersEditorial 3-column
- architecture-reviewBlueprint + Mermaid
- contract-reviewBlueprint per stage
- decision-timelineEditorial table
Agents
- Explore × 3Parallel research subagents
- Plan agentArchitecture design (Phase 4)
- Skill toolRenderer invocation per gate
- Crash recoveryRe-reads checkpoints on resume
Every rule encodes a past failure mode.
The non-negotiable rules in the architect's behaviour are not preferences — each one is a fence around a specific way the skill has failed at least once.
What this build taught me.
phase-N.md after every gate; recovery rereads them rather than restarting. The cost is small; the benefit shows up exactly once but it pays for itself the first time.