pincer-workflow 0.2.2 → 0.3.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 +16 -15
- package/bin/pincer.js +52 -12
- package/package.json +2 -2
- package/template/.agents/skills/pincer-code/SKILL.md +19 -16
- package/template/.agents/skills/pincer-evaluate/SKILL.md +28 -9
- package/template/.agents/skills/pincer-narrow/SKILL.md +27 -21
- package/template/.agents/skills/pincer-plan/SKILL.md +28 -20
- package/template/.agents/skills/pincer-release/SKILL.md +14 -9
- package/template/.agents/skills/pincer-status/SKILL.md +1 -1
- package/template/.claude/commands/pincer-code.md +18 -15
- package/template/.claude/commands/pincer-evaluate.md +28 -9
- package/template/.claude/commands/pincer-narrow.md +25 -19
- package/template/.claude/commands/pincer-plan.md +26 -18
- package/template/.claude/commands/pincer-release.md +13 -8
- package/template/.claude/commands/pincer-status.md +1 -1
- package/template/.claude/hooks/block-dangerous.sh +7 -18
- package/template/.claude/hooks/hook-policy.cjs +258 -0
- package/template/.claude/hooks/ticket-guard.sh +6 -63
- package/template/.claude/references/prd-template.md +3 -3
- package/template/.claude/references/ticket-template.md +22 -4
- package/template/.codex/README.md +8 -4
- package/template/.github/prompts/pincer-code.prompt.md +18 -15
- package/template/.github/prompts/pincer-evaluate.prompt.md +28 -9
- package/template/.github/prompts/pincer-narrow.prompt.md +25 -19
- package/template/.github/prompts/pincer-plan.prompt.md +26 -18
- package/template/.github/prompts/pincer-release.prompt.md +13 -8
- package/template/.github/prompts/pincer-status.prompt.md +1 -1
- package/template/AGENTS.md +2 -3
- package/template/docs/dry-run-checklist.md +19 -15
- package/template/docs/release-checklist.md +34 -0
- package/template/scripts/pincer-status.sh +64 -23
- package/template/scripts/pincer-ticket-lib.sh +270 -0
- package/template/scripts/pincer-ticket.sh +57 -46
- package/template/scripts/sync-prompts.sh +6 -1
|
@@ -1,66 +1,9 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
# PreToolUse guard for ticket
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
# Creating a ticket with `status: open` and ticking acceptance boxes stay allowed.
|
|
8
|
-
# Exit 2 blocks the tool call; stderr goes back to the agent.
|
|
9
|
-
#
|
|
10
|
-
# A guard against carelessness, not an adversary: the agent could still route
|
|
11
|
-
# around it, but it can no longer do so by accident or habit.
|
|
12
|
-
|
|
13
|
-
input=$(cat)
|
|
14
|
-
|
|
15
|
-
field() { # dotted path into the hook JSON, e.g. tool_input.file_path
|
|
16
|
-
if command -v jq >/dev/null 2>&1; then
|
|
17
|
-
printf '%s' "$input" | jq -r ".$1 // empty" 2>/dev/null
|
|
18
|
-
elif command -v python3 >/dev/null 2>&1; then
|
|
19
|
-
printf '%s' "$input" | python3 -c '
|
|
20
|
-
import json, sys
|
|
21
|
-
d = json.load(sys.stdin)
|
|
22
|
-
for k in sys.argv[1].split("."):
|
|
23
|
-
d = d.get(k, "") if isinstance(d, dict) else ""
|
|
24
|
-
print(d if isinstance(d, str) else json.dumps(d))' "$1" 2>/dev/null
|
|
25
|
-
else # crude fallback: last path segment, first match, no unescaping
|
|
26
|
-
printf '%s' "$input" | grep -oE "\"${1##*.}\"[[:space:]]*:[[:space:]]*\"([^\"\\\\]|\\\\.)*\"" | head -1 | sed -E 's/^"[^"]*"[[:space:]]*:[[:space:]]*"//; s/"$//'
|
|
27
|
-
fi
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
tool=$(field tool_name)
|
|
31
|
-
# `status: open` is fine; these are the fields only the script may write.
|
|
32
|
-
PROTECTED='(^|\\n|[[:space:]])(status:[[:space:]]*(in_progress|done)|started:|verified:|finished:)'
|
|
33
|
-
TICKET='(^|/)tickets/T-[0-9]+[^/]*\.md$'
|
|
34
|
-
|
|
35
|
-
block() {
|
|
36
|
-
echo "Blocked by PINCER ticket guard: $1 Use pincer-ticket.sh (path in the /pincer-code playbook): 'verify T-NN' writes the receipt when the check passes, 'done T-NN' flips the status. Ticking acceptance boxes and editing the body are fine." >&2
|
|
2
|
+
# PreToolUse guard for ticket lifecycle fields. The Node helper parses JSON,
|
|
3
|
+
# compares existing and proposed frontmatter for editing tools, and permits only
|
|
4
|
+
# exact pincer-ticket.sh lifecycle calls as shell writers.
|
|
5
|
+
command -v node >/dev/null 2>&1 || {
|
|
6
|
+
echo 'Blocked by PINCER ticket guard: Node.js is required to parse hook input safely.' >&2
|
|
37
7
|
exit 2
|
|
38
8
|
}
|
|
39
|
-
|
|
40
|
-
case "$tool" in
|
|
41
|
-
Edit|Write|MultiEdit)
|
|
42
|
-
file=$(field tool_input.file_path)
|
|
43
|
-
printf '%s' "$file" | grep -qE "$TICKET" || exit 0
|
|
44
|
-
case "$tool" in
|
|
45
|
-
Edit) new=$(field tool_input.new_string) ;;
|
|
46
|
-
Write) new=$(field tool_input.content) ;;
|
|
47
|
-
*) new=$(field tool_input.edits) ;;
|
|
48
|
-
esac
|
|
49
|
-
[ -n "$new" ] || new=$input
|
|
50
|
-
if printf '%s' "$new" | grep -qE "$PROTECTED"; then
|
|
51
|
-
block "ticket state fields (status in_progress/done, started, verified, finished) are never written by hand."
|
|
52
|
-
fi
|
|
53
|
-
;;
|
|
54
|
-
Bash)
|
|
55
|
-
cmd=$(field tool_input.command)
|
|
56
|
-
[ -n "$cmd" ] || cmd=$input
|
|
57
|
-
printf '%s' "$cmd" | grep -q 'pincer-ticket.sh' && exit 0
|
|
58
|
-
if printf '%s' "$cmd" | grep -qE 'tickets/|T-[0-9][0-9]' &&
|
|
59
|
-
printf '%s' "$cmd" | grep -qE 'status:[[:space:]]*(in_progress|done)|started:|verified:|finished:' &&
|
|
60
|
-
printf '%s' "$cmd" | grep -qE '(sed|perl)[[:space:]]+(-[a-zA-Z]*i|-i)|>|tee[[:space:]]|python|node|ruby'; then
|
|
61
|
-
block "that command writes ticket state fields from the shell."
|
|
62
|
-
fi
|
|
63
|
-
;;
|
|
64
|
-
esac
|
|
65
|
-
|
|
66
|
-
exit 0
|
|
9
|
+
exec node "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/hook-policy.cjs" ticket
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# PRD Template
|
|
2
2
|
|
|
3
|
-
Used by `/pincer-plan` Phase 4. Core sections always included
|
|
4
|
-
|
|
3
|
+
Used by `/pincer-plan` Phase 4. Core sections are always included. Add optional detail
|
|
4
|
+
when uncertainty, product context, or risk warrants it; a small fix may remain compact.
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -56,7 +56,7 @@ and where they live (server-side only, named in `.env.example`), and what the cl
|
|
|
56
56
|
sees on failure (generic message — details stay in server logs).
|
|
57
57
|
|
|
58
58
|
### Dependencies & Risks
|
|
59
|
-
|
|
59
|
+
Include when something outside our control or a migration/rollback concern could sink delivery.
|
|
60
60
|
|
|
61
61
|
---
|
|
62
62
|
|
|
@@ -6,7 +6,8 @@ Used by `/pincer-narrow` for every file in `tickets/`. Filename: `T-{NN}-{slug}.
|
|
|
6
6
|
---
|
|
7
7
|
ticket: T-{NN}
|
|
8
8
|
status: open # open | in_progress | done
|
|
9
|
-
size: S # S
|
|
9
|
+
size: S # S | M | L, relative scope; split when it improves verification
|
|
10
|
+
prd: .prd/prd-v{N}.md # the selected PRD, never inferred from ticket numbering
|
|
10
11
|
depends_on: [] # e.g. [T-01]
|
|
11
12
|
---
|
|
12
13
|
|
|
@@ -35,7 +36,22 @@ One sentence: what to build and why.
|
|
|
35
36
|
```
|
|
36
37
|
|
|
37
38
|
Rules:
|
|
38
|
-
-
|
|
39
|
+
- New tickets always name their PRD with `prd: .prd/prd-vN.md`. The file must
|
|
40
|
+
have matching version metadata and status `ticketed` or `built` before work
|
|
41
|
+
starts. This status is a workflow precondition, not proof of user approval.
|
|
42
|
+
Legacy tickets with one PRD are associated on start; with multiple PRDs, use
|
|
43
|
+
`scripts/pincer-ticket.sh bind T-NN .prd/prd-vN.md` to resolve explicitly.
|
|
44
|
+
- Supported syntax is deliberately limited: closed `---` frontmatter with unique,
|
|
45
|
+
unindented `key: value` fields; required `ticket`, `status`, `size`, and
|
|
46
|
+
`depends_on`. IDs use `T-01` through `T-999999` and match the filename; dependencies
|
|
47
|
+
use an inline list such as `[T-01, T-02]`, without duplicates or self references.
|
|
48
|
+
- Use exactly one `## Acceptance Criteria` section with nonempty checkboxes.
|
|
49
|
+
Indentation and `-`, `+`, `*`, or numbered list markers are supported, with
|
|
50
|
+
`[ ]`, `[x]`, or `[X]`. Every unchecked criterion blocks completion.
|
|
51
|
+
- Use exactly one `## Verification` section containing one closed fenced `bash`
|
|
52
|
+
block with runnable commands. Missing sections, malformed metadata, duplicate
|
|
53
|
+
ticket IDs, unsupported checkbox syntax, and invalid Bash fail before a transition.
|
|
54
|
+
- `status` and the attempt/stamp fields `started`, `last_check`, `verified`, `finished` are written only by
|
|
39
55
|
`scripts/pincer-ticket.sh` (`start` / `verify` / `done`). `verify` runs the
|
|
40
56
|
Verification block verbatim and writes a receipt only on exit 0; `done`
|
|
41
57
|
requires that receipt to match the current block. Never write these by hand.
|
|
@@ -45,5 +61,7 @@ Rules:
|
|
|
45
61
|
- If the ticket's surface accepts external input (HTTP, form, file, LLM output),
|
|
46
62
|
Requirements must state the validation and the rejection behavior, and
|
|
47
63
|
Acceptance Criteria must include the reject path as an observable behavior.
|
|
48
|
-
-
|
|
49
|
-
|
|
64
|
+
- Use a walking skeleton for greenfield work when it reduces integration risk. In
|
|
65
|
+
brownfield work, protect the smallest useful vertical change and characterize
|
|
66
|
+
uncovered load-bearing behavior before modifying it.
|
|
67
|
+
- Split a ticket when it contains separate dependencies, owners, or verification paths.
|
|
@@ -15,6 +15,10 @@ $pincer-narrow → $pincer-code → $pincer-evaluate → $pincer-rel
|
|
|
15
15
|
$pincer-status
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
The skills point at the canonical playbooks, the two subagent rubrics and the
|
|
19
|
+
PRD/ticket templates under `.claude/` — those ship on every platform, so the
|
|
20
|
+
directory is expected here even without Claude Code.
|
|
21
|
+
|
|
18
22
|
`/skills` lists what Codex has loaded — the six `pincer-*` entries should be
|
|
19
23
|
there whenever you start `codex` inside this repo. The skills are generated
|
|
20
24
|
from `.claude/commands/` by `scripts/sync-prompts.sh` (cross-references are
|
|
@@ -24,8 +28,8 @@ commit the result.
|
|
|
24
28
|
|
|
25
29
|
## Recommended posture (`~/.codex/config.toml`)
|
|
26
30
|
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
This kit does not currently install a Codex hook adapter. Use Codex's sandbox,
|
|
32
|
+
approval policy, and project instructions as the guardrail posture:
|
|
29
33
|
|
|
30
34
|
```toml
|
|
31
35
|
approval_policy = "on-request" # agent asks before escalating
|
|
@@ -34,8 +38,8 @@ sandbox_mode = "workspace-write" # writes confined to the repo; no network by
|
|
|
34
38
|
|
|
35
39
|
The ticket scripts are plain bash and work here unchanged:
|
|
36
40
|
`scripts/pincer-ticket.sh start|verify|done T-NN` and `scripts/pincer-status.sh`.
|
|
37
|
-
|
|
38
|
-
|
|
41
|
+
Without a Pincer Codex hook adapter, the rule in `AGENTS.md` carries the weight
|
|
42
|
+
of stopping hand-edited ticket state; `$pincer-status` warns about any ticket
|
|
39
43
|
marked done without a receipt.
|
|
40
44
|
|
|
41
45
|
Never run with approvals disabled. The destructive-command rule in `AGENTS.md`
|
|
@@ -7,8 +7,9 @@ description: "Implement tickets sequentially with verification and one commit pe
|
|
|
7
7
|
|
|
8
8
|
# /pincer-code — Ticket Implementation
|
|
9
9
|
|
|
10
|
-
You are implementing the tickets in `tickets/` sequentially.
|
|
11
|
-
|
|
10
|
+
You are implementing the tickets in `tickets/` sequentially. The approved PRD, ticket
|
|
11
|
+
breakdown, and existing session authorization define the work; run continuously and report
|
|
12
|
+
progress between tickets unless a material scope or design decision appears.
|
|
12
13
|
|
|
13
14
|
**Initial request:** ${input:request:Task brief or arguments (optional)}
|
|
14
15
|
|
|
@@ -16,21 +17,22 @@ Ticket state lives in the ticket file's frontmatter and is written **only** by
|
|
|
16
17
|
`scripts/pincer-ticket.sh` (`start` → `verify` → `done`). `verify` runs the ticket's
|
|
17
18
|
Verification block and stamps a receipt only on a green exit; `done` refuses without a
|
|
18
19
|
receipt that matches the current check, or with unticked acceptance criteria. Never edit
|
|
19
|
-
`status`, `started`, `verified`, or `finished` by hand — on Claude Code a hook blocks it.
|
|
20
|
+
`status`, `started`, `last_check`, `verified`, or `finished` by hand — on Claude Code a hook blocks it.
|
|
20
21
|
|
|
21
22
|
## Before the loop
|
|
22
23
|
|
|
23
24
|
Run `scripts/pincer-status.sh`. It lists every ticket's state, what is blocked, elapsed
|
|
24
25
|
build time from the clock, and the next action. If a ticket is `in_progress`, you are
|
|
25
26
|
resuming: read it, check `git status` / `git diff` for uncommitted work, and continue
|
|
26
|
-
from wherever the receipt says you are.
|
|
27
|
+
from wherever the receipt says you are. Do not ask the user to reconfirm unchanged,
|
|
28
|
+
previously authorized work.
|
|
27
29
|
|
|
28
30
|
## Loop (per ticket, in dependency order)
|
|
29
31
|
|
|
30
32
|
1. **Start:** `scripts/pincer-ticket.sh start T-{NN}` — refuses while a `depends_on` ticket
|
|
31
33
|
isn't done, and stamps the start time. Read the ticket and the files it references.
|
|
32
34
|
Announce: "Starting T-{NN}: {title}."
|
|
33
|
-
2. **Implement.** Follow the conventions in `
|
|
35
|
+
2. **Implement.** Follow the conventions in `AGENTS.md` and the PRD's architecture and
|
|
34
36
|
visual direction. Installing a dependency not named in the PRD's architecture is a
|
|
35
37
|
stop-and-ask: verify it's the real package on the registry (linked repo, downloads —
|
|
36
38
|
hallucinated names get typosquatted), say why it earns its place, and wait for a yes.
|
|
@@ -43,26 +45,27 @@ from wherever the receipt says you are. Confirm the starting point with the user
|
|
|
43
45
|
4. **Self-review the diff** before committing: silent failures (empty catches,
|
|
44
46
|
un-awaited promises), leftover debug code, drift from the ticket's acceptance criteria.
|
|
45
47
|
Then a security sweep of the same diff:
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
`.env.example` as a blocker.
|
|
48
|
+
- Check for secret-like assignments without printing values. If a scanner reports a
|
|
49
|
+
possible secret, report only its file and line until the value is safely redacted;
|
|
50
|
+
environment references and names in `.env.example` are allowed.
|
|
50
51
|
- External input touched by this diff is validated server-side, and untrusted
|
|
51
52
|
content (user input, LLM output) is escaped where rendered — per the
|
|
52
|
-
Security defaults in `
|
|
53
|
+
Security defaults in `AGENTS.md`.
|
|
53
54
|
- No error path leaks internals (stack traces, key names with values) to the client.
|
|
54
55
|
If the review changed code, run `verify` again — the receipt must match the code you commit.
|
|
55
56
|
5. **Close the ticket:** tick every verified acceptance-criteria checkbox (`- [ ]` → `- [x]`;
|
|
56
57
|
editing the checkboxes is allowed), then `scripts/pincer-ticket.sh done T-{NN}`. A
|
|
57
58
|
criterion that was cut is a scope change to record in the PRD, not a box to skip.
|
|
58
|
-
|
|
59
|
+
Inspect `git status --short`, preserve pre-existing staged work, and stage only the
|
|
60
|
+
explicit paths changed for this ticket plus its ticket file. Review `git diff --cached`
|
|
61
|
+
before committing as `T-{NN}: {title}`.
|
|
59
62
|
6. Give a one-line progress update using the elapsed figure from
|
|
60
|
-
`scripts/pincer-status.sh` ("T-02 done, 3 remaining, 38m elapsed
|
|
63
|
+
`scripts/pincer-status.sh` ("T-02 done, 3 remaining, 38m elapsed") and continue.
|
|
61
64
|
|
|
62
|
-
##
|
|
65
|
+
## Budget rules
|
|
63
66
|
|
|
64
|
-
-
|
|
65
|
-
|
|
67
|
+
- If the user set `PINCER_BUILD_BUDGET_MIN` or stated another budget, use the elapsed
|
|
68
|
+
figure from `scripts/pincer-status.sh` rather than estimating. If the remaining tickets won't fit,
|
|
66
69
|
stop and propose a scope cut: which remaining tickets to drop or shrink. Cutting scope
|
|
67
70
|
deliberately beats an unfinished mess — record the cut in the PRD's Out of Scope.
|
|
68
71
|
- If a ticket reveals the plan was wrong, stop and say so rather than silently diverging.
|
|
@@ -12,10 +12,15 @@ run the pipeline, then present results.
|
|
|
12
12
|
|
|
13
13
|
## Steps
|
|
14
14
|
|
|
15
|
-
1. Run `scripts/pincer-status.sh`.
|
|
15
|
+
1. Run `scripts/pincer-status.sh`. Review only tickets associated with the selected
|
|
16
|
+
PRD. Every such ticket should be `done` with a current receipt; if one
|
|
16
17
|
is still open or in progress, stop and ask whether it was cut (then it goes in the
|
|
17
18
|
PRD's Out of Scope) or should be finished first via `/pincer-code`. Then get the full
|
|
18
|
-
diff of the
|
|
19
|
+
diff of the change: identify the actual base commit before this change from
|
|
20
|
+
its ticket commits and recorded context. If it cannot be established, resolve
|
|
21
|
+
that uncertainty before claiming a complete review. Record full commit IDs for
|
|
22
|
+
`base` and `candidate` (`git rev-parse HEAD`), then review `git diff <base>..<candidate>`.
|
|
23
|
+
Require a clean candidate before review, excluding only the notes being written.
|
|
19
24
|
2. Dispatch a `code-quality-reviewer` agent with: the diff, the PRD's Success Criteria and
|
|
20
25
|
Scope sections, and the list of tickets. If the diff is large, split by area and
|
|
21
26
|
dispatch two in parallel. (No subagents on this platform? Review the diff yourself
|
|
@@ -25,10 +30,11 @@ run the pipeline, then present results.
|
|
|
25
30
|
4. If the project has a UI, look at it — don't only read the code. Start it, open it in
|
|
26
31
|
the browser (screenshot via Chrome DevTools MCP if available), and check it against
|
|
27
32
|
the PRD's Visual Direction and Success Criteria. Note anything visibly broken or off.
|
|
28
|
-
5. Run a mechanical security audit
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
a secret committed then deleted is
|
|
33
|
+
5. Run a mechanical security audit:
|
|
34
|
+
- Inspect the relevant history with a secret scanner that redacts values, when one is
|
|
35
|
+
available. Otherwise review likely locations without copying candidate values into
|
|
36
|
+
output. Report file, line, and remediation only; a secret committed then deleted is
|
|
37
|
+
still leaked.
|
|
32
38
|
- `.gitignore` covers `.env*` (except `.env.example`), and `git ls-files | grep -i env`
|
|
33
39
|
shows only `.env.example`.
|
|
34
40
|
- `npm audit --omit=dev` (or the ecosystem's equivalent) — report high/critical only.
|
|
@@ -39,9 +45,22 @@ run the pipeline, then present results.
|
|
|
39
45
|
7. Present findings as a short list with `file:line` references, ordered by severity.
|
|
40
46
|
Security findings always rank above style-adjacent ones. For each, say whether you
|
|
41
47
|
recommend fixing now (within the timebox) or noting as known-issue.
|
|
42
|
-
8. Fix
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
8. Fix findings clearly within the authorized PRD through a new ticket associated with
|
|
49
|
+
that PRD. Use `pincer-ticket.sh` to start, verify, and close it, then make a scoped
|
|
50
|
+
`T-{NN}: {title}` commit. Ask only when a fix changes scope, architecture, or another
|
|
51
|
+
material decision; never make an ad-hoc `review: fixes` commit.
|
|
52
|
+
9. Close out: write a brief `NOTES.md` at the repo root with frontmatter:
|
|
53
|
+
```yaml
|
|
54
|
+
---
|
|
55
|
+
prd: .prd/prd-vN.md
|
|
56
|
+
base: <full reviewed base commit ID>
|
|
57
|
+
candidate: <full reviewed candidate commit ID>
|
|
58
|
+
---
|
|
59
|
+
```
|
|
60
|
+
Record the candidate before the separate NOTES commit. Status accepts a later
|
|
61
|
+
commit only when its diff from the candidate changes solely `NOTES.md`; changes
|
|
62
|
+
to source, tickets, or PRD require reevaluation. Legacy notes without these
|
|
63
|
+
references do not establish readiness. Then describe what was built, what was cut
|
|
45
64
|
and why, known issues, and what you'd do next with more time. Then a **Handover**
|
|
46
65
|
section, written for the stranger who inherits this repo in six months: how to get
|
|
47
66
|
oriented (which file to read first), what each dependency is for and why it earned
|
|
@@ -7,22 +7,26 @@ description: "Turn the approved PRD into local, AI-ready ticket files"
|
|
|
7
7
|
|
|
8
8
|
# /pincer-narrow — PRD to Local Tickets
|
|
9
9
|
|
|
10
|
-
You are decomposing the PRD into
|
|
11
|
-
markdown files (no external tracker needed).
|
|
12
|
-
|
|
10
|
+
You are decomposing the PRD into coherent, independently verifiable tickets stored as
|
|
11
|
+
local markdown files (no external tracker needed). Ticket count and size follow the
|
|
12
|
+
change's dependencies and risk, plus any budget the user supplied.
|
|
13
13
|
|
|
14
14
|
**Initial request:** ${input:request:Task brief or arguments (optional)}
|
|
15
15
|
|
|
16
16
|
## Steps
|
|
17
17
|
|
|
18
|
-
1. Run `scripts/pincer-status.sh`. If tickets already exist
|
|
19
|
-
|
|
18
|
+
1. Run `scripts/pincer-status.sh`. If tickets already exist for another PRD, leave them
|
|
19
|
+
as history. New tickets continue the numbering and existing ones are never renumbered.
|
|
20
|
+
If tickets already exist for this PRD, extend them only when the current request already
|
|
21
|
+
authorizes that work; otherwise present the concrete addition before asking. Then read the
|
|
20
22
|
PRD (`${input:request:Task brief or arguments (optional)}` or the latest `.prd/prd-v*.md`). If its status isn't `draft`, ask
|
|
21
23
|
which PRD to use.
|
|
22
24
|
2. Decompose into tickets. Rules:
|
|
23
|
-
- Each ticket is one coherent unit
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
- Each ticket is one coherent unit. Use S, M, or L as relative scope indicators and
|
|
26
|
+
split work when that improves dependency order, verification, or ownership.
|
|
27
|
+
- For greenfield work, use a walking skeleton when it reduces integration risk. For
|
|
28
|
+
brownfield work, begin with the smallest protected vertical change; add a
|
|
29
|
+
characterization ticket before changing load-bearing code that lacks coverage.
|
|
26
30
|
- Order by dependency; note blockers explicitly ("depends on T-01").
|
|
27
31
|
- Every ticket gets a runnable command in its Verification block — a fenced `bash`
|
|
28
32
|
block that exits 0 only when the ticket is done. `scripts/pincer-ticket.sh verify`
|
|
@@ -34,20 +38,22 @@ build window.
|
|
|
34
38
|
LLM output) gets an acceptance criterion for the reject path — what invalid
|
|
35
39
|
input produces (e.g. "empty goal → 400 with a clear message"), not only the
|
|
36
40
|
happy path.
|
|
37
|
-
-
|
|
38
|
-
`.env.example`) and an `.env.example` naming any required secrets
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
is preceded by a characterization ticket — a test that pins the current
|
|
42
|
-
behavior before any ticket is allowed to change it.
|
|
41
|
+
- A greenfield setup ticket includes `.gitignore` covering `.env*` (except
|
|
42
|
+
`.env.example`) and an `.env.example` naming any required secrets before any
|
|
43
|
+
secret can exist in the repo. In brownfield repositories, preserve and verify
|
|
44
|
+
the existing ignore and environment conventions.
|
|
43
45
|
3. Write each ticket to `tickets/T-{NN}-{slug}.md` using
|
|
44
|
-
`.claude/references/ticket-template.md`, with `status: open
|
|
45
|
-
|
|
46
|
+
`.claude/references/ticket-template.md`, with `status: open` and an explicit
|
|
47
|
+
`prd: .prd/prd-vN.md` naming the selected PRD. Never infer this association from
|
|
48
|
+
numbering or old notes. The other state fields
|
|
49
|
+
(`started`, `last_check`, `verified`, `finished`) are added later by `scripts/pincer-ticket.sh` —
|
|
46
50
|
never write them yourself.
|
|
47
51
|
4. Present the ticket list (number, title, size, dependencies) as a table.
|
|
48
52
|
|
|
49
|
-
|
|
53
|
+
Present the concrete breakdown and build order. Reuse existing authorization for the same
|
|
54
|
+
scope and order; ask only when the breakdown introduces a material decision or scope change.
|
|
50
55
|
|
|
51
|
-
5.
|
|
52
|
-
|
|
56
|
+
5. Once authorized, update the selected PRD frontmatter to `status: ticketed`. Inspect
|
|
57
|
+
existing staged changes, stage that PRD and the explicit new ticket paths, review
|
|
58
|
+
`git diff --cached`, and commit only those paths. Finish with:
|
|
53
59
|
"Tickets ready in `tickets/`. Run `/pincer-code` to start implementing."
|
|
@@ -7,17 +7,19 @@ 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
|
|
11
|
-
|
|
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
14
|
**Initial request:** ${input:request:Task brief or arguments (optional)}
|
|
15
15
|
|
|
16
|
-
First run `scripts/pincer-status.sh`. If a PRD already exists,
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
First run `scripts/pincer-status.sh`. If a PRD already exists, preserve it and select
|
|
17
|
+
the next unused numeric version for this change. Use the brief and repository state to
|
|
18
|
+
distinguish a revision from a new change; ask only if that distinction changes scope or
|
|
19
|
+
architecture. If tickets for the current PRD are in progress, resume `/pincer-code`
|
|
20
|
+
unless the user explicitly authorized a separate change.
|
|
19
21
|
|
|
20
|
-
## Phase 1: Discovery
|
|
22
|
+
## Phase 1: Discovery
|
|
21
23
|
|
|
22
24
|
1. If `${input:request:Task brief or arguments (optional)}` contains the brief, extract what you can before asking anything.
|
|
23
25
|
Never ask a question the brief already answers.
|
|
@@ -29,9 +31,10 @@ or a fresh start; if tickets are in progress, stop and point at `/pincer-code` i
|
|
|
29
31
|
3. If the project has a frontend, ask one design question: "What should this feel like,
|
|
30
32
|
and what should it NOT look like?" Capture the answer for the Visual Direction section.
|
|
31
33
|
|
|
32
|
-
Summarize your understanding in 3–5 sentences
|
|
34
|
+
Summarize your understanding in 3–5 sentences. Existing authorization in the request or
|
|
35
|
+
session carries forward; ask only about an unresolved choice that materially changes the result.
|
|
33
36
|
|
|
34
|
-
## Phase 2: Codebase scan (conditional
|
|
37
|
+
## Phase 2: Codebase scan (conditional)
|
|
35
38
|
|
|
36
39
|
If the repo already contains source code, launch 1–2 `codebase-explorer` agents in parallel
|
|
37
40
|
(one for architecture/structure, one for patterns relevant to the feature). Read the 2–3 most
|
|
@@ -46,7 +49,7 @@ touches are load-bearing, what test coverage protects them (run the suite, don't
|
|
|
46
49
|
and the blast radius + rollback story for the change. Record these in the PRD's
|
|
47
50
|
Architecture section. Greenfield speed assumptions do not transfer to brownfield work.
|
|
48
51
|
|
|
49
|
-
## Phase 3: Architecture
|
|
52
|
+
## Phase 3: Architecture
|
|
50
53
|
|
|
51
54
|
Propose the architecture: components, data flow, integration points, and key decisions.
|
|
52
55
|
- Recommend one approach; mention an alternative only when the trade-off is real.
|
|
@@ -59,23 +62,28 @@ Propose the architecture: components, data flow, integration points, and key dec
|
|
|
59
62
|
- Verify the contract of any external API the plan builds on (one live request or the
|
|
60
63
|
current official docs) before designing around it — endpoint shapes remembered from
|
|
61
64
|
training data are guesses.
|
|
62
|
-
-
|
|
65
|
+
- Respect any explicit delivery budget. Record deliberate cuts in Out of Scope.
|
|
63
66
|
|
|
64
|
-
|
|
67
|
+
Prepare the full draft before seeking any approval still required. The user should review a
|
|
68
|
+
concrete scope and architecture; do not repeat an approval already given for the same decision.
|
|
65
69
|
|
|
66
|
-
## Phase 4: Write the PRD
|
|
70
|
+
## Phase 4: Write the PRD
|
|
67
71
|
|
|
68
72
|
1. Load `.claude/references/prd-template.md` and write all core sections.
|
|
69
|
-
2. Include optional sections
|
|
70
|
-
3. Save to `.prd/prd-
|
|
73
|
+
2. Include optional sections when risk or the product context warrants them.
|
|
74
|
+
3. Save to the next unused `.prd/prd-v{N}.md` (create `.prd/` if needed), with `N`
|
|
75
|
+
matching the filename and frontmatter:
|
|
71
76
|
```yaml
|
|
72
77
|
---
|
|
73
|
-
version:
|
|
78
|
+
version: {N}
|
|
74
79
|
status: draft
|
|
75
80
|
date: {today}
|
|
76
81
|
---
|
|
77
82
|
```
|
|
78
|
-
4. If `.git/` doesn't exist, run `git init
|
|
79
|
-
|
|
83
|
+
4. If `.git/` doesn't exist, run `git init`. Commit the PRD and only the intended setup
|
|
84
|
+
paths after inspecting existing staged work; planning should be visible in history
|
|
85
|
+
without absorbing unrelated brownfield changes.
|
|
80
86
|
|
|
81
|
-
|
|
87
|
+
Present the saved draft and obtain approval only when the same scope/architecture was not
|
|
88
|
+
already authorized. Finish with: "PRD saved to `.prd/prd-v{N}.md`. Run `/pincer-narrow`
|
|
89
|
+
to break it into work items."
|
|
@@ -7,24 +7,29 @@ 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/
|
|
10
|
+
You are auditing the current repo state against `docs/release-checklist.md`. Read-only:
|
|
11
11
|
report pass/fail, never fix anything — fixes belong to the stage commands.
|
|
12
12
|
|
|
13
13
|
**Requested stage:** ${input:request:Task brief or arguments (optional)}
|
|
14
14
|
|
|
15
15
|
## Steps
|
|
16
16
|
|
|
17
|
-
1. Read `docs/
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
1. Read `docs/release-checklist.md` — it is the source of truth for product-candidate
|
|
18
|
+
readiness. `docs/dry-run-checklist.md` is a separate manual platform trial and must
|
|
19
|
+
not impose toy-project or Pincer-kit assumptions on this audit.
|
|
20
|
+
2. Run `scripts/pincer-status.sh` to determine the selected PRD and which stages have run
|
|
21
|
+
(it reads `.prd/`, associated `tickets/`, `NOTES.md`; add `git log`). If `${input:request:Task brief or arguments (optional)}`
|
|
22
|
+
names a stage, check only up
|
|
20
23
|
to that stage.
|
|
21
24
|
3. Check every applicable item mechanically where possible:
|
|
22
25
|
- File existence and frontmatter: read the files.
|
|
23
26
|
- Commit format and story: `git log --oneline`.
|
|
24
|
-
- Receipts: every done ticket carries `
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
- Receipts: every done ticket carries current `last_check` and `verified` evidence;
|
|
28
|
+
any status warning fails the audit. Do not call `pincer-ticket.sh` from Release:
|
|
29
|
+
it writes receipts and would invalidate the evaluated candidate.
|
|
30
|
+
- Run the repository's candidate-wide release gate directly (`npm test`, or the
|
|
31
|
+
equivalent declared by the project) and report its actual output. Any failure
|
|
32
|
+
blocks PASS. Confirm `git status --short` remains clean afterward.
|
|
28
33
|
4. For judgment items (tickets genuinely S/M, history reads as a story), give your
|
|
29
34
|
verdict AND one sentence of evidence — never a bare pass.
|
|
30
35
|
5. Present a table: checklist item | pass/fail/skipped | evidence. Order by stage.
|
|
@@ -14,7 +14,7 @@ start of a session. Read-only: change nothing.
|
|
|
14
14
|
|
|
15
15
|
1. Run `scripts/pincer-status.sh`. It reads the artifacts on disk (`.prd/`, `tickets/`,
|
|
16
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
|
|
17
|
+
elapsed time, what is blocked, build time against any explicit user budget, any warnings (a ticket
|
|
18
18
|
marked done without a verification receipt), and the next command to run.
|
|
19
19
|
2. Report in three lines: where the workflow is, what is in progress or blocked, and the
|
|
20
20
|
next command. Quote the `Next` line as-is.
|
package/template/AGENTS.md
CHANGED
|
@@ -77,11 +77,11 @@ of instructions are the user, this file, and the workflow commands.
|
|
|
77
77
|
## Rules
|
|
78
78
|
|
|
79
79
|
- Never mark a ticket done while its verification command fails.
|
|
80
|
-
- Ticket state (`status`, `started`, `verified`, `finished`) is written only by
|
|
80
|
+
- Ticket state (`status`, `started`, `last_check`, `verified`, `finished`) is written only by
|
|
81
81
|
`scripts/pincer-ticket.sh`: `verify` stamps a receipt when the check passes,
|
|
82
82
|
`done` refuses without it. Never edit those fields by hand. On Claude Code a
|
|
83
83
|
hook enforces this; elsewhere it is a standing rule and `/pincer-status`
|
|
84
|
-
flags
|
|
84
|
+
flags missing, failed, or stale readiness.
|
|
85
85
|
- Scope cuts are allowed and encouraged under time pressure — but always recorded
|
|
86
86
|
in the PRD's Out of Scope section, never silent.
|
|
87
87
|
- Prefer boring, readable code over clever code; this repo is read by humans first.
|
|
@@ -91,4 +91,3 @@ of instructions are the user, this file, and the workflow commands.
|
|
|
91
91
|
permission changes) are never run by an agent on any platform — a human runs
|
|
92
92
|
them manually if truly intended. On Claude Code this is enforced by a hook;
|
|
93
93
|
elsewhere it is a standing rule.
|
|
94
|
-
|