@sienklogic/plan-build-run 2.10.0 → 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.
Files changed (122) hide show
  1. package/CHANGELOG.md +37 -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-skill-workflow.js +11 -0
  93. package/plugins/pbr/scripts/check-state-sync.js +58 -0
  94. package/plugins/pbr/scripts/check-subagent-output.js +43 -4
  95. package/plugins/pbr/scripts/validate-task.js +69 -17
  96. package/plugins/pbr/skills/begin/SKILL.md +36 -11
  97. package/plugins/pbr/skills/build/SKILL.md +37 -25
  98. package/plugins/pbr/skills/config/SKILL.md +12 -10
  99. package/plugins/pbr/skills/continue/SKILL.md +11 -9
  100. package/plugins/pbr/skills/dashboard/SKILL.md +3 -3
  101. package/plugins/pbr/skills/debug/SKILL.md +29 -23
  102. package/plugins/pbr/skills/discuss/SKILL.md +20 -10
  103. package/plugins/pbr/skills/do/SKILL.md +3 -3
  104. package/plugins/pbr/skills/explore/SKILL.md +14 -12
  105. package/plugins/pbr/skills/health/SKILL.md +76 -20
  106. package/plugins/pbr/skills/help/SKILL.md +8 -6
  107. package/plugins/pbr/skills/import/SKILL.md +25 -16
  108. package/plugins/pbr/skills/milestone/SKILL.md +88 -45
  109. package/plugins/pbr/skills/note/SKILL.md +3 -3
  110. package/plugins/pbr/skills/pause/SKILL.md +13 -9
  111. package/plugins/pbr/skills/plan/SKILL.md +28 -13
  112. package/plugins/pbr/skills/plan/templates/planner-prompt.md.tmpl +1 -1
  113. package/plugins/pbr/skills/quick/SKILL.md +12 -10
  114. package/plugins/pbr/skills/resume/SKILL.md +11 -9
  115. package/plugins/pbr/skills/review/SKILL.md +35 -24
  116. package/plugins/pbr/skills/scan/SKILL.md +12 -10
  117. package/plugins/pbr/skills/setup/SKILL.md +30 -7
  118. package/plugins/pbr/skills/shared/error-reporting.md +2 -0
  119. package/plugins/pbr/skills/shared/universal-anti-patterns.md +10 -6
  120. package/plugins/pbr/skills/status/SKILL.md +8 -6
  121. package/plugins/pbr/skills/statusline/SKILL.md +12 -8
  122. package/plugins/pbr/skills/todo/SKILL.md +51 -28
@@ -12,9 +12,9 @@ argument-hint: "<phase-number> [--from <filepath>] [--skip-checker]"
12
12
  **Before ANY tool calls**, display this banner:
13
13
 
14
14
  ```
15
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
16
- PLAN-BUILD-RUN ► IMPORTING PLAN
17
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
15
+ ╔══════════════════════════════════════════════════════════════╗
16
+ PLAN-BUILD-RUN ► IMPORTING PLAN
17
+ ╚══════════════════════════════════════════════════════════════╝
18
18
  ```
19
19
 
20
20
  Then proceed to Step 1.
@@ -51,11 +51,12 @@ Reference: `skills/shared/config-loading.md` for the tooling shortcut and config
51
51
  1. Parse `$ARGUMENTS` for phase number
52
52
  2. Parse optional `--from <filepath>` flag (path to the external document to import)
53
53
  3. Parse optional `--skip-checker` flag (skip plan validation step)
54
- 4. Validate:
54
+ 4. **CRITICAL: Write .active-skill NOW.** Write the text "import" to `.planning/.active-skill` using the Write tool.
55
+ 5. Validate:
55
56
  - Phase exists in ROADMAP.md
56
57
  - Phase directory exists at `.planning/phases/{NN}-{slug}/`
57
- 5. If no phase number given, read current phase from `.planning/STATE.md`
58
- 6. Check for existing plans in the phase directory (glob for `*-PLAN.md`)
58
+ 6. If no phase number given, read current phase from `.planning/STATE.md`
59
+ 7. Check for existing plans in the phase directory (glob for `*-PLAN.md`)
59
60
  - If plans exist: ask user via AskUserQuestion: "Phase {N} already has plans. Replace them with imported plans?"
60
61
  - If yes: note that existing plans will be overwritten in Step 7
61
62
  - If no: stop
@@ -323,7 +324,7 @@ Follow the revision loop with:
323
324
 
324
325
  ### Step 7: Write PLAN.md Files (inline)
325
326
 
326
- Write each plan to `.planning/phases/{NN}-{slug}/{phase}-{plan_num}-PLAN.md`.
327
+ Write each plan to `.planning/phases/{NN}-{slug}/PLAN-{plan_num}.md`.
327
328
 
328
329
  If existing plans are being replaced (user confirmed in Step 1):
329
330
  - Delete existing `*-PLAN.md` files in the phase directory before writing new ones
@@ -381,14 +382,18 @@ docs({phase}): import plans for phase {N} ({count} plans, {wave_count} waves)
381
382
 
382
383
  ---
383
384
 
384
- ### Step 10: Confirm (inline)
385
+ ### Step 10: Cleanup
386
+
387
+ Delete `.planning/.active-skill` if it exists. This must happen on all paths (success, partial, and failure) before reporting results.
388
+
389
+ ### Step 11: Confirm (inline)
385
390
 
386
391
  Present a summary of the import using the branded banner:
387
392
 
388
393
  ```
389
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
390
- PLAN-BUILD-RUN ► IMPORT COMPLETE ✓
391
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
394
+ ╔══════════════════════════════════════════════════════════════╗
395
+ PLAN-BUILD-RUN ► IMPORT COMPLETE ✓
396
+ ╚══════════════════════════════════════════════════════════════╝
392
397
 
393
398
  **Phase {N}: {name}** — {plan_count} plans imported
394
399
 
@@ -407,9 +412,11 @@ Wave execution order:
407
412
  Must-haves coverage: {count} truths across {plan_count} plans
408
413
  Requirements traced: {count}/{total} REQ-IDs covered
409
414
 
410
- ───────────────────────────────────────────────────────────────
411
415
 
412
- ## ▶ Next Up
416
+
417
+ ╔══════════════════════════════════════════════════════════════╗
418
+ ║ ▶ NEXT UP ║
419
+ ╚══════════════════════════════════════════════════════════════╝
413
420
 
414
421
  **Build Phase {N}** — execute these imported plans
415
422
 
@@ -417,19 +424,21 @@ Requirements traced: {count}/{total} REQ-IDs covered
417
424
 
418
425
  <sub>`/clear` first → fresh context window</sub>
419
426
 
420
- ───────────────────────────────────────────────────────────────
427
+
421
428
 
422
429
  **Also available:**
423
430
  - `/pbr:plan {N}` — re-plan from scratch if import needs rework
424
431
  - `/pbr:discuss {N}` — talk through details before building
425
432
 
426
- ───────────────────────────────────────────────────────────────
433
+
427
434
  ```
428
435
 
429
436
  ---
430
437
 
431
438
  ## Error Handling
432
439
 
440
+ **IMPORTANT:** On ALL error exits below, delete `.planning/.active-skill` if it exists before displaying the error message.
441
+
433
442
  ### Phase not found
434
443
  If the specified phase does not exist in ROADMAP.md, display:
435
444
  ```
@@ -498,7 +507,7 @@ Present remaining issues and ask user to decide: proceed or intervene.
498
507
 
499
508
  | File | Purpose | When |
500
509
  |------|---------|------|
501
- | `.planning/phases/{NN}-{slug}/{phase}-{NN}-PLAN.md` | Imported plan files | Step 7 |
510
+ | `.planning/phases/{NN}-{slug}/PLAN-{NN}.md` | Imported plan files | Step 7 |
502
511
  | `.planning/ROADMAP.md` | Plans Complete + Status updated to `planned` | Step 8a |
503
512
  | `.planning/STATE.md` | Updated with plan status and import source | Step 8b |
504
513
  | `.planning/CONTEXT.md` | Updated if blockers surfaced new locked decisions | Step 8d |
@@ -4,6 +4,7 @@ description: "Manage milestones: new, complete, audit, gaps."
4
4
  allowed-tools: Read, Write, Bash, Glob, Grep, Task, AskUserQuestion
5
5
  argument-hint: "new|complete|audit|gaps [version]"
6
6
  ---
7
+ <!-- markdownlint-disable MD012 MD046 -->
7
8
 
8
9
  **STOP — DO NOT READ THIS FILE. You are already reading it. This prompt was injected into your context by Claude Code's plugin system. Using the Read tool on this SKILL.md file wastes ~7,600 tokens. Begin executing Step 1 immediately.**
9
10
 
@@ -12,9 +13,9 @@ argument-hint: "new|complete|audit|gaps [version]"
12
13
  **Before ANY tool calls**, display this banner:
13
14
 
14
15
  ```
15
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
16
- PLAN-BUILD-RUN ► MILESTONE
17
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
16
+ ╔══════════════════════════════════════════════════════════════╗
17
+ PLAN-BUILD-RUN ► MILESTONE
18
+ ╚══════════════════════════════════════════════════════════════╝
18
19
  ```
19
20
 
20
21
  Then proceed to Step 1.
@@ -159,9 +160,9 @@ Start a new milestone cycle with new phases.
159
160
 
160
161
  10. **Confirm** with branded output:
161
162
  ```
162
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
163
- PLAN-BUILD-RUN ► MILESTONE CREATED ✓
164
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
163
+ ╔══════════════════════════════════════════════════════════════╗
164
+ PLAN-BUILD-RUN ► MILESTONE CREATED ✓
165
+ ╚══════════════════════════════════════════════════════════════╝
165
166
 
166
167
  **Milestone: {name}** — {count} phases
167
168
 
@@ -170,9 +171,11 @@ Start a new milestone cycle with new phases.
170
171
  {N+1}. {name}
171
172
  ...
172
173
 
173
- ───────────────────────────────────────────────────────────────
174
174
 
175
- ## ▶ Next Up
175
+
176
+ ╔══════════════════════════════════════════════════════════════╗
177
+ ║ ▶ NEXT UP ║
178
+ ╚══════════════════════════════════════════════════════════════╝
176
179
 
177
180
  **Phase {N}: {name}** — start with discussion or planning
178
181
 
@@ -180,13 +183,13 @@ Start a new milestone cycle with new phases.
180
183
 
181
184
  <sub>`/clear` first → fresh context window</sub>
182
185
 
183
- ───────────────────────────────────────────────────────────────
186
+
184
187
 
185
188
  **Also available:**
186
189
  - `/pbr:plan {N}` — skip discussion, plan directly
187
190
  - `/pbr:status` — see project status
188
191
 
189
- ───────────────────────────────────────────────────────────────
192
+
190
193
  ```
191
194
 
192
195
  ---
@@ -263,14 +266,40 @@ Archive a completed milestone and prepare for the next one.
263
266
 
264
267
  5. **Archive milestone documents:**
265
268
 
269
+ **CRITICAL: Pre-flight safety checks BEFORE archiving. Do NOT skip this step.**
270
+
271
+ Before creating or moving anything, verify the destination is safe:
272
+ - Check if `.planning/milestones/{version}/` already exists
273
+ - If it exists AND contains files (phases/, STATS.md, etc.), STOP and display:
274
+ ```
275
+ ╔══════════════════════════════════════════════════════════════╗
276
+ ║ ERROR ║
277
+ ╚══════════════════════════════════════════════════════════════╝
278
+
279
+ Archive destination `.planning/milestones/{version}/` already contains files.
280
+ Completing this milestone would overwrite the existing archive.
281
+
282
+ **To fix:** Run `/pbr:health` or manually inspect `.planning/milestones/{version}/`.
283
+ Use a different version number (e.g., {version}.1) or remove the existing archive first.
284
+ ```
285
+ Ask the user via AskUserQuestion whether to use a different version or abort.
286
+ - Verify each source phase directory exists before attempting to move it
287
+ - If any source phase directory is missing, warn but continue with the phases that do exist
288
+
289
+ **CRITICAL: Create the archive directory .planning/milestones/{version}/ NOW. Do NOT skip this step.**
290
+
266
291
  Create a versioned archive directory and move phase directories into it:
267
292
  - `.planning/milestones/{version}/ROADMAP.md` — snapshot of ROADMAP.md at completion
268
- - `.planning/milestones/{version}/REQUIREMENTS.md` — snapshot of REQUIREMENTS.md
293
+ - `.planning/milestones/{version}/REQUIREMENTS.md` — **CRITICAL: Copy REQUIREMENTS.md to archive NOW. Do NOT skip this step.** Snapshot of REQUIREMENTS.md
269
294
  - `.planning/milestones/{version}/STATS.md` — milestone statistics
270
295
  - `.planning/milestones/{version}/phases/{NN}-{slug}/` — move each milestone phase directory from `.planning/phases/` into the archive
271
296
 
297
+ **CRITICAL: Move phase directories from .planning/phases/ to archive NOW. Do NOT skip this step.**
298
+
272
299
  **Move phases:** For each phase belonging to this milestone, move (not copy) its directory from `.planning/phases/{NN}-{slug}/` to `.planning/milestones/{version}/phases/{NN}-{slug}/`. This keeps the active phases directory clean for the next milestone.
273
300
 
301
+ **CRITICAL: Write STATS.md to .planning/milestones/{version}/STATS.md NOW. Do NOT skip this step.**
302
+
274
303
  **Stats file content:**
275
304
 
276
305
  Read `skills/milestone/templates/stats-file.md.tmpl` for the stats file format. Fill in all `{variable}` placeholders with actual data gathered in Steps 3-4.
@@ -290,6 +319,8 @@ Archive a completed milestone and prepare for the next one.
290
319
 
291
320
  - Move validated requirements from active to completed section
292
321
 
322
+ **CRITICAL: Update ROADMAP.md with collapsed milestone section NOW. Do NOT skip this step.**
323
+
293
324
  7. **Collapse completed phases in ROADMAP.md:**
294
325
  Replace detailed phase entries with collapsed summaries:
295
326
 
@@ -304,6 +335,8 @@ Archive a completed milestone and prepare for the next one.
304
335
  | {N+1}. {name} | Completed |
305
336
  ```
306
337
 
338
+ **CRITICAL: Update STATE.md to mark milestone as complete NOW. Do NOT skip this step.**
339
+
307
340
  7b. **Update STATE.md:**
308
341
  - Update `.planning/STATE.md` to mark the milestone as complete
309
342
  - Clear the current milestone field or set status to "completed"
@@ -334,9 +367,9 @@ Archive a completed milestone and prepare for the next one.
334
367
 
335
368
  10. **Confirm** with branded output:
336
369
  ```
337
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
338
- PLAN-BUILD-RUN ► MILESTONE COMPLETE 🎉
339
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
370
+ ╔══════════════════════════════════════════════════════════════╗
371
+ PLAN-BUILD-RUN ► MILESTONE COMPLETE 🎉
372
+ ╚══════════════════════════════════════════════════════════════╝
340
373
 
341
374
  **{version}**
342
375
 
@@ -348,9 +381,11 @@ Archive a completed milestone and prepare for the next one.
348
381
  Archived to: .planning/milestones/{version}/
349
382
  Git tag: {version}
350
383
 
351
- ───────────────────────────────────────────────────────────────
352
384
 
353
- ## ▶ Next Up
385
+
386
+ ╔══════════════════════════════════════════════════════════════╗
387
+ ║ ▶ NEXT UP ║
388
+ ╚══════════════════════════════════════════════════════════════╝
354
389
 
355
390
  **Start the next milestone** — plan new features
356
391
 
@@ -358,13 +393,13 @@ Archive a completed milestone and prepare for the next one.
358
393
 
359
394
  <sub>`/clear` first → fresh context window</sub>
360
395
 
361
- ───────────────────────────────────────────────────────────────
396
+
362
397
 
363
398
  **Also available:**
364
399
  - `/pbr:status` — see project status
365
400
  - `/pbr:help` — see all commands
366
401
 
367
- ───────────────────────────────────────────────────────────────
402
+
368
403
  ```
369
404
 
370
405
  ---
@@ -429,15 +464,17 @@ Verify milestone completion with cross-phase integration checks.
429
464
 
430
465
  **If PASSED:**
431
466
  ```
432
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
433
- PLAN-BUILD-RUN ► MILESTONE AUDIT PASSED ✓
434
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
467
+ ╔══════════════════════════════════════════════════════════════╗
468
+ PLAN-BUILD-RUN ► MILESTONE AUDIT PASSED ✓
469
+ ╚══════════════════════════════════════════════════════════════╝
435
470
 
436
471
  All phases verified, integration checks passed, requirements covered.
437
472
 
438
- ───────────────────────────────────────────────────────────────
439
473
 
440
- ## ▶ Next Up
474
+
475
+ ╔══════════════════════════════════════════════════════════════╗
476
+ ║ ▶ NEXT UP ║
477
+ ╚══════════════════════════════════════════════════════════════╝
441
478
 
442
479
  **Complete the milestone** — archive and tag
443
480
 
@@ -445,28 +482,30 @@ Verify milestone completion with cross-phase integration checks.
445
482
 
446
483
  <sub>`/clear` first → fresh context window</sub>
447
484
 
448
- ───────────────────────────────────────────────────────────────
485
+
449
486
 
450
487
  **Also available:**
451
488
  - `/pbr:milestone gaps` — address any minor issues first
452
489
  - `/pbr:status` — see project status
453
490
 
454
- ───────────────────────────────────────────────────────────────
491
+
455
492
  ```
456
493
 
457
494
  **If GAPS FOUND:**
458
495
  ```
459
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
460
- PLAN-BUILD-RUN ► MILESTONE AUDIT — GAPS FOUND ⚠
461
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
496
+ ╔══════════════════════════════════════════════════════════════╗
497
+ PLAN-BUILD-RUN ► MILESTONE AUDIT — GAPS FOUND ⚠
498
+ ╚══════════════════════════════════════════════════════════════╝
462
499
 
463
500
  Found {count} gaps:
464
501
  - {gap 1}
465
502
  - {gap 2}
466
503
 
467
- ───────────────────────────────────────────────────────────────
468
504
 
469
- ## ▶ Next Up
505
+
506
+ ╔══════════════════════════════════════════════════════════════╗
507
+ ║ ▶ NEXT UP ║
508
+ ╚══════════════════════════════════════════════════════════════╝
470
509
 
471
510
  **Close the gaps** — create fix phases
472
511
 
@@ -474,26 +513,28 @@ Verify milestone completion with cross-phase integration checks.
474
513
 
475
514
  <sub>`/clear` first → fresh context window</sub>
476
515
 
477
- ───────────────────────────────────────────────────────────────
516
+
478
517
 
479
518
  **Also available:**
480
519
  - `/pbr:milestone complete` — proceed despite gaps
481
520
  - `/pbr:status` — see project status
482
521
 
483
- ───────────────────────────────────────────────────────────────
522
+
484
523
  ```
485
524
 
486
525
  **If TECH DEBT:**
487
526
  ```
488
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
489
- PLAN-BUILD-RUN ► MILESTONE AUDIT — TECH DEBT ⚠
490
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
527
+ ╔══════════════════════════════════════════════════════════════╗
528
+ PLAN-BUILD-RUN ► MILESTONE AUDIT — TECH DEBT ⚠
529
+ ╚══════════════════════════════════════════════════════════════╝
491
530
 
492
531
  Milestone functional but has {count} tech debt items.
493
532
 
494
- ───────────────────────────────────────────────────────────────
495
533
 
496
- ## ▶ Next Up
534
+
535
+ ╔══════════════════════════════════════════════════════════════╗
536
+ ║ ▶ NEXT UP ║
537
+ ╚══════════════════════════════════════════════════════════════╝
497
538
 
498
539
  **Address tech debt or proceed**
499
540
 
@@ -502,7 +543,7 @@ Verify milestone completion with cross-phase integration checks.
502
543
 
503
544
  <sub>`/clear` first → fresh context window</sub>
504
545
 
505
- ───────────────────────────────────────────────────────────────
546
+
506
547
  ```
507
548
 
508
549
  ---
@@ -585,17 +626,19 @@ Create phases to close gaps found during an audit.
585
626
 
586
627
  9. **Confirm** with branded output:
587
628
  ```
588
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
589
- PLAN-BUILD-RUN ► GAP PHASES CREATED ✓
590
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
629
+ ╔══════════════════════════════════════════════════════════════╗
630
+ PLAN-BUILD-RUN ► GAP PHASES CREATED ✓
631
+ ╚══════════════════════════════════════════════════════════════╝
591
632
 
592
633
  Created {count} gap-closure phase(s):
593
634
  - Phase {N}: {name}
594
635
  - Phase {N+1}: {name}
595
636
 
596
- ───────────────────────────────────────────────────────────────
597
637
 
598
- ## ▶ Next Up
638
+
639
+ ╔══════════════════════════════════════════════════════════════╗
640
+ ║ ▶ NEXT UP ║
641
+ ╚══════════════════════════════════════════════════════════════╝
599
642
 
600
643
  **Plan the first gap-closure phase**
601
644
 
@@ -603,12 +646,12 @@ Create phases to close gaps found during an audit.
603
646
 
604
647
  <sub>`/clear` first → fresh context window</sub>
605
648
 
606
- ───────────────────────────────────────────────────────────────
649
+
607
650
 
608
651
  **Also available:**
609
652
  - `/pbr:status` — see project status
610
653
 
611
- ───────────────────────────────────────────────────────────────
654
+
612
655
  ```
613
656
 
614
657
  ---
@@ -12,9 +12,9 @@ argument-hint: "<text> | list | promote <index> [--global]"
12
12
  **Before ANY tool calls**, display this banner:
13
13
 
14
14
  ```
15
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
16
- PLAN-BUILD-RUN ► NOTE
17
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
15
+ ╔══════════════════════════════════════════════════════════════╗
16
+ PLAN-BUILD-RUN ► NOTE
17
+ ╚══════════════════════════════════════════════════════════════╝
18
18
  ```
19
19
 
20
20
  Then proceed to Step 1.
@@ -11,9 +11,9 @@ allowed-tools: Read, Write, Bash, Glob
11
11
  **Before ANY tool calls**, display this banner:
12
12
 
13
13
  ```
14
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
15
- PLAN-BUILD-RUN ► PAUSING SESSION
16
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
14
+ ╔══════════════════════════════════════════════════════════════╗
15
+ PLAN-BUILD-RUN ► PAUSING SESSION
16
+ ╚══════════════════════════════════════════════════════════════╝
17
17
  ```
18
18
 
19
19
  Then proceed to Step 1.
@@ -121,6 +121,8 @@ Determine the logical next action (same routing logic as `/pbr:status`):
121
121
 
122
122
  ### Step 4: Write .continue-here.md
123
123
 
124
+ **CRITICAL: Write pause state NOW before displaying confirmation. Do NOT skip this step.**
125
+
124
126
  Write the handoff file to the current phase directory:
125
127
 
126
128
  **Path:** `.planning/phases/{NN}-{phase-name}/.continue-here.md`
@@ -167,17 +169,19 @@ git commit -m "wip(planning): save session state — phase {N} plan {M}"
167
169
  Display branded confirmation:
168
170
 
169
171
  ```
170
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
171
- PLAN-BUILD-RUN ► SESSION SAVED ✓
172
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
172
+ ╔══════════════════════════════════════════════════════════════╗
173
+ PLAN-BUILD-RUN ► SESSION SAVED ✓
174
+ ╚══════════════════════════════════════════════════════════════╝
173
175
 
174
176
  Position: Phase {N} — {phase name}, Plan {M}
175
177
  Completed: {count} plans this session
176
178
  Remaining: {count} plans in this phase
177
179
 
178
- ───────────────────────────────────────────────────────────────
179
180
 
180
- ## ▶ Next Up
181
+
182
+ ╔══════════════════════════════════════════════════════════════╗
183
+ ║ ▶ NEXT UP ║
184
+ ╚══════════════════════════════════════════════════════════════╝
181
185
 
182
186
  **Resume in your next session**
183
187
 
@@ -185,7 +189,7 @@ Remaining: {count} plans in this phase
185
189
 
186
190
  <sub>`/clear` first → fresh context window</sub>
187
191
 
188
- ───────────────────────────────────────────────────────────────
192
+
189
193
  ```
190
194
 
191
195
  ---
@@ -24,9 +24,9 @@ Additionally for this skill:
24
24
  **Before ANY tool calls**, display this banner:
25
25
 
26
26
  ```
27
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
28
- PLAN-BUILD-RUN ► PLANNING PHASE {N}
29
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
27
+ ╔══════════════════════════════════════════════════════════════╗
28
+ PLAN-BUILD-RUN ► PLANNING PHASE {N}
29
+ ╚══════════════════════════════════════════════════════════════╝
30
30
  ```
31
31
 
32
32
  Where `{N}` is the phase number from `$ARGUMENTS`. Then proceed to Step 1.
@@ -116,6 +116,7 @@ Reference: `skills/shared/config-loading.md` for the tooling shortcut (`state lo
116
116
 
117
117
  1. Parse `$ARGUMENTS` for phase number and flags
118
118
  2. Read `.planning/config.json` for settings (see config-loading.md for field reference)
119
+ **CRITICAL: Write .active-skill NOW.** Write the text "plan" to `.planning/.active-skill` using the Write tool.
119
120
  3. Resolve depth profile: run `node ${CLAUDE_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.
120
121
  4. Validate:
121
122
  - Phase exists in ROADMAP.md
@@ -501,6 +502,8 @@ Use AskUserQuestion (pattern: approve-revise-abort from `skills/shared/gate-prom
501
502
 
502
503
  ### Subcommand: `add`
503
504
 
505
+ **CRITICAL: Write .active-skill NOW.** Write the text "plan" to `.planning/.active-skill` using the Write tool.
506
+
504
507
  1. Read `.planning/ROADMAP.md`
505
508
  2. Calculate next phase number (last phase + 1)
506
509
  3. Ask user: "What's the goal for this new phase?"
@@ -510,11 +513,14 @@ Use AskUserQuestion (pattern: approve-revise-abort from `skills/shared/gate-prom
510
513
  7. Create phase directory: `.planning/phases/{NN}-{slug}/`
511
514
  8. Update STATE.md if needed
512
515
  9. Suggest: `/pbr:plan {N}` to plan the new phase
516
+ 10. Delete `.planning/.active-skill` if it exists.
513
517
 
514
518
  ### Subcommand: `insert <N>`
515
519
 
516
520
  Reference: `skills/plan/decimal-phase-calc.md` for decimal numbering rules.
517
521
 
522
+ **CRITICAL: Write .active-skill NOW.** Write the text "plan" to `.planning/.active-skill` using the Write tool.
523
+
518
524
  1. Read `.planning/ROADMAP.md`
519
525
  2. Calculate decimal phase number:
520
526
  - If inserting at position 3: becomes 3.1
@@ -525,6 +531,7 @@ Reference: `skills/plan/decimal-phase-calc.md` for decimal numbering rules.
525
531
  5. Create phase directory: `.planning/phases/{NN.M}-{slug}/`
526
532
  6. Update dependencies of subsequent phases if affected
527
533
  7. Suggest: `/pbr:plan {N.M}` to plan the new phase
534
+ 8. Delete `.planning/.active-skill` if it exists.
528
535
 
529
536
  ### Subcommand: `remove <N>`
530
537
 
@@ -533,13 +540,15 @@ Reference: `skills/plan/decimal-phase-calc.md` for decimal numbering rules.
533
540
  - Phase must exist
534
541
  - Phase must be in `pending` or `not started` status (cannot remove completed/in-progress phases)
535
542
  - No other phases depend on this phase (or user confirms breaking dependencies)
536
- 3. Confirm with user: "Remove Phase {N}: {name}? This will delete the phase directory and renumber subsequent phases."
537
- 4. If confirmed:
543
+ 3. **CRITICAL: Write .active-skill NOW.** Write the text "plan" to `.planning/.active-skill` using the Write tool.
544
+ 4. Confirm with user: "Remove Phase {N}: {name}? This will delete the phase directory and renumber subsequent phases."
545
+ 5. If confirmed:
538
546
  - Delete `.planning/phases/{NN}-{slug}/` directory
539
547
  - Remove phase from ROADMAP.md
540
548
  - Renumber subsequent phases (N+1 becomes N, etc.)
541
549
  - Update all `depends_on` references in ROADMAP.md
542
550
  - Update STATE.md if needed
551
+ 6. Delete `.planning/.active-skill` if it exists.
543
552
 
544
553
  ---
545
554
 
@@ -635,13 +644,17 @@ Present remaining issues and ask user to decide: proceed or intervene.
635
644
  | File | Purpose | When |
636
645
  |------|---------|------|
637
646
  | `.planning/phases/{NN}-{slug}/RESEARCH.md` | Phase-specific research | Step 4 |
638
- | `.planning/phases/{NN}-{slug}/{phase}-{NN}-PLAN.md` | Executable plan files | Step 5 |
647
+ | `.planning/phases/{NN}-{slug}/PLAN-{NN}.md` | Executable plan files | Step 5 |
639
648
  | `.planning/CONTEXT.md` | Updated with assumptions | Step 3 (--assumptions) |
640
649
  | `.planning/ROADMAP.md` | Plans Complete + Status → `planned`; updated for add/insert/remove | Step 8, Subcommands |
641
650
  | `.planning/STATE.md` | Updated with plan status | Step 8 |
642
651
 
643
652
  ---
644
653
 
654
+ ## Cleanup
655
+
656
+ Delete `.planning/.active-skill` if it exists. This must happen on all paths (success, partial, and failure) before reporting results.
657
+
645
658
  ## Completion
646
659
 
647
660
  After planning completes, present:
@@ -649,9 +662,9 @@ After planning completes, present:
649
662
  Use the branded stage banner from `references/ui-formatting.md`:
650
663
 
651
664
  ```
652
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
653
- PLAN-BUILD-RUN ► PLANNING PHASE {N} ✓
654
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
665
+ ╔══════════════════════════════════════════════════════════════╗
666
+ PLAN-BUILD-RUN ► PLANNING PHASE {N} ✓
667
+ ╚══════════════════════════════════════════════════════════════╝
655
668
 
656
669
  **Phase {N}: {name}** — {plan_count} plans created
657
670
 
@@ -667,9 +680,11 @@ Wave execution:
667
680
 
668
681
  Then use the "Next Up" routing block:
669
682
  ```
670
- ───────────────────────────────────────────────────────────────
671
683
 
672
- ## ▶ Next Up
684
+
685
+ ╔══════════════════════════════════════════════════════════════╗
686
+ ║ ▶ NEXT UP ║
687
+ ╚══════════════════════════════════════════════════════════════╝
673
688
 
674
689
  **Build Phase {N}** — execute these plans
675
690
 
@@ -677,11 +692,11 @@ Then use the "Next Up" routing block:
677
692
 
678
693
  <sub>/clear first → fresh context window</sub>
679
694
 
680
- ───────────────────────────────────────────────────────────────
695
+
681
696
 
682
697
  **Also available:**
683
698
  - /pbr:plan {N} --assumptions — review assumptions first
684
699
  - /pbr:discuss {N} — talk through details before building
685
700
 
686
- ───────────────────────────────────────────────────────────────
701
+
687
702
  ```
@@ -31,7 +31,7 @@ Key rules:
31
31
  4. Every task needs all 5 elements: name, files, action, verify, done
32
32
  5. Honor all locked decisions from CONTEXT.md
33
33
  6. Do NOT include deferred ideas
34
- 7. Write plan files to: .planning/phases/{NN}-{slug}/{phase}-{plan_num}-PLAN.md
34
+ 7. Write plan files to: .planning/phases/{NN}-{slug}/PLAN-{plan_num}.md
35
35
  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
36
36
 
37
37
  Use the Write tool to create each plan file.