@sienklogic/plan-build-run 2.58.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 +26 -0
- package/package.json +1 -1
- package/plugins/codex-pbr/commands/profile.md +7 -0
- package/plugins/codex-pbr/references/model-profiles.md +29 -3
- package/plugins/codex-pbr/skills/begin/SKILL.md +7 -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 +66 -2
- package/plugins/copilot-pbr/commands/profile.md +7 -0
- package/plugins/copilot-pbr/hooks/hooks.json +26 -0
- package/plugins/copilot-pbr/plugin.json +1 -1
- package/plugins/copilot-pbr/references/model-profiles.md +29 -3
- package/plugins/copilot-pbr/skills/begin/SKILL.md +7 -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 +66 -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 +22 -0
- package/plugins/cursor-pbr/references/model-profiles.md +29 -3
- package/plugins/cursor-pbr/skills/begin/SKILL.md +7 -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 +66 -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 +22 -0
- package/plugins/pbr/references/model-profiles.md +29 -3
- package/plugins/pbr/scripts/config-schema.json +18 -0
- package/plugins/pbr/scripts/hooks-schema.json +3 -1
- package/plugins/pbr/scripts/lib/init.js +10 -7
- package/plugins/pbr/scripts/pbr-tools.js +6 -6
- 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 +7 -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 +66 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,32 @@ 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
|
+
|
|
8
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)
|
|
9
35
|
|
|
10
36
|
|
package/package.json
CHANGED
|
@@ -24,7 +24,9 @@ Sonnet 4.6 handles orchestration tasks (state reading, routing decisions, contex
|
|
|
24
24
|
|
|
25
25
|
## Agent-to-Model Mapping
|
|
26
26
|
|
|
27
|
-
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.
|
|
28
30
|
|
|
29
31
|
### Default Agent Models
|
|
30
32
|
|
|
@@ -40,8 +42,10 @@ Each Plan-Build-Run agent has a default model specified in its agent definition
|
|
|
40
42
|
| `codebase-mapper` | `sonnet` | Codebase analysis requires thorough reasoning |
|
|
41
43
|
| `synthesizer` | `haiku` | Synthesis is mechanical combination; speed over depth |
|
|
42
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 |
|
|
43
47
|
|
|
44
|
-
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`.
|
|
45
49
|
|
|
46
50
|
---
|
|
47
51
|
|
|
@@ -106,6 +110,28 @@ Note: Claude Code 2.1.45+ supports Sonnet 4.6. Model values are abstract names
|
|
|
106
110
|
|
|
107
111
|
---
|
|
108
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
|
+
|
|
109
135
|
## Model Selection in Skill Orchestration
|
|
110
136
|
|
|
111
137
|
Skills that spawn subagents use the `model` parameter in `Task()` calls. Some skills hardcode a lighter model for specific tasks:
|
|
@@ -114,4 +140,4 @@ Skills that spawn subagents use the `model` parameter in `Task()` calls. Some sk
|
|
|
114
140
|
- **Build skill**: Spawns codebase mapper updates with `model: "haiku"` for incremental map refreshes
|
|
115
141
|
- **Plan skill**: Uses the configured `planner` model for main planning work
|
|
116
142
|
|
|
117
|
-
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.
|
|
@@ -321,7 +321,7 @@ This project uses [Plan-Build-Run](https://github.com/SienkLogic/plan-build-run)
|
|
|
321
321
|
|
|
322
322
|
**CRITICAL (no hook): You MUST create the .planning/ directory and write config.json NOW. Do not proceed without this.**
|
|
323
323
|
|
|
324
|
-
1. Read the config template from
|
|
324
|
+
1. Read the config template from `${CLAUDE_SKILL_DIR}/templates/config.json.tmpl`
|
|
325
325
|
2. Apply the user's choices to the template (including 3d-claude CLAUDE.md integration)
|
|
326
326
|
3. Create `.planning/` directory
|
|
327
327
|
4. Write `.planning/config.json` with the user's preferences
|
|
@@ -405,7 +405,7 @@ Task({
|
|
|
405
405
|
|
|
406
406
|
For each researcher, construct the prompt by reading the template and filling in placeholders:
|
|
407
407
|
|
|
408
|
-
Read
|
|
408
|
+
Read `${CLAUDE_SKILL_DIR}/templates/researcher-prompt.md.tmpl` for the prompt structure.
|
|
409
409
|
|
|
410
410
|
**Prepend this block to the researcher prompt before sending:**
|
|
411
411
|
|
|
@@ -486,7 +486,7 @@ Task({
|
|
|
486
486
|
|
|
487
487
|
#### Synthesis Prompt Template
|
|
488
488
|
|
|
489
|
-
Read
|
|
489
|
+
Read `${CLAUDE_SKILL_DIR}/templates/synthesis-prompt.md.tmpl` for the prompt structure.
|
|
490
490
|
|
|
491
491
|
**Prepend this block to the synthesizer prompt before sending:**
|
|
492
492
|
```
|
|
@@ -561,7 +561,7 @@ Each requirement must be:
|
|
|
561
561
|
|
|
562
562
|
**CRITICAL (no hook): Write REQUIREMENTS.md NOW. The roadmap planner depends on this file.**
|
|
563
563
|
|
|
564
|
-
Read the template from
|
|
564
|
+
Read the template from `${CLAUDE_SKILL_DIR}/templates/REQUIREMENTS.md.tmpl` and write `.planning/REQUIREMENTS.md` with:
|
|
565
565
|
- All v1 requirements grouped by category
|
|
566
566
|
- All v2 requirements with deferral reasons
|
|
567
567
|
- Out-of-scope items with rationale
|
|
@@ -589,7 +589,7 @@ Task({
|
|
|
589
589
|
|
|
590
590
|
#### Roadmap Prompt Template
|
|
591
591
|
|
|
592
|
-
Read
|
|
592
|
+
Read `${CLAUDE_SKILL_DIR}/templates/roadmap-prompt.md.tmpl` for the prompt structure.
|
|
593
593
|
|
|
594
594
|
**Prepend this block to the roadmap planner prompt before sending:**
|
|
595
595
|
```
|
|
@@ -635,7 +635,7 @@ Write the project state files from templates:
|
|
|
635
635
|
**CRITICAL (no hook): Write PROJECT.md NOW. Do NOT skip this step.**
|
|
636
636
|
|
|
637
637
|
**9a. Write PROJECT.md:**
|
|
638
|
-
1. Read
|
|
638
|
+
1. Read `${CLAUDE_SKILL_DIR}/templates/PROJECT.md.tmpl`
|
|
639
639
|
2. Fill in:
|
|
640
640
|
- `{project_name}` — from questioning
|
|
641
641
|
- `{2-3 sentences}` — project description from questioning
|
|
@@ -649,7 +649,7 @@ Write the project state files from templates:
|
|
|
649
649
|
**CRITICAL (no hook): Write STATE.md NOW. Do NOT skip this step.**
|
|
650
650
|
|
|
651
651
|
**9b. Write STATE.md:**
|
|
652
|
-
1. Read
|
|
652
|
+
1. Read `${CLAUDE_SKILL_DIR}/templates/STATE.md.tmpl`
|
|
653
653
|
2. Fill in:
|
|
654
654
|
- `{date}` — today's date
|
|
655
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).
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: profile
|
|
3
|
+
description: "Switch the active model profile. Presets: quality, balanced, budget, adaptive. Supports custom profiles from config.json model_profiles."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**STOP — DO NOT READ THIS FILE. You are already reading it. This prompt was injected into your context by Claude Code's plugin system. Begin executing Step 0 immediately.**
|
|
7
|
+
|
|
8
|
+
# $pbr-profile — Model Profile Manager
|
|
9
|
+
|
|
10
|
+
You are running the **profile** skill. Your job is to show the current model profile or switch to a new one by writing model assignments to `.planning/config.json`.
|
|
11
|
+
|
|
12
|
+
## Step 0 — Immediate Output
|
|
13
|
+
|
|
14
|
+
**Before ANY tool calls**, display this banner:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
18
|
+
║ PLAN-BUILD-RUN ► MODEL PROFILE ║
|
|
19
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Then proceed to Step 1.
|
|
23
|
+
|
|
24
|
+
## Step 1 — Load Config
|
|
25
|
+
|
|
26
|
+
Read `.planning/config.json`.
|
|
27
|
+
|
|
28
|
+
If the file does not exist, output:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
Error: .planning/config.json not found. Run $pbr-begin first.
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Stop immediately.
|
|
35
|
+
|
|
36
|
+
## Step 2 — Parse Arguments
|
|
37
|
+
|
|
38
|
+
Extract the first word from `$ARGUMENTS` as the profile name. Trim whitespace.
|
|
39
|
+
|
|
40
|
+
- If `$ARGUMENTS` is empty or blank → **show-mode** (go to Step 3).
|
|
41
|
+
- If a profile name is present → **switch-mode** (go to Step 4).
|
|
42
|
+
|
|
43
|
+
## Step 3 — Show Mode (no argument)
|
|
44
|
+
|
|
45
|
+
Display the current profile status and available options.
|
|
46
|
+
|
|
47
|
+
1. Read `config.json` key `model_profile`. If absent, treat as `"balanced"`.
|
|
48
|
+
2. Read `config.json` key `models` (object). If absent, use empty object.
|
|
49
|
+
3. Read `config.json` key `model_profiles` (object, optional custom profiles). If absent, use empty object.
|
|
50
|
+
|
|
51
|
+
Output the following (fill in actual values):
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
Active profile: <model_profile value>
|
|
55
|
+
|
|
56
|
+
Current model assignments:
|
|
57
|
+
researcher : <models.researcher or "not set">
|
|
58
|
+
planner : <models.planner or "not set">
|
|
59
|
+
executor : <models.executor or "not set">
|
|
60
|
+
verifier : <models.verifier or "not set">
|
|
61
|
+
integration_checker : <models.integration_checker or "not set">
|
|
62
|
+
debugger : <models.debugger or "not set">
|
|
63
|
+
mapper : <models.mapper or "not set">
|
|
64
|
+
synthesizer : <models.synthesizer or "not set">
|
|
65
|
+
|
|
66
|
+
Available presets:
|
|
67
|
+
quality — all agents use opus (maximum capability)
|
|
68
|
+
balanced — mix of sonnet/inherit/haiku (default)
|
|
69
|
+
budget — all agents use haiku (minimum cost)
|
|
70
|
+
adaptive — sonnet for planning/verification, inherit/haiku for execution
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
If `model_profiles` has any keys, also display:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
Custom profiles:
|
|
77
|
+
<profile-name> — <key count> model overrides
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Output: "Run `$pbr-profile <name>` to switch profiles."
|
|
81
|
+
|
|
82
|
+
Stop. Do not write anything.
|
|
83
|
+
|
|
84
|
+
## Step 4 — Switch Mode (argument provided)
|
|
85
|
+
|
|
86
|
+
### Step 4a — Validate Profile Name
|
|
87
|
+
|
|
88
|
+
Built-in preset names: `quality`, `balanced`, `budget`, `adaptive`.
|
|
89
|
+
|
|
90
|
+
Custom profile names: keys in `config.json model_profiles` (if any).
|
|
91
|
+
|
|
92
|
+
If the provided name does not match any of the above:
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
Error: Unknown profile "<name>".
|
|
96
|
+
|
|
97
|
+
Valid presets: quality, balanced, budget, adaptive
|
|
98
|
+
<list any custom profile names from config.json model_profiles, if any>
|
|
99
|
+
|
|
100
|
+
Run `$pbr-profile` to see the current status.
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Stop immediately.
|
|
104
|
+
|
|
105
|
+
### Step 4b — Resolve Model Values
|
|
106
|
+
|
|
107
|
+
Use the preset table to resolve model values:
|
|
108
|
+
|
|
109
|
+
| Agent | quality | balanced | budget | adaptive |
|
|
110
|
+
|---------------------|---------|----------|--------|----------|
|
|
111
|
+
| researcher | opus | sonnet | haiku | sonnet |
|
|
112
|
+
| planner | opus | inherit | haiku | sonnet |
|
|
113
|
+
| executor | opus | inherit | haiku | inherit |
|
|
114
|
+
| verifier | opus | sonnet | haiku | sonnet |
|
|
115
|
+
| integration_checker | sonnet | sonnet | haiku | haiku |
|
|
116
|
+
| debugger | opus | inherit | haiku | inherit |
|
|
117
|
+
| mapper | sonnet | sonnet | haiku | haiku |
|
|
118
|
+
| synthesizer | sonnet | haiku | haiku | haiku |
|
|
119
|
+
|
|
120
|
+
For a **custom profile** (name found in `config.json model_profiles`):
|
|
121
|
+
- Start with the `balanced` defaults from the table above.
|
|
122
|
+
- Overlay any keys present in `config.json model_profiles[<name>]`.
|
|
123
|
+
- Any agents not specified in the custom profile use the balanced default.
|
|
124
|
+
|
|
125
|
+
### Step 4c — Write to config.json
|
|
126
|
+
|
|
127
|
+
Update `config.json` using the Bash tool with `node -e` inline script:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
node -e "
|
|
131
|
+
const fs = require('fs');
|
|
132
|
+
const cfg = JSON.parse(fs.readFileSync('.planning/config.json', 'utf8'));
|
|
133
|
+
cfg.model_profile = '<name>';
|
|
134
|
+
cfg.models = cfg.models || {};
|
|
135
|
+
cfg.models.researcher = '<value>';
|
|
136
|
+
cfg.models.planner = '<value>';
|
|
137
|
+
cfg.models.executor = '<value>';
|
|
138
|
+
cfg.models.verifier = '<value>';
|
|
139
|
+
cfg.models.integration_checker = '<value>';
|
|
140
|
+
cfg.models.debugger = '<value>';
|
|
141
|
+
cfg.models.mapper = '<value>';
|
|
142
|
+
cfg.models.synthesizer = '<value>';
|
|
143
|
+
fs.writeFileSync('.planning/config.json', JSON.stringify(cfg, null, 2));
|
|
144
|
+
console.log('OK');
|
|
145
|
+
"
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Replace each `<value>` with the resolved model string for that agent. Replace `<name>` with the profile name.
|
|
149
|
+
|
|
150
|
+
### Step 4d — Confirm
|
|
151
|
+
|
|
152
|
+
Output:
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
Active profile set to: <name>
|
|
156
|
+
|
|
157
|
+
Model assignments updated:
|
|
158
|
+
researcher : <value>
|
|
159
|
+
planner : <value>
|
|
160
|
+
executor : <value>
|
|
161
|
+
verifier : <value>
|
|
162
|
+
integration_checker : <value>
|
|
163
|
+
debugger : <value>
|
|
164
|
+
mapper : <value>
|
|
165
|
+
synthesizer : <value>
|
|
166
|
+
|
|
167
|
+
Config written to .planning/config.json.
|
|
168
|
+
Run $pbr-profile to verify.
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Stop. Done.
|