@sienklogic/plan-build-run 2.58.0 → 2.60.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.
Files changed (128) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/package.json +1 -1
  3. package/plugins/codex-pbr/agents/executor.md +8 -0
  4. package/plugins/codex-pbr/agents/plan-checker.md +5 -3
  5. package/plugins/codex-pbr/agents/planner.md +13 -7
  6. package/plugins/codex-pbr/agents/verifier.md +10 -1
  7. package/plugins/codex-pbr/commands/profile.md +7 -0
  8. package/plugins/codex-pbr/references/model-profiles.md +29 -3
  9. package/plugins/codex-pbr/references/plan-format.md +46 -8
  10. package/plugins/codex-pbr/skills/begin/SKILL.md +18 -34
  11. package/plugins/codex-pbr/skills/build/SKILL.md +8 -4
  12. package/plugins/codex-pbr/skills/debug/SKILL.md +2 -2
  13. package/plugins/codex-pbr/skills/discuss/SKILL.md +54 -4
  14. package/plugins/codex-pbr/skills/health/SKILL.md +15 -2
  15. package/plugins/codex-pbr/skills/milestone/SKILL.md +8 -8
  16. package/plugins/codex-pbr/skills/pause/SKILL.md +1 -1
  17. package/plugins/codex-pbr/skills/plan/SKILL.md +20 -8
  18. package/plugins/codex-pbr/skills/profile/SKILL.md +171 -0
  19. package/plugins/codex-pbr/skills/review/SKILL.md +5 -3
  20. package/plugins/codex-pbr/skills/scan/SKILL.md +2 -2
  21. package/plugins/codex-pbr/skills/setup/SKILL.md +66 -2
  22. package/plugins/codex-pbr/skills/shared/context-loader-task.md +2 -0
  23. package/plugins/codex-pbr/skills/status/SKILL.md +17 -0
  24. package/plugins/codex-pbr/templates/PROJECT.md.tmpl +41 -0
  25. package/plugins/codex-pbr/templates/REQUIREMENTS.md.tmpl +52 -0
  26. package/plugins/codex-pbr/templates/VERIFICATION-DETAIL.md.tmpl +5 -0
  27. package/plugins/codex-pbr/templates/project-CONTEXT.md.tmpl +43 -0
  28. package/plugins/copilot-pbr/agents/executor.agent.md +8 -0
  29. package/plugins/copilot-pbr/agents/plan-checker.agent.md +5 -3
  30. package/plugins/copilot-pbr/agents/planner.agent.md +13 -7
  31. package/plugins/copilot-pbr/agents/verifier.agent.md +10 -1
  32. package/plugins/copilot-pbr/commands/profile.md +7 -0
  33. package/plugins/copilot-pbr/hooks/hooks.json +27 -0
  34. package/plugins/copilot-pbr/plugin.json +1 -1
  35. package/plugins/copilot-pbr/references/model-profiles.md +29 -3
  36. package/plugins/copilot-pbr/references/plan-format.md +46 -8
  37. package/plugins/copilot-pbr/skills/begin/SKILL.md +18 -34
  38. package/plugins/copilot-pbr/skills/build/SKILL.md +8 -4
  39. package/plugins/copilot-pbr/skills/debug/SKILL.md +2 -2
  40. package/plugins/copilot-pbr/skills/discuss/SKILL.md +54 -4
  41. package/plugins/copilot-pbr/skills/health/SKILL.md +15 -2
  42. package/plugins/copilot-pbr/skills/milestone/SKILL.md +8 -8
  43. package/plugins/copilot-pbr/skills/pause/SKILL.md +1 -1
  44. package/plugins/copilot-pbr/skills/plan/SKILL.md +20 -8
  45. package/plugins/copilot-pbr/skills/profile/SKILL.md +171 -0
  46. package/plugins/copilot-pbr/skills/review/SKILL.md +5 -3
  47. package/plugins/copilot-pbr/skills/scan/SKILL.md +2 -2
  48. package/plugins/copilot-pbr/skills/setup/SKILL.md +66 -2
  49. package/plugins/copilot-pbr/skills/shared/context-loader-task.md +2 -0
  50. package/plugins/copilot-pbr/skills/status/SKILL.md +17 -0
  51. package/plugins/copilot-pbr/templates/PROJECT.md.tmpl +41 -0
  52. package/plugins/copilot-pbr/templates/REQUIREMENTS.md.tmpl +52 -0
  53. package/plugins/copilot-pbr/templates/VERIFICATION-DETAIL.md.tmpl +5 -0
  54. package/plugins/copilot-pbr/templates/project-CONTEXT.md.tmpl +43 -0
  55. package/plugins/cursor-pbr/.cursor-plugin/plugin.json +1 -1
  56. package/plugins/cursor-pbr/agents/executor.md +8 -0
  57. package/plugins/cursor-pbr/agents/plan-checker.md +5 -3
  58. package/plugins/cursor-pbr/agents/planner.md +13 -7
  59. package/plugins/cursor-pbr/agents/verifier.md +10 -1
  60. package/plugins/cursor-pbr/commands/profile.md +7 -0
  61. package/plugins/cursor-pbr/hooks/hooks.json +23 -0
  62. package/plugins/cursor-pbr/references/model-profiles.md +29 -3
  63. package/plugins/cursor-pbr/references/plan-format.md +46 -8
  64. package/plugins/cursor-pbr/skills/begin/SKILL.md +18 -34
  65. package/plugins/cursor-pbr/skills/build/SKILL.md +9 -5
  66. package/plugins/cursor-pbr/skills/debug/SKILL.md +2 -2
  67. package/plugins/cursor-pbr/skills/discuss/SKILL.md +55 -5
  68. package/plugins/cursor-pbr/skills/health/SKILL.md +15 -2
  69. package/plugins/cursor-pbr/skills/milestone/SKILL.md +8 -8
  70. package/plugins/cursor-pbr/skills/pause/SKILL.md +1 -1
  71. package/plugins/cursor-pbr/skills/plan/SKILL.md +21 -9
  72. package/plugins/cursor-pbr/skills/profile/SKILL.md +172 -0
  73. package/plugins/cursor-pbr/skills/review/SKILL.md +6 -4
  74. package/plugins/cursor-pbr/skills/scan/SKILL.md +2 -2
  75. package/plugins/cursor-pbr/skills/setup/SKILL.md +66 -2
  76. package/plugins/cursor-pbr/skills/shared/context-loader-task.md +2 -0
  77. package/plugins/cursor-pbr/skills/status/SKILL.md +17 -0
  78. package/plugins/cursor-pbr/templates/PROJECT.md.tmpl +41 -0
  79. package/plugins/cursor-pbr/templates/REQUIREMENTS.md.tmpl +52 -0
  80. package/plugins/cursor-pbr/templates/VERIFICATION-DETAIL.md.tmpl +5 -0
  81. package/plugins/cursor-pbr/templates/project-CONTEXT.md.tmpl +43 -0
  82. package/plugins/pbr/.claude-plugin/plugin.json +1 -1
  83. package/plugins/pbr/agents/audit.md +0 -1
  84. package/plugins/pbr/agents/codebase-mapper.md +0 -1
  85. package/plugins/pbr/agents/debugger.md +0 -1
  86. package/plugins/pbr/agents/dev-sync.md +0 -1
  87. package/plugins/pbr/agents/executor.md +8 -1
  88. package/plugins/pbr/agents/general.md +0 -1
  89. package/plugins/pbr/agents/integration-checker.md +0 -1
  90. package/plugins/pbr/agents/plan-checker.md +5 -4
  91. package/plugins/pbr/agents/planner.md +13 -8
  92. package/plugins/pbr/agents/researcher.md +0 -1
  93. package/plugins/pbr/agents/synthesizer.md +0 -1
  94. package/plugins/pbr/agents/verifier.md +10 -2
  95. package/plugins/pbr/commands/profile.md +7 -0
  96. package/plugins/pbr/hooks/hooks.json +23 -0
  97. package/plugins/pbr/references/model-profiles.md +29 -3
  98. package/plugins/pbr/references/plan-format.md +46 -8
  99. package/plugins/pbr/scripts/check-plan-format.js +29 -0
  100. package/plugins/pbr/scripts/config-schema.json +20 -1
  101. package/plugins/pbr/scripts/context-bridge.js +1 -1
  102. package/plugins/pbr/scripts/hooks-schema.json +3 -1
  103. package/plugins/pbr/scripts/lib/gates/doc-existence.js +46 -0
  104. package/plugins/pbr/scripts/lib/init.js +10 -7
  105. package/plugins/pbr/scripts/pbr-tools.js +6 -6
  106. package/plugins/pbr/scripts/post-write-dispatch.js +22 -2
  107. package/plugins/pbr/scripts/sync-context-to-claude.js +100 -0
  108. package/plugins/pbr/scripts/validate-task.js +14 -1
  109. package/plugins/pbr/scripts/worktree-create.js +93 -0
  110. package/plugins/pbr/scripts/worktree-remove.js +83 -0
  111. package/plugins/pbr/skills/begin/SKILL.md +18 -34
  112. package/plugins/pbr/skills/build/SKILL.md +9 -5
  113. package/plugins/pbr/skills/debug/SKILL.md +2 -2
  114. package/plugins/pbr/skills/discuss/SKILL.md +55 -5
  115. package/plugins/pbr/skills/health/SKILL.md +15 -2
  116. package/plugins/pbr/skills/milestone/SKILL.md +8 -8
  117. package/plugins/pbr/skills/pause/SKILL.md +1 -1
  118. package/plugins/pbr/skills/plan/SKILL.md +21 -9
  119. package/plugins/pbr/skills/profile/SKILL.md +173 -0
  120. package/plugins/pbr/skills/review/SKILL.md +6 -4
  121. package/plugins/pbr/skills/scan/SKILL.md +2 -2
  122. package/plugins/pbr/skills/setup/SKILL.md +66 -2
  123. package/plugins/pbr/skills/shared/context-loader-task.md +2 -0
  124. package/plugins/pbr/skills/status/SKILL.md +17 -0
  125. package/plugins/pbr/templates/PROJECT.md.tmpl +41 -0
  126. package/plugins/pbr/templates/REQUIREMENTS.md.tmpl +52 -0
  127. package/plugins/pbr/templates/VERIFICATION-DETAIL.md.tmpl +5 -0
  128. package/plugins/pbr/templates/project-CONTEXT.md.tmpl +43 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,62 @@ 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.60.0](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.59.0...plan-build-run-v2.60.0) (2026-03-06)
9
+
10
+
11
+ ### Features
12
+
13
+ * **65-01:** add project-CONTEXT.md.tmpl with planner-embeds pattern to all 4 plugins ([683f67c](https://github.com/SienkLogic/plan-build-run/commit/683f67c48197df79b17fb6199081914c663f458b))
14
+ * **65-01:** add PROJECT.md.tmpl to all 4 plugin template directories ([6416490](https://github.com/SienkLogic/plan-build-run/commit/6416490bdbd20867c2bc5f418c526d70b7f651e9))
15
+ * **65-01:** add REQUIREMENTS.md.tmpl with REQ-F/REQ-NF schema to all 4 plugins ([f293660](https://github.com/SienkLogic/plan-build-run/commit/f293660572dec225e7f3a25c137b199097af8d84))
16
+ * **65-02:** add --project flag and Step 1-project mode to discuss/SKILL.md across all 4 plugins ([35a40c4](https://github.com/SienkLogic/plan-build-run/commit/35a40c4a1ea24cf6b68fa076ca82e268cd208bb1))
17
+ * **65-02:** add PROJECT.md to context-loader-task.md briefing file lists across all 4 plugins ([12d4668](https://github.com/SienkLogic/plan-build-run/commit/12d46688632e6578e1e120ea123ff5de02bb781f))
18
+ * **65-02:** update begin/SKILL.md REQ-F/REQ-NF schema and project-CONTEXT template ref across 4 plugins; add 3 new keyTemplates to test ([b228120](https://github.com/SienkLogic/plan-build-run/commit/b228120d422cb3b8bd992cef1b4cada67cb11f3e))
19
+ * **65-03:** add doc-existence gate to validate-task; update test fixtures for implements advisory ([c5fc1e3](https://github.com/SienkLogic/plan-build-run/commit/c5fc1e3d6a360908d0652131173a784c5a7db427))
20
+ * **65-03:** GREEN - implement sync-context-to-claude.js ([65784a0](https://github.com/SienkLogic/plan-build-run/commit/65784a057622d600fc26891dc9ece84c8c53a2dd))
21
+ * **65-04:** add advisory warnings to health skill for missing PROJECT.md, REQUIREMENTS.md, CONTEXT.md across all 4 plugins ([182df09](https://github.com/SienkLogic/plan-build-run/commit/182df09681130b3927a09821f9d464b2546441ee))
22
+ * **65-04:** update planner agent for dual-source CONTEXT.md loading and plan/SKILL.md compliance check ([bd6cf41](https://github.com/SienkLogic/plan-build-run/commit/bd6cf4112b6f723459c5127be8bfc74efc98e370))
23
+ * **65-04:** update status skill to display PROJECT.md, REQUIREMENTS.md, CONTEXT.md presence across all 4 plugins ([60df410](https://github.com/SienkLogic/plan-build-run/commit/60df4104fa39d406b1833311a99df493922475d2))
24
+ * **xml-plan-format:** add auto_checkpoints to config-schema and satisfied/unsatisfied to VERIFICATION template ([72d08e8](https://github.com/SienkLogic/plan-build-run/commit/72d08e8dccf58e5011485bfb16a39db4e972ecef))
25
+ * **xml-plan-format:** add automated wrapper, feature type, and implements field to plan-format.md ([3ee897a](https://github.com/SienkLogic/plan-build-run/commit/3ee897a89016fe28b968266f33ff286f90de7671))
26
+ * **xml-plan-format:** enforce implements: blocking, add feature task validation, satisfied/unsatisfied advisory ([4d78e8e](https://github.com/SienkLogic/plan-build-run/commit/4d78e8eeccda91733b11f206c0d19ed075fd9fe7))
27
+ * **xml-plan-format:** sync cursor-pbr and copilot-pbr agents for implements:/automated/satisfied traceability ([753d4ed](https://github.com/SienkLogic/plan-build-run/commit/753d4ed0b3c4f486496781012d6dcef951d42076))
28
+ * **xml-plan-format:** update planner/executor/verifier/plan-checker for implements: traceability and must_haves locking ([98cc23f](https://github.com/SienkLogic/plan-build-run/commit/98cc23f7e5cfca60c188809b737c4156ceb49028))
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * **cross-plugin-sync:** align status skill Step 1d heading order in cursor-pbr and copilot-pbr ([dc8419e](https://github.com/SienkLogic/plan-build-run/commit/dc8419e33c1184a2224cdb22d6383bf572d41d58))
34
+ * **cross-plugin-sync:** sync phase 66 references, templates, and agents to codex-pbr, copilot-pbr, cursor-pbr ([e143d9e](https://github.com/SienkLogic/plan-build-run/commit/e143d9ecfc4792fb8085f62ed9227738324ea69f))
35
+ * **doc-gates:** add 3-part format to doc-existence blocking reason ([ba2d732](https://github.com/SienkLogic/plan-build-run/commit/ba2d732e1fd89afce266a50057b2b1411152903e))
36
+ * **doc-gates:** upgrade doc-existence gate from advisory to blocking ([a4eeb3f](https://github.com/SienkLogic/plan-build-run/commit/a4eeb3fa015b0a81d4130dd7a9e4c220f124bf7d))
37
+
38
+ ## [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)
39
+
40
+
41
+ ### Features
42
+
43
+ * **63-01:** implement worktree-create.js hook script ([195c9e0](https://github.com/SienkLogic/plan-build-run/commit/195c9e0c03d5ebaecdddfb9df647a165eba6a199))
44
+ * **63-01:** implement worktree-remove.js hook script ([3928168](https://github.com/SienkLogic/plan-build-run/commit/392816846f29a58e58e09f72fd9f976428a4c46b))
45
+ * **64-03:** add profile command registration to derivative plugins ([f12d4af](https://github.com/SienkLogic/plan-build-run/commit/f12d4af9f8762ed34e99659bc0edde12d2071477))
46
+ * **config:** add Platform Settings step to /pbr:setup in all three plugins ([60e17bd](https://github.com/SienkLogic/plan-build-run/commit/60e17bdb8dc1ca0fbdeb285442c3a82f250f6962))
47
+ * **config:** add platform_settings block to config fixture ([8af55e6](https://github.com/SienkLogic/plan-build-run/commit/8af55e6d4ffbde1b13b9c8f4889acfb7563069e9))
48
+ * **model-profiles:** add --model CLI override to build/plan/review skills ([f09d4de](https://github.com/SienkLogic/plan-build-run/commit/f09d4de90348daf8ef0f7ae85718a15057fc202e))
49
+ * **model-profiles:** add /pbr:profile skill and command to pbr plugin ([310719b](https://github.com/SienkLogic/plan-build-run/commit/310719b76fc6cc2bef3cc156baa22c212c566be1))
50
+ * **model-profiles:** add /pbr:profile skill to cursor-pbr, copilot-pbr, codex-pbr ([02ae4d4](https://github.com/SienkLogic/plan-build-run/commit/02ae4d41f19b897ce9a5af6ff0c13d19a222730d))
51
+ * **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))
52
+ * **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))
53
+ * **worktree-hooks:** add worktree hooks to cursor-pbr and copilot-pbr ([954ddac](https://github.com/SienkLogic/plan-build-run/commit/954ddac1b492edaf9625fba23d5363ffd3503cb1))
54
+ * **worktree-hooks:** add WorktreeCreate/WorktreeRemove to cross-plugin-compat test maps ([6dd2dd6](https://github.com/SienkLogic/plan-build-run/commit/6dd2dd61720651aaecd6a5eaf7cacee508cd4d94))
55
+ * **worktree-hooks:** add WorktreeCreate/WorktreeRemove to pbr hooks.json ([23791ed](https://github.com/SienkLogic/plan-build-run/commit/23791ed181e66921bbb954cb7424fa339e4bf582))
56
+
57
+
58
+ ### Bug Fixes
59
+
60
+ * **64-01:** add default model: sonnet in cursor derivative generator ([a51a2bf](https://github.com/SienkLogic/plan-build-run/commit/a51a2bf8fa2a6284f7f697a99de89c2649c95f12))
61
+ * **64-01:** restore model: sonnet to cursor-pbr agent frontmatter ([bcaef58](https://github.com/SienkLogic/plan-build-run/commit/bcaef584abb962ad7ff17033f6ac714e29f3df9d))
62
+ * **model-profiles:** restore model to derivative agents, update tests for config-only model ([ed8ab09](https://github.com/SienkLogic/plan-build-run/commit/ed8ab092c9084a9835efa07dd71e2acc50734f40))
63
+
8
64
  ## [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
65
 
10
66
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sienklogic/plan-build-run",
3
- "version": "2.58.0",
3
+ "version": "2.60.0",
4
4
  "description": "Plan it, Build it, Run it — structured development workflow for Claude Code",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -35,6 +35,9 @@ You are **executor**, the code execution agent for Plan-Build-Run. You receive v
35
35
  a. Read task XML
36
36
  b. Execute <action> steps
37
37
  c. Run <verify> commands
38
+ - If <verify> contains an <automated> child element, extract and run the command inside it
39
+ - If <verify> is plain text (no <automated> child), run it as before (backward compat)
40
+ - Both forms produce the same result — <automated> is machine-parseable, plain text is human-readable
38
41
  d. If verify passes: commit
39
42
  e. If verify fails: apply deviation rules
40
43
  f. If checkpoint: STOP and return
@@ -196,6 +199,11 @@ When a task has a checkpoint type, **STOP execution** and return a structured re
196
199
  | `decision` | Before executing | Decision needed, options, context |
197
200
  | `human-action` | Before executing | What user must do, step-by-step |
198
201
 
202
+ **auto_checkpoints config**: After loading plan frontmatter, read `gates.auto_checkpoints` from config.json (default false):
203
+ - Load with: `node pbr-tools.js config-get gates.auto_checkpoints`
204
+ - When `auto_checkpoints` is true AND task type is `checkpoint:human-verify`: run the automated verify command. If it passes, auto-approve and continue. If it fails, still STOP and return the checkpoint response.
205
+ - `checkpoint:decision` and `checkpoint:human-action` always require human input regardless of `auto_checkpoints`.
206
+
199
207
  **Automation-first**: Complete all automatable pre-work before any checkpoint. Only checkpoint for genuinely human-required actions (API keys needing account login, architectural choices, destructive approvals).
200
208
 
201
209
  All responses use: `CHECKPOINT: {TYPE}` header, task info, type-specific fields, completed tasks table, remaining tasks list.
@@ -157,14 +157,16 @@ Plans declare `provides`/`consumes`; all consumed items must have providers.
157
157
  | Missing provides/consumes for exports | INFO |
158
158
 
159
159
  ### D9: Requirement Traceability
160
- Plans declare `requirement_ids` with bidirectional coverage. Forward: IDs trace to REQUIREMENTS.md (or ROADMAP.md goals). Backward: every requirement covered by at least one plan.
160
+ Plans declare `implements` with bidirectional coverage. Forward: IDs trace to REQUIREMENTS.md (or ROADMAP.md goals). Backward: every requirement covered by at least one plan.
161
+
162
+ > **Note:** `requirement_ids:` is a deprecated alias for `implements:` — treat as equivalent during transition.
161
163
 
162
164
  | Condition | Severity |
163
165
  |-----------|----------|
164
- | requirement_id references nonexistent requirement | BLOCKER |
166
+ | implements: ID references nonexistent requirement | BLOCKER |
165
167
  | Requirement not covered by any plan | WARNING |
166
168
  | ROADMAP goal not covered (no REQUIREMENTS.md) | WARNING |
167
- | Plan missing requirement_ids entirely | INFO |
169
+ | Plan missing implements: entirely | WARNING |
168
170
 
169
171
  ### D10: Test Plan Coverage
170
172
  Code-producing tasks should include test expectations. Check that tasks creating or modifying source code have corresponding test references in `<files>`, `<action>`, or `<verify>`. Test files should appear in `<files>`, test commands in `<verify>`, and test outcomes in `<done>`.
@@ -9,7 +9,7 @@ you MUST Read every listed file BEFORE any other action.
9
9
  Skipping this causes hallucinated context and broken output.
10
10
  </files_to_read>
11
11
 
12
- > Default files: CONTEXT.md, ROADMAP.md, research documents, existing plan files
12
+ > Default files: PROJECT.md (if exists), CONTEXT.md (project-level, if exists), phase CONTEXT.md (if exists), ROADMAP.md, research documents, existing plan files
13
13
 
14
14
  # Plan-Build-Run Planner
15
15
 
@@ -20,7 +20,7 @@ You are **planner**, the planning agent for the Plan-Build-Run development syste
20
20
 
21
21
  ## Core Principle: Context Fidelity
22
22
 
23
- **Locked decisions from CONTEXT.md are NON-NEGOTIABLE.** You never substitute, reinterpret, or work around locked decisions. If CONTEXT.md says "Use PostgreSQL", the plan uses PostgreSQL. Period.
23
+ **Locked decisions from BOTH `.planning/CONTEXT.md` (project-level) AND `.planning/phases/{NN}-{slug}/CONTEXT.md` (phase-level) are NON-NEGOTIABLE.** Phase-level overrides project-level for the same decision area. You never substitute, reinterpret, or work around locked decisions. If CONTEXT.md says "Use PostgreSQL", the plan uses PostgreSQL. Period.
24
24
 
25
25
  **Deferred ideas from CONTEXT.md MUST NOT appear in plans.** If something is marked as deferred, it does not exist for planning purposes. Do not plan for it, do not create hooks for it, do not "prepare" for it.
26
26
  </role>
@@ -192,7 +192,13 @@ Two plans CONFLICT if their `files_modified` lists overlap. Conflicting plans MU
192
192
  <execution_flow>
193
193
  ## Planning Process
194
194
 
195
- 1. **Load Context**: Read CONTEXT.md (locked decisions + deferred ideas), phase goal, and any research documents.
195
+ 1. **Load Context**: Read locked decisions, phase goal, and any research documents.
196
+ - Read `.planning/PROJECT.md` (if exists) — project scope/out-of-scope constraints
197
+ - Read `.planning/CONTEXT.md` (project-level, if exists) — cross-cutting locked decisions
198
+ - Read `.planning/phases/{NN}-{slug}/CONTEXT.md` (phase-level, if exists) — phase-specific decisions
199
+ - Phase-level CONTEXT.md overrides project-level for conflicting decision areas
200
+ - **For each locked decision found**: embed it directly into the relevant task's `<action>` block.
201
+ Executors NEVER read CONTEXT.md — PLAN.md task actions must be self-contained.
196
202
 
197
203
  ### Handling [NEEDS DECISION] Items
198
204
  When CONTEXT.md or RESEARCH-SUMMARY.md contains `[NEEDS DECISION]` flags from the synthesizer:
@@ -202,7 +208,7 @@ When CONTEXT.md or RESEARCH-SUMMARY.md contains `[NEEDS DECISION]` flags from th
202
208
  2. **Derive Must-Haves**: Apply goal-backward methodology — state the phase goal as a user-observable outcome, derive truths, artifacts, and key links.
203
209
  3. **Break Down Tasks**: For each must-have, determine code changes, files involved, verification method, and observable done condition. Group related work into tasks (2-3 per plan).
204
210
  4. **Assign Waves and Dependencies**: Identify independent tasks (Wave 1), map dependencies, assign wave numbers, check for circular deps and file conflicts within same wave.
205
- 5. **Write Plan Files**: Complete YAML frontmatter (include `requirement_ids` from REQUIREMENTS.md or ROADMAP.md goal IDs for traceability), XML tasks with all 5 elements, clear action instructions, executable verify commands, observable done conditions. Append a `## Summary` section per `references/plan-format.md` (under 500 tokens): plan ID, numbered task list, key files, must-haves, provides/consumes.
211
+ 5. **Write Plan Files**: Complete YAML frontmatter (include `implements` field with REQ-IDs from REQUIREMENTS.md or ROADMAP.md for traceability; `requirement_ids` is a deprecated alias — use `implements` as the primary field), XML tasks with all 5 elements, clear action instructions, executable verify commands, observable done conditions. Append a `## Summary` section per `references/plan-format.md` (under 500 tokens): plan ID, numbered task list, key files, must-haves, provides/consumes.
206
212
  6. **Self-Check** before writing:
207
213
 
208
214
  **CRITICAL — Run the self-check. Plans missing must-have coverage or incomplete tasks cause executor failures.**
@@ -240,7 +246,7 @@ When receiving checker feedback:
240
246
 
241
247
  ## Context Optimization
242
248
 
243
- **Context Fidelity Self-Check**: Before writing plans, verify: (1) every locked decision in CONTEXT.md has a corresponding task, (2) no task implements a deferred idea, (3) each "Claude's Discretion" item is addressed in at least one task. Report: "CONTEXT.md compliance: {M}/{N} locked decisions mapped."
249
+ **Context Fidelity Self-Check**: Before writing plans, verify: (1) every locked decision in BOTH `.planning/CONTEXT.md` (project-level) AND `.planning/phases/{NN}-{slug}/CONTEXT.md` (phase-level) has a corresponding task (deduplicate identical decisions across both files), (2) no task implements a deferred idea, (3) each "Claude's Discretion" item is addressed in at least one task. Report: "CONTEXT.md compliance: {M}/{N} locked decisions mapped."
244
250
 
245
251
  **Frontmatter-First Assembly**: When prior plans exist, read SUMMARY.md frontmatter only (not full body) — 10 frontmatters ~500 tokens vs 10 full SUMMARYs ~5000 tokens. Extract: `provides`, `requires`, `key_files`, `key_decisions`, `patterns`. Only read full body when a specific detail is needed.
246
252
 
@@ -256,7 +262,7 @@ When receiving checker feedback:
256
262
  - [ ] Tasks grouped into plans by wave
257
263
  - [ ] PLAN files exist with XML task structure
258
264
  - [ ] Each plan: frontmatter complete (depends_on, files_modified, must_haves)
259
- - [ ] Each plan: requirement_ids field populated (MUST NOT be empty)
265
+ - [ ] Each plan: implements: field populated (list REQ-IDs; use [] only if phase has no REQUIREMENTS.md)
260
266
  - [ ] Each task: all 5 elements (name, files, action, verify, done)
261
267
  - [ ] Wave structure maximizes parallelism
262
268
  - [ ] Every REQ-ID from ROADMAP/REQUIREMENTS appears in at least one plan
@@ -336,7 +342,7 @@ One-line task descriptions in `<name>`. File paths in `<files>`, not explanation
336
342
  11. DO NOT leave done conditions vague — they must be observable
337
343
  12. DO NOT specify literal `undefined` for parameters that have a known source in the calling context — use data contracts to map sources
338
344
  13. DO NOT use Bash heredoc for file creation — ALWAYS use the Write tool
339
- 14. DO NOT leave requirement_ids empty in PLAN frontmatter — every plan must trace to requirements
345
+ 14. DO NOT leave implements: empty in PLAN frontmatter — use implements: as the primary traceability field (requirement_ids: is deprecated)
340
346
 
341
347
  </anti_patterns>
342
348
 
@@ -74,7 +74,8 @@ Stop and report error if pbr-tools CLI is unavailable. Also read CONTEXT.md for
74
74
  - `artifacts`: Files/exports that must exist, be substantive, and not be stubs
75
75
  - `key_links`: Connections that must be wired between components
76
76
 
77
- If plans lack explicit must-haves, derive them goal-backward from ROADMAP.md: what must be TRUE → what must EXIST → what must be CONNECTED.
77
+ Must-haves in plan frontmatter are canonical use exactly what mustHavesCollect returns.
78
+ Only fall back to goal-backward derivation from ROADMAP.md if ALL plans in the phase have completely empty must_haves sections. Do NOT supplement or re-derive when must_haves are present.
78
79
 
79
80
  Output: A numbered list of every must-have to verify.
80
81
 
@@ -159,6 +160,14 @@ Cross-reference all must-haves against verification results in a table:
159
160
 
160
161
  L4 column shows `-` when no automated verification is available. Only artifacts with test commands or build verification get L4 checks.
161
162
 
163
+ ### Step 7b: Write REQ-ID Traceability (Always)
164
+
165
+ After verifying all must-haves, collect `implements:[]` from all plan frontmatters in the phase.
166
+
167
+ - For each REQ-ID: if all must-haves for that plan passed → add to `satisfied:[]`
168
+ - If any must-have for that plan failed → add to `unsatisfied:[]`
169
+ - Write `satisfied:[]` and `unsatisfied:[]` to the VERIFICATION.md frontmatter
170
+
162
171
  ### Step 8: Scan for Anti-Patterns (Full Verification Only)
163
172
 
164
173
  Scan for: dead code/unused imports, console.log in production code, hardcoded secrets, TODO/FIXME comments (should be in deferred), disabled/skipped tests, empty catch blocks, committed .env files. Report blockers only.
@@ -0,0 +1,7 @@
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
+ skill: profile
5
+ ---
6
+
7
+ This command is provided by the `pbr:profile` skill.
@@ -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 has a default model specified in its agent definition frontmatter (`model:` field). These defaults are overridden by the `models` section of `config.json`.
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 the agent's default `model:` frontmatter field.
143
+ The `subagent_type` parameter automatically loads the agent definition, and the model from `config.json` takes precedence over any agent-level model setting.
@@ -43,9 +43,9 @@ provides:
43
43
  - "requireAuth() middleware"
44
44
  consumes:
45
45
  - "Database connection (from plan 01-01)"
46
- requirement_ids:
47
- - "P02-G1"
48
- - "P02-G2"
46
+ implements:
47
+ - "REQ-F-001"
48
+ - "REQ-F-002"
49
49
  closes_issues:
50
50
  - 42
51
51
  - 57
@@ -71,7 +71,8 @@ closes_issues:
71
71
  | `must_haves.key_links` | YES | array | Connections between components. Append `: grep command` for verification. |
72
72
  | `provides` | NO | array | What this plan exports for other plans to consume (classes, endpoints, modules) |
73
73
  | `consumes` | NO | array | What this plan needs from prior plans. Format: `"Thing (from plan XX-YY)"` |
74
- | `requirement_ids` | NO | array | Requirement IDs from REQUIREMENTS.md or ROADMAP.md goal IDs that this plan addresses. Enables bidirectional traceability between plans and requirements/goals. |
74
+ | `implements` | NO (WARNING if absent) | array | REQ-IDs from REQUIREMENTS.md this plan addresses. Primary traceability field. |
75
+ | `requirement_ids` | NO | array | DEPRECATED — use `implements:` instead. Kept for backward compat. |
75
76
  | `dependency_fingerprints` | NO | object | Hashes of dependency phase SUMMARY.md files at plan-creation time. Used to detect stale plans. |
76
77
  | `data_contracts` | NO | array | Cross-boundary parameter mappings for calls where arguments originate from external boundaries. Format: `"param: source (context) [fallback]"` |
77
78
  | `closes_issues` | NO | number[] | GitHub issue numbers to close when this plan's final commit lands. Default: `[]` |
@@ -162,14 +163,20 @@ The Summary section is generated by the planner agent at plan creation time. It
162
163
  DISCORD_REDIRECT_URI=http://localhost:3000/auth/callback
163
164
  </action>
164
165
  <verify>
165
- npx tsc --noEmit
166
- ls src/auth/discord.ts
167
- ls src/auth/types.ts
166
+ <automated>
167
+ npx tsc --noEmit
168
+ ls src/auth/discord.ts
169
+ ls src/auth/types.ts
170
+ </automated>
168
171
  </verify>
169
172
  <done>Discord OAuth client module exists and compiles without errors</done>
170
173
  </task>
171
174
  ```
172
175
 
176
+ > **Verify block forms**: The `<automated>` wrapper (Option A) is preferred — it enables machine-parsing
177
+ > for `auto_checkpoints` mode. Plain-text verify commands without the wrapper (Option B) remain valid
178
+ > for backward compatibility. Both forms are supported by the executor.
179
+
173
180
  ### TDD Task
174
181
 
175
182
  ```xml
@@ -204,6 +211,33 @@ The Summary section is generated by the planner agent at plan creation time. It
204
211
  </task>
205
212
  ```
206
213
 
214
+ ### Feature Task (TDD Variant)
215
+
216
+ Feature tasks add a `<feature>` element for structured TDD planning. The element contains two required children:
217
+
218
+ - **`<behavior>`** — the observable outcome from the user's perspective. Maps directly to a `must_haves.truths` entry.
219
+ - **`<implementation>`** — the technical approach at a high level (which files, patterns, or algorithms to use).
220
+
221
+ Prose structure (illustrative — not a live task block to avoid validator false-positives):
222
+
223
+ ```
224
+ task id="02-01-T3" type="auto" tdd="true" complexity="medium"
225
+ name: Implement rate limiter for OAuth endpoint
226
+ files: src/middleware/rate-limit.ts / tests/middleware/rate-limit.test.ts
227
+ feature:
228
+ behavior: OAuth endpoint rejects more than 5 requests per minute per IP with HTTP 429
229
+ implementation: Token-bucket algorithm; Redis-backed counter with TTL; express-rate-limit wrapper
230
+ action:
231
+ RED: Write failing tests for 429 response at >5 req/min
232
+ GREEN: Implement token-bucket middleware using Redis
233
+ REFACTOR: Extract counter logic to RateLimitStore class
234
+ verify:
235
+ automated: npm test -- --grep "rate limiter"
236
+ done: Rate limiter rejects excessive OAuth requests with 429
237
+ ```
238
+
239
+ The `<feature>` element is optional — standard TDD tasks without it are still valid. Use `<feature>` when the planner wants to record the behavior/implementation split explicitly for traceability.
240
+
207
241
  ### Checkpoint: Human Verify
208
242
 
209
243
  ```xml
@@ -291,9 +325,13 @@ Every task MUST have ALL 5. No exceptions.
291
325
  | `<name>` | What the task does | Imperative verb phrase. Short. |
292
326
  | `<files>` | Files touched | One per line. Actual file paths. |
293
327
  | `<action>` | How to do it | Numbered steps. Specific. Code snippets for complex work. |
294
- | `<verify>` | How to check | Executable shell commands. Or checkpoint format. |
328
+ | `<verify>` | How to check | Executable shell commands (plain-text or wrapped in `<automated>`). Or checkpoint format. |
295
329
  | `<done>` | How to know it worked | Observable user/system behavior. Maps to a must-have. |
296
330
 
331
+ > **Optional `<feature>` element**: Feature tasks (TDD variant) may add a `<feature>` element with
332
+ > `<behavior>` and `<implementation>` children for structured TDD planning. The 5 standard elements
333
+ > above are still required.
334
+
297
335
  ---
298
336
 
299
337
  ## Task ID Format
@@ -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 `skills/begin/templates/config.json.tmpl`
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 `skills/begin/templates/researcher-prompt.md.tmpl` for the prompt structure.
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 `skills/begin/templates/synthesis-prompt.md.tmpl` for the prompt structure.
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
  ```
@@ -546,11 +546,10 @@ For each category, present the features and ask the user to classify each:
546
546
  - **Out of scope** — Will NOT be built
547
547
 
548
548
  **7d. Assign REQ-IDs:**
549
- For each committed requirement, assign an ID in the format `{CATEGORY}-{NN}`:
550
- - `AUTH-01`: User can log in with Discord OAuth
551
- - `AUTH-02`: Protected routes redirect to login
552
- - `UI-01`: Dashboard shows player statistics
553
- - `UI-02`: Mobile-responsive layout
549
+ For each committed requirement, assign an ID using the REQ-F/REQ-NF schema:
550
+ - Functional requirements: `REQ-F-xxx` numbered sequentially within each category (REQ-F-001, REQ-F-002, ...)
551
+ - Non-functional requirements: `REQ-NF-xxx` numbered sequentially across all NFR categories (REQ-NF-001, REQ-NF-002, ...)
552
+ - Examples: `REQ-F-001: User can log in with Discord OAuth`, `REQ-NF-001: Page loads in <2s on 4G`
554
553
 
555
554
  Each requirement must be:
556
555
  - **User-centric** — describes a capability from the user's perspective
@@ -561,7 +560,7 @@ Each requirement must be:
561
560
 
562
561
  **CRITICAL (no hook): Write REQUIREMENTS.md NOW. The roadmap planner depends on this file.**
563
562
 
564
- Read the template from `skills/begin/templates/REQUIREMENTS.md.tmpl` and write `.planning/REQUIREMENTS.md` with:
563
+ Read the template from `${CLAUDE_SKILL_DIR}/templates/REQUIREMENTS.md.tmpl` and write `.planning/REQUIREMENTS.md` with:
565
564
  - All v1 requirements grouped by category
566
565
  - All v2 requirements with deferral reasons
567
566
  - Out-of-scope items with rationale
@@ -589,7 +588,7 @@ Task({
589
588
 
590
589
  #### Roadmap Prompt Template
591
590
 
592
- Read `skills/begin/templates/roadmap-prompt.md.tmpl` for the prompt structure.
591
+ Read `${CLAUDE_SKILL_DIR}/templates/roadmap-prompt.md.tmpl` for the prompt structure.
593
592
 
594
593
  **Prepend this block to the roadmap planner prompt before sending:**
595
594
  ```
@@ -635,7 +634,7 @@ Write the project state files from templates:
635
634
  **CRITICAL (no hook): Write PROJECT.md NOW. Do NOT skip this step.**
636
635
 
637
636
  **9a. Write PROJECT.md:**
638
- 1. Read `skills/begin/templates/PROJECT.md.tmpl`
637
+ 1. Read `${CLAUDE_SKILL_DIR}/templates/PROJECT.md.tmpl`
639
638
  2. Fill in:
640
639
  - `{project_name}` — from questioning
641
640
  - `{2-3 sentences}` — project description from questioning
@@ -649,7 +648,7 @@ Write the project state files from templates:
649
648
  **CRITICAL (no hook): Write STATE.md NOW. Do NOT skip this step.**
650
649
 
651
650
  **9b. Write STATE.md:**
652
- 1. Read `skills/begin/templates/STATE.md.tmpl`
651
+ 1. Read `${CLAUDE_SKILL_DIR}/templates/STATE.md.tmpl`
653
652
  2. Fill in:
654
653
  - `{date}` — today's date
655
654
  - `{total}` — total phase count from roadmap
@@ -663,28 +662,13 @@ Write the project state files from templates:
663
662
  **CRITICAL (no hook): Write CONTEXT.md NOW. Do NOT skip this step.**
664
663
 
665
664
  **9c. Write CONTEXT.md:**
666
- Create `.planning/CONTEXT.md` from information gathered during questioning:
667
-
668
- ```markdown
669
- # Project Context
670
-
671
- ## Locked Decisions
672
- {Technology choices, architecture decisions, and constraints that are NON-NEGOTIABLE}
673
-
674
- | Decision | Rationale | Locked By |
675
- |----------|-----------|-----------|
676
- | {e.g., "Use TypeScript"} | {User preference, team skill} | User |
677
-
678
- ## User Constraints
679
- {Budget, timeline, skill level, hosting, team size}
680
-
681
- ## Deferred Ideas
682
- {Features explicitly moved to v2 or out-of-scope}
683
-
684
- | Idea | Reason Deferred |
685
- |------|----------------|
686
- | {feature} | {reason} |
687
- ```
665
+ 1. Read `${CLAUDE_SKILL_DIR}/templates/project-CONTEXT.md.tmpl`
666
+ 2. Fill in from the questioning conversation:
667
+ - Locked Decisions: all technology choices and architecture decisions from Step 2
668
+ - User Constraints: budget, timeline, skill level, hosting, team
669
+ - Deferred Ideas: out-of-scope items identified in Step 7c scoping
670
+ - Claude's Discretion: any areas where user said "you decide"
671
+ 3. Write to `.planning/CONTEXT.md`
688
672
 
689
673
  **CRITICAL (no hook): Write HISTORY.md NOW. Do NOT skip this step.**
690
674
 
@@ -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 `skills/build/templates/executor-prompt.md.tmpl` and filling in all `{placeholder}` values:
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 `skills/build/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.
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 `skills/build/templates/continuation-prompt.md.tmpl` and fill in:
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 `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.
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 `skills/debug/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.
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 `skills/debug/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.
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