@sienklogic/plan-build-run 2.9.1 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -0
- package/package.json +1 -1
- package/plugins/copilot-pbr/agents/codebase-mapper.agent.md +42 -0
- package/plugins/copilot-pbr/agents/debugger.agent.md +4 -1
- package/plugins/copilot-pbr/agents/executor.agent.md +31 -1
- package/plugins/copilot-pbr/agents/integration-checker.agent.md +33 -2
- package/plugins/copilot-pbr/agents/planner.agent.md +58 -1
- package/plugins/copilot-pbr/agents/researcher.agent.md +23 -0
- package/plugins/copilot-pbr/agents/synthesizer.agent.md +24 -0
- package/plugins/copilot-pbr/agents/verifier.agent.md +35 -1
- package/plugins/copilot-pbr/plugin.json +1 -1
- package/plugins/copilot-pbr/references/agent-contracts.md +297 -0
- 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/references/ui-formatting.md +38 -56
- package/plugins/copilot-pbr/skills/begin/SKILL.md +30 -7
- package/plugins/copilot-pbr/skills/build/SKILL.md +28 -31
- package/plugins/copilot-pbr/skills/config/SKILL.md +9 -12
- package/plugins/copilot-pbr/skills/continue/SKILL.md +6 -6
- package/plugins/copilot-pbr/skills/dashboard/SKILL.md +12 -0
- package/plugins/copilot-pbr/skills/debug/SKILL.md +23 -26
- package/plugins/copilot-pbr/skills/discuss/SKILL.md +20 -10
- package/plugins/copilot-pbr/skills/do/SKILL.md +3 -3
- package/plugins/copilot-pbr/skills/explore/SKILL.md +11 -14
- package/plugins/copilot-pbr/skills/health/SKILL.md +75 -19
- package/plugins/copilot-pbr/skills/help/SKILL.md +6 -6
- package/plugins/copilot-pbr/skills/import/SKILL.md +22 -18
- package/plugins/copilot-pbr/skills/milestone/SKILL.md +90 -48
- package/plugins/copilot-pbr/skills/note/SKILL.md +3 -3
- package/plugins/copilot-pbr/skills/pause/SKILL.md +11 -10
- package/plugins/copilot-pbr/skills/plan/SKILL.md +22 -9
- package/plugins/copilot-pbr/skills/plan/templates/planner-prompt.md.tmpl +1 -1
- package/plugins/copilot-pbr/skills/quick/SKILL.md +9 -12
- package/plugins/copilot-pbr/skills/resume/SKILL.md +9 -9
- package/plugins/copilot-pbr/skills/review/SKILL.md +17 -12
- package/plugins/copilot-pbr/skills/scan/SKILL.md +9 -11
- package/plugins/copilot-pbr/skills/setup/SKILL.md +54 -8
- package/plugins/copilot-pbr/skills/shared/error-reporting.md +2 -1
- package/plugins/copilot-pbr/skills/shared/progress-display.md +0 -1
- package/plugins/copilot-pbr/skills/shared/universal-anti-patterns.md +10 -6
- package/plugins/copilot-pbr/skills/status/SKILL.md +3 -3
- package/plugins/copilot-pbr/skills/statusline/SKILL.md +12 -8
- package/plugins/copilot-pbr/skills/todo/SKILL.md +51 -28
- package/plugins/cursor-pbr/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor-pbr/agents/codebase-mapper.md +42 -0
- package/plugins/cursor-pbr/agents/debugger.md +4 -1
- package/plugins/cursor-pbr/agents/executor.md +31 -1
- package/plugins/cursor-pbr/agents/integration-checker.md +33 -2
- package/plugins/cursor-pbr/agents/planner.md +58 -1
- package/plugins/cursor-pbr/agents/researcher.md +23 -0
- package/plugins/cursor-pbr/agents/synthesizer.md +24 -0
- package/plugins/cursor-pbr/agents/verifier.md +35 -1
- package/plugins/cursor-pbr/references/agent-contracts.md +297 -0
- 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/references/ui-formatting.md +38 -56
- package/plugins/cursor-pbr/skills/begin/SKILL.md +30 -7
- package/plugins/cursor-pbr/skills/build/SKILL.md +28 -31
- package/plugins/cursor-pbr/skills/config/SKILL.md +9 -10
- package/plugins/cursor-pbr/skills/continue/SKILL.md +6 -6
- package/plugins/cursor-pbr/skills/dashboard/SKILL.md +12 -0
- package/plugins/cursor-pbr/skills/debug/SKILL.md +23 -23
- package/plugins/cursor-pbr/skills/discuss/SKILL.md +20 -10
- package/plugins/cursor-pbr/skills/do/SKILL.md +3 -3
- package/plugins/cursor-pbr/skills/explore/SKILL.md +11 -12
- package/plugins/cursor-pbr/skills/health/SKILL.md +75 -19
- package/plugins/cursor-pbr/skills/help/SKILL.md +6 -6
- package/plugins/cursor-pbr/skills/import/SKILL.md +22 -16
- package/plugins/cursor-pbr/skills/milestone/SKILL.md +90 -48
- package/plugins/cursor-pbr/skills/note/SKILL.md +3 -3
- package/plugins/cursor-pbr/skills/pause/SKILL.md +11 -9
- package/plugins/cursor-pbr/skills/plan/SKILL.md +22 -9
- package/plugins/cursor-pbr/skills/plan/templates/planner-prompt.md.tmpl +1 -1
- package/plugins/cursor-pbr/skills/quick/SKILL.md +9 -12
- package/plugins/cursor-pbr/skills/resume/SKILL.md +9 -9
- package/plugins/cursor-pbr/skills/review/SKILL.md +17 -12
- package/plugins/cursor-pbr/skills/scan/SKILL.md +9 -10
- package/plugins/cursor-pbr/skills/setup/SKILL.md +54 -8
- package/plugins/cursor-pbr/skills/shared/error-reporting.md +2 -1
- package/plugins/cursor-pbr/skills/shared/progress-display.md +0 -1
- package/plugins/cursor-pbr/skills/shared/universal-anti-patterns.md +10 -6
- package/plugins/cursor-pbr/skills/status/SKILL.md +3 -3
- package/plugins/cursor-pbr/skills/statusline/SKILL.md +12 -8
- package/plugins/cursor-pbr/skills/todo/SKILL.md +51 -28
- package/plugins/pbr/.claude-plugin/plugin.json +1 -1
- package/plugins/pbr/agents/codebase-mapper.md +42 -0
- package/plugins/pbr/agents/debugger.md +4 -1
- package/plugins/pbr/agents/executor.md +31 -1
- package/plugins/pbr/agents/integration-checker.md +34 -2
- package/plugins/pbr/agents/planner.md +58 -1
- package/plugins/pbr/agents/researcher.md +23 -0
- package/plugins/pbr/agents/synthesizer.md +24 -0
- package/plugins/pbr/agents/verifier.md +36 -1
- package/plugins/pbr/references/agent-contracts.md +297 -0
- package/plugins/pbr/references/pbr-rules.md +1 -0
- package/plugins/pbr/references/pbr-tools-cli.md +285 -0
- package/plugins/pbr/references/ui-formatting.md +37 -54
- package/plugins/pbr/scripts/check-skill-workflow.js +11 -0
- package/plugins/pbr/scripts/check-state-sync.js +58 -0
- package/plugins/pbr/scripts/check-subagent-output.js +43 -4
- package/plugins/pbr/scripts/validate-task.js +69 -17
- package/plugins/pbr/skills/begin/SKILL.md +36 -11
- package/plugins/pbr/skills/build/SKILL.md +37 -25
- package/plugins/pbr/skills/config/SKILL.md +12 -10
- package/plugins/pbr/skills/continue/SKILL.md +11 -9
- package/plugins/pbr/skills/dashboard/SKILL.md +12 -0
- package/plugins/pbr/skills/debug/SKILL.md +29 -23
- package/plugins/pbr/skills/discuss/SKILL.md +20 -10
- package/plugins/pbr/skills/do/SKILL.md +3 -3
- package/plugins/pbr/skills/explore/SKILL.md +14 -12
- package/plugins/pbr/skills/health/SKILL.md +76 -20
- package/plugins/pbr/skills/help/SKILL.md +8 -6
- package/plugins/pbr/skills/import/SKILL.md +25 -16
- package/plugins/pbr/skills/milestone/SKILL.md +88 -45
- package/plugins/pbr/skills/note/SKILL.md +3 -3
- package/plugins/pbr/skills/pause/SKILL.md +13 -9
- package/plugins/pbr/skills/plan/SKILL.md +28 -13
- package/plugins/pbr/skills/plan/templates/planner-prompt.md.tmpl +1 -1
- package/plugins/pbr/skills/quick/SKILL.md +12 -10
- package/plugins/pbr/skills/resume/SKILL.md +11 -9
- package/plugins/pbr/skills/review/SKILL.md +35 -24
- package/plugins/pbr/skills/scan/SKILL.md +12 -10
- package/plugins/pbr/skills/setup/SKILL.md +53 -7
- package/plugins/pbr/skills/shared/error-reporting.md +2 -0
- package/plugins/pbr/skills/shared/universal-anti-patterns.md +10 -6
- package/plugins/pbr/skills/status/SKILL.md +8 -6
- package/plugins/pbr/skills/statusline/SKILL.md +12 -8
- package/plugins/pbr/skills/todo/SKILL.md +51 -28
|
@@ -19,9 +19,9 @@ Additionally for this skill:
|
|
|
19
19
|
**Before ANY tool calls**, display this banner:
|
|
20
20
|
|
|
21
21
|
```
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
23
|
+
║ PLAN-BUILD-RUN ► REVIEWING PHASE {N} ║
|
|
24
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
Where `{N}` is the phase number from `$ARGUMENTS`. Then proceed to Step 1.
|
|
@@ -62,6 +62,7 @@ Execute these steps in order.
|
|
|
62
62
|
|
|
63
63
|
1. Parse `$ARGUMENTS` for phase number and `--auto-fix` flag
|
|
64
64
|
2. Read `.planning/config.json`
|
|
65
|
+
**CRITICAL: Write .active-skill NOW.** Write the text "review" to `.planning/.active-skill` using the Write tool.
|
|
65
66
|
3. Resolve depth profile: run `node ${PLUGIN_ROOT}/scripts/pbr-tools.js config resolve-depth` to get the effective feature/gate settings for the current depth. Store the result for use in later gating decisions.
|
|
66
67
|
4. Validate:
|
|
67
68
|
- Phase directory exists at `.planning/phases/{NN}-{slug}/`
|
|
@@ -535,6 +536,10 @@ Ask user: "Would you like to proceed with gap-closure plans without root cause a
|
|
|
535
536
|
|
|
536
537
|
---
|
|
537
538
|
|
|
539
|
+
## Cleanup
|
|
540
|
+
|
|
541
|
+
Delete `.planning/.active-skill` if it exists. This must happen on all paths (success, partial, and failure) before reporting results.
|
|
542
|
+
|
|
538
543
|
## Completion
|
|
539
544
|
|
|
540
545
|
After review completes, always present a clear next action:
|
|
@@ -543,9 +548,9 @@ After review completes, always present a clear next action:
|
|
|
543
548
|
|
|
544
549
|
Display the "Phase Complete" banner inline:
|
|
545
550
|
```
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
551
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
552
|
+
║ PLAN-BUILD-RUN ► PHASE {N} COMPLETE ║
|
|
553
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
549
554
|
|
|
550
555
|
**Phase {N}: {Name}**
|
|
551
556
|
|
|
@@ -576,9 +581,9 @@ Then the branded "Next Up" block:
|
|
|
576
581
|
|
|
577
582
|
**If gaps remain:**
|
|
578
583
|
```
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
584
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
585
|
+
║ PLAN-BUILD-RUN ► PHASE {N} GAPS FOUND ║
|
|
586
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
582
587
|
|
|
583
588
|
**Phase {N}: {name}** — {count} gaps remaining
|
|
584
589
|
|
|
@@ -605,9 +610,9 @@ Then the branded "Next Up" block:
|
|
|
605
610
|
|
|
606
611
|
Display the "Milestone Complete" banner inline:
|
|
607
612
|
```
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
613
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
614
|
+
║ PLAN-BUILD-RUN ► MILESTONE COMPLETE ║
|
|
615
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
611
616
|
|
|
612
617
|
{N} phases completed
|
|
613
618
|
All phase goals verified
|
|
@@ -8,9 +8,9 @@ description: "Analyze an existing codebase. Maps structure, architecture, conven
|
|
|
8
8
|
**Before ANY tool calls**, display this banner:
|
|
9
9
|
|
|
10
10
|
```
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
12
|
+
║ PLAN-BUILD-RUN ► SCANNING CODEBASE ║
|
|
13
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Then proceed to Step 1.
|
|
@@ -177,9 +177,9 @@ Agent that failed: {focus_area} mapper
|
|
|
177
177
|
Read key findings from each file (frontmatter or first section) and display using the branded stage banner from `references/ui-formatting.md`:
|
|
178
178
|
|
|
179
179
|
```
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
180
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
181
|
+
║ PLAN-BUILD-RUN ► SCAN COMPLETE ✓ ║
|
|
182
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
183
183
|
|
|
184
184
|
Project: {type} ({scale})
|
|
185
185
|
Stack: {primary language} + {framework}
|
|
@@ -206,9 +206,10 @@ Top concerns:
|
|
|
206
206
|
|
|
207
207
|
Then use the "Next Up" routing block:
|
|
208
208
|
```
|
|
209
|
-
───────────────────────────────────────────────────────────────
|
|
210
209
|
|
|
211
|
-
|
|
210
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
211
|
+
║ ▶ NEXT UP ║
|
|
212
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
212
213
|
|
|
213
214
|
**Start a project** — use the scan results to plan your work
|
|
214
215
|
|
|
@@ -216,13 +217,10 @@ Then use the "Next Up" routing block:
|
|
|
216
217
|
|
|
217
218
|
<sub>`/clear` first → fresh context window</sub>
|
|
218
219
|
|
|
219
|
-
───────────────────────────────────────────────────────────────
|
|
220
|
-
|
|
221
220
|
**Also available:**
|
|
222
221
|
- `/pbr:milestone new` — create a milestone to address concerns
|
|
223
222
|
- `/pbr:status` — see project status
|
|
224
223
|
|
|
225
|
-
───────────────────────────────────────────────────────────────
|
|
226
224
|
```
|
|
227
225
|
|
|
228
226
|
### Step 7: Git Integration
|
|
@@ -8,9 +8,9 @@ description: "Onboarding wizard. Initialize project, select models, verify setup
|
|
|
8
8
|
**Before ANY tool calls**, display this banner:
|
|
9
9
|
|
|
10
10
|
```
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
12
|
+
║ PLAN-BUILD-RUN ► SETUP ║
|
|
13
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Then proceed to Step 1.
|
|
@@ -21,14 +21,29 @@ You are running the **setup** skill. This is an interactive onboarding wizard th
|
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
-
## Step 1: Detect Project State
|
|
24
|
+
## Step 1: Detect Project State — Idempotency Guard
|
|
25
25
|
|
|
26
26
|
Check if `.planning/` directory exists in the current working directory.
|
|
27
27
|
|
|
28
28
|
**If `.planning/` exists**:
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
|
|
29
|
+
- Check for existing core files: `STATE.md`, `ROADMAP.md`, `config.json`
|
|
30
|
+
- If ANY of these exist, present a checkpoint:
|
|
31
|
+
|
|
32
|
+
Use AskUserQuestion:
|
|
33
|
+
question: "Existing project detected with {list of found files}. How should we proceed?"
|
|
34
|
+
header: "Setup"
|
|
35
|
+
options:
|
|
36
|
+
- label: "Resume" description: "Keep existing .planning/ and review configuration (recommended)"
|
|
37
|
+
- label: "Reset" description: "Archive current .planning/ to .planning.bak/ and start fresh"
|
|
38
|
+
- label: "Abort" description: "Cancel setup — keep everything as-is"
|
|
39
|
+
|
|
40
|
+
- If "Resume": Tell the user: "Keeping existing project. Reviewing configuration." Skip to Step 3 (model selection)
|
|
41
|
+
- If "Reset": Run `mv .planning .planning.bak` (creating a backup), then proceed with fresh setup below
|
|
42
|
+
- If "Abort": Display "Setup cancelled. Run `/pbr:status` to see current project state." and stop
|
|
43
|
+
|
|
44
|
+
- If `.planning/` exists but has NONE of the core files (empty or only has subdirs):
|
|
45
|
+
- Tell the user: "Found empty .planning/ directory. Proceeding with initialization."
|
|
46
|
+
- Continue to fresh setup below
|
|
32
47
|
|
|
33
48
|
**If `.planning/` does NOT exist**:
|
|
34
49
|
- Ask the user:
|
|
@@ -48,10 +63,14 @@ If "No", display: "Run `/pbr:begin` when you're ready to start a project. It inc
|
|
|
48
63
|
|
|
49
64
|
If "Yes", create the minimal `.planning/` structure:
|
|
50
65
|
|
|
66
|
+
**CRITICAL: Create .planning/ directory structure NOW. Do NOT skip this step.**
|
|
67
|
+
|
|
51
68
|
```bash
|
|
52
69
|
mkdir -p .planning/phases .planning/todos/pending .planning/todos/done .planning/logs .planning/research
|
|
53
70
|
```
|
|
54
71
|
|
|
72
|
+
**CRITICAL: Write .planning/config.json NOW. Do NOT skip this step.**
|
|
73
|
+
|
|
55
74
|
Create `.planning/config.json` with defaults:
|
|
56
75
|
```json
|
|
57
76
|
{
|
|
@@ -120,6 +139,8 @@ Create `.planning/config.json` with defaults:
|
|
|
120
139
|
}
|
|
121
140
|
```
|
|
122
141
|
|
|
142
|
+
**CRITICAL: Write .planning/STATE.md NOW. Do NOT skip this step.**
|
|
143
|
+
|
|
123
144
|
Create `.planning/STATE.md`:
|
|
124
145
|
```markdown
|
|
125
146
|
---
|
|
@@ -215,13 +236,38 @@ Apply selections:
|
|
|
215
236
|
|
|
216
237
|
---
|
|
217
238
|
|
|
239
|
+
## Step 4b: CLAUDE.md Integration
|
|
240
|
+
|
|
241
|
+
Check if a `CLAUDE.md` file exists in the project root.
|
|
242
|
+
|
|
243
|
+
**If it exists**: Read it. If it does NOT already contain a "Plan-Build-Run" section, append the block below.
|
|
244
|
+
**If it does NOT exist**: Create `CLAUDE.md` with the block below.
|
|
245
|
+
|
|
246
|
+
Append/create this content:
|
|
247
|
+
|
|
248
|
+
```markdown
|
|
249
|
+
## Plan-Build-Run
|
|
250
|
+
|
|
251
|
+
This project uses [Plan-Build-Run](https://github.com/SienkLogic/plan-build-run) for structured development.
|
|
252
|
+
|
|
253
|
+
- Project state: `.planning/STATE.md` (source of truth for current phase and progress)
|
|
254
|
+
- Configuration: `.planning/config.json`
|
|
255
|
+
- Run `/pbr:status` to see current project state and suggested next action.
|
|
256
|
+
|
|
257
|
+
**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.
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
218
262
|
## Step 5: Verification
|
|
219
263
|
|
|
264
|
+
**CRITICAL: Run validation checks NOW to confirm setup succeeded. Do NOT skip this step.**
|
|
265
|
+
|
|
220
266
|
Run a quick health check:
|
|
221
267
|
|
|
222
268
|
1. Verify `.planning/config.json` is valid JSON
|
|
223
269
|
2. Verify `.planning/STATE.md` exists and is parseable
|
|
224
|
-
3. Verify hook scripts are accessible: `node ${
|
|
270
|
+
3. Verify hook scripts are accessible: `node ${PLUGIN_ROOT}/scripts/progress-tracker.js` from the project directory
|
|
225
271
|
4. Check that `npm test` works (if package.json exists)
|
|
226
272
|
|
|
227
273
|
Display results:
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
<!-- canonical: ../../../pbr/skills/shared/error-reporting.md -->
|
|
2
1
|
# Error Reporting Fragment
|
|
3
2
|
|
|
4
3
|
Standard error display formats for all skills. Reference `references/ui-formatting.md` for the full brand guide.
|
|
@@ -78,3 +77,5 @@ Blocked: {short reason}
|
|
|
78
77
|
```
|
|
79
78
|
|
|
80
79
|
This format is used by validate-commit.js and check-dangerous-commands.js. The `decision: "block"` and `reason` fields in the JSON output follow this pattern.
|
|
80
|
+
|
|
81
|
+
Block reasons should always include a "To fix:" line with actionable guidance so the user or agent knows how to resolve the block.
|
|
@@ -24,11 +24,15 @@ These rules prevent context rot -- quality degradation as the context window fil
|
|
|
24
24
|
8. **Never** read `.planning/logs/` files -- only the health skill reads these.
|
|
25
25
|
9. **Do not** re-read full file contents when frontmatter is sufficient -- frontmatter contains status, key_files, commits, and provides fields.
|
|
26
26
|
|
|
27
|
+
## Task/Subagent Rules (apply to every skill)
|
|
28
|
+
|
|
29
|
+
10. **Never** invoke `Skill()` inside a `Task()` subagent -- the Skill tool is not available in subagent contexts. Subagents spawned by `Task()` cannot resolve `/pbr:*` skill prefixes, so `Skill({ skill: "pbr:plan" })` will silently fail. Instead, chain skills at the orchestrator level (return control to the orchestrator, then call `Skill()` from there). For subagent work, use `subagent_type: "pbr:{agent}"` which auto-loads agent definitions.
|
|
30
|
+
|
|
27
31
|
## Behavioral Rules (apply to every skill)
|
|
28
32
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
11. **Do not** re-litigate decisions that are already locked in CONTEXT.md -- respect locked decisions unconditionally.
|
|
34
|
+
12. **Do not** create artifacts the user did not approve -- always confirm before writing new planning documents.
|
|
35
|
+
13. **Do not** modify files outside the skill's stated scope -- check the "Files Created/Modified" table in each skill.
|
|
36
|
+
14. **Do not** suggest multiple next actions without clear priority -- one primary suggestion, alternatives listed secondary.
|
|
37
|
+
15. **Do not** use `git add .` or `git add -A` -- stage specific files only.
|
|
38
|
+
16. **Do not** include sensitive information (API keys, passwords, tokens) in planning documents or commits.
|
|
@@ -8,9 +8,9 @@ description: "Show current project status and suggest what to do next."
|
|
|
8
8
|
**Before ANY tool calls**, display this banner:
|
|
9
9
|
|
|
10
10
|
```
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
12
|
+
║ PLAN-BUILD-RUN ► PROJECT STATUS ║
|
|
13
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Then proceed to Step 1.
|
|
@@ -10,9 +10,9 @@ description: "Install or configure the PBR status line in Claude Code."
|
|
|
10
10
|
**Before ANY tool calls**, display this banner:
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
14
|
+
║ PLAN-BUILD-RUN ► STATUS LINE ║
|
|
15
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
Then proceed to Step 1.
|
|
@@ -76,9 +76,12 @@ If "Install":
|
|
|
76
76
|
|
|
77
77
|
**CRITICAL: Use Read tool to read the file, then Write to update it. Do NOT use sed or other text manipulation on JSON files.**
|
|
78
78
|
|
|
79
|
+
**CRITICAL: Back up settings.json NOW.** Write the original content to `~/.claude/settings.json.bak` before making any changes.
|
|
80
|
+
|
|
79
81
|
1. Read `~/.claude/settings.json`
|
|
80
|
-
2.
|
|
81
|
-
3.
|
|
82
|
+
2. Write the original content to `~/.claude/settings.json.bak`
|
|
83
|
+
3. Parse the JSON
|
|
84
|
+
4. Set `statusLine` to:
|
|
82
85
|
```json
|
|
83
86
|
{
|
|
84
87
|
"type": "command",
|
|
@@ -86,7 +89,7 @@ If "Install":
|
|
|
86
89
|
}
|
|
87
90
|
```
|
|
88
91
|
Where `SCRIPT_PATH` is the resolved absolute path from Step 1. Use forward slashes even on Windows.
|
|
89
|
-
|
|
92
|
+
5. Write the updated JSON back (preserve all other settings, use 2-space indentation)
|
|
90
93
|
|
|
91
94
|
### Step 4: Verify and confirm
|
|
92
95
|
|
|
@@ -113,8 +116,9 @@ Customize per-project via .planning/config.json:
|
|
|
113
116
|
|
|
114
117
|
1. Read `~/.claude/settings.json`
|
|
115
118
|
2. If no `statusLine` key: inform user "No status line configured." and stop
|
|
116
|
-
3.
|
|
117
|
-
4.
|
|
119
|
+
3. **CRITICAL: Back up settings.json NOW.** Write the original content to `~/.claude/settings.json.bak` before making any changes.
|
|
120
|
+
4. Remove the `statusLine` key from the JSON
|
|
121
|
+
5. Write the updated file
|
|
118
122
|
5. Display: `✓ PBR status line removed. Restart Claude Code to take effect.`
|
|
119
123
|
|
|
120
124
|
---
|
|
@@ -8,9 +8,9 @@ description: "File-based persistent todos. Add, list, complete — survives sess
|
|
|
8
8
|
**Before ANY tool calls**, display this banner:
|
|
9
9
|
|
|
10
10
|
```
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
12
|
+
║ PLAN-BUILD-RUN ► TODO ║
|
|
13
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Then proceed to Step 1.
|
|
@@ -72,15 +72,17 @@ theme: {inferred-theme}
|
|
|
72
72
|
|
|
73
73
|
8. Confirm with branded output:
|
|
74
74
|
```
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
76
|
+
║ PLAN-BUILD-RUN ► TODO ADDED ✓ ║
|
|
77
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
78
78
|
|
|
79
79
|
**Todo {NNN}:** {description}
|
|
80
80
|
|
|
81
|
-
───────────────────────────────────────────────────────────────
|
|
82
81
|
|
|
83
|
-
|
|
82
|
+
|
|
83
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
84
|
+
║ ▶ NEXT UP ║
|
|
85
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
84
86
|
|
|
85
87
|
**Work on it now** or see your task list
|
|
86
88
|
|
|
@@ -88,13 +90,13 @@ theme: {inferred-theme}
|
|
|
88
90
|
|
|
89
91
|
<sub>`/clear` first → fresh context window</sub>
|
|
90
92
|
|
|
91
|
-
|
|
93
|
+
|
|
92
94
|
|
|
93
95
|
**Also available:**
|
|
94
96
|
- `/pbr:todo list` — see all pending todos
|
|
95
97
|
- `/pbr:status` — see project status
|
|
96
98
|
|
|
97
|
-
|
|
99
|
+
|
|
98
100
|
```
|
|
99
101
|
|
|
100
102
|
### `list [theme]`
|
|
@@ -114,21 +116,23 @@ Pending Todos:
|
|
|
114
116
|
|
|
115
117
|
5. Offer actions with branded routing:
|
|
116
118
|
```
|
|
117
|
-
───────────────────────────────────────────────────────────────
|
|
118
119
|
|
|
119
|
-
|
|
120
|
+
|
|
121
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
122
|
+
║ ▶ NEXT UP ║
|
|
123
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
120
124
|
|
|
121
125
|
**Pick a todo** — mark one done or start working
|
|
122
126
|
|
|
123
127
|
`/pbr:todo work <NNN>` — start working on a todo
|
|
124
128
|
`/pbr:todo done <NNN>` — mark a todo as complete
|
|
125
129
|
|
|
126
|
-
|
|
130
|
+
|
|
127
131
|
|
|
128
132
|
**Also available:**
|
|
129
133
|
- `/pbr:status` — see project status
|
|
130
134
|
|
|
131
|
-
|
|
135
|
+
|
|
132
136
|
```
|
|
133
137
|
|
|
134
138
|
### `done <NNN>`
|
|
@@ -147,20 +151,37 @@ Todo {NNN} not found in pending todos.
|
|
|
147
151
|
3. Ensure `.planning/todos/done/` directory exists (create if needed)
|
|
148
152
|
4. Read the pending file content
|
|
149
153
|
5. Update frontmatter in the content: set `status: done` and add `completed: {YYYY-MM-DD}`
|
|
154
|
+
|
|
155
|
+
**CRITICAL: Write to done/ FIRST, verify it exists, THEN delete from pending/. Do NOT delete pending before confirming done/ write succeeded.**
|
|
156
|
+
|
|
150
157
|
6. Write the updated content to `.planning/todos/done/{NNN}-{slug}.md`
|
|
151
|
-
7.
|
|
158
|
+
7. Verify the done/ file was written successfully: check that `.planning/todos/done/{NNN}-{slug}.md` exists and has content (use `ls` or Glob)
|
|
159
|
+
- If the done/ write failed, abort and display:
|
|
160
|
+
```
|
|
161
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
162
|
+
║ ERROR ║
|
|
163
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
164
|
+
|
|
165
|
+
Failed to write to done/. Pending file preserved.
|
|
166
|
+
|
|
167
|
+
**To fix:** Check that `.planning/todos/done/` exists and is writable.
|
|
168
|
+
```
|
|
169
|
+
Do NOT proceed to delete the pending file.
|
|
170
|
+
8. Only THEN delete the original file from `.planning/todos/pending/` (use `rm` via Bash)
|
|
152
171
|
8. Update STATE.md
|
|
153
172
|
9. Confirm with branded output:
|
|
154
173
|
```
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
174
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
175
|
+
║ PLAN-BUILD-RUN ► TODO COMPLETED ✓ ║
|
|
176
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
158
177
|
|
|
159
178
|
**Todo {NNN}:** {title}
|
|
160
179
|
|
|
161
|
-
───────────────────────────────────────────────────────────────
|
|
162
180
|
|
|
163
|
-
|
|
181
|
+
|
|
182
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
183
|
+
║ ▶ NEXT UP ║
|
|
184
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
164
185
|
|
|
165
186
|
**See remaining tasks**
|
|
166
187
|
|
|
@@ -168,13 +189,13 @@ Todo {NNN} not found in pending todos.
|
|
|
168
189
|
|
|
169
190
|
<sub>`/clear` first → fresh context window</sub>
|
|
170
191
|
|
|
171
|
-
|
|
192
|
+
|
|
172
193
|
|
|
173
194
|
**Also available:**
|
|
174
195
|
- `/pbr:continue` — execute next logical step
|
|
175
196
|
- `/pbr:status` — see project status
|
|
176
197
|
|
|
177
|
-
|
|
198
|
+
|
|
178
199
|
```
|
|
179
200
|
|
|
180
201
|
### `work <NNN>`
|
|
@@ -206,9 +227,9 @@ Which approach?
|
|
|
206
227
|
|
|
207
228
|
6. Display branded output:
|
|
208
229
|
```
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
230
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
231
|
+
║ PLAN-BUILD-RUN ► WORKING ON TODO {NNN} ║
|
|
232
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
212
233
|
|
|
213
234
|
**Todo {NNN}:** {title}
|
|
214
235
|
**Routing to:** /pbr:{chosen-skill}
|
|
@@ -228,15 +249,17 @@ For `/pbr:plan`, if no phase exists for this work yet, suggest the user run `/pb
|
|
|
228
249
|
8. When the skill completes, remind the user:
|
|
229
250
|
|
|
230
251
|
```
|
|
231
|
-
───────────────────────────────────────────────────────────────
|
|
232
252
|
|
|
233
|
-
|
|
253
|
+
|
|
254
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
255
|
+
║ ▶ NEXT UP ║
|
|
256
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
234
257
|
|
|
235
258
|
**Mark this todo as done if the work is complete**
|
|
236
259
|
|
|
237
260
|
`/pbr:todo done {NNN}`
|
|
238
261
|
|
|
239
|
-
|
|
262
|
+
|
|
240
263
|
```
|
|
241
264
|
|
|
242
265
|
### No arguments
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pbr",
|
|
3
3
|
"displayName": "Plan-Build-Run",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.11.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",
|
|
@@ -45,6 +45,48 @@ You receive ONE focus area per invocation. All output is written to `.planning/c
|
|
|
45
45
|
|
|
46
46
|
Read the relevant `.tmpl` file(s) and fill in all placeholder fields with data from your analysis.
|
|
47
47
|
|
|
48
|
+
### Fallback Format (if templates unreadable)
|
|
49
|
+
|
|
50
|
+
If the template files cannot be read, use these minimum viable structures:
|
|
51
|
+
|
|
52
|
+
**STACK.md:**
|
|
53
|
+
```markdown
|
|
54
|
+
## Tech Stack
|
|
55
|
+
| Category | Technology | Version | Config File |
|
|
56
|
+
|----------|-----------|---------|-------------|
|
|
57
|
+
## Package Manager
|
|
58
|
+
{name} — lock file: {path}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**ARCHITECTURE.md:**
|
|
62
|
+
```markdown
|
|
63
|
+
## Architecture Overview
|
|
64
|
+
**Pattern:** {pattern name}
|
|
65
|
+
## Key Components
|
|
66
|
+
| Component | Path | Responsibility |
|
|
67
|
+
|-----------|------|---------------|
|
|
68
|
+
## Data Flow
|
|
69
|
+
{entry point} -> {processing} -> {output}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**CONVENTIONS.md:**
|
|
73
|
+
```markdown
|
|
74
|
+
## Code Conventions
|
|
75
|
+
| Convention | Pattern | Example File |
|
|
76
|
+
|-----------|---------|-------------|
|
|
77
|
+
## Naming Patterns
|
|
78
|
+
{description with file path evidence}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**CONCERNS.md:**
|
|
82
|
+
```markdown
|
|
83
|
+
## Concerns
|
|
84
|
+
| Severity | Area | Description | File |
|
|
85
|
+
|----------|------|-------------|------|
|
|
86
|
+
## Security Considerations
|
|
87
|
+
{findings}
|
|
88
|
+
```
|
|
89
|
+
|
|
48
90
|
---
|
|
49
91
|
|
|
50
92
|
## Exploration Process
|
|
@@ -38,7 +38,8 @@ You are **debugger**, the systematic debugging agent. Investigate bugs using the
|
|
|
38
38
|
```yaml
|
|
39
39
|
---
|
|
40
40
|
slug: "{slug}"
|
|
41
|
-
status: "gathering" # gathering → investigating → fixing → verifying → resolved
|
|
41
|
+
status: "gathering" # gathering → investigating → fixing → verifying → resolved (resolution: fixed | abandoned)
|
|
42
|
+
# resolution: "fixed" or "abandoned" (set when status = resolved; abandoned = user ended without fix)
|
|
42
43
|
created: "{ISO}"
|
|
43
44
|
updated: "{ISO}"
|
|
44
45
|
mode: "find_and_fix"
|
|
@@ -115,6 +116,8 @@ When you need human input, emit a checkpoint block. Always include `Debug file:`
|
|
|
115
116
|
|
|
116
117
|
## Fixing Protocol
|
|
117
118
|
|
|
119
|
+
**CRITICAL — DO NOT SKIP steps 5-8. Uncommitted fixes and unupdated debug files cause state corruption on resume.**
|
|
120
|
+
|
|
118
121
|
**Steps**: Verify root cause → plan minimal fix → predict outcome → implement → verify → check regressions → commit → update debug file.
|
|
119
122
|
|
|
120
123
|
**Guidelines**: Minimal change (root cause, not symptoms). One atomic commit. No refactoring or features. Test the fix.
|
|
@@ -28,6 +28,7 @@ You are **executor**, the code execution agent for Plan-Build-Run. You receive v
|
|
|
28
28
|
e. If verify fails: apply deviation rules
|
|
29
29
|
f. If checkpoint: STOP and return
|
|
30
30
|
g. Update .PROGRESS-{plan_id} file (task number, commit SHA, timestamp)
|
|
31
|
+
** CRITICAL — DO NOT SKIP STEPS 6-9. The SUMMARY.md artifact is REQUIRED for phase verification. Returning without it causes downstream failures. **
|
|
31
32
|
6. Create SUMMARY.md
|
|
32
33
|
7. Validate SUMMARY.md completeness
|
|
33
34
|
8. Delete .PROGRESS-{plan_id} file (normal completion)
|
|
@@ -143,6 +144,33 @@ After all tasks (or at checkpoint), create `.planning/phases/{phase_dir}/SUMMARY
|
|
|
143
144
|
|
|
144
145
|
Read `templates/SUMMARY.md.tmpl` for full structure. Status values: `complete`, `partial`, `checkpoint`.
|
|
145
146
|
|
|
147
|
+
### Fallback Format (if template unreadable)
|
|
148
|
+
|
|
149
|
+
If the template file cannot be read, use this minimum viable structure:
|
|
150
|
+
|
|
151
|
+
```yaml
|
|
152
|
+
---
|
|
153
|
+
plan: "{plan_id}"
|
|
154
|
+
status: complete|partial|checkpoint
|
|
155
|
+
commits: ["{sha1}", "{sha2}"]
|
|
156
|
+
provides: ["exported item 1"]
|
|
157
|
+
must_haves:
|
|
158
|
+
- "{must-have}: DONE|PARTIAL|SKIPPED"
|
|
159
|
+
---
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
```markdown
|
|
163
|
+
## Task Results
|
|
164
|
+
|
|
165
|
+
| Task | Status | Notes |
|
|
166
|
+
|------|--------|-------|
|
|
167
|
+
| T1 | done | ... |
|
|
168
|
+
|
|
169
|
+
## Deviations
|
|
170
|
+
|
|
171
|
+
(list any deviations from plan, or "None")
|
|
172
|
+
```
|
|
173
|
+
|
|
146
174
|
### Completeness Checklist
|
|
147
175
|
|
|
148
176
|
Before deleting `.PROGRESS-{plan_id}`, verify SUMMARY.md has:
|
|
@@ -163,6 +191,8 @@ If the plan introduced external setup requirements (env vars, API keys, system d
|
|
|
163
191
|
|
|
164
192
|
## Self-Check
|
|
165
193
|
|
|
194
|
+
**CRITICAL — Run the self-check. Skipping it means undetected failures reach the verifier.**
|
|
195
|
+
|
|
166
196
|
After SUMMARY.md, before returning:
|
|
167
197
|
1. `ls -la {path}` for each `key_files` entry
|
|
168
198
|
2. `git log --oneline -n {expected_count}` — verify commit count
|
|
@@ -174,7 +204,7 @@ If ANY fails: set status to `partial`, add `self_check_failures` to frontmatter.
|
|
|
174
204
|
|
|
175
205
|
## Time Tracking
|
|
176
206
|
|
|
177
|
-
Record `
|
|
207
|
+
Record timestamps at start and end using `node -e "console.log(new Date().toISOString())"`. To compute duration: `node -e "const s=new Date('START').getTime(),e=new Date('END').getTime(); console.log(((e-s)/60000).toFixed(1))"` (replacing START and END with the recorded ISO strings). Write to SUMMARY.md frontmatter as `metrics.duration_minutes`, `metrics.start_time`, `metrics.end_time`.
|
|
178
208
|
|
|
179
209
|
---
|
|
180
210
|
|