create-claude-cabinet 0.25.2 → 0.25.3

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/lib/cli.js CHANGED
@@ -875,6 +875,7 @@ async function run() {
875
875
  const alwaysCopyPhases = [
876
876
  'skills/onboard', 'skills/seed',
877
877
  'skills/cc-upgrade', 'skills/cc-extract',
878
+ 'skills/verify',
878
879
  ];
879
880
  const isSkill = tmpl.startsWith('skills/') && !alwaysCopyPhases.some(p => tmpl.startsWith(p));
880
881
  const results = await copyTemplates(srcPath, destPath, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-claude-cabinet",
3
- "version": "0.25.2",
3
+ "version": "0.25.3",
4
4
  "description": "Claude Cabinet — opinionated process scaffolding for Claude Code projects",
5
5
  "bin": {
6
6
  "create-claude-cabinet": "bin/create-claude-cabinet.js"
@@ -74,8 +74,9 @@ For each remaining match, emit one Attention Items entry:
74
74
 
75
75
  > **`<fid>`** — `<action text>`
76
76
  > Pending plan touches UI but lacks a `## Verify Plan` section.
77
- > Suggest: `/plan <fid>` to backfill the section, or accept drift —
78
- > `/debrief` will flag this act on completion if it ships uncovered.
77
+ > Suggest: `/verify backfill <fid>` to draft the section interactively,
78
+ > or accept drift — `/debrief` will flag this act on completion if
79
+ > it ships uncovered.
79
80
 
80
81
  The entries go in the briefing's **Attention Items** section,
81
82
  alongside any items surfaced by deferred-check, health-checks, etc.
@@ -4,9 +4,10 @@ description: |
4
4
  Walkthrough verification harness. Cucumber + Playwright scenarios with
5
5
  human-in-the-loop verdict pauses (P/I/S/N) for subjective checks.
6
6
  Subcommands: bare (run the suite), 'learn' (bootstrap from cold start),
7
- 'update <change>' (sync feature files to a code change). Use when:
8
- "verify", "/verify", "/verify learn", "/verify update", "run walkthrough",
9
- "verify scenarios", after a multi-PR umbrella ships.
7
+ 'update <change>' (sync feature files to a code change), 'backfill <fid>'
8
+ (add a Verify Plan section to a pending action's notes). Use when:
9
+ "verify", "/verify", "/verify learn", "/verify update", "/verify backfill",
10
+ "run walkthrough", "verify scenarios", after a multi-PR umbrella ships.
10
11
  related:
11
12
  - type: file
12
13
  path: .claude/skills/verify/phases/discover.md
@@ -26,10 +27,13 @@ related:
26
27
  - type: file
27
28
  path: .claude/skills/verify/phases/scenario-template.md
28
29
  role: "Gherkin scenario template (cost+role tags, NN.NN checkIds)"
30
+ - type: file
31
+ path: .claude/skills/verify/phases/backfill.md
32
+ role: "How to draft a ## Verify Plan section for a pending action"
29
33
  - type: file
30
34
  path: cabinet/_briefing.md
31
35
  role: "Project identity and configuration"
32
- argument-hint: "subcommand — 'learn', 'update <change>', or empty to run"
36
+ argument-hint: "subcommand — 'learn', 'update <change>', 'backfill <fid>', or empty to run"
33
37
  user-invocable: true
34
38
  standing-mandate: []
35
39
  ---
@@ -47,6 +51,13 @@ If `$ARGUMENTS` is provided:
47
51
  extending an existing scenario set.
48
52
  - **'update <change-description>'**: Sync feature files to a code change.
49
53
  The change can be a pib-db action fid, a diff snippet, or free-text.
54
+ - **'backfill <fid>'**: Add a `## Verify Plan` section to a pending action's
55
+ notes. For actions that were planned before the verify module existed,
56
+ or planned without Verify Plan questions surfaced. Reads the existing
57
+ notes, interviews the user one question at a time about UI surface and
58
+ feature-file edits, drafts the section, and appends via
59
+ `pib_update_action`. Does NOT modify feature files — that's `/execute`'s
60
+ job at action ship time.
50
61
 
51
62
  ## Purpose
52
63
 
@@ -175,6 +186,30 @@ may want a new scenario, not an edit to an existing one).
175
186
  The proposed edits are presented inline. User approves, the skill
176
187
  writes them.
177
188
 
189
+ ### Mode D: `/verify backfill <fid>` — add Verify Plan to pending action
190
+
191
+ Read `phases/backfill.md` for the full flow. Brief overview:
192
+
193
+ 1. **Load the action.** Call `pib_get_action <fid>`. Read the
194
+ action's `text` and `notes` (especially the `## Surface Area`
195
+ section). Confirm the action is pending (`completed = 0`) — if
196
+ already shipped, redirect the user to `/verify update <fid>`.
197
+ 2. **Read existing feature files.** `ls e2e/features/*.feature` so
198
+ the interview can reference real scenarios and checkIds.
199
+ 3. **Interview, one question at a time.** Per CLAUDE.md global
200
+ convention. Walk the user through: which features need edits,
201
+ what verb (ADD/MODIFY/REMOVE/NEW), what anchor or scenario name.
202
+ 4. **Draft the section.** Format matches `verify-plan.md`'s output
203
+ spec (one `- features/<file>.feature:` line per entry).
204
+ 5. **Show the diff.** Display the action's current notes alongside
205
+ the proposed appended section.
206
+ 6. **Confirm + write.** On approval, call `pib_update_action` with
207
+ the augmented notes. Without approval, exit without changes.
208
+
209
+ This mode does NOT modify feature files. That's `/execute`'s job
210
+ once the action runs. Backfill only adds the planning artifact so
211
+ `/execute`'s `verify-emit` phase has something to read.
212
+
178
213
  ## Phase Summary
179
214
 
180
215
  | Phase | Absent = | What it customizes |
@@ -185,6 +220,7 @@ writes them.
185
220
  | `generate.md` | Default: write .feature + step stubs from calibrated draft | Generation rules (collision handling, naming) |
186
221
  | `update.md` | Default: action fid / diff / free-text dispatch | How change descriptions map to edits |
187
222
  | `scenario-template.md` | Default: Gherkin with cost+role tags, NN.NN checkIds | Project-specific scenario shape |
223
+ | `backfill.md` | Default: interview-driven Verify Plan section drafting | Project-specific backfill questions |
188
224
 
189
225
  ## Principles
190
226
 
@@ -0,0 +1,164 @@
1
+ # Backfill — add a Verify Plan section to a pending action
2
+
3
+ Default behavior for `/verify backfill <fid>`. The mode adds a
4
+ `## Verify Plan` section to a pending pib-db action's notes so
5
+ `/execute`'s `verify-emit` phase can read it later. Does NOT touch
6
+ feature files — that's `/execute`'s job at action ship time.
7
+
8
+ ## Inputs
9
+
10
+ - A pib-db action fid (`act:abc12345`). Passed as `$ARGUMENTS` to
11
+ `/verify backfill`. If missing or malformed, ask the user for
12
+ it; don't guess from context.
13
+
14
+ ## Preconditions
15
+
16
+ 1. The action exists. If `pib_get_action <fid>` returns nothing,
17
+ exit with "no action found for <fid>".
18
+ 2. The action is pending (`completed = 0`). If already shipped,
19
+ tell the user: "act:<fid> already shipped on <date>. To sync
20
+ feature files retroactively, use `/verify update <fid>` instead."
21
+ 3. The action's notes don't already have a `## Verify Plan` section.
22
+ If they do, ask: "act:<fid> already has a Verify Plan section.
23
+ Replace it or skip?"
24
+ 4. `e2e/features/` exists. If not, recommend `/verify learn` first.
25
+
26
+ ## Workflow
27
+
28
+ ### 1. Load and summarize
29
+
30
+ Print:
31
+
32
+ ```
33
+ Backfilling Verify Plan for act:abc12345 — <action text>
34
+
35
+ Current Surface Area (from notes):
36
+ - files: webapp/frontend/src/components/Foo.tsx
37
+ - files: webapp/frontend/src/hooks/useFoo.ts
38
+ ```
39
+
40
+ If no Surface Area section is found, say so and proceed to step 2 —
41
+ the user may want to add one inline.
42
+
43
+ ### 2. Show available feature files
44
+
45
+ ```
46
+ e2e/features/:
47
+ 01-desktop-rewrite.feature (@api-small, @as-user)
48
+ 02-browse-history.feature (@free, @as-user)
49
+ 04-admin-spot-check.feature (@free, @as-admin)
50
+ ...
51
+ ```
52
+
53
+ Read the first two lines of each `.feature` file to surface its
54
+ tags. Skip features tagged `@manual` from suggestions unless the
55
+ action explicitly mentions iOS/mobile.
56
+
57
+ ### 3. Interview, one question at a time
58
+
59
+ Per CLAUDE.md global convention — never batch. Each answer shapes
60
+ the next question. Typical sequence:
61
+
62
+ **Q1 — surface area mapping.**
63
+
64
+ > "act:abc12345 touches webapp/frontend/src/components/Foo.tsx.
65
+ > Which feature file(s) exercise that component or the route it
66
+ > renders on?"
67
+
68
+ Wait for answer. If unclear, propose candidates based on:
69
+ - The action's notes mentioning a route (`/admin`, `/history`)
70
+ - The scenario names in `e2e/features/`
71
+ - Cabinet-qa subagent if multiple plausible matches
72
+
73
+ **Q2 — edit verb.**
74
+
75
+ For each chosen feature file, ask:
76
+
77
+ > "For features/04-admin-spot-check.feature, what kind of edit?
78
+ > - ADD step after an existing anchor
79
+ > - MODIFY an existing step's assertion
80
+ > - NEW scenario in a new file
81
+ > - REMOVE a step (for deprecations)"
82
+
83
+ Wait for answer.
84
+
85
+ **Q3 — specifics.**
86
+
87
+ Depending on the verb, follow up:
88
+ - **ADD step after <anchor>**: "What's the anchor checkId, and what
89
+ should the new step assert?"
90
+ - **MODIFY step <checkId>**: "Which step? What should the new
91
+ assertion text say?"
92
+ - **NEW scenario**: "Scenario name? Tags (cost + role)? Brief
93
+ description of the journey?"
94
+ - **REMOVE step <checkId>**: "Which checkId? Confirm — removed
95
+ steps invalidate prior verdicts."
96
+
97
+ Wait for answer.
98
+
99
+ **Repeat Q1–Q3** for each additional feature file the action
100
+ touches. After the user signals "that's all," proceed.
101
+
102
+ ### 4. Draft the section
103
+
104
+ Format matches `verify-plan.md`'s output spec exactly so
105
+ `verify-emit` parses it identically to plan-time output:
106
+
107
+ ```markdown
108
+ ## Verify Plan
109
+
110
+ - features/04-admin-spot-check.feature: ADD step after the existing
111
+ "admin-history-list-loads" check — verify the new "balance owed"
112
+ column renders for users with outstanding refunds (4.12b
113
+ admin-balance-owed-column).
114
+ - features/14-downloaded-files.feature: (deferred) NEW scenario for
115
+ the bulk-download flow — requires Phase B framework migration to
116
+ ship first.
117
+ ```
118
+
119
+ Edit verbs: `ADD step after <anchor>`, `MODIFY step <checkId>`,
120
+ `NEW scenario`, `REMOVE step <checkId>`. Use `(deferred)` prefix
121
+ for entries that depend on other work.
122
+
123
+ ### 5. Show the diff
124
+
125
+ Display:
126
+
127
+ ```
128
+ Existing notes:
129
+ ─────────────
130
+ <truncated existing notes — last 20 lines>
131
+
132
+ Proposed appended section:
133
+ ──────────────────────────
134
+ ## Verify Plan
135
+
136
+ <the drafted section from step 4>
137
+ ```
138
+
139
+ ### 6. Confirm and write
140
+
141
+ > "Append this Verify Plan section to act:abc12345's notes? (y/n)"
142
+
143
+ If yes:
144
+ - Call `pib_update_action <fid> --notes "<existing_notes>\n\n<new_section>"`
145
+ - Confirm: "Updated act:abc12345 with Verify Plan (N entries)."
146
+
147
+ If no:
148
+ - Exit without changes.
149
+
150
+ ## Out of scope
151
+
152
+ - Modifying feature files. That's `/execute`'s `verify-emit` phase
153
+ when the action runs.
154
+ - Re-running the full /plan flow (acceptance criteria, surface area,
155
+ cabinet review). Backfill is narrow — Verify Plan section only.
156
+ - Creating new actions. The action already exists by definition.
157
+
158
+ ## When to escalate to a full /plan
159
+
160
+ If the interview reveals the action is mis-scoped — e.g., the user
161
+ realizes the surface area listed in the notes is wrong — recommend
162
+ re-planning the whole action via `/plan` instead. Backfill is only
163
+ useful when the action's scope and surface area are correct and
164
+ just the Verify Plan layer is missing.