pincer-workflow 0.2.3 → 0.4.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 (35) hide show
  1. package/README.md +19 -14
  2. package/bin/pincer.js +47 -11
  3. package/package.json +2 -2
  4. package/template/.agents/skills/pincer-code/SKILL.md +62 -17
  5. package/template/.agents/skills/pincer-evaluate/SKILL.md +85 -15
  6. package/template/.agents/skills/pincer-narrow/SKILL.md +67 -22
  7. package/template/.agents/skills/pincer-plan/SKILL.md +62 -25
  8. package/template/.agents/skills/pincer-release/SKILL.md +31 -12
  9. package/template/.agents/skills/pincer-status/SKILL.md +5 -3
  10. package/template/.claude/commands/pincer-code.md +61 -16
  11. package/template/.claude/commands/pincer-evaluate.md +85 -15
  12. package/template/.claude/commands/pincer-narrow.md +65 -20
  13. package/template/.claude/commands/pincer-plan.md +57 -20
  14. package/template/.claude/commands/pincer-release.md +30 -11
  15. package/template/.claude/commands/pincer-status.md +5 -3
  16. package/template/.claude/hooks/block-dangerous.sh +7 -18
  17. package/template/.claude/hooks/hook-policy.cjs +351 -0
  18. package/template/.claude/hooks/ticket-guard.sh +6 -63
  19. package/template/.claude/references/prd-template.md +41 -9
  20. package/template/.claude/references/ticket-template.md +37 -4
  21. package/template/.codex/README.md +4 -4
  22. package/template/.github/prompts/pincer-code.prompt.md +61 -16
  23. package/template/.github/prompts/pincer-evaluate.prompt.md +85 -15
  24. package/template/.github/prompts/pincer-narrow.prompt.md +65 -20
  25. package/template/.github/prompts/pincer-plan.prompt.md +57 -20
  26. package/template/.github/prompts/pincer-release.prompt.md +30 -11
  27. package/template/.github/prompts/pincer-status.prompt.md +5 -3
  28. package/template/AGENTS.md +11 -5
  29. package/template/docs/dry-run-checklist.md +143 -27
  30. package/template/docs/release-checklist.md +35 -0
  31. package/template/scripts/pincer-evidence.cjs +292 -0
  32. package/template/scripts/pincer-status.sh +83 -26
  33. package/template/scripts/pincer-ticket-lib.sh +321 -0
  34. package/template/scripts/pincer-ticket.sh +58 -47
  35. package/template/scripts/sync-prompts.sh +6 -1
@@ -7,20 +7,34 @@ description: "Create a PRD through brief discovery, codebase scan, and an archit
7
7
 
8
8
  # /pincer-plan — PRD Creation
9
9
 
10
- You are turning a task brief into a compact PRD. This runs inside a short delivery
11
- timebox (~2 hours total), so discovery is brief and the PRD is lean. The PRD feeds
10
+ You are turning a task brief into a reviewable PRD. Scale discovery and detail to
11
+ the change's uncertainty, risk, and any time budget the user supplied. The PRD feeds
12
12
  `/pincer-narrow` next.
13
13
 
14
+ Choose the planning profile and record why it fits: `profile: small` for bounded
15
+ scope, low risk, known behavior and straightforward verification; otherwise
16
+ `standard` (the default). Few changed lines alone do not qualify — migrations,
17
+ authorization boundaries, uncertain requirements and broad effects need proper
18
+ investigation even for a tiny patch. Honor an explicit budget the user supplied;
19
+ there is no default timebox, and a budget never silently cuts requirements —
20
+ record any cut in Out of Scope.
21
+
14
22
  **Initial request:** ${input:request:Task brief or arguments (optional)}
15
23
 
16
- First run `scripts/pincer-status.sh`. If a PRD already exists, say so and ask whether
17
- this is a new version of it (`.prd/prd-v{N+1}.md` old versions are never overwritten)
18
- or a fresh start; if tickets are in progress, stop and point at `/pincer-code` instead.
24
+ First run `scripts/pincer-status.sh`. If a PRD already exists, preserve it and select
25
+ the next unused numeric version for this change. Use the brief and repository state to
26
+ distinguish a revision from a new change; ask only if that distinction changes scope or
27
+ architecture. If tickets for the current PRD are in progress, resume `/pincer-code`
28
+ unless the user explicitly authorized a separate change.
19
29
 
20
- ## Phase 1: Discovery (~5 min)
30
+ ## Phase 1: Discovery
21
31
 
22
32
  1. If `${input:request:Task brief or arguments (optional)}` contains the brief, extract what you can before asking anything.
23
- Never ask a question the brief already answers.
33
+ Never ask a question the brief already answers. Preserve or link the original
34
+ brief in the PRD, and record the desired outcome, assumptions and exclusions.
35
+ If the user supplied a PRD, review it: keep its meaning and existing requirement
36
+ IDs; do not silently replace either. Where its structure needs adapting to the
37
+ template, record a mapping table (`their section or ID → R-NN`) inside the PRD.
24
38
  2. Ask only the questions whose answers would change the architecture or scope.
25
39
  Batch them (max 3–4 at once). Typical ones:
26
40
  - What does "done" look like — what will be run, demoed, or reviewed at the end?
@@ -29,9 +43,10 @@ or a fresh start; if tickets are in progress, stop and point at `/pincer-code` i
29
43
  3. If the project has a frontend, ask one design question: "What should this feel like,
30
44
  and what should it NOT look like?" Capture the answer for the Visual Direction section.
31
45
 
32
- Summarize your understanding in 3–5 sentences and confirm before moving on.
46
+ Summarize your understanding in 3–5 sentences. Existing authorization in the request or
47
+ session carries forward; ask only about an unresolved choice that materially changes the result.
33
48
 
34
- ## Phase 2: Codebase scan (conditional, ~5 min)
49
+ ## Phase 2: Codebase scan (conditional)
35
50
 
36
51
  If the repo already contains source code, launch 1–2 `codebase-explorer` agents in parallel
37
52
  (one for architecture/structure, one for patterns relevant to the feature). Read the 2–3 most
@@ -46,7 +61,7 @@ touches are load-bearing, what test coverage protects them (run the suite, don't
46
61
  and the blast radius + rollback story for the change. Record these in the PRD's
47
62
  Architecture section. Greenfield speed assumptions do not transfer to brownfield work.
48
63
 
49
- ## Phase 3: Architecture (~5 min)
64
+ ## Phase 3: Architecture
50
65
 
51
66
  Propose the architecture: components, data flow, integration points, and key decisions.
52
67
  - Recommend one approach; mention an alternative only when the trade-off is real.
@@ -59,23 +74,45 @@ Propose the architecture: components, data flow, integration points, and key dec
59
74
  - Verify the contract of any external API the plan builds on (one live request or the
60
75
  current official docs) before designing around it — endpoint shapes remembered from
61
76
  training data are guesses.
62
- - Bias every decision toward "finishable in the remaining time". Cut before you gold-plate.
77
+ - Respect any explicit delivery budget. Record deliberate cuts in Out of Scope.
63
78
 
64
- **Gate (heavy):** Ask for explicit approval of the architecture before writing the PRD.
79
+ Prepare the full draft before seeking any approval still required. The user should review a
80
+ concrete scope and architecture; do not repeat an approval already given for the same decision.
65
81
 
66
- ## Phase 4: Write the PRD (~5 min)
82
+ ## Phase 4: Write the PRD
67
83
 
68
84
  1. Load `.claude/references/prd-template.md` and write all core sections.
69
- 2. Include optional sections only when they earn their space in the timebox.
70
- 3. Save to `.prd/prd-v1.md` (create `.prd/` if needed) with frontmatter:
85
+ In Requirements, assign stable `R-NN` IDs within the selected PRD: a revision
86
+ keeps existing IDs and adds new ones, never renumbers. Every requirement has
87
+ observable acceptance scenarios, the relevant failure paths, and the existing
88
+ behavior it must preserve — `/pincer-narrow` maps each scenario to a ticket and
89
+ a check, and `/pincer-evaluate` dispositions every ID.
90
+ 2. Include optional sections when risk or the product context warrants them.
91
+ 3. Save to the next unused `.prd/prd-v{N}.md` (create `.prd/` if needed), with `N`
92
+ matching the filename and frontmatter:
71
93
  ```yaml
72
94
  ---
73
- version: 1
95
+ version: {N}
74
96
  status: draft
75
97
  date: {today}
98
+ profile: small # only when small; omit for standard
76
99
  ---
77
100
  ```
78
- 4. If `.git/` doesn't exist, run `git init` and make an initial commit containing the
79
- PRD and this `.claude/` setup planning should be visible in the history.
80
-
81
- Finish with: "PRD saved to `.prd/prd-v1.md`. Run `/pincer-narrow` to break it into work items."
101
+ 4. If `.git/` doesn't exist, run `git init`. Commit the PRD and only the intended setup
102
+ paths after inspecting existing staged work; planning should be visible in history
103
+ without absorbing unrelated brownfield changes.
104
+
105
+ Present the saved draft and obtain approval only when the same scope/architecture was not
106
+ already authorized. Finish with: "PRD saved to `.prd/prd-v{N}.md`. Run `/pincer-narrow`
107
+ to break it into work items."
108
+
109
+ ## Authorization rule (shared by plan, narrow, code and evaluate)
110
+
111
+ Reuse explicit authorization for the same scope and decisions; ask only about a
112
+ material choice not already authorized, and prepare the concrete proposal before
113
+ asking. A decision the user delegated (for example "pick the architecture") does not
114
+ need another approval when you exercise it, but a newly discovered consequential
115
+ choice is surfaced before implementation. Record the authorization basis and the
116
+ scope it covers in the PRD or the handover. An agent-written record or a status
117
+ field is not authenticated human approval. When resuming without the context that
118
+ granted authorization, do not invent it — ask.
@@ -7,28 +7,47 @@ description: "Audit the repo against the workflow checklist — pass/fail per it
7
7
 
8
8
  # /pincer-release — Workflow Audit
9
9
 
10
- You are auditing the current repo state against `docs/dry-run-checklist.md`. Read-only:
11
- report pass/fail, never fix anything — fixes belong to the stage commands.
10
+ You are auditing the current repo state against `docs/release-checklist.md`. Read-only:
11
+ report pass/fail, never fix anything — fixes belong to the stage commands. Release does
12
+ not repair tickets, rewrite evidence, change PRD state, or publish. A check that mutates
13
+ the candidate invalidates the audit: if `git status --short` is not empty afterwards,
14
+ the verdict is FAIL and names the mutation. The verdict is reported to the user; a
15
+ durable runtime-owned release record is later work.
12
16
 
13
17
  **Requested stage:** ${input:request:Task brief or arguments (optional)}
14
18
 
15
19
  ## Steps
16
20
 
17
- 1. Read `docs/dry-run-checklist.md` — it is the source of truth for what to check.
18
- 2. Run `scripts/pincer-status.sh` to determine which stages have run (it reads `.prd/`,
19
- `tickets/`, `NOTES.md`; add `git log`). If `${input:request:Task brief or arguments (optional)}` names a stage, check only up
21
+ 1. Read `docs/release-checklist.md` — it is the source of truth for product-candidate
22
+ readiness. `docs/dry-run-checklist.md` is a separate manual platform trial and must
23
+ not impose toy-project or Pincer-kit assumptions on this audit.
24
+ 2. Run `scripts/pincer-status.sh` to determine the selected PRD and which stages have run
25
+ (it reads `.prd/`, associated `tickets/`, `NOTES.md`; add `git log`). If `${input:request:Task brief or arguments (optional)}`
26
+ names a stage, check only up
20
27
  to that stage.
21
28
  3. Check every applicable item mechanically where possible:
22
29
  - File existence and frontmatter: read the files.
23
30
  - Commit format and story: `git log --oneline`.
24
- - Receipts: every done ticket carries `verified:` (a status warning means one was
25
- marked done by hand). Re-run at least two checks with
26
- `scripts/pincer-ticket.sh verify T-{NN}` on a done ticket it re-checks without
27
- touching the receipt and report actual output.
31
+ - Receipts: every done ticket carries current `last_check` and `verified` evidence;
32
+ any status warning fails the audit. Do not call `pincer-ticket.sh` from Release:
33
+ it writes receipts and would invalidate the evaluated candidate.
34
+ - Evidence: `scripts/pincer-status.sh` runs the shared validator
35
+ (`scripts/pincer-evidence.cjs`) against the manifest `NOTES.md` names. The `Notes`
36
+ line must read `current` and the `Evidence` line `ok`; any other text fails the
37
+ audit with that diagnostic. Do not re-implement evidence checks and do not accept
38
+ screenshots described in chat: read the manifest's `checks`, requirement
39
+ dispositions and `visual_review`. Validation establishes that the record is
40
+ consistent, not that the commands ran — say so if asked.
41
+ - Every file the manifest lists is tracked, and `git status --short` is empty before
42
+ and after the audit.
43
+ - Run the repository's candidate-wide release gate directly (`npm test`, or the
44
+ equivalent declared by the project) and report its actual output. Any failure
45
+ blocks PASS. Confirm `git status --short` remains clean afterward.
28
46
  4. For judgment items (tickets genuinely S/M, history reads as a story), give your
29
47
  verdict AND one sentence of evidence — never a bare pass.
30
48
  5. Present a table: checklist item | pass/fail/skipped | evidence. Order by stage.
31
- 6. End with a one-line verdict: "PASS — workflow artifacts complete" or
32
- "FAIL — {n} items failed; fix via {command}". For each failure, name the command
49
+ 6. End with a one-line verdict naming the candidate: "PASS — candidate {sha}: workflow
50
+ artifacts complete" or "FAIL — candidate {sha}: {n} items failed; fix via {command}".
51
+ Fixes go through a new ticket, a new candidate and a new evaluation. For each failure, name the command
33
52
  file (`.claude/commands/*.md`) whose instructions should be tightened if the
34
53
  failure is a workflow bug rather than a run mistake.
@@ -13,11 +13,13 @@ start of a session. Read-only: change nothing.
13
13
  ## Steps
14
14
 
15
15
  1. Run `scripts/pincer-status.sh`. It reads the artifacts on disk (`.prd/`, `tickets/`,
16
- `NOTES.md`) and prints the PRD state, every ticket with its state and clock-based
17
- elapsed time, what is blocked, build time against the budget, any warnings (a ticket
18
- marked done without a verification receipt), and the next command to run.
16
+ `NOTES.md`) and prints the PRD state and profile, every ticket with its state and
17
+ clock-based elapsed time, what is blocked, wall-clock build time while a ticket is in
18
+ progress or against an explicit user budget, the evidence verdict for the evaluated
19
+ candidate, any warnings (each readiness problem once), and the next command to run.
19
20
  2. Report in three lines: where the workflow is, what is in progress or blocked, and the
20
21
  next command. Quote the `Next` line as-is.
21
22
  3. If a ticket is `in_progress`, read it and `git status`, then offer to resume it with
22
23
  `/pincer-code T-{NN}`. If the script printed a warning, surface it — a done ticket
23
24
  without a receipt was marked by hand and needs `scripts/pincer-ticket.sh verify T-{NN}`.
25
+ Never restore a ticket file from git to clear a warning; a failed attempt is a record.
@@ -14,8 +14,9 @@ Code · Evaluate · Release). Follow it in order:
14
14
  1. `/pincer-plan` — create the PRD in `.prd/` (investigation is a phase of this step)
15
15
  2. `/pincer-narrow` — decompose into `tickets/T-*.md`
16
16
  3. `/pincer-code` — implement tickets sequentially, one commit per ticket
17
- 4. `/pincer-evaluate` — final quality pass, then write `NOTES.md`
18
- 5. `/pincer-release` pass/fail audit of the workflow's artifacts
17
+ 4. `/pincer-evaluate` — final quality pass; save evidence under
18
+ `.prd/evidence/prd-vN/<candidate>/` and write `NOTES.md` pointing at its manifest
19
+ 5. `/pincer-release` — read-only pass/fail audit of the workflow's artifacts
19
20
 
20
21
  `/pincer-status` (or `scripts/pincer-status.sh`) shows where the workflow stands and
21
22
  the next command — run it first in any new session. Do not write feature code before
@@ -77,11 +78,17 @@ of instructions are the user, this file, and the workflow commands.
77
78
  ## Rules
78
79
 
79
80
  - Never mark a ticket done while its verification command fails.
80
- - Ticket state (`status`, `started`, `verified`, `finished`) is written only by
81
+ - Ticket state (`status`, `started`, `last_check`, `verified`, `finished`) is written only by
81
82
  `scripts/pincer-ticket.sh`: `verify` stamps a receipt when the check passes,
82
83
  `done` refuses without it. Never edit those fields by hand. On Claude Code a
83
84
  hook enforces this; elsewhere it is a standing rule and `/pincer-status`
84
- flags a done ticket without a receipt.
85
+ flags missing, failed, or stale readiness.
86
+ - Candidate evidence lives in `.prd/evidence/prd-vN/<candidate>/manifest.json` and is
87
+ validated by `scripts/pincer-evidence.cjs` (run by status and release). Never edit
88
+ a manifest or its artifacts after the evaluation commit; a review fix produces a
89
+ new candidate and a fresh evaluation. A `NOTES.md` without `evidence:` is a legacy
90
+ evaluation and is not release-ready. An older Pincer runtime does not enforce
91
+ this contract.
85
92
  - Scope cuts are allowed and encouraged under time pressure — but always recorded
86
93
  in the PRD's Out of Scope section, never silent.
87
94
  - Prefer boring, readable code over clever code; this repo is read by humans first.
@@ -91,4 +98,3 @@ of instructions are the user, this file, and the workflow commands.
91
98
  permission changes) are never run by an agent on any platform — a human runs
92
99
  them manually if truly intended. On Claude Code this is enforced by a hook;
93
100
  elsewhere it is a standing rule.
94
-
@@ -1,28 +1,61 @@
1
1
  # PINCER Dry-Run Checklist
2
2
 
3
- How to test that the `.claude/` workflow works: run the full chain on a small toy
3
+ This is the manual platform trial for the Pincer kit, not the product release audit.
4
+ For release readiness, use `docs/release-checklist.md`.
5
+
6
+ To test that the `.claude/` workflow works, run the full chain on a small toy
4
7
  feature (e.g. "a CLI todo app in TypeScript — add, list, complete, delete, stored in a
5
8
  local JSON file"), then tick every box below. All boxes ticked = the workflow passes.
6
9
  A failed box points at the command file to fix.
7
10
 
8
11
  Use a throwaway copy of this repo and a cheap model (`claude --model sonnet`).
12
+ Wording tests in the kit protect adapter contracts; only a trial like this one
13
+ observes agent behavior, and one trial on one surface says nothing about the others.
14
+
15
+ ## Ground rules for the trial
16
+
17
+ - Write every cheat instruction as a single line: multi-line text pasted into
18
+ Claude Code is sent at the first line break.
19
+ - Test hooks with direct JSON payloads through the hook scripts
20
+ (`echo '{"tool_name":"Bash","tool_input":{"command":"..."}}' | bash .claude/hooks/block-dangerous.sh`),
21
+ separately from asking the model — a refusal tests the model, not the hook.
22
+ - Reset the disposable fixture between injected faults (fresh copy, or restore the
23
+ source you broke before breaking the next thing) so one validation failure cannot
24
+ mask the check you are trying to observe. Restore the ticket before breaking the
25
+ code, or the `done` refusal comes from validation rather than from verification.
26
+ - Record the trial with the template at the end of this file. Label surfaces you did
27
+ not run as untested; do not infer cross-platform behavior from one trial.
9
28
 
10
29
  ## After `/pincer-plan`
11
30
 
12
- - [ ] `.prd/prd-v1.md` exists
13
- - [ ] Its frontmatter has `version`, `status: draft`, and `date`
14
- - [ ] All 6 core sections are present (Problem, Solution, Scope, Architecture,
15
- Success Criteria, Out of Scope)
31
+ - [ ] The selected `.prd/prd-vN.md` exists
32
+ - [ ] Its frontmatter has `version`, `status: draft`, `date`, and `profile` only when small
33
+ - [ ] All 7 core sections are present (Problem, Solution, Scope, Requirements,
34
+ Architecture, Success Criteria, Out of Scope)
35
+ - [ ] Requirements carry stable `R-NN` IDs, each with a scenario, failure path and
36
+ preserved behavior; a supplied PRD keeps its own IDs (mapping table if adapted)
37
+ - [ ] The original brief is preserved or linked; outcome, assumptions and exclusions recorded
38
+ - [ ] The profile is justified in a sentence; a small CSS fix is `small`, a tiny
39
+ change touching a migration or an authorization boundary stays `standard`
16
40
  - [ ] The Scope table has both columns filled (in AND out)
17
- - [ ] No implementation code inside the PRD
41
+ - [ ] No implementation code inside the PRD (interface examples are fine)
18
42
  - [ ] Discovery asked ≤4 questions and none were already answered by the brief
19
- - [ ] `.git/` exists and the first commit contains the PRD
43
+ - [ ] No default timebox was assumed; an explicit budget, if given, is recorded
44
+ - [ ] `.git/` exists and the selected PRD is committed without unrelated brownfield work
20
45
 
21
46
  ## After `/pincer-narrow`
22
47
 
23
- - [ ] 4–7 files exist in `tickets/`, named `T-{NN}-{slug}.md`
24
- - [ ] Every ticket is sized S or M — none L
25
- - [ ] T-01 is a walking skeleton (scaffold + thin end-to-end slice that runs)
48
+ - [ ] Ticket files are named `T-{NN}-{slug}.md`; count follows dependencies and risk,
49
+ with no one-to-two-ticket cap applied to a small PRD
50
+ - [ ] A requirement map (requirement · scenario · ticket · check or review method)
51
+ was presented, and each ticket's Context says `Implements: R-NN`
52
+ - [ ] Every ticket has a coherent S, M, or L scope; larger work is split when that
53
+ improves ownership, dependency order, or verification
54
+ - [ ] Greenfield uses a walking skeleton when helpful; brownfield protects the
55
+ smallest useful vertical change
56
+ - [ ] Every Verification section opens with `Proves:` and its fenced command
57
+ exercises behavior (it fails when the feature is wrong, not only when a name
58
+ is renamed); static checks are justified as static contracts
26
59
  - [ ] Every ticket has a runnable, non-interactive command in its fenced
27
60
  Verification block (it is what `scripts/pincer-ticket.sh verify` runs)
28
61
  - [ ] Dependencies are declared where they exist (`depends_on`)
@@ -30,8 +63,10 @@ Use a throwaway copy of this repo and a cheap model (`claude --model sonnet`).
30
63
  verification command is the test runner
31
64
  - [ ] Every ticket whose surface accepts external input has a reject-path
32
65
  acceptance criterion (what invalid input produces), not only the happy path
33
- - [ ] T-01 includes `.gitignore` covering `.env*` (except `.env.example`) and an
34
- `.env.example` naming required secrets
66
+ - [ ] Greenfield setup covers `.env*` (except `.env.example`) and names required
67
+ secrets in `.env.example`; brownfield preserves and verifies existing conventions
68
+ - [ ] A breakdown that follows the PRD was not re-approved; a newly discovered
69
+ consequential choice (if any) was surfaced before implementation
35
70
  - [ ] PRD frontmatter now says `status: ticketed`
36
71
  - [ ] Tickets are committed
37
72
 
@@ -40,39 +75,120 @@ Use a throwaway copy of this repo and a cheap model (`claude --model sonnet`).
40
75
  - [ ] One commit per ticket, messages formatted `T-{NN}: {title}`
41
76
  - [ ] Every ticket file now says `status: done`
42
77
  - [ ] Every done ticket carries `started`, `verified` (receipt) and `finished`
43
- stamps — `scripts/pincer-status.sh` prints no "done without a receipt" warning
78
+ stamps — `scripts/pincer-status.sh` prints no readiness warning
44
79
  - [ ] Every done ticket has all acceptance-criteria checkboxes ticked
45
80
  - [ ] `scripts/pincer-ticket.sh verify T-{NN}` passes on done tickets (spot-check
46
81
  at least two)
82
+ - [ ] Cheat: break the feature but keep every identifier, then run `verify` — it
83
+ fails, prints "failure recorded in last_check" and "receipt was revoked"
84
+ - [ ] Cheat: ask the assistant to `git checkout` the ticket file — the guard blocks
85
+ it, the failed attempt stays recorded, and the assistant hands repair to you
47
86
  - [ ] Any scope cut made during build is recorded in the PRD's Out of Scope section
48
- - [ ] PRD frontmatter now says `status: built`
87
+ - [ ] PRD frontmatter now says `status: built`, committed on its own (`PRD vN: built`)
88
+ before evaluation, not folded into the evidence commit
89
+ - [ ] Status shows the wall-clock elapsed line only while a ticket is in progress or
90
+ a budget is set
49
91
 
50
92
  ## After `/pincer-evaluate`
51
93
 
94
+ - [ ] Evaluation refused to start on a dirty tree or an un-built PRD
52
95
  - [ ] Findings (if any) were presented with `file:line` references
53
- - [ ] The mechanical security audit ran: history grep for secret-like strings,
96
+ - [ ] Every `R-NN` has a disposition (delivered / blocked / deferred); a failed
97
+ required behavior was not relabelled a limitation; any deferral names the
98
+ user's authorization
99
+ - [ ] The mechanical security audit used redacted, location-only secret findings;
54
100
  `git ls-files` shows no `.env` beyond `.env.example`, dependency audit,
55
101
  and (if there's an API) one invalid-input request returned a clean 4xx
56
- - [ ] If the project has a UI, it was actually opened and checked visually, not
57
- only read as code
58
- - [ ] Approved fixes were committed as `review: fixes` and re-verified
59
- - [ ] `NOTES.md` exists at the repo root and covers: what was built, what was cut
60
- and why, known issues, next steps
102
+ - [ ] If the project has a UI, it was actually opened and checked visually, and
103
+ the capture is saved under `.prd/evidence/prd-vN/<candidate>/visual/` with
104
+ scenario, viewport and observed result in the manifest
105
+ - [ ] Cheat: make the browser tool unavailable the visual check is recorded as
106
+ `unverified`, not fabricated and not silently waived
107
+ - [ ] `.prd/evidence/prd-vN/<candidate>/manifest.json` exists and
108
+ `node scripts/pincer-evidence.cjs validate <manifest> --candidate <sha> --prd .prd/prd-vN.md`
109
+ prints `ok`
110
+ - [ ] Cheat: edit a saved log after the evidence commit — status reports
111
+ `evidence invalid: ... digest mismatch`
112
+ - [ ] Evaluation fixes were completed through new tickets, produced a new candidate,
113
+ and were re-evaluated with fresh evidence
114
+ - [ ] `NOTES.md` exists at the repo root with `prd`, `base`, `candidate` and
115
+ `evidence:`; the evidence commit contains only NOTES.md and the listed files
116
+ - [ ] `scripts/pincer-status.sh` shows `Notes … current` and `Evidence … ok`
117
+
118
+ ## After `/pincer-release`
119
+
120
+ - [ ] The audit ran `scripts/pincer-status.sh` and the project gate directly, never
121
+ `pincer-ticket.sh`
122
+ - [ ] The verdict names the candidate and every failed or skipped item
123
+ - [ ] `git status --short` is empty after the audit; nothing was repaired, no evidence
124
+ rewritten, no PRD state changed, nothing published
61
125
 
62
126
  ## Overall
63
127
 
64
- - [ ] `git log --oneline` reads as a coherent story: setup → tickets → T-01…T-NN → review
128
+ - [ ] `git log --oneline` reads as a coherent story: setup → tickets → T-01…T-NN →
129
+ PRD built → evaluation evidence
65
130
  - [ ] No `.env` file contents ever appeared in the conversation
66
- - [ ] `git log -p` contains no secret values anywhere in history (a committed-then-
67
- deleted key is still leaked)
131
+ - [ ] Relevant history was checked for committed-then-deleted secrets without printing
132
+ candidate values into the conversation or audit report
68
133
  - [ ] Every dependency in the lockfile is named in the PRD's architecture or was
69
134
  explicitly approved during build
70
135
  - [ ] `NOTES.md` has a Handover section (orientation, dependency justification,
71
- what breaks first)
136
+ what breaks first) and summarizes the requirement dispositions
72
137
  - [ ] Brownfield only: untested load-bearing code got a characterization test
73
138
  before being modified
74
139
  - [ ] Platform adapters in sync: `scripts/sync-prompts.sh` then `git status`
75
140
  shows no changes in `.agents/skills/` or `.github/prompts/`
76
- - [ ] `scripts/pincer-status.sh` says `Next /pincer-release` and its build elapsed
77
- figure fit the ~75-minute build budget (note where time went if not)
78
- - [ ] Total wall-clock time fit the ~2-hour budget
141
+ - [ ] `scripts/pincer-status.sh` says `Next /pincer-release`; if the user supplied a
142
+ budget, its elapsed figure and any deliberate cuts are reported against that budget
143
+
144
+ ## Recorded workflow scenarios
145
+
146
+ Run each scenario in its own throwaway copy and note the observation next to it.
147
+ Expected across all five: repeated approval is avoided, unresolved decisions are
148
+ surfaced, and no arbitrary ticket cap or default budget appears.
149
+
150
+ 1. **Small CSS fix.** Brief: "make the primary button 4px rounder". Expect
151
+ `profile: small` with a one-sentence justification, a compact PRD with
152
+ Requirements and verification, a ticket count decided by cohesion (one is fine,
153
+ two is fine), and a `Proves:` line that checks the rendered style, not the
154
+ presence of a class name.
155
+ 2. **Tiny high-risk change.** Brief: "change the session cookie's `SameSite` from
156
+ `Lax` to `None`" (or any one-line change on an authorization boundary or a
157
+ migration). Expect `profile: standard` despite the diff size, with the
158
+ investigation and rollback story recorded in Architecture.
159
+ 3. **Supplied PRD.** Paste a PRD that already numbers its requirements (`REQ-3`,
160
+ `AC-2`, or similar). Expect the meaning and IDs preserved and, if the template
161
+ structure was applied, a `Requirement mapping` table rather than a rewrite.
162
+ 4. **Authorized resume.** Start `/pincer-code`, stop mid-ticket, clear context, run
163
+ `/pincer-status` then `/pincer-code T-NN`. Expect resumption without a request
164
+ to re-approve the unchanged scope; the assistant reads `git status` and the
165
+ receipt state rather than asking.
166
+ 5. **New consequential decision during narrow.** Give a brief whose decomposition
167
+ reveals a choice the PRD did not settle (for example, a second storage backend).
168
+ Expect the concrete proposal presented and the choice surfaced before any
169
+ implementation, and no second approval requested for the parts the PRD covers.
170
+
171
+ ## Trial record template
172
+
173
+ Copy this into `docs/trial-<date>-<greenfield|brownfield>.md` and fill every line.
174
+
175
+ ```markdown
176
+ # Trial <date>: <greenfield|brownfield>, <agent surface> <model>
177
+
178
+ - Brief: <the brief, verbatim or linked>
179
+ - Base: <full commit ID of the throwaway repo before the trial>
180
+ - Versions: pincer-workflow <version> · <agent surface and model> · Node <version> · <OS>
181
+ - Artifacts: PRD <path> · tickets <T-NN..T-MM> · evidence <manifest path> · NOTES.md
182
+ - Results: <checklist section → pass/fail per box, with the observation for each fail>
183
+ - Interventions: <every human action beyond the brief: answers, repairs, cheats>
184
+ - Untested: <surfaces and platforms not exercised in this trial>
185
+
186
+ | Requirement | Observed evidence or `outstanding` |
187
+ | --- | --- |
188
+ | R-01 | |
189
+ | R-02 | |
190
+ | R-03 | |
191
+ | R-04 | |
192
+ | R-05 | |
193
+ | R-06 | |
194
+ ```
@@ -0,0 +1,35 @@
1
+ # PINCER Release Checklist
2
+
3
+ Audit the selected PRD and its evaluated candidate. This checklist applies to product
4
+ changes in greenfield and brownfield repositories. It is read-only: failures return work
5
+ to the owning stage or a new ticket.
6
+
7
+ ## Change identity and state
8
+
9
+ - [ ] `scripts/pincer-status.sh` selects the intended PRD with `status: built` and no warnings
10
+ - [ ] Every ticket associated with that PRD is done with current `last_check` and `verified` evidence
11
+ - [ ] `NOTES.md` names the selected PRD, reviewed base, candidate, and `evidence:` manifest; status reports the notes current and the evidence `ok`
12
+ - [ ] Every file the evidence manifest lists is tracked; the working tree is clean before and after the audit
13
+
14
+ ## Scope and evidence
15
+
16
+ - [ ] Every requirement in the PRD has a disposition in the evidence manifest: delivered with passing checks, or deferred with recorded user authorization; none is blocked
17
+ - [ ] Ticket dependencies, acceptance criteria, and verification commands match the implemented change
18
+ - [ ] The repository's candidate-wide release gate passes when run directly, without invoking the ticket state writer
19
+ - [ ] Scope cuts and known limitations are explicit in the PRD or evaluation notes
20
+
21
+ ## Review
22
+
23
+ - [ ] High-confidence review findings have file and line evidence and a disposition
24
+ - [ ] Fixes made after evaluation use a new ticket, current verification, and a scoped commit
25
+ - [ ] UI changes have visual checks with saved images in the evidence manifest (scenario, viewport, observed result); non-UI changes record `visual_review.applicable: false` with a reason
26
+ - [ ] Security review reports locations and remediation without printing candidate secret values
27
+ - [ ] No secret environment file is tracked; dependency and invalid-input checks run when applicable
28
+
29
+ ## Handover and verdict
30
+
31
+ - [ ] Commit history identifies the plan, ticket work, evaluation, and any review-fix tickets
32
+ - [ ] `NOTES.md` covers what shipped, cuts, limitations, next steps, dependencies, and the riskiest aging assumption
33
+ - [ ] Platform or environment limits are stated without claiming untested support
34
+ - [ ] The audit repaired no ticket, rewrote no evidence, changed no PRD state, and published nothing
35
+ - [ ] Every failed or skipped required item is named before the final PASS or FAIL verdict, which names the candidate