@sienklogic/plan-build-run 2.0.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.
- package/CHANGELOG.md +56 -0
- package/CLAUDE.md +149 -0
- package/LICENSE +21 -0
- package/README.md +247 -0
- package/dashboard/bin/cli.js +25 -0
- package/dashboard/package.json +34 -0
- package/dashboard/public/.gitkeep +0 -0
- package/dashboard/public/css/layout.css +406 -0
- package/dashboard/public/css/status-colors.css +98 -0
- package/dashboard/public/js/htmx-title.js +5 -0
- package/dashboard/public/js/sidebar-toggle.js +20 -0
- package/dashboard/src/app.js +78 -0
- package/dashboard/src/middleware/errorHandler.js +52 -0
- package/dashboard/src/middleware/notFoundHandler.js +9 -0
- package/dashboard/src/repositories/planning.repository.js +128 -0
- package/dashboard/src/routes/events.routes.js +40 -0
- package/dashboard/src/routes/index.routes.js +31 -0
- package/dashboard/src/routes/pages.routes.js +195 -0
- package/dashboard/src/server.js +42 -0
- package/dashboard/src/services/dashboard.service.js +222 -0
- package/dashboard/src/services/phase.service.js +167 -0
- package/dashboard/src/services/project.service.js +57 -0
- package/dashboard/src/services/roadmap.service.js +171 -0
- package/dashboard/src/services/sse.service.js +58 -0
- package/dashboard/src/services/todo.service.js +254 -0
- package/dashboard/src/services/watcher.service.js +48 -0
- package/dashboard/src/views/coming-soon.ejs +11 -0
- package/dashboard/src/views/error.ejs +13 -0
- package/dashboard/src/views/index.ejs +5 -0
- package/dashboard/src/views/layout.ejs +1 -0
- package/dashboard/src/views/partials/dashboard-content.ejs +77 -0
- package/dashboard/src/views/partials/footer.ejs +3 -0
- package/dashboard/src/views/partials/head.ejs +21 -0
- package/dashboard/src/views/partials/header.ejs +12 -0
- package/dashboard/src/views/partials/layout-bottom.ejs +15 -0
- package/dashboard/src/views/partials/layout-top.ejs +8 -0
- package/dashboard/src/views/partials/phase-content.ejs +181 -0
- package/dashboard/src/views/partials/phases-content.ejs +117 -0
- package/dashboard/src/views/partials/roadmap-content.ejs +142 -0
- package/dashboard/src/views/partials/sidebar.ejs +38 -0
- package/dashboard/src/views/partials/todo-create-content.ejs +53 -0
- package/dashboard/src/views/partials/todo-detail-content.ejs +38 -0
- package/dashboard/src/views/partials/todos-content.ejs +53 -0
- package/dashboard/src/views/phase-detail.ejs +5 -0
- package/dashboard/src/views/phases.ejs +5 -0
- package/dashboard/src/views/roadmap.ejs +5 -0
- package/dashboard/src/views/todo-create.ejs +5 -0
- package/dashboard/src/views/todo-detail.ejs +5 -0
- package/dashboard/src/views/todos.ejs +5 -0
- package/package.json +57 -0
- package/plugins/pbr/.claude-plugin/plugin.json +13 -0
- package/plugins/pbr/UI-CONSISTENCY-GAPS.md +61 -0
- package/plugins/pbr/agents/codebase-mapper.md +271 -0
- package/plugins/pbr/agents/debugger.md +281 -0
- package/plugins/pbr/agents/executor.md +407 -0
- package/plugins/pbr/agents/general.md +164 -0
- package/plugins/pbr/agents/integration-checker.md +141 -0
- package/plugins/pbr/agents/plan-checker.md +280 -0
- package/plugins/pbr/agents/planner.md +358 -0
- package/plugins/pbr/agents/researcher.md +363 -0
- package/plugins/pbr/agents/synthesizer.md +230 -0
- package/plugins/pbr/agents/verifier.md +454 -0
- package/plugins/pbr/commands/begin.md +5 -0
- package/plugins/pbr/commands/build.md +5 -0
- package/plugins/pbr/commands/config.md +5 -0
- package/plugins/pbr/commands/continue.md +5 -0
- package/plugins/pbr/commands/debug.md +5 -0
- package/plugins/pbr/commands/discuss.md +5 -0
- package/plugins/pbr/commands/explore.md +5 -0
- package/plugins/pbr/commands/health.md +5 -0
- package/plugins/pbr/commands/help.md +5 -0
- package/plugins/pbr/commands/import.md +5 -0
- package/plugins/pbr/commands/milestone.md +5 -0
- package/plugins/pbr/commands/note.md +5 -0
- package/plugins/pbr/commands/pause.md +5 -0
- package/plugins/pbr/commands/plan.md +5 -0
- package/plugins/pbr/commands/quick.md +5 -0
- package/plugins/pbr/commands/resume.md +5 -0
- package/plugins/pbr/commands/review.md +5 -0
- package/plugins/pbr/commands/scan.md +5 -0
- package/plugins/pbr/commands/setup.md +5 -0
- package/plugins/pbr/commands/status.md +5 -0
- package/plugins/pbr/commands/todo.md +5 -0
- package/plugins/pbr/contexts/dev.md +27 -0
- package/plugins/pbr/contexts/research.md +28 -0
- package/plugins/pbr/contexts/review.md +36 -0
- package/plugins/pbr/hooks/hooks.json +183 -0
- package/plugins/pbr/references/agent-anti-patterns.md +24 -0
- package/plugins/pbr/references/agent-interactions.md +134 -0
- package/plugins/pbr/references/agent-teams.md +54 -0
- package/plugins/pbr/references/checkpoints.md +157 -0
- package/plugins/pbr/references/common-bug-patterns.md +13 -0
- package/plugins/pbr/references/continuation-format.md +212 -0
- package/plugins/pbr/references/deviation-rules.md +112 -0
- package/plugins/pbr/references/git-integration.md +226 -0
- package/plugins/pbr/references/integration-patterns.md +117 -0
- package/plugins/pbr/references/model-profiles.md +99 -0
- package/plugins/pbr/references/model-selection.md +31 -0
- package/plugins/pbr/references/pbr-rules.md +193 -0
- package/plugins/pbr/references/plan-authoring.md +181 -0
- package/plugins/pbr/references/plan-format.md +283 -0
- package/plugins/pbr/references/planning-config.md +213 -0
- package/plugins/pbr/references/questioning.md +214 -0
- package/plugins/pbr/references/reading-verification.md +127 -0
- package/plugins/pbr/references/stub-patterns.md +160 -0
- package/plugins/pbr/references/subagent-coordination.md +119 -0
- package/plugins/pbr/references/ui-formatting.md +399 -0
- package/plugins/pbr/references/verification-patterns.md +198 -0
- package/plugins/pbr/references/wave-execution.md +95 -0
- package/plugins/pbr/scripts/auto-continue.js +80 -0
- package/plugins/pbr/scripts/check-dangerous-commands.js +136 -0
- package/plugins/pbr/scripts/check-doc-sprawl.js +102 -0
- package/plugins/pbr/scripts/check-phase-boundary.js +196 -0
- package/plugins/pbr/scripts/check-plan-format.js +270 -0
- package/plugins/pbr/scripts/check-roadmap-sync.js +252 -0
- package/plugins/pbr/scripts/check-skill-workflow.js +262 -0
- package/plugins/pbr/scripts/check-state-sync.js +476 -0
- package/plugins/pbr/scripts/check-subagent-output.js +144 -0
- package/plugins/pbr/scripts/config-schema.json +251 -0
- package/plugins/pbr/scripts/context-budget-check.js +287 -0
- package/plugins/pbr/scripts/event-handler.js +151 -0
- package/plugins/pbr/scripts/event-logger.js +92 -0
- package/plugins/pbr/scripts/hook-logger.js +76 -0
- package/plugins/pbr/scripts/hooks-schema.json +79 -0
- package/plugins/pbr/scripts/log-subagent.js +152 -0
- package/plugins/pbr/scripts/log-tool-failure.js +88 -0
- package/plugins/pbr/scripts/pbr-tools.js +1301 -0
- package/plugins/pbr/scripts/post-write-dispatch.js +66 -0
- package/plugins/pbr/scripts/post-write-quality.js +207 -0
- package/plugins/pbr/scripts/pre-bash-dispatch.js +56 -0
- package/plugins/pbr/scripts/pre-write-dispatch.js +62 -0
- package/plugins/pbr/scripts/progress-tracker.js +228 -0
- package/plugins/pbr/scripts/session-cleanup.js +254 -0
- package/plugins/pbr/scripts/status-line.js +285 -0
- package/plugins/pbr/scripts/suggest-compact.js +119 -0
- package/plugins/pbr/scripts/task-completed.js +45 -0
- package/plugins/pbr/scripts/track-context-budget.js +119 -0
- package/plugins/pbr/scripts/validate-commit.js +200 -0
- package/plugins/pbr/scripts/validate-plugin-structure.js +172 -0
- package/plugins/pbr/skills/begin/SKILL.md +545 -0
- package/plugins/pbr/skills/begin/templates/PROJECT.md.tmpl +33 -0
- package/plugins/pbr/skills/begin/templates/REQUIREMENTS.md.tmpl +18 -0
- package/plugins/pbr/skills/begin/templates/STATE.md.tmpl +49 -0
- package/plugins/pbr/skills/begin/templates/config.json.tmpl +63 -0
- package/plugins/pbr/skills/begin/templates/researcher-prompt.md.tmpl +19 -0
- package/plugins/pbr/skills/begin/templates/roadmap-prompt.md.tmpl +30 -0
- package/plugins/pbr/skills/begin/templates/synthesis-prompt.md.tmpl +16 -0
- package/plugins/pbr/skills/build/SKILL.md +962 -0
- package/plugins/pbr/skills/config/SKILL.md +241 -0
- package/plugins/pbr/skills/continue/SKILL.md +127 -0
- package/plugins/pbr/skills/debug/SKILL.md +489 -0
- package/plugins/pbr/skills/debug/templates/continuation-prompt.md.tmpl +16 -0
- package/plugins/pbr/skills/debug/templates/initial-investigation-prompt.md.tmpl +27 -0
- package/plugins/pbr/skills/discuss/SKILL.md +338 -0
- package/plugins/pbr/skills/discuss/templates/CONTEXT.md.tmpl +61 -0
- package/plugins/pbr/skills/discuss/templates/decision-categories.md +9 -0
- package/plugins/pbr/skills/explore/SKILL.md +362 -0
- package/plugins/pbr/skills/health/SKILL.md +186 -0
- package/plugins/pbr/skills/health/templates/check-pattern.md.tmpl +30 -0
- package/plugins/pbr/skills/health/templates/output-format.md.tmpl +63 -0
- package/plugins/pbr/skills/help/SKILL.md +140 -0
- package/plugins/pbr/skills/import/SKILL.md +490 -0
- package/plugins/pbr/skills/milestone/SKILL.md +673 -0
- package/plugins/pbr/skills/milestone/templates/audit-report.md.tmpl +48 -0
- package/plugins/pbr/skills/milestone/templates/stats-file.md.tmpl +30 -0
- package/plugins/pbr/skills/note/SKILL.md +212 -0
- package/plugins/pbr/skills/pause/SKILL.md +235 -0
- package/plugins/pbr/skills/pause/templates/continue-here.md.tmpl +71 -0
- package/plugins/pbr/skills/plan/SKILL.md +628 -0
- package/plugins/pbr/skills/plan/decimal-phase-calc.md +98 -0
- package/plugins/pbr/skills/plan/templates/checker-prompt.md.tmpl +21 -0
- package/plugins/pbr/skills/plan/templates/gap-closure-prompt.md.tmpl +32 -0
- package/plugins/pbr/skills/plan/templates/planner-prompt.md.tmpl +38 -0
- package/plugins/pbr/skills/plan/templates/researcher-prompt.md.tmpl +19 -0
- package/plugins/pbr/skills/plan/templates/revision-prompt.md.tmpl +23 -0
- package/plugins/pbr/skills/quick/SKILL.md +335 -0
- package/plugins/pbr/skills/resume/SKILL.md +388 -0
- package/plugins/pbr/skills/review/SKILL.md +652 -0
- package/plugins/pbr/skills/review/templates/debugger-prompt.md.tmpl +60 -0
- package/plugins/pbr/skills/review/templates/gap-planner-prompt.md.tmpl +40 -0
- package/plugins/pbr/skills/review/templates/verifier-prompt.md.tmpl +115 -0
- package/plugins/pbr/skills/scan/SKILL.md +269 -0
- package/plugins/pbr/skills/scan/templates/mapper-prompt.md.tmpl +201 -0
- package/plugins/pbr/skills/setup/SKILL.md +227 -0
- package/plugins/pbr/skills/shared/commit-planning-docs.md +35 -0
- package/plugins/pbr/skills/shared/config-loading.md +102 -0
- package/plugins/pbr/skills/shared/context-budget.md +40 -0
- package/plugins/pbr/skills/shared/context-loader-task.md +86 -0
- package/plugins/pbr/skills/shared/digest-select.md +79 -0
- package/plugins/pbr/skills/shared/domain-probes.md +125 -0
- package/plugins/pbr/skills/shared/error-reporting.md +79 -0
- package/plugins/pbr/skills/shared/gate-prompts.md +388 -0
- package/plugins/pbr/skills/shared/phase-argument-parsing.md +45 -0
- package/plugins/pbr/skills/shared/progress-display.md +53 -0
- package/plugins/pbr/skills/shared/revision-loop.md +81 -0
- package/plugins/pbr/skills/shared/state-loading.md +62 -0
- package/plugins/pbr/skills/shared/state-update.md +161 -0
- package/plugins/pbr/skills/shared/universal-anti-patterns.md +33 -0
- package/plugins/pbr/skills/status/SKILL.md +353 -0
- package/plugins/pbr/skills/todo/SKILL.md +181 -0
- package/plugins/pbr/templates/CONTEXT.md.tmpl +52 -0
- package/plugins/pbr/templates/INTEGRATION-REPORT.md.tmpl +151 -0
- package/plugins/pbr/templates/RESEARCH-SUMMARY.md.tmpl +97 -0
- package/plugins/pbr/templates/ROADMAP.md.tmpl +40 -0
- package/plugins/pbr/templates/SUMMARY.md.tmpl +81 -0
- package/plugins/pbr/templates/VERIFICATION-DETAIL.md.tmpl +116 -0
- package/plugins/pbr/templates/codebase/ARCHITECTURE.md.tmpl +98 -0
- package/plugins/pbr/templates/codebase/CONCERNS.md.tmpl +93 -0
- package/plugins/pbr/templates/codebase/CONVENTIONS.md.tmpl +104 -0
- package/plugins/pbr/templates/codebase/INTEGRATIONS.md.tmpl +78 -0
- package/plugins/pbr/templates/codebase/STACK.md.tmpl +78 -0
- package/plugins/pbr/templates/codebase/STRUCTURE.md.tmpl +80 -0
- package/plugins/pbr/templates/codebase/TESTING.md.tmpl +107 -0
- package/plugins/pbr/templates/continue-here.md.tmpl +73 -0
- package/plugins/pbr/templates/prompt-partials/phase-project-context.md.tmpl +37 -0
- package/plugins/pbr/templates/research/ARCHITECTURE.md.tmpl +124 -0
- package/plugins/pbr/templates/research/STACK.md.tmpl +71 -0
- package/plugins/pbr/templates/research/SUMMARY.md.tmpl +112 -0
- package/plugins/pbr/templates/research-outputs/phase-research.md.tmpl +81 -0
- package/plugins/pbr/templates/research-outputs/project-research.md.tmpl +99 -0
- package/plugins/pbr/templates/research-outputs/synthesis.md.tmpl +36 -0
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: explore
|
|
3
|
+
description: "Explore ideas, think through approaches, and route insights to the right artifacts."
|
|
4
|
+
allowed-tools: Read, Write, Glob, Grep, Task, AskUserQuestion
|
|
5
|
+
argument-hint: "[topic]"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /pbr:explore — Idea Exploration
|
|
9
|
+
|
|
10
|
+
You are running the **explore** skill. Your job is to help the user think through ideas that might become a todo, requirement, phase, decision, or nothing yet. This is Socratic conversation, not requirements gathering. No phase number is needed.
|
|
11
|
+
|
|
12
|
+
This skill runs **inline** (no Task delegation), with optional Task() spawns for context loading and mid-conversation research.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Context Budget
|
|
17
|
+
|
|
18
|
+
Reference: `skills/shared/context-budget.md` for the universal orchestrator rules.
|
|
19
|
+
|
|
20
|
+
Additionally for this skill:
|
|
21
|
+
- **Minimize** file reads — this is a thinking skill, not a code analysis skill
|
|
22
|
+
- **Delegate** deep research to a researcher subagent if investigation exceeds 3-4 file reads
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## How /pbr:explore Differs from /pbr:discuss
|
|
27
|
+
|
|
28
|
+
| | /pbr:discuss | /pbr:explore |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| Purpose | Make decisions for a phase | Discover what you actually want |
|
|
31
|
+
| Structure | Pre-computed gray areas with options | Open-ended Socratic conversation |
|
|
32
|
+
| Requires | Phase number | Nothing |
|
|
33
|
+
| Output | CONTEXT.md (locked decisions) | Routes to the right artifact |
|
|
34
|
+
| Feels like | Making decisions | Thinking with a partner |
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Invocation
|
|
39
|
+
|
|
40
|
+
- `/pbr:explore` — Open-ended: "I have an idea"
|
|
41
|
+
- `/pbr:explore auth` — Topic-specific exploration
|
|
42
|
+
- `/pbr:explore "should we add caching?"` — Specific question
|
|
43
|
+
|
|
44
|
+
Parse `$ARGUMENTS` for an optional topic. If provided, use it to seed the opening question. If empty, start fully open-ended.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Pre-Conversation Context Loader
|
|
49
|
+
|
|
50
|
+
Reference: `skills/shared/context-loader-task.md` for the full briefing Task() pattern.
|
|
51
|
+
|
|
52
|
+
**Only runs if `.planning/` directory exists.** Fresh explores with no project skip this entirely.
|
|
53
|
+
|
|
54
|
+
When a project exists, spawn a briefing Task() per the context-loader-task pattern with `skill_purpose` = "exploring new ideas". If a topic was provided, use the topic-scoped variation with that topic.
|
|
55
|
+
|
|
56
|
+
Use the briefing to inform your conversation — reference existing decisions, avoid re-litigating settled questions, and connect new ideas to the existing project structure.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Conversation Design
|
|
61
|
+
|
|
62
|
+
The conversation is Socratic, not extractive. You are a thinking partner, not an interviewer.
|
|
63
|
+
|
|
64
|
+
### Principles
|
|
65
|
+
|
|
66
|
+
1. **Open with curiosity.** Start with "What are you thinking about?" or "What's on your mind?" — not "Please describe the feature you want."
|
|
67
|
+
|
|
68
|
+
2. **Follow their energy.** Dig into what excites or concerns them. If they light up about a technical approach, explore it. If they hesitate, probe why.
|
|
69
|
+
|
|
70
|
+
3. **Surface implications.** "If you go with X, that usually means Y and Z. Is that intentional?" Connect their idea to downstream consequences they may not see yet.
|
|
71
|
+
|
|
72
|
+
4. **Challenge with alternatives.** "You mentioned X, but have you considered Y?" Don't be adversarial — offer genuine alternatives that might fit better.
|
|
73
|
+
|
|
74
|
+
5. **Present trade-offs, not options.** "A gives you speed but locks you into a vendor. B is slower but keeps options open." Frame choices as trade-offs with real consequences, not a menu.
|
|
75
|
+
|
|
76
|
+
6. **Know when to research.** "I'm not sure about the best approach here. Want me to research it?" Don't fake knowledge — admit gaps and offer to investigate.
|
|
77
|
+
|
|
78
|
+
7. **Don't rush to outputs.** Explore until understanding is genuinely deep. The user will know when they're ready to wrap up.
|
|
79
|
+
|
|
80
|
+
### Domain-Aware Probing
|
|
81
|
+
|
|
82
|
+
Reference `skills/shared/domain-probes.md` for technology-specific follow-up questions. When the user mentions a domain (auth, caching, search, etc.), pick the 2-3 most relevant probes from that domain's table. Do NOT run through the table as a checklist.
|
|
83
|
+
|
|
84
|
+
### Conversation Starters by Invocation
|
|
85
|
+
|
|
86
|
+
| Invocation | Opening |
|
|
87
|
+
|---|---|
|
|
88
|
+
| `/pbr:explore` | "What are you thinking about?" |
|
|
89
|
+
| `/pbr:explore auth` | "What's your thinking on auth? Are you starting from scratch or rethinking something?" |
|
|
90
|
+
| `/pbr:explore "should we add caching?"` | "Caching for what specifically? What's feeling slow or what do you expect to be slow?" |
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Mid-Conversation Research
|
|
95
|
+
|
|
96
|
+
When a knowledge gap emerges during the conversation — you're unsure about a library, pattern, or approach — surface it explicitly.
|
|
97
|
+
|
|
98
|
+
**Ask the user** using the **yes-no** pattern from `skills/shared/gate-prompts.md`:
|
|
99
|
+
question: "I'm not sure about the best approach for {topic}. Research it now?"
|
|
100
|
+
options:
|
|
101
|
+
- label: "Research now" description: "Spawn a researcher agent to investigate"
|
|
102
|
+
- label: "Save for later" description: "Add as a research question for future investigation"
|
|
103
|
+
|
|
104
|
+
**If research now:**
|
|
105
|
+
|
|
106
|
+
Display to the user: `◐ Spawning researcher...`
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
Task({
|
|
110
|
+
subagent_type: "pbr:researcher",
|
|
111
|
+
prompt: "<research_assignment>
|
|
112
|
+
Topic: {specific research question}
|
|
113
|
+
Output file: .planning/research/{topic-slug}.md
|
|
114
|
+
Mode: project-research
|
|
115
|
+
|
|
116
|
+
Research this specific question: {the question}
|
|
117
|
+
|
|
118
|
+
Write findings to the output file.
|
|
119
|
+
</research_assignment>"
|
|
120
|
+
})
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
After the researcher completes:
|
|
124
|
+
- Read ONLY the frontmatter and summary section of the research file (not the full document)
|
|
125
|
+
- Incorporate the 2-3 key findings into the conversation
|
|
126
|
+
- Main context gets ~200 tokens of research insight, not the full document
|
|
127
|
+
|
|
128
|
+
**If save for later:**
|
|
129
|
+
- Note it as a research question to include in output routing
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Context Pressure Awareness
|
|
134
|
+
|
|
135
|
+
After approximately 10 exchanges or when the conversation has been substantial, mention:
|
|
136
|
+
|
|
137
|
+
"We've been exploring for a while. Want to wrap up with outputs, or keep going?"
|
|
138
|
+
|
|
139
|
+
Don't force a conclusion — some explorations legitimately need extended conversation. But surface the option so the user can choose.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Output Routing
|
|
144
|
+
|
|
145
|
+
This is the key innovation of `/pbr:explore`. At conversation end, the agent summarizes key insights and routes them to the right artifacts.
|
|
146
|
+
|
|
147
|
+
### Step 1: Summarize
|
|
148
|
+
|
|
149
|
+
Provide a concise summary of the key insights from the conversation:
|
|
150
|
+
- What was the core idea or question?
|
|
151
|
+
- What did we discover or decide?
|
|
152
|
+
- What remains uncertain?
|
|
153
|
+
|
|
154
|
+
### Step 2: Propose Outputs
|
|
155
|
+
|
|
156
|
+
Suggest specific outputs with reasoning. Present no more than 4 suggestions — focus on what matters most.
|
|
157
|
+
|
|
158
|
+
| Output Type | When to Suggest | Where It Goes |
|
|
159
|
+
|---|---|---|
|
|
160
|
+
| Todo | Small, actionable item discovered | `.planning/todos/pending/{id}.md` |
|
|
161
|
+
| Requirement | New project feature identified | Append to `REQUIREMENTS.md` with REQ-ID |
|
|
162
|
+
| Phase decision | Clarifies an existing phase | Write/append to phase `CONTEXT.md` |
|
|
163
|
+
| Research question | Needs deeper investigation | `.planning/research/questions.md` |
|
|
164
|
+
| New phase | Big enough for its own phase | Append to `ROADMAP.md` |
|
|
165
|
+
| Note | Not actionable yet, worth remembering | `.planning/notes/{slug}.md` |
|
|
166
|
+
| Quick capture | One-liner idea, no context needed | Suggest `/pbr:note <text>` to the user |
|
|
167
|
+
| Seed | Idea with trigger conditions | `.planning/seeds/SEED-{NNN}-{slug}.md` |
|
|
168
|
+
|
|
169
|
+
**Format for proposals:**
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
Based on our conversation, here's what I'd suggest capturing:
|
|
173
|
+
|
|
174
|
+
1. **Todo**: "{title}" — {why this is a todo and not something bigger}
|
|
175
|
+
2. **Seed**: "{title}" — {why this should wait for a trigger condition}
|
|
176
|
+
3. **Research question**: "{question}" — {why we need to investigate this}
|
|
177
|
+
|
|
178
|
+
Want to adjust, add, or remove any of these?
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Step 3: Confirm
|
|
182
|
+
|
|
183
|
+
Use the **output-routing** pattern from `skills/shared/gate-prompts.md`:
|
|
184
|
+
question: "How do you want to handle these proposed outputs?"
|
|
185
|
+
|
|
186
|
+
Handle responses:
|
|
187
|
+
- "Approve all": Create all suggested artifacts (proceed to Step 4)
|
|
188
|
+
- "Adjust": The user wants to modify proposals. Have a freeform conversation to adjust, then re-present with another AskUserQuestion.
|
|
189
|
+
- "Add more": The user has additional outputs. Gather them conversationally, add to the list, then re-present.
|
|
190
|
+
- "Skip": End the session without creating artifacts. This is fine — sometimes exploring is enough.
|
|
191
|
+
|
|
192
|
+
Do NOT create any artifacts until the user selects "Approve all" on the final set.
|
|
193
|
+
|
|
194
|
+
### Step 4: Create Artifacts
|
|
195
|
+
|
|
196
|
+
**Directory creation:** Before writing any artifact, ensure the target directory exists. Create `.planning/notes/`, `.planning/seeds/`, `.planning/research/`, or `.planning/todos/pending/` as needed if they don't already exist.
|
|
197
|
+
|
|
198
|
+
Create only the approved artifacts. A single explore session can produce multiple outputs across different types.
|
|
199
|
+
|
|
200
|
+
### Step 5: Completion
|
|
201
|
+
|
|
202
|
+
After creating artifacts (or if user chose "Skip"), display:
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
206
|
+
PLAN-BUILD-RUN ► EXPLORATION CAPTURED ✓
|
|
207
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
208
|
+
|
|
209
|
+
{count} artifacts created: {list of artifact types}
|
|
210
|
+
|
|
211
|
+
───────────────────────────────────────────────────────────────
|
|
212
|
+
|
|
213
|
+
## ▶ Next Up
|
|
214
|
+
|
|
215
|
+
**{Primary route based on what was created}**
|
|
216
|
+
|
|
217
|
+
{Smart routing — pick the most relevant primary command:}
|
|
218
|
+
- If a todo was created: **Manage tasks** → `/pbr:todo`
|
|
219
|
+
- If a phase decision was captured: **Plan the phase** → `/pbr:plan {N}`
|
|
220
|
+
- If a new phase was added: **Discuss the new phase** → `/pbr:discuss {N}`
|
|
221
|
+
- If research questions were logged: **Plan with research** → `/pbr:plan {N}`
|
|
222
|
+
- Default: **See project status** → `/pbr:status`
|
|
223
|
+
|
|
224
|
+
`{primary command}`
|
|
225
|
+
|
|
226
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
227
|
+
|
|
228
|
+
───────────────────────────────────────────────────────────────
|
|
229
|
+
|
|
230
|
+
**Also available:**
|
|
231
|
+
- `/pbr:status` — see project status
|
|
232
|
+
- `/pbr:continue` — execute next logical step
|
|
233
|
+
|
|
234
|
+
───────────────────────────────────────────────────────────────
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## Output Formats
|
|
240
|
+
|
|
241
|
+
### Todo
|
|
242
|
+
|
|
243
|
+
Write to `.planning/todos/pending/{NNN}-{slug}.md`. Follow the format used by the existing todo skill.
|
|
244
|
+
|
|
245
|
+
### Requirement
|
|
246
|
+
|
|
247
|
+
Append to `.planning/REQUIREMENTS.md` with the next available REQ-ID in the appropriate category. If the category doesn't exist, create it.
|
|
248
|
+
|
|
249
|
+
### Phase Decision
|
|
250
|
+
|
|
251
|
+
Append to `.planning/phases/{NN}-{slug}/CONTEXT.md`. If CONTEXT.md doesn't exist for that phase, create it with the standard header. Mark the decision as coming from `/pbr:explore`.
|
|
252
|
+
|
|
253
|
+
### Research Question
|
|
254
|
+
|
|
255
|
+
Append to `.planning/research/questions.md`. Create the file if it doesn't exist:
|
|
256
|
+
|
|
257
|
+
```markdown
|
|
258
|
+
# Research Questions
|
|
259
|
+
|
|
260
|
+
Questions identified during exploration that need deeper investigation.
|
|
261
|
+
|
|
262
|
+
## Open
|
|
263
|
+
|
|
264
|
+
- [ ] {Question} — Source: /pbr:explore session ({date})
|
|
265
|
+
|
|
266
|
+
## Answered
|
|
267
|
+
|
|
268
|
+
(none yet)
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### New Phase
|
|
272
|
+
|
|
273
|
+
Append to `.planning/ROADMAP.md` following the existing phase format. Assign the next available phase number.
|
|
274
|
+
|
|
275
|
+
### Note
|
|
276
|
+
|
|
277
|
+
Write to `.planning/notes/{slug}.md`:
|
|
278
|
+
|
|
279
|
+
```markdown
|
|
280
|
+
---
|
|
281
|
+
created: {ISO date}
|
|
282
|
+
source: "/pbr:explore session"
|
|
283
|
+
topic: "{topic}"
|
|
284
|
+
---
|
|
285
|
+
# {Title}
|
|
286
|
+
|
|
287
|
+
{Content from the conversation — key insights, reasoning, context}
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Seed
|
|
291
|
+
|
|
292
|
+
Write to `.planning/seeds/SEED-{NNN}-{slug}.md`:
|
|
293
|
+
|
|
294
|
+
```markdown
|
|
295
|
+
---
|
|
296
|
+
id: SEED-{NNN}
|
|
297
|
+
status: dormant
|
|
298
|
+
planted: {ISO date}
|
|
299
|
+
trigger: "{phase-slug}"
|
|
300
|
+
scope_estimate: "small|medium|large"
|
|
301
|
+
source: "/pbr:explore session"
|
|
302
|
+
---
|
|
303
|
+
# {Title}
|
|
304
|
+
|
|
305
|
+
## Context
|
|
306
|
+
{Why this idea came up}
|
|
307
|
+
|
|
308
|
+
## Breadcrumbs
|
|
309
|
+
{Related phases, technologies, user preferences}
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## Git Integration
|
|
315
|
+
|
|
316
|
+
Reference: `skills/shared/commit-planning-docs.md` for the standard commit pattern.
|
|
317
|
+
|
|
318
|
+
If `planning.commit_docs: true` in config.json, commit created artifacts:
|
|
319
|
+
|
|
320
|
+
```
|
|
321
|
+
docs(planning): capture explore session outputs
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
Stage only the files created during this session. Do not stage unrelated changes.
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
## Error Handling
|
|
329
|
+
|
|
330
|
+
### Researcher agent fails
|
|
331
|
+
If a mid-conversation researcher Task() fails, display:
|
|
332
|
+
```
|
|
333
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
334
|
+
║ ERROR ║
|
|
335
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
336
|
+
|
|
337
|
+
Research agent failed for topic: {topic}.
|
|
338
|
+
|
|
339
|
+
**To fix:** Continue the conversation without research, or try `/pbr:explore` again with a more specific topic.
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### Context loader fails
|
|
343
|
+
If the briefing Task() fails:
|
|
344
|
+
- Display: `⚠ Context loading failed. Proceeding without project context.`
|
|
345
|
+
- Continue with the exploration — the conversation can still be valuable without project context.
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
## Anti-Patterns
|
|
350
|
+
|
|
351
|
+
Reference: `skills/shared/universal-anti-patterns.md` for rules that apply to ALL skills.
|
|
352
|
+
|
|
353
|
+
Additionally for this skill:
|
|
354
|
+
|
|
355
|
+
1. **DO NOT** act like an interviewer — be a thinking partner
|
|
356
|
+
2. **DO NOT** cycle through a checklist of questions
|
|
357
|
+
3. **DO NOT** rush to outputs before understanding is deep
|
|
358
|
+
4. **DO NOT** auto-research without asking (unless config mode is autonomous)
|
|
359
|
+
5. **DO NOT** present more than 4 output suggestions — focus on what matters
|
|
360
|
+
6. **DO NOT** create artifacts the user didn't approve
|
|
361
|
+
7. **DO NOT** re-litigate decisions that are already locked in CONTEXT.md
|
|
362
|
+
8. **DO NOT** force the user to produce outputs — sometimes exploring is enough
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: health
|
|
3
|
+
description: "Check planning directory integrity. Find and fix corrupted state."
|
|
4
|
+
allowed-tools: Read, Bash, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /pbr:health — Planning Directory Diagnostics
|
|
8
|
+
|
|
9
|
+
You are running the **health** skill. Your job is to validate the integrity of the `.planning/` directory, report problems, and suggest targeted fixes. You never auto-repair anything.
|
|
10
|
+
|
|
11
|
+
This skill runs **inline** and is **read-only** — it never modifies any files.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## How Checks Work
|
|
16
|
+
|
|
17
|
+
Each check follows the common pattern. Read `skills/health/templates/check-pattern.md.tmpl` for the shared execution flow: target files, validate against rules, classify as PASS/FAIL/WARN/INFO, and record the result with a fix suggestion for any failures.
|
|
18
|
+
|
|
19
|
+
Read `skills/health/templates/output-format.md.tmpl` for the output format: summary table, status indicators, issues list, optional recent decisions, and final result line.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Checks
|
|
24
|
+
|
|
25
|
+
Run all 9 checks in order. Collect results and present them together at the end.
|
|
26
|
+
|
|
27
|
+
### Check 1: Structure
|
|
28
|
+
|
|
29
|
+
Validate `.planning/` exists with required scaffolding: `STATE.md`, `config.json`, `ROADMAP.md`.
|
|
30
|
+
|
|
31
|
+
- If `.planning/` is missing: FAIL the entire health check immediately. Display:
|
|
32
|
+
```
|
|
33
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
34
|
+
║ ERROR ║
|
|
35
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
36
|
+
|
|
37
|
+
No .planning/ directory found.
|
|
38
|
+
|
|
39
|
+
**To fix:** Run `/pbr:begin` to initialize.
|
|
40
|
+
```
|
|
41
|
+
Stop all further checks.
|
|
42
|
+
- PASS: All three required files exist
|
|
43
|
+
- FAIL: List each missing file — "Run `/pbr:begin` to re-initialize, or create the file manually."
|
|
44
|
+
|
|
45
|
+
### Check 2: Config Validity
|
|
46
|
+
|
|
47
|
+
Parse `.planning/config.json` as JSON. Check required fields: `projectName`, `version`. Check recommended fields: `phases`, `currentPhase`.
|
|
48
|
+
|
|
49
|
+
- PASS: Valid JSON with all required fields
|
|
50
|
+
- FAIL (parse error): Report the parse error message — "Open the file and correct the syntax."
|
|
51
|
+
- FAIL (missing required field): Report which field — "Add the field to config.json."
|
|
52
|
+
- WARN (missing recommended field): Report which field — "This may cause issues with some skills."
|
|
53
|
+
|
|
54
|
+
### Check 3: Phase Consistency
|
|
55
|
+
|
|
56
|
+
Compare directories in `.planning/phases/` against phases defined in `ROADMAP.md`.
|
|
57
|
+
|
|
58
|
+
- PASS: Every directory matches a ROADMAP.md phase; no started phases are missing directories
|
|
59
|
+
- FAIL (orphan directory): Directory exists but not in ROADMAP.md — "Add to ROADMAP.md or remove the directory."
|
|
60
|
+
- FAIL (missing directory): ROADMAP.md lists phase as in-progress but directory missing — "Create the directory or update ROADMAP.md."
|
|
61
|
+
- Note: Future phases without directories are normal (not a failure).
|
|
62
|
+
|
|
63
|
+
### Check 4: Plan/Summary Pairing
|
|
64
|
+
|
|
65
|
+
Glob all `PLAN*.md` and `SUMMARY*.md` in `.planning/phases/`. Match by plan number. A PLAN without SUMMARY is normal unless the phase is marked complete.
|
|
66
|
+
|
|
67
|
+
- PASS: All pairings valid, no orphaned summaries
|
|
68
|
+
- FAIL (orphaned summary): SUMMARY has no matching PLAN — "Verify and remove or re-pair."
|
|
69
|
+
- WARN (missing summary in complete phase): Phase marked complete but plan has no SUMMARY — "Execute with `/pbr:build` or mark phase incomplete."
|
|
70
|
+
|
|
71
|
+
### Check 5: STATE.md Accuracy
|
|
72
|
+
|
|
73
|
+
Extract current phase, plan identifier, and progress percentage from `STATE.md`. Verify each against the file system.
|
|
74
|
+
|
|
75
|
+
- PASS: All STATE.md references match the file system
|
|
76
|
+
- FAIL (stale phase): Referenced phase directory does not exist — "Update STATE.md to reflect the actual current phase."
|
|
77
|
+
- FAIL (stale plan): Referenced plan file does not exist — "Update STATE.md to the correct current plan."
|
|
78
|
+
- FAIL (wrong progress): Stated progress does not match actual plan/summary counts — "Update the progress in STATE.md."
|
|
79
|
+
- WARN (no position): No current phase or plan specified — "Fine for new projects but may indicate lost state."
|
|
80
|
+
|
|
81
|
+
### Check 6: Frontmatter Validity
|
|
82
|
+
|
|
83
|
+
Glob all `PLAN*.md` and `SUMMARY*.md` in `.planning/phases/`. Each file must start with `---`, have a closing `---`, contain valid YAML, and include required fields: `title`, `status`.
|
|
84
|
+
|
|
85
|
+
- PASS: All files have valid frontmatter with required fields
|
|
86
|
+
- FAIL (no frontmatter): "Add frontmatter block starting with `---` at the top of the file."
|
|
87
|
+
- FAIL (malformed): Report the YAML error — "Correct the YAML syntax between the `---` delimiters."
|
|
88
|
+
- FAIL (missing field): Report which field — "Add `{field}: {suggested value}` to the frontmatter."
|
|
89
|
+
|
|
90
|
+
### Check 7: ROADMAP/STATE Sync
|
|
91
|
+
|
|
92
|
+
Compare ROADMAP.md phase statuses against STATE.md current position. Flag if ROADMAP says a phase is "verified" but STATE says it is "building", or if phases after current are marked complete.
|
|
93
|
+
|
|
94
|
+
- PASS: ROADMAP and STATE are consistent
|
|
95
|
+
- FAIL (mismatch): Report both statuses — "Update STATE.md to match ROADMAP.md, or vice versa."
|
|
96
|
+
- WARN (drift): Current phase in STATE.md is behind phases marked complete in ROADMAP.md.
|
|
97
|
+
|
|
98
|
+
### Check 8: Hook Execution Log
|
|
99
|
+
|
|
100
|
+
Check if `.planning/logs/hooks.jsonl` exists. If so, scan last 20 entries for `result: "error"` or `result: "unlink-failed"`.
|
|
101
|
+
|
|
102
|
+
- PASS: Log exists with no recent errors
|
|
103
|
+
- WARN (errors found): Report error count and most recent error description — "Hooks may not be firing correctly."
|
|
104
|
+
- INFO (no log): "No hook log found. Normal if no hooks have fired yet."
|
|
105
|
+
|
|
106
|
+
### Check 9: Config Completeness
|
|
107
|
+
|
|
108
|
+
Read `.planning/config.json` and check for fields referenced by skills:
|
|
109
|
+
- `features.auto_continue` (build skill, auto-continue.js hook)
|
|
110
|
+
- `features.team_discussions` (config skill)
|
|
111
|
+
- `features.goal_verification` (build, review skills)
|
|
112
|
+
- `features.integration_verification` (review skill)
|
|
113
|
+
- `git.mode` (config skill)
|
|
114
|
+
|
|
115
|
+
- PASS: All expected fields present
|
|
116
|
+
- WARN (missing fields): Report each missing field and which skill uses it — "Run `/pbr:config` to set all options."
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Bonus: Recent Decisions
|
|
121
|
+
|
|
122
|
+
After all checks, look for `.planning/logs/decisions.jsonl`. If it exists, display the last 5 entries as `- {date}: {summary} (phase {N})`. If it does not exist, skip silently.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Completion
|
|
127
|
+
|
|
128
|
+
After all checks complete, display the branded result:
|
|
129
|
+
|
|
130
|
+
**If all checks passed (0 failures):**
|
|
131
|
+
```
|
|
132
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
133
|
+
PLAN-BUILD-RUN ► HEALTH CHECK PASSED ✓
|
|
134
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
135
|
+
|
|
136
|
+
{N} checks passed, {M} warnings
|
|
137
|
+
|
|
138
|
+
───────────────────────────────────────────────────────────────
|
|
139
|
+
|
|
140
|
+
## ▶ Next Up
|
|
141
|
+
|
|
142
|
+
**Continue your workflow** — planning directory is healthy
|
|
143
|
+
|
|
144
|
+
`/pbr:status`
|
|
145
|
+
|
|
146
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
147
|
+
|
|
148
|
+
───────────────────────────────────────────────────────────────
|
|
149
|
+
|
|
150
|
+
**Also available:**
|
|
151
|
+
- `/pbr:continue` — execute next logical step
|
|
152
|
+
- `/pbr:config` — adjust settings
|
|
153
|
+
|
|
154
|
+
───────────────────────────────────────────────────────────────
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**If failures found:**
|
|
158
|
+
```
|
|
159
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
160
|
+
PLAN-BUILD-RUN ► HEALTH CHECK FAILED ⚠
|
|
161
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
162
|
+
|
|
163
|
+
{N} checks passed, {F} failures, {M} warnings
|
|
164
|
+
|
|
165
|
+
───────────────────────────────────────────────────────────────
|
|
166
|
+
|
|
167
|
+
## ▶ Next Up
|
|
168
|
+
|
|
169
|
+
**Fix the failures** listed above, then re-run
|
|
170
|
+
|
|
171
|
+
`/pbr:health`
|
|
172
|
+
|
|
173
|
+
───────────────────────────────────────────────────────────────
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Anti-Patterns
|
|
179
|
+
|
|
180
|
+
1. **DO NOT** modify any files — this is strictly read-only
|
|
181
|
+
2. **DO NOT** auto-repair anything — present fixes and let the user decide
|
|
182
|
+
3. **DO NOT** skip checks that depend on missing files — report the dependency failure and continue
|
|
183
|
+
4. **DO NOT** treat warnings as failures in the summary count — only count FAIL items
|
|
184
|
+
5. **DO NOT** read full plan/summary contents — frontmatter and existence checks are sufficient
|
|
185
|
+
6. **DO NOT** fail silently — every check must produce an explicit PASS, WARN, or FAIL
|
|
186
|
+
7. **DO NOT** suggest running destructive commands — fixes should be safe, targeted edits
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Health Check Execution Pattern
|
|
2
|
+
|
|
3
|
+
Each of the 9 checks follows this common pattern. The check-specific details (what to read, what to validate, what constitutes PASS/FAIL) are defined in SKILL.md — this template describes only the shared execution flow.
|
|
4
|
+
|
|
5
|
+
## Pattern
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
For check {check_number} ({check_name}):
|
|
9
|
+
|
|
10
|
+
1. READ — Read the target file(s): {target_files}
|
|
11
|
+
2. VALIDATE — Apply the check-specific rules: {validation_rules}
|
|
12
|
+
3. CLASSIFY — Determine result:
|
|
13
|
+
- PASS: Validation succeeded, no issues found
|
|
14
|
+
- FAIL: A required condition is violated (counts toward issue total)
|
|
15
|
+
- WARN: A recommended condition is violated (does NOT count toward issue total)
|
|
16
|
+
- INFO: Informational note, not a problem
|
|
17
|
+
4. RECORD — Store the result with:
|
|
18
|
+
- Status: [PASS], [FAIL], [WARN], or [INFO]
|
|
19
|
+
- Check name (short label)
|
|
20
|
+
- One-line summary of finding
|
|
21
|
+
- For FAIL/WARN: the specific file, the problem, and a concrete fix suggestion
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Rules
|
|
25
|
+
|
|
26
|
+
- Every check MUST produce exactly one status line (PASS, FAIL, WARN, or INFO)
|
|
27
|
+
- FAIL results MUST include: file path, problem description, and fix suggestion
|
|
28
|
+
- Multiple failures within a single check produce multiple entries in the "Issues Found" section
|
|
29
|
+
- Checks never auto-repair — they report only
|
|
30
|
+
- If a check depends on a prior check's file (e.g., Check 2 needs config.json which Check 1 validates exists), and that file is missing, report the dependency failure and move on
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Health Check Output Format
|
|
2
|
+
|
|
3
|
+
Present results as a single report after all checks complete.
|
|
4
|
+
|
|
5
|
+
## Summary Table
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
Planning Health Check
|
|
9
|
+
=====================
|
|
10
|
+
|
|
11
|
+
[PASS] Structure .planning/ exists, all required files present
|
|
12
|
+
[FAIL] Config config.json missing required field `projectName`
|
|
13
|
+
[PASS] Phase consistency Directories match ROADMAP.md phases
|
|
14
|
+
[PASS] Plan/Summary All pairings valid
|
|
15
|
+
[FAIL] STATE.md accuracy Phase reference is stale
|
|
16
|
+
[PASS] Frontmatter All PLAN/SUMMARY files have valid frontmatter
|
|
17
|
+
[PASS] ROADMAP/STATE sync ROADMAP and STATE phase statuses are consistent
|
|
18
|
+
[PASS] Hook log No recent hook errors
|
|
19
|
+
[PASS] Config completeness All expected fields present
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Status Indicators
|
|
23
|
+
|
|
24
|
+
| Indicator | Meaning | Counts as Issue? |
|
|
25
|
+
|-----------|---------|-----------------|
|
|
26
|
+
| `[PASS]` | Check passed, no problems | No |
|
|
27
|
+
| `[FAIL]` | Required condition violated | **Yes** |
|
|
28
|
+
| `[WARN]` | Recommended condition violated | No |
|
|
29
|
+
| `[INFO]` | Informational note | No |
|
|
30
|
+
|
|
31
|
+
## Issues Section
|
|
32
|
+
|
|
33
|
+
Only shown when at least one FAIL exists:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
Issues Found: {count}
|
|
37
|
+
---------------
|
|
38
|
+
|
|
39
|
+
1. {problem description}
|
|
40
|
+
File: {file path}
|
|
41
|
+
Fix: {concrete fix suggestion}
|
|
42
|
+
|
|
43
|
+
2. {problem description}
|
|
44
|
+
File: {file path}
|
|
45
|
+
Fix: {concrete fix suggestion}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Recent Decisions (Bonus)
|
|
49
|
+
|
|
50
|
+
If `.planning/logs/decisions.jsonl` exists, show the last 5 entries:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
Recent Decisions:
|
|
54
|
+
- {date}: {summary} (phase {N})
|
|
55
|
+
- {date}: {summary} (phase {N})
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
If the file does not exist, skip silently.
|
|
59
|
+
|
|
60
|
+
## Final Line
|
|
61
|
+
|
|
62
|
+
- With issues: `Result: {N} issues found. Review and apply fixes manually.`
|
|
63
|
+
- All passed: `Result: All checks passed. Planning directory is healthy.`
|