pi-gauntlet 4.1.0 → 4.2.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/CHANGELOG.md +28 -0
- package/README.md +2 -2
- package/agents/code-reviewer.md +2 -1
- package/package.json +1 -1
- package/skills/brainstorming/SKILL.md +12 -3
- package/skills/brainstorming/reference/documentation-impact.md +134 -0
- package/skills/finishing-a-development-branch/SKILL.md +15 -8
- package/skills/subagent-driven-development/SKILL.md +5 -7
- package/skills/verification-before-completion/reference/conformance-check.md +6 -1
- package/skills/writing-plans/SKILL.md +6 -2
- package/skills/writing-skills/SKILL.md +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v4.2.0 - 2026-07-04
|
|
4
|
+
|
|
5
|
+
Documents become first-class origin requirements, the post-execution review stack
|
|
6
|
+
is deduplicated, and this repo now dogfoods its own workflow (GitHub #1 + folded-in B/C/D/E).
|
|
7
|
+
|
|
8
|
+
- **Part A - docs as first-class origin.** New shared reference
|
|
9
|
+
`skills/brainstorming/reference/documentation-impact.md` defines a materiality
|
|
10
|
+
bar (seven inclusion categories + a litmus test, an anti-flooding exclusion list,
|
|
11
|
+
and amend-over-create) so only meaningful docs earn a place. `brainstorming` gets
|
|
12
|
+
a required `## Documentation impact` spec section (three classes: introduced /
|
|
13
|
+
materially amended / derived-memory invalidated); `writing-plans` turns doc updates
|
|
14
|
+
into real tasks + a trailing doc-only wave; `conformance-check.md` names spec docs
|
|
15
|
+
as origin requirements the existing pass already verifies. No new pass or agent.
|
|
16
|
+
- **Part B - review-stack dedup.** `subagent-driven-development`'s post-execution
|
|
17
|
+
stack collapses from a duplicated whole-diff review to one `requesting-code-review`
|
|
18
|
+
plus the separate `conformance-reviewer`; the auto-fired project-audit supplement
|
|
19
|
+
is removed (consumers re-wire via `.pi/gauntlet-overrides.md` or run it manually).
|
|
20
|
+
`agents/code-reviewer.md` severity and `README.md` are decoupled from the example
|
|
21
|
+
self-audit skill. Execution-phase per-task/per-wave reviews are untouched.
|
|
22
|
+
- **Part C - ephemeral-plan parity.** `finishing-a-development-branch` now strips the
|
|
23
|
+
plan doc before the PR push (guarded `git ls-files --error-unmatch`), symmetric with
|
|
24
|
+
the squash-merge path; the plan never lands on base.
|
|
25
|
+
- **Part D - self-hosting mandate.** `AGENTS.md` mandates the full gauntlet for this
|
|
26
|
+
repo's own non-trivial changes and reframes the direct-edit recipes as implement-phase
|
|
27
|
+
mechanics.
|
|
28
|
+
- **Part E - file-placement convention.** `writing-skills` codifies dispatch-payload
|
|
29
|
+
templates as `SKILL.md` siblings vs deep guidance in `reference/` (destination, not format).
|
|
30
|
+
|
|
3
31
|
## v4.1.0 - 2026-07-02
|
|
4
32
|
|
|
5
33
|
- **`closureReview` now resolves repo-local first.** The verify-step skills
|
package/README.md
CHANGED
|
@@ -15,10 +15,10 @@ brainstorm → plan → implement → verify → ship
|
|
|
15
15
|
1. **`brainstorming`** — every change starts here. Sets up an isolated worktree, explores the codebase, and turns the idea into a written spec under `doc/specs/`. A multi-model critique runs automatically before you read it (`roasting-the-spec` when a council is configured, else one fresh `worker`). **Hard gate:** no implementation code is written until you approve the spec.
|
|
16
16
|
2. **`writing-plans`** — derives an implementation plan from the approved spec, decomposed into atomic, independently-verifiable tasks (grouped into parallel waves when they're file- and resource-disjoint). Auto-chains into execution.
|
|
17
17
|
3. **`subagent-driven-development`** — executes the plan one atomic task at a time, each in a **fresh subagent**, behind a **two-stage review**: spec compliance first (`spec-reviewer`), then code quality (`code-reviewer`). The `implementer` persona is TDD-locked (RED→GREEN→REFACTOR). You orchestrate; you never hand-write the code.
|
|
18
|
-
4. **verify** — after the last task: a whole-diff review (`requesting-code-review
|
|
18
|
+
4. **verify** — after the last task: a whole-diff review (`requesting-code-review`), then the `conformance-reviewer` closing-loop gate that confronts the delivered code **and** docs against the *origin* (spec + your verbatim original prompt), not the plan. The phase-tracker **blocks `complete verify`** until a conformance dispatch has run, and on a successful `complete verify` (ship still pending) injects an advisory to invoke `finishing-a-development-branch` immediately without a redundant "ready to finish?" prompt - or to reopen verify if a requirement decision is still open.
|
|
19
19
|
5. **`finishing-a-development-branch`** — squash / PR / keep / discard. This menu is the single human decision gate at the end, mirroring spec approval at the start.
|
|
20
20
|
|
|
21
|
-
Spec, plan, and implementation all
|
|
21
|
+
Spec, plan, and implementation are all developed in the **same worktree**. The squash commit ships spec and implementation; the plan is ephemeral and is stripped before any landing path.
|
|
22
22
|
|
|
23
23
|
**Supporting skills** slot in as the pipeline needs them: `using-git-worktrees` (isolation, before the spec), `test-driven-development` (inside every implementer), `dispatching-parallel-agents` (wave fan-out), `systematic-debugging` (when something breaks), `receiving-code-review` (when you get feedback), `writing-skills` (authoring more of these).
|
|
24
24
|
|
package/agents/code-reviewer.md
CHANGED
|
@@ -40,7 +40,8 @@ Findings:
|
|
|
40
40
|
Complexity: net -<N> lines (omit if nothing to cut)
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
Severity
|
|
43
|
+
Severity:
|
|
44
|
+
|
|
44
45
|
- **Critical** — must fix before merge (data loss, security, broken correctness on a common path, broken contract).
|
|
45
46
|
- **Moderate** — should fix; open for discussion (significant but not strictly blocking).
|
|
46
47
|
- **Minor** — nit, style, preference, suggestion.
|
package/package.json
CHANGED
|
@@ -78,7 +78,7 @@ The spec is the **first commit in a dedicated worktree**, not a separate commit
|
|
|
78
78
|
2. Switch into the worktree.
|
|
79
79
|
3. From there, write the spec, run self-review, commit, hand off.
|
|
80
80
|
|
|
81
|
-
Spec doc, plan doc, and implementation all
|
|
81
|
+
Spec doc, plan doc, and implementation are all developed in the same worktree; the squash ships the spec and the implementation, with the ephemeral plan stripped before landing (see `/skill:finishing-a-development-branch`).
|
|
82
82
|
|
|
83
83
|
**Exception:** trivial one-off edits the user explicitly asks for outside this skill flow (e.g. "fix this typo") do not require a worktree.
|
|
84
84
|
|
|
@@ -140,7 +140,16 @@ Cover at minimum:
|
|
|
140
140
|
- Data flow (or request flow)
|
|
141
141
|
- Error handling and edge cases
|
|
142
142
|
- Testing approach
|
|
143
|
-
- Documentation impact —
|
|
143
|
+
- Documentation impact — a required `## Documentation impact` section. Cite the materiality bar in `reference/documentation-impact.md` by relative path rather than restating its categories, and reproduce its template block verbatim:
|
|
144
|
+
|
|
145
|
+
```markdown
|
|
146
|
+
## Documentation impact
|
|
147
|
+
- Feature / user-facing docs introduced: <list, or "none">
|
|
148
|
+
- Materially amended existing docs: <list, or "none">
|
|
149
|
+
- Derived / memory docs invalidated: <routers / AGENTS.md sections / topic guides / indexes, or "none">
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Each entry answers with a doc name, "none", or "deferred: <trigger>". A new standalone `.md` appears only where no existing doc already owns the topic. Project-specific doc taxonomy goes in a `## documentation` block in `.pi/gauntlet-overrides.md` (no new settings key; guidance only). Doc updates ship in the same commit and are verified against the spec by the conformance gate.
|
|
144
153
|
|
|
145
154
|
Be ready to go back and clarify when something doesn't make sense.
|
|
146
155
|
|
|
@@ -188,7 +197,7 @@ After writing the spec to `<project>/doc/specs/<filename>.md` (per [Filename Con
|
|
|
188
197
|
|
|
189
198
|
- **Placeholder scan.** Any `TODO`, `TBD`, `<fill in>`, `[example]`, `xxx`? Either resolve them or convert to explicit "Open Questions" with names.
|
|
190
199
|
- **Internal consistency.** Does Section 4 contradict Section 2? Are component names and field names consistent throughout?
|
|
191
|
-
- **Documentation named.** Does the spec
|
|
200
|
+
- **Documentation named.** Does the spec name all three classes (feature/user-facing introduced; materially amended; derived/memory invalidated), or an explicit "none" for each? Enforce the materiality bar in `reference/documentation-impact.md` without restating it: each listed doc names the category it clears, none is a code-mirror, amend-over-create was applied, and skill/agent bodies are implementation surface, not doc-impact entries here.
|
|
192
201
|
- **Scope check.** Does every paragraph serve the goal? Cut filler. If something is out of scope, say it's out of scope.
|
|
193
202
|
- **Ambiguity check.** Is every "we should…" backed by a concrete decision? Replace "we could probably" with "we will" or "we won't".
|
|
194
203
|
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Documentation Impact: the Materiality Bar
|
|
2
|
+
|
|
3
|
+
The shared materiality bar for a spec's "Documentation impact" section. Several
|
|
4
|
+
skills cite this doc by relative path rather than restating its rules.
|
|
5
|
+
|
|
6
|
+
## Governing principle
|
|
7
|
+
|
|
8
|
+
The governing principle: document what the code cannot tell you.
|
|
9
|
+
|
|
10
|
+
The "Documentation impact" section is a **filter with a default of "none,"** not
|
|
11
|
+
a prompt to produce documentation. A doc earns a line in that section only when
|
|
12
|
+
it clears one of the categories below. Absence is the expected outcome for most
|
|
13
|
+
changes - most changes touch no product-facing doc at all.
|
|
14
|
+
|
|
15
|
+
## Scope + the three doc classes
|
|
16
|
+
|
|
17
|
+
The section tracks **product-facing docs**: README, `AGENTS.md`, CHANGELOG,
|
|
18
|
+
external / API contracts, and genuinely-new standalone guidance docs.
|
|
19
|
+
|
|
20
|
+
Skill and agent bodies, and their `reference/` sub-docs, are **implementation
|
|
21
|
+
surface** - the deliverable itself, tracked in the plan's file list - **not**
|
|
22
|
+
doc-impact entries. Listing them here would just restate the diff.
|
|
23
|
+
|
|
24
|
+
Within that scope, a spec's Documentation impact section enumerates three
|
|
25
|
+
classes:
|
|
26
|
+
|
|
27
|
+
- **Feature / user-facing docs introduced** - a new doc the change adds.
|
|
28
|
+
- **Materially amended existing docs** - an existing product doc that gains a
|
|
29
|
+
new section or a changed contract.
|
|
30
|
+
- **Derived / memory docs invalidated** - router entries (`AGENTS.md` sections),
|
|
31
|
+
topic guides, taxonomy indexes that go stale because of this change.
|
|
32
|
+
|
|
33
|
+
## The seven inclusion categories
|
|
34
|
+
|
|
35
|
+
These seven categories gate classes 1 and 2 (feature/user-facing introduced;
|
|
36
|
+
materially amended) - selection by importance. Class 3 (derived/memory
|
|
37
|
+
invalidated) uses a different, lighter test; see "Gating class 3" below.
|
|
38
|
+
|
|
39
|
+
A doc earns its place in classes 1-2 only by clearing at least one of these.
|
|
40
|
+
Categories are not mutually exclusive; one match is sufficient.
|
|
41
|
+
|
|
42
|
+
**Litmus test for every category:** would a competent teammate need this
|
|
43
|
+
written down to safely operate or extend the system without reading the diff
|
|
44
|
+
or the code? If the code (or its tests) already answers it, it fails the bar.
|
|
45
|
+
|
|
46
|
+
- **Major procedures / conventions** - how work is done here (workflow, review,
|
|
47
|
+
release discipline).
|
|
48
|
+
- **Operations / tunable parameters** - env vars, thresholds, feature flags,
|
|
49
|
+
runbook / recovery steps. PASS: a new `PI_LENS_MAX_FILES` threshold, its
|
|
50
|
+
default, and when to change it. FAIL: restating that a function reads an
|
|
51
|
+
env var - the code already says that.
|
|
52
|
+
- **Communication contracts / integrations** - API / wire / queue contracts,
|
|
53
|
+
cross-component boundaries.
|
|
54
|
+
- **Architecture** - module boundaries, data flow, structural decisions.
|
|
55
|
+
- **Major definitions** - the canonical definition of a load-bearing domain
|
|
56
|
+
term, concept, or invariant that multiple components depend on and no single
|
|
57
|
+
code location fully owns. PASS: the canonical meaning of a domain term
|
|
58
|
+
several components rely on. FAIL: a one-line type alias the code already
|
|
59
|
+
names in full.
|
|
60
|
+
- **Non-obvious rationale / decisions that outlive the PR** - the "why," and
|
|
61
|
+
why not the obvious alternative. PASS: why a simpler, obvious approach was
|
|
62
|
+
rejected, recorded so it is not re-litigated later. FAIL: a restatement of
|
|
63
|
+
what the chosen code does.
|
|
64
|
+
- **Security, data-access & permissions** - trust boundaries, who can access
|
|
65
|
+
what, data-handling and permission decisions.
|
|
66
|
+
|
|
67
|
+
## Gating class 3
|
|
68
|
+
|
|
69
|
+
Class 3 ("Derived / memory docs invalidated") is not gated by the seven
|
|
70
|
+
categories above. A router entry, topic guide, or taxonomy index is
|
|
71
|
+
invalidated by drift, not selected by topical weight. The test is: an
|
|
72
|
+
existing doc's content is now wrong or misleading because of this change.
|
|
73
|
+
If so, it belongs in class 3 regardless of whether it would clear any of the
|
|
74
|
+
seven categories. A citing skill (for example `writing-plans`, which sources
|
|
75
|
+
doc-update tasks from this section) must not apply the seven-category filter
|
|
76
|
+
to class 3 entries.
|
|
77
|
+
|
|
78
|
+
## Exclusion / anti-pattern list
|
|
79
|
+
|
|
80
|
+
None of the following clears the bar, no matter how it is framed:
|
|
81
|
+
|
|
82
|
+
- Per-symbol or per-module narration.
|
|
83
|
+
- Restating signatures, types, or schemas the code already owns.
|
|
84
|
+
- "How it works" prose that reading the code answers directly.
|
|
85
|
+
- Anything that would need an edit on every code change - the code-mirror
|
|
86
|
+
tell: if a doc rots the moment the function it describes changes, it was
|
|
87
|
+
never documentation, it was a copy.
|
|
88
|
+
|
|
89
|
+
In-code doc comments such as RDoc/JSDoc are out of scope for this bar; it
|
|
90
|
+
governs standalone `.md` docs only, and the same "no code-mirror" rule
|
|
91
|
+
applies to both: a narrow markdown file that mirrors one function or one
|
|
92
|
+
module fails the bar the same way an inline doc comment would.
|
|
93
|
+
|
|
94
|
+
## Amend over create
|
|
95
|
+
|
|
96
|
+
Clearing the bar does not default to a new file. **Extend the canonical
|
|
97
|
+
existing doc that owns the topic.** When ownership is ambiguous, extend the
|
|
98
|
+
most specific existing doc that already discusses the surrounding topic; a
|
|
99
|
+
new standalone `.md` is justified only when zero existing docs mention the
|
|
100
|
+
topic at all - this is the anti-proliferation rule, and it is why most
|
|
101
|
+
changes that clear the bar still show up under "materially amended," not
|
|
102
|
+
"introduced."
|
|
103
|
+
|
|
104
|
+
## The section template
|
|
105
|
+
|
|
106
|
+
Reproduce this block exactly in a spec's "Documentation impact" section:
|
|
107
|
+
|
|
108
|
+
```markdown
|
|
109
|
+
## Documentation impact
|
|
110
|
+
- Feature / user-facing docs introduced: <list, or "none">
|
|
111
|
+
- Materially amended existing docs: <list, or "none">
|
|
112
|
+
- Derived / memory docs invalidated: <routers / AGENTS.md sections / topic guides / indexes, or "none">
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Each entry answers with a doc name, `"none"`, or `"deferred: <trigger>"` (for
|
|
116
|
+
example, `CHANGELOG.md - deferred: release`, when a doc changes on a known
|
|
117
|
+
later event and should not be flagged as missing before that event fires).
|
|
118
|
+
|
|
119
|
+
## Referenced by
|
|
120
|
+
|
|
121
|
+
Keep this list in sync with the skills that cite this doc:
|
|
122
|
+
|
|
123
|
+
- `brainstorming` section 6 and its Spec Self-Review check.
|
|
124
|
+
- `writing-plans` - sources doc-update tasks from the spec's Documentation
|
|
125
|
+
impact section.
|
|
126
|
+
- `verification-before-completion/reference/conformance-check.md` - docs named
|
|
127
|
+
here are origin requirements the conformance pass verifies.
|
|
128
|
+
- `finishing-a-development-branch` Step 1's doc-impact pointer.
|
|
129
|
+
|
|
130
|
+
## Project-specific taxonomy
|
|
131
|
+
|
|
132
|
+
This doc is generic. Project-specific doc taxonomy (which docs a given
|
|
133
|
+
project treats as canonical for which topic) lives in a project's
|
|
134
|
+
`.pi/gauntlet-overrides.md`, in a `## documentation` section - not here.
|
|
@@ -42,7 +42,7 @@ Stop. Don't proceed to Step 2.
|
|
|
42
42
|
|
|
43
43
|
**If tests pass:** Continue to Step 2.
|
|
44
44
|
|
|
45
|
-
No documentation prompt here:
|
|
45
|
+
No documentation prompt here: Documentation impact is decided at spec time (`/skill:brainstorming` section 6, gated by `brainstorming/reference/documentation-impact.md`) and has already shipped in the diff by the time you reach finishing.
|
|
46
46
|
|
|
47
47
|
### Step 2: Detect Environment
|
|
48
48
|
|
|
@@ -154,6 +154,12 @@ git branch -d <feature-branch>
|
|
|
154
154
|
#### Option 2: Push and Create PR
|
|
155
155
|
|
|
156
156
|
```bash
|
|
157
|
+
# Plans are ephemeral - if one was committed on this branch, remove it before the PR diff is opened.
|
|
158
|
+
PLAN_PATH=doc/plans/<plan-file>.md # or <service>/doc/plans/<plan-file>.md
|
|
159
|
+
if git ls-files --error-unmatch "$PLAN_PATH" >/dev/null 2>&1; then
|
|
160
|
+
git rm "$PLAN_PATH" && git commit -m "Remove ephemeral plan doc"
|
|
161
|
+
fi
|
|
162
|
+
|
|
157
163
|
# Push branch
|
|
158
164
|
git push -u origin <feature-branch>
|
|
159
165
|
|
|
@@ -235,12 +241,12 @@ git worktree prune # Self-healing: clean up any stale registrations
|
|
|
235
241
|
|
|
236
242
|
## Quick Reference
|
|
237
243
|
|
|
238
|
-
| Option | Merge | Push | Keep Worktree | Cleanup Branch |
|
|
239
|
-
|
|
240
|
-
| 1. Squash-merge locally | yes (squash) | - | - | yes |
|
|
241
|
-
| 2. Create PR | - | yes | yes | - |
|
|
242
|
-
| 3. Keep as-is | - | - | yes | - |
|
|
243
|
-
| 4. Discard | - | - | - | yes (force) |
|
|
244
|
+
| Option | Merge | Push | Keep Worktree | Cleanup Branch | Plan-doc removal |
|
|
245
|
+
|---|---|---|---|---|---|
|
|
246
|
+
| 1. Squash-merge locally | yes (squash) | - | - | yes | yes (unconditional) |
|
|
247
|
+
| 2. Create PR | - | yes | yes | - | yes (guarded, before push) |
|
|
248
|
+
| 3. Keep as-is | - | - | yes | - | - |
|
|
249
|
+
| 4. Discard | - | - | - | yes (force) | - |
|
|
244
250
|
|
|
245
251
|
## Common Mistakes
|
|
246
252
|
|
|
@@ -272,7 +278,7 @@ git worktree prune # Self-healing: clean up any stale registrations
|
|
|
272
278
|
- **Problem:** Accidentally delete work
|
|
273
279
|
- **Fix:** Require typed "discard" confirmation
|
|
274
280
|
|
|
275
|
-
**Skipping the plan-doc deletion in
|
|
281
|
+
**Skipping the plan-doc deletion in Options 1 and 2 (any path that lands on base)**
|
|
276
282
|
- **Problem:** Plan docs are ephemeral and shouldn't land on `<base-branch>`. Forgetting `git rm doc/plans/<plan-file>.md` ships scaffolding to main.
|
|
277
283
|
- **Fix:** The plan stays in the deleted branch's git history (`git log --all -- doc/plans/...`). Spec stays on `<base-branch>`; plan does not.
|
|
278
284
|
|
|
@@ -295,6 +301,7 @@ phase_tracker({ action: "complete", phase: "ship" })
|
|
|
295
301
|
- Clean up worktrees you didn't create (provenance check)
|
|
296
302
|
- Run `git worktree remove` from inside the worktree
|
|
297
303
|
- Present finish options while a conformance gap is open and undispositioned
|
|
304
|
+
- Skip the guarded plan-doc removal before push on Option 2 when a plan doc was committed
|
|
298
305
|
|
|
299
306
|
**Always:**
|
|
300
307
|
- Verify tests before offering options
|
|
@@ -60,7 +60,7 @@ For each task in `plan_tracker`:
|
|
|
60
60
|
6. If quality reviewer finds issues → re-dispatch implementer → re-review. Loop until ✅.
|
|
61
61
|
7. Mark task complete in `plan_tracker`.
|
|
62
62
|
|
|
63
|
-
After all tasks:
|
|
63
|
+
After all tasks: run the whole-diff code review (`requesting-code-review`). Then [After All Tasks](#after-all-tasks-complete).
|
|
64
64
|
|
|
65
65
|
## Implementer Status
|
|
66
66
|
|
|
@@ -86,7 +86,6 @@ Pi-subagents accepts a per-task `model` override. Use it.
|
|
|
86
86
|
| Hard / novel / large surface | Most capable | New subsystem, complex algorithm, cross-service contract change |
|
|
87
87
|
| Spec review | Default | Reads diff + spec, mechanical comparison |
|
|
88
88
|
| Code-quality review | Most capable | Judgment call on naming, design, complexity |
|
|
89
|
-
| Final reviewer | Most capable | Whole-PR-scope review |
|
|
90
89
|
| Conformance / closure | Most capable | Whole-deliverable-vs-origin intent gate (`conformance-reviewer`; model from `piGauntlet.closureReview.model`, resolved repo-first whole-object, injected call-site) |
|
|
91
90
|
|
|
92
91
|
```ts
|
|
@@ -188,11 +187,10 @@ For the fan-out + worktree + patch-integration + conflict mechanics, see `dispat
|
|
|
188
187
|
## After All Tasks Complete
|
|
189
188
|
|
|
190
189
|
0. Call `phase_tracker({ action: "start", phase: "verify" })`. (The `implement` phase was started at execution start and auto-completes from `plan_tracker` once all tasks are done; this flow runs its own verify gate instead of `/skill:verification-before-completion`, so it must mark verify itself.)
|
|
191
|
-
1.
|
|
192
|
-
2. **
|
|
193
|
-
3.
|
|
194
|
-
4.
|
|
195
|
-
5. **Proceed to finishing — no confirmation prompt.** When the verdict is `CONFORMS` (or every gap is dispositioned), invoke `/skill:finishing-a-development-branch` immediately. Its Step 4 menu (squash / PR / keep / discard) is the human gate; a separate "ready to finish?" prompt only stacks a second stop in front of it. Open gaps are already owned by step 3, so nothing is left to decide here. Manual testing is a follow-up after the finishing choice (on `<base-branch>` after a squash-merge, or on the PR branch), never a reason to hold this gate.
|
|
190
|
+
1. **Run the whole-diff code review.** Dispatch `/skill:requesting-code-review` against the worktree's full diff vs `main` (already covered in [The Process](#the-process) step "After all tasks"). Address Critical and Moderate findings before handoff. (Consumers wanting an in-flow project-specific audit re-add it as an explicit step in `.pi/gauntlet-overrides.md`, or run `/self-audit` manually.)
|
|
191
|
+
2. **Close the loop — conformance check.** The review in step 1 is plan-vs-code (single-step); it inherits any requirement the plan already dropped. Before marking verify complete, dispatch a fresh-context **`conformance-reviewer`** — its **own** dispatch, never fused into the step-1 review — to confront the deliverable (code **and** docs) against the *origin* — the spec **and** the original prompt — per `verification-before-completion/reference/conformance-check.md`. Pass the spec path, the verbatim original prompt, and the full diff. On `GAPS`, do not auto-fix or auto-proceed: run the remediation loop in `verification-before-completion/reference/conformance-check.md` "When the check finds gaps" (disposition menu → isolated fix waves → bounded delta re-audit, capped by `piGauntlet.closureReview.maxFixRounds`). Only when the verdict is `CONFORMS` (or every gap is dispositioned) call `phase_tracker({ action: "complete", phase: "verify" })`.
|
|
192
|
+
3. Summarize what was implemented (tasks completed, files changed, test counts, code-review verdict). Give the closing loop its **own section** — `Closure / conformance: CONFORMS` (or `GAPS` with each gap and its disposition) — so the user sees intent-fidelity as a first-class line before any finishing decision, not buried in the review verdict.
|
|
193
|
+
4. **Proceed to finishing — no confirmation prompt.** When the verdict is `CONFORMS` (or every gap is dispositioned), invoke `/skill:finishing-a-development-branch` immediately. Its Step 4 menu (squash / PR / keep / discard) is the human gate; a separate "ready to finish?" prompt only stacks a second stop in front of it. Open gaps are already owned by step 2, so nothing is left to decide here. Manual testing is a follow-up after the finishing choice (on `<base-branch>` after a squash-merge, or on the PR branch), never a reason to hold this gate.
|
|
196
194
|
|
|
197
195
|
## Red Flags — STOP
|
|
198
196
|
|
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Tests passing proves the code runs. It does **not** prove the code does what was
|
|
4
4
|
asked. This check confronts deliverables (code **and** docs) against the
|
|
5
|
-
requirements.
|
|
5
|
+
requirements. Docs named in a spec's "Documentation impact" section - any of
|
|
6
|
+
the three classes (introduced, materially amended, derived/memory invalidated) -
|
|
7
|
+
are origin requirements the same as code: a missing or drifted doc from that
|
|
8
|
+
section is a conformance gap, not a code-review nit. See
|
|
9
|
+
`../../brainstorming/reference/documentation-impact.md` for what that section
|
|
10
|
+
contains and how its entries are scoped.
|
|
6
11
|
|
|
7
12
|
## Why this is distinct from code review
|
|
8
13
|
|
|
@@ -85,6 +85,10 @@ Group tasks into **waves** so the executor can parallelize independent work (see
|
|
|
85
85
|
|
|
86
86
|
**Runtime-resource disjointness.** File-disjoint is necessary but not sufficient: two tasks with disjoint files that both mutate the same DB, bind the same port, or share a fixture are **not** parallel-safe and must land in different waves. The executor auto-selects parallel for *every* multi-task wave, so this grouping is the sole parallel-safety guarantee — there is no selection-time judgment downstream. No new mandatory per-task syntax; when a shared runtime resource is the reason two file-disjoint tasks sit in different waves, record it in an inline note on the later wave.
|
|
87
87
|
|
|
88
|
+
**Doc tasks.** Doc updates are real plan tasks, not an afterthought. Task-local docs (a doc that only describes the file(s) a task already touches) ride with that task. Cross-cutting or index docs (README, `AGENTS.md`, topic guides, taxonomy indexes) sequence into a dedicated trailing doc-only wave — last wave by convention, file-disjoint from every code task so the pairwise-disjoint wave contract holds.
|
|
89
|
+
|
|
90
|
+
**Doc-wave collision rule.** Amend-over-create (see `brainstorming/reference/documentation-impact.md`) concentrates edits into hub docs like README and `AGENTS.md`. A doc wave with ≥2 tasks auto-selects Parallel-Wave Mode, which requires pairwise-disjoint files — so doc tasks that land on the *same* file merge into one task rather than splitting. A single-task trailing doc wave is the expected shape, not a smell.
|
|
91
|
+
|
|
88
92
|
```markdown
|
|
89
93
|
## Wave 1 — Foundations
|
|
90
94
|
|
|
@@ -189,7 +193,7 @@ Every plan failure mode:
|
|
|
189
193
|
- ❌ "Similar to Task N" — repeat the code. Implementers (and subagents with fresh context) may read tasks out of order; pointing at a sibling task is not a substitute for showing the code.
|
|
190
194
|
- ❌ References to types, functions, methods, or fields not defined in any task in this plan. If it shows up in Task 5, it must be introduced by Task 1–4 or already exist in the codebase (with a file:line citation).
|
|
191
195
|
- ❌ `[fill in]`, `<example>`, `xxx` markers anywhere in the doc.
|
|
192
|
-
- ❌ "Probably also need to update the docs" — either yes (which doc) or no.
|
|
196
|
+
- ❌ "Probably also need to update the docs" — either yes (which doc) or no. Docs are named plan tasks, sourced from the spec's Documentation impact section (materiality bar in `brainstorming/reference/documentation-impact.md`).
|
|
193
197
|
|
|
194
198
|
If a decision is genuinely open, put it in an explicit **Open Questions** section at the top and resolve before execution starts.
|
|
195
199
|
|
|
@@ -197,7 +201,7 @@ If a decision is genuinely open, put it in an explicit **Open Questions** sectio
|
|
|
197
201
|
|
|
198
202
|
After drafting the plan and before announcing it complete, run three checks yourself. This is a checklist you run yourself — not a subagent dispatch.
|
|
199
203
|
|
|
200
|
-
- **Spec coverage.** Cross-reference the spec's components/decisions/constraints against the plan. Does every spec section map to one or more tasks? If a spec decision has no implementation task, the plan is missing work or the spec was overspecified.
|
|
204
|
+
- **Spec coverage.** Cross-reference the spec's components/decisions/constraints against the plan. Does every spec section map to one or more tasks? If a spec decision has no implementation task, the plan is missing work or the spec was overspecified. Each Documentation impact entry maps to a plan task (or explicit "none").
|
|
201
205
|
- **Placeholder scan.** Grep the doc for `TODO`, `TBD`, `xxx`, `[fill in]`, `<example>`, `etc.`, "probably", "something like". Resolve or convert each into an explicit Open Question.
|
|
202
206
|
- **Type / API consistency.** Function signatures and field names that appear in multiple tasks must match exactly. The plan is its own contract — internal contradictions surface as bugs during execution.
|
|
203
207
|
- **Wave disjointness.** For every multi-task wave, confirm the tasks' `Files:` sets are pairwise disjoint **and** that no two tasks contend on a shared mutable runtime resource (DB/schema, port, fixture, external service, shared temp path). Either kind of overlap = mis-grouped wave; split or re-order before handoff.
|
|
@@ -36,11 +36,14 @@ Each skill directory contains:
|
|
|
36
36
|
SKILL.md # required entry point
|
|
37
37
|
reference/ # optional progressive-disclosure files
|
|
38
38
|
<topic>.md # read directly when SKILL.md points at it
|
|
39
|
-
|
|
39
|
+
examples.md # read directly when SKILL.md points at it
|
|
40
|
+
<supporting>.md # prompt templates (dispatch payloads)
|
|
40
41
|
```
|
|
41
42
|
|
|
42
43
|
`reference/` is the pi pattern for keeping SKILL.md tight while still shipping deep guidance. See `.pi/skills/test-driven-development/reference/` and `.pi/skills/systematic-debugging/reference/` for working examples.
|
|
43
44
|
|
|
45
|
+
Prompt templates and other dispatch payloads - files filled in and passed wholesale into a subagent `task` - live as siblings of SKILL.md, not under `reference/`. See `requesting-code-review/code-reviewer.md` and the three `subagent-driven-development/*-prompt.md` files. The decision criterion is destination, not format: a file passed wholesale into a subagent's `task` is a sibling; a file read at a decision point for deep guidance, examples, or rationale is `reference/`. Some older skills (`systematic-debugging`, `test-driven-development`) keep deep-guidance `*.md` files flat as siblings, predating the `reference/` convention (obra/superpowers lineage) - that is descriptive history, not a mandate to move them.
|
|
46
|
+
|
|
44
47
|
### Reference Files Bundled With This Skill
|
|
45
48
|
|
|
46
49
|
Read directly when SKILL.md tells you to (path is given inline). The progressive-disclosure pattern is *which file to read when*, not a special tool:
|