@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
@@ -0,0 +1,297 @@
1
+ # Agent Contracts
2
+
3
+ Input/output schemas for agent-to-agent handoffs in Plan-Build-Run.
4
+
5
+ Each contract defines: the file exchanged, required frontmatter fields, body structure, and special handling notes. Agents MUST produce output matching these schemas — consumers depend on them.
6
+
7
+ ---
8
+
9
+ ## Contract: Researcher -> Synthesizer
10
+
11
+ **File**: `.planning/research/{topic-slug}.md` (project) or `.planning/phases/{NN}-{slug}/RESEARCH.md` (phase)
12
+ **Direction**: Researcher writes, Synthesizer reads 2-4 of these
13
+
14
+ ### Required Frontmatter
15
+
16
+ ```yaml
17
+ ---
18
+ confidence: high|medium|low
19
+ sources_checked: N # integer count of sources consulted
20
+ coverage: "complete|partial|minimal"
21
+ ---
22
+ ```
23
+
24
+ ### Required Body Sections
25
+
26
+ - `## Key Findings` — each finding tagged with source level (`[S1]`..`[S6]`) and confidence
27
+ - `## Gaps` — areas not covered and why
28
+ - `## Sources` — source list with what each provided
29
+
30
+ ### Special Handling
31
+
32
+ - Every factual claim must have a source attribution tag
33
+ - Version-sensitive info (API signatures, config syntax) must come from S1-S3 sources
34
+ - `[SPECULATIVE]` tag marks unverified reasoning — synthesizer must not upgrade confidence
35
+
36
+ ---
37
+
38
+ ## Contract: Synthesizer -> Planner
39
+
40
+ **File**: `.planning/research/SUMMARY.md` (or specified path)
41
+ **Direction**: Synthesizer writes, Planner reads
42
+
43
+ ### Required Frontmatter
44
+
45
+ ```yaml
46
+ ---
47
+ confidence: high|medium|low
48
+ sources: N # integer count of input documents
49
+ conflicts: N # integer count of contradictions found
50
+ ---
51
+ ```
52
+
53
+ ### Required Body Sections
54
+
55
+ - `## Resolved Decisions` — table with Topic, Decision, Confidence, Sources columns
56
+ - `## Open Questions` — items marked `[NEEDS DECISION]` for planner to handle
57
+ - `## Deferred Ideas` — items out of scope
58
+
59
+ ### Special Handling
60
+
61
+ - `[NEEDS DECISION]` flags: planner creates `checkpoint:decision` tasks OR decides within discretion scope
62
+ - Confidence levels never upgraded beyond what input documents support
63
+ - Contradictions always documented, never silently dropped
64
+
65
+ ---
66
+
67
+ ## Contract: Planner -> Executor
68
+
69
+ **File**: `.planning/phases/{NN}-{slug}/PLAN-{NN}.md`
70
+ **Direction**: Planner writes, Executor reads and executes sequentially
71
+
72
+ ### Required Frontmatter
73
+
74
+ ```yaml
75
+ ---
76
+ phase: "{phase-slug}"
77
+ plan: "{NN-MM}"
78
+ wave: N
79
+ depends_on: []
80
+ files_modified: ["{path}"]
81
+ must_haves:
82
+ truths: ["{observable condition}"]
83
+ artifacts: ["{file: description}"]
84
+ key_links: ["{connection description}"]
85
+ provides: ["{exported item}"]
86
+ consumes: ["{required item}"]
87
+ requirement_ids: []
88
+ ---
89
+ ```
90
+
91
+ ### Required Body: XML Tasks (each task needs all 5 elements)
92
+
93
+ ```xml
94
+ <task id="{plan}-T{n}" type="{type}" tdd="{bool}" complexity="{simple|medium|complex}">
95
+ <name>{imperative verb phrase}</name>
96
+ <files>{file paths, one per line}</files>
97
+ <action>{numbered steps}</action>
98
+ <verify>{executable shell command}</verify>
99
+ <done>{observable outcome}</done>
100
+ </task>
101
+ ```
102
+
103
+ ### Special Handling
104
+
105
+ - Task types: `auto`, `tdd`, `checkpoint:human-verify`, `checkpoint:decision`, `checkpoint:human-action`
106
+ - Complexity drives model selection: simple=haiku, medium=sonnet, complex=inherit
107
+ - Executor stages ONLY files listed in `<files>` per task
108
+ - Plans end with a `## Summary` section (plan ID, task list, key files, must-haves, provides/consumes)
109
+
110
+ ---
111
+
112
+ ## Contract: Planner -> Plan-Checker
113
+
114
+ **File**: Same `PLAN-{NN}.md` files (read-only)
115
+ **Direction**: Planner writes, Plan-Checker reads and returns text assessment
116
+ **Returns**: Inline text report (no file output)
117
+
118
+ ### Expected Input
119
+
120
+ Plan-Checker reads plan frontmatter + XML tasks and evaluates across 9 dimensions (D1-D9). Optionally receives CONTEXT.md path.
121
+
122
+ ### Output Format
123
+
124
+ ```
125
+ VERIFICATION PASSED | ISSUES FOUND
126
+ Plans: N | Tasks: N | Blockers: N | Warnings: N | Info: N
127
+
128
+ ## Blockers
129
+ - [{plan_id}] D{N} {severity}: {description} -> Fix: {hint}
130
+ ```
131
+
132
+ ### Special Handling
133
+
134
+ - Blockers must be fixed before execution; warnings are advisory
135
+ - Plan-Checker never modifies plans — only reports issues
136
+ - Planner enters Revision Mode to address feedback
137
+
138
+ ---
139
+
140
+ ## Contract: Executor -> Verifier
141
+
142
+ **File**: `.planning/phases/{NN}-{slug}/SUMMARY-{plan_id}.md`
143
+ **Direction**: Executor writes after completing plan tasks, Verifier reads
144
+
145
+ ### Required Frontmatter
146
+
147
+ ```yaml
148
+ ---
149
+ plan: "{plan_id}"
150
+ status: complete|partial|checkpoint
151
+ commits: ["{sha1}", "{sha2}"]
152
+ provides: ["{exported item}"]
153
+ must_haves:
154
+ - "{must-have description}: DONE|PARTIAL|SKIPPED"
155
+ ---
156
+ ```
157
+
158
+ ### Required Body Sections
159
+
160
+ - `## Task Results` — table with Task, Status, Notes columns
161
+ - `## Deviations` — list of deviations from plan, or "None"
162
+
163
+ ### Special Handling
164
+
165
+ - Verifier does NOT trust SUMMARY.md claims — verifies against actual codebase
166
+ - Verifier checks must-haves from PLAN.md frontmatter, not SUMMARY.md self-reports
167
+ - One SUMMARY per plan execution; status reflects final state
168
+
169
+ ---
170
+
171
+ ## Contract: Verifier -> Planner (Gap Closure)
172
+
173
+ **File**: `.planning/phases/{NN}-{slug}/VERIFICATION.md`
174
+ **Direction**: Verifier writes, Planner reads to create gap-closure plans
175
+
176
+ ### Required Frontmatter
177
+
178
+ ```yaml
179
+ ---
180
+ status: passed|gaps_found|human_needed
181
+ attempt: N
182
+ must_haves_total: N
183
+ must_haves_passed: M
184
+ gaps: ["gap description"]
185
+ overrides: []
186
+ ---
187
+ ```
188
+
189
+ ### Required Body Sections
190
+
191
+ - `## Must-Have Verification` — table with #, Must-Have, Status, Evidence columns
192
+ - `## Gaps` — per-gap detail with Evidence and Suggested fix
193
+
194
+ ### Special Handling
195
+
196
+ - `gaps_found` triggers Planner Gap Closure Mode — planner creates targeted fix plans
197
+ - `overrides` list: must-haves marked as override by user, counted as passed
198
+ - Re-verification increments `attempt` counter; checks regressions on previously-passed items
199
+ - Verifier has Write access ONLY for VERIFICATION.md — cannot fix source code
200
+
201
+ ---
202
+
203
+ ## Contract: Integration-Checker -> Planner
204
+
205
+ **File**: `.planning/phases/{NN}-{slug}/INTEGRATION-REPORT.md`
206
+ **Direction**: Integration-Checker writes, Planner reads for cross-phase fixes
207
+
208
+ ### Required Frontmatter
209
+
210
+ ```yaml
211
+ ---
212
+ status: passed|issues_found
213
+ checks_total: N
214
+ checks_passed: M
215
+ critical_issues: K
216
+ ---
217
+ ```
218
+
219
+ ### Required Body Sections
220
+
221
+ - `## Integration Checks` — table with Check, Status, Evidence columns
222
+ - `## E2E Flows` — table with Flow, Status, Broken Link columns
223
+ - `## Critical Issues` — detailed issue descriptions
224
+
225
+ ### Special Handling
226
+
227
+ - Checks ACROSS phases (unlike Verifier which checks single phase)
228
+ - 5 check categories: Export/Import Wiring, API Route Coverage, Auth Protection, E2E Flows, Cross-Phase Dependencies
229
+ - Integration-Checker has Write access ONLY for INTEGRATION-REPORT.md — cannot fix source code
230
+
231
+ ---
232
+
233
+ ## Contract: Debugger (Self-Contained)
234
+
235
+ **File**: `.planning/debug/{slug}.md`
236
+ **Direction**: Debugger creates, updates, and resolves within a single session
237
+
238
+ ### Required Frontmatter
239
+
240
+ ```yaml
241
+ ---
242
+ slug: "{slug}"
243
+ status: "gathering|investigating|fixing|verifying|resolved"
244
+ created: "{ISO-8601}"
245
+ updated: "{ISO-8601}"
246
+ mode: "find_and_fix|find_root_cause_only"
247
+ ---
248
+ ```
249
+
250
+ ### Required Body Sections
251
+
252
+ - `## Current Focus` — Hypothesis, Test, Expecting, Disconfirm, Next action
253
+ - `## Symptoms` — IMMUTABLE after gathering phase
254
+ - `## Hypotheses` — Active (unchecked) and Eliminated (checked, append-only)
255
+ - `## Evidence Log` — append-only timestamped entries
256
+ - `## Resolution` — root cause, mechanism, fix, commit hash (when resolved)
257
+
258
+ ### Special Handling
259
+
260
+ - Status transitions: `gathering -> investigating -> fixing -> verifying -> resolved`
261
+ - Symptoms and Evidence Log are append-only / immutable — prevents mutation bias
262
+ - Fix commits use format: `fix({scope}): {description}` with root cause in body
263
+ - May emit checkpoints (`HUMAN-VERIFY`, `HUMAN-ACTION`, `DECISION`) for user input
264
+
265
+ ---
266
+
267
+ ## Contract: Codebase-Mapper (Self-Contained)
268
+
269
+ **Files**: `.planning/codebase/{STACK,ARCHITECTURE,CONVENTIONS,CONCERNS}.md` (varies by focus)
270
+ **Direction**: Codebase-Mapper writes, consumed by Researcher (as S0 local prior) and Planner
271
+
272
+ ### Focus Areas and Outputs
273
+
274
+ | Focus | Output Files |
275
+ |-------|-------------|
276
+ | `tech` | STACK.md, INTEGRATIONS.md |
277
+ | `arch` | ARCHITECTURE.md, STRUCTURE.md |
278
+ | `quality` | CONVENTIONS.md, TESTING.md |
279
+ | `concerns` | CONCERNS.md |
280
+
281
+ ### Fallback Frontmatter (per file)
282
+
283
+ No YAML frontmatter required — these are reference documents with markdown tables.
284
+
285
+ ### Required Body Structure (minimum per file)
286
+
287
+ - **STACK.md**: `## Tech Stack` table (Category, Technology, Version, Config File) + `## Package Manager`
288
+ - **ARCHITECTURE.md**: `## Architecture Overview` (pattern name) + `## Key Components` table + `## Data Flow`
289
+ - **CONVENTIONS.md**: `## Code Conventions` table (Convention, Pattern, Example File) + `## Naming Patterns`
290
+ - **CONCERNS.md**: `## Concerns` table (Severity, Area, Description, File) + `## Security Considerations`
291
+
292
+ ### Special Handling
293
+
294
+ - Every claim must reference actual file paths — no vague references
295
+ - Codebase-Mapper does NOT commit — the orchestrator handles commits
296
+ - Researcher treats these as S0 (highest confidence) local prior research
297
+ - One focus area per invocation
@@ -7,9 +7,9 @@ Consistent output formatting for all Plan-Build-Run skills. Every skill that pro
7
7
  Use for major workflow transitions. Always use `PLAN-BUILD-RUN` prefix.
8
8
 
9
9
  ```
10
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
11
- PLAN-BUILD-RUN ► {STAGE NAME}
12
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
10
+ ╔══════════════════════════════════════════════════════════════╗
11
+ PLAN-BUILD-RUN ► {STAGE NAME}
12
+ ╚══════════════════════════════════════════════════════════════╝
13
13
  ```
14
14
 
15
15
  **Stage names (uppercase):**
@@ -21,7 +21,7 @@ Use for major workflow transitions. Always use `PLAN-BUILD-RUN` prefix.
21
21
  - `EXECUTING WAVE {N}`
22
22
  - `VERIFYING`
23
23
  - `PHASE {N} COMPLETE ✓`
24
- - `MILESTONE COMPLETE 🎉`
24
+ - `MILESTONE COMPLETE`
25
25
  - `SCANNING CODEBASE`
26
26
  - `DEBUGGING`
27
27
 
@@ -33,9 +33,9 @@ Use for major workflow transitions. Always use `PLAN-BUILD-RUN` prefix.
33
33
 
34
34
  Format:
35
35
  ```
36
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
37
- PLAN-BUILD-RUN ► {SKILL NAME}
38
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
36
+ ╔══════════════════════════════════════════════════════════════╗
37
+ PLAN-BUILD-RUN ► {SKILL NAME}
38
+ ╚══════════════════════════════════════════════════════════════╝
39
39
  ```
40
40
 
41
41
  **Skill names (uppercase):**
@@ -155,7 +155,7 @@ For research agents:
155
155
 
156
156
  ## Checkpoint Boxes
157
157
 
158
- User action required. Use double-line box drawing, 62-character width.
158
+ User action required. Use double-line box drawing, 62-character inner width.
159
159
 
160
160
  ```
161
161
  ╔══════════════════════════════════════════════════════════════╗
@@ -164,9 +164,7 @@ User action required. Use double-line box drawing, 62-character width.
164
164
 
165
165
  {Content}
166
166
 
167
- ──────────────────────────────────────────────────────────────
168
167
  → {ACTION PROMPT}
169
- ──────────────────────────────────────────────────────────────
170
168
  ```
171
169
 
172
170
  **Types:**
@@ -260,25 +258,21 @@ Use plain conversational prompts for these cases instead.
260
258
  Always present at end of major completions (phase complete, milestone complete, project init).
261
259
 
262
260
  ```
263
- ───────────────────────────────────────────────────────────────
264
-
265
- ## ▶ Next Up
261
+ ╔══════════════════════════════════════════════════════════════╗
262
+ ║ ▶ NEXT UP ║
263
+ ╚══════════════════════════════════════════════════════════════╝
266
264
 
267
265
  **{Identifier}: {Name}** — {one-line description}
268
266
 
269
267
  `{copy-paste command}`
270
268
 
271
269
  <sub>`/clear` first → fresh context window</sub>
272
-
273
- ───────────────────────────────────────────────────────────────
270
+ ```
274
271
 
275
272
  **Also available:**
276
273
  - `/pbr:alternative-1` — description
277
274
  - `/pbr:alternative-2` — description
278
275
 
279
- ───────────────────────────────────────────────────────────────
280
- ```
281
-
282
276
  **Shorter routing (for minor completions):**
283
277
  ```
284
278
  What's next?
@@ -333,18 +327,18 @@ Use tables for structured data:
333
327
  ### Phase Complete
334
328
 
335
329
  ```
336
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
337
- PLAN-BUILD-RUN ► PHASE {N} COMPLETE ✓
338
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
330
+ ╔══════════════════════════════════════════════════════════════╗
331
+ PLAN-BUILD-RUN ► PHASE {N} COMPLETE ✓
332
+ ╚══════════════════════════════════════════════════════════════╝
339
333
 
340
334
  **Phase {N}: {Name}**
341
335
 
342
336
  {X} plans executed
343
337
  Goal verified ✓
344
338
 
345
- ───────────────────────────────────────────────────────────────
346
-
347
- ## ▶ Next Up
339
+ ╔══════════════════════════════════════════════════════════════╗
340
+ ║ ▶ NEXT UP ║
341
+ ╚══════════════════════════════════════════════════════════════╝
348
342
 
349
343
  **Phase {N+1}: {Name}** — {Goal from ROADMAP.md}
350
344
 
@@ -352,30 +346,26 @@ Goal verified ✓
352
346
 
353
347
  <sub>/clear first → fresh context window</sub>
354
348
 
355
- ───────────────────────────────────────────────────────────────
356
-
357
349
  **Also available:**
358
350
  - /pbr:plan {N+1} — skip discussion, plan directly
359
351
  - /pbr:review {N} — manual acceptance testing before continuing
360
-
361
- ───────────────────────────────────────────────────────────────
362
352
  ```
363
353
 
364
354
  ### Milestone Complete
365
355
 
366
356
  ```
367
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
368
- PLAN-BUILD-RUN ► MILESTONE COMPLETE 🎉
369
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
357
+ ╔══════════════════════════════════════════════════════════════╗
358
+ PLAN-BUILD-RUN ► MILESTONE COMPLETE
359
+ ╚══════════════════════════════════════════════════════════════╝
370
360
 
371
361
  **{version}**
372
362
 
373
363
  {N} phases completed
374
364
  All phase goals verified ✓
375
365
 
376
- ───────────────────────────────────────────────────────────────
377
-
378
- ## ▶ Next Up
366
+ ╔══════════════════════════════════════════════════════════════╗
367
+ ║ ▶ NEXT UP ║
368
+ ╚══════════════════════════════════════════════════════════════╝
379
369
 
380
370
  **Audit milestone** — verify requirements, cross-phase integration, E2E flows
381
371
 
@@ -383,21 +373,17 @@ All phase goals verified ✓
383
373
 
384
374
  <sub>/clear first → fresh context window</sub>
385
375
 
386
- ───────────────────────────────────────────────────────────────
387
-
388
376
  **Also available:**
389
377
  - /pbr:review — manual acceptance testing
390
378
  - /pbr:milestone complete — archive milestone after audit passes
391
-
392
- ───────────────────────────────────────────────────────────────
393
379
  ```
394
380
 
395
381
  ### Gaps Found
396
382
 
397
383
  ```
398
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
399
- PLAN-BUILD-RUN ► PHASE {N} GAPS FOUND ⚠
400
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
384
+ ╔══════════════════════════════════════════════════════════════╗
385
+ PLAN-BUILD-RUN ► PHASE {N} GAPS FOUND ⚠
386
+ ╚══════════════════════════════════════════════════════════════╝
401
387
 
402
388
  **Phase {N}: {Name}**
403
389
 
@@ -408,9 +394,9 @@ Report: .planning/phases/{phase_dir}/VERIFICATION.md
408
394
 
409
395
  {Extract gap summaries from VERIFICATION.md}
410
396
 
411
- ───────────────────────────────────────────────────────────────
412
-
413
- ## ▶ Next Up
397
+ ╔══════════════════════════════════════════════════════════════╗
398
+ ║ ▶ NEXT UP ║
399
+ ╚══════════════════════════════════════════════════════════════╝
414
400
 
415
401
  **Plan gap closure** — create additional plans to complete the phase
416
402
 
@@ -418,13 +404,9 @@ Report: .planning/phases/{phase_dir}/VERIFICATION.md
418
404
 
419
405
  <sub>/clear first → fresh context window</sub>
420
406
 
421
- ───────────────────────────────────────────────────────────────
422
-
423
407
  **Also available:**
424
408
  - cat .planning/phases/{phase_dir}/VERIFICATION.md — see full report
425
409
  - /pbr:review {N} — manual testing before planning
426
-
427
- ───────────────────────────────────────────────────────────────
428
410
  ```
429
411
 
430
412
  ---
@@ -434,9 +416,9 @@ Report: .planning/phases/{phase_dir}/VERIFICATION.md
434
416
  Use for session lifecycle transitions (pause/resume):
435
417
 
436
418
  ```
437
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
438
- PLAN-BUILD-RUN ► SESSION RESTORED ✓
439
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
419
+ ╔══════════════════════════════════════════════════════════════╗
420
+ PLAN-BUILD-RUN ► SESSION RESTORED ✓
421
+ ╚══════════════════════════════════════════════════════════════╝
440
422
 
441
423
  Position: Phase {N} — {phase name}, Plan {M}
442
424
  Paused: {ISO datetime}
@@ -452,10 +434,11 @@ Other session banners: `SESSION SAVED ✓` (pause), `RESUMING SESSION` (resume s
452
434
  ## Anti-Patterns
453
435
 
454
436
  Do NOT:
455
- - Use varying box/banner widths
456
- - Mix banner styles (`===`, `---`, `***`) with `━━━` banners
437
+ - Use varying box/banner widths — always 62-character inner width
438
+ - Use `━━━` heavy bars or `───` thin dividers for banners/sections — use `╔═╗║╚═╝` boxes
439
+ - Mix banner styles (`===`, `---`, `***`) with double-line boxes
457
440
  - Skip `PLAN-BUILD-RUN ►` prefix in stage banners
458
- - Use random emoji (only `🎉` for milestone complete, `✓` for phase complete)
441
+ - Use random emoji (only for milestone complete, `✓` for phase complete)
459
442
  - Skip the "Next Up" block after major completions
460
443
  - Reference non-Plan-Build-Run commands (always use `/pbr:*` commands)
461
444
  - Use non-Plan-Build-Run branding in banners
@@ -113,6 +113,7 @@ function checkSkillRules(skill, filePath, planningDir) {
113
113
 
114
114
  switch (skill) {
115
115
  case 'quick':
116
+ case 'do':
116
117
  return checkQuickRules(filePath, isInPlanning, planningDir);
117
118
  case 'build':
118
119
  return checkBuildRules(filePath, isInPlanning, planningDir);
@@ -126,6 +127,16 @@ function checkSkillRules(skill, filePath, planningDir) {
126
127
  case 'explore':
127
128
  case 'import':
128
129
  case 'scan':
130
+ case 'note':
131
+ case 'todo':
132
+ case 'health':
133
+ case 'help':
134
+ case 'config':
135
+ case 'continue':
136
+ case 'resume':
137
+ case 'pause':
138
+ case 'status':
139
+ case 'dashboard':
129
140
  return checkReadOnlySkillRules(skill, filePath, isInPlanning);
130
141
  default:
131
142
  return null;
@@ -161,6 +161,10 @@ function updateStatePosition(content, updates) {
161
161
  for (let i = 0; i < lines.length; i++) {
162
162
  const line = lines[i];
163
163
 
164
+ if (updates.phaseLine !== undefined && /^Phase:\s/.test(line)) {
165
+ lines[i] = `Phase: ${updates.phaseLine}`;
166
+ }
167
+
164
168
  if (updates.planLine !== undefined && /^Plan:\s/.test(line)) {
165
169
  lines[i] = `Plan: ${updates.planLine}`;
166
170
  }
@@ -185,6 +189,18 @@ function updateStatePosition(content, updates) {
185
189
  let fm = content.substring(0, fmEnd + 3);
186
190
  const body = content.substring(fmEnd + 3);
187
191
 
192
+ if (updates.fmCurrentPhase !== undefined) {
193
+ fm = fm.replace(/^(current_phase:\s*).*/m, `$1${updates.fmCurrentPhase}`);
194
+ }
195
+ if (updates.fmTotalPhases !== undefined) {
196
+ fm = fm.replace(/^(total_phases:\s*).*/m, `$1${updates.fmTotalPhases}`);
197
+ }
198
+ if (updates.fmPhaseSlug !== undefined) {
199
+ fm = fm.replace(/^(phase_slug:\s*).*/m, `$1"${updates.fmPhaseSlug}"`);
200
+ }
201
+ if (updates.fmPhaseName !== undefined) {
202
+ fm = fm.replace(/^(phase_name:\s*).*/m, `$1"${updates.fmPhaseName}"`);
203
+ }
188
204
  if (updates.fmPlansComplete !== undefined) {
189
205
  fm = fm.replace(/^(plans_complete:\s*).*/m, `$1${updates.fmPlansComplete}`);
190
206
  }
@@ -216,6 +232,9 @@ function updateStatePositionBody(body, updates) {
216
232
  for (let i = 0; i < lines.length; i++) {
217
233
  const line = lines[i];
218
234
 
235
+ if (updates.phaseLine !== undefined && /^Phase:\s/.test(line)) {
236
+ lines[i] = `Phase: ${updates.phaseLine}`;
237
+ }
219
238
  if (updates.planLine !== undefined && /^Plan:\s/.test(line)) {
220
239
  lines[i] = `Plan: ${updates.planLine}`;
221
240
  }
@@ -323,6 +342,17 @@ function checkStateSync(data) {
323
342
  const today = new Date().toISOString().slice(0, 10);
324
343
  const messages = [];
325
344
 
345
+ // Derive phase metadata for potential phase-line sync
346
+ const phaseNumInt = parseInt(phaseNum, 10);
347
+ const phaseSlug = phaseDirName.replace(/^\d+-/, '');
348
+ const phaseName = phaseSlug.replace(/-/g, ' ')
349
+ .replace(/\b\w/g, c => c.toUpperCase());
350
+ let totalPhases = 0;
351
+ try {
352
+ totalPhases = fs.readdirSync(phasesDir, { withFileTypes: true })
353
+ .filter(e => e.isDirectory() && /^\d+-/.test(e.name)).length;
354
+ } catch (_e) { /* leave as 0 */ }
355
+
326
356
  if (isSummary) {
327
357
  const plansComplete = `${artifacts.completeSummaries}/${artifacts.plans}`;
328
358
  const allComplete = artifacts.completeSummaries >= artifacts.plans;
@@ -358,6 +388,20 @@ function checkStateSync(data) {
358
388
  fmLastActivity: today,
359
389
  fmProgressPct: overallPct
360
390
  };
391
+
392
+ // Detect phase mismatch and add phase updates
393
+ const currentPhaseMatch = stateContent.match(/^current_phase:\s*(\d+)/m)
394
+ || stateContent.match(/^Phase:\s*(\d+)\s/m);
395
+ const currentPhase = currentPhaseMatch ? parseInt(currentPhaseMatch[1], 10) : null;
396
+ if (currentPhase !== null && currentPhase !== phaseNumInt) {
397
+ stateUpdates.phaseLine = `${phaseNumInt} of ${totalPhases} (${phaseName})`;
398
+ stateUpdates.fmCurrentPhase = phaseNumInt;
399
+ stateUpdates.fmTotalPhases = totalPhases;
400
+ stateUpdates.fmPhaseSlug = phaseSlug;
401
+ stateUpdates.fmPhaseName = phaseName;
402
+ messages.push(`STATE.md: Phase ${currentPhase} → ${phaseNumInt}`);
403
+ }
404
+
361
405
  const updatedState = updateStatePosition(stateContent, stateUpdates);
362
406
  if (updatedState !== stateContent) {
363
407
  atomicWrite(statePath, updatedState);
@@ -422,6 +466,20 @@ function checkStateSync(data) {
422
466
  fmLastActivity: today,
423
467
  fmProgressPct: overallPct
424
468
  };
469
+
470
+ // Detect phase mismatch and add phase updates
471
+ const currentPhaseMatch = stateContent.match(/^current_phase:\s*(\d+)/m)
472
+ || stateContent.match(/^Phase:\s*(\d+)\s/m);
473
+ const currentPhase = currentPhaseMatch ? parseInt(currentPhaseMatch[1], 10) : null;
474
+ if (currentPhase !== null && currentPhase !== phaseNumInt) {
475
+ stateUpdates.phaseLine = `${phaseNumInt} of ${totalPhases} (${phaseName})`;
476
+ stateUpdates.fmCurrentPhase = phaseNumInt;
477
+ stateUpdates.fmTotalPhases = totalPhases;
478
+ stateUpdates.fmPhaseSlug = phaseSlug;
479
+ stateUpdates.fmPhaseName = phaseName;
480
+ messages.push(`STATE.md: Phase ${currentPhase} → ${phaseNumInt}`);
481
+ }
482
+
425
483
  const updatedState = updateStatePosition(stateContent, stateUpdates);
426
484
  if (updatedState !== stateContent) {
427
485
  atomicWrite(statePath, updatedState);