task-pipeline-skill 1.7.1 → 1.8.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.
Files changed (28) hide show
  1. package/CHANGELOG.md +130 -0
  2. package/README.md +28 -0
  3. package/package.json +1 -1
  4. package/plugins/task-pipeline/.claude-plugin/plugin.json +1 -1
  5. package/plugins/task-pipeline/skills/task-pipeline/SKILL.md +1 -1
  6. package/plugins/task-pipeline/skills/task-pipeline/pipeline.example.json +1 -1
  7. package/plugins/task-pipeline/skills/task-pipeline/references/acceptance.md +26 -2
  8. package/plugins/task-pipeline/skills/task-pipeline/references/artifacts.md +6 -0
  9. package/plugins/task-pipeline/skills/task-pipeline/references/audit.md +11 -0
  10. package/plugins/task-pipeline/skills/task-pipeline/references/brainstorm.md +24 -0
  11. package/plugins/task-pipeline/skills/task-pipeline/references/build.md +44 -1
  12. package/plugins/task-pipeline/skills/task-pipeline/references/companion-skills.md +10 -1
  13. package/plugins/task-pipeline/skills/task-pipeline/references/decomposition.md +9 -0
  14. package/plugins/task-pipeline/skills/task-pipeline/references/documentation.md +20 -2
  15. package/plugins/task-pipeline/skills/task-pipeline/references/gates.md +14 -0
  16. package/plugins/task-pipeline/skills/task-pipeline/references/grill.md +11 -0
  17. package/plugins/task-pipeline/skills/task-pipeline/references/hooks.md +75 -10
  18. package/plugins/task-pipeline/skills/task-pipeline/references/knowledge-graph.md +8 -0
  19. package/plugins/task-pipeline/skills/task-pipeline/references/knowledge-sources.md +13 -0
  20. package/plugins/task-pipeline/skills/task-pipeline/references/learned.md +8 -0
  21. package/plugins/task-pipeline/skills/task-pipeline/references/loop-guard.md +8 -0
  22. package/plugins/task-pipeline/skills/task-pipeline/references/planning.md +25 -0
  23. package/plugins/task-pipeline/skills/task-pipeline/references/retrospective.md +11 -0
  24. package/plugins/task-pipeline/skills/task-pipeline/references/review.md +17 -0
  25. package/plugins/task-pipeline/skills/task-pipeline/references/spec.md +22 -0
  26. package/plugins/task-pipeline/skills/task-pipeline/references/stages.md +61 -5
  27. package/plugins/task-pipeline/skills/task-pipeline/references/tdd.md +10 -0
  28. package/plugins/task-pipeline/skills/task-pipeline/templates/docgate.sh +194 -99
@@ -4,6 +4,22 @@
4
4
  have.** A hook is rung 5 of [`gates.md`](gates.md)'s ladder — the only mechanism
5
5
  that acts *while the agent is working* rather than after the commit.
6
6
 
7
+ ## Contents
8
+
9
+ - The limit, before the capability
10
+ - The events
11
+ - The `PreToolUse` contract
12
+ - What the hook receives
13
+ - Where it lives
14
+ - Matchers
15
+ - Performance
16
+ - What belongs in a hook, and what does not
17
+ - A worked example
18
+ - Debugging
19
+ - Removing them
20
+ - Leases are not reimplemented here
21
+ - Rationalizations
22
+
7
23
  ## The limit, before the capability
8
24
 
9
25
  **Hooks exist only in Claude Code.** On Cursor, Codex and the other agents a skill
@@ -16,13 +32,29 @@ The gap between "the rule exists" and "the rule is enforced" is invisible from
16
32
  inside a transcript, and a false guarantee is worse than a stated absence: everyone
17
33
  downstream stops checking.
18
34
 
35
+ > **Provenance.** Every contract below is quoted from the Claude Code hooks
36
+ > reference (`code.claude.com/docs/en/hooks`), fetched **2026-08-03**. Re-fetch
37
+ > before relying on it: this is an external API, and stage 1 of this very pipeline
38
+ > exists because a contract recalled from memory is a contract that has already
39
+ > moved. Where the reference and this file disagree, the reference wins and this
40
+ > file is the bug.
41
+
19
42
  ## The events
20
43
 
44
+ There are **35** hook events. These are the ones this pipeline reaches for; the
45
+ reference has the rest, grouped as session lifecycle, per-turn, tool execution,
46
+ subagents and tasks, file and config changes, compaction, worktrees, display, and
47
+ MCP elicitation.
48
+
21
49
  | Event | Fires | Used for |
22
50
  |---|---|---|
23
51
  | `SessionStart` | session opens (matcher `startup\|resume`) | register the run, print the board, name the one next action |
24
- | `PreToolUse` | before a tool call | **block** — the only event that can refuse |
25
- | `PostToolUse` | after every tool call | bookkeeping: renew a lease, stamp a marker |
52
+ | `PreToolUse` | before a tool call | **block** — the event that can refuse |
53
+ | `PostToolUse` | after a tool call | bookkeeping: renew a lease, stamp a marker |
54
+ | `Stop` | the turn ends | a last-word check — the run's own gate, not the repo's |
55
+ | `SubagentStart` · `SubagentStop` | a subagent starts or finishes | stage 5 runs implementers as subagents; this is where a per-agent identity or ledger line belongs |
56
+ | `WorktreeCreate` · `WorktreeRemove` | a worktree appears or goes | stage 5 isolates in worktrees; a guard that must not fire inside one can key off these |
57
+ | `PreCompact` · `PostCompact` | context is compacted | flush anything that only lives in context — the ledger exists because this happens |
26
58
  | `SessionEnd` | session closes | release leases, flush the journal |
27
59
 
28
60
  ## The `PreToolUse` contract
@@ -38,22 +70,44 @@ A hook blocks a call in **either** of two ways:
38
70
  "permissionDecisionReason":"docs gate failed: 2 undefined ids in docs/ARCHITECTURE.md"}}
39
71
  ```
40
72
 
73
+ `permissionDecision` takes **four** values, not one: `allow` (permit it), `deny`
74
+ (block it), `ask` (escalate to the user), `defer` (fall through to the normal
75
+ permission flow). Exit 0 with empty stdout means `defer` by omission. A hook may
76
+ also rewrite the call instead of judging it, by returning `updatedInput` in the
77
+ same block — which is a different power from blocking and worth knowing before you
78
+ reach for it.
79
+
41
80
  **Any other exit code is a non-blocking error**: execution continues and stderr is
42
- shown in the transcript. So **a crashing guard fails open** it stops guarding and
43
- nothing announces that it has. Write the guard to `exit 2` on its own internal
44
- errors, or accept that a typo in it silently removes the protection everyone
45
- believes is there.
81
+ shown in the transcript. The reference is explicit that **exit 1 is treated as
82
+ non-blocking, "even though 1 is the conventional Unix failure code"** so the
83
+ single most likely way to write a guard, `command || exit 1`, is the one that does
84
+ not guard. And on exit 2 Claude Code **ignores stdout and any JSON in it**; only
85
+ stderr is read back.
86
+
87
+ So **a crashing guard fails open** — it stops guarding and nothing announces that
88
+ it has. Write the guard to `exit 2` on its own internal errors, or accept that a
89
+ typo in it silently removes the protection everyone believes is there.
46
90
 
47
91
  That asymmetry is the whole reason this file leads with the limit: a hook is the
48
92
  strongest rung and the one whose failure is quietest.
49
93
 
50
94
  ## What the hook receives
51
95
 
52
- JSON on stdin: `session_id`, `prompt_id`, `transcript_path`, `cwd`,
53
- `permission_mode`, `hook_event_name`, `tool_name`, `tool_input`, `tool_use_id`.
96
+ JSON on stdin. Common to every event: `session_id`, `transcript_path`, `cwd`,
97
+ `permission_mode` (`default` · `plan` · `acceptEdits` · `auto` · `dontAsk` ·
98
+ `bypassPermissions`), `effort` (an object with `level`), `hook_event_name`, and —
99
+ inside a subagent — `agent_id` and `agent_type`. `prompt_id` is present from a
100
+ recent version onward, so treat it as optional unless you pin one.
101
+
102
+ Tool events add `tool_name`, `tool_input` and `tool_use_id`. **`tool_input` is
103
+ where the target lives** — `file_path` for an edit, `command` for a Bash call.
104
+ Parse it; do not infer the target from anything else in the environment
105
+ ([`learned.md`](learned.md) rule 15: a heuristic over strings the environment also
106
+ produces matched the throwaway shell of every tool call).
54
107
 
55
- `tool_input` is where the target lives `file_path` for an edit, `command` for a
56
- Bash call. Parse it; do not infer the target from anything else in the environment.
108
+ `agent_id` matters more here than it looks: stage 5 runs implementers as subagents
109
+ in worktrees, and a guard that must behave differently for the orchestrator and for
110
+ an implementer has exactly one honest way to tell them apart.
57
111
 
58
112
  ## Where it lives
59
113
 
@@ -77,6 +131,17 @@ machine, and the first surprising denial is debugged in the wrong project.
77
131
  - for a specific shell command, add `"if": "Bash(git commit *)"` beside
78
132
  `"matcher": "Bash"`.
79
133
 
134
+ `if` uses **permission-rule syntax** (`Bash(git *)`, `Edit(*.ts)`) and is evaluated
135
+ **only on tool events** — `PreToolUse`, `PostToolUse`, `PostToolUseFailure`,
136
+ `PermissionRequest`, `PermissionDenied`. Anywhere else it is inert, which is a
137
+ silent way to write a guard that never fires.
138
+
139
+ **For Bash the match is best-effort — the reference's own word.** It inspects
140
+ subcommands, `$()` expansions and backticks, and strips leading `FOO=bar`
141
+ assignments before matching. So `if` is a good **filter** and a bad **boundary**:
142
+ narrow with it to keep the hook cheap, then re-check the real target inside the
143
+ script before refusing anything.
144
+
80
145
  Match as **narrowly** as the rule allows. A `"*"` matcher on a blocking event puts
81
146
  your script in the path of every tool call the agent makes.
82
147
 
@@ -15,6 +15,14 @@ It is **recommended, never required**. No stage blocks on a missing graph; the
15
15
  harvest simply runs on the sources it has
16
16
  ([`knowledge-sources.md`](knowledge-sources.md)).
17
17
 
18
+ ## Contents
19
+
20
+ - Detect it, and install it once
21
+ - Stage 0 — query the graph before you ask the person
22
+ - Stage 9 — the close-out has three artifacts, not two
23
+ - The divergence check — the graph against the docs
24
+ - Rationalizations
25
+
18
26
  ## Detect it, and install it once
19
27
 
20
28
  Detect, in this order:
@@ -8,6 +8,19 @@ The same source list closes the loop at **stage 9**: what was read at the start
8
8
  what gets updated at the end. A source good enough to answer a question is a source
9
9
  that goes stale when the answer changes.
10
10
 
11
+ ## Contents
12
+
13
+ - Why this is a phase and not "explore a bit first"
14
+ - The sources, in the order to try them
15
+ - The retro's standing instructions — an instruction source, not background
16
+ - The code graph — recommended
17
+ - The knowledge wiki — recommended
18
+ - How to harvest — retrieval, not reading
19
+ - Record it — the source ledger
20
+ - Phase 2 — validate the answers against the harvest
21
+ - Close the loop — stage 9 updates what stage 0 read
22
+ - Rationalizations
23
+
11
24
  ## Why this is a phase and not "explore a bit first"
12
25
 
13
26
  An agent that starts asking without harvesting spends the operator's turns on
@@ -13,6 +13,14 @@ to be enforced and is not is the same failure as a gate that prints `FAIL` and e
13
13
 
14
14
  ---
15
15
 
16
+ ## Contents
17
+
18
+ - The table — trigger · check · exit criterion
19
+ - The incidents, so the rules are not abstract
20
+ - The two that are not in the table, and why
21
+ - The one instruction that would have prevented the most
22
+ - Where these bind in the pipeline
23
+
16
24
  ## The table — trigger · check · exit criterion
17
25
 
18
26
  | # | Rule | Trigger | The check | Exit criterion |
@@ -18,6 +18,14 @@ axis, don't push harder): [`audit.md`](audit.md) → *Every pass changes the axi
18
18
  Both can bind one run. Use this file's trips for edits, that file's crossover for
19
19
  searches.
20
20
 
21
+ ## Contents
22
+
23
+ - Bookkeeping — the thing that makes detection mechanical
24
+ - Detection — any one of these trips the guard
25
+ - The break protocol
26
+ - When to stop and hand back
27
+ - Rationalizations
28
+
21
29
  ## Bookkeeping — the thing that makes detection mechanical
22
30
 
23
31
  You cannot detect churn from memory, especially after compaction. Every repeating
@@ -9,6 +9,18 @@ Built into this skill; nothing to install.
9
9
  > *Third-party*), extended with the dependency graph, parallel groups and
10
10
  > file-ownership rules this pipeline's stage-5 subagent build depends on.
11
11
 
12
+ ## Contents
13
+
14
+ - Audience
15
+ - Before writing tasks
16
+ - Task right-sizing
17
+ - Plan header — required
18
+ - Task structure — required
19
+ - No placeholders
20
+ - Self-review — before handing off
21
+ - This stage settles nothing — and that is a rule, not an omission
22
+ - GATE (auto)
23
+
12
24
  ## Audience
13
25
 
14
26
  Assume a skilled developer who knows nothing about this codebase, this domain or
@@ -182,6 +194,19 @@ A checklist you run yourself, inline. No subagent:
182
194
  `depends:` points at a task that really produces what's consumed.
183
195
  6. **DoD present and verifiable** on every task.
184
196
 
197
+ ## This stage settles nothing — and that is a rule, not an omission
198
+
199
+ Planning **translates** decisions; it does not make them. So unlike stages 2, 3, 5
200
+ and 10 there is no Doc Loop trigger here ([`documentation.md`](documentation.md)),
201
+ and the reason is worth stating, because an unstated exclusion is indistinguishable
202
+ from a gap.
203
+
204
+ The consequence is the working rule: **if writing the plan forces a choice, the
205
+ choice belongs to a lower layer.** A contract that turns out underspecified goes
206
+ back to stage 3 and is recorded there; a scope question goes back to the operator.
207
+ A decision first made while sequencing tasks is a decision nothing downstream will
208
+ ever find, because nobody reads a plan after the build.
209
+
185
210
  ## GATE (auto)
186
211
 
187
212
  **Set equality first:** the REQ ids in the brief equal the union of `Implements:`
@@ -20,6 +20,17 @@ Every run writes a **stamp** and runs the **prune**. Only a run that *diverged*
20
20
  writes an entry. A retro that is empty after a messy run is the exact failure this
21
21
  file exists to stop.
22
22
 
23
+ ## Contents
24
+
25
+ - Write the entry only for a divergence — and name the layer that owned it
26
+ - Every lesson carries its commit
27
+ - Rotation — the archive is how pruning stops losing things
28
+ - Three grades of fix — take the highest one that can work
29
+ - The prune — mandatory, and it runs BEFORE the new entry is written
30
+ - The loop closes at stage 0
31
+ - Where a lesson goes when it is not about this project
32
+ - Rationalizations
33
+
23
34
  ## Write the entry only for a divergence — and name the layer that owned it
24
35
 
25
36
  An entry is owed when the run did not go as planned: a gate reopened, a stage was
@@ -10,6 +10,16 @@ install.
10
10
  > external helper scripts replaced by plain git commands so the doctrine works on
11
11
  > any agent.
12
12
 
13
+ ## Contents
14
+
15
+ - The diff package
16
+ - Reviewer inputs
17
+ - Controller rules
18
+ - The rubric
19
+ - Prompt — task review
20
+ - Prompt — scoped re-review
21
+ - Prompt — final whole-branch review
22
+
13
23
  ## The diff package
14
24
 
15
25
  A reviewer never re-derives the diff with a dozen git calls, and the diff never
@@ -167,6 +177,13 @@ finding either.
167
177
  > which can stand and why. Findings only, with severity and a concrete failure
168
178
  > scenario each. Return the findings as your final message.
169
179
 
180
+ **A ruling that parks a finding is a decision.** *"This stands, and here is why"* is
181
+ exactly the sentence a future reader will hit in the code and re-litigate, so a
182
+ ruling that outlives the run goes through the **Doc Loop**
183
+ ([`documentation.md`](documentation.md)) — via the report and the ledger, written by
184
+ the orchestrator after integration, never by a subagent
185
+ ([`build.md`](build.md) → *§4.1a*).
186
+
170
187
  Run the final review on the **run's confirmed model** like everything else
171
188
  ([`model-tiering.md`](model-tiering.md)). It is the one review that sees the whole
172
189
  change, so if the run is on a tier below the most capable one available, say so and
@@ -9,6 +9,16 @@ Writing the approved design down so a zero-context implementer — human or suba
9
9
  > *Third-party*), extended here with the UX track and the Global Constraints block
10
10
  > that stages 4–5 depend on.
11
11
 
12
+ ## Contents
13
+
14
+ - Order of operations
15
+ - UX track (user-facing tasks only)
16
+ - Write the spec
17
+ - Module dossier — when the run is one brick of a platform
18
+ - Self-review — before showing it
19
+ - Locked contracts are decisions — the register, not only the spec
20
+ - GATE (manual)
21
+
12
22
  ## Order of operations
13
23
 
14
24
  For a **user-facing task** (stage-2 UI verdict = yes) the UX chain runs **first** —
@@ -134,6 +144,18 @@ Read what you wrote with fresh eyes and fix inline. No subagent, no second pass:
134
144
  5. **Ambiguity:** can any requirement be read two ways? Pick one and say it.
135
145
  6. **Traceability (UI):** does every user-facing requirement name its scenario ID?
136
146
 
147
+ ## Locked contracts are decisions — the register, not only the spec
148
+
149
+ This stage settles more than any other: a schema, a signature, a status vocabulary,
150
+ an error shape. Each has a life longer than the document it is written into, so run
151
+ the **Doc Loop** ([`documentation.md`](documentation.md)) for the ones that bind
152
+ future work — record the entry, propagate by the matrix, and cite the id from the
153
+ spec section instead of restating the reasoning there.
154
+
155
+ **A spec states a contract; the register makes it addressable.** A spec is per-run
156
+ and the next one supersedes it; an id survives. If this stage settled something and
157
+ no entry names it, the run has agreed to decide it again later.
158
+
137
159
  ## GATE (manual)
138
160
 
139
161
  > "Spec written and committed to `<path>`. Review it and tell me if anything should
@@ -8,7 +8,52 @@ operator's explicit go). These stages (0 intake + 1→10) are the plugin's
8
8
  `pipeline.schema.json`; a host project replaces it with its own
9
9
  stages/agents/types (see SKILL.md → *Bring your own skills*).
10
10
 
11
+ ## The run checklist — copy it, tick it
12
+
13
+ Complex workflows lose steps silently. Copy this into your response at the start of
14
+ a run and check items off as they close; it is the cheapest guard against the one
15
+ failure this pipeline keeps paying for — a stage that *looks* done because nothing
16
+ printed.
17
+
18
+ ```
19
+ Pipeline progress
20
+ - [ ] 0 Intake — harvest + doc inventory + reconcile, grill, REQ table, brief locked
21
+ - [ ] 1 Docs study — every contract grounded on fetched docs, not recall
22
+ - [ ] 2 Brainstorm — design approved, UI verdict recorded, every REQ answered
23
+ - [ ] 3 Spec — committed, reviewed, every section covers: REQ-…
24
+ - [ ] 4 Plan — REQ set equality holds, no placeholders, groups share no files
25
+ - [ ] 5 Dev — tasks DONE, three verdicts each, suite green, branch integrated
26
+ - [ ] 6 Tests — full suite green, new checks probed both ways
27
+ - [ ] 7 Lint + deploy — clean, and the deploy authorization is specific
28
+ - [ ] 8 Post-deploy — clean boot, or an honest degradation report
29
+ - [ ] 9 Docs — matrix walked, registers written, docs gate green with ratchets printed
30
+ - [ ] 10 Acceptance — ladder walk first, every REQ with evidence, retro written last
31
+ ```
32
+
33
+ Each line is a **gate**, not a task: an unchecked box means the gate did not pass,
34
+ never that the work was skipped quietly.
35
+
36
+ ## Contents
37
+
38
+ - The run checklist — copy it, tick it
39
+ - 0 — Intake grill — MANDATORY
40
+ - 1 — Docs study
41
+ - 2 — Brainstorm + decompose
42
+ - 3 — Spec — with UX track for user-facing tasks
43
+ - 4 — Plan
44
+ - 5 — Dev
45
+ - 6 — Tests
46
+ - 7 — Lint + deploy
47
+ - 8 — Post-deploy
48
+ - 9 — Docs + wiki
49
+ - 10 — Acceptance
50
+ - The program loop — a platform, one brick at a time
51
+ - Cross-cutting — the Doc Loop
52
+ - Cross-cutting — the loop guard
53
+ - Cross-cutting — the audit
54
+
11
55
  ## 0 — Intake grill — MANDATORY
56
+ - **Freedom: medium** — the interview adapts to the answers; its two phases and their order do not ([`gates.md`](gates.md) → *Axis B*).
12
57
  - **Stage 0 is not optional and not skippable.** There is no "small enough task"
13
58
  exemption, no "the request was already clear" exemption, no starting stage 1
14
59
  "while the operator thinks". The only sanctioned bypass is the
@@ -109,15 +154,17 @@ stages/agents/types (see SKILL.md → *Bring your own skills*).
109
154
  reversible calls can be deferred with a note). Only then start stage 1.
110
155
 
111
156
  ## 1 — Docs study
157
+ - **Freedom: medium** — which sources to fetch is judgement; grounding contracts on fetched docs is not ([`gates.md`](gates.md) → *Axis B*).
112
158
  - **What:** ground every external library / API / SDK the task touches on the
113
159
  *current* docs, before locking any contract.
114
- - **Invoke:** `context7` MCP (`resolve-library-id` → `get-library-docs`, scope by
115
- `topic`) or the `context7-docs` skill. Web-search fallback for libs context7
160
+ - **Invoke:** the `context7` MCP `context7:resolve-library-id` → `context7:query-docs`,
161
+ scoped by topic or the `context7-docs` skill. Web-search fallback for libs context7
116
162
  can't resolve.
117
163
  - **GATE (auto):** every contract the design will lock is grounded in fetched docs,
118
164
  not recall. Unresolvable libraries are flagged in the spec.
119
165
 
120
166
  ## 2 — Brainstorm + decompose
167
+ - **Freedom: high** — many designs are valid — this is the open field, and the only fixed thing is the gate ([`gates.md`](gates.md) → *Axis B*).
121
168
  - **How it runs: [`brainstorm.md`](brainstorm.md)** — built into this skill. Read
122
169
  the brief first (stage 0 already answered scope/constraints/done-criteria), then
123
170
  explore the codebase, scope-check for decomposition, one question at a time, 2–3
@@ -147,6 +194,7 @@ stages/agents/types (see SKILL.md → *Bring your own skills*).
147
194
  contracts named with their owner.
148
195
 
149
196
  ## 3 — Spec — with UX track for user-facing tasks
197
+ - **Freedom: medium** — what the contract says is judgement; which contracts must be locked is a list ([`gates.md`](gates.md) → *Axis B*).
150
198
  - **How it runs: [`spec.md`](spec.md)** — built into this skill: the UX-track order,
151
199
  what the spec must lock (types, schemas, signatures, file layout, the **Global
152
200
  Constraints** block stages 4–5 depend on), the self-review pass and the operator
@@ -202,6 +250,7 @@ stages/agents/types (see SKILL.md → *Bring your own skills*).
202
250
  starts before this — the chain comes BEFORE interface.
203
251
 
204
252
  ## 4 — Plan
253
+ - **Freedom: low** — the task format is prescribed and the REQ set-comparison is mechanical ([`gates.md`](gates.md) → *Axis B*).
205
254
  - **How it runs: [`planning.md`](planning.md)** — built into this skill →
206
255
  `docs/superpowers/plans/YYYY-MM-DD-<topic>.md` (same slug as the brief and the
207
256
  spec). Zero-context tasks, exact
@@ -220,6 +269,7 @@ stages/agents/types (see SKILL.md → *Bring your own skills*).
220
269
  same change (super-ux *same-change* rule).
221
270
 
222
271
  ## 5 — Dev
272
+ - **Freedom: low** — TDD order, worktree isolation and 'a subagent never writes the register' are the narrow bridge ([`gates.md`](gates.md) → *Axis B*).
223
273
  - **How it runs: [`build.md`](build.md)** — built into this skill: isolate the
224
274
  workspace (native worktree tool first, git fallback, baseline tests), keep a
225
275
  ledger under `.task-pipeline/build/<plan>/` so a compacted context can resume,
@@ -241,6 +291,7 @@ stages/agents/types (see SKILL.md → *Bring your own skills*).
241
291
  "leave it" recorded).
242
292
 
243
293
  ## 6 — Tests
294
+ - **Freedom: low** — green means the full suite, and no skip smuggles a red one past ([`gates.md`](gates.md) → *Axis B*).
244
295
  - **What:** consolidate test coverage for the change: confirm new functionality
245
296
  has tests (written test-first in stage 5), update/repair existing tests the
246
297
  change touched, and add edge-case + failure-path tests per DoD.
@@ -254,6 +305,7 @@ stages/agents/types (see SKILL.md → *Bring your own skills*).
254
305
  ([`audit.md`](audit.md)).
255
306
 
256
307
  ## 7 — Lint + deploy
308
+ - **Freedom: low** — outward and irreversible — the authorization floor is exact or the stage stops ([`gates.md`](gates.md) → *Axis B*).
257
309
  - Read host conventions (`conventions.md`): run the linter; fix failures. The suite
258
310
  is already green from stage 6 — re-run it if code changed since. For UI projects,
259
311
  the **super-ux linter** (`python3 docs/ux/lint.py` / `/ux-lint`) is part of lint —
@@ -268,12 +320,14 @@ stages/agents/types (see SKILL.md → *Bring your own skills*).
268
320
  operator go. Respect deploy-from-main rules if the project mandates them.
269
321
 
270
322
  ## 8 — Post-deploy
323
+ - **Freedom: medium** — where the logs live varies; 'clean boot or an honest degradation report' does not ([`gates.md`](gates.md) → *Axis B*).
271
324
  - Tail deploy logs / health-check per conventions. Confirm clean boot, no error
272
325
  spike, live subsystems healthy.
273
326
  - **GATE (auto):** clean boot confirmed, or an **honest degradation report** with next
274
327
  steps — never silent success.
275
328
 
276
329
  ## 9 — Docs + wiki
330
+ - **Freedom: low** — the matrix walk and the gate are mechanical; what a doc says is not this stage's call ([`gates.md`](gates.md) → *Axis B*).
277
331
  - **The propagation sweep runs first** ([`documentation.md`](documentation.md)).
278
332
  The ledger below names the documents you **read**; the matrix in `docs/DOCMAP.md`
279
333
  names the documents you **owe**. They are not the same list, and the gap between
@@ -327,6 +381,7 @@ stages/agents/types (see SKILL.md → *Bring your own skills*).
327
381
  carry-over count printed beside this verdict**.
328
382
 
329
383
  ## 10 — Acceptance
384
+ - **Freedom: medium** — the walk and the evidence rule are fixed; whether it is what was asked for is the operator's ([`gates.md`](gates.md) → *Axis B*).
330
385
  - **What:** the closing stage — go back to the brief and account for **every**
331
386
  requirement. Doctrine: [`acceptance.md`](acceptance.md). Every earlier gate asks
332
387
  "is this artifact good?"; none asks "does this still contain everything that was
@@ -382,7 +437,8 @@ stages/agents/types (see SKILL.md → *Bring your own skills*).
382
437
  notices it is the same one. So, in this order: **prune first** (every standing
383
438
  instruction against its three retirement triggers — it became a check, its
384
439
  surface is gone, it hasn't fired in five run stamps — and the list held to its cap
385
- of ten, every deletion logged), **stamp the run**, then **write an entry only if
440
+ of ten, every deletion logged **in the archive, with the commit that retired it**),
441
+ **stamp the run**, then **write an entry only if
386
442
  the run diverged** (symptom · the stage it surfaced at · the stage that *owned* it
387
443
  · root cause · fix, mechanical before instruction before expiring note · the check
388
444
  that catches it next time). Every run prunes and stamps; a retro left empty after
@@ -390,9 +446,9 @@ stages/agents/types (see SKILL.md → *Bring your own skills*).
390
446
  instructions in full next time, which is why the cap is not negotiable.
391
447
  - **GATE (manual):** the ladder walk ran and its absences became REQ rows before
392
448
  the table was written; **the retrospective is written — prune before entry, the
393
- list at or under its cap, every deletion logged **in the archive with its commit**,
449
+ list at or under its cap, every deletion logged in the archive with its commit,
394
450
  entries older than five run stamps rotated into `docs/superpowers/retro/`, the run
395
- stamped **with its commit**, every SHA in either file resolvable, and the
451
+ stamped with its commit, every SHA in either file resolvable, and the
396
452
  counts printed beside this verdict**; **the documentation gate has been seen
397
453
  failing once against a planted defect and its ratchet counts are printed**
398
454
  ([`gates.md`](gates.md)); **every repository is closed — the parent included:
@@ -7,6 +7,16 @@ into this skill; nothing to install.
7
7
  > [obra/superpowers](https://github.com/obra/superpowers) (MIT — see `LICENSE` →
8
8
  > *Third-party*), with the stage-6 suite gate added.
9
9
 
10
+ ## Contents
11
+
12
+ - The iron law
13
+ - Red → green → refactor
14
+ - Tests that stay honest
15
+ - Stage 6 — consolidation and the suite gate
16
+ - When stuck
17
+ - Rationalizations
18
+ - Red flags — stop and start over
19
+
10
20
  ## The iron law
11
21
 
12
22
  ```