@sienklogic/plan-build-run 2.10.0 → 2.12.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.
Files changed (126) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/package.json +1 -1
  3. package/plugins/copilot-pbr/agents/codebase-mapper.agent.md +42 -0
  4. package/plugins/copilot-pbr/agents/debugger.agent.md +4 -1
  5. package/plugins/copilot-pbr/agents/executor.agent.md +31 -1
  6. package/plugins/copilot-pbr/agents/integration-checker.agent.md +33 -2
  7. package/plugins/copilot-pbr/agents/planner.agent.md +58 -1
  8. package/plugins/copilot-pbr/agents/researcher.agent.md +23 -0
  9. package/plugins/copilot-pbr/agents/synthesizer.agent.md +24 -0
  10. package/plugins/copilot-pbr/agents/verifier.agent.md +35 -1
  11. package/plugins/copilot-pbr/plugin.json +1 -1
  12. package/plugins/copilot-pbr/references/agent-contracts.md +297 -0
  13. package/plugins/copilot-pbr/references/ui-formatting.md +38 -56
  14. package/plugins/copilot-pbr/skills/begin/SKILL.md +30 -7
  15. package/plugins/copilot-pbr/skills/build/SKILL.md +28 -31
  16. package/plugins/copilot-pbr/skills/config/SKILL.md +9 -12
  17. package/plugins/copilot-pbr/skills/continue/SKILL.md +6 -6
  18. package/plugins/copilot-pbr/skills/dashboard/SKILL.md +3 -3
  19. package/plugins/copilot-pbr/skills/debug/SKILL.md +23 -26
  20. package/plugins/copilot-pbr/skills/discuss/SKILL.md +20 -10
  21. package/plugins/copilot-pbr/skills/do/SKILL.md +3 -3
  22. package/plugins/copilot-pbr/skills/explore/SKILL.md +11 -14
  23. package/plugins/copilot-pbr/skills/health/SKILL.md +75 -19
  24. package/plugins/copilot-pbr/skills/help/SKILL.md +6 -6
  25. package/plugins/copilot-pbr/skills/import/SKILL.md +22 -18
  26. package/plugins/copilot-pbr/skills/milestone/SKILL.md +90 -48
  27. package/plugins/copilot-pbr/skills/note/SKILL.md +3 -3
  28. package/plugins/copilot-pbr/skills/pause/SKILL.md +11 -10
  29. package/plugins/copilot-pbr/skills/plan/SKILL.md +22 -9
  30. package/plugins/copilot-pbr/skills/plan/templates/planner-prompt.md.tmpl +1 -1
  31. package/plugins/copilot-pbr/skills/quick/SKILL.md +9 -12
  32. package/plugins/copilot-pbr/skills/resume/SKILL.md +9 -9
  33. package/plugins/copilot-pbr/skills/review/SKILL.md +17 -12
  34. package/plugins/copilot-pbr/skills/scan/SKILL.md +9 -11
  35. package/plugins/copilot-pbr/skills/setup/SKILL.md +31 -8
  36. package/plugins/copilot-pbr/skills/shared/error-reporting.md +2 -1
  37. package/plugins/copilot-pbr/skills/shared/progress-display.md +0 -1
  38. package/plugins/copilot-pbr/skills/shared/universal-anti-patterns.md +10 -6
  39. package/plugins/copilot-pbr/skills/status/SKILL.md +3 -3
  40. package/plugins/copilot-pbr/skills/statusline/SKILL.md +12 -8
  41. package/plugins/copilot-pbr/skills/todo/SKILL.md +51 -28
  42. package/plugins/cursor-pbr/.cursor-plugin/plugin.json +1 -1
  43. package/plugins/cursor-pbr/agents/codebase-mapper.md +42 -0
  44. package/plugins/cursor-pbr/agents/debugger.md +4 -1
  45. package/plugins/cursor-pbr/agents/executor.md +31 -1
  46. package/plugins/cursor-pbr/agents/integration-checker.md +33 -2
  47. package/plugins/cursor-pbr/agents/planner.md +58 -1
  48. package/plugins/cursor-pbr/agents/researcher.md +23 -0
  49. package/plugins/cursor-pbr/agents/synthesizer.md +24 -0
  50. package/plugins/cursor-pbr/agents/verifier.md +35 -1
  51. package/plugins/cursor-pbr/references/agent-contracts.md +297 -0
  52. package/plugins/cursor-pbr/references/ui-formatting.md +38 -56
  53. package/plugins/cursor-pbr/skills/begin/SKILL.md +30 -7
  54. package/plugins/cursor-pbr/skills/build/SKILL.md +28 -31
  55. package/plugins/cursor-pbr/skills/config/SKILL.md +9 -10
  56. package/plugins/cursor-pbr/skills/continue/SKILL.md +6 -6
  57. package/plugins/cursor-pbr/skills/dashboard/SKILL.md +3 -3
  58. package/plugins/cursor-pbr/skills/debug/SKILL.md +23 -23
  59. package/plugins/cursor-pbr/skills/discuss/SKILL.md +20 -10
  60. package/plugins/cursor-pbr/skills/do/SKILL.md +3 -3
  61. package/plugins/cursor-pbr/skills/explore/SKILL.md +11 -12
  62. package/plugins/cursor-pbr/skills/health/SKILL.md +75 -19
  63. package/plugins/cursor-pbr/skills/help/SKILL.md +6 -6
  64. package/plugins/cursor-pbr/skills/import/SKILL.md +22 -16
  65. package/plugins/cursor-pbr/skills/milestone/SKILL.md +90 -48
  66. package/plugins/cursor-pbr/skills/note/SKILL.md +3 -3
  67. package/plugins/cursor-pbr/skills/pause/SKILL.md +11 -9
  68. package/plugins/cursor-pbr/skills/plan/SKILL.md +22 -9
  69. package/plugins/cursor-pbr/skills/plan/templates/planner-prompt.md.tmpl +1 -1
  70. package/plugins/cursor-pbr/skills/quick/SKILL.md +9 -12
  71. package/plugins/cursor-pbr/skills/resume/SKILL.md +9 -9
  72. package/plugins/cursor-pbr/skills/review/SKILL.md +17 -12
  73. package/plugins/cursor-pbr/skills/scan/SKILL.md +9 -10
  74. package/plugins/cursor-pbr/skills/setup/SKILL.md +31 -8
  75. package/plugins/cursor-pbr/skills/shared/error-reporting.md +2 -1
  76. package/plugins/cursor-pbr/skills/shared/progress-display.md +0 -1
  77. package/plugins/cursor-pbr/skills/shared/universal-anti-patterns.md +10 -6
  78. package/plugins/cursor-pbr/skills/status/SKILL.md +3 -3
  79. package/plugins/cursor-pbr/skills/statusline/SKILL.md +12 -8
  80. package/plugins/cursor-pbr/skills/todo/SKILL.md +51 -28
  81. package/plugins/pbr/.claude-plugin/plugin.json +1 -1
  82. package/plugins/pbr/agents/codebase-mapper.md +42 -0
  83. package/plugins/pbr/agents/debugger.md +4 -1
  84. package/plugins/pbr/agents/executor.md +31 -1
  85. package/plugins/pbr/agents/integration-checker.md +34 -2
  86. package/plugins/pbr/agents/planner.md +58 -1
  87. package/plugins/pbr/agents/researcher.md +23 -0
  88. package/plugins/pbr/agents/synthesizer.md +24 -0
  89. package/plugins/pbr/agents/verifier.md +36 -1
  90. package/plugins/pbr/references/agent-contracts.md +297 -0
  91. package/plugins/pbr/references/ui-formatting.md +37 -54
  92. package/plugins/pbr/scripts/check-roadmap-sync.js +9 -1
  93. package/plugins/pbr/scripts/check-skill-workflow.js +11 -0
  94. package/plugins/pbr/scripts/check-state-sync.js +58 -0
  95. package/plugins/pbr/scripts/check-subagent-output.js +75 -6
  96. package/plugins/pbr/scripts/log-tool-failure.js +1 -1
  97. package/plugins/pbr/scripts/progress-tracker.js +14 -0
  98. package/plugins/pbr/scripts/track-context-budget.js +10 -1
  99. package/plugins/pbr/scripts/validate-task.js +81 -17
  100. package/plugins/pbr/skills/begin/SKILL.md +36 -11
  101. package/plugins/pbr/skills/build/SKILL.md +37 -25
  102. package/plugins/pbr/skills/config/SKILL.md +12 -10
  103. package/plugins/pbr/skills/continue/SKILL.md +11 -9
  104. package/plugins/pbr/skills/dashboard/SKILL.md +3 -3
  105. package/plugins/pbr/skills/debug/SKILL.md +29 -23
  106. package/plugins/pbr/skills/discuss/SKILL.md +20 -10
  107. package/plugins/pbr/skills/do/SKILL.md +3 -3
  108. package/plugins/pbr/skills/explore/SKILL.md +14 -12
  109. package/plugins/pbr/skills/health/SKILL.md +76 -20
  110. package/plugins/pbr/skills/help/SKILL.md +8 -6
  111. package/plugins/pbr/skills/import/SKILL.md +25 -16
  112. package/plugins/pbr/skills/milestone/SKILL.md +88 -45
  113. package/plugins/pbr/skills/note/SKILL.md +3 -3
  114. package/plugins/pbr/skills/pause/SKILL.md +13 -9
  115. package/plugins/pbr/skills/plan/SKILL.md +28 -13
  116. package/plugins/pbr/skills/plan/templates/planner-prompt.md.tmpl +1 -1
  117. package/plugins/pbr/skills/quick/SKILL.md +12 -10
  118. package/plugins/pbr/skills/resume/SKILL.md +11 -9
  119. package/plugins/pbr/skills/review/SKILL.md +35 -24
  120. package/plugins/pbr/skills/scan/SKILL.md +12 -10
  121. package/plugins/pbr/skills/setup/SKILL.md +30 -7
  122. package/plugins/pbr/skills/shared/error-reporting.md +2 -0
  123. package/plugins/pbr/skills/shared/universal-anti-patterns.md +10 -6
  124. package/plugins/pbr/skills/status/SKILL.md +8 -6
  125. package/plugins/pbr/skills/statusline/SKILL.md +12 -8
  126. package/plugins/pbr/skills/todo/SKILL.md +51 -28
@@ -8,9 +8,9 @@ description: "Save your current session state for later resumption."
8
8
  **Before ANY tool calls**, display this banner:
9
9
 
10
10
  ```
11
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
12
- PLAN-BUILD-RUN ► PAUSING SESSION
13
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
11
+ ╔══════════════════════════════════════════════════════════════╗
12
+ PLAN-BUILD-RUN ► PAUSING SESSION
13
+ ╚══════════════════════════════════════════════════════════════╝
14
14
  ```
15
15
 
16
16
  Then proceed to Step 1.
@@ -118,6 +118,8 @@ Determine the logical next action (same routing logic as `/pbr:status`):
118
118
 
119
119
  ### Step 4: Write .continue-here.md
120
120
 
121
+ **CRITICAL: Write pause state NOW before displaying confirmation. Do NOT skip this step.**
122
+
121
123
  Write the handoff file to the current phase directory:
122
124
 
123
125
  **Path:** `.planning/phases/{NN}-{phase-name}/.continue-here.md`
@@ -164,17 +166,17 @@ git commit -m "wip(planning): save session state — phase {N} plan {M}"
164
166
  Display branded confirmation:
165
167
 
166
168
  ```
167
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
168
- PLAN-BUILD-RUN ► SESSION SAVED ✓
169
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
169
+ ╔══════════════════════════════════════════════════════════════╗
170
+ PLAN-BUILD-RUN ► SESSION SAVED ✓
171
+ ╚══════════════════════════════════════════════════════════════╝
170
172
 
171
173
  Position: Phase {N} — {phase name}, Plan {M}
172
174
  Completed: {count} plans this session
173
175
  Remaining: {count} plans in this phase
174
176
 
175
- ───────────────────────────────────────────────────────────────
176
-
177
- ## ▶ Next Up
177
+ ╔══════════════════════════════════════════════════════════════╗
178
+ ║ ▶ NEXT UP ║
179
+ ╚══════════════════════════════════════════════════════════════╝
178
180
 
179
181
  **Resume in your next session**
180
182
 
@@ -182,7 +184,6 @@ Remaining: {count} plans in this phase
182
184
 
183
185
  <sub>`/clear` first → fresh context window</sub>
184
186
 
185
- ───────────────────────────────────────────────────────────────
186
187
  ```
187
188
 
188
189
  ---
@@ -20,9 +20,9 @@ Additionally for this skill:
20
20
  **Before ANY tool calls**, display this banner:
21
21
 
22
22
  ```
23
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
24
- PLAN-BUILD-RUN ► PLANNING PHASE {N}
25
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
23
+ ╔══════════════════════════════════════════════════════════════╗
24
+ PLAN-BUILD-RUN ► PLANNING PHASE {N}
25
+ ╚══════════════════════════════════════════════════════════════╝
26
26
  ```
27
27
 
28
28
  Where `{N}` is the phase number from `$ARGUMENTS`. Then proceed to Step 1.
@@ -112,6 +112,7 @@ Reference: `skills/shared/config-loading.md` for the tooling shortcut (`state lo
112
112
 
113
113
  1. Parse `$ARGUMENTS` for phase number and flags
114
114
  2. Read `.planning/config.json` for settings (see config-loading.md for field reference)
115
+ **CRITICAL: Write .active-skill NOW.** Write the text "plan" to `.planning/.active-skill` using the Write tool.
115
116
  3. Resolve depth profile: run `node ${PLUGIN_ROOT}/scripts/pbr-tools.js config resolve-depth` to get the effective feature/gate settings for the current depth. Store the result for use in later gating decisions.
116
117
  4. Validate:
117
118
  - Phase exists in ROADMAP.md
@@ -471,6 +472,8 @@ Use the approve-revise-abort pattern from `skills/shared/gate-prompts.md`:
471
472
 
472
473
  ### Subcommand: `add`
473
474
 
475
+ **CRITICAL: Write .active-skill NOW.** Write the text "plan" to `.planning/.active-skill` using the Write tool.
476
+
474
477
  1. Read `.planning/ROADMAP.md`
475
478
  2. Calculate next phase number (last phase + 1)
476
479
  3. Ask user: "What's the goal for this new phase?"
@@ -480,11 +483,14 @@ Use the approve-revise-abort pattern from `skills/shared/gate-prompts.md`:
480
483
  7. Create phase directory: `.planning/phases/{NN}-{slug}/`
481
484
  8. Update STATE.md if needed
482
485
  9. Suggest: `/pbr:plan {N}` to plan the new phase
486
+ 10. Delete `.planning/.active-skill` if it exists.
483
487
 
484
488
  ### Subcommand: `insert <N>`
485
489
 
486
490
  Reference: `skills/plan/decimal-phase-calc.md` for decimal numbering rules.
487
491
 
492
+ **CRITICAL: Write .active-skill NOW.** Write the text "plan" to `.planning/.active-skill` using the Write tool.
493
+
488
494
  1. Read `.planning/ROADMAP.md`
489
495
  2. Calculate decimal phase number:
490
496
  - If inserting at position 3: becomes 3.1
@@ -495,6 +501,7 @@ Reference: `skills/plan/decimal-phase-calc.md` for decimal numbering rules.
495
501
  5. Create phase directory: `.planning/phases/{NN.M}-{slug}/`
496
502
  6. Update dependencies of subsequent phases if affected
497
503
  7. Suggest: `/pbr:plan {N.M}` to plan the new phase
504
+ 8. Delete `.planning/.active-skill` if it exists.
498
505
 
499
506
  ### Subcommand: `remove <N>`
500
507
 
@@ -503,13 +510,15 @@ Reference: `skills/plan/decimal-phase-calc.md` for decimal numbering rules.
503
510
  - Phase must exist
504
511
  - Phase must be in `pending` or `not started` status (cannot remove completed/in-progress phases)
505
512
  - No other phases depend on this phase (or user confirms breaking dependencies)
506
- 3. Confirm with user: "Remove Phase {N}: {name}? This will delete the phase directory and renumber subsequent phases."
507
- 4. If confirmed:
513
+ 3. **CRITICAL: Write .active-skill NOW.** Write the text "plan" to `.planning/.active-skill` using the Write tool.
514
+ 4. Confirm with user: "Remove Phase {N}: {name}? This will delete the phase directory and renumber subsequent phases."
515
+ 5. If confirmed:
508
516
  - Delete `.planning/phases/{NN}-{slug}/` directory
509
517
  - Remove phase from ROADMAP.md
510
518
  - Renumber subsequent phases (N+1 becomes N, etc.)
511
519
  - Update all `depends_on` references in ROADMAP.md
512
520
  - Update STATE.md if needed
521
+ 6. Delete `.planning/.active-skill` if it exists.
513
522
 
514
523
  ---
515
524
 
@@ -597,13 +606,17 @@ Present remaining issues and ask user to decide: proceed or intervene.
597
606
  | File | Purpose | When |
598
607
  |------|---------|------|
599
608
  | `.planning/phases/{NN}-{slug}/RESEARCH.md` | Phase-specific research | Step 4 |
600
- | `.planning/phases/{NN}-{slug}/{phase}-{NN}-PLAN.md` | Executable plan files | Step 5 |
609
+ | `.planning/phases/{NN}-{slug}/PLAN-{NN}.md` | Executable plan files | Step 5 |
601
610
  | `.planning/CONTEXT.md` | Updated with assumptions | Step 3 (--assumptions) |
602
611
  | `.planning/ROADMAP.md` | Plans Complete + Status -> `planned`; updated for add/insert/remove | Step 8, Subcommands |
603
612
  | `.planning/STATE.md` | Updated with plan status | Step 8 |
604
613
 
605
614
  ---
606
615
 
616
+ ## Cleanup
617
+
618
+ Delete `.planning/.active-skill` if it exists. This must happen on all paths (success, partial, and failure) before reporting results.
619
+
607
620
  ## Completion
608
621
 
609
622
  After planning completes, present:
@@ -611,9 +624,9 @@ After planning completes, present:
611
624
  Use the branded stage banner from `references/ui-formatting.md`:
612
625
 
613
626
  ```
614
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
615
- PLAN-BUILD-RUN ► PLANNING PHASE {N}
616
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
627
+ ╔══════════════════════════════════════════════════════════════╗
628
+ PLAN-BUILD-RUN ► PLANNING PHASE {N}
629
+ ╚══════════════════════════════════════════════════════════════╝
617
630
 
618
631
  **Phase {N}: {name}** — {plan_count} plans created
619
632
 
@@ -32,7 +32,7 @@ Key rules:
32
32
  4. Every task needs all 5 elements: name, files, action, verify, done
33
33
  5. Honor all locked decisions from CONTEXT.md
34
34
  6. Do NOT include deferred ideas
35
- 7. Write plan files to: .planning/phases/{NN}-{slug}/{phase}-{plan_num}-PLAN.md
35
+ 7. Write plan files to: .planning/phases/{NN}-{slug}/PLAN-{plan_num}.md
36
36
  8. If any task requires env vars, API keys, or external service setup, note it in the task's <action> — the executor will generate USER-SETUP.md automatically
37
37
 
38
38
  Use the Write tool to create each plan file.
@@ -18,9 +18,9 @@ This skill **spawns a single Task(agent_type: "pbr:executor")** for execution.
18
18
  **Before ANY tool calls**, display this banner:
19
19
 
20
20
  ```
21
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
22
- PLAN-BUILD-RUN ► QUICK TASK
23
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
21
+ ╔══════════════════════════════════════════════════════════════╗
22
+ PLAN-BUILD-RUN ► QUICK TASK
23
+ ╚══════════════════════════════════════════════════════════════╝
24
24
  ```
25
25
 
26
26
  Then proceed to Step 1.
@@ -249,17 +249,17 @@ Display results to the user with branded output:
249
249
 
250
250
  **If completed:**
251
251
  ```
252
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
253
- PLAN-BUILD-RUN ► QUICK TASK COMPLETE ✓
254
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
252
+ ╔══════════════════════════════════════════════════════════════╗
253
+ PLAN-BUILD-RUN ► QUICK TASK COMPLETE ✓
254
+ ╚══════════════════════════════════════════════════════════════╝
255
255
 
256
256
  **Quick Task {NNN}:** {description}
257
257
  Commit: {hash} — {commit message}
258
258
  Files: {list of files changed}
259
259
 
260
- ───────────────────────────────────────────────────────────────
261
-
262
- ## ▶ Next Up
260
+ ╔══════════════════════════════════════════════════════════════╗
261
+ ║ ▶ NEXT UP ║
262
+ ╚══════════════════════════════════════════════════════════════╝
263
263
 
264
264
  **Continue your workflow** — task complete
265
265
 
@@ -267,13 +267,10 @@ Files: {list of files changed}
267
267
 
268
268
  <sub>`/clear` first → fresh context window</sub>
269
269
 
270
- ───────────────────────────────────────────────────────────────
271
-
272
270
  **Also available:**
273
271
  - `/pbr:continue` — execute next logical step
274
272
  - `/pbr:todo list` — see pending todos
275
273
 
276
- ───────────────────────────────────────────────────────────────
277
274
  ```
278
275
 
279
276
  **If partial:**
@@ -8,9 +8,9 @@ description: "Pick up where you left off. Restores context and suggests next act
8
8
  **Before ANY tool calls**, display this banner:
9
9
 
10
10
  ```
11
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
12
- PLAN-BUILD-RUN ► RESUMING SESSION
13
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
11
+ ╔══════════════════════════════════════════════════════════════╗
12
+ PLAN-BUILD-RUN ► RESUMING SESSION
13
+ ╚══════════════════════════════════════════════════════════════╝
14
14
  ```
15
15
 
16
16
  Then proceed to Step 1.
@@ -144,9 +144,9 @@ Use the selected pause point for the rest of the resume flow.
144
144
  3. Display the resume context using the branded banner:
145
145
 
146
146
  ```
147
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
148
- PLAN-BUILD-RUN ► SESSION RESTORED ✓
149
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
147
+ ╔══════════════════════════════════════════════════════════════╗
148
+ PLAN-BUILD-RUN ► SESSION RESTORED ✓
149
+ ╚══════════════════════════════════════════════════════════════╝
150
150
 
151
151
  Resuming session from {pause date}
152
152
 
@@ -179,9 +179,10 @@ Blockers:
179
179
 
180
180
  **If only one clear next action exists**, present it with branded routing:
181
181
  ```
182
- ───────────────────────────────────────────────────────────────
183
182
 
184
- ## ▶ Next Up
183
+ ╔══════════════════════════════════════════════════════════════╗
184
+ ║ ▶ NEXT UP ║
185
+ ╚══════════════════════════════════════════════════════════════╝
185
186
 
186
187
  **{explanation from continue-here}**
187
188
 
@@ -189,7 +190,6 @@ Blockers:
189
190
 
190
191
  <sub>`/clear` first → fresh context window</sub>
191
192
 
192
- ───────────────────────────────────────────────────────────────
193
193
  ```
194
194
 
195
195
  **If multiple reasonable actions exist** (e.g., the continue-here suggests one thing but the filesystem state suggests another), use the **action-routing** pattern (see `skills/shared/gate-prompts.md`):
@@ -19,9 +19,9 @@ Additionally for this skill:
19
19
  **Before ANY tool calls**, display this banner:
20
20
 
21
21
  ```
22
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
23
- PLAN-BUILD-RUN ► REVIEWING PHASE {N}
24
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
22
+ ╔══════════════════════════════════════════════════════════════╗
23
+ PLAN-BUILD-RUN ► REVIEWING PHASE {N}
24
+ ╚══════════════════════════════════════════════════════════════╝
25
25
  ```
26
26
 
27
27
  Where `{N}` is the phase number from `$ARGUMENTS`. Then proceed to Step 1.
@@ -62,6 +62,7 @@ Execute these steps in order.
62
62
 
63
63
  1. Parse `$ARGUMENTS` for phase number and `--auto-fix` flag
64
64
  2. Read `.planning/config.json`
65
+ **CRITICAL: Write .active-skill NOW.** Write the text "review" to `.planning/.active-skill` using the Write tool.
65
66
  3. Resolve depth profile: run `node ${PLUGIN_ROOT}/scripts/pbr-tools.js config resolve-depth` to get the effective feature/gate settings for the current depth. Store the result for use in later gating decisions.
66
67
  4. Validate:
67
68
  - Phase directory exists at `.planning/phases/{NN}-{slug}/`
@@ -535,6 +536,10 @@ Ask user: "Would you like to proceed with gap-closure plans without root cause a
535
536
 
536
537
  ---
537
538
 
539
+ ## Cleanup
540
+
541
+ Delete `.planning/.active-skill` if it exists. This must happen on all paths (success, partial, and failure) before reporting results.
542
+
538
543
  ## Completion
539
544
 
540
545
  After review completes, always present a clear next action:
@@ -543,9 +548,9 @@ After review completes, always present a clear next action:
543
548
 
544
549
  Display the "Phase Complete" banner inline:
545
550
  ```
546
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
547
- PLAN-BUILD-RUN ► PHASE {N} COMPLETE
548
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
551
+ ╔══════════════════════════════════════════════════════════════╗
552
+ PLAN-BUILD-RUN ► PHASE {N} COMPLETE
553
+ ╚══════════════════════════════════════════════════════════════╝
549
554
 
550
555
  **Phase {N}: {Name}**
551
556
 
@@ -576,9 +581,9 @@ Then the branded "Next Up" block:
576
581
 
577
582
  **If gaps remain:**
578
583
  ```
579
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
580
- PLAN-BUILD-RUN ► PHASE {N} GAPS FOUND
581
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
584
+ ╔══════════════════════════════════════════════════════════════╗
585
+ PLAN-BUILD-RUN ► PHASE {N} GAPS FOUND
586
+ ╚══════════════════════════════════════════════════════════════╝
582
587
 
583
588
  **Phase {N}: {name}** — {count} gaps remaining
584
589
 
@@ -605,9 +610,9 @@ Then the branded "Next Up" block:
605
610
 
606
611
  Display the "Milestone Complete" banner inline:
607
612
  ```
608
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
609
- PLAN-BUILD-RUN ► MILESTONE COMPLETE
610
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
613
+ ╔══════════════════════════════════════════════════════════════╗
614
+ PLAN-BUILD-RUN ► MILESTONE COMPLETE
615
+ ╚══════════════════════════════════════════════════════════════╝
611
616
 
612
617
  {N} phases completed
613
618
  All phase goals verified
@@ -8,9 +8,9 @@ description: "Analyze an existing codebase. Maps structure, architecture, conven
8
8
  **Before ANY tool calls**, display this banner:
9
9
 
10
10
  ```
11
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
12
- PLAN-BUILD-RUN ► SCANNING CODEBASE
13
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
11
+ ╔══════════════════════════════════════════════════════════════╗
12
+ PLAN-BUILD-RUN ► SCANNING CODEBASE
13
+ ╚══════════════════════════════════════════════════════════════╝
14
14
  ```
15
15
 
16
16
  Then proceed to Step 1.
@@ -177,9 +177,9 @@ Agent that failed: {focus_area} mapper
177
177
  Read key findings from each file (frontmatter or first section) and display using the branded stage banner from `references/ui-formatting.md`:
178
178
 
179
179
  ```
180
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
181
- PLAN-BUILD-RUN ► SCAN COMPLETE ✓
182
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
180
+ ╔══════════════════════════════════════════════════════════════╗
181
+ PLAN-BUILD-RUN ► SCAN COMPLETE ✓
182
+ ╚══════════════════════════════════════════════════════════════╝
183
183
 
184
184
  Project: {type} ({scale})
185
185
  Stack: {primary language} + {framework}
@@ -206,9 +206,10 @@ Top concerns:
206
206
 
207
207
  Then use the "Next Up" routing block:
208
208
  ```
209
- ───────────────────────────────────────────────────────────────
210
209
 
211
- ## ▶ Next Up
210
+ ╔══════════════════════════════════════════════════════════════╗
211
+ ║ ▶ NEXT UP ║
212
+ ╚══════════════════════════════════════════════════════════════╝
212
213
 
213
214
  **Start a project** — use the scan results to plan your work
214
215
 
@@ -216,13 +217,10 @@ Then use the "Next Up" routing block:
216
217
 
217
218
  <sub>`/clear` first → fresh context window</sub>
218
219
 
219
- ───────────────────────────────────────────────────────────────
220
-
221
220
  **Also available:**
222
221
  - `/pbr:milestone new` — create a milestone to address concerns
223
222
  - `/pbr:status` — see project status
224
223
 
225
- ───────────────────────────────────────────────────────────────
226
224
  ```
227
225
 
228
226
  ### Step 7: Git Integration
@@ -8,9 +8,9 @@ description: "Onboarding wizard. Initialize project, select models, verify setup
8
8
  **Before ANY tool calls**, display this banner:
9
9
 
10
10
  ```
11
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
12
- PLAN-BUILD-RUN ► SETUP
13
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
11
+ ╔══════════════════════════════════════════════════════════════╗
12
+ PLAN-BUILD-RUN ► SETUP
13
+ ╚══════════════════════════════════════════════════════════════╝
14
14
  ```
15
15
 
16
16
  Then proceed to Step 1.
@@ -21,14 +21,29 @@ You are running the **setup** skill. This is an interactive onboarding wizard th
21
21
 
22
22
  ---
23
23
 
24
- ## Step 1: Detect Project State
24
+ ## Step 1: Detect Project State — Idempotency Guard
25
25
 
26
26
  Check if `.planning/` directory exists in the current working directory.
27
27
 
28
28
  **If `.planning/` exists**:
29
- - Read `.planning/config.json` to check current settings
30
- - Tell the user: "Existing Plan-Build-Run project detected. This wizard will review your configuration."
31
- - Skip to Step 3 (model selection)
29
+ - Check for existing core files: `STATE.md`, `ROADMAP.md`, `config.json`
30
+ - If ANY of these exist, present a checkpoint:
31
+
32
+ Use AskUserQuestion:
33
+ question: "Existing project detected with {list of found files}. How should we proceed?"
34
+ header: "Setup"
35
+ options:
36
+ - label: "Resume" description: "Keep existing .planning/ and review configuration (recommended)"
37
+ - label: "Reset" description: "Archive current .planning/ to .planning.bak/ and start fresh"
38
+ - label: "Abort" description: "Cancel setup — keep everything as-is"
39
+
40
+ - If "Resume": Tell the user: "Keeping existing project. Reviewing configuration." Skip to Step 3 (model selection)
41
+ - If "Reset": Run `mv .planning .planning.bak` (creating a backup), then proceed with fresh setup below
42
+ - If "Abort": Display "Setup cancelled. Run `/pbr:status` to see current project state." and stop
43
+
44
+ - If `.planning/` exists but has NONE of the core files (empty or only has subdirs):
45
+ - Tell the user: "Found empty .planning/ directory. Proceeding with initialization."
46
+ - Continue to fresh setup below
32
47
 
33
48
  **If `.planning/` does NOT exist**:
34
49
  - Ask the user:
@@ -48,10 +63,14 @@ If "No", display: "Run `/pbr:begin` when you're ready to start a project. It inc
48
63
 
49
64
  If "Yes", create the minimal `.planning/` structure:
50
65
 
66
+ **CRITICAL: Create .planning/ directory structure NOW. Do NOT skip this step.**
67
+
51
68
  ```bash
52
69
  mkdir -p .planning/phases .planning/todos/pending .planning/todos/done .planning/logs .planning/research
53
70
  ```
54
71
 
72
+ **CRITICAL: Write .planning/config.json NOW. Do NOT skip this step.**
73
+
55
74
  Create `.planning/config.json` with defaults:
56
75
  ```json
57
76
  {
@@ -120,6 +139,8 @@ Create `.planning/config.json` with defaults:
120
139
  }
121
140
  ```
122
141
 
142
+ **CRITICAL: Write .planning/STATE.md NOW. Do NOT skip this step.**
143
+
123
144
  Create `.planning/STATE.md`:
124
145
  ```markdown
125
146
  ---
@@ -240,11 +261,13 @@ This project uses [Plan-Build-Run](https://github.com/SienkLogic/plan-build-run)
240
261
 
241
262
  ## Step 5: Verification
242
263
 
264
+ **CRITICAL: Run validation checks NOW to confirm setup succeeded. Do NOT skip this step.**
265
+
243
266
  Run a quick health check:
244
267
 
245
268
  1. Verify `.planning/config.json` is valid JSON
246
269
  2. Verify `.planning/STATE.md` exists and is parseable
247
- 3. Verify hook scripts are accessible: `node ${CLAUDE_PLUGIN_ROOT}/scripts/progress-tracker.js` from the project directory
270
+ 3. Verify hook scripts are accessible: `node ${PLUGIN_ROOT}/scripts/progress-tracker.js` from the project directory
248
271
  4. Check that `npm test` works (if package.json exists)
249
272
 
250
273
  Display results:
@@ -1,4 +1,3 @@
1
- <!-- canonical: ../../../pbr/skills/shared/error-reporting.md -->
2
1
  # Error Reporting Fragment
3
2
 
4
3
  Standard error display formats for all skills. Reference `references/ui-formatting.md` for the full brand guide.
@@ -78,3 +77,5 @@ Blocked: {short reason}
78
77
  ```
79
78
 
80
79
  This format is used by validate-commit.js and check-dangerous-commands.js. The `decision: "block"` and `reason` fields in the JSON output follow this pattern.
80
+
81
+ Block reasons should always include a "To fix:" line with actionable guidance so the user or agent knows how to resolve the block.
@@ -1,4 +1,3 @@
1
- <!-- canonical: ../../../pbr/skills/shared/progress-display.md -->
2
1
  # Progress Display Fragment
3
2
 
4
3
  Standard progress display formats for all skills. Reference `references/ui-formatting.md` for the full brand guide.
@@ -24,11 +24,15 @@ These rules prevent context rot -- quality degradation as the context window fil
24
24
  8. **Never** read `.planning/logs/` files -- only the health skill reads these.
25
25
  9. **Do not** re-read full file contents when frontmatter is sufficient -- frontmatter contains status, key_files, commits, and provides fields.
26
26
 
27
+ ## Task/Subagent Rules (apply to every skill)
28
+
29
+ 10. **Never** invoke `Skill()` inside a `Task()` subagent -- the Skill tool is not available in subagent contexts. Subagents spawned by `Task()` cannot resolve `/pbr:*` skill prefixes, so `Skill({ skill: "pbr:plan" })` will silently fail. Instead, chain skills at the orchestrator level (return control to the orchestrator, then call `Skill()` from there). For subagent work, use `subagent_type: "pbr:{agent}"` which auto-loads agent definitions.
30
+
27
31
  ## Behavioral Rules (apply to every skill)
28
32
 
29
- 10. **Do not** re-litigate decisions that are already locked in CONTEXT.md -- respect locked decisions unconditionally.
30
- 11. **Do not** create artifacts the user did not approve -- always confirm before writing new planning documents.
31
- 12. **Do not** modify files outside the skill's stated scope -- check the "Files Created/Modified" table in each skill.
32
- 13. **Do not** suggest multiple next actions without clear priority -- one primary suggestion, alternatives listed secondary.
33
- 14. **Do not** use `git add .` or `git add -A` -- stage specific files only.
34
- 15. **Do not** include sensitive information (API keys, passwords, tokens) in planning documents or commits.
33
+ 11. **Do not** re-litigate decisions that are already locked in CONTEXT.md -- respect locked decisions unconditionally.
34
+ 12. **Do not** create artifacts the user did not approve -- always confirm before writing new planning documents.
35
+ 13. **Do not** modify files outside the skill's stated scope -- check the "Files Created/Modified" table in each skill.
36
+ 14. **Do not** suggest multiple next actions without clear priority -- one primary suggestion, alternatives listed secondary.
37
+ 15. **Do not** use `git add .` or `git add -A` -- stage specific files only.
38
+ 16. **Do not** include sensitive information (API keys, passwords, tokens) in planning documents or commits.
@@ -8,9 +8,9 @@ description: "Show current project status and suggest what to do next."
8
8
  **Before ANY tool calls**, display this banner:
9
9
 
10
10
  ```
11
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
12
- PLAN-BUILD-RUN ► PROJECT STATUS
13
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
11
+ ╔══════════════════════════════════════════════════════════════╗
12
+ PLAN-BUILD-RUN ► PROJECT STATUS
13
+ ╚══════════════════════════════════════════════════════════════╝
14
14
  ```
15
15
 
16
16
  Then proceed to Step 1.
@@ -10,9 +10,9 @@ description: "Install or configure the PBR status line in Claude Code."
10
10
  **Before ANY tool calls**, display this banner:
11
11
 
12
12
  ```
13
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
14
- PLAN-BUILD-RUN ► STATUS LINE
15
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
13
+ ╔══════════════════════════════════════════════════════════════╗
14
+ PLAN-BUILD-RUN ► STATUS LINE
15
+ ╚══════════════════════════════════════════════════════════════╝
16
16
  ```
17
17
 
18
18
  Then proceed to Step 1.
@@ -76,9 +76,12 @@ If "Install":
76
76
 
77
77
  **CRITICAL: Use Read tool to read the file, then Write to update it. Do NOT use sed or other text manipulation on JSON files.**
78
78
 
79
+ **CRITICAL: Back up settings.json NOW.** Write the original content to `~/.claude/settings.json.bak` before making any changes.
80
+
79
81
  1. Read `~/.claude/settings.json`
80
- 2. Parse the JSON
81
- 3. Set `statusLine` to:
82
+ 2. Write the original content to `~/.claude/settings.json.bak`
83
+ 3. Parse the JSON
84
+ 4. Set `statusLine` to:
82
85
  ```json
83
86
  {
84
87
  "type": "command",
@@ -86,7 +89,7 @@ If "Install":
86
89
  }
87
90
  ```
88
91
  Where `SCRIPT_PATH` is the resolved absolute path from Step 1. Use forward slashes even on Windows.
89
- 4. Write the updated JSON back (preserve all other settings, use 2-space indentation)
92
+ 5. Write the updated JSON back (preserve all other settings, use 2-space indentation)
90
93
 
91
94
  ### Step 4: Verify and confirm
92
95
 
@@ -113,8 +116,9 @@ Customize per-project via .planning/config.json:
113
116
 
114
117
  1. Read `~/.claude/settings.json`
115
118
  2. If no `statusLine` key: inform user "No status line configured." and stop
116
- 3. Remove the `statusLine` key from the JSON
117
- 4. Write the updated file
119
+ 3. **CRITICAL: Back up settings.json NOW.** Write the original content to `~/.claude/settings.json.bak` before making any changes.
120
+ 4. Remove the `statusLine` key from the JSON
121
+ 5. Write the updated file
118
122
  5. Display: `✓ PBR status line removed. Restart Claude Code to take effect.`
119
123
 
120
124
  ---