@sienklogic/plan-build-run 2.57.0 → 2.59.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 +39 -0
- package/package.json +1 -1
- package/plugins/codex-pbr/commands/profile.md +7 -0
- package/plugins/codex-pbr/references/model-profiles.md +47 -3
- package/plugins/codex-pbr/references/model-selection.md +1 -1
- package/plugins/codex-pbr/skills/begin/SKILL.md +10 -7
- package/plugins/codex-pbr/skills/build/SKILL.md +8 -4
- package/plugins/codex-pbr/skills/debug/SKILL.md +2 -2
- package/plugins/codex-pbr/skills/discuss/SKILL.md +2 -2
- package/plugins/codex-pbr/skills/health/SKILL.md +2 -2
- package/plugins/codex-pbr/skills/milestone/SKILL.md +8 -8
- package/plugins/codex-pbr/skills/pause/SKILL.md +1 -1
- package/plugins/codex-pbr/skills/plan/SKILL.md +9 -7
- package/plugins/codex-pbr/skills/profile/SKILL.md +171 -0
- package/plugins/codex-pbr/skills/review/SKILL.md +5 -3
- package/plugins/codex-pbr/skills/scan/SKILL.md +2 -2
- package/plugins/codex-pbr/skills/setup/SKILL.md +68 -2
- package/plugins/copilot-pbr/commands/profile.md +7 -0
- package/plugins/copilot-pbr/hooks/hooks.json +39 -0
- package/plugins/copilot-pbr/plugin.json +1 -1
- package/plugins/copilot-pbr/references/model-profiles.md +47 -3
- package/plugins/copilot-pbr/references/model-selection.md +1 -1
- package/plugins/copilot-pbr/skills/begin/SKILL.md +10 -7
- package/plugins/copilot-pbr/skills/build/SKILL.md +8 -4
- package/plugins/copilot-pbr/skills/debug/SKILL.md +2 -2
- package/plugins/copilot-pbr/skills/discuss/SKILL.md +2 -2
- package/plugins/copilot-pbr/skills/health/SKILL.md +2 -2
- package/plugins/copilot-pbr/skills/milestone/SKILL.md +8 -8
- package/plugins/copilot-pbr/skills/pause/SKILL.md +1 -1
- package/plugins/copilot-pbr/skills/plan/SKILL.md +9 -7
- package/plugins/copilot-pbr/skills/profile/SKILL.md +171 -0
- package/plugins/copilot-pbr/skills/review/SKILL.md +5 -3
- package/plugins/copilot-pbr/skills/scan/SKILL.md +2 -2
- package/plugins/copilot-pbr/skills/setup/SKILL.md +68 -2
- package/plugins/cursor-pbr/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor-pbr/commands/profile.md +7 -0
- package/plugins/cursor-pbr/hooks/hooks.json +33 -0
- package/plugins/cursor-pbr/references/model-profiles.md +47 -3
- package/plugins/cursor-pbr/references/model-selection.md +1 -1
- package/plugins/cursor-pbr/skills/begin/SKILL.md +10 -7
- package/plugins/cursor-pbr/skills/build/SKILL.md +9 -5
- package/plugins/cursor-pbr/skills/debug/SKILL.md +2 -2
- package/plugins/cursor-pbr/skills/discuss/SKILL.md +2 -2
- package/plugins/cursor-pbr/skills/health/SKILL.md +2 -2
- package/plugins/cursor-pbr/skills/milestone/SKILL.md +8 -8
- package/plugins/cursor-pbr/skills/pause/SKILL.md +1 -1
- package/plugins/cursor-pbr/skills/plan/SKILL.md +10 -8
- package/plugins/cursor-pbr/skills/profile/SKILL.md +172 -0
- package/plugins/cursor-pbr/skills/review/SKILL.md +6 -4
- package/plugins/cursor-pbr/skills/scan/SKILL.md +2 -2
- package/plugins/cursor-pbr/skills/setup/SKILL.md +68 -2
- package/plugins/pbr/.claude-plugin/plugin.json +1 -1
- package/plugins/pbr/agents/audit.md +0 -1
- package/plugins/pbr/agents/codebase-mapper.md +0 -1
- package/plugins/pbr/agents/debugger.md +0 -1
- package/plugins/pbr/agents/dev-sync.md +0 -1
- package/plugins/pbr/agents/executor.md +0 -1
- package/plugins/pbr/agents/general.md +0 -1
- package/plugins/pbr/agents/integration-checker.md +0 -1
- package/plugins/pbr/agents/plan-checker.md +0 -1
- package/plugins/pbr/agents/planner.md +0 -1
- package/plugins/pbr/agents/researcher.md +0 -1
- package/plugins/pbr/agents/synthesizer.md +0 -1
- package/plugins/pbr/agents/verifier.md +0 -1
- package/plugins/pbr/commands/profile.md +7 -0
- package/plugins/pbr/hooks/hooks.json +33 -0
- package/plugins/pbr/references/model-profiles.md +47 -3
- package/plugins/pbr/references/model-selection.md +1 -1
- package/plugins/pbr/scripts/check-subagent-output.js +1 -1
- package/plugins/pbr/scripts/config-schema.json +18 -0
- package/plugins/pbr/scripts/hooks-schema.json +4 -1
- package/plugins/pbr/scripts/instructions-loaded.js +69 -0
- package/plugins/pbr/scripts/lib/gates/helpers.js +7 -0
- package/plugins/pbr/scripts/lib/init.js +10 -7
- package/plugins/pbr/scripts/pbr-tools.js +6 -6
- package/plugins/pbr/scripts/task-completed.js +89 -1
- package/plugins/pbr/scripts/worktree-create.js +93 -0
- package/plugins/pbr/scripts/worktree-remove.js +83 -0
- package/plugins/pbr/skills/begin/SKILL.md +10 -7
- package/plugins/pbr/skills/build/SKILL.md +9 -5
- package/plugins/pbr/skills/debug/SKILL.md +2 -2
- package/plugins/pbr/skills/discuss/SKILL.md +2 -2
- package/plugins/pbr/skills/health/SKILL.md +2 -2
- package/plugins/pbr/skills/milestone/SKILL.md +8 -8
- package/plugins/pbr/skills/pause/SKILL.md +1 -1
- package/plugins/pbr/skills/plan/SKILL.md +10 -8
- package/plugins/pbr/skills/profile/SKILL.md +173 -0
- package/plugins/pbr/skills/review/SKILL.md +6 -4
- package/plugins/pbr/skills/scan/SKILL.md +2 -2
- package/plugins/pbr/skills/setup/SKILL.md +68 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,45 @@ 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.59.0](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.58.0...plan-build-run-v2.59.0) (2026-03-06)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **63-01:** implement worktree-create.js hook script ([195c9e0](https://github.com/SienkLogic/plan-build-run/commit/195c9e0c03d5ebaecdddfb9df647a165eba6a199))
|
|
14
|
+
* **63-01:** implement worktree-remove.js hook script ([3928168](https://github.com/SienkLogic/plan-build-run/commit/392816846f29a58e58e09f72fd9f976428a4c46b))
|
|
15
|
+
* **64-03:** add profile command registration to derivative plugins ([f12d4af](https://github.com/SienkLogic/plan-build-run/commit/f12d4af9f8762ed34e99659bc0edde12d2071477))
|
|
16
|
+
* **config:** add Platform Settings step to /pbr:setup in all three plugins ([60e17bd](https://github.com/SienkLogic/plan-build-run/commit/60e17bdb8dc1ca0fbdeb285442c3a82f250f6962))
|
|
17
|
+
* **config:** add platform_settings block to config fixture ([8af55e6](https://github.com/SienkLogic/plan-build-run/commit/8af55e6d4ffbde1b13b9c8f4889acfb7563069e9))
|
|
18
|
+
* **model-profiles:** add --model CLI override to build/plan/review skills ([f09d4de](https://github.com/SienkLogic/plan-build-run/commit/f09d4de90348daf8ef0f7ae85718a15057fc202e))
|
|
19
|
+
* **model-profiles:** add /pbr:profile skill and command to pbr plugin ([310719b](https://github.com/SienkLogic/plan-build-run/commit/310719b76fc6cc2bef3cc156baa22c212c566be1))
|
|
20
|
+
* **model-profiles:** add /pbr:profile skill to cursor-pbr, copilot-pbr, codex-pbr ([02ae4d4](https://github.com/SienkLogic/plan-build-run/commit/02ae4d41f19b897ce9a5af6ff0c13d19a222730d))
|
|
21
|
+
* **model-profiles:** add model_profiles to config-schema and update reference doc with config-only authority ([03f7009](https://github.com/SienkLogic/plan-build-run/commit/03f7009b3405c38aa1fc8222fffaa1a18c06ba9c))
|
|
22
|
+
* **model-profiles:** sync --model argument-hint to cursor-pbr/copilot-pbr and add overrideModel to init.js ([cdba92f](https://github.com/SienkLogic/plan-build-run/commit/cdba92f7de3e33b54d190a8d4a6536e510d88cd2))
|
|
23
|
+
* **worktree-hooks:** add worktree hooks to cursor-pbr and copilot-pbr ([954ddac](https://github.com/SienkLogic/plan-build-run/commit/954ddac1b492edaf9625fba23d5363ffd3503cb1))
|
|
24
|
+
* **worktree-hooks:** add WorktreeCreate/WorktreeRemove to cross-plugin-compat test maps ([6dd2dd6](https://github.com/SienkLogic/plan-build-run/commit/6dd2dd61720651aaecd6a5eaf7cacee508cd4d94))
|
|
25
|
+
* **worktree-hooks:** add WorktreeCreate/WorktreeRemove to pbr hooks.json ([23791ed](https://github.com/SienkLogic/plan-build-run/commit/23791ed181e66921bbb954cb7424fa339e4bf582))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* **64-01:** add default model: sonnet in cursor derivative generator ([a51a2bf](https://github.com/SienkLogic/plan-build-run/commit/a51a2bf8fa2a6284f7f697a99de89c2649c95f12))
|
|
31
|
+
* **64-01:** restore model: sonnet to cursor-pbr agent frontmatter ([bcaef58](https://github.com/SienkLogic/plan-build-run/commit/bcaef584abb962ad7ff17033f6ac714e29f3df9d))
|
|
32
|
+
* **model-profiles:** restore model to derivative agents, update tests for config-only model ([ed8ab09](https://github.com/SienkLogic/plan-build-run/commit/ed8ab092c9084a9835efa07dd71e2acc50734f40))
|
|
33
|
+
|
|
34
|
+
## [2.58.0](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.57.0...plan-build-run-v2.58.0) (2026-03-05)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Features
|
|
38
|
+
|
|
39
|
+
* **hook-events:** add native agent_type support, continue:false halt signals, and InstructionsLoaded hook ([8f09dcb](https://github.com/SienkLogic/plan-build-run/commit/8f09dcbad39c4f0e19d7f26f4f5fa694bc2b5f2e))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Bug Fixes
|
|
43
|
+
|
|
44
|
+
* **hook-events:** add InstructionsLoaded to hooks schema and valid events list ([cd6601c](https://github.com/SienkLogic/plan-build-run/commit/cd6601c66ac806e1c884e86b829596001fc81c3f))
|
|
45
|
+
* **hook-events:** fix sessionLoad bug in halt conditions, add missing agent_type and halt tests ([aab8ec6](https://github.com/SienkLogic/plan-build-run/commit/aab8ec6b9346a66fcb6e9a1f038ec5bef4c8cf6f))
|
|
46
|
+
|
|
8
47
|
## [2.57.0](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.56.3...plan-build-run-v2.57.0) (2026-03-05)
|
|
9
48
|
|
|
10
49
|
|
package/package.json
CHANGED
|
@@ -4,9 +4,29 @@ How Plan-Build-Run maps agents to models and how to configure model selection.
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## Session Model (Orchestrator)
|
|
8
|
+
|
|
9
|
+
The orchestrator is your main Claude Code session -- it reads skills, manages state, and routes work to agents. Its model is whatever you selected in Claude Code (not controlled by PBR's `config.json`).
|
|
10
|
+
|
|
11
|
+
**Cost impact:** The orchestrator accounts for roughly 40% of total session cost. Agents set to `inherit` (planner, executor, debugger, general in the `balanced` profile) also use this model. Switching your session from Opus to Sonnet reduces cost for both the orchestrator and all `inherit` agents.
|
|
12
|
+
|
|
13
|
+
**Recommendations:**
|
|
14
|
+
|
|
15
|
+
| Goal | Session Model | Config Adjustment |
|
|
16
|
+
|------|---------------|-------------------|
|
|
17
|
+
| Maximum quality | Opus | None needed -- `inherit` agents get Opus |
|
|
18
|
+
| Balanced cost/quality | Sonnet | None needed -- `inherit` agents get Sonnet, which handles most tasks well |
|
|
19
|
+
| Cheap orchestration, Opus agents | Sonnet | Set `planner: "opus"`, `executor: "opus"`, `debugger: "opus"` to override inherit |
|
|
20
|
+
|
|
21
|
+
Sonnet 4.6 handles orchestration tasks (state reading, routing decisions, context assembly) effectively. Reserve Opus for agents doing complex reasoning, architecture, or novel code generation.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
7
25
|
## Agent-to-Model Mapping
|
|
8
26
|
|
|
9
|
-
Each Plan-Build-Run agent
|
|
27
|
+
Each Plan-Build-Run agent's model is controlled by `config.json models.*`. When no config entry exists for an agent, the agent inherits the session model.
|
|
28
|
+
|
|
29
|
+
The `model:` frontmatter field has been removed from PBR agent definitions — `config.json` is now the sole source of truth for agent model assignment.
|
|
10
30
|
|
|
11
31
|
### Default Agent Models
|
|
12
32
|
|
|
@@ -22,8 +42,10 @@ Each Plan-Build-Run agent has a default model specified in its agent definition
|
|
|
22
42
|
| `codebase-mapper` | `sonnet` | Codebase analysis requires thorough reasoning |
|
|
23
43
|
| `synthesizer` | `haiku` | Synthesis is mechanical combination; speed over depth |
|
|
24
44
|
| `general` | `inherit` | Lightweight utility; inherits session model |
|
|
45
|
+
| `audit` | `inherit` | Session log analysis inherits session model |
|
|
46
|
+
| `dev-sync` | `inherit` | Cross-plugin sync is mechanical; inherits session model |
|
|
25
47
|
|
|
26
|
-
The `inherit` value means the agent uses whatever model the parent session is running (typically the user's configured Claude model).
|
|
48
|
+
The `inherit` value means the agent uses whatever model the parent session is running (typically the user's configured Claude model). Defaults listed above are the effective values from the `balanced` profile in `config.json`.
|
|
27
49
|
|
|
28
50
|
---
|
|
29
51
|
|
|
@@ -88,6 +110,28 @@ Note: Claude Code 2.1.45+ supports Sonnet 4.6. Model values are abstract names
|
|
|
88
110
|
|
|
89
111
|
---
|
|
90
112
|
|
|
113
|
+
## Custom Profiles
|
|
114
|
+
|
|
115
|
+
The `model_profiles` key in `config.json` lets you define named profiles beyond the four built-in presets. Each profile is a partial map of agent names to model strings — omitted agents fall back to the active profile defaults.
|
|
116
|
+
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
"model_profiles": {
|
|
120
|
+
"my-profile": {
|
|
121
|
+
"executor": "opus",
|
|
122
|
+
"planner": "opus",
|
|
123
|
+
"synthesizer": "sonnet"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Activate a custom profile with `/pbr:config model-profile my-profile`. The profile merges with the `balanced` preset: any agent not listed in your custom profile uses its `balanced` default.
|
|
130
|
+
|
|
131
|
+
Partial profiles are allowed — you can override just the agents you care about. This is useful for temporarily upgrading a single agent without specifying the rest.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
91
135
|
## Model Selection in Skill Orchestration
|
|
92
136
|
|
|
93
137
|
Skills that spawn subagents use the `model` parameter in `Task()` calls. Some skills hardcode a lighter model for specific tasks:
|
|
@@ -96,4 +140,4 @@ Skills that spawn subagents use the `model` parameter in `Task()` calls. Some sk
|
|
|
96
140
|
- **Build skill**: Spawns codebase mapper updates with `model: "haiku"` for incremental map refreshes
|
|
97
141
|
- **Plan skill**: Uses the configured `planner` model for main planning work
|
|
98
142
|
|
|
99
|
-
The `subagent_type` parameter automatically loads the agent definition, and the model from `config.json` takes precedence over
|
|
143
|
+
The `subagent_type` parameter automatically loads the agent definition, and the model from `config.json` takes precedence over any agent-level model setting.
|
|
@@ -14,7 +14,7 @@ Plan-Build-Run uses adaptive model selection to balance cost and capability.
|
|
|
14
14
|
|-----------|-------|-----------|
|
|
15
15
|
| simple | haiku | Fast, cheap — sufficient for mechanical changes |
|
|
16
16
|
| medium | sonnet | Good balance for standard feature work |
|
|
17
|
-
| complex | inherit | Uses session model —
|
|
17
|
+
| complex | inherit | Uses session model — see `model-profiles.md` Session Model section for cost implications |
|
|
18
18
|
|
|
19
19
|
## Override Mechanisms
|
|
20
20
|
|
|
@@ -132,6 +132,7 @@ Use AskUserQuestion:
|
|
|
132
132
|
description: "Walk through model selection, features, and preferences step by step."
|
|
133
133
|
|
|
134
134
|
**If user selects "Quick start":**
|
|
135
|
+
- Tell the user: "Tip: Agents set to `inherit` use your Claude Code session model. For cost savings, run on Sonnet -- orchestration and inherit agents work well at that tier. See `references/model-profiles.md` for details."
|
|
135
136
|
- Write `.planning/config.json` immediately using the default config below (no further questions):
|
|
136
137
|
```json
|
|
137
138
|
{
|
|
@@ -213,6 +214,8 @@ Use AskUserQuestion:
|
|
|
213
214
|
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.
|
|
214
215
|
|
|
215
216
|
**3-model. Model Profile:**
|
|
217
|
+
Note: These profiles control agent models. The orchestrator uses your Claude Code session model. For cost optimization, consider running on Sonnet -- agents with `inherit` will follow. See `references/model-profiles.md`.
|
|
218
|
+
|
|
216
219
|
Use AskUserQuestion:
|
|
217
220
|
question: "Which model profile should agents use?"
|
|
218
221
|
header: "Models"
|
|
@@ -318,7 +321,7 @@ This project uses [Plan-Build-Run](https://github.com/SienkLogic/plan-build-run)
|
|
|
318
321
|
|
|
319
322
|
**CRITICAL (no hook): You MUST create the .planning/ directory and write config.json NOW. Do not proceed without this.**
|
|
320
323
|
|
|
321
|
-
1. Read the config template from
|
|
324
|
+
1. Read the config template from `${CLAUDE_SKILL_DIR}/templates/config.json.tmpl`
|
|
322
325
|
2. Apply the user's choices to the template (including 3d-claude CLAUDE.md integration)
|
|
323
326
|
3. Create `.planning/` directory
|
|
324
327
|
4. Write `.planning/config.json` with the user's preferences
|
|
@@ -402,7 +405,7 @@ Task({
|
|
|
402
405
|
|
|
403
406
|
For each researcher, construct the prompt by reading the template and filling in placeholders:
|
|
404
407
|
|
|
405
|
-
Read
|
|
408
|
+
Read `${CLAUDE_SKILL_DIR}/templates/researcher-prompt.md.tmpl` for the prompt structure.
|
|
406
409
|
|
|
407
410
|
**Prepend this block to the researcher prompt before sending:**
|
|
408
411
|
|
|
@@ -483,7 +486,7 @@ Task({
|
|
|
483
486
|
|
|
484
487
|
#### Synthesis Prompt Template
|
|
485
488
|
|
|
486
|
-
Read
|
|
489
|
+
Read `${CLAUDE_SKILL_DIR}/templates/synthesis-prompt.md.tmpl` for the prompt structure.
|
|
487
490
|
|
|
488
491
|
**Prepend this block to the synthesizer prompt before sending:**
|
|
489
492
|
```
|
|
@@ -558,7 +561,7 @@ Each requirement must be:
|
|
|
558
561
|
|
|
559
562
|
**CRITICAL (no hook): Write REQUIREMENTS.md NOW. The roadmap planner depends on this file.**
|
|
560
563
|
|
|
561
|
-
Read the template from
|
|
564
|
+
Read the template from `${CLAUDE_SKILL_DIR}/templates/REQUIREMENTS.md.tmpl` and write `.planning/REQUIREMENTS.md` with:
|
|
562
565
|
- All v1 requirements grouped by category
|
|
563
566
|
- All v2 requirements with deferral reasons
|
|
564
567
|
- Out-of-scope items with rationale
|
|
@@ -586,7 +589,7 @@ Task({
|
|
|
586
589
|
|
|
587
590
|
#### Roadmap Prompt Template
|
|
588
591
|
|
|
589
|
-
Read
|
|
592
|
+
Read `${CLAUDE_SKILL_DIR}/templates/roadmap-prompt.md.tmpl` for the prompt structure.
|
|
590
593
|
|
|
591
594
|
**Prepend this block to the roadmap planner prompt before sending:**
|
|
592
595
|
```
|
|
@@ -632,7 +635,7 @@ Write the project state files from templates:
|
|
|
632
635
|
**CRITICAL (no hook): Write PROJECT.md NOW. Do NOT skip this step.**
|
|
633
636
|
|
|
634
637
|
**9a. Write PROJECT.md:**
|
|
635
|
-
1. Read
|
|
638
|
+
1. Read `${CLAUDE_SKILL_DIR}/templates/PROJECT.md.tmpl`
|
|
636
639
|
2. Fill in:
|
|
637
640
|
- `{project_name}` — from questioning
|
|
638
641
|
- `{2-3 sentences}` — project description from questioning
|
|
@@ -646,7 +649,7 @@ Write the project state files from templates:
|
|
|
646
649
|
**CRITICAL (no hook): Write STATE.md NOW. Do NOT skip this step.**
|
|
647
650
|
|
|
648
651
|
**9b. Write STATE.md:**
|
|
649
|
-
1. Read
|
|
652
|
+
1. Read `${CLAUDE_SKILL_DIR}/templates/STATE.md.tmpl`
|
|
650
653
|
2. Fill in:
|
|
651
654
|
- `{date}` — today's date
|
|
652
655
|
- `{total}` — total phase count from roadmap
|
|
@@ -48,6 +48,7 @@ Parse `$ARGUMENTS` according to `skills/shared/phase-argument-parsing.md`.
|
|
|
48
48
|
| `3` | Build phase 3 |
|
|
49
49
|
| `3 --gaps-only` | Build only gap-closure plans in phase 3 |
|
|
50
50
|
| `3 --team` | Use Agent Teams for complex inter-agent coordination |
|
|
51
|
+
| `3 --model opus` | Use opus for all executor spawns in phase 3 (overrides config and adaptive selection) |
|
|
51
52
|
| (no number) | Use current phase from STATE.md |
|
|
52
53
|
| `3 --preview` | Preview what build would do for phase 3 without executing |
|
|
53
54
|
|
|
@@ -318,6 +319,7 @@ This is a read-only presentation step — extract descriptions from plan frontma
|
|
|
318
319
|
|
|
319
320
|
**Model Selection (Adaptive)**:
|
|
320
321
|
Before spawning the executor for each plan, determine the model:
|
|
322
|
+
0. If `--model <value>` was parsed from `$ARGUMENTS` (valid values: sonnet, opus, haiku, inherit), use that model for ALL executor Task() spawns in this run. Skip steps 1-4. The --model flag is the highest precedence override.
|
|
321
323
|
1. Read the plan's task elements for `complexity` and `model` attributes
|
|
322
324
|
2. If ANY task has an explicit `model` attribute, use the most capable model among them (inherit > sonnet > haiku)
|
|
323
325
|
3. Otherwise, use the HIGHEST complexity among the plan's tasks to select the model:
|
|
@@ -325,6 +327,8 @@ Before spawning the executor for each plan, determine the model:
|
|
|
325
327
|
4. If `config.models.executor` is set (non-null), it overrides adaptive selection entirely — use that model for all executors
|
|
326
328
|
5. Pass the selected model to the Task() spawn
|
|
327
329
|
|
|
330
|
+
If `--model <value>` is present in `$ARGUMENTS`, extract the value. Valid values: `sonnet`, `opus`, `haiku`, `inherit`. If an invalid value is provided, display an error and list valid values. Store as `override_model`.
|
|
331
|
+
|
|
328
332
|
Reference: `references/model-selection.md` for full details.
|
|
329
333
|
|
|
330
334
|
1. Extract the `## Summary` section from the PLAN.md (everything after the `## Summary` heading to end of file). If no ## Summary section exists (legacy plans), fall back to reading the full PLAN.md content. Note: The orchestrator reads the full PLAN.md once for narrative extraction AND summary extraction; only the ## Summary portion is inlined into the executor prompt. The full PLAN.md stays on disk for the executor to Read.
|
|
@@ -333,7 +337,7 @@ Reference: `references/model-selection.md` for full details.
|
|
|
333
337
|
4. Read prior SUMMARY.md files from the same phase (completed plans in earlier waves)
|
|
334
338
|
5. Read `.planning/config.json`
|
|
335
339
|
|
|
336
|
-
Construct the executor prompt by reading
|
|
340
|
+
Construct the executor prompt by reading `${CLAUDE_SKILL_DIR}/templates/executor-prompt.md.tmpl` and filling in all `{placeholder}` values:
|
|
337
341
|
|
|
338
342
|
- `{NN}-{slug}` — phase directory (e.g., `02-authentication`)
|
|
339
343
|
- `{plan_id}` — plan being executed (e.g., `02-01`)
|
|
@@ -455,7 +459,7 @@ For each plan that completed successfully in this wave:
|
|
|
455
459
|
1. Read the plan's SUMMARY.md to get `key_files` (the files this plan created/modified)
|
|
456
460
|
2. Display to the user: `◐ Spawning inline verifier for plan {plan_id}...`
|
|
457
461
|
|
|
458
|
-
Spawn `Task({ subagent_type: "pbr:verifier", model: "haiku", prompt: ... })`. Read
|
|
462
|
+
Spawn `Task({ subagent_type: "pbr:verifier", model: "haiku", prompt: ... })`. Read `${CLAUDE_SKILL_DIR}/templates/inline-verifier-prompt.md.tmpl` and fill in `{NN}-{slug}`, `{plan_id}`, and `{comma-separated key_files list}` (key_files from PLAN.md frontmatter). Use the filled template as the `prompt` value.
|
|
459
463
|
|
|
460
464
|
3. If verifier reports FAIL for any file:
|
|
461
465
|
- Present the failure to the user: "Inline verify failed for plan {plan_id}: {details}"
|
|
@@ -553,7 +557,7 @@ Checkpoint in Plan {id}, Task {N}: {checkpoint type}
|
|
|
553
557
|
|
|
554
558
|
Reference: `references/continuation-format.md` for the continuation protocol.
|
|
555
559
|
|
|
556
|
-
Read
|
|
560
|
+
Read `${CLAUDE_SKILL_DIR}/templates/continuation-prompt.md.tmpl` and fill in:
|
|
557
561
|
|
|
558
562
|
- `{NN}-{slug}`, `{plan_id}` — current phase and plan
|
|
559
563
|
- `{plan_summary}` — the ## Summary section from PLAN.md
|
|
@@ -662,7 +666,7 @@ After verifier completes, check for completion marker: `## VERIFICATION COMPLETE
|
|
|
662
666
|
|
|
663
667
|
#### Verifier Prompt Template
|
|
664
668
|
|
|
665
|
-
Use the same verifier prompt template as defined in `$pbr-review`: read
|
|
669
|
+
Use the same verifier prompt template as defined in `$pbr-review`: read `${PLUGIN_ROOT}/skills/review/templates/verifier-prompt.md.tmpl` and fill in its placeholders with the phase's PLAN.md must_haves and SUMMARY.md file paths. This avoids maintaining duplicate verifier prompts across skills.
|
|
666
670
|
|
|
667
671
|
**Prepend this block to the verifier prompt before sending:**
|
|
668
672
|
```
|
|
@@ -183,7 +183,7 @@ Display to the user: `◐ Spawning debugger...`
|
|
|
183
183
|
|
|
184
184
|
Spawn `Task(subagent_type: "pbr:debugger")` with the prompt template.
|
|
185
185
|
|
|
186
|
-
Read
|
|
186
|
+
Read `${CLAUDE_SKILL_DIR}/templates/initial-investigation-prompt.md.tmpl` for the spawn prompt. Fill in the `{NNN}`, `{slug}`, and symptom placeholders with values from the debug file created above.
|
|
187
187
|
|
|
188
188
|
### Step 3b: Resume Flow
|
|
189
189
|
|
|
@@ -207,7 +207,7 @@ Continuing investigation...
|
|
|
207
207
|
|
|
208
208
|
Spawn `Task(subagent_type: "pbr:debugger")` with the continuation prompt template.
|
|
209
209
|
|
|
210
|
-
Read
|
|
210
|
+
Read `${CLAUDE_SKILL_DIR}/templates/continuation-prompt.md.tmpl` for the spawn prompt. Fill in the `{NNN}`, `{slug}`, and `{paste investigation log...}` placeholders with data from the debug file.
|
|
211
211
|
|
|
212
212
|
### Step 4: Handle Debugger Results
|
|
213
213
|
|
|
@@ -114,7 +114,7 @@ Before jumping into specific gray areas, give the user space to share their ment
|
|
|
114
114
|
|
|
115
115
|
Analyze the phase goal, requirements, and what's already built. Identify **3-4 gray areas** where the user's preference matters. Gray areas fall into these categories:
|
|
116
116
|
|
|
117
|
-
Read
|
|
117
|
+
Read `${CLAUDE_SKILL_DIR}/templates/decision-categories.md` for the category reference table.
|
|
118
118
|
|
|
119
119
|
**How to identify gray areas:**
|
|
120
120
|
1. Look at the phase requirements — where are there multiple valid approaches?
|
|
@@ -198,7 +198,7 @@ Write the CONTEXT.md file to the phase directory:
|
|
|
198
198
|
|
|
199
199
|
**Content:**
|
|
200
200
|
|
|
201
|
-
Read
|
|
201
|
+
Read `${CLAUDE_SKILL_DIR}/templates/CONTEXT.md.tmpl` for the template structure.
|
|
202
202
|
|
|
203
203
|
**Placeholders to fill:**
|
|
204
204
|
- `{N}` -- the phase number
|
|
@@ -33,9 +33,9 @@ Check if the user passed `--repair`:
|
|
|
33
33
|
|
|
34
34
|
## How Checks Work
|
|
35
35
|
|
|
36
|
-
Each check follows the common pattern. Read
|
|
36
|
+
Each check follows the common pattern. Read `${CLAUDE_SKILL_DIR}/templates/check-pattern.md.tmpl` for the shared execution flow: target files, validate against rules, classify as PASS/FAIL/WARN/INFO, and record the result with a fix suggestion for any failures.
|
|
37
37
|
|
|
38
|
-
Read
|
|
38
|
+
Read `${CLAUDE_SKILL_DIR}/templates/output-format.md.tmpl` for the output format: summary table, status indicators, issues list, optional recent decisions, and final result line.
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
|
@@ -160,7 +160,7 @@ Start a new milestone cycle with new phases.
|
|
|
160
160
|
docs(planning): start milestone "{name}" (phases {start}-{end})
|
|
161
161
|
```
|
|
162
162
|
|
|
163
|
-
10. **Confirm** with branded output — read
|
|
163
|
+
10. **Confirm** with branded output — read `${CLAUDE_SKILL_DIR}/templates/new-output.md.tmpl` and fill in `{name}` (milestone name), `{count}` (phase count), `{N}` (first phase number).
|
|
164
164
|
|
|
165
165
|
---
|
|
166
166
|
|
|
@@ -331,7 +331,7 @@ Archive a completed milestone and prepare for the next one.
|
|
|
331
331
|
|
|
332
332
|
**Stats file content:**
|
|
333
333
|
|
|
334
|
-
Read
|
|
334
|
+
Read `${CLAUDE_SKILL_DIR}/templates/stats-file.md.tmpl` for the stats file format. Fill in all `{variable}` placeholders with actual data gathered in Steps 3-4.
|
|
335
335
|
|
|
336
336
|
6. **Update PROJECT.md:**
|
|
337
337
|
- Move milestone from "Active" to "Completed"
|
|
@@ -448,7 +448,7 @@ If `config.deployment.smoke_test_command` is set and non-empty:
|
|
|
448
448
|
|
|
449
449
|
This is advisory only — the milestone is already archived. Surface it as a potential issue for the user to investigate.
|
|
450
450
|
|
|
451
|
-
10. **Confirm** with branded output — read
|
|
451
|
+
10. **Confirm** with branded output — read `${CLAUDE_SKILL_DIR}/templates/complete-output.md.tmpl` and fill in `{version}`, `{count}` (phases, plans, commits), `{lines}`, `{duration}`.
|
|
452
452
|
|
|
453
453
|
---
|
|
454
454
|
|
|
@@ -471,7 +471,7 @@ Verify milestone completion with cross-phase integration checks.
|
|
|
471
471
|
|
|
472
472
|
Display to the user: `◐ Spawning integration checker...`
|
|
473
473
|
|
|
474
|
-
Spawn `Task(subagent_type: "pbr:integration-checker")`. Read
|
|
474
|
+
Spawn `Task(subagent_type: "pbr:integration-checker")`. Read `${CLAUDE_SKILL_DIR}/templates/integration-checker-prompt.md.tmpl`, fill in `{version or "current"}`, `{list of phase directories}`, and `{phase SUMMARY.md paths}`, then use the filled template as the Task() prompt.
|
|
475
475
|
|
|
476
476
|
4. **Check integration-checker completion:**
|
|
477
477
|
|
|
@@ -488,11 +488,11 @@ Verify milestone completion with cross-phase integration checks.
|
|
|
488
488
|
|
|
489
489
|
Create `.planning/{version}-MILESTONE-AUDIT.md` using the template:
|
|
490
490
|
|
|
491
|
-
Read
|
|
491
|
+
Read `${CLAUDE_SKILL_DIR}/templates/audit-report.md.tmpl` for the audit report format. Fill in all `{variable}` placeholders with actual data from the audit.
|
|
492
492
|
|
|
493
493
|
**Spot-check:** After writing, verify `.planning/{version}-MILESTONE-AUDIT.md` exists on disk using Glob. If missing, re-attempt the write. If still missing, display an error and include findings inline.
|
|
494
494
|
|
|
495
|
-
7. **Report to user** using branded banners — read
|
|
495
|
+
7. **Report to user** using branded banners — read `${CLAUDE_SKILL_DIR}/templates/audit-output.md.tmpl`. The template contains all 3 variants (PASSED, GAPS FOUND, TECH DEBT). Select the appropriate section based on audit result. Fill in `{version}`, `{count}`, `{gap 1}`, `{gap 2}` as applicable.
|
|
496
496
|
|
|
497
497
|
---
|
|
498
498
|
|
|
@@ -572,7 +572,7 @@ Create phases to close gaps found during an audit.
|
|
|
572
572
|
docs(planning): add gap-closure phases from milestone audit
|
|
573
573
|
```
|
|
574
574
|
|
|
575
|
-
9. **Confirm** with branded output — read
|
|
575
|
+
9. **Confirm** with branded output — read `${CLAUDE_SKILL_DIR}/templates/gaps-output.md.tmpl` and fill in `{count}` (gap-closure phases created), `{N}` (first gap phase number), `{name}` (phase name).
|
|
576
576
|
|
|
577
577
|
---
|
|
578
578
|
|
|
@@ -603,7 +603,7 @@ Tags (complete only):
|
|
|
603
603
|
|
|
604
604
|
## Edge Cases
|
|
605
605
|
|
|
606
|
-
For all edge case handling, see
|
|
606
|
+
For all edge case handling, see `${CLAUDE_SKILL_DIR}/templates/edge-cases.md`.
|
|
607
607
|
Key scenarios: no ROADMAP.md, no phases, no gaps found, version collision, partially verified, large milestone (8+ phases).
|
|
608
608
|
|
|
609
609
|
---
|
|
@@ -128,7 +128,7 @@ Write the handoff file to the current phase directory:
|
|
|
128
128
|
|
|
129
129
|
**Content:**
|
|
130
130
|
|
|
131
|
-
Read
|
|
131
|
+
Read `${CLAUDE_SKILL_DIR}/templates/continue-here.md.tmpl` for the handoff file format. Fill in all `{variable}` placeholders with actual session data gathered in Steps 1-3.
|
|
132
132
|
|
|
133
133
|
### Step 5: Update STATE.md
|
|
134
134
|
|
|
@@ -54,6 +54,7 @@ Parse the phase number and optional flags:
|
|
|
54
54
|
| `3 --assumptions` | Surface assumptions before planning phase 3 |
|
|
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
|
+
| `3 --model opus` | Use opus for all researcher, planner, and checker spawns in phase 3 |
|
|
57
58
|
| (no number) | Use current phase from STATE.md |
|
|
58
59
|
| `3 --preview` | Preview what planning would produce for phase 3 without spawning agents |
|
|
59
60
|
|
|
@@ -114,6 +115,7 @@ Execute these steps in order for standard `$pbr-plan <N>` invocations.
|
|
|
114
115
|
Reference: `skills/shared/config-loading.md` for the tooling shortcut (`state load`, `plan-index`, `phase-info`) and config field reference.
|
|
115
116
|
|
|
116
117
|
1. Parse `$ARGUMENTS` for phase number and flags
|
|
118
|
+
- If `--model <value>` is present in `$ARGUMENTS`, extract the value (sonnet, opus, haiku, inherit). Store as `override_model`. When spawning researcher, planner, and plan-checker Task() agents, use `override_model` instead of the config-derived model values. If an invalid value is provided, display an error and list valid values.
|
|
117
119
|
2. Read `.planning/config.json` for settings (see config-loading.md for field reference)
|
|
118
120
|
**CRITICAL (hook-enforced): Write .active-skill NOW.** Write the text "plan" to `.planning/.active-skill` using the Write tool.
|
|
119
121
|
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.
|
|
@@ -227,7 +229,7 @@ NOTE: The pbr:researcher subagent type auto-loads the agent definition. Do NOT i
|
|
|
227
229
|
|
|
228
230
|
#### Phase Research Prompt Template
|
|
229
231
|
|
|
230
|
-
Read
|
|
232
|
+
Read `${CLAUDE_SKILL_DIR}/templates/researcher-prompt.md.tmpl` and use it as the prompt template for spawning the researcher agent. Fill in the placeholders with phase-specific context:
|
|
231
233
|
- `{NN}` - phase number (zero-padded)
|
|
232
234
|
- `{phase name}` - phase name from roadmap
|
|
233
235
|
- `{goal from roadmap}` - phase goal statement
|
|
@@ -352,7 +354,7 @@ After planner completes, check for completion markers: `## PLANNING COMPLETE`, `
|
|
|
352
354
|
|
|
353
355
|
#### Planning Prompt Template
|
|
354
356
|
|
|
355
|
-
Read
|
|
357
|
+
Read `${CLAUDE_SKILL_DIR}/templates/planner-prompt.md.tmpl` and use it as the prompt template for spawning the planner agent. Fill in all placeholder blocks with phase-specific context:
|
|
356
358
|
|
|
357
359
|
- `<phase_context>` - phase number, directory, goal, requirements, dependencies, success criteria
|
|
358
360
|
- `<project_context>` - locked decisions, user constraints, deferred ideas, phase-specific decisions
|
|
@@ -424,7 +426,7 @@ NOTE: The pbr:plan-checker subagent type auto-loads the agent definition. Do NOT
|
|
|
424
426
|
|
|
425
427
|
#### Checker Prompt Template
|
|
426
428
|
|
|
427
|
-
Read
|
|
429
|
+
Read `${CLAUDE_SKILL_DIR}/templates/checker-prompt.md.tmpl` and use it as the prompt template for spawning the plan checker agent. Fill in the placeholders:
|
|
428
430
|
- `<plans_to_check>` - manifest table of PLAN.md file paths (checker reads each via Read tool)
|
|
429
431
|
- `<phase_context>` - phase goal and requirement IDs
|
|
430
432
|
- `<context>` - file paths to project-level and phase-level CONTEXT.md files (checker reads via Read tool)
|
|
@@ -452,7 +454,7 @@ After the plan checker returns, display its result:
|
|
|
452
454
|
Reference: `skills/shared/revision-loop.md` for the full Check-Revise-Escalate pattern.
|
|
453
455
|
|
|
454
456
|
Follow the revision loop pattern with:
|
|
455
|
-
- **Producer**: planner (re-spawned with
|
|
457
|
+
- **Producer**: planner (re-spawned with `${CLAUDE_SKILL_DIR}/templates/revision-prompt.md.tmpl`)
|
|
456
458
|
- **Checker**: plan-checker (back to Step 6)
|
|
457
459
|
- **Escalation**: present issues to user, offer "Proceed anyway" or "Adjust approach" (re-enter Step 5)
|
|
458
460
|
|
|
@@ -529,7 +531,7 @@ Use AskUserQuestion (pattern: approve-revise-abort from `skills/shared/gate-prom
|
|
|
529
531
|
|
|
530
532
|
### Subcommand: `insert <N>`
|
|
531
533
|
|
|
532
|
-
Reference:
|
|
534
|
+
Reference: `${CLAUDE_SKILL_DIR}/decimal-phase-calc.md` for decimal numbering rules.
|
|
533
535
|
|
|
534
536
|
**CRITICAL (hook-enforced): Write .active-skill NOW.** Write the text "plan" to `.planning/.active-skill` using the Write tool.
|
|
535
537
|
|
|
@@ -573,7 +575,7 @@ When invoked with `--gaps`:
|
|
|
573
575
|
2. Extract all gaps from the verification report
|
|
574
576
|
3. Spawn planner Task() in Gap Closure mode:
|
|
575
577
|
|
|
576
|
-
Read
|
|
578
|
+
Read `${CLAUDE_SKILL_DIR}/templates/gap-closure-prompt.md.tmpl` and use it as the prompt template for the gap closure planner. Fill in the placeholders:
|
|
577
579
|
- `<verification_report>` - inline the FULL VERIFICATION.md content
|
|
578
580
|
- `<existing_plans>` - inline all existing PLAN.md files for the phase
|
|
579
581
|
- `<gap_closure_instructions>` - specify output path and gap_closure frontmatter flag
|
|
@@ -646,5 +648,5 @@ Delete `.planning/.active-skill` if it exists. This must happen on all paths (su
|
|
|
646
648
|
|
|
647
649
|
After planning completes, present:
|
|
648
650
|
|
|
649
|
-
Use the branded stage banner and next-up block from
|
|
651
|
+
Use the branded stage banner and next-up block from `${CLAUDE_SKILL_DIR}/templates/completion-output.md.tmpl`.
|
|
650
652
|
Fill in: `{N}` (phase number), `{phase-name}`, `{plan_count}`, `{plan_list_lines}` (one line per plan with wave and task count), `{wave_table_lines}` (one line per wave).
|