@sienklogic/plan-build-run 2.47.0 → 2.48.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.
@@ -784,58 +784,8 @@ Tags (complete only):
784
784
 
785
785
  ## Edge Cases
786
786
 
787
- ### No ROADMAP.md exists
788
- - For `new`: Create one from scratch (this is a fresh start)
789
- - For others, display:
790
- ```
791
- ╔══════════════════════════════════════════════════════════════╗
792
- ║ ERROR ║
793
- ╚══════════════════════════════════════════════════════════════╝
794
-
795
- No roadmap found.
796
-
797
- **To fix:** Run `/pbr:begin` or `/pbr:milestone new` first.
798
- ```
799
-
800
- ### Milestone has no phases
801
- Display:
802
- ```
803
- ╔══════════════════════════════════════════════════════════════╗
804
- ║ ERROR ║
805
- ╚══════════════════════════════════════════════════════════════╝
806
-
807
- No phases found for this milestone.
808
-
809
- **To fix:**
810
- - For `complete`: Nothing to complete — add phases first.
811
- - For `audit`: Nothing to audit — build phases first.
812
- ```
813
-
814
- ### Audit finds no gaps
815
- - Status: PASSED
816
- - Skip the recommendations section
817
- - Suggest proceeding to complete
818
-
819
- ### Version already exists (tag collision)
820
- Display:
821
- ```
822
- ╔══════════════════════════════════════════════════════════════╗
823
- ║ ERROR ║
824
- ╚══════════════════════════════════════════════════════════════╝
825
-
826
- Git tag {version} already exists.
827
-
828
- **To fix:** Use a different version number (e.g., {version}.1).
829
- ```
830
- Ask for alternative via AskUserQuestion.
831
-
832
- ### Partially verified milestone
833
- - `complete` warns but allows proceeding with user confirmation
834
- - `audit` treats unverified phases as gaps
835
-
836
- ### Large milestone (8+ phases)
837
- - `audit` may take longer due to integration checking
838
- - Warn: "This milestone has {count} phases. The audit may take a few minutes."
787
+ For all edge case handling, see `skills/milestone/templates/edge-cases.md`.
788
+ Key scenarios: no ROADMAP.md, no phases, no gaps found, version collision, partially verified, large milestone (8+ phases).
839
789
 
840
790
  ---
841
791
 
@@ -0,0 +1,54 @@
1
+ # Milestone Edge Cases
2
+
3
+ ## No ROADMAP.md exists
4
+ - For `new`: Create one from scratch (this is a fresh start)
5
+ - For others, display:
6
+ ```
7
+ ╔══════════════════════════════════════════════════════════════╗
8
+ ║ ERROR ║
9
+ ╚══════════════════════════════════════════════════════════════╝
10
+
11
+ No roadmap found.
12
+
13
+ **To fix:** Run `/pbr:begin` or `/pbr:milestone new` first.
14
+ ```
15
+
16
+ ## Milestone has no phases
17
+ Display:
18
+ ```
19
+ ╔══════════════════════════════════════════════════════════════╗
20
+ ║ ERROR ║
21
+ ╚══════════════════════════════════════════════════════════════╝
22
+
23
+ No phases found for this milestone.
24
+
25
+ **To fix:**
26
+ - For `complete`: Nothing to complete — add phases first.
27
+ - For `audit`: Nothing to audit — build phases first.
28
+ ```
29
+
30
+ ## Audit finds no gaps
31
+ - Status: PASSED
32
+ - Skip the recommendations section
33
+ - Suggest proceeding to complete
34
+
35
+ ## Version already exists (tag collision)
36
+ Display:
37
+ ```
38
+ ╔══════════════════════════════════════════════════════════════╗
39
+ ║ ERROR ║
40
+ ╚══════════════════════════════════════════════════════════════╝
41
+
42
+ Git tag {version} already exists.
43
+
44
+ **To fix:** Use a different version number (e.g., {version}.1).
45
+ ```
46
+ Ask for alternative via AskUserQuestion.
47
+
48
+ ## Partially verified milestone
49
+ - `complete` warns but allows proceeding with user confirmation
50
+ - `audit` treats unverified phases as gaps
51
+
52
+ ## Large milestone (8+ phases)
53
+ - `audit` may take longer due to integration checking
54
+ - Warn: "This milestone has {count} phases. The audit may take a few minutes."
@@ -256,13 +256,13 @@ After the researcher completes, check the Task() output for a completion marker:
256
256
 
257
257
  Before spawning the planner, scan `.planning/seeds/` for seeds whose trigger matches the current phase:
258
258
 
259
- 1. Glob for `.planning/seeds/*.md`
260
- 2. For each seed file, read its frontmatter and check the `trigger` field
261
- 3. A seed matches if ANY of these are true:
262
- - `trigger` equals the phase slug (e.g., `trigger: authentication`) — **preferred**
263
- - `trigger` is a substring of the phase directory name (e.g., `trigger: auth` matches `03-authentication`)
264
- - `trigger` equals the current phase number as integer (e.g., `trigger: 3`) — backward compatible but NOT recommended for new seeds (breaks with decimal phases like 3.1)
265
- - `trigger` equals `*` (always matches)
259
+ 1. Run seed matcher CLI:
260
+ ```bash
261
+ node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js seeds match {phase-slug} {phase-number}
262
+ ```
263
+ Returns `{ matched: [{ name, description, trigger, path }] }`.
264
+ 2. If `matched` is empty: proceed silently.
265
+ 3. If `matched` is non-empty: present to user (see step 4 below).
266
266
  4. If matching seeds are found, present them to the user:
267
267
  ```
268
268
  Found {N} seeds related to Phase {NN}:
@@ -649,28 +649,10 @@ Read `skills/plan/templates/gap-closure-prompt.md.tmpl` and use it as the prompt
649
649
  ## Error Handling
650
650
 
651
651
  ### Phase not found
652
- If the specified phase doesn't exist in ROADMAP.md, display:
653
- ```
654
- ╔══════════════════════════════════════════════════════════════╗
655
- ║ ERROR ║
656
- ╚══════════════════════════════════════════════════════════════╝
657
-
658
- Phase {N} not found in ROADMAP.md.
659
-
660
- **To fix:** Run `/pbr:status` to see available phases.
661
- ```
652
+ If the specified phase doesn't exist in ROADMAP.md, display a branded error box — see `skills/shared/error-reporting.md`, pattern: Phase not found.
662
653
 
663
654
  ### Missing prerequisites
664
- If REQUIREMENTS.md or ROADMAP.md don't exist, display:
665
- ```
666
- ╔══════════════════════════════════════════════════════════════╗
667
- ║ ERROR ║
668
- ╚══════════════════════════════════════════════════════════════╝
669
-
670
- Project not initialized. Missing REQUIREMENTS.md or ROADMAP.md.
671
-
672
- **To fix:** Run `/pbr:begin` first.
673
- ```
655
+ If REQUIREMENTS.md or ROADMAP.md don't exist, display a branded error box — see `skills/shared/error-reporting.md`, pattern: Missing prerequisites.
674
656
 
675
657
  ### Research agent fails
676
658
  If the researcher Task() fails, display:
@@ -681,33 +663,10 @@ If the researcher Task() fails, display:
681
663
  Continue to the planning step.
682
664
 
683
665
  ### Planner agent fails
684
- If the planner Task() fails, display:
685
- ```
686
- ╔══════════════════════════════════════════════════════════════╗
687
- ║ ERROR ║
688
- ╚══════════════════════════════════════════════════════════════╝
689
-
690
- Planner agent failed for Phase {N}.
691
-
692
- **To fix:**
693
- - Try again with `/pbr:plan {N} --skip-research`
694
- - Check `.planning/CONTEXT.md` for conflicting constraints
695
- ```
666
+ If the planner Task() fails, display a branded error box — see `skills/shared/error-reporting.md`, pattern: Planner agent failure.
696
667
 
697
668
  ### Checker loops forever
698
- After 3 revision iterations without passing, display:
699
- ```
700
- ╔══════════════════════════════════════════════════════════════╗
701
- ║ ERROR ║
702
- ╚══════════════════════════════════════════════════════════════╝
703
-
704
- Plan checker failed to pass after 3 revision iterations for Phase {N}.
705
-
706
- **To fix:**
707
- - Review the remaining issues below and decide whether to proceed or revise manually
708
- - Run `/pbr:plan {N}` to restart planning from scratch
709
- ```
710
-
669
+ After 3 revision iterations without passing, display a branded error box — see `skills/shared/error-reporting.md`, pattern: Checker loops.
711
670
  Present remaining issues and ask user to decide: proceed or intervene.
712
671
 
713
672
  ---
@@ -732,44 +691,5 @@ Delete `.planning/.active-skill` if it exists. This must happen on all paths (su
732
691
 
733
692
  After planning completes, present:
734
693
 
735
- Use the branded stage banner from `references/ui-formatting.md`:
736
-
737
- ```
738
- ╔══════════════════════════════════════════════════════════════╗
739
- ║ PLAN-BUILD-RUN ► PLANNING PHASE {N} ✓ ║
740
- ╚══════════════════════════════════════════════════════════════╝
741
-
742
- **Phase {N}: {name}** — {plan_count} plans created
743
-
744
- Plans:
745
- {phase}-01: {name} (Wave 1, {task_count} tasks)
746
- {phase}-02: {name} (Wave 1, {task_count} tasks)
747
- {phase}-03: {name} (Wave 2, {task_count} tasks)
748
-
749
- Wave execution:
750
- Wave 1: Plans 01, 02 (parallel)
751
- Wave 2: Plan 03
752
- ```
753
-
754
- Then use the "Next Up" routing block:
755
- ```
756
-
757
-
758
- ╔══════════════════════════════════════════════════════════════╗
759
- ║ ▶ NEXT UP ║
760
- ╚══════════════════════════════════════════════════════════════╝
761
-
762
- **Build Phase {N}** — execute these plans
763
-
764
- /pbr:build {N}
765
-
766
- <sub>/clear first → fresh context window</sub>
767
-
768
-
769
-
770
- **Also available:**
771
- - /pbr:plan {N} --assumptions — review assumptions first
772
- - /pbr:discuss {N} — talk through details before building
773
-
774
-
775
- ```
694
+ Use the branded stage banner and next-up block from `skills/plan/templates/completion-output.md.tmpl`.
695
+ Fill in: `{N}` (phase number), `{phase-name}`, `{plan_count}`, `{plan_list_lines}` (one line per plan with wave and task count), `{wave_table_lines}` (one line per wave).
@@ -0,0 +1,27 @@
1
+ ╔══════════════════════════════════════════════════════════════╗
2
+ ║ PLAN-BUILD-RUN ► PLANNING PHASE {N} ✓ ║
3
+ ╚══════════════════════════════════════════════════════════════╝
4
+
5
+ **Phase {N}: {phase-name}** — {plan_count} plans created
6
+
7
+ Plans:
8
+ {plan_list_lines}
9
+
10
+ Wave execution:
11
+ {wave_table_lines}
12
+
13
+ ---
14
+
15
+ ╔══════════════════════════════════════════════════════════════╗
16
+ ║ ▶ NEXT UP ║
17
+ ╚══════════════════════════════════════════════════════════════╝
18
+
19
+ **Build Phase {N}** — execute these plans
20
+
21
+ /pbr:build {N}
22
+
23
+ <sub>/clear first → fresh context window</sub>
24
+
25
+ **Also available:**
26
+ - /pbr:plan {N} --assumptions — review assumptions first
27
+ - /pbr:discuss {N} — talk through details before building
@@ -0,0 +1,59 @@
1
+ # Error Reporting — Standard Format
2
+
3
+ Use the branded error box for all blocking errors. Present the box, explain what happened, and give a specific fix action.
4
+
5
+ ## Error Box Format
6
+
7
+ ```
8
+ ╔══════════════════════════════════════════════════════════════╗
9
+ ║ ERROR ║
10
+ ╚══════════════════════════════════════════════════════════════╝
11
+
12
+ {one-line description of what went wrong}
13
+
14
+ **To fix:** {specific action the user should take}
15
+ ```
16
+
17
+ ## Warning Format (non-blocking)
18
+
19
+ ```
20
+ ⚠ {one-line warning}
21
+ {optional detail or suggestion}
22
+ ```
23
+ Continue execution after showing a warning.
24
+
25
+ ## Common Error Patterns
26
+
27
+ ### Phase not found
28
+ Message: "Phase {N} not found in ROADMAP.md."
29
+ Fix: "Run `/pbr:status` to see available phases."
30
+
31
+ ### Missing prerequisites (no REQUIREMENTS.md or ROADMAP.md)
32
+ Message: "Project not initialized. Missing REQUIREMENTS.md or ROADMAP.md."
33
+ Fix: "Run `/pbr:begin` first."
34
+
35
+ ### No plans found for phase
36
+ Message: "Phase {N} has no plans."
37
+ Fix: "Run `/pbr:plan {N}` first."
38
+
39
+ ### Dependency phase not complete
40
+ Message: "Phase {N} depends on Phase {M}, which is not complete."
41
+ Fix: "Build Phase {M} first with `/pbr:build {M}`."
42
+
43
+ ### Planner agent failure
44
+ Message: "Planner agent failed for Phase {N}."
45
+ Fix: "Try again with `/pbr:plan {N} --skip-research`. Check `.planning/CONTEXT.md` for conflicting constraints."
46
+
47
+ ### Checker loops (3+ iterations without pass)
48
+ Message: "Plan checker failed to pass after 3 revision iterations for Phase {N}."
49
+ Fix: "Review the remaining issues below and decide whether to proceed or revise manually. Run `/pbr:plan {N}` to restart planning from scratch."
50
+ After displaying: present remaining issues and ask user to decide (proceed or intervene).
51
+
52
+ ### Research agent failure
53
+ Display as WARNING (non-blocking): "Research agent failed. Planning without phase-specific research. This may result in less accurate plans."
54
+ Continue to the planning step.
55
+
56
+ ## Usage
57
+
58
+ In skill files, replace repeated error box content with:
59
+ "Display a branded error box — use the format from `skills/shared/error-reporting.md`, pattern: {pattern name}."