From 803677d065a1df5aad8426559c31e45dc54795d7 Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Wed, 21 Oct 2026 05:01:41 -0500 Subject: [PATCH 1/7] docs(repo): add workflow templates index with issue marker search --- planning/workflow/templates/README.md | 63 +++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 planning/workflow/templates/README.md diff --git a/planning/workflow/templates/README.md b/planning/workflow/templates/README.md new file mode 100644 index 0000000000..6f7a11d223 --- /dev/null +++ b/planning/workflow/templates/README.md @@ -0,0 +1,63 @@ +# Workflow templates + +Templates for the files and GitHub issues the [research-to-delivery workflow](../README.md) produces, and for the prompts its orchestrators give subagents. Each template opens with when to use it, then holds the text to copy in one fenced block. Replace every `<...>`; keep the headings, markers and section order. + +## Filling in + +- IDs come from the tool (`init`, `ids`, `item add`). Never invent `C001`, `C001.2`, `T001` or `D001`. +- Some files are written by a command: concept stubs (`init`), notes (`note`), receipts (`resolve-note`), item lines (`item add`, `item set-status`) and generated views (`render`). Their templates show the shape; use the command. +- Only `render` writes between `` and ``. Generated markdown uses headings, `-` bullets, `**bold**`, backticks, links and blank lines; no tables, no `*emphasis*`. +- Package files link relatively (`concepts/C001-.md`, `/planning/workflow/stages.md`). Issue bodies use full URLs (`https://github.com//blob//...`), because an issue is read outside the tree. ``, ``, `` and `` are keys of the [profile](../profile.md). +- Run `prettier --write` on every filled markdown file and `python3 scripts/research_workflow.py check --package ` before committing. + +## Package files + +Written into `doc/_research_/` ([layout](../records.md)). + +| Template | File | Written by | +| ---------------------------------- | ------------------------------- | ------------------------------------------ | +| [main.md](main.md) | `main.md` | `init` at S0, then PRs | +| [design.md](design.md) | `design.md` | `init` at S0, then PRs; S5 fills stages | +| [changes.md](changes.md) | `changes.md` | every writer, one line per change | +| [concept.md](concept.md) | `concepts/C001-.md` | `init`, then only the concept's owner | +| [note.md](note.md) | `notes/C001__to__C002__.md` | `note`, by the sender, once | +| [receipt.md](receipt.md) | `receipts/.md` | `resolve-note`, by the receiver | +| [decision.md](decision.md) | `decisions/D001-.md` | S6 workers and decision subagents | +| [human-review.md](human-review.md) | `human-review.md` | S6 orchestrator, from the decision records | + +## Issues + +Titles follow the table. The marker's `stage` is the stage that creates the issue; the issue is worked at the next one. + +| Template | Title | Created | Worked | Marker `kind` | +| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------- | ------ | --------------- | +| [issue-research.md](issue-research.md) | `Research: (·C001)` | S1 | S2-S3 | `research` | +| [issue-parent.md](issue-parent.md) | `Handoff: Investigate and plan (·C001)` | S4 | S5 | `handoff` | +| [issue-child.md](issue-child.md) | `Design: (·C001.3)` | S5 | S6 | `design` | +| [issue-orchestration.md](issue-orchestration.md) | `Handoff: Orchestrate of (·C001) as an orchestrator using subagents` | S5, S7 | S6, S8 | `orchestration` | +| [issue-plan.md](issue-plan.md) | `Plan: (·C001)` | S6 | S7 | `plan` | +| [issue-implement.md](issue-implement.md) | `Implement: (·C001·step )` | S7 | S8 | `implement` | + +Every issue body ends with one marker line, for example `` (child issues add `"item"`, implement issues add `"step"`). Before creating an issue, look for its marker so a retry never makes a duplicate; this prints the URL of any issue that already carries it: + +```sh +gh issue list --repo --state all --limit 1000 --json url,body | + jq -r --argjson want '' '.[] | select([.body | scan("")[0] | fromjson] | any(. == $want)) | .url' +``` + +Use existing labels only. Before publishing, give the draft body, and nothing else, to the [zero-context reader](prompts/zero-context-reader.md) and fix every gap it finds. + +## Prompts + +Prompts an orchestrator gives to subagents, in [prompts/](prompts/). + +| Prompt | Launched by | When | +| -------------------------------------------------------- | -------------------------- | ---------------------------------------------------- | +| [worker-brief.md](prompts/worker-brief.md) | any orchestrator | dispatching one unit of work | +| [orchestrator-brief.md](prompts/orchestrator-brief.md) | router, a human | starting an S6 or S8 orchestrator | +| [merger.md](prompts/merger.md) | S6, S8 orchestrators | landing a finished worker PR | +| [reviewer.md](prompts/reviewer.md) | S6, S8 orchestrators | a disagreement (with critic, investigator) or a PR | +| [critic.md](prompts/critic.md) | S6 orchestrator | a disagreement | +| [investigator.md](prompts/investigator.md) | S6 orchestrator | a disagreement, or a decision the challenge reopened | +| [challenge-pass.md](prompts/challenge-pass.md) | S6 orchestrator | before closing S6 | +| [zero-context-reader.md](prompts/zero-context-reader.md) | anyone publishing an issue | before creating any issue or long brief | From d475e0da8b91ff99f5664cf659e08cedc1871e9e Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Wed, 21 Oct 2026 10:01:11 -0500 Subject: [PATCH 2/7] docs(repo): add main reference template --- planning/workflow/templates/main.md | 70 +++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 planning/workflow/templates/main.md diff --git a/planning/workflow/templates/main.md b/planning/workflow/templates/main.md new file mode 100644 index 0000000000..5fabc45e39 --- /dev/null +++ b/planning/workflow/templates/main.md @@ -0,0 +1,70 @@ +# Main reference template + +Use at S0 (`request-intake`): `init` writes a package's first `main.md` in this shape, and from then on it changes only through PRs ([collaboration](../collaboration.md)). It is the document everything links to: the restated request, the file list, the reading of garbled input, one section per concept with its hierarchical items, the process directives, and the issues and PRs grouped by concept. Only `render` writes inside the view markers; `item add` and `item set-status` write the item lines. + +```markdown +# + + + +- Transcript: [transcript.txt](transcript.txt) (sha256 ``, bytes, ; source: ) +- Meta design: [design.md](design.md) (review order, waves, run table, research stages) +- Change log: [changes.md](changes.md) +- Human review: [human-review.md](human-review.md) (from S6) +- Workflow: [stages](/planning/workflow/stages.md), [records](/planning/workflow/records.md), [collaboration](/planning/workflow/collaboration.md) + +## Files + +Every file this request creates or edits, one line per concept. + +- [C001 ](concepts/C001-<slug>.md) — `new` `<target path>`: <what it covers, one line>. +- [C002 <title>](concepts/C002-<slug>.md) — `edit` `<target path>`: <what it covers, one line>. + +## Reading of garbled input + +Tokens in the transcript that look mistyped or mistranscribed, and the reading adopted. The transcript stays exact; every reading here is an inference. + +- `<token>` (`T014`) — Inference: read as "<reading>" because <reason>. Confidence: <high, medium or low>. + +## C001 <title> + +<!-- workflow:view concept-C001 --> + +- **State**: S0 `created` · `proposed` · priority `<priority>` · horizon `<horizon>` +- **Goal**: <end goal this concept serves> +- **Relations**: none +- **Issues and PRs**: none yet + +<!-- /workflow:view concept-C001 --> + +<Restated purpose and preliminary thoughts. Mark anything beyond the transcript "Inference:".> + +- **C001.1** `created` · S0 · <UTC> — <a statement from the transcript, restated>. + - **C001.1.1** `created` · S0 · <UTC> — <a detail of C001.1, directly below it>. +- **C001.2** `clarified` · S2 · <UTC> — The situation is more nuanced than first read; see C001.2.1. ← `created` · S0 · <UTC> + - **C001.2.1** `created` · S2 · <UTC> — <the nuance, directly below the item it refines>. + +## G: process directives + +Segments in the global bucket `G`: instructions about how to work, not what to build. They bind every stage and are not asked again. + +- `<T061-T063>` — <the directive, restated>. Applies to: <stages, or "all">. + +## Issues and PRs + +<!-- workflow:view issues-and-prs --> + +### C001 <title> + +- None yet. + +### C002 <title> + +- None yet. + +<!-- /workflow:view issues-and-prs --> +``` + +- Concept sections follow the order in `design.md`. Write prose above the item list; never inside a view. +- Items: new status in front, the earlier trail after `←`, nothing deleted. A refinement goes directly below the item it refines, with the next child ID. Statuses: `created`, `clarified`, `confirmed`, `superseded`, `retracted` ([records](../records.md)). +- `render` lists each issue or PR once in its concept's view and again under "Issues and PRs", in the form `- [#<n>](https://github.com/<issue_repository>/issues/<n>) <title> — `<state>` · S<n> · covers C001.2 — <why it was implemented, declined or changed>`. From 593e62f63a2ac7fe21b28600814a2dc22a090684 Mon Sep 17 00:00:00 2001 From: Drewry Pope <drewrypope@gmail.com> Date: Wed, 21 Oct 2026 10:02:47 -0500 Subject: [PATCH 3/7] docs(repo): add meta design, change log and human review templates --- planning/workflow/templates/changes.md | 15 ++++++ planning/workflow/templates/design.md | 58 +++++++++++++++++++++ planning/workflow/templates/human-review.md | 30 +++++++++++ 3 files changed, 103 insertions(+) create mode 100644 planning/workflow/templates/changes.md create mode 100644 planning/workflow/templates/design.md create mode 100644 planning/workflow/templates/human-review.md diff --git a/planning/workflow/templates/changes.md b/planning/workflow/templates/changes.md new file mode 100644 index 0000000000..3ad6a903d2 --- /dev/null +++ b/planning/workflow/templates/changes.md @@ -0,0 +1,15 @@ +# Change log template + +`init` writes a package's first `changes.md`. It is the one shared package file every writer adds to directly: one line at the end, in the same commit as the change it records. `.gitattributes` gives it `merge=union`, so parallel branches merge without conflicts; that only works if each line stands alone. Never edit or remove a line; correct one with a new line. + +```markdown +# Changes + +[Main reference](main.md) + +- <UTC> | <stage> | <status> | <IDs>: <what changed>, by <writer> (<path, PR or commit>) +``` + +- `<stage>` is `S0` to `S8`; `<status>` is the item status, disposition or run status the change set ([records](../records.md)). +- `item add` and `item set-status` append their own line; add one by hand only for changes no command records. +- Example: `- 2026-10-21T10:00:00Z | S2 | clarified | C001.2, C001.2.1: split the nuance into its own item, by c001-research (#512)`. diff --git a/planning/workflow/templates/design.md b/planning/workflow/templates/design.md new file mode 100644 index 0000000000..758e0de7eb --- /dev/null +++ b/planning/workflow/templates/design.md @@ -0,0 +1,58 @@ +# Meta design template + +Use at S0 (`request-intake`): `init` writes a package's first `design.md` in this shape, the intake agent writes the first-pass review order, and S5 (`issue-handoff` fanout) fills "Initial research stages". After intake it changes only through PRs. Waves and the run table are generated views (`ready`, `render`, `status --live`); never type a run status by hand. + +```markdown +# Meta design: <request title> + +[Main reference](main.md) · [Transcript](transcript.txt) · [Change log](changes.md) · [Human review](human-review.md) + +<One paragraph: what this design orders, and the end goal the concepts serve together.> + +## Review order + +First pass at the order in which to prepare, research and design the concepts. Default, when nothing blocks anything and nothing stands out: run one agent per concept, all at once, and track each in the run table. + +1. **C001** <title> — <why here: crucial, horizon now, required by C002>. +2. **C002** <title> — requires C001: <reason>. +3. **C003** <title> — recommended-after C001: can start now; if it does, <what gets reworked>. + +## Waves + +<!-- workflow:view waves --> + +- **Wave 1**: C001, C003 +- **Wave 2**: C002 (requires C001) + +<!-- /workflow:view waves --> + +## Run table + +<!-- workflow:view run-table --> + +- **C001** <title> — S1 `not-started` · branch none · PR none · updated <UTC> +- **C002** <title> — S1 `not-started` · branch none · PR none · updated <UTC> + +<!-- /workflow:view run-table --> + +## Initial research stages + +Filled at S5. Every GitHub issue made for or related to this request, in recommended order. Issues on the same numbered line run in parallel. + +### C001 <title> + +- Parent: [#<n> Handoff: Investigate and plan <title>](https://github.com/<issue_repository>/issues/<n>) +- Orchestration: [#<n> Handoff: Orchestrate design of <title>](https://github.com/<issue_repository>/issues/<n>) + +1. [#<n> Design: <facet>](https://github.com/<issue_repository>/issues/<n>) (C001.3) — <one line>. Priority: crucial. Blocked by: none. +2. [#<n> Design: <facet>](https://github.com/<issue_repository>/issues/<n>) (C001.4) and [#<n> Design: <facet>](https://github.com/<issue_repository>/issues/<n>) (C001.5) — <one line each>. Priority: recommended. Blocked by: #<n>. + +## Links + +- Workflow: [stages](/planning/workflow/stages.md), [ordering](/planning/workflow/ordering.md), [decisions](/planning/workflow/decisions.md) +- Order across requests: [DEPENDENCIES.md](/planning/DEPENDENCIES.md) +- Feature plans land in [planning/plans/](/planning/plans/README.md), from the [plan template](/planning/templates/plan.md) +``` + +- Run statuses: `not-started`, `claimed`, `running`, `pushed`, `pr-open`, `merged`, `validated`, `blocked`, `abandoned`. `pushed`, `pr-open` and `merged` come from git and GitHub through `status --live`. +- A soft edge (`recommended-after`) names the rework it costs; a hard edge (`requires`) names why it blocks ([ordering](../ordering.md)). diff --git a/planning/workflow/templates/human-review.md b/planning/workflow/templates/human-review.md new file mode 100644 index 0000000000..0f142af8af --- /dev/null +++ b/planning/workflow/templates/human-review.md @@ -0,0 +1,30 @@ +# Human review template + +The S6 orchestrator (`design-orchestrate`) writes `human-review.md` at the package root from the decision records, and regenerates it whenever a decision changes. It lists only the genuine toss-ups: preliminary decisions that work is already built on, ranked by effect, each with its default, alternatives and the cost of reversing. Obvious decisions are made, recorded in `decisions/`, and not listed. Nothing the transcript already states is asked again ([decisions](../decisions.md)). + +```markdown +# Human review: <request title> + +[Main reference](main.md) · [Meta design](design.md) · [Decision records](decisions/) + +Work continues on every default below. To change one, comment on <issue URL> with the decision ID and your choice. A reversal starts rework scoped by `git grep -l <decision ID>`. + +<!-- workflow:view human-review --> + +- **D007** <question> — reversal cost <low, medium or high> · affects <IDs> + - Default in effect: <choice>, because <one-line rationale>. + - Alternatives: <option B>; <option C>. + - If reversed: <what changes>; `git grep -l D007` lists <n> files today. + - Record: [D007 <slug>](decisions/D007-<slug>.md) + +<!-- /workflow:view human-review --> + +## Questions + +Batched and ranked by effect. Each has the default in use. + +1. <question> — Default: <answer assumed>. Affects: <IDs>. +``` + +- A decision belongs here only when its options are genuinely balanced and choosing wrong would be costly to reverse. "None" is a valid list. +- Only a human moves a decision from `agent-preliminary` to `human-confirmed` or `reversed`. From 0dcfad85b40d27c59860a2fd2acfa158299d4c1e Mon Sep 17 00:00:00 2001 From: Drewry Pope <drewrypope@gmail.com> Date: Wed, 21 Oct 2026 15:02:31 -0500 Subject: [PATCH 4/7] docs(repo): use fenced blocks in concept and record templates --- planning/workflow/templates/README.md | 28 +++---- planning/workflow/templates/concept.md | 106 ++++++++++++++++++------ planning/workflow/templates/decision.md | 49 +++++++---- planning/workflow/templates/note.md | 24 +++--- planning/workflow/templates/receipt.md | 36 +++++--- 5 files changed, 163 insertions(+), 80 deletions(-) diff --git a/planning/workflow/templates/README.md b/planning/workflow/templates/README.md index 6f7a11d223..ee41b57e3a 100644 --- a/planning/workflow/templates/README.md +++ b/planning/workflow/templates/README.md @@ -31,12 +31,12 @@ Titles follow the table. The marker's `stage` is the stage that creates the issu | Template | Title | Created | Worked | Marker `kind` | | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------- | ------ | --------------- | -| [issue-research.md](issue-research.md) | `Research: <concept> (<package>·C001)` | S1 | S2-S3 | `research` | +| `issue-research.md` | `Research: <concept> (<package>·C001)` | S1 | S2-S3 | `research` | | [issue-parent.md](issue-parent.md) | `Handoff: Investigate and plan <concept> (<package>·C001)` | S4 | S5 | `handoff` | | [issue-child.md](issue-child.md) | `Design: <facet> (<package>·C001.3)` | S5 | S6 | `design` | | [issue-orchestration.md](issue-orchestration.md) | `Handoff: Orchestrate <design or implementation> of <concept> (<package>·C001) as an orchestrator using subagents` | S5, S7 | S6, S8 | `orchestration` | -| [issue-plan.md](issue-plan.md) | `Plan: <concept> (<package>·C001)` | S6 | S7 | `plan` | -| [issue-implement.md](issue-implement.md) | `Implement: <step> (<package>·C001·step <n>)` | S7 | S8 | `implement` | +| `issue-plan.md` | `Plan: <concept> (<package>·C001)` | S6 | S7 | `plan` | +| `issue-implement.md` | `Implement: <step> (<package>·C001·step <n>)` | S7 | S8 | `implement` | Every issue body ends with one marker line, for example `<!-- workflow:issue {"package":"<package>","concept":"C001","stage":"S1","kind":"research"} -->` (child issues add `"item"`, implement issues add `"step"`). Before creating an issue, look for its marker so a retry never makes a duplicate; this prints the URL of any issue that already carries it: @@ -45,19 +45,19 @@ gh issue list --repo <issue_repository> --state all --limit 1000 --json url,body jq -r --argjson want '<marker JSON>' '.[] | select([.body | scan("<!-- workflow:issue (\\{.*?\\}) -->")[0] | fromjson] | any(. == $want)) | .url' ``` -Use existing labels only. Before publishing, give the draft body, and nothing else, to the [zero-context reader](prompts/zero-context-reader.md) and fix every gap it finds. +Use existing labels only. Before publishing, give the draft body, and nothing else, to the `zero-context reader` and fix every gap it finds. ## Prompts Prompts an orchestrator gives to subagents, in [prompts/](prompts/). -| Prompt | Launched by | When | -| -------------------------------------------------------- | -------------------------- | ---------------------------------------------------- | -| [worker-brief.md](prompts/worker-brief.md) | any orchestrator | dispatching one unit of work | -| [orchestrator-brief.md](prompts/orchestrator-brief.md) | router, a human | starting an S6 or S8 orchestrator | -| [merger.md](prompts/merger.md) | S6, S8 orchestrators | landing a finished worker PR | -| [reviewer.md](prompts/reviewer.md) | S6, S8 orchestrators | a disagreement (with critic, investigator) or a PR | -| [critic.md](prompts/critic.md) | S6 orchestrator | a disagreement | -| [investigator.md](prompts/investigator.md) | S6 orchestrator | a disagreement, or a decision the challenge reopened | -| [challenge-pass.md](prompts/challenge-pass.md) | S6 orchestrator | before closing S6 | -| [zero-context-reader.md](prompts/zero-context-reader.md) | anyone publishing an issue | before creating any issue or long brief | +| Prompt | Launched by | When | +| ------------------------------------------ | -------------------------- | ---------------------------------------------------- | +| `worker-brief.md` | any orchestrator | dispatching one unit of work | +| `orchestrator-brief.md` | router, a human | starting an S6 or S8 orchestrator | +| `merger.md` | S6, S8 orchestrators | landing a finished worker PR | +| [reviewer.md](prompts/reviewer.md) | S6, S8 orchestrators | a disagreement (with critic, investigator) or a PR | +| [critic.md](prompts/critic.md) | S6 orchestrator | a disagreement | +| [investigator.md](prompts/investigator.md) | S6 orchestrator | a disagreement, or a decision the challenge reopened | +| `challenge-pass.md` | S6 orchestrator | before closing S6 | +| `zero-context-reader.md` | anyone publishing an issue | before creating any issue or long brief | diff --git a/planning/workflow/templates/concept.md b/planning/workflow/templates/concept.md index 5bafdb23b6..cde3c127df 100644 --- a/planning/workflow/templates/concept.md +++ b/planning/workflow/templates/concept.md @@ -1,45 +1,101 @@ -# {{ID}}: {{TITLE}} +# Concept file template -[Main reference](../main.md#{{ANCHOR}}) +`init` writes one of these per concept at S0, as `concepts/C001-<slug>.md`. From then on only the concept's current owner writes it: S1 adds the repository map and research questions, S2 the research, S3 the outcome of each incoming note, and every stage appends to `history` in the state block and to the change log at the bottom. Anyone else who wants a change here sends a note (`note`) instead. -<!-- workflow:state --> +````markdown +# C001: <title> +```workflow-state { -"id": "{{ID}}", -"title": "{{TITLE}}", -"stage": "intake", -"status": "created", -"priority": "recommended", -"horizon": "next", -"goal": "{{GOAL}}", -"enables": [], -"relations": [] + "disposition": "proposed", + "enables": [], + "goal": "<end goal this concept serves>", + "history": [ + { + "at": "<UTC>", + "note": "Created at intake.", + "ref": "transcript.txt", + "stage": "S0", + "status": "created" + } + ], + "horizon": "<now, next, later, ideas or unspecified>", + "id": "C001", + "issues": [], + "kind": "<new or edit>", + "priority": "<crucial, recommended, contingent or unspecified>", + "prs": [], + "relations": [], + "segments": [ + "T007-T009", + "T031" + ], + "slug": "<slug>", + "stage": "S0", + "status": "created", + "targets": [ + "<repository path this concept creates or edits>" + ], + "title": "<title>", + "type": "<topic, hint, constraint or directive>" } +``` -<!-- /workflow:state --> +[Main reference section](../main.md#c001-<title-anchor>) · [Transcript](../transcript.txt) · [Meta design](../design.md) -## Relevant transcript excerpts +## Transcript excerpts -<!-- workflow:excerpt {{ID}} {{START}} {{END}} --> +The exact text of every segment assigned to this concept. -[Transcript lines {{START}}-{{END}}](../transcript.txt#L{{START}}-L{{END}}) +[T007-T009 in transcript.txt](../transcript.txt) -```text -{{EXCERPT}} +```workflow-excerpt T007-T009 +<exact text of T007 to T009> ``` -## Normalized purpose +## Purpose -{{SUMMARY}} +Inference: <the concept restated as a goal, in plain words>. ## Initial thoughts -{{THOUGHTS}} +- <preliminary thought> + +## Hinted or missed ideas + +- Inference: <an idea the transcript only hints at, or that seems missing, kept for consideration>. + +## Current repository state + +S1: what exists today, each with a path or link (code, docs, designs, plans, earlier requests). + +## Research questions + +S1: what S2 must answer, most consequential first. + +1. <question> + +## Research + +S2: the definitive record for this concept; no length limit. Feasibility, prior art and example projects, use cases, user anecdotes, alternatives (each steelmanned), risks with mitigations and fallbacks. + +## Sources + +- <title>, <publisher>, <date or undated> — <exact URL the tool returned> — <what it supports> + +## Notes + +S3: every note sent and received, with its receipt. -## Inferred suggestions +- `notes/C002__to__C001__<id>.md` — `<disposition>`: <where it landed or why not>. -{{SUGGESTIONS}} +## Change log -## Stage results +- <UTC> · S0 — Created by `init`. +```` -Pending: research, synthesis, design, planning and implementation have not run. +- The state block is JSON with 2-space indent, sorted keys and a trailing newline, in a `workflow-state` fence so prettier leaves it alone. Only the owner edits it; `history` is append-only, newest last. +- `relations` entries: `{"kind": "requires", "reason": "<why it blocks>", "to": "C002"}`. `recommended-after` adds `"rework_if_early"`, `optional-if` adds `"trigger"`. Kinds: `requires`, `recommended-after`, `shares-files-with`, `conflicts-with`, `enables`, `optional-if`, `supersedes`, `contradicts`, `part-of` ([ordering](../ordering.md)). +- `issues` and `prs` entries: `{"number": <n>, "stage": "S1", "state": "open", "url": "https://github.com/<issue_repository>/issues/<n>"}`. +- A `hint` concept is never ready for research until a note or a human answer changes its `type`. A `deferred` or `rejected` disposition records its reason, and for `deferred` the revisit trigger, in the history entry's `note`. +- The excerpt fence must be longer than any backtick run inside the excerpt. diff --git a/planning/workflow/templates/decision.md b/planning/workflow/templates/decision.md index 9914b98246..f0963100a2 100644 --- a/planning/workflow/templates/decision.md +++ b/planning/workflow/templates/decision.md @@ -1,31 +1,44 @@ -# {{ID}}: {{TITLE}} +# Decision record template -- Status: preliminary | confirmed | reversed -- Source: stated | inferred | agent-preliminary | human-confirmed -- Date: {{TIMESTAMP}} -- Affects: {{CONCEPTS}} -- Reversal cost: Low | Medium | High +One file per decision, `decisions/D001-<slug>.md` (ID from `ids`), written at S6 by the worker or decision subagent that makes it. The orchestrator does not decide disagreements; it records what the reviewer, critic and investigator conclude ([decisions](../decisions.md)). Nothing downstream promotes `agent-preliminary` to `human-confirmed`; only a human does. + +```markdown +# D001: <question, short> + +- Status: <preliminary, confirmed or reversed> +- Source: <stated, inferred, agent-preliminary or human-confirmed> +- Date: <UTC> +- Affects: <IDs: C001, C001.3, D002> +- Reversal cost: <low, medium or high> — <what reversing would redo> +- Decided by: <agent names, with the PR or issue URL> ## Question -{{QUESTION}} +<The question, with the facts both sides agree on.> + +## Options + +### A: <option> + +- Steelman: <the strongest case for it> +- Against: <the strongest case against it> -## Options Considered +### B: <option> -### Option A: {{OPTION_A_TITLE}} +- Steelman: <...> +- Against: <...> -- Steelman: {{OPTION_A_STEELMAN}} -- Downsides: {{OPTION_A_DOWNSIDES}} +## Choice -### Option B: {{OPTION_B_TITLE}} +<A or B>. -- Steelman: {{OPTION_B_STEELMAN}} -- Downsides: {{OPTION_B_DOWNSIDES}} +## Rationale -## Choice & Rationale +<Why, with evidence links. Say which best practice or expert view it follows when the evidence alone does not settle it.> -{{CHOICE_AND_RATIONALE}} +## Human review -## Consequential Human Review Items +<"Not needed: <why it is obvious>", or "Listed in human-review.md: <why it is a genuine toss-up>".> +``` -{{HUMAN_REVIEW_NOTES}} +Reversing a decision: set `Status: reversed`, add a dated line under "Choice", and find the rework with `git grep -l D001`. diff --git a/planning/workflow/templates/note.md b/planning/workflow/templates/note.md index 0f04626557..cac715a53f 100644 --- a/planning/workflow/templates/note.md +++ b/planning/workflow/templates/note.md @@ -1,15 +1,19 @@ -# {{SENDER}} to {{RECEIVER}} +# Note template -<!-- workflow:note --> +A directed note from one concept's owner to another's, for any change or notice that belongs in a file the sender does not own. `note` writes it once as `notes/<from>__to__<to>__<id>.md`; it is never edited afterwards. The receiver answers with a [receipt](receipt.md). +````markdown +# C001 to C002 + +```workflow-note { -"id": "{{NOTE_ID}}", -"from": "{{SENDER}}", -"to": "{{RECEIVER}}", -"at": "{{TIMESTAMP}}", -"body_sha256": "{{BODY_SHA256}}" + "at": "<UTC>", + "body_sha256": "<sha256 of the body below>", + "from": "C001", + "id": "C001__to__C002__<id>", + "to": "C002" } +``` -<!-- /workflow:note --> - -{{BODY}} +<What the receiver should know or change, and why, with links to the evidence. One note per topic.> +```` diff --git a/planning/workflow/templates/receipt.md b/planning/workflow/templates/receipt.md index 49a439678d..91745d9f12 100644 --- a/planning/workflow/templates/receipt.md +++ b/planning/workflow/templates/receipt.md @@ -1,18 +1,28 @@ -# Note Receipt: {{NOTE_ID}} +# Receipt template -<!-- workflow:resolution --> +The receiver's answer to one [note](note.md). `resolve-note` creates `receipts/<note-id>.md` exclusively, so a note can be resolved only once. The receiver writes it, or the reconciler (`notes-reconcile`) on the receiver's behalf with `by` naming the reconciler. Reconcile receipts also record the remote refs they scanned (`check --remote-notes`). +````markdown +# Receipt: C001__to__C002__<id> + +```workflow-receipt { -"note": "{{NOTE_PATH}}", -"at": "{{TIMESTAMP}}", -"disposition": "{{DISPOSITION}}", -"target": "{{TARGET}}", -"reason": "{{REASON}}" + "at": "<UTC>", + "by": "<receiver concept, or the reconciler's name>", + "disposition": "<incorporated, acknowledged, declined, deferred or superseded>", + "note": "notes/C001__to__C002__<id>.md", + "reason": "<why>", + "scanned": [ + { + "ref": "origin/<branch>", + "sha": "<sha>" + } + ], + "target": "concepts/C002-<slug>.md#<anchor>" } +``` -<!-- /workflow:resolution --> - -- Note: [{{NOTE_PATH}}](../{{NOTE_PATH}}) -- Disposition: `{{DISPOSITION}}` -- Target: [{{TARGET}}]({{TARGET}}) -- Reason: {{REASON}} +- Note: [C001 to C002](../notes/C001__to__C002__<id>.md) +- Disposition: `<disposition>` — <reason> +- Landed in: [<target>](../concepts/C002-<slug>.md#<anchor>) +```` From 318b606fb316e0d1c6cab7609253d2c31db4f96c Mon Sep 17 00:00:00 2001 From: Drewry Pope <drewrypope@gmail.com> Date: Wed, 21 Oct 2026 15:03:17 -0500 Subject: [PATCH 5/7] docs(repo): add research and parent handoff issue templates --- planning/workflow/templates/README.md | 2 +- planning/workflow/templates/issue-parent.md | 77 +++++++++++++++---- planning/workflow/templates/issue-research.md | 69 +++++++++++++++++ 3 files changed, 134 insertions(+), 14 deletions(-) create mode 100644 planning/workflow/templates/issue-research.md diff --git a/planning/workflow/templates/README.md b/planning/workflow/templates/README.md index ee41b57e3a..8ff374dcde 100644 --- a/planning/workflow/templates/README.md +++ b/planning/workflow/templates/README.md @@ -31,7 +31,7 @@ Titles follow the table. The marker's `stage` is the stage that creates the issu | Template | Title | Created | Worked | Marker `kind` | | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------- | ------ | --------------- | -| `issue-research.md` | `Research: <concept> (<package>·C001)` | S1 | S2-S3 | `research` | +| [issue-research.md](issue-research.md) | `Research: <concept> (<package>·C001)` | S1 | S2-S3 | `research` | | [issue-parent.md](issue-parent.md) | `Handoff: Investigate and plan <concept> (<package>·C001)` | S4 | S5 | `handoff` | | [issue-child.md](issue-child.md) | `Design: <facet> (<package>·C001.3)` | S5 | S6 | `design` | | [issue-orchestration.md](issue-orchestration.md) | `Handoff: Orchestrate <design or implementation> of <concept> (<package>·C001) as an orchestrator using subagents` | S5, S7 | S6, S8 | `orchestration` | diff --git a/planning/workflow/templates/issue-parent.md b/planning/workflow/templates/issue-parent.md index ddd19491ed..1b9adbe34c 100644 --- a/planning/workflow/templates/issue-parent.md +++ b/planning/workflow/templates/issue-parent.md @@ -1,23 +1,74 @@ -# Research: {{TITLE}} ({{PACKAGE}}·{{ID}}) +# Parent handoff issue template + +S4 (`issue-handoff` mode `parent`) opens one per concept once its research and reconcile are merged. A zero-context agent takes the URL and runs S5: one child issue per facet, the "Initial research stages" section of `design.md`, and the orchestration issue. Title: `Handoff: Investigate and plan <concept title> (<package>·C001)`. Run the marker search in the [README](README.md) first. + +````markdown +Picking this up with no context? Everything you need is here or linked. Read "Your role" first, then "Current state" and "Read first". ## Goal -Conduct deep factual research and architectural analysis for **{{TITLE}}**, evaluating feasibility, prior art, use cases, risks, and concrete alternatives. +Every facet of **<concept title>** that still needs research, review, confirmation or design has its own self-contained child issue; [`design.md`](https://github.com/<issue_repository>/blob/<trunk>/<package path>/design.md) lists them under "Initial research stages" in priority order with parallel groups; and one orchestration issue runs them. + +## Read first + +1. [The concept file](https://github.com/<issue_repository>/blob/<trunk>/<package path>/concepts/C001-<slug>.md): the research this builds on. +2. [Main reference, section C001](https://github.com/<issue_repository>/blob/<trunk>/<package path>/main.md#c001-<title-anchor>): the items each facet maps to. +3. [Transcript](https://github.com/<issue_repository>/blob/<trunk>/<package path>/transcript.txt), segments `<T007-T009>`. +4. [issue-handoff skill](https://github.com/<issue_repository>/blob/<trunk>/.agents/skills/issue-handoff/SKILL.md), [child](https://github.com/<issue_repository>/blob/<trunk>/planning/workflow/templates/issue-child.md) and [orchestration](https://github.com/<issue_repository>/blob/<trunk>/planning/workflow/templates/issue-orchestration.md) templates. + +## Current state (verified <UTC> against `<trunk SHA>`) + +- Research: [#<n>](https://github.com/<issue_repository>/issues/<n>), merged in [#<n>](https://github.com/<issue_repository>/pull/<n>). +- Notes: all resolved (`check --require-resolved` passes). +- Open questions and preliminary decisions: <list, with links>. + +## Facets found so far + +- <facet>: <the question it answers>. Covers <C001.2>. Blocked by: <none, or facet>. +- <facet>: <...>. + +## Your role + +In the user's words: "it's orchestrating/planning/managing and it should use subagents to implement/review/validate and only handle itself when it can't use a subagent somehow. it should make parallel subagents for any portions that can be broken apart." + +- Draft child issues in parallel subagents, one facet each; give every draft to a zero-context reader before publishing. You publish, link and record. +- Size each facet for one fresh session. Mark hard blockers (`requires`) apart from soft order (`recommended-after`, with the rework it costs). + +## Owned outputs + +- Child issues (one per facet), each with an item allocated by `item add` (`C001.<n>`). +- The C001 part of "Initial research stages" in `design.md`, and the concept's `issues`, through one PR from `<branch>`. +- The orchestration issue. +- Must not touch: other concepts' files and sections. + +## Prerequisites + +- Blocked by: the research issue [#<n>](https://github.com/<issue_repository>/issues/<n>) (merged). +- Parallel-safe with: the parent issues of other concepts. -## Context Pointers +## First steps -- Package Reference: [main.md]({{MAIN_URL}}) -- Concept Document: [{{CONCEPT_PATH}}]({{CONCEPT_URL}}) -- Source Transcript: [transcript.txt]({{TRANSCRIPT_URL}}) (Segments: {{SEGMENTS}}) +1. Boot a fresh worktree and push the empty branch: + ```sh + source <git_env> + git -C <checkout> fetch -q origin + git -C <checkout> worktree add -b <branch> <worktree_root>/<branch-slug> origin/<trunk> + cd <worktree_root>/<branch-slug> && git push -u origin <branch> + ``` +2. Confirm or extend "Facets found so far" from the concept file; allocate an item per facet with `item add`. +3. Fan out the child-issue drafts, search each marker, publish, then write the orchestration issue. -## Scope & Questions +## Done when -{{QUESTIONS}} +- Outcome: the goal above is true. +- Verified by: each facet has an open child issue with its marker; `design.md` lists every issue related to C001 with a one-line description, priority and parallel group; `render` shows them in `main.md`; the PR is merged. +- Boundaries: issues and planning only. No research answers, design records or code. +- Stop as blocked: if a facet cannot be scoped without a human answer, publish the rest, list that facet with its question and default in a comment here, and stop. +- Report here and in your final message: branch, PR URL, last pushed SHA, issue URLs, what is verified, what is not. -## Expected Deliverables +## Not verified -1. Definitive concept research documented in `concepts/{{FILENAME}}`. -2. Any cross-cutting discoveries sent as directed notes under `notes/`. -3. Clear alternative steelmanning and risk tables. +- <what the author of this issue could not check> -<!-- workflow:issue {"package": "{{PACKAGE}}", "concept": "{{ID}}", "stage": "S1"} --> +<!-- workflow:issue {"package":"<package>","concept":"C001","stage":"S4","kind":"handoff"} --> +```` diff --git a/planning/workflow/templates/issue-research.md b/planning/workflow/templates/issue-research.md new file mode 100644 index 0000000000..6738a86e6c --- /dev/null +++ b/planning/workflow/templates/issue-research.md @@ -0,0 +1,69 @@ +# Research issue template + +S1 (`research-prepare`) opens one per concept, after writing the concept's repository map and research questions, to trigger S2 (`concept-research`). Title: `Research: <concept title> (<package>·C001)`. Run the marker search in the [README](README.md) first; afterwards add the issue to the concept's `issues` and run `render`. `<package path>` is `doc/<UTC>_research_<slug>`. + +````markdown +Picking this up with no context? Everything you need is here or linked. Read "Your role" first, then "Current state" and "Read first". + +## Goal + +[`concepts/C001-<slug>.md`](https://github.com/<issue_repository>/blob/<trunk>/<package path>/concepts/C001-<slug>.md) is the definitive research record for **<concept title>**: feasibility, prior art and example projects, use cases, anecdotes, alternatives steelmanned, risks with mitigations, every source cited, and every note to or from other concepts resolved by a receipt. + +## Read first + +1. [The concept file](https://github.com/<issue_repository>/blob/<trunk>/<package path>/concepts/C001-<slug>.md): transcript excerpts, repository map and research questions are at the top. +2. [Main reference, section C001](https://github.com/<issue_repository>/blob/<trunk>/<package path>/main.md#c001-<title-anchor>): how the concept fits the request. +3. [Transcript](https://github.com/<issue_repository>/blob/<trunk>/<package path>/transcript.txt), segments `<T007-T009>`, `<T031>`: the exact request. +4. [Meta design](https://github.com/<issue_repository>/blob/<trunk>/<package path>/design.md): order, waves and who else is running. +5. [concept-research skill](https://github.com/<issue_repository>/blob/<trunk>/.agents/skills/concept-research/SKILL.md) and [collaboration rules](https://github.com/<issue_repository>/blob/<trunk>/planning/workflow/collaboration.md). + +## Current state (verified <UTC> against `<trunk SHA>`) + +- <what S1 found, each with evidence: a path, commit, or command and its output> +- <n> research questions open in the concept file. + +## Your role + +In the user's words: "it's orchestrating/planning/managing and it should use subagents to implement/review/validate and only handle itself when it can't use a subagent somehow. it should make parallel subagents for any portions that can be broken apart." + +- You lead this concept and are the only writer of its concept file. Split separable questions across parallel read-only researcher subagents and merge their evidence yourself. +- A change for another concept goes to it as a note (`note`), never into its file. `main.md` and `design.md` change only through your PR. + +## Owned outputs + +- Writes: the concept file, outgoing `notes/C001__to__*`, receipts for notes addressed to C001, one `changes.md` line per change. +- Branch `<branch>` from `<trunk>`, one PR into `<trunk>`. +- Must not touch: other concept files, other writers' notes and receipts, anything outside the package. + +## Prerequisites + +- Blocked by: <#n, or "none">. Confirm with `python3 scripts/research_workflow.py ready --package <package path>`. +- Parallel-safe with: <#n, #n>. +- Shares files with: <"none", or the issue to finish first>. + +## First steps + +1. Boot a fresh worktree and push the empty branch: + ```sh + source <git_env> + git -C <checkout> fetch -q origin + git -C <checkout> worktree add -b <branch> <worktree_root>/<branch-slug> origin/<trunk> + cd <worktree_root>/<branch-slug> && git push -u origin <branch> + ``` +2. Take the concept's lease (`lease acquire`), make a first commit and open the PR. +3. Answer the research questions, most consequential first; check `check --remote-notes` for notes addressed to C001. + +## Done when + +- Outcome: the goal above is true on `<trunk>`. +- Verified by: `python3 scripts/research_workflow.py check --package <package path> --require-resolved` passes; `check --remote-notes` lists nothing pending for C001; every claim under "Research" cites a source; the PR is merged with a merge commit. +- Boundaries: research and record only. No code, no design beyond `agent-preliminary` decisions written down as such. +- Stop as blocked: if something only a person or another unfinished concept can provide stops you, comment here with what and why, set the run status to `blocked`, and stop. Do not work around it. +- Report here and in your final message: branch, PR URL, last pushed SHA, what is verified, what is not. + +## Not verified + +- <what the author of this issue could not check> + +<!-- workflow:issue {"package":"<package>","concept":"C001","stage":"S1","kind":"research"} --> +```` From 7257d7797aa0737bd2b21537105eb711e89001da Mon Sep 17 00:00:00 2001 From: Drewry Pope <drewrypope@gmail.com> Date: Wed, 21 Oct 2026 15:04:38 -0500 Subject: [PATCH 6/7] docs(repo): add facet, orchestration, plan and implement issue templates --- planning/workflow/templates/README.md | 4 +- planning/workflow/templates/issue-child.md | 71 +++++++++++++++---- .../workflow/templates/issue-implement.md | 67 +++++++++++++++++ .../workflow/templates/issue-orchestration.md | 60 ++++++++++++---- planning/workflow/templates/issue-plan.md | 67 +++++++++++++++++ 5 files changed, 242 insertions(+), 27 deletions(-) create mode 100644 planning/workflow/templates/issue-implement.md create mode 100644 planning/workflow/templates/issue-plan.md diff --git a/planning/workflow/templates/README.md b/planning/workflow/templates/README.md index 8ff374dcde..5464f20cb3 100644 --- a/planning/workflow/templates/README.md +++ b/planning/workflow/templates/README.md @@ -35,8 +35,8 @@ Titles follow the table. The marker's `stage` is the stage that creates the issu | [issue-parent.md](issue-parent.md) | `Handoff: Investigate and plan <concept> (<package>·C001)` | S4 | S5 | `handoff` | | [issue-child.md](issue-child.md) | `Design: <facet> (<package>·C001.3)` | S5 | S6 | `design` | | [issue-orchestration.md](issue-orchestration.md) | `Handoff: Orchestrate <design or implementation> of <concept> (<package>·C001) as an orchestrator using subagents` | S5, S7 | S6, S8 | `orchestration` | -| `issue-plan.md` | `Plan: <concept> (<package>·C001)` | S6 | S7 | `plan` | -| `issue-implement.md` | `Implement: <step> (<package>·C001·step <n>)` | S7 | S8 | `implement` | +| [issue-plan.md](issue-plan.md) | `Plan: <concept> (<package>·C001)` | S6 | S7 | `plan` | +| [issue-implement.md](issue-implement.md) | `Implement: <step> (<package>·C001·step <n>)` | S7 | S8 | `implement` | Every issue body ends with one marker line, for example `<!-- workflow:issue {"package":"<package>","concept":"C001","stage":"S1","kind":"research"} -->` (child issues add `"item"`, implement issues add `"step"`). Before creating an issue, look for its marker so a retry never makes a duplicate; this prints the URL of any issue that already carries it: diff --git a/planning/workflow/templates/issue-child.md b/planning/workflow/templates/issue-child.md index ec32d2607e..119d1fc696 100644 --- a/planning/workflow/templates/issue-child.md +++ b/planning/workflow/templates/issue-child.md @@ -1,23 +1,68 @@ -# Research Facet: {{FACET_TITLE}} ({{PACKAGE}}·{{ID}}·{{FACET_ID}}) +# Child facet issue template -Parent Issue: #{{PARENT_ISSUE}} +S5 (`issue-handoff` mode `fanout`) opens one per facet of a parent issue; an S6 worker dispatched by the design orchestration issue works it. Title: `Design: <facet> (<package>·C001.3)`, where `C001.3` is the item `item add` allocated for the facet. Run the marker search in the [README](README.md) first. -## Objective +````markdown +Picking this up with no context? Everything you need is here or linked. Read "Your role" first, then "Current state" and "Read first". -Investigate the specific sub-topic **{{FACET_TITLE}}** belonging to concept **{{ID}}**. +## Goal -## Scope & Concrete Angle +Facet **<facet>** of <concept title> is settled: [`<design record path>`](https://github.com/<issue_repository>/blob/<trunk>/<design record path>) answers <the question>, every decision it needed is a decision record, and item C001.3 in the main reference shows the result. -{{FACET_SCOPE}} +## Read first -## Context +1. [Parent issue #<n>](https://github.com/<issue_repository>/issues/<n>) and [orchestration issue #<n>](https://github.com/<issue_repository>/issues/<n>). +2. [The concept file](https://github.com/<issue_repository>/blob/<trunk>/<package path>/concepts/C001-<slug>.md), sections <Research, Sources>. +3. [Main reference, item C001.3](https://github.com/<issue_repository>/blob/<trunk>/<package path>/main.md#c001-<title-anchor>) and [transcript](https://github.com/<issue_repository>/blob/<trunk>/<package path>/transcript.txt) segments `<T012>`. +4. [Decision protocol](https://github.com/<issue_repository>/blob/<trunk>/planning/workflow/decisions.md) and [design record template](https://github.com/<issue_repository>/blob/<trunk>/planning/templates/design.md). -- Parent Issue: #{{PARENT_ISSUE}} -- Concept File: [{{CONCEPT_PATH}}]({{CONCEPT_URL}}) +## Current state (verified <UTC> against `<trunk SHA>`) -## Done When +- <what is known and decided about this facet, with evidence> +- Open: <questions this issue must answer> -- Factual claims are backed by cited sources or primary code references. -- Findings are incorporated into the concept research record via PR. +## Your role -<!-- workflow:issue {"package": "{{PACKAGE}}", "concept": "{{ID}}", "facet": "{{FACET_ID}}", "stage": "S5"} --> +In the user's words: "it's orchestrating/planning/managing and it should use subagents to implement/review/validate and only handle itself when it can't use a subagent somehow. it should make parallel subagents for any portions that can be broken apart." + +- You are the worker for this facet and the only writer of its outputs. Use parallel read-only subagents for separable research. +- When the evidence settles a choice, decide it and record it. When it does not, record your preliminary choice as `agent-preliminary` and keep going; a conflict with another facet goes to the orchestrator as a note, not into the other facet's files. + +## Owned outputs + +- Writes: `<design record path>`, `decisions/D<nnn>-<slug>.md` (IDs from `ids`), item C001.3 and its children (`item set-status`, `item add`), one `changes.md` line per change. +- Branch `<branch>` from `<trunk>`, one PR into `<trunk>`. +- Must not touch: other facets' design records and decisions. + +## Prerequisites + +- Blocked by: <#n, or "none">. +- Parallel-safe with: <#n, #n>. +- Shares files with: <"none", or the issue to finish first>. + +## First steps + +1. Boot a fresh worktree and push the empty branch: + ```sh + source <git_env> + git -C <checkout> fetch -q origin + git -C <checkout> worktree add -b <branch> <worktree_root>/<branch-slug> origin/<trunk> + cd <worktree_root>/<branch-slug> && git push -u origin <branch> + ``` +2. Take the facet's lease (`lease acquire`), make a first commit and open the PR. +3. Answer the open questions, then write the design record and decisions. + +## Done when + +- Outcome: the goal above is true on `<trunk>`. +- Verified by: the design record covers intent, design, decisions, alternatives, consequences and open questions; each decision record lists options steelmanned, choice, rationale, source and reversal cost; `check --package <package path>` passes; the PR is merged. +- Boundaries: design only, for this facet. No code, no plan, no changes to other facets. +- Stop as blocked: if the facet cannot be settled without another facet or a human, record the preliminary choice and the question with its default, comment here, set the run status to `blocked`, and stop. +- Report here and in your final message: branch, PR URL, last pushed SHA, what is verified, what is not. + +## Not verified + +- <what the author of this issue could not check> + +<!-- workflow:issue {"package":"<package>","concept":"C001","stage":"S5","kind":"design","item":"C001.3"} --> +```` diff --git a/planning/workflow/templates/issue-implement.md b/planning/workflow/templates/issue-implement.md new file mode 100644 index 0000000000..fbf76689ad --- /dev/null +++ b/planning/workflow/templates/issue-implement.md @@ -0,0 +1,67 @@ +# Implement issue template + +S7 (`feature-plan`) opens one per plan step; an S8 worker dispatched by the implementation orchestration issue works it. Title: `Implement: <step> (<package>·C001·step <n>)`. Run the marker search in the [README](README.md) first. + +````markdown +Picking this up with no context? Everything you need is here or linked. Read "Your role" first, then "Current state" and "Read first". + +## Goal + +Step <n> of [the plan](https://github.com/<issue_repository>/blob/<trunk>/planning/plans/<slug>.md#<step-anchor>) is done: <what is true afterwards, in one sentence>. + +## Read first + +1. [The plan, step <n>](https://github.com/<issue_repository>/blob/<trunk>/planning/plans/<slug>.md#<step-anchor>): files, done check, blockers. +2. [Design record](https://github.com/<issue_repository>/blob/<trunk>/<design record path>) and decisions [D<nnn>](https://github.com/<issue_repository>/blob/<trunk>/<package path>/decisions/D<nnn>-<slug>.md). +3. [Orchestration issue #<n>](https://github.com/<issue_repository>/issues/<n>) and [collaboration rules](https://github.com/<issue_repository>/blob/<trunk>/planning/workflow/collaboration.md). + +## Current state (verified <UTC> against `<trunk SHA>`) + +- <what exists in the code today, with file:line; line numbers drift as `<trunk>` moves> +- Blocking steps merged: <#n in PR #n, or "none">. + +## Your role + +In the user's words: "it's orchestrating/planning/managing and it should use subagents to implement/review/validate and only handle itself when it can't use a subagent somehow. it should make parallel subagents for any portions that can be broken apart." + +- You are the implementer for this one step. Use read-only subagents for separable investigation; a fresh reviewer reviews your PR, not you. +- Review is light: the PR exists to surface conflicts before merge. Do not fix preexisting problems outside the step; file them. + +## Owned outputs + +- Writes: <files the plan assigns to this step>, and their tests. +- Branch `<branch>` from `<trunk>`, one PR into `<trunk>`, merge commits only. +- Must not touch: files of other steps, the plan, design and decision records. + +## Prerequisites + +- Blocked by: <#n, or "none">. +- Parallel-safe with: <#n, #n>. +- Shares files with: <"none", or the issue to finish first>. + +## First steps + +1. Boot a fresh worktree and push the empty branch: + ```sh + source <git_env> + git -C <checkout> fetch -q origin + git -C <checkout> worktree add -b <branch> <worktree_root>/<branch-slug> origin/<trunk> + cd <worktree_root>/<branch-slug> && git push -u origin <branch> + ``` +2. Write the failing test the step's done check names, make a first commit and open the PR. +3. Implement until the done check passes; merge `origin/<trunk>` into the branch before asking for merge. + +## Done when + +- Outcome: the goal above is true on `<trunk>`. +- Verified by: <the step's done check, as a command>; <the repository's test command> passes; the PR is green on its own base. +- Boundaries: this step only. No design changes: if the design is wrong, send a note to the concept and comment here. +- Stop as blocked: if a blocker is unmerged, a requirement only a person can provide is missing, or the design does not hold, comment here with what and why, set the run status to `blocked`, and stop. +- Report here and in your final message: branch, PR URL, last pushed SHA, what is verified, what is not. + +## Not verified + +- <what the author of this issue could not check> + +<!-- workflow:issue {"package":"<package>","concept":"C001","stage":"S7","kind":"implement","step":"<n>"} --> +```` diff --git a/planning/workflow/templates/issue-orchestration.md b/planning/workflow/templates/issue-orchestration.md index 5cc68f0044..ca94a4c6ef 100644 --- a/planning/workflow/templates/issue-orchestration.md +++ b/planning/workflow/templates/issue-orchestration.md @@ -1,20 +1,56 @@ -# Orchestrate: {{STAGE_NAME}} for {{PACKAGE}} +# Orchestration issue template -## Role +Opened at S5 to run every child issue of a concept through design (S6, `design-orchestrate`), and at S7 to run every implement issue of a plan (S8, `implementation-orchestrate`). Title: `Handoff: Orchestrate <design or implementation> of <concept title> (<package>·C001) as an orchestrator using subagents`. Keep the S6 or the S8 lines and delete the other. Run the marker search in the [README](README.md) first; the marker's `stage` is `S5` or `S7`. -You are the **Orchestrator**, not an implementer. In the user's instructions: +```markdown +Picking this up with no context? Everything you need is here or linked. Read "Your role" first, then "Current state" and "Read first". -> "it's orchestrating/planning/managing and it should use subagents to implement/review/validate and only handle itself when it can't use a subagent somehow. it should make parallel subagents for any portions that can be broken apart." +## Goal -## Execution Plan +Every issue in the graph below is merged and validated, and the main reference and meta design show each one's result. S6: design records, decision records and [human-review.md](https://github.com/<issue_repository>/blob/<trunk>/<package path>/human-review.md) are complete, and the plan issue is open. S8: the feature works as the plan says, on `<trunk>`. -1. Compute the ready frontier: `python3 scripts/research_workflow.py ready --package {{PACKAGE}}`. -2. Boot dedicated worker subagents into isolated git worktrees. -3. Monitor worker PRs, verify last pushed SHAs, and execute merge commits. -4. Reconcile directed notes and verify acceptance criteria. +## Your role: orchestrator, not implementer -## Child Issues +In the user's words: "it's orchestrating/planning/managing and it should use subagents to implement/review/validate and only handle itself when it can't use a subagent somehow. it should make parallel subagents for any portions that can be broken apart." -{{CHILD_ISSUES_LIST}} +- You plan, dispatch, track and decide how work proceeds. Workers design, implement, review and validate. Your only writes are merge commits, state and receipt files, and issue and PR bookkeeping. +- Run every ready issue at once, up to `max_parallel_writers`, one worker each with its own branch and worktree. Issues that share files run one after another. +- No worker reviews its own work: a fresh reviewer subagent reviews every PR against its issue. +- Re-verify what workers report (`git ls-remote`, `git log`, CI) before building on it, and carry their hedges forward. -<!-- workflow:issue {"package": "{{PACKAGE}}", "stage": "{{STAGE}}", "type": "orchestration"} --> +## Read first + +1. [Orchestrator brief](https://github.com/<issue_repository>/blob/<trunk>/planning/workflow/templates/prompts/orchestrator-brief.md): the loop, the merge gate and the restart rule. +2. [Meta design](https://github.com/<issue_repository>/blob/<trunk>/<package path>/design.md): "Initial research stages" (S6) or the plan's steps (S8), waves and run table. +3. S6: [parent issue #<n>](https://github.com/<issue_repository>/issues/<n>). S8: [plan](https://github.com/<issue_repository>/blob/<trunk>/planning/plans/<slug>.md). +4. [Collaboration rules](https://github.com/<issue_repository>/blob/<trunk>/planning/workflow/collaboration.md) and [decision protocol](https://github.com/<issue_repository>/blob/<trunk>/planning/workflow/decisions.md). + +## Current state (verified <UTC> against `<trunk SHA>`) + +- <n> issues: <n> merged, <n> open PRs, <n> not started. `python3 scripts/research_workflow.py status --live --package <package path>` output: <summary>. + +## The graph + +1. [#<n> <title>](https://github.com/<issue_repository>/issues/<n>) — blocked by: none. Parallel with: #<n>. +2. [#<n> <title>](https://github.com/<issue_repository>/issues/<n>) — blocked by: #<n> (requires: <reason>). + +## First steps + +1. Boot a read-only worktree on `origin/<trunk>` (`source <git_env>`, `git worktree add --detach <worktree_root>/<slug> origin/<trunk>`). +2. Run `ready --package <package path>`, `status --live` and `lease list`; dispatch every ready issue with the worker brief. +3. Write a `start` line in the coordination directory and comment here when each PR opens or merges. + +## Done when + +- Outcome: the goal above is true. +- Verified by: every graph issue is closed by a merged PR whose SHA is an ancestor of `origin/<trunk>`; `check --package <package path> --require-resolved` passes; the run table shows `validated` for each. S6: the challenge pass ran and every reopened decision was re-investigated. S8: `validation_commands` from the profile pass on `<trunk>`. +- Boundaries: no implementation, no design writing, no deciding a disagreement yourself: launch the reviewer, critic and investigator prompts with both sides' material. +- Stop as blocked: only for a fork that changes everything after it. Otherwise continue on the preliminary choice, list it in `human-review.md`, and keep going. +- Report here and in your final message: Done, Verified, Remaining, Questions (with defaults), Blocked on user. + +## Not verified + +- <what the author of this issue could not check> + +<!-- workflow:issue {"package":"<package>","concept":"C001","stage":"<S5 or S7>","kind":"orchestration"} --> +``` diff --git a/planning/workflow/templates/issue-plan.md b/planning/workflow/templates/issue-plan.md new file mode 100644 index 0000000000..66963bf9bc --- /dev/null +++ b/planning/workflow/templates/issue-plan.md @@ -0,0 +1,67 @@ +# Plan issue template + +The S6 orchestrator opens one per concept once its design is settled and the challenge pass is done; S7 (`feature-plan`) works it. Title: `Plan: <concept title> (<package>·C001)`. Run the marker search in the [README](README.md) first. + +````markdown +Picking this up with no context? Everything you need is here or linked. Read "Your role" first, then "Current state" and "Read first". + +## Goal + +[`planning/plans/<slug>.md`](https://github.com/<issue_repository>/blob/<trunk>/planning/plans/<slug>.md) turns the design of **<concept title>** into granular, ordered steps, each sized for one PR and one fresh session, with hard blockers, soft order and parallel groups marked; every step has an implement issue; and one orchestration issue runs them. + +## Read first + +1. [Design records](https://github.com/<issue_repository>/blob/<trunk>/<design record path>) and [decision records](https://github.com/<issue_repository>/tree/<trunk>/<package path>/decisions). +2. [human-review.md](https://github.com/<issue_repository>/blob/<trunk>/<package path>/human-review.md): preliminary decisions the plan builds on. +3. [The concept file](https://github.com/<issue_repository>/blob/<trunk>/<package path>/concepts/C001-<slug>.md) and [transcript](https://github.com/<issue_repository>/blob/<trunk>/<package path>/transcript.txt) segments `<T007-T009>`. +4. [Plan template](https://github.com/<issue_repository>/blob/<trunk>/planning/templates/plan.md), [ordering](https://github.com/<issue_repository>/blob/<trunk>/planning/workflow/ordering.md), [feature-plan skill](https://github.com/<issue_repository>/blob/<trunk>/.agents/skills/feature-plan/SKILL.md). + +## Current state (verified <UTC> against `<trunk SHA>`) + +- Design orchestration [#<n>](https://github.com/<issue_repository>/issues/<n>) closed; <n> design PRs merged. +- Preliminary decisions awaiting a human: <D007, D009, or "none">. + +## Your role + +In the user's words: "it's orchestrating/planning/managing and it should use subagents to implement/review/validate and only handle itself when it can't use a subagent somehow. it should make parallel subagents for any portions that can be broken apart." + +- You write the plan. Use parallel subagents to draft implement issues, one step each, and a zero-context reader on each draft. +- Keep decisions that depend on implementation details open in the plan, each with when and by whom it will be settled. + +## Owned outputs + +- Writes: `planning/plans/<slug>.md`, the plan's row in the plan catalog, the concept's `issues` and `changes.md` lines, through one PR from `<branch>`. +- Implement issues (one per step) and the S7 orchestration issue. +- Must not touch: design and decision records (send a note if they are wrong). + +## Prerequisites + +- Blocked by: design orchestration [#<n>](https://github.com/<issue_repository>/issues/<n>). +- Parallel-safe with: plan issues of other concepts, unless they share files: <list>. + +## First steps + +1. Boot a fresh worktree and push the empty branch: + ```sh + source <git_env> + git -C <checkout> fetch -q origin + git -C <checkout> worktree add -b <branch> <worktree_root>/<branch-slug> origin/<trunk> + cd <worktree_root>/<branch-slug> && git push -u origin <branch> + ``` +2. List the steps with their files; mark `requires`, `recommended-after` (with the rework) and parallel groups. +3. Write the plan, open the PR, then fan out the implement issues. + +## Done when + +- Outcome: the goal above is true. +- Verified by: each step names its files, its done check and its blockers; each step has an implement issue with its marker; the orchestration issue lists the graph; `check --repo-root .` passes; the PR is merged. +- Boundaries: planning only. No implementation. +- Stop as blocked: if the design leaves a step impossible to scope, write it as an open decision with a default, comment here, and continue with the rest. +- Report here and in your final message: branch, PR URL, last pushed SHA, issue URLs, what is verified, what is not. + +## Not verified + +- <what the author of this issue could not check> + +<!-- workflow:issue {"package":"<package>","concept":"C001","stage":"S6","kind":"plan"} --> +```` From 1c8ea0396c342a315167e8017df0f0afe1b7e8c6 Mon Sep 17 00:00:00 2001 From: Drewry Pope <drewrypope@gmail.com> Date: Wed, 21 Oct 2026 15:05:26 -0500 Subject: [PATCH 7/7] docs(repo): add decision, challenge and zero-context prompts --- planning/workflow/templates/README.md | 20 +++++----- .../templates/prompts/challenge-pass.md | 21 +++++++++++ planning/workflow/templates/prompts/critic.md | 34 +++++++++++------ .../templates/prompts/investigator.md | 37 +++++++++++-------- .../workflow/templates/prompts/reviewer.md | 36 +++++++++++------- .../templates/prompts/zero-context-reader.md | 18 +++++++++ 6 files changed, 115 insertions(+), 51 deletions(-) create mode 100644 planning/workflow/templates/prompts/challenge-pass.md create mode 100644 planning/workflow/templates/prompts/zero-context-reader.md diff --git a/planning/workflow/templates/README.md b/planning/workflow/templates/README.md index 5464f20cb3..aad5927b53 100644 --- a/planning/workflow/templates/README.md +++ b/planning/workflow/templates/README.md @@ -51,13 +51,13 @@ Use existing labels only. Before publishing, give the draft body, and nothing el Prompts an orchestrator gives to subagents, in [prompts/](prompts/). -| Prompt | Launched by | When | -| ------------------------------------------ | -------------------------- | ---------------------------------------------------- | -| `worker-brief.md` | any orchestrator | dispatching one unit of work | -| `orchestrator-brief.md` | router, a human | starting an S6 or S8 orchestrator | -| `merger.md` | S6, S8 orchestrators | landing a finished worker PR | -| [reviewer.md](prompts/reviewer.md) | S6, S8 orchestrators | a disagreement (with critic, investigator) or a PR | -| [critic.md](prompts/critic.md) | S6 orchestrator | a disagreement | -| [investigator.md](prompts/investigator.md) | S6 orchestrator | a disagreement, or a decision the challenge reopened | -| `challenge-pass.md` | S6 orchestrator | before closing S6 | -| `zero-context-reader.md` | anyone publishing an issue | before creating any issue or long brief | +| Prompt | Launched by | When | +| -------------------------------------------------------- | -------------------------- | ---------------------------------------------------- | +| `worker-brief.md` | any orchestrator | dispatching one unit of work | +| `orchestrator-brief.md` | router, a human | starting an S6 or S8 orchestrator | +| `merger.md` | S6, S8 orchestrators | landing a finished worker PR | +| [reviewer.md](prompts/reviewer.md) | S6, S8 orchestrators | a disagreement (with critic, investigator) or a PR | +| [critic.md](prompts/critic.md) | S6 orchestrator | a disagreement | +| [investigator.md](prompts/investigator.md) | S6 orchestrator | a disagreement, or a decision the challenge reopened | +| [challenge-pass.md](prompts/challenge-pass.md) | S6 orchestrator | before closing S6 | +| [zero-context-reader.md](prompts/zero-context-reader.md) | anyone publishing an issue | before creating any issue or long brief | diff --git a/planning/workflow/templates/prompts/challenge-pass.md b/planning/workflow/templates/prompts/challenge-pass.md new file mode 100644 index 0000000000..e67b66f5e0 --- /dev/null +++ b/planning/workflow/templates/prompts/challenge-pass.md @@ -0,0 +1,21 @@ +# Challenge pass prompt + +Give this to one fresh, read-only subagent before the S6 orchestrator closes design. It asks of every decision whether the options considered were too narrow (for example, four choices when the right answer was a fifth). The orchestrator reopens each decision it flags with the [investigator](investigator.md) prompt. + +```text +You are the challenger. You took part in none of these decisions. Do not edit files. + +Decisions: <paths of every decisions/D<nnn>-<slug>.md in the package> +Context: <main reference URL or path, concept files, transcript path, the end goal> + +For each decision, ask: +- Were the options a false choice? Was "both", "neither", "defer" or a simpler pattern left out? +- Is there a standard practice or prior art the options missed? +- Were the chosen option's costs or failure modes understated? +- Does the choice serve the end goal, or only the immediate question? + +Return one line per decision: +D<nnn>: sound - <one-line reason> +D<nnn>: reopen - <the missing option or understated cost> - <evidence or source> - <what the investigator should look at> +Then: Not checked: <what you did not verify> +``` diff --git a/planning/workflow/templates/prompts/critic.md b/planning/workflow/templates/prompts/critic.md index 38c590dae1..75a3b437e4 100644 --- a/planning/workflow/templates/prompts/critic.md +++ b/planning/workflow/templates/prompts/critic.md @@ -1,16 +1,26 @@ ---- -name: workflow-critic -description: Fresh-context architectural critic analyzing trade-offs, conflicting designs, and preliminary decisions. -tools: Read, Grep, Glob, Bash ---- +# Critic prompt -You are an independent, skeptical technical critic. You evaluate competing proposals and trade-offs. +Give this to a fresh, read-only subagent when two workers disagree at S6. It runs in parallel with the [reviewer](reviewer.md) and the [investigator](investigator.md), on the same merged material from both sides; the critic attacks each side's reasoning and weighs the trade-offs. The orchestrator records the outcome as decision records and does not decide itself. -## Mission +```text +You are the critic. You wrote none of the material below. Do not edit files. -Analyze conflicting recommendations from two workers or concepts: +Material, read all of it before forming a view: +- Side A: <branch, PR URL or paths, and its author> +- Side B: <same> +- Both together: <the merged view of both sides> +- Must satisfy: <concept file, issue URL, transcript segments, the end goal> -1. Examine the steelmen and downsides of both options. -2. Determine if one option is obviously superior or more aligned with repository invariants. -3. Formulate an unambiguous preliminary recommendation (`agent-preliminary`). -4. If a genuine irreversible trade-off exists, state it concisely for the human-review list. +Do: +1. Steelman each side: its strongest case, in its own terms. +2. Give the strongest objection to each: failure modes, hidden costs, what it makes harder later, and whether it fits the end goal. +3. Decide everything that is obvious once both cases are on the table. When in doubt, take the option best practice and experts in this area would choose, and say so. +4. For each decision give: question, options, choice, rationale, source agent-preliminary, reversal cost, affected IDs. +5. List as a toss-up only a decision whose options are genuinely balanced and whose wrong choice would be costly to reverse. Keep that list as short as possible. Never list what the transcript already states. + +Return: +Decisions: <one block per decision, fields as in step 4> +Toss-ups: <question - default to use now - alternatives - cost of reversing>, or "none" +Can both be done?: <yes, with how, or no, with why> +Not checked: <what you did not verify> +``` diff --git a/planning/workflow/templates/prompts/investigator.md b/planning/workflow/templates/prompts/investigator.md index cc62e37676..2a8207ae00 100644 --- a/planning/workflow/templates/prompts/investigator.md +++ b/planning/workflow/templates/prompts/investigator.md @@ -1,20 +1,27 @@ ---- -name: workflow-investigator -description: Challenge subagent testing whether decisions were artificially constrained or missed superior options. -tools: Read, Grep, Glob, Bash, WebSearch ---- +# Investigator prompt -You challenge decisions to prevent groupthink and prematurely narrowed options. +Give this to a fresh subagent at S6 in two cases: alongside the [reviewer](reviewer.md) and the [critic](critic.md) when two workers disagree (same merged material from both sides), and for each decision the [challenge pass](challenge-pass.md) reopened as too narrow. It looks for options nobody considered. It may research the web; it does not edit repository files. -## Mission +```text +You are the investigator. You wrote none of the material below. Do not edit repository files. -Inspect the assigned decision record: +Material, read all of it before forming a view: +- Side A and side B: <branches, PR URLs or paths, and their authors>, or the decision record <decisions/D<nnn>-<slug>.md> +- Both together: <the merged view of both sides> +- Why you are here: <disagreement, or the challenge pass's finding for this decision> +- Must satisfy: <concept file, issue URL, transcript segments, the end goal> -1. Were the options framed as a false dichotomy? -2. Did the authors miss standard industry solutions or simpler architectural patterns? -3. Were costs or failure modes understated? +Do: +1. Ask whether the options were framed too narrowly: a false choice, a missed standard practice, a simpler pattern, doing both, or deferring. +2. Search for prior art and how others solved it. Prefer primary sources; cite only URLs a tool returned; label anecdotes as such. +3. Steelman every new option you find, and give its strongest case against. +4. Decide everything the combined evidence now settles. When in doubt, take the option best practice and experts in this area would choose, and say so. +5. For each decision give: question, options (old and new), choice, rationale, source agent-preliminary, reversal cost, affected IDs. +6. List as a toss-up only a decision whose options are genuinely balanced and whose wrong choice would be costly to reverse. Keep that list as short as possible. Never list what the transcript already states. -Return either: - -- **Confirmed Sound**: Options were properly steelmanned; recommendation holds. -- **Reopen Decision**: Name the missing alternative and provide evidence for why it should be evaluated. +Return: +New options: <option - steelman - against - sources>, or "none found" with the searches you ran +Decisions: <one block per decision, fields as in step 5> +Toss-ups: <question - default to use now - alternatives - cost of reversing>, or "none" +Not checked: <what you did not verify> +``` diff --git a/planning/workflow/templates/prompts/reviewer.md b/planning/workflow/templates/prompts/reviewer.md index 501af6118c..f856213624 100644 --- a/planning/workflow/templates/prompts/reviewer.md +++ b/planning/workflow/templates/prompts/reviewer.md @@ -1,20 +1,28 @@ ---- -name: workflow-reviewer -description: Read-only reviewer subagent evaluating pull requests against acceptance criteria and coding standards. -tools: Read, Grep, Glob, Bash ---- +# Reviewer prompt -You are a read-only reviewer subagent. You do not edit code or commit files. +Give this to a fresh, read-only subagent. At S6 the orchestrator launches it alongside the [critic](critic.md) and the [investigator](investigator.md) when two workers disagree, each with the same merged material from both sides; the reviewer checks the facts. At S8 it reviews one worker PR against its issue. It never edits files, and it never reviews work it wrote. -## Review Mission +```text +You are the reviewer. You wrote none of the material below. Do not edit files; run only read-only commands (git diff, git log, git show, tests that do not change the tree). -Evaluate the assigned pull request diff against: +Material, read all of it before forming a view: +- Side A: <branch, PR URL or paths, and its author> +- Side B: <same; omit when reviewing a single PR> +- Both together: <the merged view, e.g. git diff origin/<trunk>...<branch A> and git diff origin/<trunk>...<branch B>, or a merge of both into a scratch worktree> +- Must satisfy: <issue URL, concept file, plan step, transcript segments> -1. Stated concept scope and acceptance criteria. -2. Coding standards, formatting rules, and invariant integrity. -3. Absence of unintended changes or regressions. +Do: +1. Check every claim either side relies on against the code, the sources and the transcript: is it true, tested, and consistent with the repository's rules? Cite file:line or the returned URL. +2. Decide everything the evidence settles. When in doubt, take the option best practice and experts in this area would choose, and say so. +3. For each decision give: question, options, choice, rationale, source agent-preliminary, reversal cost, affected IDs. +4. List as a toss-up only a decision whose options are genuinely balanced and whose wrong choice would be costly to reverse. Keep that list as short as possible. Never list what the transcript already states. -Return findings classified into: +Return: +Decisions: <one block per decision, fields as in step 3> +Toss-ups: <question - default to use now - alternatives - cost of reversing>, or "none" +Must fix: <file:line or quote - why - suggested fix> +Nice to have: <same> +Not checked: <what you did not verify> +``` -- **Must-Fix**: Logic bugs, broken tests, contract violations, unformatted files. -- **Nice-to-Have**: Wording improvements or minor cleanups. +For a single PR, return only "Must fix", "Nice to have" and "Not checked". diff --git a/planning/workflow/templates/prompts/zero-context-reader.md b/planning/workflow/templates/prompts/zero-context-reader.md new file mode 100644 index 0000000000..b9762d29ad --- /dev/null +++ b/planning/workflow/templates/prompts/zero-context-reader.md @@ -0,0 +1,18 @@ +# Zero-context reader prompt + +Give this to a fresh subagent before publishing any issue or dispatching a long brief, with the draft and nothing else; a harness that loads repository rules into every agent (for example `CLAUDE.md`) should not load them here. Fix every gap it reports, then publish. + +```text +You know nothing except the document below. Use no other context. You may follow the document's own links to check that they resolve and say what they claim. + +Document: +<the full draft body> + +Return: +1. Restatement: in your own words, the goal, your role, and the first three actions you would take. +2. Questions: every question you would have to ask before starting, most blocking first. +3. Unlocatable claims: claims you could not find support for in the document or its links. +4. Broken or local-only references: links that do not resolve, and paths that exist only on the author's machine without saying what they contain. +5. Risks: places where two readings are possible and would lead to different work. +Keep it short and concrete. Your value is in what is missing, not in praise. +```