pincer-workflow 0.5.0 → 0.6.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/README.md +6 -6
- package/bin/pincer.js +17 -1
- package/package.json +3 -3
- package/template/.agents/skills/pincer-code/SKILL.md +85 -14
- package/template/.agents/skills/pincer-evaluate/SKILL.md +42 -13
- package/template/.agents/skills/pincer-narrow/SKILL.md +43 -12
- package/template/.agents/skills/pincer-plan/SKILL.md +12 -4
- package/template/.agents/skills/pincer-release/SKILL.md +18 -0
- package/template/.agents/skills/pincer-status/SKILL.md +12 -2
- package/template/.claude/commands/pincer-code.md +85 -14
- package/template/.claude/commands/pincer-evaluate.md +42 -13
- package/template/.claude/commands/pincer-narrow.md +43 -12
- package/template/.claude/commands/pincer-plan.md +12 -4
- package/template/.claude/commands/pincer-release.md +18 -0
- package/template/.claude/commands/pincer-status.md +12 -2
- package/template/.claude/hooks/hook-policy.cjs +13 -6
- package/template/.claude/references/prd-template.md +11 -4
- package/template/.codex/README.md +1 -1
- package/template/.github/prompts/pincer-code.prompt.md +85 -14
- package/template/.github/prompts/pincer-evaluate.prompt.md +42 -13
- package/template/.github/prompts/pincer-narrow.prompt.md +43 -12
- package/template/.github/prompts/pincer-plan.prompt.md +12 -4
- package/template/.github/prompts/pincer-release.prompt.md +18 -0
- package/template/.github/prompts/pincer-status.prompt.md +12 -2
- package/template/AGENTS.md +17 -1
- package/template/docs/dry-run-checklist.md +30 -3
- package/template/docs/release-checklist.md +3 -1
- package/template/docs/runtime-contracts.md +1342 -96
- package/template/scripts/pincer-evidence.cjs +9 -7
- package/template/scripts/pincer-runtime/adopt.cjs +132 -0
- package/template/scripts/pincer-runtime/agreement.cjs +240 -0
- package/template/scripts/pincer-runtime/authorization.cjs +167 -0
- package/template/scripts/pincer-runtime/changes.cjs +517 -0
- package/template/scripts/pincer-runtime/checks.cjs +48 -0
- package/template/scripts/pincer-runtime/coverage.cjs +361 -0
- package/template/scripts/pincer-runtime/dispositions.cjs +95 -0
- package/template/scripts/pincer-runtime/evidence.cjs +303 -18
- package/template/scripts/pincer-runtime/gates.cjs +73 -0
- package/template/scripts/pincer-runtime/identity.cjs +21 -4
- package/template/scripts/pincer-runtime/impact.cjs +177 -0
- package/template/scripts/pincer-runtime/io.cjs +41 -0
- package/template/scripts/pincer-runtime/lifecycle.cjs +34 -12
- package/template/scripts/pincer-runtime/locator.cjs +158 -0
- package/template/scripts/pincer-runtime/migrate.cjs +140 -63
- package/template/scripts/pincer-runtime/parse.cjs +20 -1
- package/template/scripts/pincer-runtime/phases.cjs +245 -0
- package/template/scripts/pincer-runtime/readiness.cjs +9 -1
- package/template/scripts/pincer-runtime/requirements.cjs +255 -0
- package/template/scripts/pincer-runtime/resume.cjs +205 -0
- package/template/scripts/pincer-runtime/routing.cjs +54 -0
- package/template/scripts/pincer-runtime/runner.cjs +24 -6
- package/template/scripts/pincer-runtime/state.cjs +29 -7
- package/template/scripts/pincer-runtime/status.cjs +178 -22
- package/template/scripts/pincer-runtime/transaction.cjs +200 -0
- package/template/scripts/pincer-runtime/transitions.cjs +134 -0
- package/template/scripts/pincer-runtime.cjs +387 -76
- package/template/scripts/pincer-status.sh +1 -1
- package/template/scripts/pincer-ticket.sh +1 -1
|
@@ -21,8 +21,14 @@ receipt that matches the current check, or with unticked acceptance criteria. Ne
|
|
|
21
21
|
On a migrated project (a change binding under `.prd/changes/`; the `Runtime` line of
|
|
22
22
|
`scripts/pincer-status.sh` names it) `verify` records an attempt under `.pincer/runtime/`
|
|
23
23
|
and writes no receipt into the ticket, and `done` consumes the current passing attempt
|
|
24
|
-
against the current source without re-running the check. `.pincer/` and `.prd/changes/`
|
|
25
|
-
are written only by the runtime; never edit or delete them by hand.
|
|
24
|
+
against the current source without re-running the check. `.pincer/`, `.prd/changes/` and `.prd/evidence/changes/`
|
|
25
|
+
are written only by the runtime; never edit or delete them by hand. On a project with
|
|
26
|
+
change records (`Runtime changes …`) every `start`, `verify` and `done` first passes
|
|
27
|
+
the change gate: the ticket's change must be selected in this worktree, `active`
|
|
28
|
+
(`verify` also runs on a `completed` change), on a compatible branch, and authorized
|
|
29
|
+
for the current agreement — otherwise the command refuses with `SELECTION_REQUIRED`,
|
|
30
|
+
`WRONG_CHANGE`, `LIFECYCLE_BLOCKED`, `BASE_MISMATCH`, `DECISION_REQUIRED`,
|
|
31
|
+
`AUTHORIZATION_REQUIRED` or `AGREEMENT_CHANGED` before anything runs or is written.
|
|
26
32
|
|
|
27
33
|
## Before the loop
|
|
28
34
|
|
|
@@ -30,15 +36,34 @@ Run `scripts/pincer-status.sh`. It lists every ticket's state, what is blocked,
|
|
|
30
36
|
build time from the clock, and the next action. If a ticket is `in_progress`, you are
|
|
31
37
|
resuming: read it, check `git status` / `git diff` for uncommitted work, and continue
|
|
32
38
|
from wherever the receipt says you are. Do not ask the user to reconfirm unchanged,
|
|
33
|
-
previously authorized work. Read the `Runtime` line before the first ticket
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
`node scripts/pincer-runtime.cjs
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
previously authorized work. Read the `Runtime` line before the first ticket. `changes` (change records under
|
|
40
|
+
`.prd/changes/`) → run `node scripts/pincer-runtime.cjs resume` and follow its `Next`
|
|
41
|
+
line: it names the selected change, its lifecycle state, the agreement and the
|
|
42
|
+
authorization verdict, the blockers in order and the exact next command, all from the
|
|
43
|
+
files on disk. Select the change to work on (`node scripts/pincer-runtime.cjs change
|
|
44
|
+
select <id>`; selection is local metadata and touches no source), activate it
|
|
45
|
+
(`change activate <id>`; refused until the user's authorization is recorded with
|
|
46
|
+
`change authorize` and no consequential decision is open) and resume a paused change
|
|
47
|
+
with `change resume <id>`. On a change with strict coverage (`Coverage strict …` in status) also read
|
|
48
|
+
`node scripts/pincer-runtime.cjs coverage` — it names the scenario, ticket, check or
|
|
49
|
+
decision that is next and every structural gap (`COVERAGE_INCOMPLETE`,
|
|
50
|
+
`SCOPE_UNAUTHORIZED`, `OBLIGATION_MISSING`) — and, after any PRD, ticket or map edit,
|
|
51
|
+
`node scripts/pincer-runtime.cjs impact` (`--from G-NN` for another baseline): it
|
|
52
|
+
lists the affected scenarios, tickets and checks with reasons and the dependency
|
|
53
|
+
dependents separately, and reports an unscoped PRD change or unavailable history
|
|
54
|
+
rather than "no impact". `legacy` and no ticket of this PRD carries legacy
|
|
55
|
+
receipts → register now (`node scripts/pincer-runtime.cjs register --prd .prd/prd-vN.md`,
|
|
56
|
+
commit `.prd/changes/` and `.gitignore` as `Register PRD vN`), then record the user's
|
|
57
|
+
approval (`change authorize …`, as `/pincer-narrow` describes), select and activate.
|
|
58
|
+
`legacy` with legacy receipts, or a v0.5.0 binding (`Runtime change <id> · revision …`)
|
|
59
|
+
→ run `node scripts/pincer-runtime.cjs migrate --preview --prd .prd/prd-vN.md`, show
|
|
60
|
+
the plan (backups, receipts imported as history, the converted binding, the
|
|
61
|
+
`.gitignore` line, the local selection) and ask once whether to apply. Apply only on
|
|
62
|
+
a yes, then commit the rewritten tickets, `.gitignore` and the record as `Migrate PRD
|
|
63
|
+
vN to the runtime`. The migrated change is planned with no authorization: record the
|
|
64
|
+
user's actual earlier instruction with `change authorize` (the v0.5.0 free text is
|
|
65
|
+
history only) and activate it. Never migrate silently, and never apply when the
|
|
66
|
+
preview reports a conflict.
|
|
42
67
|
|
|
43
68
|
## Loop (per ticket, in dependency order)
|
|
44
69
|
|
|
@@ -138,6 +163,48 @@ above applies only before migration. A session that died mid-`verify` leaves a `
|
|
|
138
163
|
attempt: run `node scripts/pincer-runtime.cjs recover`, which finalizes it as
|
|
139
164
|
`interrupted` once the owner process is gone, then `verify` again.
|
|
140
165
|
|
|
166
|
+
## Changes: pausing, decisions and completion
|
|
167
|
+
|
|
168
|
+
- Stopping before the change is complete (end of session, switching to another
|
|
169
|
+
change): `node scripts/pincer-runtime.cjs change pause <id> --reason "<why>" --note "<handoff for the next session>"`
|
|
170
|
+
and commit the record. Pausing keeps every ticket state, attempt and authorization;
|
|
171
|
+
it refuses while a check is running (`recover` first if its owner died). A fresh
|
|
172
|
+
session runs `resume`, then `change resume <id>` under the existing authorization —
|
|
173
|
+
do not ask the user to re-approve unchanged scope. Another change's work in the
|
|
174
|
+
meantime makes this change's passing attempts `SOURCE_CHANGED`; verify again, do
|
|
175
|
+
not ask for approval again.
|
|
176
|
+
- A newly discovered consequential choice: `node scripts/pincer-runtime.cjs change decide <id> --summary "<the question>"`
|
|
177
|
+
blocks execution (`DECISION_REQUIRED`) until the user answers; record the answer with
|
|
178
|
+
`change decide <id> --resolve D-NN --reference "<where>" --excerpt "<the user's words>"`,
|
|
179
|
+
then `change authorize <id> --agreement <digest> --reference … --excerpt … --decision D-NN`.
|
|
180
|
+
A revision within the user's delegation (for example an added regression check for
|
|
181
|
+
approved behavior) records `change authorize <id> --agreement <digest> --delegated --basis A-NN --explanation "<why it stays within the delegation>"`
|
|
182
|
+
without asking again, and the changed check still needs fresh verification.
|
|
183
|
+
- Editing the PRD under its filename, or a ticket's acceptance text, dependencies,
|
|
184
|
+
size, timeout, association or check — and, with strict coverage, a scenario's text,
|
|
185
|
+
a map link, a declared command or timeout, or a scope entry — changes the agreement:
|
|
186
|
+
execution refuses with `AGREEMENT_CHANGED` (status shows the structural difference;
|
|
187
|
+
`impact` explains it) until its disposition is recorded as above. Ticking criteria, starting or closing tickets and recording
|
|
188
|
+
attempts never change it. An `AGREEMENT_CHANGED` caused by an edit this session
|
|
189
|
+
did not make — a revised PRD, an added or changed ticket found on resume — is a
|
|
190
|
+
consequential decision: raise it with `change decide <id> --summary "<what changed>"`,
|
|
191
|
+
report the structural difference (and the `impact` report) and stop. A general instruction to continue,
|
|
192
|
+
resume or not re-ask never authorizes new scope; record a `user` authorization for
|
|
193
|
+
the revised agreement only for an instruction that names the revised content. With strict coverage a scenario that will not be delivered is
|
|
194
|
+
never dropped from the map or the PRD: it is deferred or removed through a decision
|
|
195
|
+
the user resolves naming it, a `scope` entry (a removal keeps a tombstone naming the
|
|
196
|
+
prior agreement) and an authorization naming that decision; `coverage` reports
|
|
197
|
+
`OBLIGATION_MISSING` or `SCOPE_UNAUTHORIZED` until then, and `change complete`
|
|
198
|
+
refuses. A revised check declaration (a stricter command, an added check) within the
|
|
199
|
+
user's delegation is a `--delegated` authorization and needs fresh verification.
|
|
200
|
+
- When every ticket is done and ready: `node scripts/pincer-runtime.cjs change complete <id>`
|
|
201
|
+
(it refuses unfinished tickets, unticked criteria, stale or failed verification and
|
|
202
|
+
open decisions; with strict coverage also an incomplete map, an unauthorized
|
|
203
|
+
disposition or a missing obligation, before the ticket gate) and commit the record
|
|
204
|
+
as `Complete PRD vN`. Completion never asks for candidate evidence. Completed means ready
|
|
205
|
+
for evaluation, not evaluated or released; a later finding is `change reopen <id> --reason …`
|
|
206
|
+
plus a fix ticket.
|
|
207
|
+
|
|
141
208
|
## Budget rules
|
|
142
209
|
|
|
143
210
|
- If the user set `PINCER_BUILD_BUDGET_MIN` or stated another budget, use the elapsed
|
|
@@ -149,7 +216,8 @@ attempt: run `node scripts/pincer-runtime.cjs recover`, which finalizes it as
|
|
|
149
216
|
|
|
150
217
|
## When all tickets are done
|
|
151
218
|
|
|
152
|
-
|
|
219
|
+
On a project with change records, complete the change first (`change complete <id>`,
|
|
220
|
+
committed as `Complete PRD vN`). Then update the PRD to `status: built` and commit that change on its own (`PRD vN: built`).
|
|
153
221
|
The built transition is part of the candidate that `/pincer-evaluate` reviews; it is
|
|
154
222
|
never moved into a later evidence-only commit. Then finish with:
|
|
155
223
|
"All tickets built. Run `/pincer-evaluate` for a final quality pass."
|
|
@@ -161,6 +229,9 @@ material choice not already authorized, and prepare the concrete proposal before
|
|
|
161
229
|
asking. A decision the user delegated (for example "pick the architecture") does not
|
|
162
230
|
need another approval when you exercise it, but a newly discovered consequential
|
|
163
231
|
choice is surfaced before implementation. Record the authorization basis and the
|
|
164
|
-
scope it covers in the PRD or the handover
|
|
232
|
+
scope it covers in the PRD or the handover, and on a project with change records as
|
|
233
|
+
a `change authorize` record (the user's words as the excerpt, or a `--delegated`
|
|
234
|
+
disposition with its basis). An agent-written record or a status
|
|
165
235
|
field is not authenticated human approval. When resuming without the context that
|
|
166
|
-
granted authorization, do not invent it —
|
|
236
|
+
granted authorization, do not invent it — read the `resume` report; an authorization
|
|
237
|
+
it reports as `current` needs no repeat approval, and any other verdict is asked.
|
|
@@ -21,8 +21,10 @@ run the pipeline, then present results.
|
|
|
21
21
|
that uncertainty before claiming a complete review. Record full commit IDs for
|
|
22
22
|
`base` and `candidate` (`git rev-parse HEAD`), then review `git diff <base>..<candidate>`.
|
|
23
23
|
The candidate is the clean, committed tree that already includes the implementation,
|
|
24
|
-
the ticket closures
|
|
25
|
-
|
|
24
|
+
the ticket closures, on a project with change records the `change complete` commit
|
|
25
|
+
(the `Runtime` line reads `… · completed ·`; `check` and `evidence export` refuse an
|
|
26
|
+
active, paused or unauthorized change), and the PRD `status: built` commit:
|
|
27
|
+
`git status --short` must be empty before review. If anything is uncommitted or the PRD is not yet built, return
|
|
26
28
|
to `/pincer-code`; do not review a dirty tree.
|
|
27
29
|
2. Dispatch a `code-quality-reviewer` agent with: the diff, the PRD's Success Criteria and
|
|
28
30
|
Scope sections, and the list of tickets. If the diff is large, split by area and
|
|
@@ -30,7 +32,13 @@ run the pipeline, then present results.
|
|
|
30
32
|
in a separate pass, applying `.claude/agents/code-quality-reviewer.md` as the rubric.)
|
|
31
33
|
Keep the reviewer's report — or its explicit no-findings statement — for step 9,
|
|
32
34
|
where it is saved as an artifact; a review that left no record cannot be audited.
|
|
33
|
-
3. Yourself, in parallel, check spec compliance.
|
|
35
|
+
3. Yourself, in parallel, check spec compliance. On a change with strict coverage
|
|
36
|
+
(`Coverage strict …` in status) start from `node scripts/pincer-runtime.cjs coverage`:
|
|
37
|
+
its structure must be complete, and its scenario rows are the obligations — the
|
|
38
|
+
export derives every disposition from the map and the outcomes, so you do not
|
|
39
|
+
author `requirements`; your judgment is recorded as `adequacy` (whether the
|
|
40
|
+
declared checks and reviews really establish their scenarios) and in
|
|
41
|
+
`coverage_review`. Otherwise, for every requirement `R-NN` in the
|
|
34
42
|
PRD record one disposition: `delivered` (evidence on this candidate), `blocked`
|
|
35
43
|
(required behavior failed or was left unverified — this blocks PASS; do not relabel
|
|
36
44
|
it a known limitation to pass), or `deferred` (only with explicit user authorization;
|
|
@@ -65,8 +73,20 @@ run the pipeline, then present results.
|
|
|
65
73
|
produces a new candidate: re-record `candidate`, re-run the checks against it, and
|
|
66
74
|
write fresh evidence in step 9 — never reuse a manifest from a previous candidate.
|
|
67
75
|
9. Persist evidence for the candidate under `.prd/evidence/prd-vN/<candidate>/`.
|
|
68
|
-
|
|
69
|
-
|
|
76
|
+
Strict coverage: run every declared command check as
|
|
77
|
+
`node scripts/pincer-runtime.cjs check C-NN --candidate <sha>` (no command, no
|
|
78
|
+
timeout: the map's declaration is the only source, and a supplied command is
|
|
79
|
+
`CHECK_UNDECLARED`); record each declared review or visual obligation in the
|
|
80
|
+
draft with its `result` and an artifact saved under the candidate's evidence
|
|
81
|
+
directory (a required one that is not passed with an artifact is
|
|
82
|
+
`REVIEW_MISSING`); write `adequacy: { verdict: "adequate" | "inadequate", note }`;
|
|
83
|
+
list every declared check once and no `requirements` (they are derived). The
|
|
84
|
+
export writes the inventory and map snapshots under `coverage/`, derives the
|
|
85
|
+
scenario and requirement rows and `delivery` (original versus agreed scope) and
|
|
86
|
+
validates them against the committed candidate; an `inadequate` judgment or a
|
|
87
|
+
failed required check is recorded honestly and blocks readiness. Migrated
|
|
88
|
+
project without strict coverage (the `Runtime` status line names a change): run
|
|
89
|
+
each executable check through the runtime on the clean candidate view —
|
|
70
90
|
`node scripts/pincer-runtime.cjs check C-NN --candidate <sha> -- <command>` (one
|
|
71
91
|
command per check, the command line as run; `npm test` stays one aggregate check) —
|
|
72
92
|
then write the authored fields to a draft outside the evidence directory, for
|
|
@@ -79,8 +99,12 @@ run the pipeline, then present results.
|
|
|
79
99
|
`result`, `provenance: runtime` and `attempt` from the attempts, labels review and
|
|
80
100
|
visual checks `provenance: authored`, computes the digests and writes an evidence
|
|
81
101
|
schema 2 manifest; it refuses a dirty tree, a HEAD that is not the candidate, a stub
|
|
82
|
-
without an attempt, and a `passed` or `failed` command result written by hand.
|
|
83
|
-
|
|
102
|
+
without an attempt, and a `passed` or `failed` command result written by hand. On a
|
|
103
|
+
project with change records the export also appends the evaluation to the change's
|
|
104
|
+
locator `.prd/evidence/changes/<id>.json` (the identity of this change's
|
|
105
|
+
evaluation; root `NOTES.md` stays the human summary and may be overwritten by a
|
|
106
|
+
later change's evaluation without losing this one) — commit the locator with the
|
|
107
|
+
evidence. A tool that cannot run is recorded as an authored command check with
|
|
84
108
|
`result: unverified` and a note, as before. Legacy project (no change binding):
|
|
85
109
|
author the schema 1 manifest as follows.
|
|
86
110
|
- `checks/C-NN.log` — the command and a redacted summary or safe log of each
|
|
@@ -122,11 +146,13 @@ run the pipeline, then present results.
|
|
|
122
146
|
evidence: .prd/evidence/prd-vN/<candidate>/manifest.json
|
|
123
147
|
---
|
|
124
148
|
```
|
|
125
|
-
Then commit NOTES.md, the manifest
|
|
149
|
+
Then commit NOTES.md, the manifest, its listed artifacts and (change records) the
|
|
150
|
+
evaluation locator — and nothing else —
|
|
126
151
|
as `evaluate: PRD vN candidate <short sha>`. Status accepts this later commit only
|
|
127
|
-
when its diff from the candidate is limited to `NOTES.md
|
|
128
|
-
|
|
129
|
-
|
|
152
|
+
when its diff from the candidate is limited to `NOTES.md`, the candidate's evidence
|
|
153
|
+
directories and evaluation locators; changes to source, tests, configuration,
|
|
154
|
+
tickets, the PRD or the change record (a lifecycle transition after the
|
|
155
|
+
candidate) require reevaluation. Legacy notes without these references
|
|
130
156
|
do not establish readiness. Then describe what was built, what was cut
|
|
131
157
|
and why, known issues, and what you'd do next with more time. Then a **Handover**
|
|
132
158
|
section, written for the stranger who inherits this repo in six months: how to get
|
|
@@ -144,6 +170,9 @@ material choice not already authorized, and prepare the concrete proposal before
|
|
|
144
170
|
asking. A decision the user delegated (for example "pick the architecture") does not
|
|
145
171
|
need another approval when you exercise it, but a newly discovered consequential
|
|
146
172
|
choice is surfaced before implementation. Record the authorization basis and the
|
|
147
|
-
scope it covers in the PRD or the handover
|
|
173
|
+
scope it covers in the PRD or the handover, and on a project with change records as
|
|
174
|
+
a `change authorize` record (the user's words as the excerpt, or a `--delegated`
|
|
175
|
+
disposition with its basis). An agent-written record or a status
|
|
148
176
|
field is not authenticated human approval. When resuming without the context that
|
|
149
|
-
granted authorization, do not invent it —
|
|
177
|
+
granted authorization, do not invent it — read the `resume` report; an authorization
|
|
178
|
+
it reports as `current` needs no repeat approval, and any other verdict is asked.
|
|
@@ -34,10 +34,19 @@ discovered consequential choice is surfaced before implementation.
|
|
|
34
34
|
- Build the requirement map: for every `R-NN` in the PRD and each of its
|
|
35
35
|
scenarios, name the ticket that owns the implementation and the executable
|
|
36
36
|
check that exercises it, or an explicit review method when no executable check
|
|
37
|
-
exists. Record the IDs in each ticket's Context as `Implements: R-NN, R-MM
|
|
38
|
-
Enabling work that implements no requirement states its purpose
|
|
39
|
-
Objective. Resolve missing coverage and conflicting criteria with
|
|
40
|
-
before implementation; do not start with an unmapped required scenario.
|
|
37
|
+
exists. Record the IDs in each ticket's Context as `Implements: R-NN, R-MM`
|
|
38
|
+
(a navigation aid). Enabling work that implements no requirement states its purpose
|
|
39
|
+
in the ticket Objective. Resolve missing coverage and conflicting criteria with
|
|
40
|
+
the user before implementation; do not start with an unmapped required scenario. On a change with change records, author the map once as
|
|
41
|
+
`.prd/coverage/<change id>.json` (coverage map schema 1, "Coverage map" in
|
|
42
|
+
`docs/runtime-contracts.md`): one `scenarios` row per `S-NN` naming its
|
|
43
|
+
implementing tickets and declared checks, every ticket of the change in
|
|
44
|
+
`tickets` as `implements` or `enables` (with a rationale), each check declared
|
|
45
|
+
once in `checks` with its kind, `required` flag and, for a command, the exact
|
|
46
|
+
command line and timeout, and a `scope` entry (`deferred` or `removed`) for a
|
|
47
|
+
scenario this change will not deliver, naming the decision that records the
|
|
48
|
+
user's choice. The map is authored work you edit by hand; the runtime never
|
|
49
|
+
rewrites it, and it validates it against the PRD's definitions.
|
|
41
50
|
- Every ticket gets a runnable command in its Verification block — a fenced `bash`
|
|
42
51
|
block that exits 0 only when the ticket is done. `scripts/pincer-ticket.sh verify`
|
|
43
52
|
runs it verbatim and stamps the receipt that `done` requires, so it must be
|
|
@@ -87,12 +96,31 @@ existing authorization for the same scope and order.
|
|
|
87
96
|
once it is resolved — only when step 4 surfaced a newly discovered consequential
|
|
88
97
|
choice or a scope change the PRD does not cover. Then register the change when the
|
|
89
98
|
`Runtime` status line says `legacy` and no ticket of this PRD carries legacy
|
|
90
|
-
receipts
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
99
|
+
receipts, or `changes` (the project already keeps change records):
|
|
100
|
+
`node scripts/pincer-runtime.cjs register --prd .prd/prd-vN.md` writes the change
|
|
101
|
+
record `.prd/changes/prd-vN.json` (retaining every earlier change); stage
|
|
102
|
+
`.prd/changes/` and `.gitignore` (registration adds `.pincer/` to it) and commit them
|
|
103
|
+
as `Register PRD vN`. Then record the user's actual approval against the agreement
|
|
104
|
+
the record binds — `node scripts/pincer-runtime.cjs change show prd-vN --json`
|
|
105
|
+
prints the agreement digest — with
|
|
106
|
+
`node scripts/pincer-runtime.cjs change authorize prd-vN --agreement <digest> --reference "<where the user said it>" --excerpt "<the user's approval, quoted>"`,
|
|
107
|
+
select it for this worktree (`node scripts/pincer-runtime.cjs change select prd-vN`)
|
|
108
|
+
and commit `.prd/changes/` as `Authorize PRD vN`. When the map was authored, adopt
|
|
109
|
+
strict coverage explicitly: `node scripts/pincer-runtime.cjs coverage adopt --preview --change prd-vN`
|
|
110
|
+
shows the inventory, the map digest and the agreement it records (it refuses an
|
|
111
|
+
incomplete map, naming the scenario or ticket); `--apply` writes the schema 3
|
|
112
|
+
record with a backup and grants nothing — record the user's approval of that
|
|
113
|
+
agreement with `change authorize` (the same instruction, if it named this
|
|
114
|
+
breakdown; a delegated disposition needs its basis) and commit `.prd/coverage/`
|
|
115
|
+
and `.prd/changes/` as `Adopt strict coverage for PRD vN`. A scenario the user
|
|
116
|
+
deferred or removed is a decision: `change decide --summary "<the choice>"`,
|
|
117
|
+
`--resolve D-NN` with the user's words naming the scenario, the `scope` entry in
|
|
118
|
+
the map, then `change authorize … --decision D-NN`. Never record a disposition
|
|
119
|
+
the user did not state; `coverage` reports `SCOPE_UNAUTHORIZED` until it is. The excerpt records the user's own
|
|
120
|
+
words; running the command proves nothing by itself, and a registration, a PRD
|
|
121
|
+
status or a passing check never becomes an authorization. A project whose tickets
|
|
122
|
+
carry legacy receipts, or that still holds a v0.5.0 binding (`Runtime change <id> ·
|
|
123
|
+
revision …`), is migrated from `/pincer-code` after a preview, never here. Finish with:
|
|
96
124
|
"Tickets ready in `tickets/`. Run `/pincer-code` to start implementing."
|
|
97
125
|
|
|
98
126
|
## Authorization rule (shared by plan, narrow, code and evaluate)
|
|
@@ -102,6 +130,9 @@ material choice not already authorized, and prepare the concrete proposal before
|
|
|
102
130
|
asking. A decision the user delegated (for example "pick the architecture") does not
|
|
103
131
|
need another approval when you exercise it, but a newly discovered consequential
|
|
104
132
|
choice is surfaced before implementation. Record the authorization basis and the
|
|
105
|
-
scope it covers in the PRD or the handover
|
|
133
|
+
scope it covers in the PRD or the handover, and on a project with change records as
|
|
134
|
+
a `change authorize` record (the user's words as the excerpt, or a `--delegated`
|
|
135
|
+
disposition with its basis). An agent-written record or a status
|
|
106
136
|
field is not authenticated human approval. When resuming without the context that
|
|
107
|
-
granted authorization, do not invent it —
|
|
137
|
+
granted authorization, do not invent it — read the `resume` report; an authorization
|
|
138
|
+
it reports as `current` needs no repeat approval, and any other verdict is asked.
|
|
@@ -93,8 +93,13 @@ concrete scope and architecture; do not repeat an approval already given for the
|
|
|
93
93
|
In Requirements, assign stable `R-NN` IDs within the selected PRD: a revision
|
|
94
94
|
keeps existing IDs and adds new ones, never renumbers. Every requirement has
|
|
95
95
|
observable acceptance scenarios, the relevant failure paths, and the existing
|
|
96
|
-
behavior it must preserve
|
|
97
|
-
|
|
96
|
+
behavior it must preserve, each written as a bold `- **S-NN:** …` item under its
|
|
97
|
+
requirement heading (the template's grammar; the runtime parses exactly these
|
|
98
|
+
definitions into the inventory that strict coverage tracks, and a requirement
|
|
99
|
+
without a scenario is invalid there) — `/pincer-narrow` maps each scenario to a
|
|
100
|
+
ticket and a check in the coverage map, and `/pincer-evaluate` dispositions every
|
|
101
|
+
ID. A supplied PRD keeps its own uppercase IDs (`REQ-1`, `AC-3`); only its
|
|
102
|
+
definition syntax is adapted, and the mapping table records what changed.
|
|
98
103
|
2. Include optional sections when risk or the product context warrants them.
|
|
99
104
|
3. Save to the next unused `.prd/prd-v{N}.md` (create `.prd/` if needed), with `N`
|
|
100
105
|
matching the filename and frontmatter:
|
|
@@ -121,6 +126,9 @@ material choice not already authorized, and prepare the concrete proposal before
|
|
|
121
126
|
asking. A decision the user delegated (for example "pick the architecture") does not
|
|
122
127
|
need another approval when you exercise it, but a newly discovered consequential
|
|
123
128
|
choice is surfaced before implementation. Record the authorization basis and the
|
|
124
|
-
scope it covers in the PRD or the handover
|
|
129
|
+
scope it covers in the PRD or the handover, and on a project with change records as
|
|
130
|
+
a `change authorize` record (the user's words as the excerpt, or a `--delegated`
|
|
131
|
+
disposition with its basis). An agent-written record or a status
|
|
125
132
|
field is not authenticated human approval. When resuming without the context that
|
|
126
|
-
granted authorization, do not invent it —
|
|
133
|
+
granted authorization, do not invent it — read the `resume` report; an authorization
|
|
134
|
+
it reports as `current` needs no repeat approval, and any other verdict is asked.
|
|
@@ -49,6 +49,24 @@ durable runtime-owned release record is later work.
|
|
|
49
49
|
exits 1 and names the check). A fresh clone reports `local verification history
|
|
50
50
|
unavailable; saved candidate evidence validated only`: state that limit in the
|
|
51
51
|
verdict rather than claiming local verification.
|
|
52
|
+
- Change records (the `Runtime` line reads `changes`): the selected change is
|
|
53
|
+
`completed`, its authorization is `current` for the current agreement, and its
|
|
54
|
+
evaluation locator `.prd/evidence/changes/<id>.json` names the evaluated
|
|
55
|
+
candidate; `node scripts/pincer-runtime.cjs ready` reports `SELECTION_REQUIRED`,
|
|
56
|
+
`LIFECYCLE_BLOCKED`, `DECISION_REQUIRED`, `AUTHORIZATION_REQUIRED` or
|
|
57
|
+
`AGREEMENT_CHANGED` as failures. Release selects, activates and completes nothing;
|
|
58
|
+
historical evidence of a cancelled or superseded change is inspectable but never
|
|
59
|
+
release-ready.
|
|
60
|
+
- Strict coverage (the status line reads `Coverage strict …`): read
|
|
61
|
+
`node scripts/pincer-runtime.cjs coverage` — structure complete, every in-scope
|
|
62
|
+
scenario `delivered` on the evaluated candidate, deferrals and removals backed by
|
|
63
|
+
their decision and user authorization, `delivery` reported as original versus
|
|
64
|
+
agreed scope (never conflate them), adequacy `adequate`; the manifest is schema 3
|
|
65
|
+
and the `Provenance` line reads `runtime (schema 3)`. `ready` names
|
|
66
|
+
`COVERAGE_INCOMPLETE`, `SCOPE_UNAUTHORIZED`, `OBLIGATION_MISSING`,
|
|
67
|
+
`REVIEW_MISSING` and `ADEQUACY_REQUIRED` as failures. A change labeled
|
|
68
|
+
`Coverage unverified` did not adopt strict coverage: audit it under the rules
|
|
69
|
+
above and say so; never imply strict coverage was established.
|
|
52
70
|
- Every file the manifest lists is tracked, and `git status --short` is empty before
|
|
53
71
|
and after the audit.
|
|
54
72
|
- Run the repository's candidate-wide release gate directly (`npm test`, or the
|
|
@@ -20,11 +20,21 @@ start of a session. Read-only: change nothing.
|
|
|
20
20
|
candidate, any warnings (each readiness problem once), and the next command to run.
|
|
21
21
|
`scripts/pincer-status.sh --json` prints one status object with reason codes and the
|
|
22
22
|
next action for tooling; `node scripts/pincer-runtime.cjs ready [T-NN]` is the
|
|
23
|
-
read-only gate.
|
|
23
|
+
read-only gate. On a project with change records (`Runtime changes …`) run
|
|
24
|
+
`node scripts/pincer-runtime.cjs resume` as well: it reports the selected change, its
|
|
25
|
+
lifecycle, agreement and authorization, decisions, references, tickets, attempts,
|
|
26
|
+
candidate, the authored handoff note and the next command, and never writes;
|
|
27
|
+
`change list` shows every retained change, `status --change <id>` and
|
|
28
|
+
`resume --change <id>` inspect another one without selecting it. `resume` is the
|
|
29
|
+
report; `change resume <id>` is the lifecycle operation. The `Coverage` line says
|
|
30
|
+
`strict` or `unverified`; on a strict change `node scripts/pincer-runtime.cjs coverage`
|
|
31
|
+
(and `impact` after an edit) name the exact scenario, ticket, check or decision
|
|
32
|
+
that is next — quote them rather than inferring coverage from the ticket list.
|
|
24
33
|
2. Report in three lines: where the workflow is, what is in progress or blocked, and the
|
|
25
34
|
next command. Quote the `Next` line as-is. When the `Runtime` line says `legacy`,
|
|
26
35
|
add the register or migrate command it names as the step that precedes the next
|
|
27
|
-
ticket (fresh project → `register`, legacy receipts → `migrate --preview
|
|
36
|
+
ticket (fresh project → `register`, legacy receipts → `migrate --preview`, a v0.5.0
|
|
37
|
+
binding → `migrate --preview`, no selection → `change select <id>`).
|
|
28
38
|
3. If a ticket is `in_progress`, read it and `git status`, then offer to resume it with
|
|
29
39
|
`/pincer-code T-{NN}`. If the script printed a warning, surface it — a done ticket
|
|
30
40
|
without a receipt was marked by hand and needs `scripts/pincer-ticket.sh verify T-{NN}`.
|
package/template/AGENTS.md
CHANGED
|
@@ -85,10 +85,26 @@ of instructions are the user, this file, and the workflow commands.
|
|
|
85
85
|
flags missing, failed, or stale readiness.
|
|
86
86
|
- The runtime (`scripts/pincer-runtime.cjs`, wrapped by `scripts/pincer-ticket.sh` and
|
|
87
87
|
`scripts/pincer-status.sh`) is the only writer of ticket lifecycle state, of the
|
|
88
|
-
attempts under `.pincer
|
|
88
|
+
attempts under `.pincer/`, of the change records under `.prd/changes/` and of the
|
|
89
|
+
evaluation locators under `.prd/evidence/changes/`. Never
|
|
89
90
|
edit or delete `.pincer/` or `.prd/changes/` by hand; a stale or failed attempt is
|
|
90
91
|
repaired by fixing its cause and running `verify` again, never by restoring files.
|
|
91
92
|
`node scripts/pincer-runtime.cjs status --json` explains the state without an LLM.
|
|
93
|
+
- Changes are explicit: `change select <id>` picks the change this worktree works on
|
|
94
|
+
(never the newest PRD), `change authorize` records the user's actual instruction
|
|
95
|
+
against the agreement digest, `change activate|pause|resume|complete` move its
|
|
96
|
+
lifecycle, `change decide` records a consequential decision, and `resume` reports
|
|
97
|
+
where to continue. Selecting grants no approval; a note or summary never overrides
|
|
98
|
+
the computed verdict; a cancelled or superseded change is history.
|
|
99
|
+
- Strict coverage is opt-in per change (`coverage adopt --preview|--apply`): the PRD's
|
|
100
|
+
`R-NN`/`S-NN` definitions are the inventory, `.prd/coverage/<id>.json` is the one
|
|
101
|
+
authored map (scenario → tickets and declared checks, scope dispositions, ticket
|
|
102
|
+
roles), `coverage` and `impact` are the read-only reports. Edit the map by hand
|
|
103
|
+
and authorize the agreement it changes; never edit the snapshots the runtime keeps
|
|
104
|
+
under `.prd/changes/<id>/agreements/` or `.prd/evidence/…/coverage/`. A deferral
|
|
105
|
+
or removal needs a resolved decision naming the scenario and the user's
|
|
106
|
+
authorization naming that decision; a generic "continue" authorizes no revised
|
|
107
|
+
scope. Adequacy of a check is a reviewer judgment recorded in the evaluation.
|
|
92
108
|
- Candidate evidence lives in `.prd/evidence/prd-vN/<candidate>/manifest.json` and is
|
|
93
109
|
validated by `scripts/pincer-evidence.cjs` (run by status and release). Never edit
|
|
94
110
|
a manifest or its artifacts after the evaluation commit; a review fix produces a
|
|
@@ -69,9 +69,10 @@ observes agent behavior, and one trial on one surface says nothing about the oth
|
|
|
69
69
|
consequential choice (if any) was surfaced before implementation
|
|
70
70
|
- [ ] PRD frontmatter now says `status: ticketed`
|
|
71
71
|
- [ ] Tickets are committed
|
|
72
|
-
- [ ] The change was registered (`Register PRD vN` commit with `.prd/changes/prd-vN.json
|
|
73
|
-
|
|
74
|
-
`
|
|
72
|
+
- [ ] The change was registered (`Register PRD vN` commit with `.prd/changes/prd-vN.json`,
|
|
73
|
+
retaining any earlier change), the user's approval was recorded with
|
|
74
|
+
`change authorize` (quoted in the excerpt, committed as `Authorize PRD vN`) and
|
|
75
|
+
the change was selected; status now shows `Runtime changes · selected prd-vN`
|
|
75
76
|
|
|
76
77
|
## After `/pincer-code`
|
|
77
78
|
|
|
@@ -114,7 +115,23 @@ observes agent behavior, and one trial on one surface says nothing about the oth
|
|
|
114
115
|
cheat: run `verify` twice on an unchanged tree — `git status` shows no change;
|
|
115
116
|
cheat: edit a ticket body, then `migrate --apply` again — the edit is preserved and
|
|
116
117
|
the second apply reports `already migrated`
|
|
118
|
+
- [ ] Change records only: `change activate prd-vN` ran once before the first ticket and
|
|
119
|
+
no ticket command asked for a repeat approval; cheat: start a ticket of another
|
|
120
|
+
change — `WRONG_CHANGE`, nothing launched
|
|
121
|
+
- [ ] Change records only, cheat: pause the change with a reason and a handoff note, clear
|
|
122
|
+
the context, run `resume` — the report names the change, the blocker and the next
|
|
123
|
+
command from files alone, the note is labeled authored, and `change resume`
|
|
124
|
+
continues under the same authorization without a repeat approval
|
|
125
|
+
- [ ] Change records only, cheat: edit the PRD under its filename — `verify` refuses with
|
|
126
|
+
`AGREEMENT_CHANGED` until `change authorize` records the disposition; cheat: raise a
|
|
127
|
+
decision with `change decide --summary` — execution is blocked until the user's
|
|
128
|
+
answer is recorded and authorized
|
|
129
|
+
- [ ] v0.5.0 project only: the binding was converted by `migrate --apply` after a
|
|
130
|
+
preview, the old attempts read `HISTORICAL_EVIDENCE`, and the old authorization
|
|
131
|
+
text did not authorize anything
|
|
117
132
|
- [ ] Any scope cut made during build is recorded in the PRD's Out of Scope section
|
|
133
|
+
- [ ] Change records only: `change complete prd-vN` ran (`Complete PRD vN` commit) before
|
|
134
|
+
the built commit and refused while a ticket was stale or unfinished
|
|
118
135
|
- [ ] PRD frontmatter now says `status: built`, committed on its own (`PRD vN: built`)
|
|
119
136
|
before evaluation, not folded into the evidence commit
|
|
120
137
|
- [ ] Status shows the wall-clock elapsed line only while a ticket is in progress or
|
|
@@ -143,6 +160,12 @@ observes agent behavior, and one trial on one surface says nothing about the oth
|
|
|
143
160
|
`unverified`
|
|
144
161
|
- [ ] Cheat: edit a saved log after the evidence commit — status reports
|
|
145
162
|
`evidence invalid: ... digest mismatch`
|
|
163
|
+
- [ ] Strict coverage (when adopted): `coverage adopt --preview` writes nothing and
|
|
164
|
+
`--apply` records the schema 3 record with a backup; `coverage` names the
|
|
165
|
+
scenario a map row was dropped for (`COVERAGE_INCOMPLETE`) and `change complete`
|
|
166
|
+
refuses it; `check C-NN --candidate <sha> -- <other command>` is
|
|
167
|
+
`CHECK_UNDECLARED`; the exported manifest is schema 3 and `ready` reads
|
|
168
|
+
`delivery original … agreed …` from `coverage`
|
|
146
169
|
- [ ] Evaluation fixes were completed through new tickets, produced a new candidate,
|
|
147
170
|
and were re-evaluated with fresh evidence
|
|
148
171
|
- [ ] `NOTES.md` exists at the repo root with `prd`, `base`, `candidate` and
|
|
@@ -234,4 +257,8 @@ Copy this into `docs/trial-<date>-<greenfield|brownfield>.md` and fill every lin
|
|
|
234
257
|
| R-04 | |
|
|
235
258
|
| R-05 | |
|
|
236
259
|
| R-06 | |
|
|
260
|
+
| R-07 | |
|
|
261
|
+
| R-08 | |
|
|
262
|
+
| R-09 | |
|
|
263
|
+
| R-10 | |
|
|
237
264
|
```
|
|
@@ -10,11 +10,13 @@ to the owning stage or a new ticket.
|
|
|
10
10
|
- [ ] Every ticket associated with that PRD is done and ready: current `last_check` and `verified` evidence before migration, a current passing attempt after it (`node scripts/pincer-runtime.cjs ready` exits 0)
|
|
11
11
|
- [ ] `NOTES.md` names the selected PRD, reviewed base, candidate, and `evidence:` manifest; status reports the notes current and the evidence `ok`
|
|
12
12
|
- [ ] The `Provenance` line names the evidence schema; a schema 2 candidate has no newer nonpassing local attempt for the same check and source inputs, and a fresh clone's `local verification history unavailable` limit is stated, not claimed as verification
|
|
13
|
+
- [ ] Change records only: the selected change is `completed`, its authorization is `current` for the current agreement, `.prd/evidence/changes/<id>.json` names the evaluated candidate, and the audit selected, activated and completed nothing
|
|
13
14
|
- [ ] Every file the evidence manifest lists is tracked; the working tree is clean before and after the audit
|
|
15
|
+
- [ ] Strict coverage only (`Coverage strict …` in status): `node scripts/pincer-runtime.cjs coverage` reports structure complete, every in-scope scenario `delivered` on the evaluated candidate, every deferral or removal backed by its decision and user authorization, `delivery` distinguishing original from agreed scope, and an `adequate` adequacy judgment; `ready` names `COVERAGE_INCOMPLETE`, `SCOPE_UNAUTHORIZED`, `OBLIGATION_MISSING`, `REVIEW_MISSING` or `ADEQUACY_REQUIRED` as failures. A change without the capability is labeled `unverified`: say so, never imply strict coverage
|
|
14
16
|
|
|
15
17
|
## Scope and evidence
|
|
16
18
|
|
|
17
|
-
- [ ] 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
|
|
19
|
+
- [ ] 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 (strict coverage: the manifest is schema 3, its scenario rows are the inventory's, and the validator reconciled them with the committed candidate)
|
|
18
20
|
- [ ] Ticket dependencies, acceptance criteria, and verification commands match the implemented change
|
|
19
21
|
- [ ] The repository's candidate-wide release gate passes when run directly, without invoking the ticket state writer
|
|
20
22
|
- [ ] Scope cuts and known limitations are explicit in the PRD or evaluation notes
|