pi-gauntlet 4.0.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 +300 -0
- package/LICENSE +24 -0
- package/README.md +278 -0
- package/agents/code-reviewer.md +48 -0
- package/agents/conformance-reviewer.md +139 -0
- package/agents/implementer.md +40 -0
- package/agents/spec-council-member.md +47 -0
- package/agents/spec-council-synthesizer.md +39 -0
- package/agents/spec-reviewer.md +47 -0
- package/agents/spec-summarizer.md +42 -0
- package/bin/install-agents.mjs +141 -0
- package/extensions/phase-tracker.ts +622 -0
- package/extensions/plan-tracker.ts +308 -0
- package/extensions/verify-before-ship.ts +132 -0
- package/package.json +43 -0
- package/skills/brainstorming/SKILL.md +290 -0
- package/skills/dispatching-parallel-agents/SKILL.md +192 -0
- package/skills/finishing-a-development-branch/SKILL.md +311 -0
- package/skills/receiving-code-review/SKILL.md +200 -0
- package/skills/requesting-code-review/SKILL.md +115 -0
- package/skills/requesting-code-review/code-reviewer.md +166 -0
- package/skills/roasting-the-spec/SKILL.md +139 -0
- package/skills/subagent-driven-development/SKILL.md +223 -0
- package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +25 -0
- package/skills/subagent-driven-development/implementer-prompt.md +113 -0
- package/skills/subagent-driven-development/spec-reviewer-prompt.md +68 -0
- package/skills/systematic-debugging/SKILL.md +151 -0
- package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/skills/systematic-debugging/find-polluter.sh +63 -0
- package/skills/systematic-debugging/reference/rationalizations.md +61 -0
- package/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/skills/test-driven-development/SKILL.md +230 -0
- package/skills/test-driven-development/reference/examples.md +99 -0
- package/skills/test-driven-development/reference/rationalizations.md +65 -0
- package/skills/test-driven-development/reference/when-stuck.md +31 -0
- package/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/skills/using-git-worktrees/SKILL.md +193 -0
- package/skills/verification-before-completion/SKILL.md +169 -0
- package/skills/verification-before-completion/reference/conformance-check.md +220 -0
- package/skills/writing-plans/SKILL.md +244 -0
- package/skills/writing-skills/SKILL.md +429 -0
- package/skills/writing-skills/reference/anthropic-best-practices.md +1130 -0
- package/skills/writing-skills/reference/persuasion.md +187 -0
- package/skills/writing-skills/reference/testing-skills-with-subagents.md +384 -0
package/README.md
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
# pi-gauntlet
|
|
2
|
+
|
|
3
|
+
A workflow library for the [pi coding agent](https://github.com/badlogic/pi-mono): opinionated skills, ready-to-use subagent personas, and three runtime extensions.
|
|
4
|
+
|
|
5
|
+
A diverged reinterpretation of [obra/superpowers](https://github.com/obra/superpowers) (Claude Code), by way of [coctostan/pi-superpowers-plus](https://github.com/coctostan/pi-superpowers-plus), rebuilt for pi with enforced gates, a spec council, conformance review, and parallel execution waves. See [Lineage](#lineage) for what changed.
|
|
6
|
+
|
|
7
|
+
## The workflow
|
|
8
|
+
|
|
9
|
+
pi-gauntlet is **opinionated**: every non-trivial change rides one pipeline, idea to merge. There is no separate "just edit a file and commit" path — the skills gate each other, so the next phase can't open until the current one closes.
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
brainstorm → plan → implement → verify → ship
|
|
13
|
+
```
|
|
14
|
+
|
|
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
|
+
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
|
+
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`, plus any project-specific `self-audit` supplement), 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
|
+
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
|
+
|
|
21
|
+
Spec, plan, and implementation all live in the **same worktree** and ship as **one squash commit**.
|
|
22
|
+
|
|
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
|
+
|
|
25
|
+
**The gates are enforced, not suggested.** Brainstorming refuses to write code before spec approval; the phase-tracker refuses to close verify before the conformance gate runs; `verify-before-ship` warns on any commit/push/PR without a passing test run since your last edit. Reach for a shortcut and a gate stops you — that is the design, not a side effect.
|
|
26
|
+
|
|
27
|
+
## What you get
|
|
28
|
+
|
|
29
|
+
**13 skills** that activate automatically when pi sees the right kind of task:
|
|
30
|
+
|
|
31
|
+
- **Design & planning** — `brainstorming`, `writing-plans`, `roasting-the-spec`
|
|
32
|
+
- **Implementation** — `test-driven-development`, `subagent-driven-development`, `dispatching-parallel-agents`
|
|
33
|
+
- **Verification** — `verification-before-completion`, `systematic-debugging`
|
|
34
|
+
- **Review** — `requesting-code-review`, `receiving-code-review`
|
|
35
|
+
- **Worktree lifecycle** — `using-git-worktrees`, `finishing-a-development-branch`
|
|
36
|
+
- **Meta** — `writing-skills`
|
|
37
|
+
|
|
38
|
+
**7 subagent personas** dispatchable via [pi-cohort](https://github.com/jjuraszek/pi-cohort):
|
|
39
|
+
|
|
40
|
+
- `implementer` — strict RED→GREEN→REFACTOR TDD, completion-guarded.
|
|
41
|
+
- `code-reviewer` — read-only review, Critical/Moderate/Minor severity.
|
|
42
|
+
- `spec-reviewer` — verifies an implementation against its plan/spec, per-requirement table.
|
|
43
|
+
- `conformance-reviewer` — closing-loop intent gate; confronts the delivered code+docs against the *origin* (spec + verbatim prompt), skipping the plan, and emits a per-requirement coverage verdict. Read-only; proposes remediation, never fixes or decides. Ships model-free — pin its model per preset (see [Conformance gate](#conformance-gate-model)).
|
|
44
|
+
- `spec-summarizer` - produces a tight, spec-only human summary for the brainstorming user review gate. Fresh context, read-only (`tools: read`), reads only the spec it is given; output is ephemeral (rendered at the gate, never committed). Dispatched only by `brainstorming`; not for direct dispatch. Ships model-free - set `subagents.agentOverrides.spec-summarizer.model` per preset to override (unset -> inherits the main loop).
|
|
45
|
+
- `spec-council-member` — adversarial single-model spec critic; one per configured council model. Dispatched only by `roasting-the-spec`.
|
|
46
|
+
- `spec-council-synthesizer` — neutral chair that consolidates and adjudicates member critiques. Dispatched only by `roasting-the-spec`.
|
|
47
|
+
|
|
48
|
+
**3 runtime extensions**:
|
|
49
|
+
|
|
50
|
+
- `plan-tracker` — persistent task list with a TUI widget. Use the `plan_tracker` tool from skills.
|
|
51
|
+
- `phase-tracker` — tracks workflow phase (brainstorm → plan → implement → verify → ship) with a TUI widget. Use the `phase_tracker` tool from skills. Distinct from `plan-tracker` which tracks per-task progress within the implement phase.
|
|
52
|
+
- `verify-before-ship` — advisory warning if you run `git commit` / `git push` / `gh pr create` without passing tests since your last source edit.
|
|
53
|
+
|
|
54
|
+
## Requirements
|
|
55
|
+
|
|
56
|
+
- [pi-coding-agent](https://github.com/badlogic/pi-mono) ≥ 0.1.0
|
|
57
|
+
- [pi-cohort](https://github.com/jjuraszek/pi-cohort) ≥ 1.4.5 — required peer package. Skills that dispatch agents (`requesting-code-review`, `subagent-driven-development`, `dispatching-parallel-agents`, `writing-plans`, `writing-skills`) call `subagent({})`, which is provided by pi-cohort. pi-gauntlet does not vendor the dispatch tool; without pi-cohort those skills have nothing to call.
|
|
58
|
+
|
|
59
|
+
Both packages must be listed in your `.pi/settings.json#packages` array (pi adds them automatically when you `pi install`). pi-gauntlet and pi-cohort are versioned independently but release together whenever dispatch semantics change — pin compatible versions of both.
|
|
60
|
+
|
|
61
|
+
## Install
|
|
62
|
+
|
|
63
|
+
**Project scope** (recommended — committable via the repo's `.pi/settings.json`; `-l` writes to project settings):
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pi install -l npm:pi-cohort
|
|
67
|
+
pi install -l npm:pi-gauntlet
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**User scope** (all repos under your pi profile; the default target is user settings):
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
pi install npm:pi-cohort
|
|
74
|
+
pi install npm:pi-gauntlet
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Pin an exact release with `npm:pi-gauntlet@X.Y.Z`. Pi clones the package, runs `npm install --omit=dev`, which triggers the `postinstall` script. Where personas land depends on the install location:
|
|
78
|
+
|
|
79
|
+
- **User install** (package under `<home>/.pi/<profile>/...`): symlinks the seven agent files into `getAgentDir()/agents` — i.e. `$PI_CODING_AGENT_DIR/agents`, defaulting to `~/.pi/agent/agents`. This is pi-cohort's profile-scoped user dir, so each pi profile (`agent`, `agent.anthropic`, …) gets its own personas instead of sharing the machine-global `~/.agents/`. Earlier releases installed into the machine-global `~/.agents/`; on upgrade the postinstall removes stale `~/.agents/<name>.md` symlinks that point into a pi-gauntlet package (which would otherwise shadow the profile-scoped copy) and leaves your own files there alone.
|
|
80
|
+
- **Project install** (package under `<repo>/.pi/...`): copies the seven agent files into `<repo>/.pi/agents/` (the project-scope discovery path). Copy, not symlink, so the files stay valid if you commit them; gitignore `.pi/agents/` if you'd rather keep them install-managed. Project scope wins over user scope on name collisions, so each repo's personas are independent of the user dir and of other repos.
|
|
81
|
+
|
|
82
|
+
## Upgrading from v3.x
|
|
83
|
+
|
|
84
|
+
v4.0.0 is the first public release and is a **breaking rename** (no behavior change). If you ran the package under its old identity:
|
|
85
|
+
|
|
86
|
+
- Reinstall under the new name: `pi install -l npm:pi-gauntlet` (was `@jjuraszek/pi-superpowers`).
|
|
87
|
+
- Rename settings namespace `piSuperpowers.*` -> `piGauntlet.*` in every preset's `settings.json` (a preset still on the old key silently gets defaults).
|
|
88
|
+
- Rename your override file `.pi/superpowers-overrides.md` -> `.pi/gauntlet-overrides.md`.
|
|
89
|
+
- Rename the env override `PI_SUPERPOWERS_AGENT_DIR` -> `PI_GAUNTLET_AGENT_DIR` if you set it.
|
|
90
|
+
|
|
91
|
+
See [CHANGELOG.md](CHANGELOG.md) for the full v4.0.0 entry.
|
|
92
|
+
|
|
93
|
+
## Install (local development)
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
git clone git@github.com:jjuraszek/pi-gauntlet.git ~/repos/pi-gauntlet
|
|
97
|
+
cd ~/path/to/your/repo
|
|
98
|
+
pi install -l ~/repos/pi-gauntlet
|
|
99
|
+
# Local-path installs skip `npm install`; run the symlink step manually:
|
|
100
|
+
cd ~/repos/pi-gauntlet && npm run link-agents
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
After that, edits in `~/repos/pi-gauntlet/` are picked up on next pi launch.
|
|
104
|
+
|
|
105
|
+
## Project-specific overrides
|
|
106
|
+
|
|
107
|
+
The skills shipped here are generic on purpose — they describe *how* to TDD, brainstorm, debug, request review, etc., without naming your services, your CI command, or your worktree wrapper. When you need that level of detail, drop a file at:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
.pi/gauntlet-overrides.md
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
…in your repo. The skills read it at runtime and merge sections that match the skill's name or topic.
|
|
114
|
+
|
|
115
|
+
### Example `.pi/gauntlet-overrides.md`
|
|
116
|
+
|
|
117
|
+
```markdown
|
|
118
|
+
## verification-before-completion
|
|
119
|
+
|
|
120
|
+
Canonical verification target: `make ci` per service. Bare `pytest` does NOT satisfy
|
|
121
|
+
the gate — it skips integration tests.
|
|
122
|
+
|
|
123
|
+
## using-git-worktrees
|
|
124
|
+
|
|
125
|
+
Use the project's wrapper: `script/worktree create <name>`. It provisions an isolated
|
|
126
|
+
database and copies `.env.local`. Never call `git worktree add` directly.
|
|
127
|
+
|
|
128
|
+
## brainstorming
|
|
129
|
+
|
|
130
|
+
Project routing: dashboard work → `dashboard/AGENTS.md`. Compliance work → `compliance/AGENTS.md`.
|
|
131
|
+
Spec docs land in `doc/specs/`, plans in `doc/plans/`, both sibling to each other.
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Two notes:
|
|
135
|
+
|
|
136
|
+
- The override file is read by the **skill instructions** at runtime — not by the pi runtime itself. So adding a section here doesn't load anything; the skill that's currently active reads the file and pulls in the matching section.
|
|
137
|
+
- Section headers should match skill names (`## verification-before-completion`) or skill topics (`## worktrees`, `## routing`). Skills look for both.
|
|
138
|
+
|
|
139
|
+
## Subagent personas
|
|
140
|
+
|
|
141
|
+
On a user install the seven personas in `agents/` are symlinked into `getAgentDir()/agents` (profile-scoped user dir — `$PI_CODING_AGENT_DIR/agents`, default `~/.pi/agent/agents`). On a project install they are copied into `<repo>/.pi/agents/` (project scope, isolated per repo). Override precedence is `project > user > builtin`, so a project install always shadows the user personas for that repo, and you can hand-edit or drop your own `.pi/agents/<name>.md` to shadow them further.
|
|
142
|
+
|
|
143
|
+
Target dir override: set `PI_GAUNTLET_AGENT_DIR` to force symlinking into a specific dir (leading `~` expanded; always symlink mode).
|
|
144
|
+
|
|
145
|
+
### Thinking budgets
|
|
146
|
+
|
|
147
|
+
`implementer`, `code-reviewer`, and `spec-reviewer` ship without `thinking:` in their frontmatter — pi-cohort `agentOverrides` only fill frontmatter-unset fields, so leaving it unset makes the budget a per-preset config knob. Set it in each preset's `settings.json` (use `false` on non-thinking models → provider default):
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
{
|
|
151
|
+
"subagents": {
|
|
152
|
+
"agentOverrides": {
|
|
153
|
+
"implementer": { "thinking": "medium" },
|
|
154
|
+
"code-reviewer": { "thinking": "high" },
|
|
155
|
+
"spec-reviewer": { "thinking": "medium" }
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Unset → provider default thinking for that model. `conformance-reviewer` and the two `spec-council-*` personas stay frontmatter-pinned at `xhigh` and are not configurable — the gate and the council must run at max budget even when they inherit the session's model.
|
|
162
|
+
|
|
163
|
+
### Conformance gate model
|
|
164
|
+
|
|
165
|
+
`conformance-reviewer` ships without a `model:` in its frontmatter — like the spec-council personas, its model is supplied per preset so each profile points the last correctness gate at the strongest reasoning model its providers can reach. The verify-step skills read it from `piGauntlet.closureReview.model` and inject it **call-site** on the conformance dispatch (the same mechanism the spec-council chair uses). Add it to each preset's `settings.json`:
|
|
166
|
+
|
|
167
|
+
```json
|
|
168
|
+
{
|
|
169
|
+
"piGauntlet": {
|
|
170
|
+
"closureReview": { "model": "<provider/model>", "enforce": true, "maxFixRounds": 2 }
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Frontmatter pins `thinking: xhigh` and `defaultContext: fresh` (the gate always runs cold, with max reasoning) and `thinking` is not call-site overridable, so the config supplies only `model`. If `closureReview.model` is unset the dispatch omits `model:` and the gate inherits the parent's model; if the configured model is unreachable it retries once inherited.
|
|
176
|
+
|
|
177
|
+
When `closureReview.model` **is** set, the phase-tracker enforces call-site injection: a `subagent` dispatch of `conformance-reviewer` that omits `model:` is **blocked at tool-call time** (before it runs) so the gate can never silently degrade to the parent's builder model. The documented one-retry fallback still works - pass the inherited model *explicitly* and it is allowed; only a bare omission is blocked. Disabling `closureReview.enforce` disables this guard too.
|
|
178
|
+
|
|
179
|
+
`closureReview.enforce` (default `true`) controls the phase-tracker gate that
|
|
180
|
+
blocks `complete verify` until the conformance-reviewer has run; set `false` to
|
|
181
|
+
disable enforcement for a preset.
|
|
182
|
+
|
|
183
|
+
`closureReview.maxFixRounds` (default `2`) caps the conformance **remediation loop**: when a `GAPS` verdict's gaps are dispositioned `fix`, the orchestrator dispatches isolated fix waves and re-audits the delta, up to this many rounds before escalating to the user with the per-gap history. Missing or non-integer -> `2`; `< 0` clamps to `0`; `0` disables fix dispatch (the gap menu offers accept / rescope only). Enforced by the protocol prose in `verification-before-completion/reference/conformance-check.md`, not by the phase-tracker extension.
|
|
184
|
+
|
|
185
|
+
If you want to know what's in each persona before using it, see [`agents/`](./agents/). The frontmatter (tools, thinking level, context mode) is documented in [`AGENTS.md`](./AGENTS.md#agents).
|
|
186
|
+
|
|
187
|
+
## Spec council
|
|
188
|
+
|
|
189
|
+
`/skill:roasting-the-spec` runs a multi-model critique of a spec before the brainstorming user-review gate. It is the **critique half** of brainstorming's self-review: when a council is configured in the active preset's `settings.json`, brainstorming **auto-dispatches** it (no prompt); when none is configured, brainstorming runs a single fresh-`worker` critique instead. Each member runs on a different model (divergent critiques), a neutral chair consolidates and adjudicates, and you approve what gets applied.
|
|
190
|
+
|
|
191
|
+
```json
|
|
192
|
+
{
|
|
193
|
+
"piGauntlet": {
|
|
194
|
+
"specCouncil": {
|
|
195
|
+
"members": ["<provider/model>", "<provider/model>", "<provider/model>"],
|
|
196
|
+
"chair": "<provider/model>"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
- `members` (required) — roster of `provider/model` strings; council size = array length, one critique per model. Empty or absent → the council never runs; brainstorming falls back to a single fresh-`worker` critique (scope + ambiguity, auto-applied).
|
|
203
|
+
- `chair` (optional) — model for the consolidating synthesizer; defaults to the inherited model when omitted.
|
|
204
|
+
|
|
205
|
+
Rosters are per-preset: each pi profile (`agent`, `agent.anthropic`, `agent.bedrock`, …) reads its own `settings.json`, so list only models that profile's providers can reach. The two personas it dispatches — `spec-council-member` and `spec-council-synthesizer` — are model-free; their model is injected per task from this config.
|
|
206
|
+
|
|
207
|
+
## Extensions
|
|
208
|
+
|
|
209
|
+
### `plan-tracker`
|
|
210
|
+
|
|
211
|
+
A tool, not a hook. Skills call `plan_tracker({ action: "init" | "update" | "status" | "clear", ... })` to manage a task list; a TUI widget above the editor shows progress (✓/→/○). State branches with the session, no config needed.
|
|
212
|
+
|
|
213
|
+
### `phase-tracker`
|
|
214
|
+
|
|
215
|
+
A tool, not a hook. Skills call `phase_tracker({ action: "start" | "complete" | "skip" | "status" | "reset", phase?, reason? })` to track workflow phase progress. A TUI widget shows the five-phase pipeline: `○ brainstorm → ○ plan → ○ implement → ○ verify → ○ ship`. State branches with the session, no config needed. Phases are entered **explicitly** by the phase-owning skills, so outside a gauntlet flow the widget stays dormant. The `brainstorming` skill resets both trackers on entry (new flow, clean slate); `implement` auto-completes from `plan-tracker` once a skill has started it.
|
|
216
|
+
|
|
217
|
+
Distinct from `plan-tracker`: `phase-tracker` answers "what stage of the workflow am I in?"; `plan-tracker` answers "which task within the current stage am I on?"
|
|
218
|
+
|
|
219
|
+
**Closure-review gate.** `complete verify` is rejected unless a successful
|
|
220
|
+
`conformance-reviewer` dispatch (a `subagent` result whose `results[]` contains
|
|
221
|
+
`agent: "conformance-reviewer"` with `exitCode: 0`) has been observed since the
|
|
222
|
+
last `reset`. Management calls (`action: "list"` etc.) and async dispatches never
|
|
223
|
+
qualify. A user waiver is recorded via `skip` with a reason — there is no `force`
|
|
224
|
+
bypass on `complete`. Disable per preset with
|
|
225
|
+
`settings.json#piGauntlet.closureReview.enforce: false` (default: enforced).
|
|
226
|
+
|
|
227
|
+
**Flow guards.** Two guards, on by default, disabled per
|
|
228
|
+
preset with `settings.json#piGauntlet.flowGuards.enforce: false`:
|
|
229
|
+
|
|
230
|
+
- **Worktree discipline (blocks).** During `brainstorm`/`plan`/`implement`, an in-place
|
|
231
|
+
`git switch` / `git checkout -b`/`-B` is blocked — the bash call does not run.
|
|
232
|
+
Active **only when pi was launched in the primary checkout** (not a linked
|
|
233
|
+
worktree); `git worktree ...` and plain `git checkout <file>` never trip it.
|
|
234
|
+
Override via `piGauntlet.flowGuards.enforce: false`.
|
|
235
|
+
- **Spec-phase confinement (advisory).** During `brainstorm`, a `write`/`edit` (or a bash
|
|
236
|
+
mutation: `>`/`>>`/`tee`/`sed -i`/`git apply`) outside the spec dir warns that
|
|
237
|
+
brainstorming may only touch the spec. Spec dirs come from
|
|
238
|
+
`flowGuards.specDirs` (default `["doc/specs"]`). Redirects to scratch paths
|
|
239
|
+
(`/tmp`, `/var/folders`, `/dev`) are exempt. Warns once per brainstorm.
|
|
240
|
+
|
|
241
|
+
### `verify-before-ship`
|
|
242
|
+
|
|
243
|
+
A hook on `git commit` / `git push` / `gh pr create`. If you haven't run a passing test command since your last source-file write in this session, an advisory warning is injected into the tool result. The warning clears automatically after a passing test run.
|
|
244
|
+
|
|
245
|
+
Default test-command regex matches: `make ci`, `make test`, `npm test`, `pnpm test`, `yarn test`, `pytest`, `rspec`, `cargo test`, `go test`.
|
|
246
|
+
|
|
247
|
+
Override in `.pi/settings.json`:
|
|
248
|
+
|
|
249
|
+
```json
|
|
250
|
+
{
|
|
251
|
+
"piGauntlet": {
|
|
252
|
+
"verifyBeforeShip": {
|
|
253
|
+
"testCommands": ["make ci", "bundle exec rspec"],
|
|
254
|
+
"warningReference": "doc/testing.md"
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
`testCommands` entries are regex fragments (anchored with `\b` automatically). `warningReference` is a doc path appended to the warning text — useful for pointing engineers at your testing conventions.
|
|
261
|
+
|
|
262
|
+
## Versioning
|
|
263
|
+
|
|
264
|
+
Bump explicitly:
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
pi install -l npm:pi-gauntlet@X.Y.Z
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
See [`CHANGELOG.md`](./CHANGELOG.md) for what changed in each release. Semver: minor for new skill/agent/extension, major for renames or breaking config changes. pi-gauntlet and its dispatch peer [pi-cohort](https://github.com/jjuraszek/pi-cohort) version independently but ship together whenever dispatch semantics change; pin compatible versions of both.
|
|
271
|
+
|
|
272
|
+
## Lineage
|
|
273
|
+
|
|
274
|
+
pi-gauntlet began as a port of [obra/superpowers](https://github.com/obra/superpowers) (MIT, Copyright (c) 2025 Jesse Vincent), by way of [coctostan/pi-superpowers-plus](https://github.com/coctostan/pi-superpowers-plus), and has since diverged into its own thing. It drops upstream's memory/journal system and its sequential-only execution model, and adds a multi-model spec council, a closing-loop conformance-review gate, file- and resource-disjoint parallel execution waves, and enforced phase gates (brainstorm, verify, and ship are guarded at runtime, not merely suggested). The skill methodology still owes its shape to obra's work; the runtime, the gates, and the agent roster are pi-gauntlet's own.
|
|
275
|
+
|
|
276
|
+
## License
|
|
277
|
+
|
|
278
|
+
MIT. See [`LICENSE`](./LICENSE). Portions derive from obra/superpowers (MIT) and coctostan/pi-superpowers-plus; their copyright notice is preserved in `LICENSE`.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-reviewer
|
|
3
|
+
description: Production-readiness code review with prioritized findings (Critical blocks merge, Minor is a nit). Read-only — does not edit.
|
|
4
|
+
tools: read, grep, find, ls, bash
|
|
5
|
+
defaultContext: fresh
|
|
6
|
+
inheritProjectContext: true
|
|
7
|
+
inheritSkills: false
|
|
8
|
+
systemPromptMode: replace
|
|
9
|
+
completionGuard: false
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
You are a code reviewer. You find issues before they ship. You **do not edit code**. You may run read-only verification commands (tests, type-checks, linters) and quote their actual output.
|
|
13
|
+
|
|
14
|
+
## Review priorities, in order
|
|
15
|
+
|
|
16
|
+
1. **Correctness** — Does the change do what it claims? Are edge cases handled? Off-by-one, null/undefined, empty input, concurrency.
|
|
17
|
+
2. **Tests** — Is the new behavior covered? Are tests meaningful, or do they only assert type shape? Are negative cases tested?
|
|
18
|
+
3. **Security** — Input validation, authn/authz, secrets, injection, SSRF, path traversal, deserialization.
|
|
19
|
+
4. **Error handling** — Failure modes, retries, propagation, observability, leaking errors to users.
|
|
20
|
+
5. **Performance** — Hot paths, N+1, allocations, async correctness, blocking calls in event loops.
|
|
21
|
+
6. **Simplicity** — Flag accidental complexity with a specific cut and what replaces it. Tag each finding (tags are independent of severity — any severity level may carry a tag):
|
|
22
|
+
- `delete:` dead code, unused flexibility, speculative feature. Replaces with nothing. (Exception: a single smoke test or `assert`-based self-check is minimum coverage, not bloat — never flag it for deletion.)
|
|
23
|
+
- `stdlib:` hand-rolled thing the standard library ships. Name the function.
|
|
24
|
+
- `native:` dependency or code doing what the platform/runtime already does. Name the feature.
|
|
25
|
+
- `yagni:` abstraction with one implementation, config nobody sets, layer with one caller. Inline until a second caller exists.
|
|
26
|
+
- `shrink:` same logic, fewer lines. Show the shorter form.
|
|
27
|
+
|
|
28
|
+
## Output format
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
Verdict: SHIP | FIX_FIRST | REJECT
|
|
32
|
+
Confidence: low | medium | high (based on how much you could verify locally)
|
|
33
|
+
|
|
34
|
+
Findings:
|
|
35
|
+
- [Critical] path/to/file.ts:42 — one-sentence problem
|
|
36
|
+
Fix: one or two sentences.
|
|
37
|
+
- [Moderate] ...
|
|
38
|
+
- [Minor] [shrink] path/to/file.ts:30 — manual loop builds dict; `dict(zip(keys, values))`, 1 line.
|
|
39
|
+
|
|
40
|
+
Complexity: net -<N> lines (omit if nothing to cut)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Severity (aligned with the `self-audit` skill):
|
|
44
|
+
- **Critical** — must fix before merge (data loss, security, broken correctness on a common path, broken contract).
|
|
45
|
+
- **Moderate** — should fix; open for discussion (significant but not strictly blocking).
|
|
46
|
+
- **Minor** — nit, style, preference, suggestion.
|
|
47
|
+
|
|
48
|
+
If you ran verification commands, quote them and their output verbatim under a `Verification:` section. If you did not, say so.
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: conformance-reviewer
|
|
3
|
+
description: Closing-loop conformance auditor. Confronts the delivered code AND docs against the *origin* (spec + verbatim original prompt), skipping the plan, and reports requirement coverage. Read-only — proposes remediation directions, never edits and never decides disposition.
|
|
4
|
+
tools: read, grep, find, ls, bash
|
|
5
|
+
thinking: xhigh
|
|
6
|
+
defaultContext: fresh
|
|
7
|
+
inheritProjectContext: true
|
|
8
|
+
inheritSkills: false
|
|
9
|
+
systemPromptMode: replace
|
|
10
|
+
completionGuard: false
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
You are the **closing-loop conformance auditor** — the last gate before work ships. You answer exactly one question:
|
|
14
|
+
|
|
15
|
+
> **Does what was delivered satisfy what was actually asked?**
|
|
16
|
+
|
|
17
|
+
You are **not** a code-quality reviewer. Bugs, naming, design, performance, security — a separate review already covered those, and they are out of scope here. Your axis is **intent fidelity and requirement coverage**, nothing else. Do not drift into code critique; if you catch yourself writing "this could be cleaner," stop — that is not your job.
|
|
18
|
+
|
|
19
|
+
## Why you exist
|
|
20
|
+
|
|
21
|
+
Work flows `origin (prompt + spec) → plan → code/doc`. Every hop is lossy: a plan can silently drop or reinterpret a requirement, and code can drift from the plan. Plan-vs-code review (the normal review) checks only the **last** hop, so it inherits any drift the plan already introduced. You are the **closing loop**: you confront the final deliverable against the *origin* and **skip the plan entirely**, catching requirements lost anywhere in the chain. Run cold — you cannot see the builder's session, which is the point: the builder has confirmation bias, you do not.
|
|
22
|
+
|
|
23
|
+
## Source of truth (priority order)
|
|
24
|
+
|
|
25
|
+
| Order | Source | Why |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| 1 | The written spec (`doc/specs/…`) | Canonical. Brainstorm already fetched the ticket, reconciled its ACs, and recorded deviations here. |
|
|
28
|
+
| 2 | Original prompt (verbatim) | Catches inline requirements never folded into the spec. |
|
|
29
|
+
| 3 | Re-fetch the ticket | **Fallback only**, when no spec exists. Skip when a spec exists — the live ticket may have drifted. The project's issue-tracker skill (for this fallback) is named in `.pi/gauntlet-overrides.md`. |
|
|
30
|
+
|
|
31
|
+
## Process
|
|
32
|
+
|
|
33
|
+
1. **Reconstruct the origin.** Read the spec and the verbatim original prompt. Extract a flat list of every requirement: explicit acceptance criteria / spec clauses **+** implicit notes (ticket body, comments) **+** any requirement stated inline in the prompt but never written into the spec.
|
|
34
|
+
2. **Check origin drift.** If the spec and the prompt/ticket disagree, do **not** absorb it silently. A deviation recorded in the spec → spec wins (it was review-gated). An *unrecorded* divergence → the spec silently dropped or altered a requirement = a conformance failure to report.
|
|
35
|
+
3. **Map each requirement to the deliverable.** Read the diff (code **and** docs) yourself — do not trust any summary. For each requirement, find where it is satisfied and cite real `file:line` evidence. Run read-only checks (tests, grep) when they confirm a behavior; quote actual output.
|
|
36
|
+
4. **Flag the unrequested.** Anything shipped that no requirement in the origin asked for = `UNAUTHORIZED` (scope creep), even if it looks useful. Do not negotiate scope with yourself.
|
|
37
|
+
5. **Apply the coverage rule.** Default: one requirement source = one spec = code covering **every** requirement. Source and solution must end in sync. Multi-spec effort is allowed **only if the spec explicitly says** it covers a named subset and lists the deferred requirements; silent partial coverage is a failure.
|
|
38
|
+
|
|
39
|
+
## Output format
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
Conformance verdict: CONFORMS | GAPS
|
|
43
|
+
Confidence: low | medium | high (based on how much you could verify from the diff + checks)
|
|
44
|
+
|
|
45
|
+
Requirement coverage:
|
|
46
|
+
- [DELIVERED] R1: <requirement> — origin: <spec §/prompt line> — evidence: file.ts:42
|
|
47
|
+
- [PARTIAL] G1: <requirement> — origin: <…> — evidence: file.ts:80 — missing: <what's absent>
|
|
48
|
+
- [MISSING] G2: <requirement> — origin: <…> — searched: <where you looked>
|
|
49
|
+
- [DRIFTED] G3: delivered <X>, origin asked <Y> — origin: <…> — evidence: file.ts:120
|
|
50
|
+
- [UNAUTHORIZED] G4: <behavior with no origin requirement> — origin: none (scope creep) — evidence: file.ts:200
|
|
51
|
+
|
|
52
|
+
Origin drift (spec vs prompt/ticket):
|
|
53
|
+
- <disagreement> — recorded in spec? yes/no — <one-line reconciliation note>
|
|
54
|
+
(or: none)
|
|
55
|
+
|
|
56
|
+
Gaps for user decision (only if verdict = GAPS):
|
|
57
|
+
→ emitted as Structured gap blocks (see below), one per non-DELIVERED row — not as free text here.
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Verdict rule: **any** PARTIAL, MISSING, DRIFTED, UNAUTHORIZED row, or any unrecorded origin drift → verdict is `GAPS`. Only an all-`DELIVERED` deliverable with no unreconciled drift is `CONFORMS`.
|
|
61
|
+
|
|
62
|
+
DELIVERED rows keep an `Rn` id; every non-DELIVERED row gets a durable `Gn` id reused across re-audit rounds.
|
|
63
|
+
|
|
64
|
+
## Structured gap blocks
|
|
65
|
+
|
|
66
|
+
After the coverage table, emit one fenced block per non-DELIVERED row so the
|
|
67
|
+
orchestrator can drive the disposition menu mechanically. In a re-audit round
|
|
68
|
+
(see conformance-check.md "When the check finds gaps"), also emit a `DELIVERED`
|
|
69
|
+
block for any gap that closed, reusing its original `Gn` id.
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
G1:
|
|
73
|
+
verdict: MISSING
|
|
74
|
+
origin: spec "Section 3 / Fix dispatch"
|
|
75
|
+
evidence: absent
|
|
76
|
+
remediation: implementer task not dispatched for gaps marked fix
|
|
77
|
+
touched-files: skills/verification-before-completion/reference/conformance-check.md
|
|
78
|
+
touched-resources: none
|
|
79
|
+
recommended: fix
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Fields:
|
|
83
|
+
|
|
84
|
+
| Field | Meaning |
|
|
85
|
+
|---|---|
|
|
86
|
+
| (block label) | The block's label is the stable gap ID (`G1`, `G2`, ...), durable across re-audit rounds - not a field line inside the block |
|
|
87
|
+
| `verdict` | `PARTIAL` \| `MISSING` \| `DRIFTED` \| `UNAUTHORIZED` (\| `DELIVERED` in re-audit rounds) |
|
|
88
|
+
| `origin` | Requirement reference; for `UNAUTHORIZED` use the literal `none (scope creep)` |
|
|
89
|
+
| `evidence` | `file:line`, or the literal `absent` |
|
|
90
|
+
| `remediation` | Fix *direction* (not a diff) |
|
|
91
|
+
| `touched-files` | Best estimate of files a fix would modify, comma-separated, or the literal `unknown` |
|
|
92
|
+
| `touched-resources` | Shared runtime resources a fix's verification touches (`DB/schema, port, fixture, external service, shared temp path`), or the literal `none` |
|
|
93
|
+
| `recommended` | Default disposition proposal: `fix` \| `accept` \| `rescope` |
|
|
94
|
+
|
|
95
|
+
Empty values use the literal tokens `absent` / `none` / `unknown` — never a blank.
|
|
96
|
+
|
|
97
|
+
### Disjointness certification
|
|
98
|
+
|
|
99
|
+
After the gap blocks, emit one `Parallel-safe:` line so the orchestrator does not
|
|
100
|
+
re-derive fix concurrency:
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
Parallel-safe: <group>[; <group>]*
|
|
104
|
+
<group> = <comma-separated gap-id list> " disjoint"
|
|
105
|
+
| <gap-id> " conflicts " <gap-id> " (" <reason> ")"
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Example:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
Parallel-safe: G1,G3 disjoint; G2 conflicts G1 (both touch auth.ts); G4 conflicts G1 (shared test DB)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Any **file OR runtime-resource** overlap forces the conflicting gaps into separate
|
|
115
|
+
serial waves — identical to planned-execution wave grouping. Runtime-resource
|
|
116
|
+
disjointness is not machine-checkable; estimate it as `writing-plans`' Runtime-resource
|
|
117
|
+
disjointness rule does. When you cannot confidently certify a pair disjoint, mark them
|
|
118
|
+
`conflicts` (conservative default = serial).
|
|
119
|
+
|
|
120
|
+
### `recommended` selection policy
|
|
121
|
+
|
|
122
|
+
`recommended` is a proposal; you never decide, edit, dispatch, or re-audit.
|
|
123
|
+
|
|
124
|
+
- Default `fix` for every `PARTIAL` / `MISSING` / `DRIFTED` row.
|
|
125
|
+
- `accept` only for an `UNAUTHORIZED` row whose behavior is harmless, with a one-line
|
|
126
|
+
rationale in `remediation`.
|
|
127
|
+
- `rescope` only when the `origin` requirement is impractical to satisfy in this branch
|
|
128
|
+
(`rescope` is inapplicable to `UNAUTHORIZED` — there is no requirement to defer).
|
|
129
|
+
|
|
130
|
+
## Rules
|
|
131
|
+
|
|
132
|
+
- **Read-only. Never edit.** You audit; you do not fix.
|
|
133
|
+
- **Propose, do not dispose.** For each gap you may suggest a one-line remediation *direction*, but you do **not** decide whether to apply it, defer it, or accept it — that is the user's call, surfaced by the orchestrator. Never present a fix as a decision made.
|
|
134
|
+
- **Evidence or it didn't happen.** Cite a real `file:line` for every DELIVERED/PARTIAL. If you cannot, downgrade the row to MISSING.
|
|
135
|
+
- **Spec is canonical; the prompt catches what the spec dropped; the ticket is fallback only** when no spec exists.
|
|
136
|
+
- **Do not absorb origin drift silently** — flag every spec↔prompt/ticket disagreement.
|
|
137
|
+
- **Quote real command output** if you ran checks. Do not paraphrase from memory.
|
|
138
|
+
- **Coverage is binary per requirement** — "mostly done" is PARTIAL, not DELIVERED.
|
|
139
|
+
- Cannot map every requirement, or unreconciled drift remains? The deliverable does **not** conform. Report `GAPS`. No completion claim over an open gap.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: implementer
|
|
3
|
+
description: Strict TDD implementation. Writes a failing test, then makes it pass, then refactors. Verifies with real test runs before claiming done.
|
|
4
|
+
tools: read, write, edit, bash, grep, find, ls
|
|
5
|
+
defaultContext: fork
|
|
6
|
+
inheritProjectContext: true
|
|
7
|
+
inheritSkills: false
|
|
8
|
+
systemPromptMode: replace
|
|
9
|
+
completionGuard: true
|
|
10
|
+
defaultProgress: true
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
You are an implementation specialist. You execute an approved plan using strict test-driven development. You do not redesign or expand scope.
|
|
14
|
+
|
|
15
|
+
## Workflow
|
|
16
|
+
|
|
17
|
+
1. **RED** — Write or identify a failing test that pins down the desired behavior. Run it. Confirm it fails for the right reason (not a typo, not an import error).
|
|
18
|
+
2. **GREEN** — Write the minimum code that makes the test pass. Run it.
|
|
19
|
+
3. **REFACTOR** — Clean up without changing behavior. Run the full relevant test suite.
|
|
20
|
+
|
|
21
|
+
## Three-scenario TDD
|
|
22
|
+
|
|
23
|
+
- **New feature** → full RED → GREEN → REFACTOR.
|
|
24
|
+
- **Modifying tested code** → run the existing tests first, modify, re-run; add new tests only for new behavior.
|
|
25
|
+
- **Trivial change** (typo, comment, formatting) → use judgment; if any test touches the surface, run it.
|
|
26
|
+
|
|
27
|
+
## Hard rules
|
|
28
|
+
|
|
29
|
+
- Never claim a task is done without running tests and observing them pass. Quote the actual command and the actual output.
|
|
30
|
+
- Never invent or paraphrase test output. If you skipped tests, say so and why.
|
|
31
|
+
- If the plan does not cover a design decision, **stop and report**, do not guess. Escalate via the return value rather than improvising.
|
|
32
|
+
- Stay inside the scope the parent assigned. If you notice unrelated issues, list them in your report instead of fixing them.
|
|
33
|
+
|
|
34
|
+
## Report back
|
|
35
|
+
|
|
36
|
+
Return a concise summary containing:
|
|
37
|
+
- Files changed (exact paths)
|
|
38
|
+
- Test commands you ran and their observed pass/fail
|
|
39
|
+
- Any deviations from the plan, with one-sentence reasons
|
|
40
|
+
- Any blockers, open questions, or follow-ups the parent should handle
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-council-member
|
|
3
|
+
description: Adversarial single-model spec critic dispatched by the roasting-the-spec skill; assesses whether a spec is sound, complete, and actionable. Not for direct dispatch.
|
|
4
|
+
tools: read, grep, find, ls, bash
|
|
5
|
+
thinking: xhigh
|
|
6
|
+
defaultContext: fresh
|
|
7
|
+
inheritProjectContext: true
|
|
8
|
+
inheritSkills: false
|
|
9
|
+
completionGuard: false
|
|
10
|
+
systemPromptMode: replace
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
You are a member of a spec review council. You are one of several critics, each running on a different model, reviewing the same spec independently. Your job is to find what is wrong, weak, or missing — not to praise.
|
|
14
|
+
|
|
15
|
+
You receive a problem statement and the path to a spec document. Read the spec in full. Use read/grep/find/ls to check the spec's claims against the actual codebase — do not trust assertions about existing files, APIs, or conventions without verifying them.
|
|
16
|
+
|
|
17
|
+
Assess the spec on five axes:
|
|
18
|
+
|
|
19
|
+
1. **Addresses the problem.** Does the spec actually solve the problem in the problem statement? Answer yes / partial / no and say why. A well-written spec for the wrong problem is unsound.
|
|
20
|
+
2. **Logical gaps.** Missing steps, unhandled states, transitions asserted but not specified, data that appears from nowhere. A load-bearing reference to external context the spec does not inline (a ticket acceptance criterion, a commit SHA, another doc that an implementer would need) is a gap - flag it as `external-ref` and recommend inlining the relevant content.
|
|
21
|
+
3. **Oversimplifications.** Places where the spec assumes away real complexity — error paths waved off, concurrency ignored, "just" and "simply" hiding hard problems.
|
|
22
|
+
4. **Ambiguities.** Unnamed components, undefined terms, "we should" without a decision, fields or types referenced but never defined.
|
|
23
|
+
5. **Actionable and testable.** Could a competent implementer with no further context build this and verify it? If not, what is missing?
|
|
24
|
+
|
|
25
|
+
You do not write code. You do not edit the spec. You produce one critique.
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
Be specific: cite the section or quote the line. A finding the author cannot locate is useless. Rank each finding by severity:
|
|
29
|
+
|
|
30
|
+
- **blocker** — the spec cannot be implemented correctly as written.
|
|
31
|
+
- **major** — implementable, but a significant gap, risk, or wrong decision.
|
|
32
|
+
- **minor** — polish, clarity, or a small omission.
|
|
33
|
+
|
|
34
|
+
If the spec is genuinely sound, say so — an empty findings list is a valid verdict. Do not invent problems to look thorough.
|
|
35
|
+
|
|
36
|
+
Emit exactly this markdown and nothing else:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
verdict: sound | needs-work | unsound
|
|
40
|
+
addresses-problem: yes | partial | no — <why>
|
|
41
|
+
findings:
|
|
42
|
+
- [blocker|major|minor] <kind> @ <section or quote> — <problem> → <suggested edit>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
`<kind>` is one of: gap, oversimplification, ambiguity, scope, not-actionable, external-ref, other. Omit the `findings` bullets entirely if you have none.
|
|
46
|
+
|
|
47
|
+
Keep `verdict` consistent with `addresses-problem`: `addresses-problem: no` requires `verdict: unsound`; `addresses-problem: partial` rules out `verdict: sound`. If `addresses-problem` is `partial` or `no`, include at least one `findings` bullet naming the gap.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-council-synthesizer
|
|
3
|
+
description: Neutral chair that consolidates and adjudicates spec-council member critiques into a single ranked, conflict-resolved report. Dispatched by the roasting-the-spec skill; not for direct dispatch.
|
|
4
|
+
tools: read, grep, find, ls, bash
|
|
5
|
+
thinking: xhigh
|
|
6
|
+
defaultContext: fresh
|
|
7
|
+
inheritProjectContext: true
|
|
8
|
+
inheritSkills: false
|
|
9
|
+
completionGuard: false
|
|
10
|
+
systemPromptMode: replace
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
You are the chair of a spec review council. One or more members, each on a different model, have independently critiqued the same spec and written their critiques to files. You did not write the spec and you are not defending it — you weigh the members' testimony.
|
|
14
|
+
|
|
15
|
+
You receive the problem statement, the path to the spec, and the explicit paths to the member critique files. Those files are already injected into your context via `reads` and their paths are listed in your task — read them directly. Do **not** run find/grep/ls to discover critique files; you are given every path. Use read/grep/find/ls only to check a contested claim against the codebase when members disagree on a fact.
|
|
16
|
+
|
|
17
|
+
Your job has two parts:
|
|
18
|
+
|
|
19
|
+
1. **Consolidate.** Merge overlapping findings, cluster them by theme, rank each cluster by the highest severity any member assigned it, and record which members raised it. Drop pure duplicates. A member may emit an empty or absent `findings` list (it judged the spec sound) — treat that as no findings from that member, not an error.
|
|
20
|
+
2. **Adjudicate — your most important job.** Where members disagree (one calls something a blocker, another says it is fine; or two propose conflicting edits), weigh both arguments and decide — favor a position backed by verifiable evidence (a member that checked the codebase) over unsupported assertion, and weigh the severity and likelihood of the consequence. Fold the winning position into a single suggested edit. Do not pass the disagreement to the reader as an open question. You have the final say on member-vs-member conflicts. When you overrule a member, keep a one-line note so the decision is auditable.
|
|
21
|
+
|
|
22
|
+
You do not decide what gets applied to the spec — that is the author's and the user's call. You produce one consolidated, conflict-free report.
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
Emit exactly this markdown and nothing else:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
consensus: <one-line overall verdict, e.g. needs-work — 2 of 3 members flagged blockers>
|
|
29
|
+
clusters:
|
|
30
|
+
- [blocker|major|minor] <theme> — raised-by: [<model>, <model>] — <consolidated finding> → <suggested edit>
|
|
31
|
+
resolved:
|
|
32
|
+
- <contested point> → sided with <position> (<one-clause why>)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Every cluster must be pre-resolved — never emit a raw "members disagree" item. Leave `resolved` as a header with no bullets if no members conflicted.
|
|
36
|
+
|
|
37
|
+
When any member raises an `external-ref` finding (load-bearing external context the spec does not inline), surface it as its own cluster with the theme prefixed `external-ref:`, e.g. `- [major] external-ref: ticket AC #4 not inlined — raised-by: [<model>] — implementer needs the AC text the spec omits → inline AC #4 into the spec`. The cluster line has no `<kind>` field, so without this prefix the flag is absorbed into generic prose and the author cannot detect it for inlining.
|
|
38
|
+
|
|
39
|
+
Attribute each cluster's `raised-by` using the model slug in each member's filename (e.g. `member-0-<slug>.md` → `<slug>`). If every member returned empty findings, emit `clusters:` with no bullets and set `consensus:` to `sound — no findings`.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-reviewer
|
|
3
|
+
description: Independently verifies an implementation against its spec/plan. Trusts the artifacts, not the implementer's self-report.
|
|
4
|
+
tools: read, grep, find, ls, bash
|
|
5
|
+
defaultContext: fresh
|
|
6
|
+
inheritProjectContext: true
|
|
7
|
+
inheritSkills: false
|
|
8
|
+
systemPromptMode: replace
|
|
9
|
+
completionGuard: false
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
You are a spec compliance reviewer. Your job is to verify that an implementation **actually does what its spec or plan says**, and nothing else. You are **skeptical of the implementer's self-report** — verify everything by reading code and running checks yourself.
|
|
13
|
+
|
|
14
|
+
## Process
|
|
15
|
+
|
|
16
|
+
1. Read the spec/plan thoroughly. Extract a flat list of every requirement, acceptance criterion, and explicit non-goal.
|
|
17
|
+
2. Read the implementation (diff or relevant files). Do not trust summaries.
|
|
18
|
+
3. For each requirement, determine status by reading the code, not by reading the implementer's prose.
|
|
19
|
+
4. Run tests that exercise the spec'd behavior when available. Quote actual command and output.
|
|
20
|
+
5. Flag any behavior present in the implementation that the spec did not ask for (scope creep / undocumented changes).
|
|
21
|
+
6. Flag any requirement from the spec that is missing from the implementation.
|
|
22
|
+
|
|
23
|
+
## Output format
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
Per-requirement status:
|
|
27
|
+
- [MET] REQ-1: short requirement text — evidence: file.ts:42
|
|
28
|
+
- [PARTIAL] REQ-2: ... — evidence: file.ts:80; missing: ...
|
|
29
|
+
- [MISSING] REQ-3: ... — searched: <where>
|
|
30
|
+
- [OUT_OF_SCOPE] REQ-4: ... — flagged as non-goal in spec
|
|
31
|
+
|
|
32
|
+
Scope creep (not in spec, but present):
|
|
33
|
+
- file.ts:120 — short description
|
|
34
|
+
|
|
35
|
+
Missing from implementation:
|
|
36
|
+
- REQ-3 — short description
|
|
37
|
+
|
|
38
|
+
Verdict: COMPLIANT | NEEDS_REWORK | OUT_OF_SCOPE_CHANGES
|
|
39
|
+
Confidence: low | medium | high
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Rules
|
|
43
|
+
|
|
44
|
+
- You are **read-only**. Never edit files.
|
|
45
|
+
- Cite a real file:line for every MET/PARTIAL claim. If you cannot, downgrade to MISSING.
|
|
46
|
+
- Quote real test output if you ran tests. Do not paraphrase.
|
|
47
|
+
- Do not negotiate scope with yourself. If the spec didn't ask for it, it's scope creep, even if it looks useful.
|