@sienklogic/plan-build-run 2.0.2 → 2.1.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 (156) hide show
  1. package/dashboard/src/routes/pages.routes.js +11 -4
  2. package/dashboard/src/services/dashboard.service.js +81 -17
  3. package/dashboard/src/services/phase.service.js +30 -24
  4. package/dashboard/src/services/roadmap.service.js +3 -3
  5. package/dashboard/src/views/partials/phase-content.ejs +5 -4
  6. package/package.json +1 -1
  7. package/plugins/cursor-pbr/.cursor-plugin/plugin.json +1 -1
  8. package/plugins/cursor-pbr/CHANGELOG.md +15 -0
  9. package/plugins/cursor-pbr/README.md +118 -0
  10. package/plugins/cursor-pbr/agents/codebase-mapper.md +108 -0
  11. package/plugins/cursor-pbr/agents/debugger.md +168 -0
  12. package/plugins/cursor-pbr/agents/executor.md +236 -0
  13. package/plugins/cursor-pbr/agents/general.md +87 -0
  14. package/plugins/cursor-pbr/agents/integration-checker.md +87 -0
  15. package/plugins/cursor-pbr/agents/plan-checker.md +198 -0
  16. package/plugins/cursor-pbr/agents/planner.md +180 -0
  17. package/plugins/cursor-pbr/agents/researcher.md +162 -0
  18. package/plugins/cursor-pbr/agents/synthesizer.md +101 -0
  19. package/plugins/cursor-pbr/agents/verifier.md +193 -0
  20. package/plugins/cursor-pbr/assets/logo.svg +21 -0
  21. package/plugins/cursor-pbr/hooks/hooks.json +189 -7
  22. package/plugins/cursor-pbr/references/agent-anti-patterns.md +25 -0
  23. package/plugins/cursor-pbr/references/agent-interactions.md +135 -0
  24. package/plugins/cursor-pbr/references/agent-teams.md +55 -0
  25. package/plugins/cursor-pbr/references/checkpoints.md +158 -0
  26. package/plugins/cursor-pbr/references/common-bug-patterns.md +14 -0
  27. package/plugins/cursor-pbr/references/config-reference.md +442 -0
  28. package/plugins/cursor-pbr/references/continuation-format.md +213 -0
  29. package/plugins/cursor-pbr/references/deviation-rules.md +113 -0
  30. package/plugins/cursor-pbr/references/git-integration.md +227 -0
  31. package/plugins/cursor-pbr/references/integration-patterns.md +118 -0
  32. package/plugins/cursor-pbr/references/model-profiles.md +100 -0
  33. package/plugins/cursor-pbr/references/model-selection.md +32 -0
  34. package/plugins/cursor-pbr/references/pbr-rules.md +194 -0
  35. package/plugins/cursor-pbr/references/plan-authoring.md +182 -0
  36. package/plugins/cursor-pbr/references/plan-format.md +288 -0
  37. package/plugins/cursor-pbr/references/planning-config.md +214 -0
  38. package/plugins/cursor-pbr/references/questioning.md +215 -0
  39. package/plugins/cursor-pbr/references/reading-verification.md +128 -0
  40. package/plugins/cursor-pbr/references/stub-patterns.md +161 -0
  41. package/plugins/cursor-pbr/references/subagent-coordination.md +120 -0
  42. package/plugins/cursor-pbr/references/ui-formatting.md +462 -0
  43. package/plugins/cursor-pbr/references/verification-patterns.md +199 -0
  44. package/plugins/cursor-pbr/references/wave-execution.md +96 -0
  45. package/plugins/cursor-pbr/rules/pbr-workflow.mdc +48 -0
  46. package/plugins/cursor-pbr/setup.ps1 +78 -0
  47. package/plugins/cursor-pbr/setup.sh +83 -0
  48. package/plugins/cursor-pbr/skills/begin/SKILL.md +566 -0
  49. package/plugins/cursor-pbr/skills/begin/templates/PROJECT.md.tmpl +34 -0
  50. package/plugins/cursor-pbr/skills/begin/templates/REQUIREMENTS.md.tmpl +19 -0
  51. package/plugins/cursor-pbr/skills/begin/templates/STATE.md.tmpl +50 -0
  52. package/plugins/cursor-pbr/skills/begin/templates/config.json.tmpl +64 -0
  53. package/plugins/cursor-pbr/skills/begin/templates/researcher-prompt.md.tmpl +20 -0
  54. package/plugins/cursor-pbr/skills/begin/templates/roadmap-prompt.md.tmpl +31 -0
  55. package/plugins/cursor-pbr/skills/begin/templates/synthesis-prompt.md.tmpl +17 -0
  56. package/plugins/cursor-pbr/skills/build/SKILL.md +902 -0
  57. package/plugins/cursor-pbr/skills/config/SKILL.md +253 -0
  58. package/plugins/cursor-pbr/skills/continue/SKILL.md +159 -0
  59. package/plugins/cursor-pbr/skills/debug/SKILL.md +512 -0
  60. package/plugins/cursor-pbr/skills/debug/templates/continuation-prompt.md.tmpl +17 -0
  61. package/plugins/cursor-pbr/skills/debug/templates/initial-investigation-prompt.md.tmpl +28 -0
  62. package/plugins/cursor-pbr/skills/discuss/SKILL.md +344 -0
  63. package/plugins/cursor-pbr/skills/discuss/templates/CONTEXT.md.tmpl +62 -0
  64. package/plugins/cursor-pbr/skills/discuss/templates/decision-categories.md +10 -0
  65. package/plugins/cursor-pbr/skills/explore/SKILL.md +375 -0
  66. package/plugins/cursor-pbr/skills/health/SKILL.md +218 -0
  67. package/plugins/cursor-pbr/skills/health/templates/check-pattern.md.tmpl +31 -0
  68. package/plugins/cursor-pbr/skills/health/templates/output-format.md.tmpl +64 -0
  69. package/plugins/cursor-pbr/skills/help/SKILL.md +152 -0
  70. package/plugins/cursor-pbr/skills/import/SKILL.md +499 -0
  71. package/plugins/cursor-pbr/skills/milestone/SKILL.md +701 -0
  72. package/plugins/cursor-pbr/skills/milestone/templates/audit-report.md.tmpl +49 -0
  73. package/plugins/cursor-pbr/skills/milestone/templates/stats-file.md.tmpl +31 -0
  74. package/plugins/cursor-pbr/skills/note/SKILL.md +228 -0
  75. package/plugins/cursor-pbr/skills/pause/SKILL.md +246 -0
  76. package/plugins/cursor-pbr/skills/pause/templates/continue-here.md.tmpl +72 -0
  77. package/plugins/cursor-pbr/skills/plan/SKILL.md +648 -0
  78. package/plugins/cursor-pbr/skills/plan/templates/checker-prompt.md.tmpl +22 -0
  79. package/plugins/cursor-pbr/skills/plan/templates/gap-closure-prompt.md.tmpl +33 -0
  80. package/plugins/cursor-pbr/skills/plan/templates/planner-prompt.md.tmpl +39 -0
  81. package/plugins/cursor-pbr/skills/plan/templates/researcher-prompt.md.tmpl +20 -0
  82. package/plugins/cursor-pbr/skills/plan/templates/revision-prompt.md.tmpl +24 -0
  83. package/plugins/cursor-pbr/skills/quick/SKILL.md +351 -0
  84. package/plugins/cursor-pbr/skills/resume/SKILL.md +399 -0
  85. package/plugins/cursor-pbr/skills/review/SKILL.md +649 -0
  86. package/plugins/cursor-pbr/skills/review/templates/debugger-prompt.md.tmpl +61 -0
  87. package/plugins/cursor-pbr/skills/review/templates/gap-planner-prompt.md.tmpl +41 -0
  88. package/plugins/cursor-pbr/skills/review/templates/verifier-prompt.md.tmpl +116 -0
  89. package/plugins/cursor-pbr/skills/scan/SKILL.md +301 -0
  90. package/plugins/cursor-pbr/skills/scan/templates/mapper-prompt.md.tmpl +202 -0
  91. package/plugins/cursor-pbr/skills/setup/SKILL.md +250 -0
  92. package/plugins/cursor-pbr/skills/shared/commit-planning-docs.md +36 -0
  93. package/plugins/cursor-pbr/skills/shared/config-loading.md +103 -0
  94. package/plugins/cursor-pbr/skills/shared/context-budget.md +41 -0
  95. package/plugins/cursor-pbr/skills/shared/context-loader-task.md +87 -0
  96. package/plugins/cursor-pbr/skills/shared/digest-select.md +80 -0
  97. package/plugins/cursor-pbr/skills/shared/domain-probes.md +126 -0
  98. package/plugins/cursor-pbr/skills/shared/error-reporting.md +80 -0
  99. package/plugins/cursor-pbr/skills/shared/gate-prompts.md +389 -0
  100. package/plugins/cursor-pbr/skills/shared/phase-argument-parsing.md +46 -0
  101. package/plugins/cursor-pbr/skills/shared/progress-display.md +54 -0
  102. package/plugins/cursor-pbr/skills/shared/revision-loop.md +82 -0
  103. package/plugins/cursor-pbr/skills/shared/state-loading.md +63 -0
  104. package/plugins/cursor-pbr/skills/shared/state-update.md +162 -0
  105. package/plugins/cursor-pbr/skills/shared/universal-anti-patterns.md +34 -0
  106. package/plugins/cursor-pbr/skills/status/SKILL.md +362 -0
  107. package/plugins/cursor-pbr/skills/todo/SKILL.md +195 -0
  108. package/plugins/cursor-pbr/templates/CONTEXT.md.tmpl +53 -0
  109. package/plugins/cursor-pbr/templates/INTEGRATION-REPORT.md.tmpl +152 -0
  110. package/plugins/cursor-pbr/templates/RESEARCH-SUMMARY.md.tmpl +98 -0
  111. package/plugins/cursor-pbr/templates/ROADMAP.md.tmpl +41 -0
  112. package/plugins/cursor-pbr/templates/SUMMARY.md.tmpl +82 -0
  113. package/plugins/cursor-pbr/templates/VERIFICATION-DETAIL.md.tmpl +117 -0
  114. package/plugins/cursor-pbr/templates/continue-here.md.tmpl +74 -0
  115. package/plugins/cursor-pbr/templates/prompt-partials/phase-project-context.md.tmpl +38 -0
  116. package/plugins/pbr/agents/codebase-mapper.md +41 -206
  117. package/plugins/pbr/agents/debugger.md +65 -171
  118. package/plugins/pbr/agents/executor.md +90 -275
  119. package/plugins/pbr/agents/general.md +27 -97
  120. package/plugins/pbr/agents/integration-checker.md +35 -112
  121. package/plugins/pbr/agents/plan-checker.md +71 -164
  122. package/plugins/pbr/agents/planner.md +75 -246
  123. package/plugins/pbr/agents/researcher.md +63 -255
  124. package/plugins/pbr/agents/synthesizer.md +49 -174
  125. package/plugins/pbr/agents/verifier.md +75 -366
  126. package/plugins/pbr/hooks/hooks.json +14 -10
  127. package/plugins/pbr/scripts/auto-continue.js +20 -4
  128. package/plugins/pbr/scripts/check-dangerous-commands.js +1 -1
  129. package/plugins/pbr/scripts/check-phase-boundary.js +1 -1
  130. package/plugins/pbr/scripts/check-plan-format.js +3 -3
  131. package/plugins/pbr/scripts/check-roadmap-sync.js +3 -3
  132. package/plugins/pbr/scripts/check-skill-workflow.js +1 -1
  133. package/plugins/pbr/scripts/check-state-sync.js +2 -2
  134. package/plugins/pbr/scripts/check-subagent-output.js +1 -1
  135. package/plugins/pbr/scripts/check-summary-gate.js +198 -0
  136. package/plugins/pbr/scripts/context-budget-check.js +1 -1
  137. package/plugins/pbr/scripts/event-handler.js +2 -2
  138. package/plugins/pbr/scripts/event-logger.js +1 -1
  139. package/plugins/pbr/scripts/log-subagent.js +1 -1
  140. package/plugins/pbr/scripts/pbr-tools.js +1 -1
  141. package/plugins/pbr/scripts/post-write-dispatch.js +1 -1
  142. package/plugins/pbr/scripts/post-write-quality.js +1 -1
  143. package/plugins/pbr/scripts/pre-bash-dispatch.js +1 -1
  144. package/plugins/pbr/scripts/pre-write-dispatch.js +16 -3
  145. package/plugins/pbr/scripts/session-cleanup.js +1 -1
  146. package/plugins/pbr/scripts/status-line.js +1 -1
  147. package/plugins/pbr/scripts/suggest-compact.js +1 -1
  148. package/plugins/pbr/scripts/task-completed.js +1 -1
  149. package/plugins/pbr/scripts/track-context-budget.js +11 -6
  150. package/plugins/pbr/scripts/validate-commit.js +1 -1
  151. package/plugins/pbr/scripts/validate-task.js +1 -1
  152. package/plugins/cursor-pbr/agents/.gitkeep +0 -0
  153. package/plugins/cursor-pbr/references/.gitkeep +0 -0
  154. package/plugins/cursor-pbr/rules/.gitkeep +0 -0
  155. package/plugins/cursor-pbr/skills/.gitkeep +0 -0
  156. package/plugins/cursor-pbr/templates/.gitkeep +0 -0
@@ -0,0 +1,253 @@
1
+ ---
2
+ name: config
3
+ description: "Configure settings: depth, model profiles, features, git, and gates."
4
+ ---
5
+
6
+ ## Step 0 — Immediate Output
7
+
8
+ **Before ANY tool calls**, display this banner:
9
+
10
+ ```
11
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
12
+ PLAN-BUILD-RUN ► CONFIGURATION
13
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
14
+ ```
15
+
16
+ Then proceed to Step 1.
17
+
18
+ # /pbr:config — Configure Plan-Build-Run
19
+
20
+ ## Overview
21
+
22
+ Reads and writes `.planning/config.json`. Interactive configuration with AskUserQuestion.
23
+
24
+ ## References
25
+
26
+ - `references/planning-config.md` — Full config.json schema (54 fields, 16 feature toggles, validation rules)
27
+ - `references/model-profiles.md` — Model selection guide for agent spawning
28
+
29
+ ## Flow
30
+
31
+ ### 1. Load Current Config
32
+
33
+ Read `.planning/config.json`. If it doesn't exist, display:
34
+ ```
35
+ ╔══════════════════════════════════════════════════════════════╗
36
+ ║ ERROR ║
37
+ ╚══════════════════════════════════════════════════════════════╝
38
+
39
+ No Plan-Build-Run project found.
40
+
41
+ **To fix:** Run `/pbr:begin` first.
42
+ ```
43
+
44
+ ### 2. Parse Arguments
45
+
46
+ If `$ARGUMENTS` is provided, handle direct setting:
47
+ - `depth quick|standard|comprehensive` — set depth directly
48
+ - `model <agent> <model>` — set model for specific agent (e.g., `model executor sonnet`)
49
+ - `model-profile quality|balanced|budget|adaptive` — set all models at once using a preset
50
+ - `gate <gate-name> on|off` — toggle a gate
51
+ - `feature <feature-name> on|off` — toggle a feature (e.g., `feature auto_continue on`). When the user specifies a feature name without the `features.` prefix, automatically prepend `features.` before writing to config.
52
+ - `git branching none|phase|milestone|disabled` — set branching strategy
53
+ - `git mode disabled` — disable git integration entirely
54
+ - `show` — display current config (default when no args)
55
+
56
+ ### 3. Interactive Mode (no arguments or just `show`)
57
+
58
+ Display current configuration in a readable format:
59
+
60
+ ```
61
+ Plan-Build-Run Configuration
62
+ =====================
63
+
64
+ Workflow:
65
+ Depth: standard (balanced)
66
+ Research: on Plan-check: on Verify: on
67
+ Scan mappers: 4 Debug rounds: 5 Inline verify: off
68
+ Mode: interactive
69
+ Context Strategy: aggressive
70
+
71
+ Features:
72
+ ✓ Structured planning ✓ Goal verification
73
+ ✓ Context isolation ✓ Atomic commits
74
+ ✓ Session persistence ✓ Research phase
75
+ ✓ Plan checking ✗ TDD mode
76
+ ✓ Status line ✗ Auto-continue
77
+ ✗ Auto-advance ✗ Team discussions
78
+
79
+ Models:
80
+ Researcher: sonnet Planner: inherit Executor: inherit
81
+ Verifier: sonnet Int-Checker: sonnet Debugger: inherit
82
+ Mapper: sonnet Synthesizer: haiku
83
+
84
+ Parallelization:
85
+ Enabled: true Max concurrent: 3
86
+ Plan-level: true Task-level: false
87
+ Use Teams: false
88
+
89
+ Git:
90
+ Mode: enabled Branching: none
91
+ Commit docs: true
92
+ Commit format: {type}({phase}-{plan}): {description}
93
+
94
+ Gates:
95
+ ✓ Confirm project ✓ Confirm roadmap ✓ Confirm plan
96
+ ✗ Confirm execute ✓ Confirm transition ✓ Issues review
97
+
98
+ Status Line:
99
+ Sections: [phase, plan, status, context]
100
+ Brand: PLAN-BUILD-RUN
101
+ Context bar: 20 chars, green<50%, yellow<80%
102
+
103
+ Spinner Tips: (none configured — using defaults)
104
+ ```
105
+
106
+ Then present the configuration menu using the **settings-category-select** pattern (see `skills/shared/gate-prompts.md`):
107
+
108
+ Use AskUserQuestion:
109
+ question: "What would you like to configure?"
110
+ header: "Configure"
111
+ options:
112
+ - label: "Depth" description: "quick/standard/comprehensive"
113
+ - label: "Model profile" description: "quality/balanced/budget/adaptive"
114
+ - label: "Features" description: "Toggle workflow features, gates, status line"
115
+ - label: "Git settings" description: "branching strategy, commit mode"
116
+ multiSelect: false
117
+
118
+ Note: The original 7 categories are condensed to 4. "Models" (per-agent) is accessible through "Model profile" with a follow-up option. "Gates", "Parallelization", and "Status Line" are grouped under "Features".
119
+
120
+ **Follow-up based on selection:**
121
+
122
+ If user selects "Depth":
123
+ Use AskUserQuestion:
124
+ question: "Select workflow depth"
125
+ header: "Depth"
126
+ options:
127
+ - label: "Quick" description: "Budget mode: skip research/plan-check/verifier, 2 scan mappers, ~1-3 fewer spawns per phase"
128
+ - label: "Standard" description: "Balanced mode: conditional research, full plan-check and verification, 4 scan mappers (default)"
129
+ - label: "Comprehensive" description: "Thorough mode: always research, always verify, inline verification, 4 scan mappers"
130
+ multiSelect: false
131
+
132
+ After setting depth, the profile is automatically resolved. Show the user the effective settings:
133
+ "Depth set to {value}. Effective profile:"
134
+ Then display the profile summary (research, plan-check, verify, scan mappers, debug rounds, inline verify).
135
+
136
+ To resolve the profile, run: `node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js config resolve-depth`
137
+
138
+ If the user wants to override a specific profile setting, they can set `depth_profiles.{depth}.{key}` directly.
139
+ For example: to use quick mode but keep plan-checking, the user would set depth to quick and then override:
140
+ `/pbr:config` -> Features -> Plan checking -> Enable
141
+ This writes `depth_profiles.quick.features.plan_checking: true` to config.json.
142
+
143
+ If user selects "Model profile":
144
+ Use the **model-profile-select** pattern:
145
+ Use AskUserQuestion:
146
+ question: "Select model profile"
147
+ header: "Profile"
148
+ options:
149
+ - label: "Quality" description: "opus for all agents (highest cost)"
150
+ - label: "Balanced" description: "sonnet/inherit mix (default)"
151
+ - label: "Budget" description: "haiku for all agents (lowest cost)"
152
+ - label: "Adaptive" description: "sonnet planning, haiku execution"
153
+ multiSelect: false
154
+
155
+ If user asks for per-agent model selection (typed "models" or "per-agent"), present individual agent selection as plain text: list the agents and ask which one to change, then ask for the model. This is a freeform flow because agent names are dynamic.
156
+
157
+ If user selects "Features":
158
+ List all features and gates with current status, then use the **toggle-confirm** pattern for each change.
159
+ **Feature name normalization:** When toggling a feature, if the user specifies a bare name (e.g., `inline_verify`), normalize it to `features.inline_verify` before writing to config. All feature flags live under the `features.*` namespace in config.json.
160
+ Use AskUserQuestion:
161
+ question: "Enable {feature_name}?"
162
+ header: "Toggle"
163
+ options:
164
+ - label: "Enable" description: "Turn this feature on"
165
+ - label: "Disable" description: "Turn this feature off"
166
+ multiSelect: false
167
+
168
+ Repeat for each feature the user wants to change. Show updated status after each toggle.
169
+
170
+ If user selects "Git settings":
171
+ Use AskUserQuestion:
172
+ question: "Select branching strategy"
173
+ header: "Branching"
174
+ options:
175
+ - label: "None" description: "All work on current branch"
176
+ - label: "Phase" description: "New branch per phase"
177
+ - label: "Milestone" description: "New branch per milestone"
178
+ - label: "Disabled" description: "No git integration"
179
+ multiSelect: false
180
+
181
+ If user types something else (freeform): interpret as a direct setting command and handle via Step 2 argument parsing logic.
182
+
183
+ ### 4. Apply Changes
184
+
185
+ Update config.json with new values. Show what changed with a branded completion:
186
+ ```
187
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
188
+ PLAN-BUILD-RUN ► CONFIG UPDATED ✓
189
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
190
+
191
+ Updated:
192
+ depth: standard → quick
193
+ models.executor: inherit → sonnet
194
+
195
+ ───────────────────────────────────────────────────────────────
196
+
197
+ ## ▶ Next Up
198
+
199
+ **Continue your workflow** — settings saved
200
+
201
+ `/pbr:status`
202
+
203
+ <sub>`/clear` first → fresh context window</sub>
204
+
205
+ ───────────────────────────────────────────────────────────────
206
+
207
+ **Also available:**
208
+ - `/pbr:continue` — execute next logical step
209
+ - `/pbr:config` — change more settings
210
+
211
+ ───────────────────────────────────────────────────────────────
212
+ ```
213
+
214
+ ## Config Schema
215
+
216
+ See `skills/begin/templates/config.json.tmpl` for the full schema with defaults.
217
+
218
+ ### Version Migration
219
+
220
+ If config `version` is older than current (2), run migration:
221
+ - v1 → v2: Add missing fields with defaults, rename `model_profile` → per-agent `models` object
222
+
223
+ ## Model Profile Presets
224
+
225
+ The `model-profile` command sets all agent models at once:
226
+
227
+ | Profile | researcher | planner | executor | verifier | int-checker | debugger | mapper | synthesizer |
228
+ |---------|-----------|---------|----------|----------|-------------|----------|--------|-------------|
229
+ | `quality` | opus | opus | opus | opus | sonnet | opus | sonnet | sonnet |
230
+ | `balanced` | sonnet | inherit | inherit | sonnet | sonnet | inherit | sonnet | haiku |
231
+ | `budget` | haiku | haiku | haiku | haiku | haiku | haiku | haiku | haiku |
232
+ | `adaptive` | sonnet | sonnet | inherit | sonnet | haiku | inherit | haiku | haiku |
233
+
234
+ `balanced` is the default and matches the initial config template. `adaptive` front-loads intelligence in research/planning and uses lighter models for mechanical work.
235
+
236
+ ## Feature Reference
237
+
238
+ | Feature | Key | Default | Description |
239
+ |---------|-----|---------|-------------|
240
+ | Auto-continue | `features.auto_continue` | `false` | Automatically spawn continuation agents without user prompt |
241
+ | Auto-advance | `features.auto_advance` | `false` | Chain build→review→plan automatically in autonomous mode |
242
+ | Team discussions | `features.team_discussions` | `false` | Enable team-based discussion workflows |
243
+
244
+ **Team boundaries**: Teams are NEVER used for execution, planning, or verification. Teams are only for discussion and brainstorming workflows. All execution, planning, and verification use single-agent Task() spawns with proper subagent types.
245
+
246
+ ## Validation
247
+
248
+ - `depth` must be one of: quick, standard, comprehensive
249
+ - `models.*` must be one of: sonnet, inherit, haiku, opus
250
+ - `context_strategy` must be one of: aggressive, balanced, minimal
251
+ - `git.branching` must be one of: none, phase, milestone, disabled
252
+ - `git.mode` must be one of: enabled, disabled. When `disabled`, no git commands are run (no commits, no branching). Useful for prototyping or non-git projects.
253
+ - Boolean fields must be true/false
@@ -0,0 +1,159 @@
1
+ ---
2
+ name: continue
3
+ description: "Execute the next logical step automatically. No prompts, no decisions — just do it."
4
+ ---
5
+
6
+ # /pbr:continue — Action-Oriented Resumption
7
+
8
+ You are running the **continue** skill. Unlike `/pbr:resume` which shows status and suggests actions, `/pbr:continue` determines and EXECUTES the next logical step automatically.
9
+
10
+ This skill runs **inline** and may delegate to other skills via agent invocation.
11
+
12
+ ---
13
+
14
+ ## Step 0 — Immediate Output
15
+
16
+ **Before ANY tool calls**, display this banner:
17
+
18
+ ```
19
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
20
+ PLAN-BUILD-RUN ► NEXT STEP
21
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
22
+ ```
23
+
24
+ Then proceed to Step 1.
25
+
26
+ ## Context Budget
27
+
28
+ Reference: `skills/shared/context-budget.md` for the universal orchestrator rules.
29
+
30
+ Additionally for this skill:
31
+ - **Minimize** state reads — read only STATE.md lines 1-20 to determine next action
32
+ - **Delegate** execution to the appropriate skill
33
+
34
+ ---
35
+
36
+ ## Core Principle
37
+
38
+ **Do, don't ask.** Read STATE.md, determine the next action, and execute it. The user wants hands-off forward progress.
39
+
40
+ ---
41
+
42
+ ## Flow
43
+
44
+ ### Step 1: Read State
45
+
46
+ Read `.planning/STATE.md` and determine current position:
47
+ - Current phase number and name
48
+ - Current plan progress
49
+ - Phase status (planning, building, reviewing, complete)
50
+
51
+ If STATE.md doesn't exist, display:
52
+ ```
53
+ ERROR
54
+
55
+ No project state found.
56
+
57
+ **To fix:** Run `/pbr:begin` first.
58
+ ```
59
+
60
+ #### Context Budget Guard
61
+
62
+ Before proceeding to priority evaluation, check for runaway continue chains:
63
+
64
+ 1. Read `last_command` from STATE.md. **If `last_command` is missing, empty, or the field does not exist, skip directly to the fallback detection** — do NOT error or warn.
65
+ 2. If `last_command` is present and equals `/pbr:continue`, this is a chained continue. Check session context for consecutive `/pbr:continue` invocations.
66
+ 3. **Fallback detection** — if `last_command` is not available or not present in STATE.md:
67
+ - Check `.planning/.active-skill` file — if it contains `continue`, treat as a chained continue
68
+ - Check STATE.md `last_action` field — if it contains `continue`, treat as a chained continue
69
+ - If neither source is available, assume this is the first invocation (do not warn)
70
+ 4. **If this is the 3rd consecutive `/pbr:continue` in a row**, display:
71
+
72
+ ```
73
+ WARNING: Context budget warning: 3 consecutive auto-continues detected.
74
+ Recommend running /pbr:pause then resuming in a fresh session.
75
+ ```
76
+
77
+ Then present the user with a choice:
78
+ - **"Continue"** — proceed with the next action
79
+ - **"Pause"** — run `/pbr:pause` logic to save state and stop
80
+
81
+ This prevents runaway chains that fill the context window without a human checkpoint.
82
+
83
+ ### Step 2: Scan for Priority Items
84
+
85
+ Check the resumption priority hierarchy (same as /pbr:resume):
86
+
87
+ 1. **UAT Blockers**: VERIFICATION.md with `status: gaps_found` -> Execute `/pbr:plan {N} --gaps`
88
+ 2. **Checkpoint pending**: `.checkpoint-manifest.json` with pending items -> Resume the build
89
+ 3. **Continue-here file**: `.continue-here.md` exists -> Follow its next step
90
+ 4. **Incomplete build**: PLAN.md files without SUMMARY.md -> Execute `/pbr:build {N}`
91
+ 5. **Unverified phase**: All plans complete, no VERIFICATION.md -> Execute `/pbr:review {N}`
92
+ 6. **Phase complete, more phases exist**: Verification passed -> Execute `/pbr:plan {N+1}`
93
+ 7. **All phases complete**: Verification passed on final phase, no more phases in ROADMAP.md -> Stop. Display: "All phases are complete. Run `/pbr:milestone audit` to verify cross-phase integration, or `/pbr:milestone complete` to archive this milestone."
94
+
95
+ ### Step 3: Execute
96
+
97
+ Based on the determined action, display the delegation indicator to the user:
98
+ ```
99
+ Delegating to /pbr:{skill} {args}...
100
+ ```
101
+
102
+ Then invoke the appropriate skill. **NEVER read SKILL.md files into your context** — this wastes the main context budget with 500+ lines of instructions. Instead, invoke the skill directly:
103
+
104
+ | Situation | Action | Skill to invoke |
105
+ |-----------|--------|-----|
106
+ | Gaps need closure | Plan gap closure | `/pbr:plan {N} --gaps` |
107
+ | Build incomplete | Continue build | `/pbr:build {N}` |
108
+ | Review needed | Run review | `/pbr:review {N}` |
109
+ | Next phase needed | Plan next phase | `/pbr:plan {N+1}` |
110
+ | Project not started | Plan phase 1 | `/pbr:plan 1` |
111
+
112
+ Where `{N}` is the current phase number determined from STATE.md in Step 1.
113
+
114
+ ### Step 4: Report and Chain
115
+
116
+ After execution completes, display a branded completion:
117
+ ```
118
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
119
+ PLAN-BUILD-RUN ► STEP COMPLETE
120
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
121
+
122
+ Completed: {what was done}
123
+
124
+ ---
125
+
126
+ ## Next Up
127
+
128
+ **{Next action description}**
129
+
130
+ `/pbr:continue` or `{specific command}`
131
+
132
+ ---
133
+ ```
134
+
135
+ **If `features.auto_advance` is `true` AND `mode` is `autonomous`:**
136
+ After the delegated skill completes, immediately re-run Step 1-3 to determine and execute the NEXT action. Continue chaining until a hard stop is reached. This enables hands-free phase cycling: build->review->plan->build->...
137
+
138
+ ---
139
+
140
+ ## Hard Stops
141
+
142
+ Do NOT auto-continue when:
143
+ - `config.mode` is NOT `autonomous` and a gate confirmation is needed
144
+ - A checkpoint requires human input (decision, verify, action)
145
+ - An error occurred during execution
146
+ - The milestone is complete
147
+ - Verification found gaps (need user review before advancing)
148
+
149
+ In these cases, explain why auto-continue stopped and what the user needs to do.
150
+
151
+ ---
152
+
153
+ ## Anti-Patterns
154
+
155
+ 1. **DO NOT** ask the user what to do — determine it from state
156
+ 2. **DO NOT** skip error handling — if something fails, stop and report
157
+ 3. **DO NOT** continue past checkpoints that need human input
158
+ 4. **DO NOT** auto-continue into a new milestone — that needs user initiation
159
+ 5. **DO NOT** modify STATE.md directly — let the delegated skill handle it