@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.
Files changed (128) hide show
  1. package/CHANGELOG.md +44 -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/pbr-rules.md +1 -0
  14. package/plugins/copilot-pbr/references/pbr-tools-cli.md +285 -0
  15. package/plugins/copilot-pbr/references/ui-formatting.md +38 -56
  16. package/plugins/copilot-pbr/skills/begin/SKILL.md +30 -7
  17. package/plugins/copilot-pbr/skills/build/SKILL.md +28 -31
  18. package/plugins/copilot-pbr/skills/config/SKILL.md +9 -12
  19. package/plugins/copilot-pbr/skills/continue/SKILL.md +6 -6
  20. package/plugins/copilot-pbr/skills/dashboard/SKILL.md +12 -0
  21. package/plugins/copilot-pbr/skills/debug/SKILL.md +23 -26
  22. package/plugins/copilot-pbr/skills/discuss/SKILL.md +20 -10
  23. package/plugins/copilot-pbr/skills/do/SKILL.md +3 -3
  24. package/plugins/copilot-pbr/skills/explore/SKILL.md +11 -14
  25. package/plugins/copilot-pbr/skills/health/SKILL.md +75 -19
  26. package/plugins/copilot-pbr/skills/help/SKILL.md +6 -6
  27. package/plugins/copilot-pbr/skills/import/SKILL.md +22 -18
  28. package/plugins/copilot-pbr/skills/milestone/SKILL.md +90 -48
  29. package/plugins/copilot-pbr/skills/note/SKILL.md +3 -3
  30. package/plugins/copilot-pbr/skills/pause/SKILL.md +11 -10
  31. package/plugins/copilot-pbr/skills/plan/SKILL.md +22 -9
  32. package/plugins/copilot-pbr/skills/plan/templates/planner-prompt.md.tmpl +1 -1
  33. package/plugins/copilot-pbr/skills/quick/SKILL.md +9 -12
  34. package/plugins/copilot-pbr/skills/resume/SKILL.md +9 -9
  35. package/plugins/copilot-pbr/skills/review/SKILL.md +17 -12
  36. package/plugins/copilot-pbr/skills/scan/SKILL.md +9 -11
  37. package/plugins/copilot-pbr/skills/setup/SKILL.md +54 -8
  38. package/plugins/copilot-pbr/skills/shared/error-reporting.md +2 -1
  39. package/plugins/copilot-pbr/skills/shared/progress-display.md +0 -1
  40. package/plugins/copilot-pbr/skills/shared/universal-anti-patterns.md +10 -6
  41. package/plugins/copilot-pbr/skills/status/SKILL.md +3 -3
  42. package/plugins/copilot-pbr/skills/statusline/SKILL.md +12 -8
  43. package/plugins/copilot-pbr/skills/todo/SKILL.md +51 -28
  44. package/plugins/cursor-pbr/.cursor-plugin/plugin.json +1 -1
  45. package/plugins/cursor-pbr/agents/codebase-mapper.md +42 -0
  46. package/plugins/cursor-pbr/agents/debugger.md +4 -1
  47. package/plugins/cursor-pbr/agents/executor.md +31 -1
  48. package/plugins/cursor-pbr/agents/integration-checker.md +33 -2
  49. package/plugins/cursor-pbr/agents/planner.md +58 -1
  50. package/plugins/cursor-pbr/agents/researcher.md +23 -0
  51. package/plugins/cursor-pbr/agents/synthesizer.md +24 -0
  52. package/plugins/cursor-pbr/agents/verifier.md +35 -1
  53. package/plugins/cursor-pbr/references/agent-contracts.md +297 -0
  54. package/plugins/cursor-pbr/references/pbr-rules.md +1 -0
  55. package/plugins/cursor-pbr/references/pbr-tools-cli.md +285 -0
  56. package/plugins/cursor-pbr/references/ui-formatting.md +38 -56
  57. package/plugins/cursor-pbr/skills/begin/SKILL.md +30 -7
  58. package/plugins/cursor-pbr/skills/build/SKILL.md +28 -31
  59. package/plugins/cursor-pbr/skills/config/SKILL.md +9 -10
  60. package/plugins/cursor-pbr/skills/continue/SKILL.md +6 -6
  61. package/plugins/cursor-pbr/skills/dashboard/SKILL.md +12 -0
  62. package/plugins/cursor-pbr/skills/debug/SKILL.md +23 -23
  63. package/plugins/cursor-pbr/skills/discuss/SKILL.md +20 -10
  64. package/plugins/cursor-pbr/skills/do/SKILL.md +3 -3
  65. package/plugins/cursor-pbr/skills/explore/SKILL.md +11 -12
  66. package/plugins/cursor-pbr/skills/health/SKILL.md +75 -19
  67. package/plugins/cursor-pbr/skills/help/SKILL.md +6 -6
  68. package/plugins/cursor-pbr/skills/import/SKILL.md +22 -16
  69. package/plugins/cursor-pbr/skills/milestone/SKILL.md +90 -48
  70. package/plugins/cursor-pbr/skills/note/SKILL.md +3 -3
  71. package/plugins/cursor-pbr/skills/pause/SKILL.md +11 -9
  72. package/plugins/cursor-pbr/skills/plan/SKILL.md +22 -9
  73. package/plugins/cursor-pbr/skills/plan/templates/planner-prompt.md.tmpl +1 -1
  74. package/plugins/cursor-pbr/skills/quick/SKILL.md +9 -12
  75. package/plugins/cursor-pbr/skills/resume/SKILL.md +9 -9
  76. package/plugins/cursor-pbr/skills/review/SKILL.md +17 -12
  77. package/plugins/cursor-pbr/skills/scan/SKILL.md +9 -10
  78. package/plugins/cursor-pbr/skills/setup/SKILL.md +54 -8
  79. package/plugins/cursor-pbr/skills/shared/error-reporting.md +2 -1
  80. package/plugins/cursor-pbr/skills/shared/progress-display.md +0 -1
  81. package/plugins/cursor-pbr/skills/shared/universal-anti-patterns.md +10 -6
  82. package/plugins/cursor-pbr/skills/status/SKILL.md +3 -3
  83. package/plugins/cursor-pbr/skills/statusline/SKILL.md +12 -8
  84. package/plugins/cursor-pbr/skills/todo/SKILL.md +51 -28
  85. package/plugins/pbr/.claude-plugin/plugin.json +1 -1
  86. package/plugins/pbr/agents/codebase-mapper.md +42 -0
  87. package/plugins/pbr/agents/debugger.md +4 -1
  88. package/plugins/pbr/agents/executor.md +31 -1
  89. package/plugins/pbr/agents/integration-checker.md +34 -2
  90. package/plugins/pbr/agents/planner.md +58 -1
  91. package/plugins/pbr/agents/researcher.md +23 -0
  92. package/plugins/pbr/agents/synthesizer.md +24 -0
  93. package/plugins/pbr/agents/verifier.md +36 -1
  94. package/plugins/pbr/references/agent-contracts.md +297 -0
  95. package/plugins/pbr/references/pbr-rules.md +1 -0
  96. package/plugins/pbr/references/pbr-tools-cli.md +285 -0
  97. package/plugins/pbr/references/ui-formatting.md +37 -54
  98. package/plugins/pbr/scripts/check-skill-workflow.js +11 -0
  99. package/plugins/pbr/scripts/check-state-sync.js +58 -0
  100. package/plugins/pbr/scripts/check-subagent-output.js +43 -4
  101. package/plugins/pbr/scripts/validate-task.js +69 -17
  102. package/plugins/pbr/skills/begin/SKILL.md +36 -11
  103. package/plugins/pbr/skills/build/SKILL.md +37 -25
  104. package/plugins/pbr/skills/config/SKILL.md +12 -10
  105. package/plugins/pbr/skills/continue/SKILL.md +11 -9
  106. package/plugins/pbr/skills/dashboard/SKILL.md +12 -0
  107. package/plugins/pbr/skills/debug/SKILL.md +29 -23
  108. package/plugins/pbr/skills/discuss/SKILL.md +20 -10
  109. package/plugins/pbr/skills/do/SKILL.md +3 -3
  110. package/plugins/pbr/skills/explore/SKILL.md +14 -12
  111. package/plugins/pbr/skills/health/SKILL.md +76 -20
  112. package/plugins/pbr/skills/help/SKILL.md +8 -6
  113. package/plugins/pbr/skills/import/SKILL.md +25 -16
  114. package/plugins/pbr/skills/milestone/SKILL.md +88 -45
  115. package/plugins/pbr/skills/note/SKILL.md +3 -3
  116. package/plugins/pbr/skills/pause/SKILL.md +13 -9
  117. package/plugins/pbr/skills/plan/SKILL.md +28 -13
  118. package/plugins/pbr/skills/plan/templates/planner-prompt.md.tmpl +1 -1
  119. package/plugins/pbr/skills/quick/SKILL.md +12 -10
  120. package/plugins/pbr/skills/resume/SKILL.md +11 -9
  121. package/plugins/pbr/skills/review/SKILL.md +35 -24
  122. package/plugins/pbr/skills/scan/SKILL.md +12 -10
  123. package/plugins/pbr/skills/setup/SKILL.md +53 -7
  124. package/plugins/pbr/skills/shared/error-reporting.md +2 -0
  125. package/plugins/pbr/skills/shared/universal-anti-patterns.md +10 -6
  126. package/plugins/pbr/skills/status/SKILL.md +8 -6
  127. package/plugins/pbr/skills/statusline/SKILL.md +12 -8
  128. package/plugins/pbr/skills/todo/SKILL.md +51 -28
@@ -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.
@@ -19,9 +19,9 @@ This skill **spawns a single Task(subagent_type: "pbr:executor")** for execution
19
19
  **Before ANY tool calls**, display this banner:
20
20
 
21
21
  ```
22
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
23
- PLAN-BUILD-RUN ► QUICK TASK
24
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
22
+ ╔══════════════════════════════════════════════════════════════╗
23
+ PLAN-BUILD-RUN ► QUICK TASK
24
+ ╚══════════════════════════════════════════════════════════════╝
25
25
  ```
26
26
 
27
27
  Then proceed to Step 1.
@@ -250,17 +250,19 @@ Display results to the user with branded output:
250
250
 
251
251
  **If completed:**
252
252
  ```
253
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
254
- PLAN-BUILD-RUN ► QUICK TASK COMPLETE ✓
255
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
253
+ ╔══════════════════════════════════════════════════════════════╗
254
+ PLAN-BUILD-RUN ► QUICK TASK COMPLETE ✓
255
+ ╚══════════════════════════════════════════════════════════════╝
256
256
 
257
257
  **Quick Task {NNN}:** {description}
258
258
  Commit: {hash} — {commit message}
259
259
  Files: {list of files changed}
260
260
 
261
- ───────────────────────────────────────────────────────────────
262
261
 
263
- ## ▶ Next Up
262
+
263
+ ╔══════════════════════════════════════════════════════════════╗
264
+ ║ ▶ NEXT UP ║
265
+ ╚══════════════════════════════════════════════════════════════╝
264
266
 
265
267
  **Continue your workflow** — task complete
266
268
 
@@ -268,13 +270,13 @@ Files: {list of files changed}
268
270
 
269
271
  <sub>`/clear` first → fresh context window</sub>
270
272
 
271
- ───────────────────────────────────────────────────────────────
273
+
272
274
 
273
275
  **Also available:**
274
276
  - `/pbr:continue` — execute next logical step
275
277
  - `/pbr:todo list` — see pending todos
276
278
 
277
- ───────────────────────────────────────────────────────────────
279
+
278
280
  ```
279
281
 
280
282
  **If partial:**
@@ -11,9 +11,9 @@ allowed-tools: Read, Write, Bash, Glob, Grep, AskUserQuestion
11
11
  **Before ANY tool calls**, display this banner:
12
12
 
13
13
  ```
14
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
15
- PLAN-BUILD-RUN ► RESUMING SESSION
16
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
14
+ ╔══════════════════════════════════════════════════════════════╗
15
+ PLAN-BUILD-RUN ► RESUMING SESSION
16
+ ╚══════════════════════════════════════════════════════════════╝
17
17
  ```
18
18
 
19
19
  Then proceed to Step 1.
@@ -147,9 +147,9 @@ Use the selected pause point for the rest of the resume flow.
147
147
  3. Display the resume context using the branded banner:
148
148
 
149
149
  ```
150
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
151
- PLAN-BUILD-RUN ► SESSION RESTORED ✓
152
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
150
+ ╔══════════════════════════════════════════════════════════════╗
151
+ PLAN-BUILD-RUN ► SESSION RESTORED ✓
152
+ ╚══════════════════════════════════════════════════════════════╝
153
153
 
154
154
  Resuming session from {pause date}
155
155
 
@@ -182,9 +182,11 @@ Blockers:
182
182
 
183
183
  **If only one clear next action exists**, present it with branded routing:
184
184
  ```
185
- ───────────────────────────────────────────────────────────────
186
185
 
187
- ## ▶ Next Up
186
+
187
+ ╔══════════════════════════════════════════════════════════════╗
188
+ ║ ▶ NEXT UP ║
189
+ ╚══════════════════════════════════════════════════════════════╝
188
190
 
189
191
  **{explanation from continue-here}**
190
192
 
@@ -192,7 +194,7 @@ Blockers:
192
194
 
193
195
  <sub>`/clear` first → fresh context window</sub>
194
196
 
195
- ───────────────────────────────────────────────────────────────
197
+
196
198
  ```
197
199
 
198
200
  **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`):