@sienklogic/plan-build-run 2.9.0 → 2.10.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 +14 -0
- package/CLAUDE.md +2 -2
- package/package.json +5 -5
- package/plugins/copilot-pbr/plugin.json +1 -1
- package/plugins/copilot-pbr/references/pbr-rules.md +1 -0
- package/plugins/copilot-pbr/references/pbr-tools-cli.md +285 -0
- package/plugins/copilot-pbr/skills/dashboard/SKILL.md +12 -0
- package/plugins/copilot-pbr/skills/setup/SKILL.md +23 -0
- package/plugins/cursor-pbr/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor-pbr/references/pbr-rules.md +1 -0
- package/plugins/cursor-pbr/references/pbr-tools-cli.md +285 -0
- package/plugins/cursor-pbr/skills/dashboard/SKILL.md +12 -0
- package/plugins/cursor-pbr/skills/setup/SKILL.md +23 -0
- package/plugins/pbr/.claude-plugin/plugin.json +1 -1
- package/plugins/pbr/references/pbr-rules.md +1 -0
- package/plugins/pbr/references/pbr-tools-cli.md +285 -0
- package/plugins/pbr/skills/dashboard/SKILL.md +12 -0
- package/plugins/pbr/skills/setup/SKILL.md +23 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,20 @@ All notable changes to Plan-Build-Run will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.10.0](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.9.1...plan-build-run-v2.10.0) (2026-02-20)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **tools:** add post-compaction recovery, pbr-tools CLI reference, and dashboard UI banner ([84291f2](https://github.com/SienkLogic/plan-build-run/commit/84291f2ff0f9646eea96c02fd50073b8dd17487d))
|
|
14
|
+
|
|
15
|
+
## [2.9.1](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.9.0...plan-build-run-v2.9.1) (2026-02-20)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Documentation
|
|
19
|
+
|
|
20
|
+
* update CLAUDE.md coverage thresholds to 70% and test count to ~1666 ([7d10002](https://github.com/SienkLogic/plan-build-run/commit/7d10002a6d7814d98808f812060d48a4d49da1bb))
|
|
21
|
+
|
|
8
22
|
## [2.9.0](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.8.3...plan-build-run-v2.9.0) (2026-02-20)
|
|
9
23
|
|
|
10
24
|
|
package/CLAUDE.md
CHANGED
|
@@ -14,14 +14,14 @@ Plan-Build-Run is a **Claude Code plugin** that provides a structured developmen
|
|
|
14
14
|
## Commands
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
npm test # Run all Jest tests (~
|
|
17
|
+
npm test # Run all Jest tests (~1666 tests, 57 suites)
|
|
18
18
|
npm run lint # ESLint on plugins/pbr/scripts/ and tests/
|
|
19
19
|
npm run validate # Validate plugin directory structure
|
|
20
20
|
npx jest tests/validate-commit.test.js # Run a single test file
|
|
21
21
|
npx jest --coverage # Run with coverage report
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Coverage thresholds (enforced in `package.json`):
|
|
24
|
+
Coverage thresholds (enforced in `package.json`): 70% statements, 70% branches, 70% functions, 70% lines.
|
|
25
25
|
|
|
26
26
|
Dashboard (separate dependency tree):
|
|
27
27
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sienklogic/plan-build-run",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "Plan it, Build it, Run it — structured development workflow for Claude Code",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
],
|
|
48
48
|
"coverageThreshold": {
|
|
49
49
|
"global": {
|
|
50
|
-
"statements":
|
|
51
|
-
"branches":
|
|
52
|
-
"functions":
|
|
53
|
-
"lines":
|
|
50
|
+
"statements": 70,
|
|
51
|
+
"branches": 70,
|
|
52
|
+
"functions": 70,
|
|
53
|
+
"lines": 70
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pbr",
|
|
3
3
|
"displayName": "Plan-Build-Run",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.10.0",
|
|
5
5
|
"description": "Plan-Build-Run — Structured development workflow for GitHub Copilot CLI. Solves context rot through disciplined agent delegation, structured planning, atomic execution, and goal-backward verification.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "SienkLogic",
|
|
@@ -28,6 +28,7 @@ Condensed from the 3,100-line `docs/DEVELOPMENT-GUIDE.md`. When in doubt, these
|
|
|
28
28
|
13. Read STATE.md and config.json fully. Read ROADMAP.md by section. Read PLAN.md/SUMMARY.md/VERIFICATION.md frontmatter only.
|
|
29
29
|
14. Use the `limit` parameter on Read to restrict line counts.
|
|
30
30
|
15. Proactively suggest `/pbr:pause` when context gets heavy — before compaction, not after.
|
|
31
|
+
15b. **After compaction or context recovery**, always read `.planning/STATE.md` (especially the `## Session Continuity` section) before proceeding with any work. The PreCompact hook writes recovery state there automatically.
|
|
31
32
|
|
|
32
33
|
---
|
|
33
34
|
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
# pbr-tools.js CLI Reference
|
|
2
|
+
|
|
3
|
+
Command-line interface for structured JSON operations on `.planning/` state.
|
|
4
|
+
Skills and agents call this via Bash to avoid token-expensive text parsing.
|
|
5
|
+
|
|
6
|
+
```
|
|
7
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js <command> [args]
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
All commands output JSON to stdout. Errors output JSON with an `error` field to stderr (exit code 1).
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## State Commands
|
|
15
|
+
|
|
16
|
+
### `state load`
|
|
17
|
+
|
|
18
|
+
Returns full project state as a single JSON object.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state load
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Output:**
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"exists": true,
|
|
28
|
+
"config": { ... }, // config.json contents
|
|
29
|
+
"state": { // STATE.md frontmatter + parsed body
|
|
30
|
+
"version": 2,
|
|
31
|
+
"current_phase": "1",
|
|
32
|
+
"status": "building",
|
|
33
|
+
"progress_percent": 45,
|
|
34
|
+
"last_activity": "2025-01-15",
|
|
35
|
+
"last_command": "/pbr:build",
|
|
36
|
+
"blockers": []
|
|
37
|
+
},
|
|
38
|
+
"roadmap": { // Parsed ROADMAP.md
|
|
39
|
+
"phases": [{ "number": "01", "name": "...", "status": "planned", ... }]
|
|
40
|
+
},
|
|
41
|
+
"phase_count": 3,
|
|
42
|
+
"current_phase": "1",
|
|
43
|
+
"progress": { "phases": [...], "total_plans": 5, "completed_plans": 2, "percentage": 40 }
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### `state check-progress`
|
|
48
|
+
|
|
49
|
+
Recalculates progress from filesystem (plan files, summaries, verification).
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state check-progress
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Output:**
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"phases": [
|
|
59
|
+
{ "directory": "01-setup", "plans": 2, "summaries": 2, "completed": 2, "has_verification": true, "status": "verified" }
|
|
60
|
+
],
|
|
61
|
+
"total_plans": 5,
|
|
62
|
+
"completed_plans": 3,
|
|
63
|
+
"percentage": 60
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### `state update <field> <value>`
|
|
68
|
+
|
|
69
|
+
Atomically updates a single field in STATE.md. Uses file locking.
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state update current_phase 2
|
|
73
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state update status building
|
|
74
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state update last_activity now # auto-timestamps
|
|
75
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state update plans_complete 3
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Valid fields:** `current_phase`, `status`, `plans_complete`, `last_activity`
|
|
79
|
+
|
|
80
|
+
**Output:** `{ "success": true, "field": "status", "value": "building" }`
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Config Commands
|
|
85
|
+
|
|
86
|
+
### `config validate`
|
|
87
|
+
|
|
88
|
+
Validates `config.json` against the JSON schema. Detects both schema violations and semantic conflicts.
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js config validate
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Output:**
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"valid": true,
|
|
98
|
+
"errors": [],
|
|
99
|
+
"warnings": ["features.auto_continue=true with mode=interactive: auto_continue only fires in autonomous mode"]
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### `config resolve-depth [dir]`
|
|
104
|
+
|
|
105
|
+
Resolves the effective depth profile by merging base profile with user overrides.
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js config resolve-depth
|
|
109
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js config resolve-depth /path/to/.planning
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Output:** Full depth profile object with all resolved values (research rounds, plan detail level, verification depth, etc.)
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Plan & Phase Commands
|
|
117
|
+
|
|
118
|
+
### `plan-index <phase>`
|
|
119
|
+
|
|
120
|
+
Returns plan inventory for a phase, grouped by wave.
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js plan-index 1
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Output:**
|
|
127
|
+
```json
|
|
128
|
+
{
|
|
129
|
+
"phase": "01-setup",
|
|
130
|
+
"total_plans": 3,
|
|
131
|
+
"plans": [
|
|
132
|
+
{
|
|
133
|
+
"file": "PLAN-01.md",
|
|
134
|
+
"plan_id": "01",
|
|
135
|
+
"wave": 1,
|
|
136
|
+
"type": "feature",
|
|
137
|
+
"autonomous": true,
|
|
138
|
+
"depends_on": [],
|
|
139
|
+
"gap_closure": false,
|
|
140
|
+
"has_summary": true,
|
|
141
|
+
"must_haves_count": 4
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"waves": { "wave_1": ["01", "02"], "wave_2": ["03"] }
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### `phase-info <phase>`
|
|
149
|
+
|
|
150
|
+
Comprehensive single-phase status combining roadmap, filesystem, and plan data.
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js phase-info 1
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Output:**
|
|
157
|
+
```json
|
|
158
|
+
{
|
|
159
|
+
"phase": "01-setup",
|
|
160
|
+
"name": "setup",
|
|
161
|
+
"goal": "Initialize project infrastructure",
|
|
162
|
+
"roadmap_status": "building",
|
|
163
|
+
"filesystem_status": "partial",
|
|
164
|
+
"plans": [...],
|
|
165
|
+
"plan_count": 3,
|
|
166
|
+
"summaries": [{ "file": "SUMMARY-01.md", "plan": "01", "status": "complete" }],
|
|
167
|
+
"completed": 1,
|
|
168
|
+
"verification": null,
|
|
169
|
+
"has_context": false
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### `must-haves <phase>`
|
|
174
|
+
|
|
175
|
+
Collects all must-haves from phase plans — truths, artifacts, and key links.
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js must-haves 1
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Output:**
|
|
182
|
+
```json
|
|
183
|
+
{
|
|
184
|
+
"phase": "01-setup",
|
|
185
|
+
"plans": {
|
|
186
|
+
"01": { "truths": ["..."], "artifacts": ["..."], "key_links": ["..."] }
|
|
187
|
+
},
|
|
188
|
+
"all": { "truths": [...], "artifacts": [...], "key_links": [...] },
|
|
189
|
+
"total": 12
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Frontmatter Command
|
|
196
|
+
|
|
197
|
+
### `frontmatter <filepath>`
|
|
198
|
+
|
|
199
|
+
Parses a markdown file's YAML frontmatter and returns as JSON.
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js frontmatter .planning/phases/01-setup/PLAN-01.md
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**Output:** The frontmatter fields as a JSON object. Returns `{ "error": "File not found: ..." }` if the file doesn't exist.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Roadmap Commands
|
|
210
|
+
|
|
211
|
+
### `roadmap update-status <phase> <status>`
|
|
212
|
+
|
|
213
|
+
Updates the Status column for a phase in ROADMAP.md's Phase Overview table. Uses file locking. Warns on invalid status transitions but does not block them.
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js roadmap update-status 1 building
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
**Valid statuses:** `pending`, `planned`, `building`, `built`, `partial`, `needs_fixes`, `verified`, `skipped`
|
|
220
|
+
|
|
221
|
+
**Output:** `{ "success": true, "old_status": "planned", "new_status": "building" }`
|
|
222
|
+
|
|
223
|
+
### `roadmap update-plans <phase> <complete> <total>`
|
|
224
|
+
|
|
225
|
+
Updates the Plans column (e.g., "2/5") for a phase in ROADMAP.md.
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js roadmap update-plans 1 2 5
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**Output:** `{ "success": true, "old_plans": "1/5", "new_plans": "2/5" }`
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## History Commands
|
|
236
|
+
|
|
237
|
+
### `history append <type> <title> [body]`
|
|
238
|
+
|
|
239
|
+
Appends a record to HISTORY.md. Creates the file if it doesn't exist.
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js history append milestone "v1.0 Release" "Initial release with core features"
|
|
243
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js history append phase "01-setup Complete" "3 plans executed, all verified"
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
**Types:** `milestone`, `phase`
|
|
247
|
+
|
|
248
|
+
**Output:** `{ "success": true }`
|
|
249
|
+
|
|
250
|
+
### `history load`
|
|
251
|
+
|
|
252
|
+
Loads all HISTORY.md records as structured JSON.
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js history load
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
**Output:**
|
|
259
|
+
```json
|
|
260
|
+
{
|
|
261
|
+
"records": [
|
|
262
|
+
{ "type": "milestone", "title": "v1.0 Release", "date": "2025-01-15", "body": "..." }
|
|
263
|
+
],
|
|
264
|
+
"line_count": 42
|
|
265
|
+
}
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
Returns `null` if HISTORY.md doesn't exist.
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## Event Command
|
|
273
|
+
|
|
274
|
+
### `event <category> <event> [JSON-details]`
|
|
275
|
+
|
|
276
|
+
Logs a structured event to `.planning/logs/events.jsonl`.
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js event build plan-complete '{"plan":"01","phase":"01-setup"}'
|
|
280
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js event error hook-failure '{"script":"validate-task.js"}'
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
**Output:** `{ "logged": true, "category": "build", "event": "plan-complete" }`
|
|
284
|
+
|
|
285
|
+
If the JSON-details argument is not valid JSON, it's stored as `{ "raw": "<the string>" }`.
|
|
@@ -3,6 +3,18 @@ name: dashboard
|
|
|
3
3
|
description: "Launch the PBR web dashboard for the current project."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
## Step 0 — Immediate Output
|
|
7
|
+
|
|
8
|
+
**Before ANY tool calls**, display this banner:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
12
|
+
PLAN-BUILD-RUN ► DASHBOARD
|
|
13
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Then proceed to Step 1.
|
|
17
|
+
|
|
6
18
|
## Behavior
|
|
7
19
|
|
|
8
20
|
1. **Parse arguments**: Extract `--port N` from the user's input. Default to `3000`.
|
|
@@ -215,6 +215,29 @@ Apply selections:
|
|
|
215
215
|
|
|
216
216
|
---
|
|
217
217
|
|
|
218
|
+
## Step 4b: CLAUDE.md Integration
|
|
219
|
+
|
|
220
|
+
Check if a `CLAUDE.md` file exists in the project root.
|
|
221
|
+
|
|
222
|
+
**If it exists**: Read it. If it does NOT already contain a "Plan-Build-Run" section, append the block below.
|
|
223
|
+
**If it does NOT exist**: Create `CLAUDE.md` with the block below.
|
|
224
|
+
|
|
225
|
+
Append/create this content:
|
|
226
|
+
|
|
227
|
+
```markdown
|
|
228
|
+
## Plan-Build-Run
|
|
229
|
+
|
|
230
|
+
This project uses [Plan-Build-Run](https://github.com/SienkLogic/plan-build-run) for structured development.
|
|
231
|
+
|
|
232
|
+
- Project state: `.planning/STATE.md` (source of truth for current phase and progress)
|
|
233
|
+
- Configuration: `.planning/config.json`
|
|
234
|
+
- Run `/pbr:status` to see current project state and suggested next action.
|
|
235
|
+
|
|
236
|
+
**After compaction or context recovery**: Read `.planning/STATE.md` (especially the `## Session Continuity` section) before proceeding with any work. The PreCompact hook writes recovery state there automatically.
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
218
241
|
## Step 5: Verification
|
|
219
242
|
|
|
220
243
|
Run a quick health check:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pbr",
|
|
3
3
|
"displayName": "Plan-Build-Run",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.10.0",
|
|
5
5
|
"description": "Plan-Build-Run — Structured development workflow for Cursor. Solves context rot through disciplined subagent delegation, structured planning, atomic execution, and goal-backward verification.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "SienkLogic",
|
|
@@ -28,6 +28,7 @@ Condensed from the 3,100-line `docs/DEVELOPMENT-GUIDE.md`. When in doubt, these
|
|
|
28
28
|
13. Read STATE.md and config.json fully. Read ROADMAP.md by section. Read PLAN.md/SUMMARY.md/VERIFICATION.md frontmatter only.
|
|
29
29
|
14. Use the `limit` parameter on Read to restrict line counts.
|
|
30
30
|
15. Proactively suggest `/pbr:pause` when context gets heavy — before compaction, not after.
|
|
31
|
+
15b. **After compaction or context recovery**, always read `.planning/STATE.md` (especially the `## Session Continuity` section) before proceeding with any work. The PreCompact hook writes recovery state there automatically.
|
|
31
32
|
|
|
32
33
|
---
|
|
33
34
|
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
# pbr-tools.js CLI Reference
|
|
2
|
+
|
|
3
|
+
Command-line interface for structured JSON operations on `.planning/` state.
|
|
4
|
+
Skills and agents call this via Bash to avoid token-expensive text parsing.
|
|
5
|
+
|
|
6
|
+
```
|
|
7
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js <command> [args]
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
All commands output JSON to stdout. Errors output JSON with an `error` field to stderr (exit code 1).
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## State Commands
|
|
15
|
+
|
|
16
|
+
### `state load`
|
|
17
|
+
|
|
18
|
+
Returns full project state as a single JSON object.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state load
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Output:**
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"exists": true,
|
|
28
|
+
"config": { ... }, // config.json contents
|
|
29
|
+
"state": { // STATE.md frontmatter + parsed body
|
|
30
|
+
"version": 2,
|
|
31
|
+
"current_phase": "1",
|
|
32
|
+
"status": "building",
|
|
33
|
+
"progress_percent": 45,
|
|
34
|
+
"last_activity": "2025-01-15",
|
|
35
|
+
"last_command": "/pbr:build",
|
|
36
|
+
"blockers": []
|
|
37
|
+
},
|
|
38
|
+
"roadmap": { // Parsed ROADMAP.md
|
|
39
|
+
"phases": [{ "number": "01", "name": "...", "status": "planned", ... }]
|
|
40
|
+
},
|
|
41
|
+
"phase_count": 3,
|
|
42
|
+
"current_phase": "1",
|
|
43
|
+
"progress": { "phases": [...], "total_plans": 5, "completed_plans": 2, "percentage": 40 }
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### `state check-progress`
|
|
48
|
+
|
|
49
|
+
Recalculates progress from filesystem (plan files, summaries, verification).
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state check-progress
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Output:**
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"phases": [
|
|
59
|
+
{ "directory": "01-setup", "plans": 2, "summaries": 2, "completed": 2, "has_verification": true, "status": "verified" }
|
|
60
|
+
],
|
|
61
|
+
"total_plans": 5,
|
|
62
|
+
"completed_plans": 3,
|
|
63
|
+
"percentage": 60
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### `state update <field> <value>`
|
|
68
|
+
|
|
69
|
+
Atomically updates a single field in STATE.md. Uses file locking.
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state update current_phase 2
|
|
73
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state update status building
|
|
74
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state update last_activity now # auto-timestamps
|
|
75
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state update plans_complete 3
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Valid fields:** `current_phase`, `status`, `plans_complete`, `last_activity`
|
|
79
|
+
|
|
80
|
+
**Output:** `{ "success": true, "field": "status", "value": "building" }`
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Config Commands
|
|
85
|
+
|
|
86
|
+
### `config validate`
|
|
87
|
+
|
|
88
|
+
Validates `config.json` against the JSON schema. Detects both schema violations and semantic conflicts.
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js config validate
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Output:**
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"valid": true,
|
|
98
|
+
"errors": [],
|
|
99
|
+
"warnings": ["features.auto_continue=true with mode=interactive: auto_continue only fires in autonomous mode"]
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### `config resolve-depth [dir]`
|
|
104
|
+
|
|
105
|
+
Resolves the effective depth profile by merging base profile with user overrides.
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js config resolve-depth
|
|
109
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js config resolve-depth /path/to/.planning
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Output:** Full depth profile object with all resolved values (research rounds, plan detail level, verification depth, etc.)
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Plan & Phase Commands
|
|
117
|
+
|
|
118
|
+
### `plan-index <phase>`
|
|
119
|
+
|
|
120
|
+
Returns plan inventory for a phase, grouped by wave.
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js plan-index 1
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Output:**
|
|
127
|
+
```json
|
|
128
|
+
{
|
|
129
|
+
"phase": "01-setup",
|
|
130
|
+
"total_plans": 3,
|
|
131
|
+
"plans": [
|
|
132
|
+
{
|
|
133
|
+
"file": "PLAN-01.md",
|
|
134
|
+
"plan_id": "01",
|
|
135
|
+
"wave": 1,
|
|
136
|
+
"type": "feature",
|
|
137
|
+
"autonomous": true,
|
|
138
|
+
"depends_on": [],
|
|
139
|
+
"gap_closure": false,
|
|
140
|
+
"has_summary": true,
|
|
141
|
+
"must_haves_count": 4
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"waves": { "wave_1": ["01", "02"], "wave_2": ["03"] }
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### `phase-info <phase>`
|
|
149
|
+
|
|
150
|
+
Comprehensive single-phase status combining roadmap, filesystem, and plan data.
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js phase-info 1
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Output:**
|
|
157
|
+
```json
|
|
158
|
+
{
|
|
159
|
+
"phase": "01-setup",
|
|
160
|
+
"name": "setup",
|
|
161
|
+
"goal": "Initialize project infrastructure",
|
|
162
|
+
"roadmap_status": "building",
|
|
163
|
+
"filesystem_status": "partial",
|
|
164
|
+
"plans": [...],
|
|
165
|
+
"plan_count": 3,
|
|
166
|
+
"summaries": [{ "file": "SUMMARY-01.md", "plan": "01", "status": "complete" }],
|
|
167
|
+
"completed": 1,
|
|
168
|
+
"verification": null,
|
|
169
|
+
"has_context": false
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### `must-haves <phase>`
|
|
174
|
+
|
|
175
|
+
Collects all must-haves from phase plans — truths, artifacts, and key links.
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js must-haves 1
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Output:**
|
|
182
|
+
```json
|
|
183
|
+
{
|
|
184
|
+
"phase": "01-setup",
|
|
185
|
+
"plans": {
|
|
186
|
+
"01": { "truths": ["..."], "artifacts": ["..."], "key_links": ["..."] }
|
|
187
|
+
},
|
|
188
|
+
"all": { "truths": [...], "artifacts": [...], "key_links": [...] },
|
|
189
|
+
"total": 12
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Frontmatter Command
|
|
196
|
+
|
|
197
|
+
### `frontmatter <filepath>`
|
|
198
|
+
|
|
199
|
+
Parses a markdown file's YAML frontmatter and returns as JSON.
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js frontmatter .planning/phases/01-setup/PLAN-01.md
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**Output:** The frontmatter fields as a JSON object. Returns `{ "error": "File not found: ..." }` if the file doesn't exist.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Roadmap Commands
|
|
210
|
+
|
|
211
|
+
### `roadmap update-status <phase> <status>`
|
|
212
|
+
|
|
213
|
+
Updates the Status column for a phase in ROADMAP.md's Phase Overview table. Uses file locking. Warns on invalid status transitions but does not block them.
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js roadmap update-status 1 building
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
**Valid statuses:** `pending`, `planned`, `building`, `built`, `partial`, `needs_fixes`, `verified`, `skipped`
|
|
220
|
+
|
|
221
|
+
**Output:** `{ "success": true, "old_status": "planned", "new_status": "building" }`
|
|
222
|
+
|
|
223
|
+
### `roadmap update-plans <phase> <complete> <total>`
|
|
224
|
+
|
|
225
|
+
Updates the Plans column (e.g., "2/5") for a phase in ROADMAP.md.
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js roadmap update-plans 1 2 5
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**Output:** `{ "success": true, "old_plans": "1/5", "new_plans": "2/5" }`
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## History Commands
|
|
236
|
+
|
|
237
|
+
### `history append <type> <title> [body]`
|
|
238
|
+
|
|
239
|
+
Appends a record to HISTORY.md. Creates the file if it doesn't exist.
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js history append milestone "v1.0 Release" "Initial release with core features"
|
|
243
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js history append phase "01-setup Complete" "3 plans executed, all verified"
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
**Types:** `milestone`, `phase`
|
|
247
|
+
|
|
248
|
+
**Output:** `{ "success": true }`
|
|
249
|
+
|
|
250
|
+
### `history load`
|
|
251
|
+
|
|
252
|
+
Loads all HISTORY.md records as structured JSON.
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js history load
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
**Output:**
|
|
259
|
+
```json
|
|
260
|
+
{
|
|
261
|
+
"records": [
|
|
262
|
+
{ "type": "milestone", "title": "v1.0 Release", "date": "2025-01-15", "body": "..." }
|
|
263
|
+
],
|
|
264
|
+
"line_count": 42
|
|
265
|
+
}
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
Returns `null` if HISTORY.md doesn't exist.
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## Event Command
|
|
273
|
+
|
|
274
|
+
### `event <category> <event> [JSON-details]`
|
|
275
|
+
|
|
276
|
+
Logs a structured event to `.planning/logs/events.jsonl`.
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js event build plan-complete '{"plan":"01","phase":"01-setup"}'
|
|
280
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js event error hook-failure '{"script":"validate-task.js"}'
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
**Output:** `{ "logged": true, "category": "build", "event": "plan-complete" }`
|
|
284
|
+
|
|
285
|
+
If the JSON-details argument is not valid JSON, it's stored as `{ "raw": "<the string>" }`.
|
|
@@ -4,6 +4,18 @@ description: "Launch the PBR web dashboard for the current project."
|
|
|
4
4
|
argument-hint: "[--port N]"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## Step 0 — Immediate Output
|
|
8
|
+
|
|
9
|
+
**Before ANY tool calls**, display this banner:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
13
|
+
PLAN-BUILD-RUN ► DASHBOARD
|
|
14
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Then proceed to Step 1.
|
|
18
|
+
|
|
7
19
|
## Behavior
|
|
8
20
|
|
|
9
21
|
1. **Parse arguments**: Extract `--port N` from the user's input. Default to `3000`.
|
|
@@ -215,6 +215,29 @@ Apply selections:
|
|
|
215
215
|
|
|
216
216
|
---
|
|
217
217
|
|
|
218
|
+
## Step 4b: CLAUDE.md Integration
|
|
219
|
+
|
|
220
|
+
Check if a `CLAUDE.md` file exists in the project root.
|
|
221
|
+
|
|
222
|
+
**If it exists**: Read it. If it does NOT already contain a "Plan-Build-Run" section, append the block below.
|
|
223
|
+
**If it does NOT exist**: Create `CLAUDE.md` with the block below.
|
|
224
|
+
|
|
225
|
+
Append/create this content:
|
|
226
|
+
|
|
227
|
+
```markdown
|
|
228
|
+
## Plan-Build-Run
|
|
229
|
+
|
|
230
|
+
This project uses [Plan-Build-Run](https://github.com/SienkLogic/plan-build-run) for structured development.
|
|
231
|
+
|
|
232
|
+
- Project state: `.planning/STATE.md` (source of truth for current phase and progress)
|
|
233
|
+
- Configuration: `.planning/config.json`
|
|
234
|
+
- Run `/pbr:status` to see current project state and suggested next action.
|
|
235
|
+
|
|
236
|
+
**After compaction or context recovery**: Read `.planning/STATE.md` (especially the `## Session Continuity` section) before proceeding with any work. The PreCompact hook writes recovery state there automatically.
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
218
241
|
## Step 5: Verification
|
|
219
242
|
|
|
220
243
|
Run a quick health check:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pbr",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "Plan-Build-Run — Structured development workflow for Claude Code. Solves context rot through disciplined subagent delegation, structured planning, atomic execution, and goal-backward verification.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SienkLogic",
|
|
@@ -27,6 +27,7 @@ Condensed from the 3,100-line `docs/DEVELOPMENT-GUIDE.md`. When in doubt, these
|
|
|
27
27
|
13. Read STATE.md and config.json fully. Read ROADMAP.md by section. Read PLAN.md/SUMMARY.md/VERIFICATION.md frontmatter only.
|
|
28
28
|
14. Use the `limit` parameter on Read to restrict line counts.
|
|
29
29
|
15. Proactively suggest `/pbr:pause` when context gets heavy — before compaction, not after.
|
|
30
|
+
15b. **After compaction or context recovery**, always read `.planning/STATE.md` (especially the `## Session Continuity` section) before proceeding with any work. The PreCompact hook writes recovery state there automatically.
|
|
30
31
|
|
|
31
32
|
---
|
|
32
33
|
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
# pbr-tools.js CLI Reference
|
|
2
|
+
|
|
3
|
+
Command-line interface for structured JSON operations on `.planning/` state.
|
|
4
|
+
Skills and agents call this via Bash to avoid token-expensive text parsing.
|
|
5
|
+
|
|
6
|
+
```
|
|
7
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js <command> [args]
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
All commands output JSON to stdout. Errors output JSON with an `error` field to stderr (exit code 1).
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## State Commands
|
|
15
|
+
|
|
16
|
+
### `state load`
|
|
17
|
+
|
|
18
|
+
Returns full project state as a single JSON object.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state load
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Output:**
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"exists": true,
|
|
28
|
+
"config": { ... }, // config.json contents
|
|
29
|
+
"state": { // STATE.md frontmatter + parsed body
|
|
30
|
+
"version": 2,
|
|
31
|
+
"current_phase": "1",
|
|
32
|
+
"status": "building",
|
|
33
|
+
"progress_percent": 45,
|
|
34
|
+
"last_activity": "2025-01-15",
|
|
35
|
+
"last_command": "/pbr:build",
|
|
36
|
+
"blockers": []
|
|
37
|
+
},
|
|
38
|
+
"roadmap": { // Parsed ROADMAP.md
|
|
39
|
+
"phases": [{ "number": "01", "name": "...", "status": "planned", ... }]
|
|
40
|
+
},
|
|
41
|
+
"phase_count": 3,
|
|
42
|
+
"current_phase": "1",
|
|
43
|
+
"progress": { "phases": [...], "total_plans": 5, "completed_plans": 2, "percentage": 40 }
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### `state check-progress`
|
|
48
|
+
|
|
49
|
+
Recalculates progress from filesystem (plan files, summaries, verification).
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state check-progress
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Output:**
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"phases": [
|
|
59
|
+
{ "directory": "01-setup", "plans": 2, "summaries": 2, "completed": 2, "has_verification": true, "status": "verified" }
|
|
60
|
+
],
|
|
61
|
+
"total_plans": 5,
|
|
62
|
+
"completed_plans": 3,
|
|
63
|
+
"percentage": 60
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### `state update <field> <value>`
|
|
68
|
+
|
|
69
|
+
Atomically updates a single field in STATE.md. Uses file locking.
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state update current_phase 2
|
|
73
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state update status building
|
|
74
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state update last_activity now # auto-timestamps
|
|
75
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state update plans_complete 3
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Valid fields:** `current_phase`, `status`, `plans_complete`, `last_activity`
|
|
79
|
+
|
|
80
|
+
**Output:** `{ "success": true, "field": "status", "value": "building" }`
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Config Commands
|
|
85
|
+
|
|
86
|
+
### `config validate`
|
|
87
|
+
|
|
88
|
+
Validates `config.json` against the JSON schema. Detects both schema violations and semantic conflicts.
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js config validate
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Output:**
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"valid": true,
|
|
98
|
+
"errors": [],
|
|
99
|
+
"warnings": ["features.auto_continue=true with mode=interactive: auto_continue only fires in autonomous mode"]
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### `config resolve-depth [dir]`
|
|
104
|
+
|
|
105
|
+
Resolves the effective depth profile by merging base profile with user overrides.
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js config resolve-depth
|
|
109
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js config resolve-depth /path/to/.planning
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Output:** Full depth profile object with all resolved values (research rounds, plan detail level, verification depth, etc.)
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Plan & Phase Commands
|
|
117
|
+
|
|
118
|
+
### `plan-index <phase>`
|
|
119
|
+
|
|
120
|
+
Returns plan inventory for a phase, grouped by wave.
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js plan-index 1
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Output:**
|
|
127
|
+
```json
|
|
128
|
+
{
|
|
129
|
+
"phase": "01-setup",
|
|
130
|
+
"total_plans": 3,
|
|
131
|
+
"plans": [
|
|
132
|
+
{
|
|
133
|
+
"file": "PLAN-01.md",
|
|
134
|
+
"plan_id": "01",
|
|
135
|
+
"wave": 1,
|
|
136
|
+
"type": "feature",
|
|
137
|
+
"autonomous": true,
|
|
138
|
+
"depends_on": [],
|
|
139
|
+
"gap_closure": false,
|
|
140
|
+
"has_summary": true,
|
|
141
|
+
"must_haves_count": 4
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"waves": { "wave_1": ["01", "02"], "wave_2": ["03"] }
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### `phase-info <phase>`
|
|
149
|
+
|
|
150
|
+
Comprehensive single-phase status combining roadmap, filesystem, and plan data.
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js phase-info 1
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Output:**
|
|
157
|
+
```json
|
|
158
|
+
{
|
|
159
|
+
"phase": "01-setup",
|
|
160
|
+
"name": "setup",
|
|
161
|
+
"goal": "Initialize project infrastructure",
|
|
162
|
+
"roadmap_status": "building",
|
|
163
|
+
"filesystem_status": "partial",
|
|
164
|
+
"plans": [...],
|
|
165
|
+
"plan_count": 3,
|
|
166
|
+
"summaries": [{ "file": "SUMMARY-01.md", "plan": "01", "status": "complete" }],
|
|
167
|
+
"completed": 1,
|
|
168
|
+
"verification": null,
|
|
169
|
+
"has_context": false
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### `must-haves <phase>`
|
|
174
|
+
|
|
175
|
+
Collects all must-haves from phase plans — truths, artifacts, and key links.
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js must-haves 1
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Output:**
|
|
182
|
+
```json
|
|
183
|
+
{
|
|
184
|
+
"phase": "01-setup",
|
|
185
|
+
"plans": {
|
|
186
|
+
"01": { "truths": ["..."], "artifacts": ["..."], "key_links": ["..."] }
|
|
187
|
+
},
|
|
188
|
+
"all": { "truths": [...], "artifacts": [...], "key_links": [...] },
|
|
189
|
+
"total": 12
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Frontmatter Command
|
|
196
|
+
|
|
197
|
+
### `frontmatter <filepath>`
|
|
198
|
+
|
|
199
|
+
Parses a markdown file's YAML frontmatter and returns as JSON.
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js frontmatter .planning/phases/01-setup/PLAN-01.md
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**Output:** The frontmatter fields as a JSON object. Returns `{ "error": "File not found: ..." }` if the file doesn't exist.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Roadmap Commands
|
|
210
|
+
|
|
211
|
+
### `roadmap update-status <phase> <status>`
|
|
212
|
+
|
|
213
|
+
Updates the Status column for a phase in ROADMAP.md's Phase Overview table. Uses file locking. Warns on invalid status transitions but does not block them.
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js roadmap update-status 1 building
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
**Valid statuses:** `pending`, `planned`, `building`, `built`, `partial`, `needs_fixes`, `verified`, `skipped`
|
|
220
|
+
|
|
221
|
+
**Output:** `{ "success": true, "old_status": "planned", "new_status": "building" }`
|
|
222
|
+
|
|
223
|
+
### `roadmap update-plans <phase> <complete> <total>`
|
|
224
|
+
|
|
225
|
+
Updates the Plans column (e.g., "2/5") for a phase in ROADMAP.md.
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js roadmap update-plans 1 2 5
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**Output:** `{ "success": true, "old_plans": "1/5", "new_plans": "2/5" }`
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## History Commands
|
|
236
|
+
|
|
237
|
+
### `history append <type> <title> [body]`
|
|
238
|
+
|
|
239
|
+
Appends a record to HISTORY.md. Creates the file if it doesn't exist.
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js history append milestone "v1.0 Release" "Initial release with core features"
|
|
243
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js history append phase "01-setup Complete" "3 plans executed, all verified"
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
**Types:** `milestone`, `phase`
|
|
247
|
+
|
|
248
|
+
**Output:** `{ "success": true }`
|
|
249
|
+
|
|
250
|
+
### `history load`
|
|
251
|
+
|
|
252
|
+
Loads all HISTORY.md records as structured JSON.
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js history load
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
**Output:**
|
|
259
|
+
```json
|
|
260
|
+
{
|
|
261
|
+
"records": [
|
|
262
|
+
{ "type": "milestone", "title": "v1.0 Release", "date": "2025-01-15", "body": "..." }
|
|
263
|
+
],
|
|
264
|
+
"line_count": 42
|
|
265
|
+
}
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
Returns `null` if HISTORY.md doesn't exist.
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## Event Command
|
|
273
|
+
|
|
274
|
+
### `event <category> <event> [JSON-details]`
|
|
275
|
+
|
|
276
|
+
Logs a structured event to `.planning/logs/events.jsonl`.
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js event build plan-complete '{"plan":"01","phase":"01-setup"}'
|
|
280
|
+
node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js event error hook-failure '{"script":"validate-task.js"}'
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
**Output:** `{ "logged": true, "category": "build", "event": "plan-complete" }`
|
|
284
|
+
|
|
285
|
+
If the JSON-details argument is not valid JSON, it's stored as `{ "raw": "<the string>" }`.
|
|
@@ -7,6 +7,18 @@ argument-hint: "[--port N]"
|
|
|
7
7
|
|
|
8
8
|
**STOP — DO NOT READ THIS FILE. You are already reading it. This prompt was injected into your context by Claude Code's plugin system. Begin executing immediately.**
|
|
9
9
|
|
|
10
|
+
## Step 0 — Immediate Output
|
|
11
|
+
|
|
12
|
+
**Before ANY tool calls**, display this banner:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
16
|
+
PLAN-BUILD-RUN ► DASHBOARD
|
|
17
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Then proceed to Step 1.
|
|
21
|
+
|
|
10
22
|
## Behavior
|
|
11
23
|
|
|
12
24
|
1. **Parse arguments**: Extract `--port N` from the user's input. Default to `3000`.
|
|
@@ -218,6 +218,29 @@ Apply selections:
|
|
|
218
218
|
|
|
219
219
|
---
|
|
220
220
|
|
|
221
|
+
## Step 4b: CLAUDE.md Integration
|
|
222
|
+
|
|
223
|
+
Check if a `CLAUDE.md` file exists in the project root.
|
|
224
|
+
|
|
225
|
+
**If it exists**: Read it. If it does NOT already contain a "Plan-Build-Run" section, append the block below.
|
|
226
|
+
**If it does NOT exist**: Create `CLAUDE.md` with the block below.
|
|
227
|
+
|
|
228
|
+
Append/create this content:
|
|
229
|
+
|
|
230
|
+
```markdown
|
|
231
|
+
## Plan-Build-Run
|
|
232
|
+
|
|
233
|
+
This project uses [Plan-Build-Run](https://github.com/SienkLogic/plan-build-run) for structured development.
|
|
234
|
+
|
|
235
|
+
- Project state: `.planning/STATE.md` (source of truth for current phase and progress)
|
|
236
|
+
- Configuration: `.planning/config.json`
|
|
237
|
+
- Run `/pbr:status` to see current project state and suggested next action.
|
|
238
|
+
|
|
239
|
+
**After compaction or context recovery**: Read `.planning/STATE.md` (especially the `## Session Continuity` section) before proceeding with any work. The PreCompact hook writes recovery state there automatically.
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
221
244
|
## Step 5: Verification
|
|
222
245
|
|
|
223
246
|
Run a quick health check:
|