@sienklogic/plan-build-run 2.9.1 → 2.11.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/CHANGELOG.md +44 -0
- package/package.json +1 -1
- package/plugins/copilot-pbr/agents/codebase-mapper.agent.md +42 -0
- package/plugins/copilot-pbr/agents/debugger.agent.md +4 -1
- package/plugins/copilot-pbr/agents/executor.agent.md +31 -1
- package/plugins/copilot-pbr/agents/integration-checker.agent.md +33 -2
- package/plugins/copilot-pbr/agents/planner.agent.md +58 -1
- package/plugins/copilot-pbr/agents/researcher.agent.md +23 -0
- package/plugins/copilot-pbr/agents/synthesizer.agent.md +24 -0
- package/plugins/copilot-pbr/agents/verifier.agent.md +35 -1
- package/plugins/copilot-pbr/plugin.json +1 -1
- package/plugins/copilot-pbr/references/agent-contracts.md +297 -0
- package/plugins/copilot-pbr/references/pbr-rules.md +1 -0
- package/plugins/copilot-pbr/references/pbr-tools-cli.md +285 -0
- package/plugins/copilot-pbr/references/ui-formatting.md +38 -56
- package/plugins/copilot-pbr/skills/begin/SKILL.md +30 -7
- package/plugins/copilot-pbr/skills/build/SKILL.md +28 -31
- package/plugins/copilot-pbr/skills/config/SKILL.md +9 -12
- package/plugins/copilot-pbr/skills/continue/SKILL.md +6 -6
- package/plugins/copilot-pbr/skills/dashboard/SKILL.md +12 -0
- package/plugins/copilot-pbr/skills/debug/SKILL.md +23 -26
- package/plugins/copilot-pbr/skills/discuss/SKILL.md +20 -10
- package/plugins/copilot-pbr/skills/do/SKILL.md +3 -3
- package/plugins/copilot-pbr/skills/explore/SKILL.md +11 -14
- package/plugins/copilot-pbr/skills/health/SKILL.md +75 -19
- package/plugins/copilot-pbr/skills/help/SKILL.md +6 -6
- package/plugins/copilot-pbr/skills/import/SKILL.md +22 -18
- package/plugins/copilot-pbr/skills/milestone/SKILL.md +90 -48
- package/plugins/copilot-pbr/skills/note/SKILL.md +3 -3
- package/plugins/copilot-pbr/skills/pause/SKILL.md +11 -10
- package/plugins/copilot-pbr/skills/plan/SKILL.md +22 -9
- package/plugins/copilot-pbr/skills/plan/templates/planner-prompt.md.tmpl +1 -1
- package/plugins/copilot-pbr/skills/quick/SKILL.md +9 -12
- package/plugins/copilot-pbr/skills/resume/SKILL.md +9 -9
- package/plugins/copilot-pbr/skills/review/SKILL.md +17 -12
- package/plugins/copilot-pbr/skills/scan/SKILL.md +9 -11
- package/plugins/copilot-pbr/skills/setup/SKILL.md +54 -8
- package/plugins/copilot-pbr/skills/shared/error-reporting.md +2 -1
- package/plugins/copilot-pbr/skills/shared/progress-display.md +0 -1
- package/plugins/copilot-pbr/skills/shared/universal-anti-patterns.md +10 -6
- package/plugins/copilot-pbr/skills/status/SKILL.md +3 -3
- package/plugins/copilot-pbr/skills/statusline/SKILL.md +12 -8
- package/plugins/copilot-pbr/skills/todo/SKILL.md +51 -28
- package/plugins/cursor-pbr/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor-pbr/agents/codebase-mapper.md +42 -0
- package/plugins/cursor-pbr/agents/debugger.md +4 -1
- package/plugins/cursor-pbr/agents/executor.md +31 -1
- package/plugins/cursor-pbr/agents/integration-checker.md +33 -2
- package/plugins/cursor-pbr/agents/planner.md +58 -1
- package/plugins/cursor-pbr/agents/researcher.md +23 -0
- package/plugins/cursor-pbr/agents/synthesizer.md +24 -0
- package/plugins/cursor-pbr/agents/verifier.md +35 -1
- package/plugins/cursor-pbr/references/agent-contracts.md +297 -0
- package/plugins/cursor-pbr/references/pbr-rules.md +1 -0
- package/plugins/cursor-pbr/references/pbr-tools-cli.md +285 -0
- package/plugins/cursor-pbr/references/ui-formatting.md +38 -56
- package/plugins/cursor-pbr/skills/begin/SKILL.md +30 -7
- package/plugins/cursor-pbr/skills/build/SKILL.md +28 -31
- package/plugins/cursor-pbr/skills/config/SKILL.md +9 -10
- package/plugins/cursor-pbr/skills/continue/SKILL.md +6 -6
- package/plugins/cursor-pbr/skills/dashboard/SKILL.md +12 -0
- package/plugins/cursor-pbr/skills/debug/SKILL.md +23 -23
- package/plugins/cursor-pbr/skills/discuss/SKILL.md +20 -10
- package/plugins/cursor-pbr/skills/do/SKILL.md +3 -3
- package/plugins/cursor-pbr/skills/explore/SKILL.md +11 -12
- package/plugins/cursor-pbr/skills/health/SKILL.md +75 -19
- package/plugins/cursor-pbr/skills/help/SKILL.md +6 -6
- package/plugins/cursor-pbr/skills/import/SKILL.md +22 -16
- package/plugins/cursor-pbr/skills/milestone/SKILL.md +90 -48
- package/plugins/cursor-pbr/skills/note/SKILL.md +3 -3
- package/plugins/cursor-pbr/skills/pause/SKILL.md +11 -9
- package/plugins/cursor-pbr/skills/plan/SKILL.md +22 -9
- package/plugins/cursor-pbr/skills/plan/templates/planner-prompt.md.tmpl +1 -1
- package/plugins/cursor-pbr/skills/quick/SKILL.md +9 -12
- package/plugins/cursor-pbr/skills/resume/SKILL.md +9 -9
- package/plugins/cursor-pbr/skills/review/SKILL.md +17 -12
- package/plugins/cursor-pbr/skills/scan/SKILL.md +9 -10
- package/plugins/cursor-pbr/skills/setup/SKILL.md +54 -8
- package/plugins/cursor-pbr/skills/shared/error-reporting.md +2 -1
- package/plugins/cursor-pbr/skills/shared/progress-display.md +0 -1
- package/plugins/cursor-pbr/skills/shared/universal-anti-patterns.md +10 -6
- package/plugins/cursor-pbr/skills/status/SKILL.md +3 -3
- package/plugins/cursor-pbr/skills/statusline/SKILL.md +12 -8
- package/plugins/cursor-pbr/skills/todo/SKILL.md +51 -28
- package/plugins/pbr/.claude-plugin/plugin.json +1 -1
- package/plugins/pbr/agents/codebase-mapper.md +42 -0
- package/plugins/pbr/agents/debugger.md +4 -1
- package/plugins/pbr/agents/executor.md +31 -1
- package/plugins/pbr/agents/integration-checker.md +34 -2
- package/plugins/pbr/agents/planner.md +58 -1
- package/plugins/pbr/agents/researcher.md +23 -0
- package/plugins/pbr/agents/synthesizer.md +24 -0
- package/plugins/pbr/agents/verifier.md +36 -1
- package/plugins/pbr/references/agent-contracts.md +297 -0
- package/plugins/pbr/references/pbr-rules.md +1 -0
- package/plugins/pbr/references/pbr-tools-cli.md +285 -0
- package/plugins/pbr/references/ui-formatting.md +37 -54
- package/plugins/pbr/scripts/check-skill-workflow.js +11 -0
- package/plugins/pbr/scripts/check-state-sync.js +58 -0
- package/plugins/pbr/scripts/check-subagent-output.js +43 -4
- package/plugins/pbr/scripts/validate-task.js +69 -17
- package/plugins/pbr/skills/begin/SKILL.md +36 -11
- package/plugins/pbr/skills/build/SKILL.md +37 -25
- package/plugins/pbr/skills/config/SKILL.md +12 -10
- package/plugins/pbr/skills/continue/SKILL.md +11 -9
- package/plugins/pbr/skills/dashboard/SKILL.md +12 -0
- package/plugins/pbr/skills/debug/SKILL.md +29 -23
- package/plugins/pbr/skills/discuss/SKILL.md +20 -10
- package/plugins/pbr/skills/do/SKILL.md +3 -3
- package/plugins/pbr/skills/explore/SKILL.md +14 -12
- package/plugins/pbr/skills/health/SKILL.md +76 -20
- package/plugins/pbr/skills/help/SKILL.md +8 -6
- package/plugins/pbr/skills/import/SKILL.md +25 -16
- package/plugins/pbr/skills/milestone/SKILL.md +88 -45
- package/plugins/pbr/skills/note/SKILL.md +3 -3
- package/plugins/pbr/skills/pause/SKILL.md +13 -9
- package/plugins/pbr/skills/plan/SKILL.md +28 -13
- package/plugins/pbr/skills/plan/templates/planner-prompt.md.tmpl +1 -1
- package/plugins/pbr/skills/quick/SKILL.md +12 -10
- package/plugins/pbr/skills/resume/SKILL.md +11 -9
- package/plugins/pbr/skills/review/SKILL.md +35 -24
- package/plugins/pbr/skills/scan/SKILL.md +12 -10
- package/plugins/pbr/skills/setup/SKILL.md +53 -7
- package/plugins/pbr/skills/shared/error-reporting.md +2 -0
- package/plugins/pbr/skills/shared/universal-anti-patterns.md +10 -6
- package/plugins/pbr/skills/status/SKILL.md +8 -6
- package/plugins/pbr/skills/statusline/SKILL.md +12 -8
- package/plugins/pbr/skills/todo/SKILL.md +51 -28
|
@@ -8,9 +8,9 @@ description: "Systematic debugging with hypothesis testing. Persistent across se
|
|
|
8
8
|
**Before ANY tool calls**, display this banner:
|
|
9
9
|
|
|
10
10
|
```
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
12
|
+
║ PLAN-BUILD-RUN ► DEBUGGING ║
|
|
13
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Then proceed to Step 1.
|
|
@@ -64,9 +64,11 @@ Scan `.planning/debug/` for existing debug files:
|
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
Read each file's frontmatter to check status:
|
|
67
|
-
- `status:
|
|
68
|
-
- `status:
|
|
69
|
-
- `status:
|
|
67
|
+
- `status: gathering` — collecting symptoms from user
|
|
68
|
+
- `status: investigating` — testing hypotheses
|
|
69
|
+
- `status: fixing` — applying fix
|
|
70
|
+
- `status: verifying` — confirming fix works
|
|
71
|
+
- `status: resolved` — session complete
|
|
70
72
|
|
|
71
73
|
**If active sessions found:**
|
|
72
74
|
|
|
@@ -125,7 +127,7 @@ Create `.planning/debug/{NNN}-{slug}.md`:
|
|
|
125
127
|
---
|
|
126
128
|
id: "{NNN}"
|
|
127
129
|
title: "{issue title}"
|
|
128
|
-
status:
|
|
130
|
+
status: gathering
|
|
129
131
|
created: "{ISO date}"
|
|
130
132
|
updated: "{ISO date}"
|
|
131
133
|
severity: "{critical|high|medium|low}"
|
|
@@ -229,18 +231,18 @@ Actions:
|
|
|
229
231
|
3. Report to user with branded output:
|
|
230
232
|
|
|
231
233
|
```
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
234
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
235
|
+
║ PLAN-BUILD-RUN ► BUG RESOLVED ✓ ║
|
|
236
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
235
237
|
|
|
236
238
|
**Session #{NNN}:** {title}
|
|
237
239
|
**Root cause:** {cause}
|
|
238
240
|
**Fix:** {description}
|
|
239
241
|
**Commit:** {hash}
|
|
240
242
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
243
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
244
|
+
║ ▶ NEXT UP ║
|
|
245
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
244
246
|
|
|
245
247
|
**Continue your workflow** — the bug is fixed
|
|
246
248
|
|
|
@@ -248,13 +250,10 @@ Actions:
|
|
|
248
250
|
|
|
249
251
|
<sub>`/clear` first → fresh context window</sub>
|
|
250
252
|
|
|
251
|
-
───────────────────────────────────────────────────────────────
|
|
252
|
-
|
|
253
253
|
**Also available:**
|
|
254
254
|
- `/pbr:continue` — execute next logical step
|
|
255
255
|
- `/pbr:review {N}` — verify the current phase
|
|
256
256
|
|
|
257
|
-
───────────────────────────────────────────────────────────────
|
|
258
257
|
```
|
|
259
258
|
|
|
260
259
|
#### ROOT CAUSE FOUND (no fix)
|
|
@@ -274,9 +273,10 @@ Actions:
|
|
|
274
273
|
2. Suggest next steps to user:
|
|
275
274
|
|
|
276
275
|
```
|
|
277
|
-
───────────────────────────────────────────────────────────────
|
|
278
276
|
|
|
279
|
-
|
|
277
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
278
|
+
║ ▶ NEXT UP ║
|
|
279
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
280
280
|
|
|
281
281
|
**Apply the fix** — root cause identified, fix needed
|
|
282
282
|
|
|
@@ -284,13 +284,10 @@ Actions:
|
|
|
284
284
|
|
|
285
285
|
<sub>`/clear` first → fresh context window</sub>
|
|
286
286
|
|
|
287
|
-
───────────────────────────────────────────────────────────────
|
|
288
|
-
|
|
289
287
|
**Also available:**
|
|
290
288
|
- `/pbr:plan` — for complex fixes that need planning
|
|
291
289
|
- `/pbr:status` — see project status
|
|
292
290
|
|
|
293
|
-
───────────────────────────────────────────────────────────────
|
|
294
291
|
```
|
|
295
292
|
|
|
296
293
|
#### CHECKPOINT
|
|
@@ -400,7 +397,7 @@ Use AskUserQuestion:
|
|
|
400
397
|
- label: "Escalate" description: "Save context for manual debugging"
|
|
401
398
|
|
|
402
399
|
- If "Extend": double the limit and continue
|
|
403
|
-
- If "Wrap up": update debug file status
|
|
400
|
+
- If "Wrap up": update debug file `status: resolved` with `resolution: abandoned`, record all findings, suggest next steps
|
|
404
401
|
- If "Escalate": write a detailed handoff document to the debug file with all hypotheses, evidence, and suggested manual investigation steps
|
|
405
402
|
|
|
406
403
|
---
|
|
@@ -410,15 +407,15 @@ Use AskUserQuestion:
|
|
|
410
407
|
### Lifecycle
|
|
411
408
|
|
|
412
409
|
```
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
410
|
+
gathering → investigating → fixing → verifying → resolved
|
|
411
|
+
(any non-resolved) → resolved (with resolution: abandoned, if 7+ days stale)
|
|
412
|
+
(any non-resolved) → (same) (resumed after pause)
|
|
416
413
|
```
|
|
417
414
|
|
|
418
415
|
### Staleness Detection
|
|
419
416
|
|
|
420
417
|
When scanning for active sessions, check the `updated` date. If more than 7 days old:
|
|
421
|
-
-
|
|
418
|
+
- Set `status: resolved` with `resolution: abandoned` in frontmatter
|
|
422
419
|
- Still offer to resume, but warn: "This session is {N} days old. Context may have changed."
|
|
423
420
|
|
|
424
421
|
### Cleanup
|
|
@@ -8,9 +8,9 @@ description: "Talk through a phase before planning. Identifies gray areas and ca
|
|
|
8
8
|
**Before ANY tool calls**, display this banner:
|
|
9
9
|
|
|
10
10
|
```
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
12
|
+
║ PLAN-BUILD-RUN ► DISCUSSION ║
|
|
13
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Then proceed to Step 1.
|
|
@@ -149,17 +149,23 @@ If more than 3 concrete options exist for a gray area, present only the top 3 pl
|
|
|
149
149
|
|
|
150
150
|
For each gray area where the user made a decision (not "Let Claude decide"), ask **4 follow-up questions** to fully capture their intent.
|
|
151
151
|
|
|
152
|
+
**CRITICAL — STOP: Do NOT skip ANY of the 4 follow-up areas below. All 4 MUST be asked for each gray area where the user made a decision.**
|
|
153
|
+
|
|
152
154
|
**Follow-up question types:**
|
|
153
155
|
|
|
156
|
+
**CRITICAL — STOP: Do NOT skip this follow-up area.**
|
|
154
157
|
1. **Scope boundary**: "Should {feature} also handle {edge case}?"
|
|
155
158
|
Use the **yes-no** pattern — this is a binary decision.
|
|
156
159
|
|
|
160
|
+
**CRITICAL — STOP: Do NOT skip this follow-up area.**
|
|
157
161
|
2. **Quality level**: "How polished should this be?"
|
|
158
162
|
Do NOT use AskUserQuestion — this is freeform. Let the user describe their quality expectations in their own words.
|
|
159
163
|
|
|
164
|
+
**CRITICAL — STOP: Do NOT skip this follow-up area.**
|
|
160
165
|
3. **Integration**: "How should this interact with {existing component}?"
|
|
161
166
|
Do NOT use AskUserQuestion — this is freeform. The answer depends on the specific component and context.
|
|
162
167
|
|
|
168
|
+
**CRITICAL — STOP: Do NOT skip this follow-up area.**
|
|
163
169
|
4. **Future-proofing**: "Should we design this to support {potential future need}, or keep it simple?"
|
|
164
170
|
Use the **yes-no** pattern:
|
|
165
171
|
question: "Design {feature} to support {future need}, or keep it simple for now?"
|
|
@@ -173,6 +179,8 @@ For each gray area where the user made a decision (not "Let Claude decide"), ask
|
|
|
173
179
|
- If the user gives a short answer, capture it as-is
|
|
174
180
|
- If the user says "you decide" on a follow-up, move that specific sub-decision to Claude's Discretion
|
|
175
181
|
|
|
182
|
+
**Completion check:** After all follow-up questions for all gray areas, verify that all 4 follow-up areas produced output for each decided gray area. If any area was missed, go back and ask it before proceeding to Step 6.
|
|
183
|
+
|
|
176
184
|
### Step 6: Capture Deferred Ideas
|
|
177
185
|
|
|
178
186
|
During the conversation, the user may mention ideas they want but not in this phase. Track these separately:
|
|
@@ -217,17 +225,19 @@ This creates a pointer so `/pbr:resume` and `progress-tracker.js` know that phas
|
|
|
217
225
|
After writing CONTEXT.md, display branded output:
|
|
218
226
|
|
|
219
227
|
```
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
228
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
229
|
+
║ PLAN-BUILD-RUN ► DISCUSSION CAPTURED ✓ ║
|
|
230
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
223
231
|
|
|
224
232
|
**Phase {N}: {name}**
|
|
225
233
|
|
|
226
234
|
Decisions: {count} locked, {count} deferred, {count} discretion
|
|
227
235
|
|
|
228
|
-
───────────────────────────────────────────────────────────────
|
|
229
236
|
|
|
230
|
-
|
|
237
|
+
|
|
238
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
239
|
+
║ ▶ NEXT UP ║
|
|
240
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
231
241
|
|
|
232
242
|
**Plan this phase** — your decisions will be honored
|
|
233
243
|
|
|
@@ -235,13 +245,13 @@ Decisions: {count} locked, {count} deferred, {count} discretion
|
|
|
235
245
|
|
|
236
246
|
<sub>`/clear` first → fresh context window</sub>
|
|
237
247
|
|
|
238
|
-
|
|
248
|
+
|
|
239
249
|
|
|
240
250
|
**Also available:**
|
|
241
251
|
- `/pbr:status` — see project status
|
|
242
252
|
- `/pbr:explore` — explore ideas further
|
|
243
253
|
|
|
244
|
-
|
|
254
|
+
|
|
245
255
|
```
|
|
246
256
|
|
|
247
257
|
---
|
|
@@ -12,9 +12,9 @@ You are running the **do** skill. Your job is to analyze freeform text from the
|
|
|
12
12
|
**Before ANY tool calls**, display this banner:
|
|
13
13
|
|
|
14
14
|
```
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
16
|
+
║ PLAN-BUILD-RUN ► ROUTING ║
|
|
17
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
Then proceed to Step 1.
|
|
@@ -8,9 +8,9 @@ description: "Explore ideas, think through approaches, and route insights to the
|
|
|
8
8
|
**Before ANY tool calls**, display this banner:
|
|
9
9
|
|
|
10
10
|
```
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
12
|
+
║ PLAN-BUILD-RUN ► EXPLORING ║
|
|
13
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Then proceed to Step 1.
|
|
@@ -174,7 +174,7 @@ Suggest specific outputs with reasoning. Present no more than 4 suggestions —
|
|
|
174
174
|
| Phase decision | Clarifies an existing phase | Write/append to phase `CONTEXT.md` |
|
|
175
175
|
| Research question | Needs deeper investigation | `.planning/research/questions.md` |
|
|
176
176
|
| New phase | Big enough for its own phase | Append to `ROADMAP.md` |
|
|
177
|
-
| Note | Not actionable yet, worth remembering | `.planning/notes/{slug}.md` |
|
|
177
|
+
| Note | Not actionable yet, worth remembering | `.planning/notes/{YYYY-MM-DD}-{slug}.md` |
|
|
178
178
|
| Quick capture | One-liner idea, no context needed | Suggest `/pbr:note <text>` to the user |
|
|
179
179
|
| Seed | Idea with trigger conditions | `.planning/seeds/SEED-{NNN}-{slug}.md` |
|
|
180
180
|
|
|
@@ -214,15 +214,15 @@ Create only the approved artifacts. A single explore session can produce multipl
|
|
|
214
214
|
After creating artifacts (or if user chose "Skip"), display:
|
|
215
215
|
|
|
216
216
|
```
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
217
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
218
|
+
║ PLAN-BUILD-RUN ► EXPLORATION CAPTURED ✓ ║
|
|
219
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
220
220
|
|
|
221
221
|
{count} artifacts created: {list of artifact types}
|
|
222
222
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
223
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
224
|
+
║ ▶ NEXT UP ║
|
|
225
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
226
226
|
|
|
227
227
|
**{Primary route based on what was created}**
|
|
228
228
|
|
|
@@ -238,14 +238,11 @@ After creating artifacts (or if user chose "Skip"), display:
|
|
|
238
238
|
|
|
239
239
|
<sub>`/clear` first → fresh context window</sub>
|
|
240
240
|
|
|
241
|
-
───────────────────────────────────────────────────────────────
|
|
242
|
-
|
|
243
241
|
**Also available:**
|
|
244
242
|
- `/pbr:status` — see project status
|
|
245
243
|
- `/pbr:continue` — execute next logical step
|
|
246
244
|
- `/pbr:milestone new` — start a new milestone with new phases
|
|
247
245
|
|
|
248
|
-
───────────────────────────────────────────────────────────────
|
|
249
246
|
```
|
|
250
247
|
|
|
251
248
|
---
|
|
@@ -288,7 +285,7 @@ Append to `.planning/ROADMAP.md` following the existing phase format. Assign the
|
|
|
288
285
|
|
|
289
286
|
### Note
|
|
290
287
|
|
|
291
|
-
Write to `.planning/notes/{
|
|
288
|
+
Write to `.planning/notes/{YYYY-MM-DD}-{slug}.md` where the date prefix is today's date in ISO format. Scan `.planning/notes/` to avoid filename collisions — if a file with the same date and slug exists, append `-2` (or increment).
|
|
292
289
|
|
|
293
290
|
```markdown
|
|
294
291
|
---
|
|
@@ -8,9 +8,9 @@ description: "Check planning directory integrity. Find and fix corrupted state."
|
|
|
8
8
|
**Before ANY tool calls**, display this banner:
|
|
9
9
|
|
|
10
10
|
```
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
12
|
+
║ PLAN-BUILD-RUN ► HEALTH CHECK ║
|
|
13
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Then proceed to Step 1.
|
|
@@ -19,7 +19,7 @@ Then proceed to Step 1.
|
|
|
19
19
|
|
|
20
20
|
You are running the **health** skill. Your job is to validate the integrity of the `.planning/` directory, report problems, and suggest targeted fixes. You never auto-repair anything.
|
|
21
21
|
|
|
22
|
-
This skill runs **inline
|
|
22
|
+
This skill runs **inline**. It is read-only by default, but offers an optional **auto-fix** flow for common corruption patterns (see the Auto-Fix section below).
|
|
23
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
@@ -149,6 +149,58 @@ Glob for `.planning/phases/**/.PROGRESS-*` and `.planning/phases/**/.checkpoint-
|
|
|
149
149
|
|
|
150
150
|
---
|
|
151
151
|
|
|
152
|
+
## Auto-Fix for Common Corruption Patterns
|
|
153
|
+
|
|
154
|
+
After running all 10 checks and collecting results, if any of the following auto-fixable issues were found, offer to fix them.
|
|
155
|
+
|
|
156
|
+
### Auto-Fixable Patterns
|
|
157
|
+
|
|
158
|
+
| Pattern | Detection | Fix Action |
|
|
159
|
+
|---------|-----------|------------|
|
|
160
|
+
| Missing STATE.md frontmatter | Check 5 finds STATE.md without `---` block | Regenerate frontmatter from ROADMAP.md phase data (current_phase, total_phases, status) |
|
|
161
|
+
| STATE.md phase_slug mismatch | Check 5/7 finds phase_slug doesn't match current phase directory name | Correct phase_slug to match the actual directory name in `.planning/phases/` |
|
|
162
|
+
| Missing config.json | Check 1/2 finds no `.planning/config.json` | Create with default config template (same as `/pbr:setup` defaults) |
|
|
163
|
+
| Orphaned .active-skill file | Check 10 or general scan finds `.planning/.active-skill` older than 1 hour | Delete the stale `.active-skill` file |
|
|
164
|
+
| Empty phases directory | Check 3 finds `.planning/phases/` missing | Create the directory: `mkdir -p .planning/phases` |
|
|
165
|
+
| STATE.md over 150 lines | Check 5 finds STATE.md exceeds 150 lines | Compact the `## Accumulated Context` section, keeping only the last 3 entries |
|
|
166
|
+
|
|
167
|
+
### Auto-Fix Flow
|
|
168
|
+
|
|
169
|
+
After displaying health check results, if any auto-fixable issues were detected:
|
|
170
|
+
|
|
171
|
+
1. Count the auto-fixable issues and present:
|
|
172
|
+
|
|
173
|
+
Use AskUserQuestion:
|
|
174
|
+
question: "Found {N} auto-fixable issues. How should we handle them?"
|
|
175
|
+
header: "Fix?"
|
|
176
|
+
options:
|
|
177
|
+
- label: "Fix all" description: "Apply all {N} fixes automatically"
|
|
178
|
+
- label: "Review each" description: "Show each fix and confirm individually"
|
|
179
|
+
- label: "Skip" description: "Do nothing — just report"
|
|
180
|
+
|
|
181
|
+
2. If "Fix all": Apply all fixes in order, then display a summary:
|
|
182
|
+
```
|
|
183
|
+
Auto-fix results:
|
|
184
|
+
- Fixed: {description of fix 1}
|
|
185
|
+
- Fixed: {description of fix 2}
|
|
186
|
+
...
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
3. If "Review each": For each fixable issue, display:
|
|
190
|
+
```
|
|
191
|
+
Issue: {description}
|
|
192
|
+
Fix: {what will be done}
|
|
193
|
+
```
|
|
194
|
+
Then ask via AskUserQuestion (yes/no): "Apply this fix?"
|
|
195
|
+
- If yes: apply and display `- Fixed: {description}`
|
|
196
|
+
- If no: skip and display `- Skipped: {description}`
|
|
197
|
+
|
|
198
|
+
4. If "Skip": Do nothing, continue to the rest of the output.
|
|
199
|
+
|
|
200
|
+
**Note:** When auto-fix is active, the health skill is no longer strictly read-only. The `allowed-tools` frontmatter must include `Write` and `AskUserQuestion` for auto-fix to work. Update the frontmatter accordingly.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
152
204
|
## Bonus: Recent Decisions
|
|
153
205
|
|
|
154
206
|
After all checks, look for `.planning/logs/decisions.jsonl`. If it exists, display the last 5 entries as `- {date}: {summary} (phase {N})`. If it does not exist, skip silently.
|
|
@@ -161,15 +213,17 @@ After all checks complete, display the branded result:
|
|
|
161
213
|
|
|
162
214
|
**If all checks passed (0 failures):**
|
|
163
215
|
```
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
216
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
217
|
+
║ PLAN-BUILD-RUN ► HEALTH CHECK PASSED ✓ ║
|
|
218
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
167
219
|
|
|
168
220
|
{N} checks passed, {M} warnings
|
|
169
221
|
|
|
170
|
-
───────────────────────────────────────────────────────────────
|
|
171
222
|
|
|
172
|
-
|
|
223
|
+
|
|
224
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
225
|
+
║ ▶ NEXT UP ║
|
|
226
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
173
227
|
|
|
174
228
|
**Continue your workflow** — planning directory is healthy
|
|
175
229
|
|
|
@@ -177,40 +231,42 @@ After all checks complete, display the branded result:
|
|
|
177
231
|
|
|
178
232
|
<sub>`/clear` first → fresh context window</sub>
|
|
179
233
|
|
|
180
|
-
|
|
234
|
+
|
|
181
235
|
|
|
182
236
|
**Also available:**
|
|
183
237
|
- `/pbr:continue` — execute next logical step
|
|
184
238
|
- `/pbr:config` — adjust settings
|
|
185
239
|
|
|
186
|
-
|
|
240
|
+
|
|
187
241
|
```
|
|
188
242
|
|
|
189
243
|
**If failures found:**
|
|
190
244
|
```
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
245
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
246
|
+
║ PLAN-BUILD-RUN ► HEALTH CHECK FAILED ⚠ ║
|
|
247
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
194
248
|
|
|
195
249
|
{N} checks passed, {F} failures, {M} warnings
|
|
196
250
|
|
|
197
|
-
───────────────────────────────────────────────────────────────
|
|
198
251
|
|
|
199
|
-
|
|
252
|
+
|
|
253
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
254
|
+
║ ▶ NEXT UP ║
|
|
255
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
200
256
|
|
|
201
257
|
**Fix the failures** listed above, then re-run
|
|
202
258
|
|
|
203
259
|
`/pbr:health`
|
|
204
260
|
|
|
205
|
-
|
|
261
|
+
|
|
206
262
|
```
|
|
207
263
|
|
|
208
264
|
---
|
|
209
265
|
|
|
210
266
|
## Anti-Patterns
|
|
211
267
|
|
|
212
|
-
1. **DO NOT** modify
|
|
213
|
-
2. **DO NOT** auto-repair anything — present fixes and let the user decide
|
|
268
|
+
1. **DO NOT** modify files without user consent — auto-fix requires explicit user approval via AskUserQuestion
|
|
269
|
+
2. **DO NOT** auto-repair anything silently — always present fixes and let the user decide
|
|
214
270
|
3. **DO NOT** skip checks that depend on missing files — report the dependency failure and continue
|
|
215
271
|
4. **DO NOT** treat warnings as failures in the summary count — only count FAIL items
|
|
216
272
|
5. **DO NOT** read full plan/summary contents — frontmatter and existence checks are sufficient
|
|
@@ -8,9 +8,9 @@ description: "Command reference and workflow guide for Plan-Build-Run."
|
|
|
8
8
|
**Before ANY tool calls**, display this banner:
|
|
9
9
|
|
|
10
10
|
```
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
12
|
+
║ PLAN-BUILD-RUN ► COMMAND REFERENCE ║
|
|
13
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Then proceed to Step 1.
|
|
@@ -134,16 +134,16 @@ Skills automatically activate the appropriate context: `/pbr:build` uses dev con
|
|
|
134
134
|
## Getting Started
|
|
135
135
|
|
|
136
136
|
```
|
|
137
|
-
───────────────────────────────────────────────────────────────
|
|
138
137
|
|
|
139
|
-
|
|
138
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
139
|
+
║ ▶ NEXT UP ║
|
|
140
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
140
141
|
|
|
141
142
|
→ `/pbr:begin` — start a new project
|
|
142
143
|
→ `/pbr:status` — check current project status
|
|
143
144
|
→ `/pbr:config` — configure workflow settings
|
|
144
145
|
→ `/pbr:help <command>` — detailed help for a specific command
|
|
145
146
|
|
|
146
|
-
───────────────────────────────────────────────────────────────
|
|
147
147
|
```
|
|
148
148
|
|
|
149
149
|
## Getting Help
|
|
@@ -8,9 +8,9 @@ description: "Import external plans. Validates context, detects conflicts, gener
|
|
|
8
8
|
**Before ANY tool calls**, display this banner:
|
|
9
9
|
|
|
10
10
|
```
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
12
|
+
║ PLAN-BUILD-RUN ► IMPORTING PLAN ║
|
|
13
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Then proceed to Step 1.
|
|
@@ -47,11 +47,12 @@ Reference: `skills/shared/config-loading.md` for the tooling shortcut and config
|
|
|
47
47
|
1. Parse `$ARGUMENTS` for phase number
|
|
48
48
|
2. Parse optional `--from <filepath>` flag (path to the external document to import)
|
|
49
49
|
3. Parse optional `--skip-checker` flag (skip plan validation step)
|
|
50
|
-
4.
|
|
50
|
+
4. **CRITICAL: Write .active-skill NOW.** Write the text "import" to `.planning/.active-skill` using the Write tool.
|
|
51
|
+
5. Validate:
|
|
51
52
|
- Phase exists in ROADMAP.md
|
|
52
53
|
- Phase directory exists at `.planning/phases/{NN}-{slug}/`
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
6. If no phase number given, read current phase from `.planning/STATE.md`
|
|
55
|
+
7. Check for existing plans in the phase directory (glob for `*-PLAN.md`)
|
|
55
56
|
- If plans exist: ask user via AskUserQuestion: "Phase {N} already has plans. Replace them with imported plans?"
|
|
56
57
|
- If yes: note that existing plans will be overwritten in Step 7
|
|
57
58
|
- If no: stop
|
|
@@ -317,7 +318,7 @@ Follow the revision loop with:
|
|
|
317
318
|
|
|
318
319
|
### Step 7: Write PLAN.md Files (inline)
|
|
319
320
|
|
|
320
|
-
Write each plan to `.planning/phases/{NN}-{slug}/
|
|
321
|
+
Write each plan to `.planning/phases/{NN}-{slug}/PLAN-{plan_num}.md`.
|
|
321
322
|
|
|
322
323
|
If existing plans are being replaced (user confirmed in Step 1):
|
|
323
324
|
- Delete existing `*-PLAN.md` files in the phase directory before writing new ones
|
|
@@ -375,14 +376,18 @@ docs({phase}): import plans for phase {N} ({count} plans, {wave_count} waves)
|
|
|
375
376
|
|
|
376
377
|
---
|
|
377
378
|
|
|
378
|
-
### Step 10:
|
|
379
|
+
### Step 10: Cleanup
|
|
380
|
+
|
|
381
|
+
Delete `.planning/.active-skill` if it exists. This must happen on all paths (success, partial, and failure) before reporting results.
|
|
382
|
+
|
|
383
|
+
### Step 11: Confirm (inline)
|
|
379
384
|
|
|
380
385
|
Present a summary of the import using the branded banner:
|
|
381
386
|
|
|
382
387
|
```
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
388
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
389
|
+
║ PLAN-BUILD-RUN ► IMPORT COMPLETE ✓ ║
|
|
390
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
386
391
|
|
|
387
392
|
**Phase {N}: {name}** — {plan_count} plans imported
|
|
388
393
|
|
|
@@ -401,9 +406,9 @@ Wave execution order:
|
|
|
401
406
|
Must-haves coverage: {count} truths across {plan_count} plans
|
|
402
407
|
Requirements traced: {count}/{total} REQ-IDs covered
|
|
403
408
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
409
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
410
|
+
║ ▶ NEXT UP ║
|
|
411
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
407
412
|
|
|
408
413
|
**Build Phase {N}** — execute these imported plans
|
|
409
414
|
|
|
@@ -411,19 +416,18 @@ Requirements traced: {count}/{total} REQ-IDs covered
|
|
|
411
416
|
|
|
412
417
|
<sub>`/clear` first → fresh context window</sub>
|
|
413
418
|
|
|
414
|
-
───────────────────────────────────────────────────────────────
|
|
415
|
-
|
|
416
419
|
**Also available:**
|
|
417
420
|
- `/pbr:plan {N}` — re-plan from scratch if import needs rework
|
|
418
421
|
- `/pbr:discuss {N}` — talk through details before building
|
|
419
422
|
|
|
420
|
-
───────────────────────────────────────────────────────────────
|
|
421
423
|
```
|
|
422
424
|
|
|
423
425
|
---
|
|
424
426
|
|
|
425
427
|
## Error Handling
|
|
426
428
|
|
|
429
|
+
**IMPORTANT:** On ALL error exits below, delete `.planning/.active-skill` if it exists before displaying the error message.
|
|
430
|
+
|
|
427
431
|
### Phase not found
|
|
428
432
|
If the specified phase does not exist in ROADMAP.md, display:
|
|
429
433
|
```
|
|
@@ -492,7 +496,7 @@ Present remaining issues and ask user to decide: proceed or intervene.
|
|
|
492
496
|
|
|
493
497
|
| File | Purpose | When |
|
|
494
498
|
|------|---------|------|
|
|
495
|
-
| `.planning/phases/{NN}-{slug}/
|
|
499
|
+
| `.planning/phases/{NN}-{slug}/PLAN-{NN}.md` | Imported plan files | Step 7 |
|
|
496
500
|
| `.planning/ROADMAP.md` | Plans Complete + Status updated to `planned` | Step 8a |
|
|
497
501
|
| `.planning/STATE.md` | Updated with plan status and import source | Step 8b |
|
|
498
502
|
| `.planning/CONTEXT.md` | Updated if blockers surfaced new locked decisions | Step 8d |
|