Synthesize Spec
Produce a ratified, decomposable spec from a brief — the upstream half of a large build. Both reference
builds' upstream halves were multi-day, multi-context efforts with operator decision rounds; a single-context
"write me a spec" call cannot hold that. So this skill has the same shape as the build itself: a durable
research ledger whose rows are executed in fresh contexts, exactly as orchestrate-build executes
tickets, then synthesis, adversarial review, and operator ratification.
The mental model. State lives on disk (docs/research-ledger.md). Cognition lives in fresh contexts (each
research/design row; the review pass). Sequencing is a loop that reads the ledger, runs the next unit, writes
the ledger back — so drive-build.sh --skill synthesize-spec can drive it, honoring pauseRequested and
stopping at operator-decision points. It hands off to decompose-spec by writing docs/decomposition-prompt.md.
The layout it reads and writes (docs/research-ledger.md, docs/research/, docs/design/, the spec,
docs/decomposition-prompt.md) is defined in skills/build-memory/layout.md; this skill cites it and does not
restate the tree.
Orient (every invocation)
Resolve the mode from the ledger, the way orchestrate-build orients:
- No
docs/research-ledger.md yet → plan (§ modes/plan.md).
- Ledger present → read its
CURRENT STATE block (nextUnit, projectStatus, round). projectStatus: DONE
or spec Status canonical → nothing to do; report and stop. An open research/design row is nextUnit →
run. All rows done, no spec yet (or a new round) → synthesize. Spec written, not yet reviewed →
review. Reviewed and dispositioned, awaiting operator → ratify.
- An explicit
mode input overrides.
pauseRequested: true or an unanswered operator-decision (⚑) row that blocks progress → report and stop
(this is the human's decision surface, like a gate).
Then follow the matching mode file below; each ends by updating the ledger's CURRENT STATE + change log and
returning here.
The modes
| Mode |
File |
What it does |
plan |
modes/plan.md |
Seed docs/research-ledger.md: theses, lettered research/design streams as | id | item | owner | status | evidence | tables, the §O process, the §Q operator register, and a CURRENT STATE block so the loop can drive it. |
run |
modes/run.md |
Execute one open ledger row per fresh context → a note under docs/research/ or docs/design/ in the CONVENTIONS.md finding format, emitting REQ-<STREAM>-<n> requirements and open questions. |
synthesize |
modes/synthesize.md |
Write the spec: front matter, §0 how-to-read + requirement-ID convention, decision register, appendices A–E, and (with a brief) OUTLINE_TRACE.md proving superset coverage. |
review |
modes/review.md |
Fresh-context adversarial pass (consistency, coverage of every ledger row, MVP realism, self-contradiction); delta-only when a prior version exists; findings dispositioned in Appendix E. |
ratify |
modes/ratify.md |
Present open Q rows, record answers, flip the spec to canonical, freeze the ledger, and write docs/decomposition-prompt.md — the hand-off to decompose-spec. |
Why fresh contexts and a ledger (not one big prompt)
- Research is broad and lossy. A single context that reads dozens of sources to write a spec has forgotten
the early sources by the end. Each row's fresh context reads exactly its sources and writes a durable note; the
spec is synthesized from the notes, not from a decayed context.
- Review must be independent. A context that just wrote the spec is a biased reviewer of it (the same
self-preference bias
implement-spec and decompose-spec guard against). review runs in a fresh context
given the spec + the ledger, not the authoring history.
- Operator decisions are first-class. The
§Q register and ⚑ markers make the human's rulings part of the
durable record, and ratify is the one place they are required — no spec goes canonical with open questions.
What this skill does NOT do
- No decomposition, no implementation — it produces the spec and the
decomposition-prompt.md hand-off;
decompose-spec and implement-spec take it from there.
- No inventing findings — nothing is cited that was not read (the ledger's standing rule); an inaccessible
source is recorded as
INACCESSIBLE, never paraphrased into a claim.
- No ratifying on the model's own say-so —
canonical requires the operator's answers to the open Q rows.
1---2name: synthesize-spec3description: Turn a brief into a ratified, decomposable spec the way orchestrate-build turns a plan into a build: a durable research ledger whose rows are executed in fresh contexts, then synthesis, adversarial review, and operator ratification. Use it for the UPSTREAM half of a large build — when the spec does not yet exist or is still a moving target and the work spans research, design, and operator decisions across multiple sessions. Pairs with decompose-spec (it writes the decomposition-prompt.md hand-off). For a spec that already exists, skip this and run decompose-spec.4license: MIT5---67# Synthesize Spec89Produce a **ratified, decomposable spec** from a **brief** — the upstream half of a large build. Both reference10builds' upstream halves were multi-day, multi-context efforts with operator decision rounds; a single-context11"write me a spec" call cannot hold that. So this skill has the **same shape as the build itself**: a durable12**research ledger** whose rows are executed in **fresh contexts**, exactly as `orchestrate-build` executes13tickets, then synthesis, adversarial review, and operator ratification.1415> **The mental model.** State lives on disk (`docs/research-ledger.md`). Cognition lives in fresh contexts (each16> research/design row; the review pass). Sequencing is a loop that reads the ledger, runs the next unit, writes17> the ledger back — so `drive-build.sh --skill synthesize-spec` can drive it, honoring `pauseRequested` and18> stopping at operator-decision points. It hands off to `decompose-spec` by writing `docs/decomposition-prompt.md`.1920The layout it reads and writes (`docs/research-ledger.md`, `docs/research/`, `docs/design/`, the spec,21`docs/decomposition-prompt.md`) is defined in `skills/build-memory/layout.md`; this skill cites it and does not22restate the tree.2324## Orient (every invocation)2526Resolve the mode from the ledger, the way `orchestrate-build` orients:2728- No `docs/research-ledger.md` yet → **`plan`** (§ `modes/plan.md`).29- Ledger present → read its `CURRENT STATE` block (`nextUnit`, `projectStatus`, `round`). `projectStatus: DONE`30 or spec Status `canonical` → nothing to do; report and stop. An open research/design row is `nextUnit` →31 **`run`**. All rows done, no spec yet (or a new round) → **`synthesize`**. Spec written, not yet reviewed →32 **`review`**. Reviewed and dispositioned, awaiting operator → **`ratify`**.33- An explicit `mode` input overrides.34- `pauseRequested: true` or an unanswered operator-decision (`⚑`) row that blocks progress → report and stop35 (this is the human's decision surface, like a gate).3637Then follow the matching mode file below; each ends by updating the ledger's `CURRENT STATE` + change log and38returning here.3940## The modes4142| Mode | File | What it does |43|---|---|---|44| `plan` | [modes/plan.md](modes/plan.md) | Seed `docs/research-ledger.md`: theses, lettered research/design streams as `\| id \| item \| owner \| status \| evidence \|` tables, the §O process, the §Q operator register, and a `CURRENT STATE` block so the loop can drive it. |45| `run` | [modes/run.md](modes/run.md) | Execute **one** open ledger row per fresh context → a note under `docs/research/` or `docs/design/` in the `CONVENTIONS.md` finding format, emitting `REQ-<STREAM>-<n>` requirements and open questions. |46| `synthesize` | [modes/synthesize.md](modes/synthesize.md) | Write the spec: front matter, §0 how-to-read + requirement-ID convention, decision register, appendices A–E, and (with a brief) `OUTLINE_TRACE.md` proving superset coverage. |47| `review` | [modes/review.md](modes/review.md) | Fresh-context adversarial pass (consistency, coverage of every ledger row, MVP realism, self-contradiction); delta-only when a prior version exists; findings dispositioned in Appendix E. |48| `ratify` | [modes/ratify.md](modes/ratify.md) | Present open Q rows, record answers, flip the spec to `canonical`, freeze the ledger, and write `docs/decomposition-prompt.md` — the hand-off to `decompose-spec`. |4950## Why fresh contexts and a ledger (not one big prompt)5152- **Research is broad and lossy.** A single context that reads dozens of sources to write a spec has forgotten53 the early sources by the end. Each row's fresh context reads exactly its sources and writes a durable note; the54 spec is synthesized from the **notes**, not from a decayed context.55- **Review must be independent.** A context that just wrote the spec is a biased reviewer of it (the same56 self-preference bias `implement-spec` and `decompose-spec` guard against). `review` runs in a fresh context57 given the spec + the ledger, not the authoring history.58- **Operator decisions are first-class.** The `§Q` register and `⚑` markers make the human's rulings part of the59 durable record, and `ratify` is the one place they are required — no spec goes `canonical` with open questions.6061## What this skill does NOT do6263- **No decomposition, no implementation** — it produces the spec and the `decomposition-prompt.md` hand-off;64 `decompose-spec` and `implement-spec` take it from there.65- **No inventing findings** — nothing is cited that was not read (the ledger's standing rule); an inaccessible66 source is recorded as `INACCESSIBLE`, never paraphrased into a claim.67- **No ratifying on the model's own say-so** — `canonical` requires the operator's answers to the open Q rows.