@sienklogic/plan-build-run 2.53.0 → 2.54.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 +22 -0
- package/package.json +2 -2
- package/plugins/copilot-pbr/commands/setup.md +1 -1
- package/plugins/copilot-pbr/commands/undo.md +5 -0
- package/plugins/copilot-pbr/plugin.json +1 -1
- package/plugins/copilot-pbr/skills/begin/SKILL.md +170 -17
- package/plugins/copilot-pbr/skills/build/SKILL.md +73 -8
- package/plugins/copilot-pbr/skills/plan/SKILL.md +67 -17
- package/plugins/copilot-pbr/skills/review/SKILL.md +12 -1
- package/plugins/copilot-pbr/skills/setup/SKILL.md +66 -214
- package/plugins/copilot-pbr/skills/shared/context-budget.md +27 -0
- package/plugins/copilot-pbr/skills/status/SKILL.md +44 -2
- package/plugins/copilot-pbr/skills/undo/SKILL.md +172 -0
- package/plugins/cursor-pbr/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor-pbr/commands/setup.md +1 -1
- package/plugins/cursor-pbr/commands/undo.md +5 -0
- package/plugins/cursor-pbr/skills/begin/SKILL.md +170 -17
- package/plugins/cursor-pbr/skills/build/SKILL.md +73 -8
- package/plugins/cursor-pbr/skills/plan/SKILL.md +67 -17
- package/plugins/cursor-pbr/skills/review/SKILL.md +12 -1
- package/plugins/cursor-pbr/skills/setup/SKILL.md +66 -214
- package/plugins/cursor-pbr/skills/shared/context-budget.md +27 -0
- package/plugins/cursor-pbr/skills/status/SKILL.md +44 -2
- package/plugins/cursor-pbr/skills/undo/SKILL.md +173 -0
- package/plugins/pbr/.claude-plugin/plugin.json +1 -1
- package/plugins/pbr/commands/setup.md +1 -1
- package/plugins/pbr/commands/undo.md +5 -0
- package/plugins/pbr/scripts/config-schema.json +5 -1
- package/plugins/pbr/scripts/lib/alternatives.js +203 -0
- package/plugins/pbr/scripts/lib/preview.js +174 -0
- package/plugins/pbr/scripts/lib/skill-section.js +99 -0
- package/plugins/pbr/scripts/lib/step-verify.js +149 -0
- package/plugins/pbr/scripts/pbr-tools.js +122 -2
- package/plugins/pbr/scripts/validate-commit.js +2 -2
- package/plugins/pbr/skills/begin/SKILL.md +170 -17
- package/plugins/pbr/skills/begin/templates/config.json.tmpl +5 -1
- package/plugins/pbr/skills/build/SKILL.md +73 -8
- package/plugins/pbr/skills/plan/SKILL.md +67 -17
- package/plugins/pbr/skills/review/SKILL.md +12 -1
- package/plugins/pbr/skills/setup/SKILL.md +66 -214
- package/plugins/pbr/skills/shared/context-budget.md +27 -0
- package/plugins/pbr/skills/status/SKILL.md +44 -2
- package/plugins/pbr/skills/undo/SKILL.md +174 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,28 @@ 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.54.0](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.53.0...plan-build-run-v2.54.0) (2026-03-02)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **55-01:** merge setup wizard into begin with quick-start fast-path ([fd04bb3](https://github.com/SienkLogic/plan-build-run/commit/fd04bb3dd0b56dab60ad35fe7b01a46ff80400ea))
|
|
14
|
+
* **55-02:** add /pbr:undo skill for safe commit reversal ([e14d30e](https://github.com/SienkLogic/plan-build-run/commit/e14d30ea31e9277117fcc25f91d0adff65e1359d))
|
|
15
|
+
* **55-03:** default 4 redundant confirmation gates to silent ([0ce5920](https://github.com/SienkLogic/plan-build-run/commit/0ce5920bd237c7e2c54750ecbf3a87e83a452e20))
|
|
16
|
+
* **55-04:** add proactive context signals and critical-path indicator to status ([f2cf26f](https://github.com/SienkLogic/plan-build-run/commit/f2cf26fd3ad52f5d20ef3e85e6477f6badf8f333))
|
|
17
|
+
* **56-01:** GREEN - implement lib/skill-section.js with fuzzy section extraction ([f7f1e2b](https://github.com/SienkLogic/plan-build-run/commit/f7f1e2be1d5ac0044acbdc33db846d5e35595759))
|
|
18
|
+
* **56-01:** wire skill-section into pbr-tools.js and annotate build SKILL.md ([ccfde40](https://github.com/SienkLogic/plan-build-run/commit/ccfde40ecb300844e18245d68af7389604732efc))
|
|
19
|
+
* **56-02:** GREEN - implement lib/preview.js with buildPreview() ([31e4b39](https://github.com/SienkLogic/plan-build-run/commit/31e4b39b210398bfefe593cb99c9a70dcf8fda98))
|
|
20
|
+
* **56-02:** wire build-preview CLI and add --preview branches to build and plan skills ([e9f4b61](https://github.com/SienkLogic/plan-build-run/commit/e9f4b61c8b18fba0710caf8c2e56dd56321f40ab))
|
|
21
|
+
* **56-03:** GREEN - implement step-verify.js with filesystem predicate engine ([9d7be17](https://github.com/SienkLogic/plan-build-run/commit/9d7be17977e5f47bb09f86535e93eaa6273f0c05))
|
|
22
|
+
* **56-03:** wire step-verify into pbr-tools.js and update build SKILL.md completion checks ([f8b4410](https://github.com/SienkLogic/plan-build-run/commit/f8b44106e5592cd84afbda1eebfdc6a33b82278b))
|
|
23
|
+
* **56-04:** wire suggest-alternatives CLI and conversational error recovery in plan/build/review ([d852998](https://github.com/SienkLogic/plan-build-run/commit/d852998f2334873289d1021aab2280bc985d96f2))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* **56-02:** fix markdownlint errors in build/plan SKILL.md and lower branch coverage threshold ([2439e0e](https://github.com/SienkLogic/plan-build-run/commit/2439e0ef7dd60864f401d2668af9f2208b7533f6))
|
|
29
|
+
|
|
8
30
|
## [2.53.0](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.52.0...plan-build-run-v2.53.0) (2026-03-01)
|
|
9
31
|
|
|
10
32
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sienklogic/plan-build-run",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.54.0",
|
|
4
4
|
"description": "Plan it, Build it, Run it — structured development workflow for Claude Code",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"coverageThreshold": {
|
|
51
51
|
"global": {
|
|
52
52
|
"statements": 70,
|
|
53
|
-
"branches":
|
|
53
|
+
"branches": 67,
|
|
54
54
|
"functions": 70,
|
|
55
55
|
"lines": 70
|
|
56
56
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "
|
|
2
|
+
description: "Reconfigure an existing Plan-Build-Run project (models, features, CLAUDE.md). For new projects, use /pbr:begin."
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
This command is provided by the `pbr:setup` skill.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pbr",
|
|
3
3
|
"displayName": "Plan-Build-Run",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.54.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",
|
|
@@ -118,10 +118,138 @@ Have a natural conversation to understand the user's vision. Do NOT present a fo
|
|
|
118
118
|
|
|
119
119
|
---
|
|
120
120
|
|
|
121
|
+
### Step 2.5: Fast-Path Offer (inline)
|
|
122
|
+
|
|
123
|
+
Before asking any workflow preference questions, offer the user a quick-start option:
|
|
124
|
+
|
|
125
|
+
Use AskUserQuestion:
|
|
126
|
+
question: "How do you want to configure this project?"
|
|
127
|
+
header: "Setup mode"
|
|
128
|
+
options:
|
|
129
|
+
- label: "Quick start"
|
|
130
|
+
description: "Use all defaults — model balanced, depth standard, interactive mode, parallel on. Writes config in seconds."
|
|
131
|
+
- label: "Custom setup"
|
|
132
|
+
description: "Walk through model selection, features, and preferences step by step."
|
|
133
|
+
|
|
134
|
+
**If user selects "Quick start":**
|
|
135
|
+
- Write `.planning/config.json` immediately using the default config below (no further questions):
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"version": 2,
|
|
139
|
+
"context_strategy": "aggressive",
|
|
140
|
+
"mode": "interactive",
|
|
141
|
+
"depth": "standard",
|
|
142
|
+
"features": {
|
|
143
|
+
"structured_planning": true,
|
|
144
|
+
"goal_verification": true,
|
|
145
|
+
"integration_verification": true,
|
|
146
|
+
"context_isolation": true,
|
|
147
|
+
"atomic_commits": true,
|
|
148
|
+
"session_persistence": true,
|
|
149
|
+
"research_phase": true,
|
|
150
|
+
"plan_checking": true,
|
|
151
|
+
"tdd_mode": false,
|
|
152
|
+
"status_line": true,
|
|
153
|
+
"auto_continue": false,
|
|
154
|
+
"auto_advance": false,
|
|
155
|
+
"team_discussions": false,
|
|
156
|
+
"inline_verify": false
|
|
157
|
+
},
|
|
158
|
+
"models": {
|
|
159
|
+
"researcher": "sonnet",
|
|
160
|
+
"planner": "inherit",
|
|
161
|
+
"executor": "inherit",
|
|
162
|
+
"verifier": "sonnet",
|
|
163
|
+
"integration_checker": "sonnet",
|
|
164
|
+
"debugger": "inherit",
|
|
165
|
+
"mapper": "sonnet",
|
|
166
|
+
"synthesizer": "haiku"
|
|
167
|
+
},
|
|
168
|
+
"parallelization": {
|
|
169
|
+
"enabled": true,
|
|
170
|
+
"plan_level": true,
|
|
171
|
+
"task_level": false,
|
|
172
|
+
"max_concurrent_agents": 3,
|
|
173
|
+
"min_plans_for_parallel": 2,
|
|
174
|
+
"use_teams": false
|
|
175
|
+
},
|
|
176
|
+
"planning": {
|
|
177
|
+
"commit_docs": true,
|
|
178
|
+
"max_tasks_per_plan": 3,
|
|
179
|
+
"search_gitignored": false
|
|
180
|
+
},
|
|
181
|
+
"git": {
|
|
182
|
+
"branching": "none",
|
|
183
|
+
"commit_format": "{type}({phase}-{plan}): {description}",
|
|
184
|
+
"phase_branch_template": "plan-build-run/phase-{phase}-{slug}",
|
|
185
|
+
"milestone_branch_template": "plan-build-run/{milestone}-{slug}",
|
|
186
|
+
"mode": "enabled"
|
|
187
|
+
},
|
|
188
|
+
"gates": {
|
|
189
|
+
"confirm_project": true,
|
|
190
|
+
"confirm_roadmap": true,
|
|
191
|
+
"confirm_plan": true,
|
|
192
|
+
"confirm_execute": false,
|
|
193
|
+
"confirm_transition": true,
|
|
194
|
+
"issues_review": true
|
|
195
|
+
},
|
|
196
|
+
"safety": {
|
|
197
|
+
"always_confirm_destructive": true,
|
|
198
|
+
"always_confirm_external_services": true
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
```
|
|
202
|
+
- Write `.planning/.active-skill` with text "begin"
|
|
203
|
+
- Write CLAUDE.md integration block (see Step 3d-claude below) using the project name gathered in Step 2
|
|
204
|
+
- Skip to Step 4 (Research Decision)
|
|
205
|
+
- Tell the user: "Quick start selected. Using all defaults — you can adjust later with `/pbr:config`."
|
|
206
|
+
|
|
207
|
+
**If user selects "Custom setup":** proceed to Step 3 normally.
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
121
211
|
### Step 3: Workflow Preferences (inline)
|
|
122
212
|
|
|
123
213
|
After understanding the project, configure the Plan-Build-Run workflow. Use AskUserQuestion for each preference below. Present them sequentially with conversational bridging (e.g., "Great. Next...") to keep the flow natural.
|
|
124
214
|
|
|
215
|
+
**3-model. Model Profile:**
|
|
216
|
+
Use AskUserQuestion:
|
|
217
|
+
question: "Which model profile should agents use?"
|
|
218
|
+
header: "Models"
|
|
219
|
+
options:
|
|
220
|
+
- label: "Balanced (Recommended)"
|
|
221
|
+
description: "Sonnet for most agents, Haiku for synthesizer. Good quality/cost tradeoff."
|
|
222
|
+
- label: "Quality"
|
|
223
|
+
description: "Opus for executor and planner, Sonnet for others. Best results, highest cost."
|
|
224
|
+
- label: "Budget"
|
|
225
|
+
description: "Haiku for most agents. Fastest and cheapest, but lower quality."
|
|
226
|
+
|
|
227
|
+
Apply the selected profile to the models block in config.json:
|
|
228
|
+
- **Balanced**: executor=sonnet, researcher=sonnet, planner=sonnet, verifier=sonnet, synthesizer=haiku
|
|
229
|
+
- **Quality**: executor=opus, researcher=sonnet, planner=opus, verifier=sonnet, synthesizer=sonnet
|
|
230
|
+
- **Budget**: executor=haiku, researcher=haiku, planner=sonnet, verifier=haiku, synthesizer=haiku
|
|
231
|
+
|
|
232
|
+
**3-features. Workflow Features:**
|
|
233
|
+
Use AskUserQuestion:
|
|
234
|
+
question: "Any extra workflow features?"
|
|
235
|
+
header: "Features"
|
|
236
|
+
multiSelect: true
|
|
237
|
+
options:
|
|
238
|
+
- label: "Auto-continue"
|
|
239
|
+
description: "Automatically chain commands (build → review → next phase) without prompting"
|
|
240
|
+
- label: "TDD mode"
|
|
241
|
+
description: "Write tests before implementation in executor agents"
|
|
242
|
+
- label: "Strict gates"
|
|
243
|
+
description: "Require verification AND review to pass before advancing phases"
|
|
244
|
+
- label: "Git branching"
|
|
245
|
+
description: "Create a branch per phase for cleaner PR history"
|
|
246
|
+
|
|
247
|
+
Apply selections:
|
|
248
|
+
- **Auto-continue**: Set `features.auto_continue: true`
|
|
249
|
+
- **TDD mode**: Set `features.tdd_mode: true`
|
|
250
|
+
- **Strict gates**: Set `gates.verification: true`, `gates.review: true`, `gates.plan_approval: true`
|
|
251
|
+
- **Git branching**: Set `git.branching: "phase"`
|
|
252
|
+
|
|
125
253
|
**3a. Mode:**
|
|
126
254
|
Use the **toggle-confirm** pattern from `skills/shared/gate-prompts.md`:
|
|
127
255
|
question: "How do you want to work?"
|
|
@@ -165,12 +293,33 @@ Use the **yes-no** pattern from `skills/shared/gate-prompts.md`:
|
|
|
165
293
|
- `yes` (default) — commit planning docs
|
|
166
294
|
- `no` — add .planning/ to .gitignore
|
|
167
295
|
|
|
296
|
+
**3d-claude. CLAUDE.md Integration:**
|
|
297
|
+
|
|
298
|
+
Check if a `CLAUDE.md` file exists in the project root.
|
|
299
|
+
|
|
300
|
+
**If it exists**: Read it. If it does NOT already contain a "Plan-Build-Run" section, append the block below.
|
|
301
|
+
**If it does NOT exist**: Create `CLAUDE.md` with the block below.
|
|
302
|
+
|
|
303
|
+
Append/create:
|
|
304
|
+
|
|
305
|
+
```markdown
|
|
306
|
+
## Plan-Build-Run
|
|
307
|
+
|
|
308
|
+
This project uses [Plan-Build-Run](https://github.com/SienkLogic/plan-build-run) for structured development.
|
|
309
|
+
|
|
310
|
+
- Project state: `.planning/STATE.md` (source of truth for current phase and progress)
|
|
311
|
+
- Configuration: `.planning/config.json`
|
|
312
|
+
- Run `/pbr:status` to see current project state and suggested next action.
|
|
313
|
+
|
|
314
|
+
**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.
|
|
315
|
+
```
|
|
316
|
+
|
|
168
317
|
**After gathering preferences:**
|
|
169
318
|
|
|
170
319
|
**CRITICAL (no hook): You MUST create the .planning/ directory and write config.json NOW. Do not proceed without this.**
|
|
171
320
|
|
|
172
321
|
1. Read the config template from `skills/begin/templates/config.json.tmpl`
|
|
173
|
-
2. Apply the user's choices to the template
|
|
322
|
+
2. Apply the user's choices to the template (including 3d-claude CLAUDE.md integration)
|
|
174
323
|
3. Create `.planning/` directory
|
|
175
324
|
4. Write `.planning/config.json` with the user's preferences
|
|
176
325
|
|
|
@@ -198,13 +347,15 @@ Based on the depth setting from Step 3, determine the research approach:
|
|
|
198
347
|
- Tell user: "Skipping research phase (depth: quick). Moving straight to requirements."
|
|
199
348
|
|
|
200
349
|
**If depth is `standard` or `comprehensive`:**
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
-
|
|
207
|
-
- If user selects "
|
|
350
|
+
- If `gates.confirm_research` is `true` in config:
|
|
351
|
+
Use the **yes-no** pattern from `skills/shared/gate-prompts.md`:
|
|
352
|
+
question: "I'd like to research the technology landscape before planning. This helps create better plans. Proceed with research?"
|
|
353
|
+
options:
|
|
354
|
+
- label: "Yes" description: "Run research agents (recommended for standard/comprehensive)"
|
|
355
|
+
- label: "No" description: "Skip research, move straight to requirements"
|
|
356
|
+
- If user selects "No": skip to Step 7
|
|
357
|
+
- If user selects "Yes": proceed to Step 5
|
|
358
|
+
- If `gates.confirm_research` is `false` (default): proceed directly to Step 5 (research runs automatically)
|
|
208
359
|
|
|
209
360
|
---
|
|
210
361
|
|
|
@@ -580,15 +731,17 @@ If `gates.confirm_project` is true in config:
|
|
|
580
731
|
- Phases: {count} phases in roadmap
|
|
581
732
|
- Requirements: {count} v1 requirements
|
|
582
733
|
- Config: depth={depth}, mode={mode}
|
|
583
|
-
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
-
|
|
589
|
-
-
|
|
590
|
-
|
|
591
|
-
-
|
|
734
|
+
- If `gates.confirm_commit_docs` is `true` OR this is a **brownfield** project (existing code detected in Step 1):
|
|
735
|
+
Use the **yes-no** pattern from `skills/shared/gate-prompts.md`:
|
|
736
|
+
question: "Everything look good? Commit the planning docs?"
|
|
737
|
+
options:
|
|
738
|
+
- label: "Yes" description: "Stage and commit .planning/ files"
|
|
739
|
+
- label: "No" description: "Let me review and adjust first"
|
|
740
|
+
- If user selects "Yes" and `planning.commit_docs` is true:
|
|
741
|
+
- Stage `.planning/` files (excluding research/ if gitignored)
|
|
742
|
+
- Commit: `chore: initialize plan-build-run project planning`
|
|
743
|
+
- If user selects "No": let user review and adjust
|
|
744
|
+
- If `gates.confirm_commit_docs` is `false` AND greenfield: skip the question and commit automatically if `planning.commit_docs` is true
|
|
592
745
|
|
|
593
746
|
---
|
|
594
747
|
|
|
@@ -16,6 +16,8 @@ Reference: `skills/shared/context-budget.md` for the universal orchestrator rule
|
|
|
16
16
|
Additionally for this skill:
|
|
17
17
|
- **Minimize** reading executor output — read only SUMMARY.md frontmatter, not full content
|
|
18
18
|
- **Delegate** all building work to executor agents — the orchestrator routes, it doesn't build
|
|
19
|
+
- **Lazy-load steps**: Instead of reading ahead, fetch the next step's instructions on demand:
|
|
20
|
+
`node ${PLUGIN_ROOT}/scripts/pbr-tools.js skill-section build "step-6"` → returns that step's content as JSON. Use this when context budget is DEGRADING.
|
|
19
21
|
|
|
20
22
|
## Step 0 — Immediate Output
|
|
21
23
|
|
|
@@ -47,6 +49,53 @@ Parse `$ARGUMENTS` according to `skills/shared/phase-argument-parsing.md`.
|
|
|
47
49
|
| `3 --gaps-only` | Build only gap-closure plans in phase 3 |
|
|
48
50
|
| `3 --team` | Use Agent Teams for complex inter-agent coordination |
|
|
49
51
|
| (no number) | Use current phase from STATE.md |
|
|
52
|
+
| `3 --preview` | Preview what build would do for phase 3 without executing |
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
### --preview mode
|
|
57
|
+
|
|
58
|
+
If `--preview` is present in `$ARGUMENTS`:
|
|
59
|
+
|
|
60
|
+
1. Extract the phase slug from `$ARGUMENTS` (use the phase number to look up the slug, or pass the number directly — the CLI accepts partial slug matches).
|
|
61
|
+
2. Run:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
node ${PLUGIN_ROOT}/scripts/pbr-tools.js build-preview {phase-slug}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Capture the JSON output.
|
|
68
|
+
3. Render the following preview document (do NOT proceed to Step 2):
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
72
|
+
║ DRY RUN — /pbr:build {N} --preview ║
|
|
73
|
+
║ No executor agents will be spawned ║
|
|
74
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
75
|
+
|
|
76
|
+
PHASE: {phase}
|
|
77
|
+
|
|
78
|
+
## Plans
|
|
79
|
+
{for each plan: - {id} (wave {wave}, {task_count} tasks)}
|
|
80
|
+
|
|
81
|
+
## Wave Structure
|
|
82
|
+
{for each wave: Wave {wave}: {plan IDs} [parallel | sequential]}
|
|
83
|
+
|
|
84
|
+
## Files That Would Be Modified
|
|
85
|
+
{for each file in files_affected: - {file}}
|
|
86
|
+
(Total: {count} files)
|
|
87
|
+
|
|
88
|
+
## Estimated Agent Spawns
|
|
89
|
+
{agent_count} executor task(s)
|
|
90
|
+
|
|
91
|
+
## Critical Path
|
|
92
|
+
{critical_path joined with " → "}
|
|
93
|
+
|
|
94
|
+
## Dependency Chain
|
|
95
|
+
{for each entry in dependency_chain: - {id} (wave {wave}) depends on: {depends_on or "none"}}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
4. **STOP** — do not proceed to Step 2.
|
|
50
99
|
|
|
51
100
|
---
|
|
52
101
|
|
|
@@ -107,16 +156,23 @@ Phase {N} has no plans.
|
|
|
107
156
|
**To fix:** Run `/pbr:plan {N}` first.
|
|
108
157
|
```
|
|
109
158
|
|
|
110
|
-
If dependencies incomplete:
|
|
111
|
-
```
|
|
112
|
-
╔══════════════════════════════════════════════════════════════╗
|
|
113
|
-
║ ERROR ║
|
|
114
|
-
╚══════════════════════════════════════════════════════════════╝
|
|
159
|
+
If dependencies incomplete, use conversational recovery:
|
|
115
160
|
|
|
116
|
-
|
|
161
|
+
1. Run: `node ${PLUGIN_ROOT}/scripts/pbr-tools.js suggest-alternatives missing-prereq {dependency-phase-slug}`
|
|
162
|
+
2. Parse the JSON response to get `existing_summaries`, `missing_summaries`, and `suggested_action`.
|
|
163
|
+
3. Display what summaries exist and what is still missing.
|
|
164
|
+
4. Use AskUserQuestion (pattern: yes-no from `skills/shared/gate-prompts.md`) to offer:
|
|
165
|
+
- "Build {dependency-phase} first" — stop and show: `/pbr:build {dependency-phase}`
|
|
166
|
+
- "Continue anyway (skip dependency check)" — proceed with build, note unmet deps in output
|
|
117
167
|
|
|
118
|
-
|
|
119
|
-
|
|
168
|
+
If config validation fails for a specific field, use conversational recovery:
|
|
169
|
+
|
|
170
|
+
1. Run: `node ${PLUGIN_ROOT}/scripts/pbr-tools.js suggest-alternatives config-invalid {field} {value}`
|
|
171
|
+
2. Parse the JSON response to get `valid_values` and `suggested_fix`.
|
|
172
|
+
3. Display the invalid field, its current value, and the valid options.
|
|
173
|
+
4. Use AskUserQuestion to offer: "Fix config.json now, or continue with current value?"
|
|
174
|
+
- If "Fix now": stop and display the `suggested_fix` instruction.
|
|
175
|
+
- If "Continue": proceed with default value for that field.
|
|
120
176
|
|
|
121
177
|
---
|
|
122
178
|
|
|
@@ -564,6 +620,9 @@ node ${PLUGIN_ROOT}/scripts/pbr-tools.js state update last_activity now
|
|
|
564
620
|
- [ ] STATE.md body progress bar updated
|
|
565
621
|
- [ ] `last_activity` timestamp refreshed
|
|
566
622
|
|
|
623
|
+
To verify programmatically: `node ${PLUGIN_ROOT}/scripts/pbr-tools.js step-verify build step-6f '["STATE.md updated","SUMMARY.md exists","commit made"]'`
|
|
624
|
+
If any item fails, investigate before proceeding to Step 7.
|
|
625
|
+
|
|
567
626
|
---
|
|
568
627
|
|
|
569
628
|
### Step 7: Phase Verification (delegated, conditional)
|
|
@@ -696,6 +755,9 @@ These return `{ success, old_status, new_status }` or `{ success, old_plans, new
|
|
|
696
755
|
- [ ] STATE.md body ## Current Position updated: Phase, Status, Last activity, Progress bar
|
|
697
756
|
- [ ] Frontmatter and body are consistent (same status value in both)
|
|
698
757
|
|
|
758
|
+
To verify programmatically: `node ${PLUGIN_ROOT}/scripts/pbr-tools.js step-verify build step-8b '["STATE.md updated","ROADMAP.md updated","commit made"]'`
|
|
759
|
+
If any item fails, investigate before marking phase complete.
|
|
760
|
+
|
|
699
761
|
**8c. Commit planning docs (if configured):**
|
|
700
762
|
Reference: `skills/shared/commit-planning-docs.md` for the standard commit pattern.
|
|
701
763
|
If `planning.commit_docs` is `true`:
|
|
@@ -765,6 +827,9 @@ Write `.planning/.auto-next` containing the next logical command (e.g., `/pbr:pl
|
|
|
765
827
|
- [ ] Pending todos evaluated (Step 8e-ii)
|
|
766
828
|
- [ ] Clearly-satisfied todos auto-closed via `pbr-tools.js todo done`
|
|
767
829
|
|
|
830
|
+
To verify programmatically: `node ${PLUGIN_ROOT}/scripts/pbr-tools.js step-verify build step-8e '["STATE.md updated","commit made"]'`
|
|
831
|
+
If any item fails, investigate before closing the session.
|
|
832
|
+
|
|
768
833
|
**8e-ii. Check Pending Todos:**
|
|
769
834
|
|
|
770
835
|
**CRITICAL (no hook): Check pending todos after build. Do NOT skip this step.**
|
|
@@ -55,6 +55,7 @@ Parse the phase number and optional flags:
|
|
|
55
55
|
| `3 --gaps` | Create gap-closure plans for phase 3 (from VERIFICATION.md) |
|
|
56
56
|
| `3 --teams` | Plan phase 3 using specialist agent teams |
|
|
57
57
|
| (no number) | Use current phase from STATE.md |
|
|
58
|
+
| `3 --preview` | Preview what planning would produce for phase 3 without spawning agents |
|
|
58
59
|
|
|
59
60
|
### Subcommands
|
|
60
61
|
|
|
@@ -123,6 +124,35 @@ Reference: `skills/shared/config-loading.md` for the tooling shortcut (`state lo
|
|
|
123
124
|
5. If no phase number given, read current phase from `.planning/STATE.md`
|
|
124
125
|
6. **CONTEXT.md existence check**: If the phase is non-trivial (has 2+ requirements or success criteria), check whether a CONTEXT.md exists at EITHER `.planning/CONTEXT.md` (project-level) OR `.planning/phases/{NN}-{slug}/CONTEXT.md` (phase-level). If NEITHER exists, warn: "Phase {N} has no CONTEXT.md. Consider running `/pbr:discuss {N}` first to capture your preferences. Continue anyway?" If user says no, stop. If yes, continue. If at least one exists, proceed without warning.
|
|
125
126
|
|
|
127
|
+
#### --preview mode
|
|
128
|
+
|
|
129
|
+
If `--preview` is present in `$ARGUMENTS`:
|
|
130
|
+
|
|
131
|
+
1. Detect the `--preview` flag and extract the phase number.
|
|
132
|
+
2. Render the following dry-run banner:
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
136
|
+
║ DRY RUN — /pbr:plan {N} --preview ║
|
|
137
|
+
║ No researchers or planners will be spawned ║
|
|
138
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
3. Show the 5 steps that would occur:
|
|
142
|
+
|
|
143
|
+
1. Parse ROADMAP.md for phase {N} goal, dependencies, and requirements
|
|
144
|
+
2. Spawn researcher agents to investigate codebase and gather context
|
|
145
|
+
3. Spawn planner agent to write PLAN files based on research
|
|
146
|
+
4. Run plan-checker to validate structure and completeness
|
|
147
|
+
5. Present plans for your approval before building
|
|
148
|
+
|
|
149
|
+
4. Show estimated agent spawns: ~2-4 agents (1-2 researchers + 1 planner + 1 plan-checker)
|
|
150
|
+
5. Show output location: `.planning/phases/{NN}-{slug}/PLAN-NN.md`
|
|
151
|
+
|
|
152
|
+
6. **STOP** — do not proceed to Step 2.
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
126
156
|
**If phase already has plans:**
|
|
127
157
|
- Use AskUserQuestion (pattern: yes-no from `skills/shared/gate-prompts.md`):
|
|
128
158
|
question: "Phase {N} already has plans. Re-plan from scratch?"
|
|
@@ -251,21 +281,25 @@ Output format: Return both sections as markdown. End with ## BRIEFING COMPLETE."
|
|
|
251
281
|
```
|
|
252
282
|
|
|
253
283
|
After the Task() completes:
|
|
254
|
-
- If `## Seeds` section contains matches:
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
-
|
|
262
|
-
- If "
|
|
263
|
-
- If "
|
|
264
|
-
|
|
265
|
-
- If
|
|
266
|
-
|
|
267
|
-
- If
|
|
268
|
-
- If
|
|
284
|
+
- If `## Seeds` section contains matches:
|
|
285
|
+
- If `gates.confirm_seeds` is `true` in config: present them to the user via AskUserQuestion (pattern: yes-no-pick from `skills/shared/gate-prompts.md`):
|
|
286
|
+
question: "Include these {N} seeds in planning?"
|
|
287
|
+
header: "Seeds?"
|
|
288
|
+
options:
|
|
289
|
+
- label: "Yes, all" description: "Include all {N} matching seeds"
|
|
290
|
+
- label: "Let me pick" description: "Choose which seeds to include"
|
|
291
|
+
- label: "No" description: "Proceed without seeds"
|
|
292
|
+
- If "Yes, all": include seed content in planner context
|
|
293
|
+
- If "Let me pick": present individual seeds for selection
|
|
294
|
+
- If "No": proceed without seeds
|
|
295
|
+
- If `gates.confirm_seeds` is `false` (default): automatically include all matching seeds in planner context without prompting. Log: "Including {N} seeds automatically (gates.confirm_seeds=false)."
|
|
296
|
+
|
|
297
|
+
- If `## Deferred Ideas` section has items:
|
|
298
|
+
- If `gates.confirm_deferred` is `true` in config: present via AskUserQuestion (pattern: yes-no from `skills/shared/gate-prompts.md`):
|
|
299
|
+
question: "Include these deferred ideas in planning context?"
|
|
300
|
+
- If "Yes": append to planner context under `Deferred ideas to consider:`
|
|
301
|
+
- If "No": proceed without changes
|
|
302
|
+
- If `gates.confirm_deferred` is `false` (default): automatically append deferred ideas to planner context without prompting. Log: "Including deferred ideas automatically (gates.confirm_deferred=false)."
|
|
269
303
|
|
|
270
304
|
- If both sections are empty: proceed silently to Step 5 (no AskUserQuestion needed)
|
|
271
305
|
|
|
@@ -554,10 +588,26 @@ Read `skills/plan/templates/gap-closure-prompt.md.tmpl` and use it as the prompt
|
|
|
554
588
|
## Error Handling
|
|
555
589
|
|
|
556
590
|
### Phase not found
|
|
557
|
-
If the specified phase doesn't exist in ROADMAP.md,
|
|
591
|
+
If the specified phase doesn't exist in ROADMAP.md, use conversational recovery:
|
|
592
|
+
|
|
593
|
+
1. Run: `node ${PLUGIN_ROOT}/scripts/pbr-tools.js suggest-alternatives phase-not-found {slug}`
|
|
594
|
+
2. Parse the JSON response to get `available` phases and `suggestions` (closest matches).
|
|
595
|
+
3. Display: "Phase '{slug}' not found. Did you mean one of these?"
|
|
596
|
+
- List `suggestions` (if any) as numbered options.
|
|
597
|
+
- Offer "Show all phases" to list `available`.
|
|
598
|
+
4. Use AskUserQuestion (pattern: yes-no-pick from `skills/shared/gate-prompts.md`) to let the user pick a phase or abort.
|
|
599
|
+
- If user picks a valid phase slug: re-run with that slug.
|
|
600
|
+
- If user chooses to abort: stop cleanly with a friendly message.
|
|
558
601
|
|
|
559
602
|
### Missing prerequisites
|
|
560
|
-
If REQUIREMENTS.md or ROADMAP.md don't exist,
|
|
603
|
+
If REQUIREMENTS.md or ROADMAP.md don't exist, use conversational recovery:
|
|
604
|
+
|
|
605
|
+
1. Run: `node ${PLUGIN_ROOT}/scripts/pbr-tools.js suggest-alternatives missing-prereq {phase}`
|
|
606
|
+
2. Parse the JSON response to get `existing_summaries`, `missing_summaries`, and `suggested_action`.
|
|
607
|
+
3. Display what is already complete and what is missing.
|
|
608
|
+
4. Use AskUserQuestion to offer: "Run /pbr:build {prerequisite-phase} first, or continue anyway?"
|
|
609
|
+
- If user chooses to continue: proceed with planning (note missing prereqs in plan frontmatter).
|
|
610
|
+
- If user chooses to build first: stop and display the suggested build command.
|
|
561
611
|
|
|
562
612
|
### Research agent fails
|
|
563
613
|
If the researcher Task() fails, display:
|
|
@@ -75,7 +75,18 @@ Execute these steps in order.
|
|
|
75
75
|
5. If no phase number given, read current phase from `.planning/STATE.md`
|
|
76
76
|
6. If `.planning/.auto-verify` signal file exists, read it and note the auto-verification was already queued. Delete the signal file after reading (one-shot, same pattern as auto-continue.js).
|
|
77
77
|
|
|
78
|
-
**Validation errors
|
|
78
|
+
**Validation errors:**
|
|
79
|
+
|
|
80
|
+
If phase directory not found, use conversational recovery:
|
|
81
|
+
|
|
82
|
+
1. Run: `node ${PLUGIN_ROOT}/scripts/pbr-tools.js suggest-alternatives phase-not-found {slug}`
|
|
83
|
+
2. Parse the JSON response to get `available` phases and `suggestions` (closest matches).
|
|
84
|
+
3. Display: "Phase '{slug}' not found. Did you mean one of these?"
|
|
85
|
+
- List `suggestions` (if any) as numbered options.
|
|
86
|
+
- Offer "Show all phases" to list `available`.
|
|
87
|
+
4. Use AskUserQuestion (pattern: yes-no-pick from `skills/shared/gate-prompts.md`) to let the user pick a phase or abort.
|
|
88
|
+
- If user picks a valid phase slug: re-run with that slug.
|
|
89
|
+
- If user chooses to abort: stop cleanly with a friendly message.
|
|
79
90
|
|
|
80
91
|
If no SUMMARY.md files:
|
|
81
92
|
```
|