discipline-md 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +80 -0
- package/bin/discipline.js +587 -0
- package/package.json +40 -0
- package/templates/.claude/settings.json +58 -0
- package/templates/AGENTS.md +463 -0
- package/templates/AGENT_TRACKER.md +138 -0
- package/templates/API_REFERENCE.md +131 -0
- package/templates/ARCHITECTURE.md +89 -0
- package/templates/ASSETS.md +90 -0
- package/templates/AUTONOMOUS_QUEUE.md +119 -0
- package/templates/BUILD_PLAN.md +89 -0
- package/templates/CHANGELOG.md +90 -0
- package/templates/CLAUDE.md +89 -0
- package/templates/CREDITS.md +109 -0
- package/templates/DATA_MODEL.md +88 -0
- package/templates/DECISIONS.md +120 -0
- package/templates/DEPLOYMENT.md +342 -0
- package/templates/HANDOFF.md +289 -0
- package/templates/IMPROVEMENT_LOOP.md +103 -0
- package/templates/INVESTIGATION.md +154 -0
- package/templates/LICENSE +68 -0
- package/templates/NOTICE +55 -0
- package/templates/OPEN_DECISIONS.md +61 -0
- package/templates/PLAYBOOK_FEEDBACK.md +87 -0
- package/templates/PROJECT_CONTEXT.md +91 -0
- package/templates/README.md +60 -0
- package/templates/ROADMAP.md +96 -0
- package/templates/SECURITY_AUDIT.md +235 -0
- package/templates/SETUP.md +162 -0
- package/templates/SPEC.md +105 -0
- package/templates/SPEC_WORKFLOW.md +173 -0
- package/templates/TODO.md +118 -0
- package/templates/USAGE.md +153 -0
- package/templates/VERIFICATION_GATE.md +68 -0
- package/templates/agents/CROSS_REPO_SYNC.md +124 -0
- package/templates/agents/DEBUGGER.md +112 -0
- package/templates/agents/PLANNER.md +111 -0
- package/templates/agents/README.md +64 -0
- package/templates/agents/RECON.md +99 -0
- package/templates/agents/SECURITY_REVIEWER.md +123 -0
- package/templates/agents/SPEC_ARCHITECT.md +133 -0
- package/templates/agents/STAKEHOLDER.md +197 -0
- package/templates/agents/_TEMPLATE.md +116 -0
- package/templates/agents/optional/ARCHITECT.md +109 -0
- package/templates/agents/optional/BACKEND_IMPACT.md +108 -0
- package/templates/agents/optional/DOC_AUDIT.md +108 -0
- package/templates/agents/optional/FRONTEND_IMPACT.md +109 -0
- package/templates/agents/optional/QUEUE_CURATOR.md +114 -0
- package/templates/agents/optional/TEST_STRATEGIST.md +107 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Spec & Design Phase
|
|
2
|
+
|
|
3
|
+
**The most expensive thing an agent builds is the wrong thing, built correctly.**
|
|
4
|
+
|
|
5
|
+
This is the phase that sits between *deciding to build* and *building*. It exists because a funded idea (or an accepted ticket, or a one-line request) is a **business case, not a buildable contract**. Hand that directly to an implementer — especially an unattended one — and it resolves every unstated decision in the most generic, usually wrong, direction. The Spec & Design phase front-loads the human judgment so the build is mechanical.
|
|
6
|
+
|
|
7
|
+
> **Front-load the judgment.** A wrong spec executed flawlessly is still wrong, and a verifier-driven build is the one thing downstream that *cannot* catch it. So the design decisions concentrate here, where a human is in the loop — not at build time, where they aren't.
|
|
8
|
+
|
|
9
|
+
This doc is harness-agnostic and **model-agnostic**: it is written to be run by a local LLM, ChatGPT/Codex, or Claude, under any of the runtime patterns in [`AGENTS.md`](AGENTS.md). Where a step benefits from a stronger model, that is a tier note (Frontier / Workhorse / Recon), never a vendor name.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Where it sits
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
Idea / request / funded pitch
|
|
17
|
+
│
|
|
18
|
+
▼
|
|
19
|
+
┌─────────────────────────── Spec & Design ───────────────────────────┐
|
|
20
|
+
│ │
|
|
21
|
+
│ Stage A — Functional Spec (plain English) ──► SPEC_APPROVED │
|
|
22
|
+
│ Stage B — Technical Plan (stack + stories) ──► BUILD_PLAN_APPROVED │
|
|
23
|
+
│ │
|
|
24
|
+
└──────────────────────────────────────────────────────────────────────┘
|
|
25
|
+
│
|
|
26
|
+
▼
|
|
27
|
+
Build (autonomous queue, parallel except serial deps)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Two stages, two gates, in order. **Neither gate is skippable and neither is inferred** — each opens only on its verbatim approval token (see Gates). The phase has an explicit predecessor gate too: in a Founder/venture flow it runs *after* `FUNDING_APPROVED`; in a plain ticket flow it runs after the work is accepted. It never runs speculatively against an unapproved idea.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## The first prompt: pick an interaction tier
|
|
35
|
+
|
|
36
|
+
The very first thing the Spec Architect does is ask the human **how much they want to be involved**. This is a dial, set once at the top of Stage A, recorded in the spec header, and overridable mid-flight ("go deeper here", "stop asking, infer the rest").
|
|
37
|
+
|
|
38
|
+
| Tier | The Architect… | Use when |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| **Express** | infers almost everything; asks only true blockers (decisions it genuinely cannot make and cannot safely default). | the build is small, conventional, or you trust the defaults and want speed. |
|
|
41
|
+
| **Guided** | asks a structured tradeoff question at each *major* decision (page grouping, key flows, the load-bearing stack picks); infers the routine. | a normal build where you want a say on the forks that matter. |
|
|
42
|
+
| **Thorough** *(default)* | Guided, plus screen-by-screen and data-model confirmation before locking. | most real products — especially anything an unattended local model will execute, where more pinned down up front means fewer wrong guesses at build time. |
|
|
43
|
+
| **Exhaustive** | confirms essentially every choice; nothing material is inferred silently. | high-stakes, novel, or compliance-sensitive work; or when you simply want to co-design every detail. |
|
|
44
|
+
|
|
45
|
+
**Default is Thorough.** The default is deliberately *not* Express: under-specification is cheap to fix in this phase (one more question) and expensive to fix at build time (a wrong artifact, possibly merged unattended). When unsure, ask one more question.
|
|
46
|
+
|
|
47
|
+
Record the chosen tier in the spec: `Interaction tier: Thorough`.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Stage A — Functional Spec (plain English)
|
|
52
|
+
|
|
53
|
+
**Posture: read-only design.** The Architect reads the codebase and context but writes only the spec — no implementation, no dependencies, no scaffolding. Express this however the harness allows: Claude Code *plan mode*, ChatGPT/Codex *plan*, or, on a bare local setup, simply the convention "this turn produces a spec, not code." The mechanism varies; the **read-only contract does not**.
|
|
54
|
+
|
|
55
|
+
**Output: `SPEC.md` — entirely plain English about the app and how it behaves.** No tech choices live here. A non-technical stakeholder must be able to read it and recognize their product. It covers:
|
|
56
|
+
|
|
57
|
+
- **Every page / screen / view** — what it is, what it's for, how the user reaches it.
|
|
58
|
+
- **Every control** — buttons, inputs, menus, tools, gestures — and what each one *does*.
|
|
59
|
+
- **Every user flow** — the paths through the product, the states a user moves between, what success looks like at each step.
|
|
60
|
+
- **The negative space** (where most spec failures hide — absences, not wrong statements):
|
|
61
|
+
- boundary behavior — empty, max, zero, overflow, malformed input;
|
|
62
|
+
- what is explicitly **out of scope** (the single highest-leverage section — it's what stops scope creep at build time);
|
|
63
|
+
- what happens when two requirements **conflict**, and which one wins;
|
|
64
|
+
- **assumptions** the spec is making (an executor resolves every unstated assumption, usually wrongly — so state them and have the human confirm).
|
|
65
|
+
|
|
66
|
+
### The spec is the verifier
|
|
67
|
+
|
|
68
|
+
Every requirement must be **checkable**. If you can't state how a requirement would be verified, it is not a requirement yet — rewrite it until it's testable, or tag it human-judgment-only. Prefer `<thing> MUST <observable, checkable condition>` over `<thing> should be clean / fast / good`.
|
|
69
|
+
|
|
70
|
+
Tag every requirement:
|
|
71
|
+
|
|
72
|
+
- **`[AUTO]`** — a machine can check it (compiles, test passes, schema matches, output round-trips, numeric tolerance met, link resolves, element present).
|
|
73
|
+
- **`[HUMAN]`** — needs human judgment; no automatic verifier exists ("the copy reads well", "the legal interpretation is sound").
|
|
74
|
+
|
|
75
|
+
More compute makes `[AUTO]` requirements bulletproof and makes `[HUMAN]` requirements only more *confident*, never more *correct*. The `[HUMAN]` list is precisely the human reviewer's worklist after the build — everything else is trusted because it passed the suite.
|
|
76
|
+
|
|
77
|
+
### Red-team before locking
|
|
78
|
+
|
|
79
|
+
Before proposing `SPEC.md` for approval, the Architect attacks its own draft and resolves or surfaces each finding — never papers over a gap with a plausible default:
|
|
80
|
+
|
|
81
|
+
1. **Ambiguities** — what can be read two ways? Quote it; give both readings.
|
|
82
|
+
2. **Gaps** — what input / state / edge case is unhandled?
|
|
83
|
+
3. **Conflicts** — which pairs of requirements can't both hold?
|
|
84
|
+
4. **Hidden assumptions** — what does the spec rely on but not state?
|
|
85
|
+
5. **Unverifiable `[AUTO]` claims** — tagged checkable but actually aren't; this is exactly where confident-wrong output hides.
|
|
86
|
+
|
|
87
|
+
For high-stakes specs this red-team pass is worth **one Frontier-tier call** — the cheapest, highest-ROI step before any expensive build. (See Tier Routing.) Findings that need a human decision go to the spec's **Open Questions**; resolved ones fold into the requirements.
|
|
88
|
+
|
|
89
|
+
**Gate 1:** the human replies with the verbatim token **`SPEC_APPROVED`**. Nothing else opens it. Stage B does not begin until it lands.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Stage B — Technical Plan ("plan mode")
|
|
94
|
+
|
|
95
|
+
Now, and only now, the design turns technical. Stage B converts the *what* (locked `SPEC.md`) into the *how*: an architecture, a stack chosen through explicit tradeoffs, and a backlog of stories ready to run unattended.
|
|
96
|
+
|
|
97
|
+
**Interactive tradeoff decisions.** This is where the human weighs the engineering forks — framework, datastore, hosting, key libraries, auth, the build-vs-buy calls. The Architect surfaces each as an **enumerated decision with options and their pros/cons**, recommends one, and lets the human pick. Express this with whatever structured-choice affordance the harness has; on a bare runtime, present it as a numbered list the human answers. The depth of this back-and-forth follows the interaction tier from Stage A.
|
|
98
|
+
|
|
99
|
+
**Outputs:**
|
|
100
|
+
|
|
101
|
+
1. **`ARCHITECTURE.md`** — the full intended build architecture **with a diagram** (Mermaid or equivalent that renders in-repo): component/module breakdown, data model, major data/control flows, external dependencies and integration points, deployment target, and the trust/operational boundaries (what holds user state, where the security surface is).
|
|
102
|
+
2. **Queue-ready stories** — the spec decomposed into implementation tasks, each one:
|
|
103
|
+
- traced to the `SPEC.md` requirement number(s) it satisfies (`satisfies: R3, R7`);
|
|
104
|
+
- carrying a stable id (`[id: S-04]`) and a dependency marker — **`[dep: none]`** (parallel-safe) or **`[dep: S-01, S-02]`** (serial; cannot start until those land);
|
|
105
|
+
- tagged with the standard autonomy/size/risk tags (see [`AGENTS.md`](AGENTS.md));
|
|
106
|
+
- carrying its own acceptance check (the `[AUTO]` test, or the `[HUMAN]` checklist line).
|
|
107
|
+
|
|
108
|
+
These land in `AUTONOMOUS_QUEUE.md` (+ `TODO.md`) **ready to run, in parallel except where a `[dep:]` marker forces serial order.** The dependency graph *is* the build schedule.
|
|
109
|
+
3. **The verifier suite** — generated from the locked spec (next section).
|
|
110
|
+
|
|
111
|
+
**Gate 2:** the human replies with the verbatim token **`BUILD_PLAN_APPROVED`**. That opens the Build phase. Until then, no implementation, no installs, no queue execution.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## The verifier suite
|
|
116
|
+
|
|
117
|
+
Generated from the locked spec, the verifier suite is what makes an **unattended** build safe — it is the ground truth a weak or unsupervised executor cannot fake. (This is the whole reason the spec discipline above insists every requirement be checkable: a vague requirement produces a vague check, which passes confidently-wrong output.)
|
|
118
|
+
|
|
119
|
+
For each `[AUTO]` requirement, emit a runnable check — unit test, schema validator, numeric-tolerance assertion, round-trip assertion, headless smoke, or shell check — that passes **iff** the requirement holds, and that references the requirement number. Plus a single **runner** that executes all checks, reports pass/fail per requirement, and exits non-zero on any failure. The build loop (sampling / best-of-N / fix-and-recheck on a local executor; or a single supervised pass) iterates until the runner is green.
|
|
120
|
+
|
|
121
|
+
For each `[HUMAN]` requirement, emit a **checklist line** naming the specific thing to confirm. That checklist plus anything the runner flagged uncertain is the human's *entire* post-build review surface — the `[AUTO]` half is trusted because it passed.
|
|
122
|
+
|
|
123
|
+
**Fallback when the stack has no natural test runner** (static content site, audio plugin, design-only asset): generate the **best-effort runner** the stack *does* support — build succeeds, schema validates, links resolve, headless smoke loads — and route everything unautomatable to the `[HUMAN]` checklist. Always emit a runner; never block on "no tests possible." Log what got pushed to the human checklist so the unattended-execution gap is visible, not silent.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Tier routing (model-agnostic)
|
|
128
|
+
|
|
129
|
+
The phase is designed to run cheap and verify hard. Route each step by tier (Frontier / Workhorse / Recon — see [`AGENTS.md`](AGENTS.md) for the cross-ecosystem mapping), not by vendor:
|
|
130
|
+
|
|
131
|
+
| Step | Tier | Why |
|
|
132
|
+
|---|---|---|
|
|
133
|
+
| Stage A — draft the functional spec | **Workhorse** (local-smart) | structured synthesis; cheap to iterate with the human. |
|
|
134
|
+
| Spec red-team pass | **Frontier** (one call) | adversarial gap-finding is the weak-model floor — weaker models soft-pedal the adversary role. Highest ROI in the whole phase. |
|
|
135
|
+
| Stage B — architecture & tradeoffs | **Workhorse**, escalate to **Frontier** for genuinely ambiguous architecture (a `DECISIONS.md`-worthy call). | most stack picks are routine; the hard fork is worth a Frontier subagent. |
|
|
136
|
+
| Generate the verifier suite | **Workhorse** | mechanical translation of `[AUTO]` requirements into checks. |
|
|
137
|
+
| Build executor (later phase) | **Recon / Workhorse** (local-fast), with sampling | runs against the verifier as ground truth; the suite, not the model, guarantees correctness. |
|
|
138
|
+
| Final `[HUMAN]`-review assist | **Frontier**, sparingly | judgment-heavy, low-volume. |
|
|
139
|
+
|
|
140
|
+
**Weak-model floor (hard rule):** the spec red-team, the verifier-coverage check, and any edit to a gate token or the queue's membership are **never run below Frontier tier unattended**. A Workhorse/Recon agent that hits one stops and surfaces it. (Mirrors the floor in `AGENTS.md`.)
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Gates (the two tokens)
|
|
145
|
+
|
|
146
|
+
Both tokens are matched **verbatim**, case-insensitively, ignoring surrounding whitespace and punctuation. Nothing else opens a gate — not paraphrase, not enthusiasm, not "looks good, ship it." If the human seems to approve but the token is absent, ask for the exact token; never infer it.
|
|
147
|
+
|
|
148
|
+
| Token | Locks | Opens |
|
|
149
|
+
|---|---|---|
|
|
150
|
+
| `SPEC_APPROVED` | the plain-English functional spec (Stage A) | Stage B |
|
|
151
|
+
| `BUILD_PLAN_APPROVED` | the technical plan + queued stories + verifier suite (Stage B) | Build |
|
|
152
|
+
|
|
153
|
+
In a Founder/venture flow these chain after the funding gate: `FUNDING_APPROVED` → `SPEC_APPROVED` → `BUILD_PLAN_APPROVED` → build. A project that wants different token spellings records that as a durable decision in `DECISIONS.md` before using them.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Phase signals
|
|
158
|
+
|
|
159
|
+
Emit a visible signal at each stage boundary so a human watching an autonomous run knows where it is:
|
|
160
|
+
|
|
161
|
+
- `Specifying...` — drafting / iterating the Stage A functional spec.
|
|
162
|
+
- `Planning...` — Stage B architecture, tradeoffs, stories, verifier suite.
|
|
163
|
+
|
|
164
|
+
(These sit alongside whatever signals the surrounding workflow already uses, e.g. a Founder's `Scouting... / Pitching... / Building...`.)
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Why this shape
|
|
169
|
+
|
|
170
|
+
- **Plain-English spec first, tech second** keeps the human's judgment on *product* (which they own) separate from *engineering* (which they may delegate), and keeps `SPEC.md` reviewable by a non-engineer.
|
|
171
|
+
- **Two gates, not one** because approving *what to build* and approving *how to build it* are different decisions, often made at different confidence levels.
|
|
172
|
+
- **Stories carry their dependency graph** so the Build phase parallelizes correctly by construction — the plan, not the executor, decides what's serial.
|
|
173
|
+
- **The verifier suite is generated from the locked spec**, not written after the code, so the tests encode the *intended* behavior, not the *implemented* behavior. A test written from the code passes by definition; a test written from the spec can fail — which is the entire point.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# TODO
|
|
2
|
+
|
|
3
|
+
<!-- HOT PATH FILE. Static sections at top (commands, reference). Volatile task list at bottom. -->
|
|
4
|
+
<!-- Keep the top stable so session-to-session prompt caching works. -->
|
|
5
|
+
|
|
6
|
+
> Two-gate rule: an `[autonomy: safe]` tag on an entry here is necessary but NOT sufficient for unattended execution. The item must ALSO be listed in `docs/AUTONOMOUS_QUEUE.md`. If it isn't in the queue, it waits for user input — no exceptions.
|
|
7
|
+
|
|
8
|
+
## Commands
|
|
9
|
+
|
|
10
|
+
Start local dev:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# command
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Run tests:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# command
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Build (if applicable):
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# command
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Deployment Notes
|
|
29
|
+
|
|
30
|
+
Stable reference for deployment-time gotchas. Detail goes in `docs/DEPLOYMENT.md`; this section is for the "must remember" bullets agents need at hand.
|
|
31
|
+
|
|
32
|
+
- Note 1.
|
|
33
|
+
- Note 2.
|
|
34
|
+
|
|
35
|
+
## Test Checklist
|
|
36
|
+
|
|
37
|
+
Pre-commit / pre-merge sanity sweep:
|
|
38
|
+
|
|
39
|
+
- [ ] Run unit tests.
|
|
40
|
+
- [ ] Run build.
|
|
41
|
+
- [ ] Smoke test key user flows.
|
|
42
|
+
- [ ] Audit docs before final response or commit: inspect `git diff -- docs`, update relevant docs, search for stale names/paths after renames or behavior changes.
|
|
43
|
+
- [ ] Keep core docs updated when behavior changes — `docs/HANDOFF.md`, `docs/CHANGELOG.md`, `docs/ROADMAP.md`, `docs/ARCHITECTURE.md`, `docs/API_REFERENCE.md`, `docs/DATA_MODEL.md` (only the ones that actually changed; don't touch unaffected docs).
|
|
44
|
+
- [ ] **Cleanup gate (mandatory)**: delete shipped TODO entries once they hit `docs/CHANGELOG.md` (TODO is a queue, not a log — no `[x] DONE` carryover); mark completed `docs/ROADMAP.md` items ✅ or move under `## Completed`; trim `docs/AUTONOMOUS_QUEUE.md` as queued items ship. See `docs/AGENTS.md` for the full mandatory cleanup gate.
|
|
45
|
+
|
|
46
|
+
## Tag Conventions
|
|
47
|
+
|
|
48
|
+
Every entry in `## Active / Next` (and any milestone subsection below) should carry a tag block. Tags drive autonomy decisions, model-tier selection, and queue triage.
|
|
49
|
+
|
|
50
|
+
**Format** (suffix on the bullet):
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
[size: XS|S|M|L|XL][risk: low|med|high][scope: isolated|cross-cutting|infra]
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Optional additional tags layer on top: `[tier: haiku|sonnet|opus]`, `[autonomy: safe|review|needs-human-collab]`. See `## Autonomy Tag Legend` below.
|
|
57
|
+
|
|
58
|
+
**Meanings:**
|
|
59
|
+
|
|
60
|
+
- `size` — `XS` = single-line tweak (under ~15 min). `S` = under an hour. `M` = a focused session. `L` = multi-session or design-required. `XL` = epic / multi-week, expect to break down.
|
|
61
|
+
- `risk` — blast radius if the change goes wrong. `low` = isolated UI tweak / dead-code removal. `med` = data-touching code, exported APIs, build config. `high` = auth, payments, schema migrations against live data, anything user-facing in production.
|
|
62
|
+
- `scope` — `isolated` = single repo, single subsystem. `cross-cutting` = touches multiple subsystems / packages within one repo. `infra` = build, CI, deploy, secrets, hosting wiring.
|
|
63
|
+
|
|
64
|
+
**Default for unmarked entries:** `[size: S][risk: low][scope: isolated]` plus `[tier: sonnet][autonomy: safe]` from the Autonomy Tag Legend. Omit tags that match the default; only call out where an entry differs.
|
|
65
|
+
|
|
66
|
+
**Examples** (shape only — fill with real entries):
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
- [ ] Reset / clear catalog action with confirmation. `[size: XS][risk: low][scope: isolated]`
|
|
70
|
+
- [ ] Library list virtualization for 1k+ rows. `[size: S][risk: low][scope: isolated]`
|
|
71
|
+
- [ ] Duplicate detection (filename/path heuristics). `[size: M][risk: med][scope: isolated]`
|
|
72
|
+
- [ ] JSON catalog import (export already shipped). `[size: S][risk: med][scope: isolated]`
|
|
73
|
+
- [ ] End-to-end test: index folder → catalog → link → export packet. `[size: M][risk: med][scope: cross-cutting]`
|
|
74
|
+
- [ ] Migrate <feature> from monolith to <package>. `[size: L][risk: high][scope: cross-cutting]`
|
|
75
|
+
- [ ] Recruit external validators. `[size: M][risk: med][scope: isolated][autonomy: human-only]`
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Autonomy Tag Legend
|
|
79
|
+
|
|
80
|
+
Tag scheme defined in `docs/AGENTS.md`. Default for an unmarked entry is `[size: S][tier: sonnet][risk: low][scope: isolated][autonomy: safe]`; only call out tags that differ.
|
|
81
|
+
|
|
82
|
+
- `[size: XS|S|M|L|XL]` — see Tag Conventions above.
|
|
83
|
+
- `[tier: haiku|sonnet|opus]` — model tier that should drive implementation. (Or use the model-agnostic `recon|workhorse|frontier` if the project doesn't run on Claude.)
|
|
84
|
+
- `[risk: low|med|high]` — blast radius if the change goes wrong.
|
|
85
|
+
- `[scope: isolated|cross-cutting|infra]` — see Tag Conventions above.
|
|
86
|
+
- `[autonomy: safe|review|needs-human-collab]` — `safe` = autonomous host may pick up; `review` = autonomous host may implement but must open a draft PR; `needs-human-collab` = MUST NOT start without explicit user approval.
|
|
87
|
+
|
|
88
|
+
## Backup / Mirror Hygiene
|
|
89
|
+
|
|
90
|
+
Standing reference checklist — these are RECURRING items, not one-off tasks. Do not delete on completion; instead, note the most recent verification date inline. See `docs/HANDOFF.md` "Remotes & Backup" section (or equivalent) for the project-specific context.
|
|
91
|
+
|
|
92
|
+
- **Annual SSH key rotation.** `~/.ssh/<key>` is the auth credential for all remotes (GitHub + any mirrors: GitLab, NAS, etc.). Rotate yearly. After rotation: re-register with GitHub via `gh auth refresh`, GitLab via web console or `glab ssh-key add`, and any self-hosted mirror's `authorized_keys` for each user account. Last rotated: `<YYYY-MM-DD>`.
|
|
93
|
+
- **Pre-commit gitleaks hook.** Install gitleaks as a pre-commit hook so accidental secrets get caught before any push (especially before fan-out to multiple mirrors). Respect `.gitleaksignore` where present. Verified installed: `<YYYY-MM-DD>`.
|
|
94
|
+
- **GitHub push protection enabled.** In repo settings on github.com, "Secret scanning push protection" must be ON so even a typo cannot accidentally push a real credential. Verified enabled: `<YYYY-MM-DD>`.
|
|
95
|
+
- **Secret scanning enabled.** GitHub repository-level secret scanning (passive scanner over history) must be ON in addition to push protection. Verified enabled: `<YYYY-MM-DD>`.
|
|
96
|
+
- **Fan-out verification.** Run `git push origin --dry-run` from each repo to confirm pushurls still resolve (catches hostname changes, key revocation, mirror outage) before the next real push needs them. Last verified: `<YYYY-MM-DD>`.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Current Context
|
|
101
|
+
|
|
102
|
+
*A few bullets covering where the session is picking up. Examples of useful content:*
|
|
103
|
+
|
|
104
|
+
- *Where production / local-dev state lives, and how to reset.*
|
|
105
|
+
- *In-flight feature branches and their status.*
|
|
106
|
+
- *Decisions that were made recently but haven't fully propagated.*
|
|
107
|
+
- *Things deferred to a later session and why.*
|
|
108
|
+
|
|
109
|
+
(Single bullet is fine for small projects; expand as the project grows.)
|
|
110
|
+
|
|
111
|
+
## Active / Next
|
|
112
|
+
|
|
113
|
+
- [ ] Task. `[size: S][risk: low][scope: isolated]`
|
|
114
|
+
- [ ] Task. `[size: S][risk: low][scope: isolated]`
|
|
115
|
+
|
|
116
|
+
## Blockers (delete this section if empty)
|
|
117
|
+
|
|
118
|
+
- Blocker or dependency.
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
TEMPLATE: USAGE.md (Tier D — user-facing controls + Consumer Contract)
|
|
3
|
+
|
|
4
|
+
WHEN TO USE:
|
|
5
|
+
- For end-user-facing tools (CLIs, browser-loaded HTML widgets, libraries
|
|
6
|
+
with a UI surface) where someone OTHER than a developer will operate
|
|
7
|
+
the thing. Distinct from README.md (install/intro) and ARCHITECTURE.md
|
|
8
|
+
(internals).
|
|
9
|
+
- For projects that emit OUTPUT consumed by sibling repos or downstream
|
|
10
|
+
tools — the Consumer Contract section is the load-bearing part there.
|
|
11
|
+
- When the controls / settings reference exceeds what fits comfortably
|
|
12
|
+
in README.md and warrants its own page.
|
|
13
|
+
|
|
14
|
+
HOW TO USE:
|
|
15
|
+
1. Copy this file into the project's `docs/` directory as `USAGE.md`.
|
|
16
|
+
2. Replace every <placeholder> with project-specific content.
|
|
17
|
+
3. Drop sections that don't apply (e.g. if there's no downstream consumer,
|
|
18
|
+
skip the Consumer Contract — but think twice; many projects have an
|
|
19
|
+
implicit consumer they should make explicit).
|
|
20
|
+
4. Treat the Consumer Contract as a CONTRACT — every breaking change to
|
|
21
|
+
items listed there is a major-version event and warrants a CHANGELOG.md
|
|
22
|
+
call-out plus, if reasonable, advance notice to the consumer repos.
|
|
23
|
+
|
|
24
|
+
WHERE THIS LIVES IN THE DOC SET:
|
|
25
|
+
- README.md — install, what-it-is, one-screen demo. The lobby.
|
|
26
|
+
- USAGE.md — controls, settings, output formats, consumer contract.
|
|
27
|
+
- ARCHITECTURE.md — internals, modules, why the design is what it is.
|
|
28
|
+
- DECISIONS.md — locked-in choices and their rationale.
|
|
29
|
+
|
|
30
|
+
A reader who wants to USE the tool reads README + USAGE.
|
|
31
|
+
A reader who wants to MAINTAIN the tool reads ARCHITECTURE + DECISIONS.
|
|
32
|
+
-->
|
|
33
|
+
|
|
34
|
+
# Usage — <project-name>
|
|
35
|
+
|
|
36
|
+
## Quick Start
|
|
37
|
+
|
|
38
|
+
<the shortest possible "how do I get this thing running" sequence. Three to
|
|
39
|
+
six lines. Assume the reader has read README.md's "what is this" but nothing
|
|
40
|
+
deeper. Examples:>
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
<install or open command>
|
|
44
|
+
<run command>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
<one paragraph on what they should see after the run completes — the smoke
|
|
48
|
+
test that confirms it's working.>
|
|
49
|
+
|
|
50
|
+
## Controls / Settings
|
|
51
|
+
|
|
52
|
+
<one paragraph framing: where the controls live (panel, CLI flags, config
|
|
53
|
+
file, env vars), and the design principle behind them — e.g. "All controls
|
|
54
|
+
live in the panel below the canvas. No hidden tabs.">
|
|
55
|
+
|
|
56
|
+
### <Control-1 name> — <type, e.g. dropdown | slider | flag | env var>
|
|
57
|
+
|
|
58
|
+
<one paragraph: what it does, default value, value range or enum, when you'd
|
|
59
|
+
change it.>
|
|
60
|
+
|
|
61
|
+
- **<sub-option-1>** <— what this enum value means>
|
|
62
|
+
- **<sub-option-2>** <— what this enum value means>
|
|
63
|
+
|
|
64
|
+
### <Control-2 name> — <type>
|
|
65
|
+
|
|
66
|
+
<…>
|
|
67
|
+
|
|
68
|
+
### <Control-3 name> (<range>, default <default>)
|
|
69
|
+
|
|
70
|
+
<…>
|
|
71
|
+
|
|
72
|
+
> Alternative: if the control set is large and homogeneous (e.g. 20+ CLI
|
|
73
|
+
> flags), use a table:
|
|
74
|
+
|
|
75
|
+
| Control | Type | Default | Range / Values | What it does |
|
|
76
|
+
| ------------- | --------- | ------------- | ----------------- | ------------------------------------ |
|
|
77
|
+
| <name> | <slider> | <5> | <1–10> | <one-line summary> |
|
|
78
|
+
| <name> | <flag> | <off> | <on/off> | <one-line summary> |
|
|
79
|
+
| <name> | <enum> | <"default"> | <a | b | c> | <one-line summary> |
|
|
80
|
+
|
|
81
|
+
## Output Formats
|
|
82
|
+
|
|
83
|
+
<if the tool emits files / data, document each format here. Skip the section
|
|
84
|
+
entirely if the tool produces no persistent output.>
|
|
85
|
+
|
|
86
|
+
### <Format-1, e.g. JS array, JSON, PNG, ASCII>
|
|
87
|
+
|
|
88
|
+
<one paragraph: where it gets emitted, when, what's in it. If the format is
|
|
89
|
+
load-bearing for a downstream tool, note that and link to the Consumer
|
|
90
|
+
Contract section below.>
|
|
91
|
+
|
|
92
|
+
```<lang>
|
|
93
|
+
<minimal example showing the shape>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
- <field-1 explanation>
|
|
97
|
+
- <field-2 explanation>
|
|
98
|
+
- <indexing convention, axis ordering, units>
|
|
99
|
+
- <invariants the consumer can rely on>
|
|
100
|
+
|
|
101
|
+
### <Format-2>
|
|
102
|
+
|
|
103
|
+
<…>
|
|
104
|
+
|
|
105
|
+
## Consumer Contract
|
|
106
|
+
|
|
107
|
+
> The shape this project emits that downstream tools / sibling repos can rely
|
|
108
|
+
> on. **This section is the contract.** Items listed here are stable across
|
|
109
|
+
> patch and minor releases; breaking changes are major-version events.
|
|
110
|
+
|
|
111
|
+
Downstream consumers — primarily <consumer-repo-1>, <consumer-repo-2> — depend
|
|
112
|
+
on the shape below. Breaking changes here silently break the consumer; the
|
|
113
|
+
breaking-change warranty section spells out what counts as breaking.
|
|
114
|
+
|
|
115
|
+
### Stable shape
|
|
116
|
+
|
|
117
|
+
- **<contract-item-1>:** <description of the invariant. Example: "Array shape: `MAZE[y][x]`, where `y` is the row (top→bottom) and `x` is the column (left→right).">
|
|
118
|
+
- **<contract-item-2>:** <e.g. "Cell values: `1` = wall, `0` = open. No other values.">
|
|
119
|
+
- **<contract-item-3>:** <e.g. "Outer ring: always walls.">
|
|
120
|
+
- **<contract-item-4>:** <e.g. "Determinism: the same seed string produces the same output on the same algorithm version.">
|
|
121
|
+
- **<contract-item-…>:**
|
|
122
|
+
|
|
123
|
+
### Breaking-change warranty
|
|
124
|
+
|
|
125
|
+
A change to any of the following is a **major-version event** (bump the major
|
|
126
|
+
version, announce in CHANGELOG.md, give downstream consumers advance notice
|
|
127
|
+
where reasonable):
|
|
128
|
+
|
|
129
|
+
- Removing or renaming a field listed under "Stable shape" above.
|
|
130
|
+
- Changing the type or value range of any documented field.
|
|
131
|
+
- Changing axis ordering, indexing convention (0-based vs 1-based), or units.
|
|
132
|
+
- Changing the meaning of an enum value (e.g. swapping `1` and `0` in a wall/open grid).
|
|
133
|
+
- Removing a documented output format entirely.
|
|
134
|
+
- Changing the determinism guarantee (e.g. switching the PRNG so the same seed produces a different output).
|
|
135
|
+
|
|
136
|
+
A change that is **not** breaking, and may ship in a minor or patch release:
|
|
137
|
+
|
|
138
|
+
- Adding a new field that consumers can ignore.
|
|
139
|
+
- Adding a new output format alongside existing ones.
|
|
140
|
+
- Improving accuracy or performance without changing the documented shape.
|
|
141
|
+
- Documentation clarifications.
|
|
142
|
+
|
|
143
|
+
If a consumer needs richer information than the contract above provides,
|
|
144
|
+
expose new fields or formats rather than repurposing the existing shape.
|
|
145
|
+
|
|
146
|
+
## Tips
|
|
147
|
+
|
|
148
|
+
<short, opinionated, hard-won advice — the things you wish someone had told
|
|
149
|
+
you the first day. Bulleted, one-liners.>
|
|
150
|
+
|
|
151
|
+
- <tip 1>
|
|
152
|
+
- <tip 2>
|
|
153
|
+
- <tip 3>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Discipline optional template. Install with: npx discipline-md add VERIFICATION_GATE
|
|
3
|
+
The ground-truth signal the Improvement Loop is built on (see IMPROVEMENT_LOOP.md).
|
|
4
|
+
Fill the <placeholders> with THIS project's real, runnable commands.
|
|
5
|
+
COLD-PATH doc — read it when verifying work or running the loop.
|
|
6
|
+
-->
|
|
7
|
+
|
|
8
|
+
# Verification Gate
|
|
9
|
+
|
|
10
|
+
The machine-checkable signal that proves a change is **actually** good — not "looks done." Every autonomous iteration must pass this gate before it counts as done. The gate is the single thing that keeps an AI improvement loop honest: it catches the agents' own mistakes (a fix that breaks a test, a "done" that doesn't compile, a change that regresses behavior) that review alone misses.
|
|
11
|
+
|
|
12
|
+
**Rule:** no `TODO`/`AUTONOMOUS_QUEUE` item is done until the gate passes. On failure, loop-fix and re-run — do not mark done, do not commit, do not advance the loop. An agent's "done" is intent; the gate is proof.
|
|
13
|
+
|
|
14
|
+
## The signal for this project
|
|
15
|
+
|
|
16
|
+
Concrete, runnable, deterministic. Fill these in — vague gates ("looks right") are not gates.
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Build / typecheck — must exit 0
|
|
20
|
+
<e.g. pnpm run build | cmake --build build --target <target>>
|
|
21
|
+
|
|
22
|
+
# Tests — must report 0 failures
|
|
23
|
+
<e.g. pnpm test | ./run-tests | pytest -q>
|
|
24
|
+
|
|
25
|
+
# Smoke / reproduction — the change must actually run / the bug must actually be gone
|
|
26
|
+
<e.g. launch the app and assert <observable> | the failing repro now passes>
|
|
27
|
+
|
|
28
|
+
# Lint / format (optional, but cheap)
|
|
29
|
+
<e.g. pnpm run lint>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Expected pass criteria:** <state the exact success condition, e.g. "build exit 0; N/N tests pass; standalone launches and closes < 2s; no new lint errors">.
|
|
33
|
+
|
|
34
|
+
## Gate layers (use the strongest ones available)
|
|
35
|
+
|
|
36
|
+
Prefer signals closest to real behavior — they're hardest to game:
|
|
37
|
+
|
|
38
|
+
1. **Compile / typecheck** — catches the "doesn't build" class outright.
|
|
39
|
+
2. **Tests** — unit + integration. A change that needs a test deleted/weakened to pass is a red flag, not a pass.
|
|
40
|
+
3. **Reproduction harness** — for a bug fix, the strongest gate is *the bug actually reproduced before and is gone after*. Build the repro; it's the highest-leverage thing here.
|
|
41
|
+
4. **Eval suite / golden set** — for behavior/quality changes a binary build can't judge: a labeled set + a metric computed without a human.
|
|
42
|
+
5. **Adversarial review** — only where 1–4 can't reach. A SEPARATE reviewer (never the author) prompted to *refute*, multi-lens, confidence vote. Subjective sign-off by the author is not a gate.
|
|
43
|
+
|
|
44
|
+
## Anti-gaming rules
|
|
45
|
+
|
|
46
|
+
- Gate on **behavior / reproduction**, not self-report. "The agent said it's fixed" is not a signal.
|
|
47
|
+
- A fix that **disables, weakens, or deletes a test/assertion** to go green is presumed a regression — require justification and a separate adversary's confirmation.
|
|
48
|
+
- **No silent gate-narrowing.** If coverage is reduced (skipped suite, sampled inputs, `--no-verify`), it must be LOGGED. A quietly narrowed gate reads as "passing" when it isn't.
|
|
49
|
+
- If a step has **no possible automated gate**, it is **judgment, not execution** — route it to `OPEN_DECISIONS.md`; do not let the loop "verify" it by vibes.
|
|
50
|
+
|
|
51
|
+
## Wiring to the harness
|
|
52
|
+
|
|
53
|
+
- **Required step:** the Improvement Loop's GATE stage runs these commands and reads the result.
|
|
54
|
+
- **Optional enforcement (Claude Code):** a Stop / pre-commit hook in `.claude/settings.json` that runs the gate and blocks completion on failure — so it can't be skipped. See `HARNESS_INTEGRATION.md`.
|
|
55
|
+
- Keep the gate **fast**: if it takes too long, agents (and humans) skip it. Split a slow full-suite gate into a fast per-change gate + a slower nightly gate.
|
|
56
|
+
|
|
57
|
+
## Maintenance (anti-rot)
|
|
58
|
+
|
|
59
|
+
- The gate must track the project. A test that's been skipped for months, a build target that no longer exists, or a repro that no longer reproduces is a **broken gate** — fix it before trusting the loop, or the loop verifies against nothing.
|
|
60
|
+
- When the project's build/test commands change, update this file in the same commit (doc-sync rule).
|
|
61
|
+
|
|
62
|
+
## Inputs
|
|
63
|
+
|
|
64
|
+
- This project's build/test/run tooling.
|
|
65
|
+
|
|
66
|
+
## Outputs
|
|
67
|
+
|
|
68
|
+
- A pass/fail signal consumed by the Improvement Loop GATE stage; a logged record of any deliberately narrowed coverage.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Cross-Repo Sync Agent Work Contract
|
|
2
|
+
|
|
3
|
+
Coordinates documentation and contract changes across sibling repos. Used when a change in one project needs mirrored updates in another (shared playbook, sibling docs, framework template, downstream consumer).
|
|
4
|
+
|
|
5
|
+
## Role Summary
|
|
6
|
+
|
|
7
|
+
- **Name:** `CROSS_REPO_SYNC`
|
|
8
|
+
- **Tier:** Workhorse. Escalate to Frontier when the sync touches architecture or security contracts. See `docs/AGENTS.md`.
|
|
9
|
+
- **Mode:** Multi-repo diff planning.
|
|
10
|
+
- **Stakeholder model:** Reports to the calling host. Each repo's stakeholder retains final approval for changes inside their repo.
|
|
11
|
+
|
|
12
|
+
## Authority Boundary
|
|
13
|
+
|
|
14
|
+
CROSS_REPO_SYNC MAY:
|
|
15
|
+
|
|
16
|
+
- Read any sibling repo the host has authorized for the sync.
|
|
17
|
+
- Produce a per-repo diff plan: which files change, what the change is, and why.
|
|
18
|
+
- Recommend ordering (which repo lands first, which depend on which).
|
|
19
|
+
|
|
20
|
+
CROSS_REPO_SYNC MUST NOT:
|
|
21
|
+
|
|
22
|
+
- Apply changes to any repo without explicit per-repo approval.
|
|
23
|
+
- Cross repo boundaries that the host hasn't authorized.
|
|
24
|
+
- Promote a change from a project to the framework template without `PROMOTE_TO_FRAMEWORK_APPROVED`.
|
|
25
|
+
- Touch a sibling repo's `docs/DECISIONS.md` without that repo's `ARCHITECT` lead-in.
|
|
26
|
+
|
|
27
|
+
## Responsibilities
|
|
28
|
+
|
|
29
|
+
1. Identify sibling repos affected by a given change.
|
|
30
|
+
2. Produce a per-repo diff plan with rationale and ordering.
|
|
31
|
+
3. Identify version-skew risk and recommend a rollout sequence.
|
|
32
|
+
4. Flag changes that should promote to the framework's canonical templates rather than living in one project.
|
|
33
|
+
|
|
34
|
+
## Workflow Phases
|
|
35
|
+
|
|
36
|
+
### Phase 1: Map
|
|
37
|
+
|
|
38
|
+
Identify the change and the candidate sibling repos. Read each repo's relevant files to confirm whether they are actually affected.
|
|
39
|
+
|
|
40
|
+
### Phase 2: Plan
|
|
41
|
+
|
|
42
|
+
Produce a per-repo diff plan. For each repo: files affected, proposed change, rationale, dependencies on other repo changes.
|
|
43
|
+
|
|
44
|
+
### Phase 3: Sequence
|
|
45
|
+
|
|
46
|
+
Order the rollout to minimize the window where repos disagree. Mark which steps require approval gates.
|
|
47
|
+
|
|
48
|
+
### Phase 4: Handoff
|
|
49
|
+
|
|
50
|
+
Return the plan to the host. Host (or per-repo agents) executes inside each repo.
|
|
51
|
+
|
|
52
|
+
## Cross-Product Harvest
|
|
53
|
+
|
|
54
|
+
The per-change flow above is reactive — it fires when someone has a change to propagate. The harvest is proactive: it mines the fleet for patterns worth promoting *to the framework*, so the framework improves from evidence rather than one repo's hunch.
|
|
55
|
+
|
|
56
|
+
On a set cadence, or once ≥3 sibling products exist:
|
|
57
|
+
|
|
58
|
+
1. **Collect.** Read each sibling product's `docs/PLAYBOOK_FEEDBACK.md` "Applied (recent)" entries and `docs/AGENT_TRACKER.md` status tables. Read-only — this role never edits sibling repos without per-repo approval.
|
|
59
|
+
2. **Cluster.** Group by the underlying friction, not the wording. "The cleanup gate cost more than it saved on a tiny repo" and "I deleted the gate section because it never fired here" are the same signal.
|
|
60
|
+
3. **Threshold.** A friction that appears independently in **≥2–3 products** is a framework candidate. A friction in one product stays project-local (that is what PLAYBOOK_FEEDBACK Local Improvements is for).
|
|
61
|
+
4. **Promote or prune.** Recommend either promoting the pattern to `the framework's canonical templates/` (needs `PROMOTE_TO_FRAMEWORK_APPROVED`) or — just as valid — *retiring* a framework default that multiple products keep deleting or working around. The harvest can shrink the framework, not only grow it.
|
|
62
|
+
|
|
63
|
+
The harvest produces a recommendation list, never a direct framework edit. Promotion still goes through the gate below.
|
|
64
|
+
|
|
65
|
+
## Drift And Re-Pitch Rules
|
|
66
|
+
|
|
67
|
+
Stop and re-pitch when:
|
|
68
|
+
|
|
69
|
+
- The sync would require a change to the framework template — promote via `PROMOTE_TO_FRAMEWORK_APPROVED`.
|
|
70
|
+
- Two repos have contradictory contracts and the resolution requires stakeholder judgment.
|
|
71
|
+
- The sync window is large enough that staggered deploys would break consumers.
|
|
72
|
+
|
|
73
|
+
## Content-Safety Rules
|
|
74
|
+
|
|
75
|
+
- Per-project content-safety rules are not transitive. Do not apply repo A's content rules to repo B without explicit confirmation.
|
|
76
|
+
- Trademark and naming claims must be checked per-repo (see project-level naming check).
|
|
77
|
+
|
|
78
|
+
## Cleanup Gate
|
|
79
|
+
|
|
80
|
+
- Per-repo plan is written down.
|
|
81
|
+
- Rollout order and approval gates are explicit.
|
|
82
|
+
- Promotion-to-framework candidates are flagged separately.
|
|
83
|
+
|
|
84
|
+
## Approval Signals
|
|
85
|
+
|
|
86
|
+
- `SYNC_PLAN_APPROVED` — host authorizes per-repo execution of the plan.
|
|
87
|
+
- `PROMOTE_TO_FRAMEWORK_APPROVED` — host authorizes promoting a change to `the framework's canonical templates/`.
|
|
88
|
+
- `HARVEST_APPROVED` — host authorizes a cross-product harvest pass (read sibling products' PLAYBOOK_FEEDBACK + AGENT_TRACKER logs to mine promotion / retirement candidates).
|
|
89
|
+
|
|
90
|
+
## Stop Conditions
|
|
91
|
+
|
|
92
|
+
Hand back when:
|
|
93
|
+
|
|
94
|
+
- A repo not in the original scope appears affected.
|
|
95
|
+
- The sync surfaces a contract conflict that requires stakeholder judgment.
|
|
96
|
+
- A sibling repo's funded spec would change as a result.
|
|
97
|
+
|
|
98
|
+
## Inputs
|
|
99
|
+
|
|
100
|
+
- The originating change (commit, PR, decision).
|
|
101
|
+
- List of candidate sibling repos.
|
|
102
|
+
- Optional: framework template path.
|
|
103
|
+
|
|
104
|
+
Read exactly the inputs above plus any files the spawn prompt names. Do not browse other docs on your own initiative.
|
|
105
|
+
|
|
106
|
+
## Outputs
|
|
107
|
+
|
|
108
|
+
- Per-repo diff plan with rationale and ordering.
|
|
109
|
+
- Promotion-to-framework recommendations, if any.
|
|
110
|
+
|
|
111
|
+
## Worked Example
|
|
112
|
+
|
|
113
|
+
**Input:** "Repo `appA` gains a new sibling `toolkit` — sync the Related Repos sections."
|
|
114
|
+
|
|
115
|
+
**Good output:**
|
|
116
|
+
|
|
117
|
+
- `appA/docs/HANDOFF.md:21` — add `toolkit` bullet under Related Repos (forward link): purpose, dependency direction, integration path.
|
|
118
|
+
- `toolkit/docs/HANDOFF.md:18` — add the back-link bullet to `appA` (cross-link invariant: a missing back-link means the next agent reading `toolkit` will not know `appA` exists).
|
|
119
|
+
- Ordering: land both in the same change set; no inter-repo dependency.
|
|
120
|
+
- Promotion-to-framework candidates: none.
|
|
121
|
+
|
|
122
|
+
**Not this:** "Added `toolkit` to appA's Related Repos. Done — toolkit's own docs can be updated later if someone needs it."
|
|
123
|
+
|
|
124
|
+
*Why it fails:* forward link updated but the sibling back-link forgotten — the cross-link invariant treats the sibling sync as part of the same task, not follow-up work.
|