@sienklogic/plan-build-run 2.0.0 → 2.0.1

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 (225) hide show
  1. package/CHANGELOG.md +56 -56
  2. package/CLAUDE.md +149 -149
  3. package/LICENSE +21 -21
  4. package/README.md +247 -247
  5. package/dashboard/bin/cli.js +25 -25
  6. package/dashboard/package.json +34 -34
  7. package/dashboard/public/css/layout.css +406 -406
  8. package/dashboard/public/css/status-colors.css +98 -98
  9. package/dashboard/public/js/htmx-title.js +5 -5
  10. package/dashboard/public/js/sidebar-toggle.js +20 -20
  11. package/dashboard/src/app.js +78 -78
  12. package/dashboard/src/middleware/errorHandler.js +52 -52
  13. package/dashboard/src/middleware/notFoundHandler.js +9 -9
  14. package/dashboard/src/repositories/planning.repository.js +128 -128
  15. package/dashboard/src/routes/events.routes.js +40 -40
  16. package/dashboard/src/routes/index.routes.js +31 -31
  17. package/dashboard/src/routes/pages.routes.js +245 -195
  18. package/dashboard/src/server.js +42 -42
  19. package/dashboard/src/services/dashboard.service.js +222 -222
  20. package/dashboard/src/services/phase.service.js +220 -167
  21. package/dashboard/src/services/project.service.js +57 -57
  22. package/dashboard/src/services/roadmap.service.js +171 -171
  23. package/dashboard/src/services/sse.service.js +58 -58
  24. package/dashboard/src/services/todo.service.js +254 -254
  25. package/dashboard/src/services/watcher.service.js +48 -48
  26. package/dashboard/src/views/coming-soon.ejs +11 -11
  27. package/dashboard/src/views/error.ejs +13 -13
  28. package/dashboard/src/views/index.ejs +5 -5
  29. package/dashboard/src/views/layout.ejs +1 -1
  30. package/dashboard/src/views/partials/dashboard-content.ejs +77 -77
  31. package/dashboard/src/views/partials/footer.ejs +3 -3
  32. package/dashboard/src/views/partials/head.ejs +21 -21
  33. package/dashboard/src/views/partials/header.ejs +12 -12
  34. package/dashboard/src/views/partials/layout-bottom.ejs +15 -15
  35. package/dashboard/src/views/partials/layout-top.ejs +8 -8
  36. package/dashboard/src/views/partials/phase-content.ejs +188 -181
  37. package/dashboard/src/views/partials/phase-doc-content.ejs +38 -0
  38. package/dashboard/src/views/partials/phases-content.ejs +117 -117
  39. package/dashboard/src/views/partials/roadmap-content.ejs +142 -142
  40. package/dashboard/src/views/partials/sidebar.ejs +38 -38
  41. package/dashboard/src/views/partials/todo-create-content.ejs +53 -53
  42. package/dashboard/src/views/partials/todo-detail-content.ejs +38 -38
  43. package/dashboard/src/views/partials/todos-content.ejs +53 -53
  44. package/dashboard/src/views/phase-detail.ejs +5 -5
  45. package/dashboard/src/views/phase-doc.ejs +5 -0
  46. package/dashboard/src/views/phases.ejs +5 -5
  47. package/dashboard/src/views/roadmap.ejs +5 -5
  48. package/dashboard/src/views/todo-create.ejs +5 -5
  49. package/dashboard/src/views/todo-detail.ejs +5 -5
  50. package/dashboard/src/views/todos.ejs +5 -5
  51. package/package.json +57 -57
  52. package/plugins/pbr/.claude-plugin/plugin.json +13 -13
  53. package/plugins/pbr/UI-CONSISTENCY-GAPS.md +61 -61
  54. package/plugins/pbr/agents/codebase-mapper.md +279 -271
  55. package/plugins/pbr/agents/debugger.md +281 -281
  56. package/plugins/pbr/agents/executor.md +428 -407
  57. package/plugins/pbr/agents/general.md +164 -164
  58. package/plugins/pbr/agents/integration-checker.md +169 -141
  59. package/plugins/pbr/agents/plan-checker.md +296 -280
  60. package/plugins/pbr/agents/planner.md +358 -358
  61. package/plugins/pbr/agents/researcher.md +363 -363
  62. package/plugins/pbr/agents/synthesizer.md +230 -230
  63. package/plugins/pbr/agents/verifier.md +489 -454
  64. package/plugins/pbr/commands/begin.md +5 -5
  65. package/plugins/pbr/commands/build.md +5 -5
  66. package/plugins/pbr/commands/config.md +5 -5
  67. package/plugins/pbr/commands/continue.md +5 -5
  68. package/plugins/pbr/commands/debug.md +5 -5
  69. package/plugins/pbr/commands/discuss.md +5 -5
  70. package/plugins/pbr/commands/explore.md +5 -5
  71. package/plugins/pbr/commands/health.md +5 -5
  72. package/plugins/pbr/commands/help.md +5 -5
  73. package/plugins/pbr/commands/import.md +5 -5
  74. package/plugins/pbr/commands/milestone.md +5 -5
  75. package/plugins/pbr/commands/note.md +5 -5
  76. package/plugins/pbr/commands/pause.md +5 -5
  77. package/plugins/pbr/commands/plan.md +5 -5
  78. package/plugins/pbr/commands/quick.md +5 -5
  79. package/plugins/pbr/commands/resume.md +5 -5
  80. package/plugins/pbr/commands/review.md +5 -5
  81. package/plugins/pbr/commands/scan.md +5 -5
  82. package/plugins/pbr/commands/setup.md +5 -5
  83. package/plugins/pbr/commands/status.md +5 -5
  84. package/plugins/pbr/commands/todo.md +5 -5
  85. package/plugins/pbr/contexts/dev.md +27 -27
  86. package/plugins/pbr/contexts/research.md +28 -28
  87. package/plugins/pbr/contexts/review.md +36 -36
  88. package/plugins/pbr/hooks/hooks.json +183 -183
  89. package/plugins/pbr/references/agent-anti-patterns.md +24 -24
  90. package/plugins/pbr/references/agent-interactions.md +134 -134
  91. package/plugins/pbr/references/agent-teams.md +54 -54
  92. package/plugins/pbr/references/checkpoints.md +157 -157
  93. package/plugins/pbr/references/common-bug-patterns.md +13 -13
  94. package/plugins/pbr/references/config-reference.md +441 -0
  95. package/plugins/pbr/references/continuation-format.md +212 -212
  96. package/plugins/pbr/references/deviation-rules.md +112 -112
  97. package/plugins/pbr/references/git-integration.md +226 -226
  98. package/plugins/pbr/references/integration-patterns.md +117 -117
  99. package/plugins/pbr/references/model-profiles.md +99 -99
  100. package/plugins/pbr/references/model-selection.md +31 -31
  101. package/plugins/pbr/references/pbr-rules.md +193 -193
  102. package/plugins/pbr/references/plan-authoring.md +181 -181
  103. package/plugins/pbr/references/plan-format.md +287 -283
  104. package/plugins/pbr/references/planning-config.md +213 -213
  105. package/plugins/pbr/references/questioning.md +214 -214
  106. package/plugins/pbr/references/reading-verification.md +127 -127
  107. package/plugins/pbr/references/stub-patterns.md +160 -160
  108. package/plugins/pbr/references/subagent-coordination.md +119 -119
  109. package/plugins/pbr/references/ui-formatting.md +461 -399
  110. package/plugins/pbr/references/verification-patterns.md +198 -198
  111. package/plugins/pbr/references/wave-execution.md +95 -95
  112. package/plugins/pbr/scripts/auto-continue.js +80 -80
  113. package/plugins/pbr/scripts/check-dangerous-commands.js +136 -136
  114. package/plugins/pbr/scripts/check-doc-sprawl.js +102 -102
  115. package/plugins/pbr/scripts/check-phase-boundary.js +196 -196
  116. package/plugins/pbr/scripts/check-plan-format.js +270 -270
  117. package/plugins/pbr/scripts/check-roadmap-sync.js +322 -252
  118. package/plugins/pbr/scripts/check-skill-workflow.js +262 -262
  119. package/plugins/pbr/scripts/check-state-sync.js +476 -476
  120. package/plugins/pbr/scripts/check-subagent-output.js +144 -144
  121. package/plugins/pbr/scripts/config-schema.json +251 -251
  122. package/plugins/pbr/scripts/context-budget-check.js +287 -287
  123. package/plugins/pbr/scripts/event-handler.js +151 -151
  124. package/plugins/pbr/scripts/event-logger.js +92 -92
  125. package/plugins/pbr/scripts/hook-logger.js +80 -76
  126. package/plugins/pbr/scripts/hooks-schema.json +79 -79
  127. package/plugins/pbr/scripts/log-subagent.js +164 -152
  128. package/plugins/pbr/scripts/log-tool-failure.js +88 -88
  129. package/plugins/pbr/scripts/pbr-tools.js +1378 -1301
  130. package/plugins/pbr/scripts/post-write-dispatch.js +66 -66
  131. package/plugins/pbr/scripts/post-write-quality.js +207 -207
  132. package/plugins/pbr/scripts/pre-bash-dispatch.js +86 -56
  133. package/plugins/pbr/scripts/pre-write-dispatch.js +97 -62
  134. package/plugins/pbr/scripts/progress-tracker.js +281 -228
  135. package/plugins/pbr/scripts/run-hook.js +92 -0
  136. package/plugins/pbr/scripts/session-cleanup.js +254 -254
  137. package/plugins/pbr/scripts/status-line.js +288 -285
  138. package/plugins/pbr/scripts/suggest-compact.js +119 -119
  139. package/plugins/pbr/scripts/task-completed.js +45 -45
  140. package/plugins/pbr/scripts/track-context-budget.js +149 -119
  141. package/plugins/pbr/scripts/validate-commit.js +200 -200
  142. package/plugins/pbr/scripts/validate-plugin-structure.js +183 -172
  143. package/plugins/pbr/scripts/validate-task.js +106 -0
  144. package/plugins/pbr/skills/begin/SKILL.md +594 -545
  145. package/plugins/pbr/skills/begin/templates/PROJECT.md.tmpl +33 -33
  146. package/plugins/pbr/skills/begin/templates/REQUIREMENTS.md.tmpl +18 -18
  147. package/plugins/pbr/skills/begin/templates/STATE.md.tmpl +49 -49
  148. package/plugins/pbr/skills/begin/templates/config.json.tmpl +64 -63
  149. package/plugins/pbr/skills/begin/templates/researcher-prompt.md.tmpl +19 -19
  150. package/plugins/pbr/skills/begin/templates/roadmap-prompt.md.tmpl +30 -30
  151. package/plugins/pbr/skills/begin/templates/synthesis-prompt.md.tmpl +16 -16
  152. package/plugins/pbr/skills/build/SKILL.md +943 -962
  153. package/plugins/pbr/skills/config/SKILL.md +256 -241
  154. package/plugins/pbr/skills/continue/SKILL.md +164 -127
  155. package/plugins/pbr/skills/debug/SKILL.md +515 -489
  156. package/plugins/pbr/skills/debug/templates/continuation-prompt.md.tmpl +16 -16
  157. package/plugins/pbr/skills/debug/templates/initial-investigation-prompt.md.tmpl +27 -27
  158. package/plugins/pbr/skills/discuss/SKILL.md +347 -338
  159. package/plugins/pbr/skills/discuss/templates/CONTEXT.md.tmpl +61 -61
  160. package/plugins/pbr/skills/discuss/templates/decision-categories.md +9 -9
  161. package/plugins/pbr/skills/explore/SKILL.md +378 -362
  162. package/plugins/pbr/skills/health/SKILL.md +221 -186
  163. package/plugins/pbr/skills/health/templates/check-pattern.md.tmpl +30 -30
  164. package/plugins/pbr/skills/health/templates/output-format.md.tmpl +63 -63
  165. package/plugins/pbr/skills/help/SKILL.md +155 -140
  166. package/plugins/pbr/skills/import/SKILL.md +504 -490
  167. package/plugins/pbr/skills/milestone/SKILL.md +704 -673
  168. package/plugins/pbr/skills/milestone/templates/audit-report.md.tmpl +48 -48
  169. package/plugins/pbr/skills/milestone/templates/stats-file.md.tmpl +30 -30
  170. package/plugins/pbr/skills/note/SKILL.md +231 -212
  171. package/plugins/pbr/skills/pause/SKILL.md +249 -235
  172. package/plugins/pbr/skills/pause/templates/continue-here.md.tmpl +71 -71
  173. package/plugins/pbr/skills/plan/SKILL.md +685 -628
  174. package/plugins/pbr/skills/plan/decimal-phase-calc.md +98 -98
  175. package/plugins/pbr/skills/plan/templates/checker-prompt.md.tmpl +21 -21
  176. package/plugins/pbr/skills/plan/templates/gap-closure-prompt.md.tmpl +32 -32
  177. package/plugins/pbr/skills/plan/templates/planner-prompt.md.tmpl +38 -38
  178. package/plugins/pbr/skills/plan/templates/researcher-prompt.md.tmpl +19 -19
  179. package/plugins/pbr/skills/plan/templates/revision-prompt.md.tmpl +23 -23
  180. package/plugins/pbr/skills/quick/SKILL.md +354 -335
  181. package/plugins/pbr/skills/resume/SKILL.md +402 -388
  182. package/plugins/pbr/skills/review/SKILL.md +686 -652
  183. package/plugins/pbr/skills/review/templates/debugger-prompt.md.tmpl +60 -60
  184. package/plugins/pbr/skills/review/templates/gap-planner-prompt.md.tmpl +40 -40
  185. package/plugins/pbr/skills/review/templates/verifier-prompt.md.tmpl +115 -115
  186. package/plugins/pbr/skills/scan/SKILL.md +304 -269
  187. package/plugins/pbr/skills/scan/templates/mapper-prompt.md.tmpl +201 -201
  188. package/plugins/pbr/skills/setup/SKILL.md +253 -227
  189. package/plugins/pbr/skills/shared/commit-planning-docs.md +35 -35
  190. package/plugins/pbr/skills/shared/config-loading.md +102 -102
  191. package/plugins/pbr/skills/shared/context-budget.md +40 -40
  192. package/plugins/pbr/skills/shared/context-loader-task.md +86 -86
  193. package/plugins/pbr/skills/shared/digest-select.md +79 -79
  194. package/plugins/pbr/skills/shared/domain-probes.md +125 -125
  195. package/plugins/pbr/skills/shared/error-reporting.md +79 -79
  196. package/plugins/pbr/skills/shared/gate-prompts.md +388 -388
  197. package/plugins/pbr/skills/shared/phase-argument-parsing.md +45 -45
  198. package/plugins/pbr/skills/shared/progress-display.md +53 -53
  199. package/plugins/pbr/skills/shared/revision-loop.md +81 -81
  200. package/plugins/pbr/skills/shared/state-loading.md +62 -62
  201. package/plugins/pbr/skills/shared/state-update.md +161 -161
  202. package/plugins/pbr/skills/shared/universal-anti-patterns.md +33 -33
  203. package/plugins/pbr/skills/status/SKILL.md +367 -353
  204. package/plugins/pbr/skills/todo/SKILL.md +198 -181
  205. package/plugins/pbr/templates/CONTEXT.md.tmpl +52 -52
  206. package/plugins/pbr/templates/INTEGRATION-REPORT.md.tmpl +151 -151
  207. package/plugins/pbr/templates/RESEARCH-SUMMARY.md.tmpl +97 -97
  208. package/plugins/pbr/templates/ROADMAP.md.tmpl +40 -40
  209. package/plugins/pbr/templates/SUMMARY.md.tmpl +81 -81
  210. package/plugins/pbr/templates/VERIFICATION-DETAIL.md.tmpl +116 -116
  211. package/plugins/pbr/templates/codebase/ARCHITECTURE.md.tmpl +98 -98
  212. package/plugins/pbr/templates/codebase/CONCERNS.md.tmpl +93 -93
  213. package/plugins/pbr/templates/codebase/CONVENTIONS.md.tmpl +104 -104
  214. package/plugins/pbr/templates/codebase/INTEGRATIONS.md.tmpl +78 -78
  215. package/plugins/pbr/templates/codebase/STACK.md.tmpl +78 -78
  216. package/plugins/pbr/templates/codebase/STRUCTURE.md.tmpl +80 -80
  217. package/plugins/pbr/templates/codebase/TESTING.md.tmpl +107 -107
  218. package/plugins/pbr/templates/continue-here.md.tmpl +73 -73
  219. package/plugins/pbr/templates/prompt-partials/phase-project-context.md.tmpl +37 -37
  220. package/plugins/pbr/templates/research/ARCHITECTURE.md.tmpl +124 -124
  221. package/plugins/pbr/templates/research/STACK.md.tmpl +71 -71
  222. package/plugins/pbr/templates/research/SUMMARY.md.tmpl +112 -112
  223. package/plugins/pbr/templates/research-outputs/phase-research.md.tmpl +81 -81
  224. package/plugins/pbr/templates/research-outputs/project-research.md.tmpl +99 -99
  225. package/plugins/pbr/templates/research-outputs/synthesis.md.tmpl +36 -36
@@ -1,353 +1,367 @@
1
- ---
2
- name: status
3
- description: "Show current project status and suggest what to do next."
4
- allowed-tools: Read, Glob, Grep, AskUserQuestion
5
- ---
6
-
7
- # /pbr:status Project Status Dashboard
8
-
9
- You are running the **status** skill. Your job is to read the project state and present a clear, actionable status dashboard. You suggest the most logical next action based on where the project is.
10
-
11
- This skill runs **inline** and is **read-only** it never modifies any files.
12
-
13
- ---
14
-
15
- ## Core Principle
16
-
17
- **Show the user where they are and what to do next.** The status display should be a quick glance, not a wall of text. Surface problems and route to the right action.
18
-
19
- ---
20
-
21
- ## Flow
22
-
23
- ### Step 1: Read Project State
24
-
25
- **Tooling shortcut**: Instead of parsing multiple files manually, you can run:
26
- ```bash
27
- node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state load
28
- ```
29
- and
30
- ```bash
31
- node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state check-progress
32
- ```
33
- These return structured JSON with config, state, roadmap, and filesystem-verified progress. Falls back gracefully if the script is missing — parse files manually in that case.
34
-
35
- Read the following files (skip any that don't exist):
36
-
37
- 1. **`.planning/config.json`** Project settings
38
- - If this doesn't exist, display:
39
- ```
40
- ╔══════════════════════════════════════════════════════════════╗
41
- ║ ERROR ║
42
- ╚══════════════════════════════════════════════════════════════╝
43
-
44
- No Plan-Build-Run project found.
45
-
46
- **To fix:** Run `/pbr:begin` to start a new project, or `/pbr:scan` to analyze an existing codebase.
47
- ```
48
- - Stop here if no project found.
49
-
50
- 2. **`.planning/STATE.md`** — Current position, progress, blockers
51
- - Extract: current phase, current plan, overall progress, blockers, session info
52
-
53
- 3. **`.planning/ROADMAP.md`** — Phase overview
54
- - Extract: all phases with names, descriptions, status indicators
55
-
56
- 4. **`.planning/PROJECT.md`** — Project metadata (if exists)
57
- - Extract: project name, milestone info
58
-
59
- 5. **`.planning/REQUIREMENTS.md`** — Requirements (if exists)
60
- - Extract: requirement completion status if tracked
61
-
62
- ### Step 2: Scan Phase Directories
63
-
64
- For each phase listed in ROADMAP.md:
65
-
66
- 1. Check if the phase directory exists in `.planning/phases/`
67
- 2. If exists, scan for:
68
- - `CONTEXT.md` discussion happened
69
- - `PLAN-*.md` or plan files — plans exist
70
- - `SUMMARY-*.md` or summary files plans were executed
71
- - `VERIFICATION.md` phase was reviewed
72
- - `.continue-here.md` — paused work
73
-
74
- 3. Calculate phase status:
75
-
76
- | Condition | Status |
77
- |-----------|--------|
78
- | No directory | Not started |
79
- | Directory exists, no plans | Discussed only |
80
- | Plans exist, no summaries | Planned (ready to build) |
81
- | Some summaries, not all | Building (in progress) |
82
- | All summaries exist | Built (ready to review) |
83
- | VERIFICATION.md exists, status=passed | Verified (complete) |
84
- | VERIFICATION.md exists, status=gaps_found | Needs fixes |
85
-
86
- 4. Calculate progress percentage:
87
- - Count total plans across all phases
88
- - Count plans with SUMMARY.md (status=completed)
89
- - Progress = completed / total * 100
90
-
91
- ### Step 2b: Check STATE.md Size and Consistency
92
-
93
- Count lines in `.planning/STATE.md`. If over 150 lines, add a warning to the dashboard:
94
- ```
95
- Warning: STATE.md is {N} lines (limit: 150). Run any build/review command to auto-compact it.
96
- ```
97
-
98
- **Discrepancy check:** Compare STATE.md phase/plan/status claims against the filesystem:
99
- - Does the phase directory exist? If not: `Warning: STATE.md references Phase {N} but no directory exists.`
100
- - Does the plan count match? If not: `Warning: STATE.md says {X} plans but filesystem has {Y}.`
101
- - Does the status match? If STATE.md says "verified" but no `VERIFICATION.md` exists: `Warning: STATE.md says "verified" but no VERIFICATION.md found.`
102
-
103
- If any discrepancy found, add: `Run /pbr:resume to auto-reconcile STATE.md.`
104
-
105
- ### Step 3: Check for Special Conditions
106
-
107
- #### Paused Work
108
- - Search for `.continue-here.md` files in `.planning/phases/`
109
- - If found: note the phase and brief description of where work stopped
110
-
111
- #### Verification Gaps
112
- - Search for `VERIFICATION.md` files with `gaps_found` status
113
- - If found: note which phases have gaps
114
-
115
- #### Cross-Phase Re-Planning Check
116
- - For each planned phase, check if its dependency phases have been built yet
117
- - Logic:
118
- 1. Read ROADMAP.md to find phase dependencies (phases that come before)
119
- 2. If Phase N has plans but Phase N-1 doesn't have summaries (wasn't built yet):
120
- - This means Phase N was planned without knowledge of what Phase N-1 actually produced
121
- - Flag for re-planning
122
- - **Dependency fingerprint check**: For each planned phase with `dependency_fingerprints` in plan frontmatter:
123
- 1. Compare the fingerprints against current dependency SUMMARY.md files
124
- 2. If any fingerprint is stale (dependency was re-built after the plan was created):
125
- - Flag: "WARN: Phase {N} plans may be stale — dependency phase {M} was re-built since planning. Consider re-planning with `/pbr:plan {N}`."
126
-
127
- #### Active Debug Sessions
128
- - Check `.planning/debug/` for files with `status: active`
129
- - Note any active debug sessions
130
-
131
- #### Pending Todos
132
- - Check `.planning/todos/pending/` for pending todo files
133
- - Count and summarize if any exist
134
-
135
- #### Quick Notes
136
- - Check `.planning/NOTES.md` for active note entries
137
- - Count active notes (lines matching `^- \[` that don't contain `[promoted]`)
138
- - Also check `~/.claude/notes.md` for global notes
139
-
140
- #### Quick Tasks
141
- - Check `.planning/quick/` for recent quick tasks
142
- - Note any failed or partial quick tasks
143
-
144
- ### Step 4: Display Status Dashboard
145
-
146
- Present the status in this format:
147
-
148
- ```
149
- Project: {name from PROJECT.md or config.json}
150
- Phase: {current} of {total} -- {current phase name}
151
- Progress: [{progress bar}] {percentage}%
152
-
153
- Phase Status:
154
- | Phase | Status | Plans | Progress |
155
- |-------|--------|-------|----------|
156
- | 1. {name} | {status indicator} {status text} | {completed}/{total} | {percentage}% |
157
- | 2. {name} | {status indicator} {status text} | {completed}/{total} | {percentage}% |
158
- | ...
159
-
160
- {If blockers exist:}
161
- Blockers:
162
- - {blocker 1}
163
- - {blocker 2}
164
-
165
- {If no blockers:}
166
- Blockers: None
167
-
168
- {If paused work:}
169
- Paused: Phase {N} has a checkpoint at plan {M}. Run `/pbr:resume` to continue.
170
-
171
- {If verification gaps:}
172
- Gaps: Phase {N} verification found {count} gaps. Run `/pbr:plan {N} --gaps` to address.
173
-
174
- {If cross-phase re-planning needed:}
175
- Warning: Phase {N} was planned before Phase {M} was built. Consider re-planning with `/pbr:plan {N}`.
176
-
177
- {If active debug sessions:}
178
- Debug: {count} active session(s). Run `/pbr:debug` to continue.
179
-
180
- {If pending todos:}
181
- Todos: {count} pending. Run `/pbr:todo list` to see them.
182
-
183
- {If notes exist:}
184
- Notes: {count} quick capture(s). `/pbr:note list` to review.
185
- ```
186
-
187
- ### Progress Bar
188
-
189
- Generate a 20-character progress bar:
190
-
191
- ```
192
- [####################] 100% (all filled)
193
- [################....] 80% (16 filled, 4 empty)
194
- [########............] 40% (8 filled, 12 empty)
195
- [....................] 0% (all empty)
196
- ```
197
-
198
- Use the Unicode block characters from the UI formatting reference:
199
- - Filled: block character
200
- - Empty: light shade
201
-
202
- ### Status Indicators
203
-
204
- Use indicators from `references/ui-formatting.md`:
205
-
206
- | Status | Indicator |
207
- |--------|-----------|
208
- | Complete/Verified | checkmark |
209
- | In Progress | half-filled circle |
210
- | Not started | empty circle |
211
- | Needs fixes | warning triangle |
212
- | Blocked | blocked symbol |
213
-
214
- ### Step 5: Smart Routing
215
-
216
- Based on the project state, suggest the single most logical next action:
217
-
218
- **Decision tree:**
219
-
220
- ```
221
- 1. Is there paused work (.continue-here.md)?
222
- YES "Resume your work: `/pbr:resume`"
223
-
224
- 2. Is there a verification with gaps?
225
- YES "Fix verification gaps: `/pbr:plan {N} --gaps`"
226
-
227
- 3. Is the current phase planned but not built?
228
- YES "Build the current phase: `/pbr:build {N}`"
229
-
230
- 4. Is the current phase built but not reviewed?
231
- YES → "Review what was built: `/pbr:review {N}`"
232
-
233
- 5. Is the current phase verified (complete)?
234
- YES → Is there a next phase?
235
- YES Was next phase already planned?
236
- YES → Does it need re-planning? (dependency phase changed)
237
- YES → "Re-plan with updated context: `/pbr:plan {N+1}`"
238
- NO "Build the next phase: `/pbr:build {N+1}`"
239
- NO → "Plan the next phase: `/pbr:plan {N+1}`"
240
- NO → "All phases complete! Your next steps:\n -> /pbr:milestone audit — verify cross-phase integration (recommended)\n -> /pbr:milestone complete — archive this milestone and create a git tag\n -> /pbr:milestone new — start planning the next set of features"
241
-
242
- 6. Is the current phase not started?
243
- YES → Has it been discussed?
244
- YES "Plan this phase: `/pbr:plan {N}`"
245
- NO → "Start with a discussion: `/pbr:discuss {N}` or jump to `/pbr:plan {N}`"
246
-
247
- 7. Active debug sessions?
248
- YES → "Continue debugging: `/pbr:debug`"
249
-
250
- 8. Nothing active?
251
- → "Start your project: `/pbr:begin`"
252
- ```
253
-
254
- **If only one reasonable next action exists**, present it with branded routing:
255
-
256
- ```
257
- ───────────────────────────────────────────────────────────────
258
-
259
- ## Next Up
260
-
261
- **{brief explanation}**
262
-
263
- `{suggested command}`
264
-
265
- <sub>`/clear` first fresh context window</sub>
266
-
267
- ───────────────────────────────────────────────────────────────
268
- ```
269
-
270
- **If multiple reasonable next actions exist** (2-3 alternatives), use the **action-routing** pattern (see `skills/shared/gate-prompts.md`):
271
-
272
- Use AskUserQuestion:
273
- question: "What would you like to do next?"
274
- header: "Next Step"
275
- options:
276
- - label: "{primary action}" description: "{brief explanation}"
277
- - label: "{alternative 1}" description: "{brief explanation}"
278
- - label: "{alternative 2}" description: "{brief explanation}"
279
- - label: "Something else" description: "Enter a different command"
280
- multiSelect: false
281
-
282
- Build options dynamically from the decision tree results. Always include "Something else" as the last option. Generate 1-3 real options based on the state analysis.
283
-
284
- **After user selects an option:**
285
- - If they selected a real action: display "Run: `/dev:{action} {args}`" so they can execute it
286
- - If they selected "Something else": ask what they'd like to do (freeform text)
287
- - This skill remains read-only display the command, do not execute it
288
-
289
- ---
290
-
291
- ## Edge Cases
292
-
293
- ### No `.planning/` directory at all
294
- - Display: "No Plan-Build-Run project found."
295
- - Suggest: `/pbr:begin` to start a new project
296
- - Also mention: `/pbr:scan` if there's an existing codebase to analyze first
297
-
298
- ### STATE.md exists but is outdated
299
- - STATE.md may not reflect the actual file system state
300
- - Always verify by scanning phase directories
301
- - If STATE.md disagrees with the file system, note the discrepancy:
302
- "Note: STATE.md says Phase 2 is in progress, but all plans have summaries. Status may need updating."
303
-
304
- ### All phases complete
305
- - Celebrate briefly: "All phases complete!"
306
- - Suggest: `/pbr:milestone audit` to verify cross-phase integration (recommended first)
307
- - Then: `/pbr:milestone complete` to archive the milestone and tag it
308
- - Or: `/pbr:milestone new` to start the next set of features
309
-
310
- ### ROADMAP.md has phases but no phase directories
311
- - This is normal for future phases
312
- - Show them as "Not started" with no plan counts
313
-
314
- ### Multiple milestones
315
- - If PROJECT.md shows multiple milestones, display the current one
316
- - Show completed milestones as collapsed summary
317
-
318
- ### Large project (many phases)
319
- - If more than 8 phases, consider grouping:
320
- - Completed phases: collapsed summary
321
- - Current phase: full detail
322
- - Upcoming phases: brief list
323
-
324
- ---
325
-
326
- ## Performance
327
-
328
- This skill should be fast. It's a status check, not an analysis.
329
-
330
- **DO:**
331
- - Read files quickly (frontmatter only where possible)
332
- - Use Glob to find files efficiently
333
- - Cache nothing (always read fresh state)
334
-
335
- **DO NOT:**
336
- - Read full SUMMARY.md contents (frontmatter is enough)
337
- - Read plan file contents (just check existence)
338
- - Run any Bash commands
339
- - Modify any files
340
- - Spawn any Task agents
341
-
342
- ---
343
-
344
- ## Anti-Patterns
345
-
346
- 1. **DO NOT** modify any files — this is read-only
347
- 2. **DO NOT** run Bash commands — use Read and Glob only
348
- 3. **DO NOT** show overwhelming detail — keep it scannable
349
- 4. **DO NOT** hide problems — surface blockers, gaps, and warnings prominently
350
- 5. **DO NOT** suggest multiple actions without prioritizing — the primary suggestion should be clear
351
- 6. **DO NOT** re-read full file contents when frontmatter is sufficient
352
- 7. **DO NOT** show completed phases in full detail unless specifically relevant
353
- 8. **DO NOT** execute the suggested action — present it for the user to run manually. Use /pbr:continue for auto-execution.
1
+ ---
2
+ name: status
3
+ description: "Show current project status and suggest what to do next."
4
+ allowed-tools: Read, Glob, Grep, AskUserQuestion
5
+ ---
6
+
7
+ **STOPDO 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.**
8
+
9
+ ## Step 0 Immediate Output
10
+
11
+ **Before ANY tool calls**, display this banner:
12
+
13
+ ```
14
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
15
+ PLAN-BUILD-RUN ► PROJECT STATUS
16
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
17
+ ```
18
+
19
+ Then proceed to Step 1.
20
+
21
+ # /pbr:status — Project Status Dashboard
22
+
23
+ You are running the **status** skill. Your job is to read the project state and present a clear, actionable status dashboard. You suggest the most logical next action based on where the project is.
24
+
25
+ This skill runs **inline** and is **read-only** it never modifies any files.
26
+
27
+ ---
28
+
29
+ ## Core Principle
30
+
31
+ **Show the user where they are and what to do next.** The status display should be a quick glance, not a wall of text. Surface problems and route to the right action.
32
+
33
+ ---
34
+
35
+ ## Flow
36
+
37
+ ### Step 1: Read Project State
38
+
39
+ **Tooling shortcut**: Instead of parsing multiple files manually, you can run:
40
+ ```bash
41
+ node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state load
42
+ ```
43
+ and
44
+ ```bash
45
+ node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state check-progress
46
+ ```
47
+ These return structured JSON with config, state, roadmap, and filesystem-verified progress. Falls back gracefully if the script is missing — parse files manually in that case.
48
+
49
+ Read the following files (skip any that don't exist):
50
+
51
+ 1. **`.planning/config.json`** Project settings
52
+ - If this doesn't exist, display:
53
+ ```
54
+ ╔══════════════════════════════════════════════════════════════╗
55
+ ║ ERROR ║
56
+ ╚══════════════════════════════════════════════════════════════╝
57
+
58
+ No Plan-Build-Run project found.
59
+
60
+ **To fix:** Run `/pbr:begin` to start a new project, or `/pbr:scan` to analyze an existing codebase.
61
+ ```
62
+ - Stop here if no project found.
63
+
64
+ 2. **`.planning/STATE.md`** Current position, progress, blockers
65
+ - Extract: current phase, current plan, overall progress, blockers, session info
66
+
67
+ 3. **`.planning/ROADMAP.md`** Phase overview
68
+ - Extract: all phases with names, descriptions, status indicators
69
+
70
+ 4. **`.planning/PROJECT.md`** Project metadata (if exists)
71
+ - Extract: project name, milestone info
72
+
73
+ 5. **`.planning/REQUIREMENTS.md`** — Requirements (if exists)
74
+ - Extract: requirement completion status if tracked
75
+
76
+ ### Step 2: Scan Phase Directories
77
+
78
+ For each phase listed in ROADMAP.md:
79
+
80
+ 1. Check if the phase directory exists in `.planning/phases/`
81
+ 2. If exists, scan for:
82
+ - `CONTEXT.md` discussion happened
83
+ - `*-PLAN.md` or `PLAN.md` files plans exist
84
+ - `*-SUMMARY.md` or `SUMMARY.md` files plans were executed
85
+ - `VERIFICATION.md` — phase was reviewed
86
+ - `.continue-here.md` paused work
87
+
88
+ 3. Calculate phase status:
89
+
90
+ | Condition | Status |
91
+ |-----------|--------|
92
+ | No directory | Not started |
93
+ | Directory exists, no plans | Discussed only |
94
+ | Plans exist, no summaries | Planned (ready to build) |
95
+ | Some summaries, not all | Building (in progress) |
96
+ | All summaries exist | Built (ready to review) |
97
+ | VERIFICATION.md exists, status=passed | Verified (complete) |
98
+ | VERIFICATION.md exists, status=gaps_found | Needs fixes |
99
+
100
+ 4. Calculate progress percentage:
101
+ - Count total plans across all phases
102
+ - Count plans with SUMMARY.md (status=completed)
103
+ - Progress = completed / total * 100
104
+
105
+ ### Step 2b: Check STATE.md Size and Consistency
106
+
107
+ Count lines in `.planning/STATE.md`. If over 150 lines, add a warning to the dashboard:
108
+ ```
109
+ Warning: STATE.md is {N} lines (limit: 150). Run any build/review command to auto-compact it.
110
+ ```
111
+
112
+ **Discrepancy check:** Compare STATE.md phase/plan/status claims against the filesystem:
113
+ - Does the phase directory exist? If not: `Warning: STATE.md references Phase {N} but no directory exists.`
114
+ - Does the plan count match? If not: `Warning: STATE.md says {X} plans but filesystem has {Y}.`
115
+ - Does the status match? If STATE.md says "verified" but no `VERIFICATION.md` exists: `Warning: STATE.md says "verified" but no VERIFICATION.md found.`
116
+
117
+ If any discrepancy found, add: `Run /pbr:resume to auto-reconcile STATE.md.`
118
+
119
+ ### Step 3: Check for Special Conditions
120
+
121
+ #### Paused Work
122
+ - Search for `.continue-here.md` files in `.planning/phases/`
123
+ - If found: note the phase and brief description of where work stopped
124
+
125
+ #### Verification Gaps
126
+ - Search for `VERIFICATION.md` files with `gaps_found` status
127
+ - If found: note which phases have gaps
128
+
129
+ #### Cross-Phase Re-Planning Check
130
+ - For each planned phase, check if its dependency phases have been built yet
131
+ - Logic:
132
+ 1. Read ROADMAP.md to find phase dependencies (phases that come before)
133
+ 2. If Phase N has plans but Phase N-1 doesn't have summaries (wasn't built yet):
134
+ - This means Phase N was planned without knowledge of what Phase N-1 actually produced
135
+ - Flag for re-planning
136
+ - **Dependency fingerprint check**: For each planned phase with `dependency_fingerprints` in plan frontmatter:
137
+ 1. Compare the fingerprints against current dependency SUMMARY.md files
138
+ 2. If any fingerprint is stale (dependency was re-built after the plan was created):
139
+ - Flag: "WARN: Phase {N} plans may be stale — dependency phase {M} was re-built since planning. Consider re-planning with `/pbr:plan {N}`."
140
+
141
+ #### Active Debug Sessions
142
+ - Check `.planning/debug/` for files with `status: active`
143
+ - Note any active debug sessions
144
+
145
+ #### Pending Todos
146
+ - Check `.planning/todos/pending/` for pending todo files
147
+ - Count and summarize if any exist
148
+
149
+ #### Quick Notes
150
+ - Check `.planning/NOTES.md` for active note entries
151
+ - Count active notes (lines matching `^- \[` that don't contain `[promoted]`)
152
+ - Also check `~/.claude/notes.md` for global notes
153
+
154
+ #### Quick Tasks
155
+ - Check `.planning/quick/` for recent quick tasks
156
+ - Note any failed or partial quick tasks
157
+
158
+ ### Step 4: Display Status Dashboard
159
+
160
+ Present the status in this format:
161
+
162
+ ```
163
+ Project: {name from PROJECT.md or config.json}
164
+ Phase: {current} of {total} -- {current phase name}
165
+ Progress: [{progress bar}] {percentage}%
166
+
167
+ Phase Status:
168
+ | Phase | Status | Plans | Progress |
169
+ |-------|--------|-------|----------|
170
+ | 1. {name} | {status indicator} {status text} | {completed}/{total} | {percentage}% |
171
+ | 2. {name} | {status indicator} {status text} | {completed}/{total} | {percentage}% |
172
+ | ...
173
+
174
+ {If blockers exist:}
175
+ Blockers:
176
+ - {blocker 1}
177
+ - {blocker 2}
178
+
179
+ {If no blockers:}
180
+ Blockers: None
181
+
182
+ {If paused work:}
183
+ Paused: Phase {N} has a checkpoint at plan {M}. Run `/pbr:resume` to continue.
184
+
185
+ {If verification gaps:}
186
+ Gaps: Phase {N} verification found {count} gaps. Run `/pbr:plan {N} --gaps` to address.
187
+
188
+ {If cross-phase re-planning needed:}
189
+ Warning: Phase {N} was planned before Phase {M} was built. Consider re-planning with `/pbr:plan {N}`.
190
+
191
+ {If active debug sessions:}
192
+ Debug: {count} active session(s). Run `/pbr:debug` to continue.
193
+
194
+ {If pending todos:}
195
+ Todos: {count} pending. Run `/pbr:todo list` to see them.
196
+
197
+ {If notes exist:}
198
+ Notes: {count} quick capture(s). `/pbr:note list` to review.
199
+ ```
200
+
201
+ ### Progress Bar
202
+
203
+ Generate a 20-character progress bar:
204
+
205
+ ```
206
+ [████████████████████] 100% (all filled)
207
+ [████████████████░░░░] 80% (16 filled, 4 empty)
208
+ [████████░░░░░░░░░░░░] 40% (8 filled, 12 empty)
209
+ [░░░░░░░░░░░░░░░░░░░░] 0% (all empty)
210
+ ```
211
+
212
+ Use Unicode block characters:
213
+ - Filled: `█` (full block, U+2588)
214
+ - Empty: `░` (light shade, U+2591)
215
+
216
+ ### Status Indicators
217
+
218
+ Use indicators from `references/ui-formatting.md`:
219
+
220
+ | Status | Indicator |
221
+ |--------|-----------|
222
+ | Complete/Verified | checkmark |
223
+ | In Progress | half-filled circle |
224
+ | Not started | empty circle |
225
+ | Needs fixes | warning triangle |
226
+ | Blocked | blocked symbol |
227
+
228
+ ### Step 5: Smart Routing
229
+
230
+ Based on the project state, suggest the single most logical next action:
231
+
232
+ **Decision tree:**
233
+
234
+ ```
235
+ 1. Is there paused work (.continue-here.md)?
236
+ YES → "Resume your work: `/pbr:resume`"
237
+
238
+ 2. Is there a verification with gaps?
239
+ YES → "Fix verification gaps: `/pbr:plan {N} --gaps`"
240
+
241
+ 3. Is the current phase planned but not built?
242
+ YES "Build the current phase: `/pbr:build {N}`"
243
+
244
+ 4. Is the current phase built but not reviewed?
245
+ YES → "Review what was built: `/pbr:review {N}`"
246
+
247
+ 5. Is the current phase verified (complete)?
248
+ YES → Is there a next phase?
249
+ YES → Was next phase already planned?
250
+ YES Does it need re-planning? (dependency phase changed)
251
+ YES → "Re-plan with updated context: `/pbr:plan {N+1}`"
252
+ NO → "Build the next phase: `/pbr:build {N+1}`"
253
+ NO → "Plan the next phase: `/pbr:plan {N+1}`"
254
+ NO "All phases complete! Your next steps:\n -> /pbr:milestone audit verify cross-phase integration (recommended)\n -> /pbr:milestone complete — archive this milestone and create a git tag\n -> /pbr:milestone new — start planning the next set of features"
255
+
256
+ 6. Is the current phase not started?
257
+ YES → Has it been discussed?
258
+ YES → "Plan this phase: `/pbr:plan {N}`"
259
+ NO "Start with a discussion: `/pbr:discuss {N}` or jump to `/pbr:plan {N}`"
260
+
261
+ 7. Active debug sessions?
262
+ YES → "Continue debugging: `/pbr:debug`"
263
+
264
+ 8. Nothing active?
265
+ "Start your project: `/pbr:begin`"
266
+ ```
267
+
268
+ **If only one reasonable next action exists**, present it with branded routing:
269
+
270
+ ```
271
+ ───────────────────────────────────────────────────────────────
272
+
273
+ ## Next Up
274
+
275
+ **{brief explanation}**
276
+
277
+ `{suggested command}`
278
+
279
+ <sub>`/clear` first fresh context window</sub>
280
+
281
+ ───────────────────────────────────────────────────────────────
282
+ ```
283
+
284
+ **If multiple reasonable next actions exist** (2-3 alternatives), use the **action-routing** pattern (see `skills/shared/gate-prompts.md`):
285
+
286
+ Use AskUserQuestion:
287
+ question: "What would you like to do next?"
288
+ header: "Next Step"
289
+ options:
290
+ - label: "{primary action}" description: "{brief explanation}"
291
+ - label: "{alternative 1}" description: "{brief explanation}"
292
+ - label: "{alternative 2}" description: "{brief explanation}"
293
+ - label: "Something else" description: "Enter a different command"
294
+ multiSelect: false
295
+
296
+ Build options dynamically from the decision tree results. Always include "Something else" as the last option. Generate 1-3 real options based on the state analysis.
297
+
298
+ **After user selects an option:**
299
+ - If they selected a real action: display "Run: `/pbr:{action} {args}`" so they can execute it
300
+ - If they selected "Something else": ask what they'd like to do (freeform text)
301
+ - This skill remains read-only — display the command, do not execute it
302
+
303
+ ---
304
+
305
+ ## Edge Cases
306
+
307
+ ### No `.planning/` directory at all
308
+ - Display: "No Plan-Build-Run project found."
309
+ - Suggest: `/pbr:begin` to start a new project
310
+ - Also mention: `/pbr:scan` if there's an existing codebase to analyze first
311
+
312
+ ### STATE.md exists but is outdated
313
+ - STATE.md may not reflect the actual file system state
314
+ - Always verify by scanning phase directories
315
+ - If STATE.md disagrees with the file system, note the discrepancy:
316
+ "Note: STATE.md says Phase 2 is in progress, but all plans have summaries. Status may need updating."
317
+
318
+ ### All phases complete
319
+ - Celebrate briefly: "All phases complete!"
320
+ - Suggest: `/pbr:milestone audit` to verify cross-phase integration (recommended first)
321
+ - Then: `/pbr:milestone complete` to archive the milestone and tag it
322
+ - Or: `/pbr:milestone new` to start the next set of features
323
+
324
+ ### ROADMAP.md has phases but no phase directories
325
+ - This is normal for future phases
326
+ - Show them as "Not started" with no plan counts
327
+
328
+ ### Multiple milestones
329
+ - If PROJECT.md shows multiple milestones, display the current one
330
+ - Show completed milestones as collapsed summary
331
+
332
+ ### Large project (many phases)
333
+ - If more than 8 phases, consider grouping:
334
+ - Completed phases: collapsed summary
335
+ - Current phase: full detail
336
+ - Upcoming phases: brief list
337
+
338
+ ---
339
+
340
+ ## Performance
341
+
342
+ This skill should be fast. It's a status check, not an analysis.
343
+
344
+ **DO:**
345
+ - Read files quickly (frontmatter only where possible)
346
+ - Use Glob to find files efficiently
347
+ - Cache nothing (always read fresh state)
348
+
349
+ **DO NOT:**
350
+ - Read full SUMMARY.md contents (frontmatter is enough)
351
+ - Read plan file contents (just check existence)
352
+ - Run any Bash commands
353
+ - Modify any files
354
+ - Spawn any Task agents
355
+
356
+ ---
357
+
358
+ ## Anti-Patterns
359
+
360
+ 1. **DO NOT** modify any files — this is read-only
361
+ 2. **DO NOT** run Bash commands — use Read and Glob only
362
+ 3. **DO NOT** show overwhelming detail — keep it scannable
363
+ 4. **DO NOT** hide problems — surface blockers, gaps, and warnings prominently
364
+ 5. **DO NOT** suggest multiple actions without prioritizing — the primary suggestion should be clear
365
+ 6. **DO NOT** re-read full file contents when frontmatter is sufficient
366
+ 7. **DO NOT** show completed phases in full detail unless specifically relevant
367
+ 8. **DO NOT** execute the suggested action — present it for the user to run manually. Use /pbr:continue for auto-execution.