@sienklogic/plan-build-run 2.0.0 → 2.0.1

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 (225) hide show
  1. package/CHANGELOG.md +56 -56
  2. package/CLAUDE.md +149 -149
  3. package/LICENSE +21 -21
  4. package/README.md +247 -247
  5. package/dashboard/bin/cli.js +25 -25
  6. package/dashboard/package.json +34 -34
  7. package/dashboard/public/css/layout.css +406 -406
  8. package/dashboard/public/css/status-colors.css +98 -98
  9. package/dashboard/public/js/htmx-title.js +5 -5
  10. package/dashboard/public/js/sidebar-toggle.js +20 -20
  11. package/dashboard/src/app.js +78 -78
  12. package/dashboard/src/middleware/errorHandler.js +52 -52
  13. package/dashboard/src/middleware/notFoundHandler.js +9 -9
  14. package/dashboard/src/repositories/planning.repository.js +128 -128
  15. package/dashboard/src/routes/events.routes.js +40 -40
  16. package/dashboard/src/routes/index.routes.js +31 -31
  17. package/dashboard/src/routes/pages.routes.js +245 -195
  18. package/dashboard/src/server.js +42 -42
  19. package/dashboard/src/services/dashboard.service.js +222 -222
  20. package/dashboard/src/services/phase.service.js +220 -167
  21. package/dashboard/src/services/project.service.js +57 -57
  22. package/dashboard/src/services/roadmap.service.js +171 -171
  23. package/dashboard/src/services/sse.service.js +58 -58
  24. package/dashboard/src/services/todo.service.js +254 -254
  25. package/dashboard/src/services/watcher.service.js +48 -48
  26. package/dashboard/src/views/coming-soon.ejs +11 -11
  27. package/dashboard/src/views/error.ejs +13 -13
  28. package/dashboard/src/views/index.ejs +5 -5
  29. package/dashboard/src/views/layout.ejs +1 -1
  30. package/dashboard/src/views/partials/dashboard-content.ejs +77 -77
  31. package/dashboard/src/views/partials/footer.ejs +3 -3
  32. package/dashboard/src/views/partials/head.ejs +21 -21
  33. package/dashboard/src/views/partials/header.ejs +12 -12
  34. package/dashboard/src/views/partials/layout-bottom.ejs +15 -15
  35. package/dashboard/src/views/partials/layout-top.ejs +8 -8
  36. package/dashboard/src/views/partials/phase-content.ejs +188 -181
  37. package/dashboard/src/views/partials/phase-doc-content.ejs +38 -0
  38. package/dashboard/src/views/partials/phases-content.ejs +117 -117
  39. package/dashboard/src/views/partials/roadmap-content.ejs +142 -142
  40. package/dashboard/src/views/partials/sidebar.ejs +38 -38
  41. package/dashboard/src/views/partials/todo-create-content.ejs +53 -53
  42. package/dashboard/src/views/partials/todo-detail-content.ejs +38 -38
  43. package/dashboard/src/views/partials/todos-content.ejs +53 -53
  44. package/dashboard/src/views/phase-detail.ejs +5 -5
  45. package/dashboard/src/views/phase-doc.ejs +5 -0
  46. package/dashboard/src/views/phases.ejs +5 -5
  47. package/dashboard/src/views/roadmap.ejs +5 -5
  48. package/dashboard/src/views/todo-create.ejs +5 -5
  49. package/dashboard/src/views/todo-detail.ejs +5 -5
  50. package/dashboard/src/views/todos.ejs +5 -5
  51. package/package.json +57 -57
  52. package/plugins/pbr/.claude-plugin/plugin.json +13 -13
  53. package/plugins/pbr/UI-CONSISTENCY-GAPS.md +61 -61
  54. package/plugins/pbr/agents/codebase-mapper.md +279 -271
  55. package/plugins/pbr/agents/debugger.md +281 -281
  56. package/plugins/pbr/agents/executor.md +428 -407
  57. package/plugins/pbr/agents/general.md +164 -164
  58. package/plugins/pbr/agents/integration-checker.md +169 -141
  59. package/plugins/pbr/agents/plan-checker.md +296 -280
  60. package/plugins/pbr/agents/planner.md +358 -358
  61. package/plugins/pbr/agents/researcher.md +363 -363
  62. package/plugins/pbr/agents/synthesizer.md +230 -230
  63. package/plugins/pbr/agents/verifier.md +489 -454
  64. package/plugins/pbr/commands/begin.md +5 -5
  65. package/plugins/pbr/commands/build.md +5 -5
  66. package/plugins/pbr/commands/config.md +5 -5
  67. package/plugins/pbr/commands/continue.md +5 -5
  68. package/plugins/pbr/commands/debug.md +5 -5
  69. package/plugins/pbr/commands/discuss.md +5 -5
  70. package/plugins/pbr/commands/explore.md +5 -5
  71. package/plugins/pbr/commands/health.md +5 -5
  72. package/plugins/pbr/commands/help.md +5 -5
  73. package/plugins/pbr/commands/import.md +5 -5
  74. package/plugins/pbr/commands/milestone.md +5 -5
  75. package/plugins/pbr/commands/note.md +5 -5
  76. package/plugins/pbr/commands/pause.md +5 -5
  77. package/plugins/pbr/commands/plan.md +5 -5
  78. package/plugins/pbr/commands/quick.md +5 -5
  79. package/plugins/pbr/commands/resume.md +5 -5
  80. package/plugins/pbr/commands/review.md +5 -5
  81. package/plugins/pbr/commands/scan.md +5 -5
  82. package/plugins/pbr/commands/setup.md +5 -5
  83. package/plugins/pbr/commands/status.md +5 -5
  84. package/plugins/pbr/commands/todo.md +5 -5
  85. package/plugins/pbr/contexts/dev.md +27 -27
  86. package/plugins/pbr/contexts/research.md +28 -28
  87. package/plugins/pbr/contexts/review.md +36 -36
  88. package/plugins/pbr/hooks/hooks.json +183 -183
  89. package/plugins/pbr/references/agent-anti-patterns.md +24 -24
  90. package/plugins/pbr/references/agent-interactions.md +134 -134
  91. package/plugins/pbr/references/agent-teams.md +54 -54
  92. package/plugins/pbr/references/checkpoints.md +157 -157
  93. package/plugins/pbr/references/common-bug-patterns.md +13 -13
  94. package/plugins/pbr/references/config-reference.md +441 -0
  95. package/plugins/pbr/references/continuation-format.md +212 -212
  96. package/plugins/pbr/references/deviation-rules.md +112 -112
  97. package/plugins/pbr/references/git-integration.md +226 -226
  98. package/plugins/pbr/references/integration-patterns.md +117 -117
  99. package/plugins/pbr/references/model-profiles.md +99 -99
  100. package/plugins/pbr/references/model-selection.md +31 -31
  101. package/plugins/pbr/references/pbr-rules.md +193 -193
  102. package/plugins/pbr/references/plan-authoring.md +181 -181
  103. package/plugins/pbr/references/plan-format.md +287 -283
  104. package/plugins/pbr/references/planning-config.md +213 -213
  105. package/plugins/pbr/references/questioning.md +214 -214
  106. package/plugins/pbr/references/reading-verification.md +127 -127
  107. package/plugins/pbr/references/stub-patterns.md +160 -160
  108. package/plugins/pbr/references/subagent-coordination.md +119 -119
  109. package/plugins/pbr/references/ui-formatting.md +461 -399
  110. package/plugins/pbr/references/verification-patterns.md +198 -198
  111. package/plugins/pbr/references/wave-execution.md +95 -95
  112. package/plugins/pbr/scripts/auto-continue.js +80 -80
  113. package/plugins/pbr/scripts/check-dangerous-commands.js +136 -136
  114. package/plugins/pbr/scripts/check-doc-sprawl.js +102 -102
  115. package/plugins/pbr/scripts/check-phase-boundary.js +196 -196
  116. package/plugins/pbr/scripts/check-plan-format.js +270 -270
  117. package/plugins/pbr/scripts/check-roadmap-sync.js +322 -252
  118. package/plugins/pbr/scripts/check-skill-workflow.js +262 -262
  119. package/plugins/pbr/scripts/check-state-sync.js +476 -476
  120. package/plugins/pbr/scripts/check-subagent-output.js +144 -144
  121. package/plugins/pbr/scripts/config-schema.json +251 -251
  122. package/plugins/pbr/scripts/context-budget-check.js +287 -287
  123. package/plugins/pbr/scripts/event-handler.js +151 -151
  124. package/plugins/pbr/scripts/event-logger.js +92 -92
  125. package/plugins/pbr/scripts/hook-logger.js +80 -76
  126. package/plugins/pbr/scripts/hooks-schema.json +79 -79
  127. package/plugins/pbr/scripts/log-subagent.js +164 -152
  128. package/plugins/pbr/scripts/log-tool-failure.js +88 -88
  129. package/plugins/pbr/scripts/pbr-tools.js +1378 -1301
  130. package/plugins/pbr/scripts/post-write-dispatch.js +66 -66
  131. package/plugins/pbr/scripts/post-write-quality.js +207 -207
  132. package/plugins/pbr/scripts/pre-bash-dispatch.js +86 -56
  133. package/plugins/pbr/scripts/pre-write-dispatch.js +97 -62
  134. package/plugins/pbr/scripts/progress-tracker.js +281 -228
  135. package/plugins/pbr/scripts/run-hook.js +92 -0
  136. package/plugins/pbr/scripts/session-cleanup.js +254 -254
  137. package/plugins/pbr/scripts/status-line.js +288 -285
  138. package/plugins/pbr/scripts/suggest-compact.js +119 -119
  139. package/plugins/pbr/scripts/task-completed.js +45 -45
  140. package/plugins/pbr/scripts/track-context-budget.js +149 -119
  141. package/plugins/pbr/scripts/validate-commit.js +200 -200
  142. package/plugins/pbr/scripts/validate-plugin-structure.js +183 -172
  143. package/plugins/pbr/scripts/validate-task.js +106 -0
  144. package/plugins/pbr/skills/begin/SKILL.md +594 -545
  145. package/plugins/pbr/skills/begin/templates/PROJECT.md.tmpl +33 -33
  146. package/plugins/pbr/skills/begin/templates/REQUIREMENTS.md.tmpl +18 -18
  147. package/plugins/pbr/skills/begin/templates/STATE.md.tmpl +49 -49
  148. package/plugins/pbr/skills/begin/templates/config.json.tmpl +64 -63
  149. package/plugins/pbr/skills/begin/templates/researcher-prompt.md.tmpl +19 -19
  150. package/plugins/pbr/skills/begin/templates/roadmap-prompt.md.tmpl +30 -30
  151. package/plugins/pbr/skills/begin/templates/synthesis-prompt.md.tmpl +16 -16
  152. package/plugins/pbr/skills/build/SKILL.md +943 -962
  153. package/plugins/pbr/skills/config/SKILL.md +256 -241
  154. package/plugins/pbr/skills/continue/SKILL.md +164 -127
  155. package/plugins/pbr/skills/debug/SKILL.md +515 -489
  156. package/plugins/pbr/skills/debug/templates/continuation-prompt.md.tmpl +16 -16
  157. package/plugins/pbr/skills/debug/templates/initial-investigation-prompt.md.tmpl +27 -27
  158. package/plugins/pbr/skills/discuss/SKILL.md +347 -338
  159. package/plugins/pbr/skills/discuss/templates/CONTEXT.md.tmpl +61 -61
  160. package/plugins/pbr/skills/discuss/templates/decision-categories.md +9 -9
  161. package/plugins/pbr/skills/explore/SKILL.md +378 -362
  162. package/plugins/pbr/skills/health/SKILL.md +221 -186
  163. package/plugins/pbr/skills/health/templates/check-pattern.md.tmpl +30 -30
  164. package/plugins/pbr/skills/health/templates/output-format.md.tmpl +63 -63
  165. package/plugins/pbr/skills/help/SKILL.md +155 -140
  166. package/plugins/pbr/skills/import/SKILL.md +504 -490
  167. package/plugins/pbr/skills/milestone/SKILL.md +704 -673
  168. package/plugins/pbr/skills/milestone/templates/audit-report.md.tmpl +48 -48
  169. package/plugins/pbr/skills/milestone/templates/stats-file.md.tmpl +30 -30
  170. package/plugins/pbr/skills/note/SKILL.md +231 -212
  171. package/plugins/pbr/skills/pause/SKILL.md +249 -235
  172. package/plugins/pbr/skills/pause/templates/continue-here.md.tmpl +71 -71
  173. package/plugins/pbr/skills/plan/SKILL.md +685 -628
  174. package/plugins/pbr/skills/plan/decimal-phase-calc.md +98 -98
  175. package/plugins/pbr/skills/plan/templates/checker-prompt.md.tmpl +21 -21
  176. package/plugins/pbr/skills/plan/templates/gap-closure-prompt.md.tmpl +32 -32
  177. package/plugins/pbr/skills/plan/templates/planner-prompt.md.tmpl +38 -38
  178. package/plugins/pbr/skills/plan/templates/researcher-prompt.md.tmpl +19 -19
  179. package/plugins/pbr/skills/plan/templates/revision-prompt.md.tmpl +23 -23
  180. package/plugins/pbr/skills/quick/SKILL.md +354 -335
  181. package/plugins/pbr/skills/resume/SKILL.md +402 -388
  182. package/plugins/pbr/skills/review/SKILL.md +686 -652
  183. package/plugins/pbr/skills/review/templates/debugger-prompt.md.tmpl +60 -60
  184. package/plugins/pbr/skills/review/templates/gap-planner-prompt.md.tmpl +40 -40
  185. package/plugins/pbr/skills/review/templates/verifier-prompt.md.tmpl +115 -115
  186. package/plugins/pbr/skills/scan/SKILL.md +304 -269
  187. package/plugins/pbr/skills/scan/templates/mapper-prompt.md.tmpl +201 -201
  188. package/plugins/pbr/skills/setup/SKILL.md +253 -227
  189. package/plugins/pbr/skills/shared/commit-planning-docs.md +35 -35
  190. package/plugins/pbr/skills/shared/config-loading.md +102 -102
  191. package/plugins/pbr/skills/shared/context-budget.md +40 -40
  192. package/plugins/pbr/skills/shared/context-loader-task.md +86 -86
  193. package/plugins/pbr/skills/shared/digest-select.md +79 -79
  194. package/plugins/pbr/skills/shared/domain-probes.md +125 -125
  195. package/plugins/pbr/skills/shared/error-reporting.md +79 -79
  196. package/plugins/pbr/skills/shared/gate-prompts.md +388 -388
  197. package/plugins/pbr/skills/shared/phase-argument-parsing.md +45 -45
  198. package/plugins/pbr/skills/shared/progress-display.md +53 -53
  199. package/plugins/pbr/skills/shared/revision-loop.md +81 -81
  200. package/plugins/pbr/skills/shared/state-loading.md +62 -62
  201. package/plugins/pbr/skills/shared/state-update.md +161 -161
  202. package/plugins/pbr/skills/shared/universal-anti-patterns.md +33 -33
  203. package/plugins/pbr/skills/status/SKILL.md +367 -353
  204. package/plugins/pbr/skills/todo/SKILL.md +198 -181
  205. package/plugins/pbr/templates/CONTEXT.md.tmpl +52 -52
  206. package/plugins/pbr/templates/INTEGRATION-REPORT.md.tmpl +151 -151
  207. package/plugins/pbr/templates/RESEARCH-SUMMARY.md.tmpl +97 -97
  208. package/plugins/pbr/templates/ROADMAP.md.tmpl +40 -40
  209. package/plugins/pbr/templates/SUMMARY.md.tmpl +81 -81
  210. package/plugins/pbr/templates/VERIFICATION-DETAIL.md.tmpl +116 -116
  211. package/plugins/pbr/templates/codebase/ARCHITECTURE.md.tmpl +98 -98
  212. package/plugins/pbr/templates/codebase/CONCERNS.md.tmpl +93 -93
  213. package/plugins/pbr/templates/codebase/CONVENTIONS.md.tmpl +104 -104
  214. package/plugins/pbr/templates/codebase/INTEGRATIONS.md.tmpl +78 -78
  215. package/plugins/pbr/templates/codebase/STACK.md.tmpl +78 -78
  216. package/plugins/pbr/templates/codebase/STRUCTURE.md.tmpl +80 -80
  217. package/plugins/pbr/templates/codebase/TESTING.md.tmpl +107 -107
  218. package/plugins/pbr/templates/continue-here.md.tmpl +73 -73
  219. package/plugins/pbr/templates/prompt-partials/phase-project-context.md.tmpl +37 -37
  220. package/plugins/pbr/templates/research/ARCHITECTURE.md.tmpl +124 -124
  221. package/plugins/pbr/templates/research/STACK.md.tmpl +71 -71
  222. package/plugins/pbr/templates/research/SUMMARY.md.tmpl +112 -112
  223. package/plugins/pbr/templates/research-outputs/phase-research.md.tmpl +81 -81
  224. package/plugins/pbr/templates/research-outputs/project-research.md.tmpl +99 -99
  225. package/plugins/pbr/templates/research-outputs/synthesis.md.tmpl +36 -36
@@ -0,0 +1,441 @@
1
+ # Config Reference Guide
2
+
3
+ Complete reference for `.planning/config.json` -- the file that controls all Plan-Build-Run workflow behavior. Created by `/pbr:begin`, modifiable via `/pbr:config` or direct editing. Validated against `config-schema.json`.
4
+
5
+ ---
6
+
7
+ ## Top-Level Fields
8
+
9
+ | Property | Type | Allowed Values | Default | Description |
10
+ |----------|------|---------------|---------|-------------|
11
+ | `version` | integer | `1`, `2` | `2` | Schema version; v1 configs are auto-migrated to v2 on load |
12
+ | `context_strategy` | string | `aggressive`, `conservative`, `balanced` | `aggressive` | How aggressively PBR manages the context budget |
13
+ | `mode` | string | `interactive`, `autonomous` | `interactive` | Whether PBR pauses for user input or runs hands-free |
14
+ | `depth` | string | `quick`, `standard`, `comprehensive` | `standard` | Controls thoroughness of research, planning, and verification |
15
+
16
+ ### context_strategy
17
+
18
+ | Value | Behavior |
19
+ |-------|----------|
20
+ | `aggressive` | Proactive compaction warnings, strict context isolation, minimal file reads in main context |
21
+ | `balanced` | Moderate context management with some inline reads |
22
+ | `conservative` | Relaxed context management, more inline content allowed |
23
+
24
+ ### mode
25
+
26
+ | Value | Behavior |
27
+ |-------|----------|
28
+ | `interactive` | Pauses at gates, asks for confirmation, waits for user decisions |
29
+ | `autonomous` | Skips all gates, chains phases automatically, no user prompts |
30
+
31
+ ### depth
32
+
33
+ | Value | Behavior |
34
+ |-------|----------|
35
+ | `quick` | Skips research, plan-checking, and verification; 2 mapper areas; 3 debug rounds max |
36
+ | `standard` | Research + plan-checking + verification enabled; 4 mapper areas; 5 debug rounds max |
37
+ | `comprehensive` | Everything from standard plus inline per-task verification; 10 debug rounds max |
38
+
39
+ See [depth_profiles](#depth_profiles) for the exact feature overrides each depth level applies.
40
+
41
+ ---
42
+
43
+ ## features
44
+
45
+ Boolean toggles that enable or disable specific workflow capabilities. All default to the value shown unless overridden by the active depth profile.
46
+
47
+ | Property | Default | Description |
48
+ |----------|---------|-------------|
49
+ | `structured_planning` | `true` | Use phased planning with ROADMAP and plan files |
50
+ | `goal_verification` | `true` | Run verifier agent after builds to check goals are met |
51
+ | `integration_verification` | `true` | Run cross-phase integration checks |
52
+ | `context_isolation` | `true` | Isolate heavy work into subagents to protect main context |
53
+ | `atomic_commits` | `true` | One commit per task rather than batched commits |
54
+ | `session_persistence` | `true` | Persist state across sessions via STATE.md |
55
+ | `research_phase` | `true` | Run researcher agent before planning |
56
+ | `plan_checking` | `true` | Run plan-checker agent to validate plans before execution |
57
+ | `tdd_mode` | `false` | Red-Green-Refactor for all tasks (3 commits per task instead of 1) |
58
+ | `status_line` | `true` | Show status line in session UI |
59
+ | `auto_continue` | `false` | Write `.auto-next` signal on phase completion for chaining |
60
+ | `auto_advance` | `false` | Chain build, review, and plan automatically (requires `mode: autonomous`) |
61
+ | `team_discussions` | `false` | Enable team-based discussion workflows (never used for execution) |
62
+ | `inline_verify` | `false` | Per-task verification after each executor commit; adds ~10-20s latency per plan |
63
+
64
+ **Notable interactions:**
65
+ - `goal_verification: false` skips post-build verification; the build skill suggests running `/pbr:review` manually.
66
+ - `auto_continue: true` writes `.planning/.auto-next` containing the next command (e.g., `/pbr:plan 4`).
67
+ - `auto_advance: true` requires `mode: autonomous` to function. Hard stops at checkpoints, verification gaps, errors, and milestone boundaries.
68
+ - `inline_verify: true` spawns a haiku-model verifier after each plan within a wave, catching issues before dependent plans run.
69
+
70
+ ---
71
+
72
+ ## models
73
+
74
+ Per-agent model selection. Valid values for all fields: `sonnet`, `opus`, `haiku`, `inherit`.
75
+
76
+ | Property | Default | Description |
77
+ |----------|---------|-------------|
78
+ | `researcher` | `sonnet` | Model for the researcher agent |
79
+ | `planner` | `inherit` | Model for the planner agent |
80
+ | `executor` | `inherit` | Model for the executor agent |
81
+ | `verifier` | `sonnet` | Model for the verifier agent |
82
+ | `integration_checker` | `sonnet` | Model for the integration-checker agent |
83
+ | `debugger` | `inherit` | Model for the debugger agent |
84
+ | `mapper` | `sonnet` | Model for the codebase-mapper agent |
85
+ | `synthesizer` | `haiku` | Model for the synthesizer agent (combines team outputs) |
86
+
87
+ ### models.complexity_map
88
+
89
+ Maps task complexity to model tiers. Used when agents auto-select models based on task difficulty.
90
+
91
+ | Property | Default | Description |
92
+ |----------|---------|-------------|
93
+ | `simple` | `haiku` | Model for simple tasks |
94
+ | `medium` | `sonnet` | Model for medium-complexity tasks |
95
+ | `complex` | `inherit` | Model for high-complexity tasks |
96
+
97
+ ---
98
+
99
+ ## parallelization
100
+
101
+ Controls whether and how plans execute concurrently within a wave.
102
+
103
+ | Property | Type | Default | Description |
104
+ |----------|------|---------|-------------|
105
+ | `enabled` | boolean | `true` | Enable parallel plan execution |
106
+ | `plan_level` | boolean | `true` | Parallelize at plan level (multiple plans in same wave) |
107
+ | `task_level` | boolean | `false` | Parallelize at task level within a plan (not currently used) |
108
+ | `max_concurrent_agents` | integer | `3` | Maximum simultaneous executor subagents (1-10) |
109
+ | `min_plans_for_parallel` | integer | `2` | Minimum plans in a wave to trigger parallel execution (min: 1) |
110
+ | `use_teams` | boolean | `false` | Use Agent Teams for coordination (discussion only, never execution) |
111
+
112
+ **Behavior notes:**
113
+ - When `enabled: true` and a wave has >= `min_plans_for_parallel` plans, the build orchestrator spawns executors in parallel using `run_in_background: true`.
114
+ - Git lock conflicts can occur with parallel execution. Executors retry with 2s waits (max 3 attempts). If conflicts persist, reduce `max_concurrent_agents`.
115
+
116
+ ---
117
+
118
+ ## teams
119
+
120
+ Configures Agent Teams for multi-perspective planning and review discussions.
121
+
122
+ | Property | Type | Default | Description |
123
+ |----------|------|---------|-------------|
124
+ | `planning_roles` | string[] | `["architect", "security-reviewer", "test-designer"]` | Roles used during team planning discussions |
125
+ | `review_roles` | string[] | `["functional-reviewer", "security-auditor", "performance-analyst"]` | Roles used during team review discussions |
126
+ | `synthesis_model` | string | `sonnet` | Model used for the synthesizer agent that combines team outputs |
127
+ | `coordination` | string | `file-based` | How team members coordinate: `file-based` (parallel writes) or `sequential` |
128
+
129
+ **Interaction with parallelization:** Teams require `parallelization.max_concurrent_agents` > 1 to be useful. Setting `max_concurrent_agents: 1` with teams configured is a validation error.
130
+
131
+ ---
132
+
133
+ ## planning
134
+
135
+ Controls planning behavior and documentation.
136
+
137
+ | Property | Type | Default | Description |
138
+ |----------|------|---------|-------------|
139
+ | `commit_docs` | boolean | `true` | Commit planning docs (SUMMARY, VERIFICATION) after builds |
140
+ | `max_tasks_per_plan` | integer | `3` | Maximum tasks per plan; keeps plans focused and atomic (1-10) |
141
+ | `search_gitignored` | boolean | `false` | Include gitignored files in codebase scanning |
142
+
143
+ When `commit_docs: true`, after all plans in a phase complete, the build orchestrator stages and commits planning artifacts with the message format `docs({phase}): add build summaries and verification`.
144
+
145
+ ---
146
+
147
+ ## git
148
+
149
+ Controls git integration and branching strategy.
150
+
151
+ | Property | Type | Default | Description |
152
+ |----------|------|---------|-------------|
153
+ | `branching` | string | `none` | Branching strategy: `none`, `phase`, `milestone`, `disabled` |
154
+ | `commit_format` | string | `{type}({phase}-{plan}): {description}` | Commit message template |
155
+ | `phase_branch_template` | string | `plan-build-run/phase-{phase}-{slug}` | Phase branch name pattern |
156
+ | `milestone_branch_template` | string | `plan-build-run/{milestone}-{slug}` | Milestone branch name pattern |
157
+ | `mode` | string | `enabled` | Git mode: `enabled` or `disabled` |
158
+
159
+ When `git.mode` is `disabled`, no git commands run at all -- no commits, branching, or hook validation. Useful for prototyping or non-git projects. See `references/git-integration.md` for full branching strategy details.
160
+
161
+ ---
162
+
163
+ ## gates
164
+
165
+ Confirmation gates that pause execution to ask the user before proceeding. Setting a gate to `false` makes that step automatic.
166
+
167
+ | Property | Default | When Triggered |
168
+ |----------|---------|----------------|
169
+ | `confirm_project` | `true` | Before creating a new PBR project (`/pbr:begin`) |
170
+ | `confirm_roadmap` | `true` | Before finalizing a roadmap |
171
+ | `confirm_plan` | `true` | Before finalizing plans for a phase |
172
+ | `confirm_execute` | `false` | Before starting phase execution (`/pbr:build`) |
173
+ | `confirm_transition` | `true` | Before transitioning to the next phase |
174
+ | `issues_review` | `true` | Before proceeding when issues are detected |
175
+
176
+ **Key interaction:** Gates are unreachable in `mode: autonomous`. Setting `mode: autonomous` with any gates enabled is a validation error.
177
+
178
+ ---
179
+
180
+ ## safety
181
+
182
+ Safety controls for destructive or external operations.
183
+
184
+ | Property | Type | Default | Description |
185
+ |----------|------|---------|-------------|
186
+ | `always_confirm_destructive` | boolean | `true` | Always ask before destructive git operations |
187
+ | `always_confirm_external_services` | boolean | `true` | Always ask before calling external APIs or services |
188
+ | `enforce_phase_boundaries` | boolean | `true` | Prevent agents from working outside their assigned phase scope |
189
+
190
+ The `always_confirm_destructive` and `always_confirm_external_services` flags cannot be disabled via `/pbr:config`; they require direct editing of `config.json` as a deliberate action.
191
+
192
+ ---
193
+
194
+ ## hooks
195
+
196
+ Controls behavior of hook scripts that fire during Claude Code lifecycle events.
197
+
198
+ | Property | Type | Default | Description |
199
+ |----------|------|---------|-------------|
200
+ | `autoFormat` | boolean | `false` | Run auto-formatting after file writes |
201
+ | `typeCheck` | boolean | `false` | Run type checking after file writes |
202
+ | `detectConsoleLogs` | boolean | `false` | Warn when console.log statements are added |
203
+ | `blockDocSprawl` | boolean | `false` | Block creation of excessive documentation files |
204
+ | `compactThreshold` | integer | `50` | Context budget percentage at which to suggest compaction (10-200) |
205
+
206
+ All hook checks are disabled by default and must be opted into via config.
207
+
208
+ ---
209
+
210
+ ## debug
211
+
212
+ Controls debug workflow behavior.
213
+
214
+ | Property | Type | Default | Description |
215
+ |----------|------|---------|-------------|
216
+ | `max_hypothesis_rounds` | integer | `5` | Maximum hypothesis-test cycles the debugger agent runs (1-20) |
217
+
218
+ This value is overridden by the active depth profile if a `depth_profiles` entry sets `debug.max_hypothesis_rounds`.
219
+
220
+ ---
221
+
222
+ ## depth_profiles
223
+
224
+ Override the built-in depth profile defaults. Each key (`quick`, `standard`, `comprehensive`) maps to an object of settings that take effect when that depth is active.
225
+
226
+ **Built-in defaults:**
227
+
228
+ | Setting | quick | standard | comprehensive |
229
+ |---------|-------|----------|---------------|
230
+ | `features.research_phase` | `false` | `true` | `true` |
231
+ | `features.plan_checking` | `false` | `true` | `true` |
232
+ | `features.goal_verification` | `false` | `true` | `true` |
233
+ | `features.inline_verify` | `false` | `false` | `true` |
234
+ | `scan.mapper_count` | `2` | `4` | `4` |
235
+ | `scan.mapper_areas` | `["tech", "arch"]` | `["tech", "arch", "quality", "concerns"]` | `["tech", "arch", "quality", "concerns"]` |
236
+ | `debug.max_hypothesis_rounds` | `3` | `5` | `10` |
237
+
238
+ User overrides in `depth_profiles` merge on top of these defaults. For example, to keep standard depth but increase debug rounds:
239
+
240
+ ```json
241
+ {
242
+ "depth": "standard",
243
+ "depth_profiles": {
244
+ "standard": {
245
+ "debug.max_hypothesis_rounds": 8
246
+ }
247
+ }
248
+ }
249
+ ```
250
+
251
+ ---
252
+
253
+ ## spinner_tips
254
+
255
+ Custom spinner tips shown during agent execution. Requires Claude Code 2.1.45+.
256
+
257
+ | Property | Type | Default | Description |
258
+ |----------|------|---------|-------------|
259
+ | `tips` | string[] | `[]` | Array of custom tip strings to display in the spinner |
260
+ | `exclude_defaults` | boolean | `false` | When true, only show custom tips (suppress default Claude Code tips) |
261
+
262
+ ---
263
+
264
+ ## status_line
265
+
266
+ Controls the status line displayed in the session UI.
267
+
268
+ | Property | Type | Default | Description |
269
+ |----------|------|---------|-------------|
270
+ | `sections` | string[] | `["phase", "plan", "status", "context"]` | Which sections to display; allowed values: `phase`, `plan`, `status`, `context` |
271
+ | `brand_text` | string | -- | Custom brand text for the status line |
272
+ | `max_status_length` | integer | -- | Maximum character length for the status section (10-200) |
273
+
274
+ ### status_line.context_bar
275
+
276
+ Controls the visual context budget bar.
277
+
278
+ | Property | Type | Default | Description |
279
+ |----------|------|---------|-------------|
280
+ | `width` | integer | -- | Width of the context bar in characters (1-50) |
281
+ | `thresholds.green` | integer | -- | Percentage threshold for green indicator (0-100) |
282
+ | `thresholds.yellow` | integer | -- | Percentage threshold for yellow indicator (0-100) |
283
+ | `chars.filled` | string | -- | Character used for the filled portion of the bar |
284
+ | `chars.empty` | string | -- | Character used for the empty portion of the bar |
285
+
286
+ ---
287
+
288
+ ## Common Configurations
289
+
290
+ ### Quick Solo Development
291
+
292
+ Minimal overhead for small fixes or solo prototyping. Skips research, plan-checking, and verification. No gates, no branching.
293
+
294
+ ```json
295
+ {
296
+ "version": 2,
297
+ "depth": "quick",
298
+ "mode": "interactive",
299
+ "features": {
300
+ "structured_planning": true,
301
+ "goal_verification": false,
302
+ "integration_verification": false,
303
+ "context_isolation": true,
304
+ "atomic_commits": true,
305
+ "research_phase": false,
306
+ "plan_checking": false
307
+ },
308
+ "gates": {
309
+ "confirm_project": false,
310
+ "confirm_roadmap": false,
311
+ "confirm_plan": false,
312
+ "confirm_execute": false,
313
+ "confirm_transition": false,
314
+ "issues_review": false
315
+ },
316
+ "git": {
317
+ "branching": "none",
318
+ "mode": "enabled"
319
+ }
320
+ }
321
+ ```
322
+
323
+ ### Comprehensive Team Workflow
324
+
325
+ Full verification, team discussions, parallel execution, and all gates enabled. Good for multi-phase projects with code review requirements.
326
+
327
+ ```json
328
+ {
329
+ "version": 2,
330
+ "depth": "comprehensive",
331
+ "mode": "interactive",
332
+ "features": {
333
+ "structured_planning": true,
334
+ "goal_verification": true,
335
+ "integration_verification": true,
336
+ "context_isolation": true,
337
+ "atomic_commits": true,
338
+ "research_phase": true,
339
+ "plan_checking": true,
340
+ "tdd_mode": true,
341
+ "inline_verify": true,
342
+ "team_discussions": true
343
+ },
344
+ "parallelization": {
345
+ "enabled": true,
346
+ "plan_level": true,
347
+ "max_concurrent_agents": 3,
348
+ "use_teams": true
349
+ },
350
+ "teams": {
351
+ "planning_roles": ["architect", "security-reviewer", "test-designer"],
352
+ "review_roles": ["functional-reviewer", "security-auditor", "performance-analyst"],
353
+ "coordination": "file-based"
354
+ },
355
+ "gates": {
356
+ "confirm_project": true,
357
+ "confirm_roadmap": true,
358
+ "confirm_plan": true,
359
+ "confirm_execute": true,
360
+ "confirm_transition": true,
361
+ "issues_review": true
362
+ },
363
+ "git": {
364
+ "branching": "phase",
365
+ "mode": "enabled"
366
+ }
367
+ }
368
+ ```
369
+
370
+ ### Autonomous CI/CD Mode
371
+
372
+ Hands-free execution with no gates and automatic phase chaining. Suitable for CI pipelines or unattended runs.
373
+
374
+ ```json
375
+ {
376
+ "version": 2,
377
+ "depth": "standard",
378
+ "mode": "autonomous",
379
+ "features": {
380
+ "structured_planning": true,
381
+ "goal_verification": true,
382
+ "integration_verification": true,
383
+ "context_isolation": true,
384
+ "atomic_commits": true,
385
+ "research_phase": true,
386
+ "plan_checking": true,
387
+ "auto_continue": true,
388
+ "auto_advance": true
389
+ },
390
+ "gates": {
391
+ "confirm_project": false,
392
+ "confirm_roadmap": false,
393
+ "confirm_plan": false,
394
+ "confirm_execute": false,
395
+ "confirm_transition": false,
396
+ "issues_review": false
397
+ },
398
+ "git": {
399
+ "branching": "phase",
400
+ "mode": "enabled"
401
+ },
402
+ "planning": {
403
+ "commit_docs": true
404
+ }
405
+ }
406
+ ```
407
+
408
+ ---
409
+
410
+ ## Troubleshooting
411
+
412
+ ### Validation Errors
413
+
414
+ Run validation with: `node plugins/pbr/scripts/pbr-tools.js config validate`
415
+
416
+ **"config.json not found"** -- No `.planning/config.json` exists. Run `/pbr:begin` to create one, or create the file manually.
417
+
418
+ **"config.json is not valid JSON"** -- Syntax error in the JSON file. Check for trailing commas, missing quotes, or unescaped characters.
419
+
420
+ **"mode=autonomous with active gates: gates are unreachable in autonomous mode"** -- You set `mode: autonomous` but left one or more gates enabled. Autonomous mode never pauses for confirmation, so enabled gates are contradictory. Set all gates to `false` or switch back to `mode: interactive`.
421
+
422
+ **"parallelization.max_concurrent_agents=1 with teams.coordination set: teams require concurrent agents to be useful"** -- Teams need multiple agents running in parallel. Either increase `max_concurrent_agents` above 1 or remove the `teams` configuration.
423
+
424
+ ### Validation Warnings
425
+
426
+ **"features.auto_continue=true with mode=interactive"** -- `auto_continue` only fires in autonomous mode. It has no effect in interactive mode. Either switch to `mode: autonomous` or disable `auto_continue`.
427
+
428
+ **"parallelization.enabled=false with plan_level=true"** -- `plan_level` is ignored when parallelization is disabled. Either enable parallelization or remove the `plan_level` setting.
429
+
430
+ ### Contradictory Configurations to Avoid
431
+
432
+ | Configuration | Problem |
433
+ |---------------|---------|
434
+ | `mode: autonomous` + any gate `true` | Gates never fire in autonomous mode (validation error) |
435
+ | `max_concurrent_agents: 1` + `teams.coordination` set | Teams cannot coordinate with only one agent (validation error) |
436
+ | `auto_continue: true` + `mode: interactive` | auto_continue is ignored in interactive mode (warning) |
437
+ | `parallelization.enabled: false` + `plan_level: true` | plan_level has no effect when parallelization is off (warning) |
438
+ | `auto_advance: true` + `mode: interactive` | auto_advance requires autonomous mode to chain phases |
439
+ | `tdd_mode: true` + `depth: quick` | quick depth skips verification, which conflicts with TDD's verify-first approach |
440
+ | `git.mode: disabled` + `atomic_commits: true` | atomic_commits has no effect when git is disabled |
441
+ | `git.branching: phase` + `git.mode: disabled` | Branching settings are ignored when git is disabled |