pincer-workflow 0.7.0 → 1.0.1

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 (139) hide show
  1. package/README.md +161 -193
  2. package/bin/pincer.js +189 -166
  3. package/package.json +4 -3
  4. package/template/.agents/skills/pincer-blueprint/SKILL.md +70 -0
  5. package/template/.agents/skills/pincer-status/SKILL.md +29 -55
  6. package/template/.claude/commands/pincer-blueprint.md +7 -0
  7. package/template/.claude/commands/pincer-status.md +4 -59
  8. package/template/.claude/hooks/hook-policy.cjs +60 -25
  9. package/template/.claude/hooks/ticket-guard.sh +6 -3
  10. package/template/.claude/pincer/library/agents/accessibility-reviewer.md +27 -0
  11. package/template/.claude/pincer/library/agents/code-quality-reviewer.md +25 -0
  12. package/template/.claude/pincer/library/agents/codebase-explorer.md +23 -0
  13. package/template/.claude/pincer/library/agents/fix-agent.md +23 -0
  14. package/template/.claude/pincer/library/agents/history-reviewer.md +26 -0
  15. package/template/.claude/pincer/library/agents/implementer.md +24 -0
  16. package/template/.claude/pincer/library/agents/security-reviewer.md +26 -0
  17. package/template/.claude/pincer/library/agents/silent-failure-hunter.md +27 -0
  18. package/template/.claude/pincer/library/agents/standards-reviewer.md +25 -0
  19. package/template/.claude/pincer/library/agents/test-coverage-reviewer.md +26 -0
  20. package/template/.claude/pincer/library/agents-skeleton.md +89 -0
  21. package/template/.claude/pincer/library/agreement.md +46 -0
  22. package/template/.claude/pincer/library/models.json +6 -0
  23. package/template/.claude/pincer/library/stages/blueprint/SKILL.md +69 -0
  24. package/template/.claude/pincer/library/stages/blueprint/formats/harness.md +82 -0
  25. package/template/.claude/pincer/library/stages/blueprint/formats/roster-rules.md +61 -0
  26. package/template/.claude/pincer/library/stages/blueprint/prompts/confirm-kind.md +19 -0
  27. package/template/.claude/pincer/library/stages/blueprint/prompts/first-job.md +18 -0
  28. package/template/.claude/pincer/library/stages/blueprint/prompts/q-handoffs.md +21 -0
  29. package/template/.claude/pincer/library/stages/blueprint/prompts/q-models.md +20 -0
  30. package/template/.claude/pincer/library/stages/blueprint/prompts/q-pipeline.md +27 -0
  31. package/template/.claude/pincer/library/stages/blueprint/prompts/q-repo.md +21 -0
  32. package/template/.claude/pincer/library/stages/blueprint/prompts/q-responsibility.md +30 -0
  33. package/template/.claude/pincer/library/stages/blueprint/prompts/q-roster.md +20 -0
  34. package/template/.claude/pincer/library/stages/blueprint/prompts/q-simplify.md +26 -0
  35. package/template/.claude/pincer/library/stages/blueprint/prompts/q-systems.md +28 -0
  36. package/template/.claude/pincer/library/stages/code/SKILL.md +59 -0
  37. package/template/.claude/pincer/library/stages/code/formats/pr.md +55 -0
  38. package/template/.claude/pincer/library/stages/code/prompts/implement.md +25 -0
  39. package/template/.claude/pincer/library/stages/evaluate/SKILL.md +51 -0
  40. package/template/.claude/pincer/library/stages/evaluate/formats/evidence.md +49 -0
  41. package/template/.claude/pincer/library/stages/evaluate/formats/finding-report.md +72 -0
  42. package/template/.claude/pincer/library/stages/evaluate/formats/finding.md +35 -0
  43. package/template/.claude/pincer/library/stages/evaluate/prompts/review.md +25 -0
  44. package/template/.claude/pincer/library/stages/narrow/SKILL.md +47 -0
  45. package/template/.claude/pincer/library/stages/narrow/formats/ticket.md +126 -0
  46. package/template/.claude/pincer/library/stages/narrow/prompts/explore.md +19 -0
  47. package/template/.claude/pincer/library/stages/plan/SKILL.md +46 -0
  48. package/template/.claude/pincer/library/stages/plan/formats/spec.md +100 -0
  49. package/template/.claude/pincer/library/stages/plan/prompts/explore.md +20 -0
  50. package/template/.claude/pincer/library/stages/release/SKILL.md +51 -0
  51. package/template/.claude/pincer/library/stages/status/SKILL.md +37 -0
  52. package/template/.claude/skills/pincer-blueprint/SKILL.md +69 -0
  53. package/template/.claude/skills/pincer-blueprint/formats/harness.md +82 -0
  54. package/template/.claude/skills/pincer-blueprint/formats/roster-rules.md +61 -0
  55. package/template/.claude/skills/pincer-blueprint/prompts/confirm-kind.md +19 -0
  56. package/template/.claude/skills/pincer-blueprint/prompts/first-job.md +18 -0
  57. package/template/.claude/skills/pincer-blueprint/prompts/q-handoffs.md +21 -0
  58. package/template/.claude/skills/pincer-blueprint/prompts/q-models.md +20 -0
  59. package/template/.claude/skills/pincer-blueprint/prompts/q-pipeline.md +27 -0
  60. package/template/.claude/skills/pincer-blueprint/prompts/q-repo.md +21 -0
  61. package/template/.claude/skills/pincer-blueprint/prompts/q-responsibility.md +30 -0
  62. package/template/.claude/skills/pincer-blueprint/prompts/q-roster.md +20 -0
  63. package/template/.claude/skills/pincer-blueprint/prompts/q-simplify.md +26 -0
  64. package/template/.claude/skills/pincer-blueprint/prompts/q-systems.md +28 -0
  65. package/template/.claude/skills/pincer-status/SKILL.md +37 -0
  66. package/template/.codex/README.md +39 -35
  67. package/template/.github/copilot-instructions.md +19 -14
  68. package/template/.github/prompts/pincer-blueprint.prompt.md +70 -0
  69. package/template/.github/prompts/pincer-status.prompt.md +29 -55
  70. package/template/AGENTS.md +34 -67
  71. package/template/docs/engine.md +249 -0
  72. package/template/docs/release-checklist.md +27 -28
  73. package/template/scripts/pincer/blueprint.cjs +137 -0
  74. package/template/scripts/pincer/cli.cjs +233 -0
  75. package/template/scripts/pincer/evidence.cjs +142 -0
  76. package/template/scripts/pincer/generate.cjs +375 -0
  77. package/template/scripts/pincer/harness.cjs +269 -0
  78. package/template/scripts/pincer/models.cjs +121 -0
  79. package/template/scripts/{pincer-runtime → pincer}/parse.cjs +83 -133
  80. package/template/scripts/pincer/recon.cjs +205 -0
  81. package/template/scripts/pincer/status.cjs +173 -0
  82. package/template/scripts/pincer/ticket.cjs +204 -0
  83. package/template/scripts/pincer/util.cjs +104 -0
  84. package/template/scripts/pincer-blueprint.cjs +7 -0
  85. package/template/scripts/pincer-evidence.cjs +5 -73
  86. package/template/scripts/pincer-status.sh +10 -12
  87. package/template/scripts/pincer-ticket.sh +15 -18
  88. package/template/scripts/sync-prompts.sh +2 -50
  89. package/template/.agents/skills/pincer-code/SKILL.md +0 -240
  90. package/template/.agents/skills/pincer-evaluate/SKILL.md +0 -178
  91. package/template/.agents/skills/pincer-narrow/SKILL.md +0 -148
  92. package/template/.agents/skills/pincer-plan/SKILL.md +0 -134
  93. package/template/.agents/skills/pincer-release/SKILL.md +0 -82
  94. package/template/.claude/agents/code-quality-reviewer.md +0 -38
  95. package/template/.claude/agents/codebase-explorer.md +0 -23
  96. package/template/.claude/commands/pincer-code.md +0 -238
  97. package/template/.claude/commands/pincer-evaluate.md +0 -176
  98. package/template/.claude/commands/pincer-narrow.md +0 -146
  99. package/template/.claude/commands/pincer-plan.md +0 -132
  100. package/template/.claude/commands/pincer-release.md +0 -80
  101. package/template/.claude/references/prd-template.md +0 -108
  102. package/template/.claude/references/ticket-template.md +0 -86
  103. package/template/.github/prompts/pincer-code.prompt.md +0 -240
  104. package/template/.github/prompts/pincer-evaluate.prompt.md +0 -178
  105. package/template/.github/prompts/pincer-narrow.prompt.md +0 -148
  106. package/template/.github/prompts/pincer-plan.prompt.md +0 -134
  107. package/template/.github/prompts/pincer-release.prompt.md +0 -82
  108. package/template/docs/dry-run-checklist.md +0 -264
  109. package/template/docs/runtime-contracts.md +0 -1769
  110. package/template/scripts/pincer-runtime/adopt.cjs +0 -132
  111. package/template/scripts/pincer-runtime/agreement.cjs +0 -240
  112. package/template/scripts/pincer-runtime/authorization.cjs +0 -167
  113. package/template/scripts/pincer-runtime/changes.cjs +0 -517
  114. package/template/scripts/pincer-runtime/checks.cjs +0 -48
  115. package/template/scripts/pincer-runtime/coverage.cjs +0 -361
  116. package/template/scripts/pincer-runtime/dispositions.cjs +0 -95
  117. package/template/scripts/pincer-runtime/evidence.cjs +0 -676
  118. package/template/scripts/pincer-runtime/fsutil.cjs +0 -37
  119. package/template/scripts/pincer-runtime/gates.cjs +0 -73
  120. package/template/scripts/pincer-runtime/identity.cjs +0 -163
  121. package/template/scripts/pincer-runtime/impact.cjs +0 -177
  122. package/template/scripts/pincer-runtime/io.cjs +0 -41
  123. package/template/scripts/pincer-runtime/lifecycle.cjs +0 -311
  124. package/template/scripts/pincer-runtime/locator.cjs +0 -158
  125. package/template/scripts/pincer-runtime/migrate.cjs +0 -204
  126. package/template/scripts/pincer-runtime/phases.cjs +0 -245
  127. package/template/scripts/pincer-runtime/readiness.cjs +0 -102
  128. package/template/scripts/pincer-runtime/requirements.cjs +0 -255
  129. package/template/scripts/pincer-runtime/resume.cjs +0 -273
  130. package/template/scripts/pincer-runtime/routing.cjs +0 -54
  131. package/template/scripts/pincer-runtime/runner.cjs +0 -242
  132. package/template/scripts/pincer-runtime/sanitize.cjs +0 -63
  133. package/template/scripts/pincer-runtime/scaffold.cjs +0 -254
  134. package/template/scripts/pincer-runtime/source.cjs +0 -129
  135. package/template/scripts/pincer-runtime/state.cjs +0 -314
  136. package/template/scripts/pincer-runtime/status.cjs +0 -514
  137. package/template/scripts/pincer-runtime/transaction.cjs +0 -200
  138. package/template/scripts/pincer-runtime/transitions.cjs +0 -134
  139. package/template/scripts/pincer-runtime.cjs +0 -686
package/README.md CHANGED
@@ -1,223 +1,191 @@
1
- # PINCER — PRD-Driven Agentic Delivery Workflow
1
+ # PINCER — a harness builder for AI coding agents
2
2
 
3
- **P**lan · **I**nvestigate · **N**arrow · **C**ode · **E**valuate · **R**elease
4
-
5
- A lean, PRD-first workflow for AI coding agents — Claude Code, Codex CLI, and
6
- GitHub Copilot. One idea goes from brief to reviewed, verified code through five
7
- commands, and every step leaves an auditable artifact: a PRD, tickets, one
8
- commit per ticket, review notes, and a pass/fail release audit.
9
-
10
- **Website:** [orchestratedbyalex.github.io/pincer-workflow](https://orchestratedbyalex.github.io/pincer-workflow/) —
11
- a twelve-sheet walkthrough of the workflow: why it exists, each command, the
12
- safety guardrails, and installation.
3
+ PINCER looks at your project, interviews you, and writes the agreement under which an
4
+ AI coding agent works there: which stages run, where the artifacts live, who accepts.
5
+ Then it runs the pipeline that agreement describes, with one floor that never bends:
6
+ a ticket is done only on a script-stamped passing check, and accepted only when a
7
+ named person said so, in their words. It works on Claude Code, Codex CLI and GitHub
8
+ Copilot from one kit, and it has no dependencies.
13
9
 
14
10
  ## Install
15
11
 
12
+ PINCER 1.0 is live on [npm](https://www.npmjs.com/package/pincer-workflow).
13
+ Install it in your project:
14
+
16
15
  ```bash
17
- cd your-project
18
- npx pincer-workflow init # asks which platform(s) you use
16
+ npx pincer-workflow@latest init --platform all
19
17
  ```
20
18
 
21
- Then follow the chain — the same five steps on every platform:
19
+ The same package is also attached to the [GitHub release](https://github.com/orchestratedbyalex/pincer-workflow/releases/tag/v1.0.1).
20
+
21
+ Node.js 22+, git and bash are required. PINCER uses your coding tool's own
22
+ authentication; it does not require a provider API key.
23
+
24
+ Then start your agent in the repository and run the blueprint:
22
25
 
23
26
  ```
24
- /pincer-plan <brief> → /pincer-narrow → /pincer-code → /pincer-evaluate → /pincer-release
27
+ /pincer-blueprint # Claude Code and Copilot
28
+ $pincer-blueprint # Codex CLI
25
29
  ```
26
30
 
27
- `/pincer-status` shows where the workflow stands at any point (PRD, tickets,
28
- receipts, elapsed time, next command) — run it first in a new session.
31
+ Until the blueprint has run there is no agreement, and every other stage refuses.
32
+ Codex-only installs point to `$pincer-blueprint`; Claude Code, Copilot and mixed
33
+ installs use `/pincer-blueprint`. A draft spec stays at the plan approval step. `scripts/pincer-status.sh` works in any
34
+ shell from the first minute and always ends with the next command.
35
+
36
+ ## The journey
37
+
38
+ **Blueprint** reads the repository first (git history, CI, deploy configuration, tests,
39
+ the forge when `gh` is available) and says whether the project is greenfield or
40
+ brownfield, and why; you confirm. Then it interviews you, one question at a time,
41
+ through the six sections of a harness agreement: Systems, Current pipeline, Handoff
42
+ artifacts, Simplify, Responsibility, Repo. Every answer it could pre-fill is shown as
43
+ "I see X; is that right?", and `open` is always an allowed answer. It proposes the
44
+ roster of review agents from your answers, writes `harness.json` and the agreement at
45
+ the top of `AGENTS.md`, generates the project's copies of the stages you kept, and
46
+ names the first real job. The first run through the pipeline is the trace you revisit
47
+ the agreement with.
48
+
49
+ The stages the agreement keeps, and what the interview can bend:
50
+
51
+ | Stage | Command | Default role | What the interview can bend |
52
+ |---|---|---|---|
53
+ | blueprint | `/pincer-blueprint` | the interview above | nothing; always on |
54
+ | plan | `/pincer-plan` | brief to a written spec with stable `R-NN` IDs | off for small changes; the spec can be a forge issue instead of a file |
55
+ | narrow | `/pincer-narrow` | spec to tickets with runnable checks | tickets as local files or as forge issues; one ticket per change |
56
+ | code | `/pincer-code` | build tickets in order, one commit each, verify, done | branch per ticket or commit to main; PR or no PR; implementer agent or the main session |
57
+ | evaluate | `/pincer-evaluate` | review the diff with the roster, run the checks, save evidence | review in the PR instead of a local report; evidence on or off; the roster |
58
+ | release | `/pincer-release` | read-only audit, then acceptance recorded and committed | audit a merged PR and a deploy instead of a clean tree; who accepts |
59
+ | status | `/pincer-status` | where the work stands, the next command | nothing; always on |
60
+
61
+ Each stage is a short skill with the same six sections (Reads, Steps, Checks, Writes,
62
+ Without subagents, When this stage is off). It reads `harness.json` first and refuses
63
+ when the agreement switched it off. The project copies under `.claude/skills/` are
64
+ yours to edit; the Codex skills and Copilot prompts are generated from them.
65
+
66
+ ## The floor
67
+
68
+ - `scripts/pincer-ticket.sh verify T-NN` runs the ticket's Verification block and
69
+ stamps a receipt only on exit 0. `done` refuses without a receipt for the current
70
+ check, or with an unticked criterion.
71
+ - `scripts/pincer-ticket.sh accept T-NN --by "<name>" --words "<their words>"` records
72
+ the acceptance of a done ticket: a person named in the agreement, quoted. The agent
73
+ runs it only after the person said so. Release commits those three acceptance
74
+ fields separately, checks the final tree is clean, and keeps the evaluated
75
+ candidate distinct from the acceptance commit.
76
+ - The eight lifecycle fields of a ticket are written only by that script. On Claude
77
+ Code a hook enforces it; on Codex and Copilot it is a standing rule, and status flags
78
+ a missing, failed or stale receipt and every done ticket without acceptance.
79
+ - Evidence, when the agreement keeps it, is a validated manifest under the evidence
80
+ home that release reads instead of trusting chat.
81
+ - Nothing is restored from git to clear a warning. A failed check is fixed and run
82
+ again; a hand-edited ticket is repaired by the person, then verified again.
83
+
84
+ `docs/engine.md` in the installed kit is the full contract: fields, receipts, exit
85
+ codes, the gate, the manifest, generation, recovery.
29
86
 
30
- On Codex CLI the commands are skills, invoked by mention rather than slash:
31
- `$pincer-plan <brief>` → `$pincer-narrow` → `$pincer-code` → `$pincer-evaluate`
32
- → `$pincer-release`, and `$pincer-status`.
87
+ ## What you get
33
88
 
34
- ## Your first change, end to end
89
+ | Path | What it is |
90
+ |---|---|
91
+ | `AGENTS.md` | the agreement between two markers, then the standing rules and your conventions |
92
+ | `harness.json` | the machine-readable agreement, written by the blueprint, read by every stage |
93
+ | `scripts/pincer-ticket.sh` | `start`, `verify`, `done`, `accept`: the only writer of ticket lifecycle fields |
94
+ | `scripts/pincer-status.sh` | the report, `--json`, and the stage gate `--stage <name>` |
95
+ | `scripts/pincer-blueprint.cjs` | `recon`, `write`, `generate` |
96
+ | `scripts/pincer-evidence.cjs` | `validate` and `digest` for evidence manifests |
97
+ | `scripts/sync-prompts.sh` | regenerates the project copies, Codex skills and Copilot prompts |
98
+ | `scripts/pincer/` | the dependency-free Node core behind the four entry points |
99
+ | `.claude/pincer/library/` | the library: every stage skill, prompt, format and agent |
100
+ | `.claude/skills/pincer-<stage>/` | the project's editable copy of each stage that is on |
101
+ | `.claude/commands/`, `.agents/skills/`, `.github/prompts/` | the thin commands, the Codex skills, the Copilot prompts, generated |
102
+ | `.claude/agents/` | the review agents the roster names, with the model of their tier |
103
+ | `.codex/agents/` | the same agents as Codex agent files, generated when Codex is installed |
104
+ | `.claude/pincer/library/models.json` | the tier table: the model each platform runs a tier on |
105
+ | `docs/engine.md`, `docs/release-checklist.md` | the engine contract and the release audit |
106
+ | `specs/`, `tickets/`, `evidence/` | the default homes, all overridable in `harness.json` |
107
+
108
+ Secrets never enter the kit: `init` adds `.env`, `.env.*` and `!.env.example` to
109
+ `.gitignore`, and the standing rules in `AGENTS.md` say the rest.
110
+
111
+ ## Platforms
112
+
113
+ | | Claude Code | Codex CLI | GitHub Copilot |
114
+ |---|---|---|---|
115
+ | Agreement | `AGENTS.md` via the `CLAUDE.md` import | `AGENTS.md` natively | pointed at by `.github/copilot-instructions.md` |
116
+ | Stages | `.claude/skills/` plus `/pincer-*` commands | `.agents/skills/`, invoked as `$pincer-*` | `.github/prompts/`, invoked as `/pincer-*` with prompt files enabled |
117
+ | Agents | subagents | subagents from `.codex/agents/` | the Claude agent files, read by VS Code |
118
+ | Floor | script plus hook | script plus status warning | script plus status warning |
119
+
120
+ The hook exists only on Claude Code. On the other platforms the rule in `AGENTS.md`
121
+ carries the weight, `scripts/pincer-status.sh` reports what the rule would have
122
+ stopped, and the posture notes in `.codex/README.md` apply. Node 22 or newer, git and
123
+ bash are needed everywhere; `gh` only for the forge-facing steps the agreement chose.
124
+
125
+ ## Model tiers
126
+
127
+ The agreement says which tier each stage and each roster agent runs on: `strong`,
128
+ `standard`, `fast`, or `inherit` for the session's model, with an optional effort
129
+ (`low`, `medium`, `high`). The blueprint proposes the tiers right after the roster
130
+ (reviewers strong, the implementer and the explorer standard, every stage as run) and
131
+ writes what you confirm under `models` in `harness.json`; nothing moves to a stronger
132
+ tier unless you said so. One table in the library, `.claude/pincer/library/models.json`,
133
+ maps a tier to each platform's model name, and the generator writes the platform's own
134
+ field: Claude Code agent and skill frontmatter, Codex agent files, the Copilot prompt
135
+ files. `harness.json` never names a vendor's model; a project that must pin one sets
136
+ `models.map.<platform>.<tier>`. When a vendor ships a new model the table changes by one
137
+ row and `npx pincer-workflow update` carries it into every project; `doctor` shows what
138
+ each installed platform will run.
35
139
 
36
- The five commands above are the shape of the work. This is the whole journey for one
37
- change on a project that wants strict requirement coverage — the path most of the
38
- runtime exists to support. Every step is a real command; none of them is optional
39
- ceremony, and the two read-only reports (`coverage scaffold`, `resume --brief`) write
40
- nothing.
140
+ ## Update
41
141
 
42
142
  ```bash
43
- # 1. Install, then plan and break down the work.
44
- npx pincer-workflow init
45
- # /pincer-plan <brief> → .prd/prd-v1.md with R-NN requirements and S-NN scenarios
46
- # /pincer-narrow → tickets/T-*.md, one per unit of work
47
-
48
- # 2. Register the change and select it in this worktree.
49
- node scripts/pincer-runtime.cjs register --prd .prd/prd-v1.md
50
- node scripts/pincer-runtime.cjs change select prd-v1
51
-
52
- # 3. Choose your coverage. Default is fine: tickets, checks and evidence work without
53
- # this step. Strict coverage additionally binds every S-NN to a ticket and a check.
54
- # Start the map from the draft — it lists every scenario and ticket for you:
55
- node scripts/pincer-runtime.cjs coverage scaffold --change prd-v1
56
-
57
- # 4. Author .prd/coverage/prd-v1.json yourself from that draft, then review the links.
58
- # The draft never invents a link, a check command or a scope disposition, and it is
59
- # not a map: `coverage adopt` refuses it. Working through its Unresolved list is the
60
- # authoring step.
61
-
62
- # 5. Adopt strict coverage explicitly, then record the user's actual approval.
63
- node scripts/pincer-runtime.cjs coverage adopt --preview --change prd-v1
64
- node scripts/pincer-runtime.cjs coverage adopt --apply --change prd-v1
65
- node scripts/pincer-runtime.cjs change authorize prd-v1 --agreement <digest> \
66
- --reference "<where the user said it>" --excerpt "<the user's approval, quoted>"
67
- node scripts/pincer-runtime.cjs change activate prd-v1
68
-
69
- # 6. Implement. One commit per ticket; `done` refuses without a current passing check.
70
- # /pincer-code
71
-
72
- # 7. Come back tomorrow, or in a fresh session with no memory of any of this:
73
- node scripts/pincer-runtime.cjs resume --brief
74
- # → one screen: the change, the authorization verdict, the coverage label, the
75
- # blocker categories with counts, and the exact next command. `resume` (no
76
- # --brief) prints every row; the brief names the command that shows them.
77
-
78
- # 8. Evaluate and audit.
79
- # /pincer-evaluate → validated evidence under .prd/evidence/
80
- # /pincer-release → read-only pass/fail audit
81
- ```
82
-
83
- Adoption grants no approval, and approval is never inferred: `coverage adopt` records
84
- the agreement, `change authorize` records what the user actually said about it, and a
85
- generic "continue" authorizes no revised scope. Edit the PRD, the tickets or the map
86
- afterwards and the agreement changes — the runtime reports `AGREEMENT_CHANGED` and
87
- waits for a fresh decision rather than carrying the old approval forward.
88
-
89
- ### Pinning a management kit
90
-
91
- The kit under `scripts/` is code that the workflow also runs *on* the project. When you
92
- are changing that code, manage the work with a pinned released copy from outside the
93
- tree rather than with the version you are editing — extract the scripts from a release
94
- tag into a directory outside the repository, record its digest, and run the lifecycle
95
- commands from there. A project that only uses PINCER never needs this; a project that
96
- develops it does.
97
-
98
- ### Claude Code
99
-
100
- Installs complete: the commands, the two subagents, the `.env` deny rules and
101
- the destructive-command and ticket-guard hooks install to `.claude/`. Start
102
- `claude` in the repo and run `/pincer-plan <brief>`. See
103
- [platform support](#platform-support) for what that install has been observed to do.
104
-
105
- ### Codex CLI
106
-
107
- Installs complete as well: `AGENTS.md` loads natively, and the six commands
108
- install as skills under `.agents/skills/`, which Codex discovers from the repo
109
- (no copying into your home directory — Codex removed custom prompts and
110
- `~/.codex/prompts/` in early 2026). Start `codex` in the repo, then type
111
- `$pincer-plan <brief>`; `$` opens the skill picker and `/skills` lists what
112
- loaded. Inside the Codex skills every cross-reference already reads
113
- `$pincer-narrow`, `$pincer-status` and so on.
114
-
115
- Pincer does not currently install a Codex hook adapter, so its Codex guardrail
116
- posture uses `~/.codex/config.toml` — `approval_policy = "on-request"` and
117
- `sandbox_mode = "workspace-write"`; never run with approvals disabled. The
118
- ticket scripts (`scripts/pincer-ticket.sh`, `scripts/pincer-status.sh`) are
119
- plain bash and work unchanged; the rule in `AGENTS.md` against hand-editing
120
- ticket state carries the weight the hook carries on Claude Code, and
121
- `$pincer-status` flags missing, failed, or stale ticket readiness.
122
- Full notes in `.codex/README.md`.
123
-
124
- ### GitHub Copilot (VS Code)
125
-
126
- Enable `"chat.promptFiles": true` in VS Code settings, then run `/pincer-plan`
127
- in chat. `.github/copilot-instructions.md` is wired to `AGENTS.md`.
128
-
129
- ## Platform support
130
-
131
- Two different claims, kept apart on purpose. **Installation-tested** means the packed
132
- artifact installs and its files land where they should, proven by the suites in this
133
- repository on every push. **Live-observed** means a real agent session carried a real
134
- change through the workflow on that surface and the artifacts were reviewed. An
135
- installation check is not a platform trial, and packaged parity is not live success.
136
-
137
- | Surface | Installation-tested | Live-observed |
138
- | --- | --- | --- |
139
- | Claude Code (`npx pincer-workflow init`) | yes — packed install, layout and generated parity | not for this release |
140
- | Codex CLI (`.agents/skills/`) | yes — packed install and skill layout | not for this release |
141
- | GitHub Copilot (VS Code prompts) | yes — packed install and prompt layout | no |
142
- | Claude Code plugin (marketplace) | yes — plugin build parity | no |
143
- | Windows (native, no POSIX shell) | no | no |
144
-
145
- No live platform trial has been observed for the current release. The work that would
146
- produce one — a full strict journey on Claude Code and on Codex, plus a real cross-agent
147
- handoff resumed from files — is open, and until it reports, every "live-observed" cell
148
- above stays as it reads. Earlier releases have their own recorded trials under `docs/`;
149
- those describe the versions they were run against, not this one.
150
-
151
- ## Claude Code plugin (alternative)
152
-
153
- Claude users can install PINCER as a plugin instead — commands arrive
154
- namespaced (`/pincer:plan` … `/pincer:release`) and update automatically
155
- through the marketplace. The plugin's structured hook parser requires Node.js 22+:
156
-
143
+ npx pincer-workflow@latest update # edited files get a .new sidecar
144
+ npx pincer-workflow@latest doctor # checks the install and agreement
157
145
  ```
158
- /plugin marketplace add orchestratedbyalex/pincer-workflow
159
- /plugin install pincer@pincer-workflow
160
- ```
161
-
162
- Pick one channel per project: the plugin makes the commands, subagents, and
163
- the guardrail hook available everywhere, while `npx pincer-workflow init`
164
- installs everything project-locally *plus* the repo-side files (`AGENTS.md`
165
- rules, `.env` deny rules in `.claude/settings.json`, the adapters for Codex
166
- and Copilot). Installing both gives you duplicate commands. Plugin users who
167
- want the repo-side rules too can copy `AGENTS.md` from the
168
- [template](template/AGENTS.md).
169
146
 
170
- ## What you get
171
-
172
- | Piece | Purpose |
173
- | --- | --- |
174
- | `AGENTS.md` | Project rules, single cross-platform source (workflow order, security defaults, secrets, untrusted-content and dependency rules) |
175
- | `.claude/commands/` | The five playbooks plus `/pincer-status` (canonical — adapters are generated from them; ships on every platform together with `agents/` and `references/`) |
176
- | `.claude/agents/` | `codebase-explorer` and `code-quality-reviewer` subagents, with inline fallbacks for platforms without subagents |
177
- | `scripts/pincer-runtime.cjs` + `scripts/pincer-runtime/` | The runtime (Node.js 22+, no dependencies): one implementation of the ticket lifecycle, readiness, status (`--json` too), change records with lifecycle, agreements, authorization and decisions (`change list|show|select|activate|pause|resume|complete|reopen|cancel|supersede|revise|authorize|decide`), the read-only `resume` report, source identity, verification attempts with sanitized captured logs, migration with backups, candidate checks and evidence export; `docs/runtime-contracts.md` is its contract. Local attempts and the worktree's selection live in the ignored `.pincer/runtime/`, change records in `.prd/changes/`, evaluation locators in `.prd/evidence/changes/`; all are written only by the runtime |
178
- | `scripts/pincer-ticket.sh` | Wrapper for the lifecycle: `start` (enforces dependency order) → `verify` (runs the ticket's check; before migration it stamps a receipt only on green, after migration it records an attempt bound to the current source) → `done` (refuses without a current pass or with unticked criteria; after migration it consumes the attempt without re-running the check) |
179
- | `scripts/pincer-status.sh` | Wrapper for the read-only state report: current PRD and profile, `Runtime` mode, associated tickets, wall-clock elapsed time while work is active or against an explicit budget, evidence verdict and `Provenance`, warnings with reason codes, and next command |
180
- | `scripts/pincer-evidence.cjs` | Read-only validator for candidate evidence (schema 1 authored, schema 2 exported from runtime attempts): `/pincer-evaluate` writes `.prd/evidence/prd-vN/<candidate>/manifest.json` plus logs and screenshots; status and release validate schema, references, candidate association, required results, provenance, file containment and SHA-256 digests. Legacy `NOTES.md` without a manifest is readable but never release-ready; an older runtime does not enforce this contract |
181
- | `docs/runtime-contracts.md` | The runtime contract: modes (legacy, migrated, changes), commands and exit codes, supported grammar, change records, selection, lifecycle, agreements and authorization, command gates, identities, source manifest, attempts, transactions, capture limits, reason codes, evidence schema 2, the evaluation locator, the resume report, migration and rollback, worktrees |
182
- | `.claude/hooks/` + `settings.json` | Claude guardrails for documented destructive command forms and for writes to ticket state, `.pincer/`, `.prd/changes/` and `.prd/evidence/changes/`; Node.js 22+ parses hook payloads structurally |
183
- | `.agents/skills/` · `.codex/` · `.github/` | Generated Codex skills and Copilot prompt files + platform wiring (`.codex/README.md` covers the Codex posture) |
184
- | `scripts/sync-prompts.sh` | Regenerates the adapters after you edit a playbook |
185
- | `scripts/build-plugin.sh` (maintainers of this repository only — not installed into your project) | Regenerates the Claude Code plugin (`plugin/`) from the template |
186
- | `docs/release-checklist.md` | General, read-only candidate audit used by `/pincer-release` |
187
- | `docs/dry-run-checklist.md` | Separate manual platform trial for the Pincer kit |
147
+ With an agreement in place, `update` also refreshes the library and regenerates the
148
+ project copies you did not edit; an edited copy stays and gets the new version beside
149
+ it as `<file>.new`.
188
150
 
189
- ## Update
151
+ ## Trying it locally before release
190
152
 
191
153
  ```bash
192
- npx pincer-workflow@latest update
154
+ npm pack # in this repository: pincer-workflow-1.0.1.tgz
155
+ cp pincer-workflow-1.0.1.tgz ../some-project/ && cd ../some-project
156
+ npx ./pincer-workflow-1.0.1.tgz init --platform all # the ./ matters: npx treats a bare path as a command
157
+ scripts/pincer-status.sh # prints "no agreement yet" and "Next: /pincer-blueprint"
193
158
  ```
194
159
 
195
- Files you never touched are refreshed in place. (Installs older than v0.2.0 gain the ticket state machine, the status report and the ticket-guard hook on update; `.claude/settings.json` conflicts if you edited it — merge the new hook entry from the `.new` file. v0.2.2 replaces the Codex adapter: the commands are now skills in `.agents/skills/` invoked as `$pincer-*`, since Codex no longer loads `~/.codex/prompts/` — you can delete the copies there. v0.2.3 ships the playbooks, rubrics and templates under `.claude/` on every platform, which Codex- and Copilot-only installs were missing. v0.3.0 makes trust revocable: every verification attempt is recorded, `done` re-runs the check, tickets carry `prd:`, the release audit is read-only, and `.pincer.json` moves to schema 2 — an install from 0.2.x is treated as an untrusted baseline, so on the first update every changed file arrives as a `.new` proposal once; hooks now need Node 18+. v0.4.0 carries requirement IDs and `Proves:` checks from the PRD to evaluation, adds `profile: small|standard`, and saves candidate evidence under `.prd/evidence/`; the update is additive, but an existing `NOTES.md` without an `evidence:` manifest reads as stale until `/pincer-evaluate` is re-run. v0.4.1 is playbook wording only: the code playbook gains one recovery exception (a tree back at the evaluated candidate is restored by the user and nothing is committed), evaluate records one check per command, and plan asks only the open part of a partly answered question. v0.5.0 adds the runtime: `scripts/pincer-runtime.cjs` with its modules under `scripts/pincer-runtime/` now implements the ticket lifecycle, status, migration and evidence export, and `pincer-ticket.sh` / `pincer-status.sh` delegate to it, so every command needs Node.js 18+; unmigrated projects keep their receipts and behavior. Run `node scripts/pincer-runtime.cjs migrate --preview --prd .prd/prd-vN.md` to see what migration would change; after `--apply`, `verify` records attempts with captured logs under the ignored `.pincer/runtime/` and writes no receipt into the ticket, `done` consumes the current passing attempt against the current source, and `/pincer-evaluate` exports evidence schema 2 from runtime attempts. `docs/runtime-contracts.md` is the contract; `pincer doctor` tells you when a migration is available and never migrates on its own. v0.6.0 keeps several changes side by side: `register` writes a change record (schema 2) that retains every earlier change, the worktree selects the change it works on (`change select`), the user's approval is recorded against the reviewed agreement (`change authorize`), the lifecycle is explicit (`change activate|pause|resume|complete|reopen|cancel|supersede`), and `resume` prints where to continue from files alone. A v0.5.0 binding converts with the same `migrate --preview` / `--apply`; the converted change is planned with no authorization, its old attempts and evaluation are history until verified again, and the old free-text authorization never authorizes execution. Selection and local attempts are per worktree; records are tracked and shared through git; completed means ready for evaluation, not released. v0.6.0 also raises the floor to Node.js 22+, because 18 and 20 are past end of life. It separately fixes a defect that was never version-specific: a command whose output exceeded one pipe buffer (65,536 bytes) lost the tail when the process exited and still exited 0, on every version including 22 and 24. Every write is now synchronous, so piped `--json` is complete. Updating the kit inside a migrated project changes tracked runtime files, so every done ticket's attempt reads `SOURCE_CHANGED` until it is verified again; update between changes, not mid-ticket. An update from 0.4.x leaves the retired `scripts/pincer-ticket-lib.sh` on disk; `pincer doctor` names it and it is safe to delete.) Files you edited are left
196
- alone — the new version lands next to them as `<file>.new` for a manual merge.
197
- `npx pincer-workflow doctor` checks the health of an install (hook executable,
198
- `.gitignore` covering `.env*`, no unmerged `*.new` files, version current).
160
+ ## Status of the older channels
161
+
162
+ - The Claude Code plugin channel is paused; the kit installs with `npx` on every platform.
163
+ - The wiki under `docs/wiki/` is frozen at 0.7 and kept for history.
164
+ - PRD v8 is superseded by the harness-builder design; its open tickets are marked so.
165
+ - The GitHub Pages site describes 1.0. See [CHANGELOG.md](CHANGELOG.md) before upgrading from 0.7.
199
166
 
200
167
  ## Design principles
201
168
 
202
- - **Approval gates scale with decision cost** — a human owns architecture, scope,
203
- and merge decisions; unchanged authorization persists across resume and routine
204
- verification, while explicit budgets shape the depth of work.
205
- - **Nothing is done while its verification fails** — every ticket carries a
206
- runnable check, and "done" is a state only a passing run of that check can
207
- unlock: the receipt is stamped by the script, never typed by the agent.
169
+ - **A person owns the decisions** — scope, direction, acceptance, anything that leaves
170
+ the machine (pushing, merging) and the rules; the agent does the work and writes
171
+ down the technical decisions it takes.
172
+ - **Nothing is done while its verification fails** — every ticket carries a runnable
173
+ check, and "done" is a state only a passing run of that check can unlock: the
174
+ receipt is stamped by the script, never typed by the agent.
175
+ - **Accepted means a named person said so** — acceptance is recorded with the
176
+ person's name and their words, per ticket, and release passes only with it.
208
177
  - **State lives in files, not in the conversation** — a new session runs
209
- `/pincer-status` and knows exactly where to resume; elapsed time comes from
210
- timestamps, not from the model's sense of time.
211
- - **Evidence is saved, not narrated** — requirements carry stable IDs from the
212
- PRD through tickets to evaluation, and the evaluation writes a validated
213
- manifest under `.prd/evidence/` that release reads instead of trusting chat.
214
- - **Scope is a first-class artifact** — cuts are recorded, never silent.
215
- - **Security is threaded through every stage** — designed in at Plan, specified
216
- as reject-path criteria at Narrow, enforced by a pre-commit sweep at Code,
217
- audited mechanically at Evaluate and Release.
218
- - **Layered guardrails** — Claude hooks cover documented high-risk command and
219
- ticket-state forms, while sandbox and approval controls remain the security
220
- boundary. Other platforms use their native controls plus `/pincer-release`.
178
+ `/pincer-status` and knows exactly where to resume.
179
+ - **Evidence is saved, not narrated** — requirements carry stable IDs from the spec
180
+ to the tickets, and the evaluation writes a validated manifest that release reads.
181
+ - **Scope is a first-class artifact** — cuts are recorded in the spec, never silent;
182
+ stages switched off carry their reason in the agreement.
183
+ - **Security is threaded through every stage** — designed in at plan, specified as
184
+ reject-path criteria at narrow, swept before every commit at code, audited at
185
+ evaluate and release.
186
+ - **Layered guardrails** — the Claude Code hooks cover documented high-risk command
187
+ and ticket-state forms while sandbox and approval controls remain the security
188
+ boundary; other platforms use their native controls plus the standing rules.
221
189
 
222
190
  ## License
223
191