@sienklogic/plan-build-run 2.0.2 → 2.2.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 (166) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +25 -6
  3. package/dashboard/src/routes/pages.routes.js +11 -4
  4. package/dashboard/src/services/dashboard.service.js +81 -17
  5. package/dashboard/src/services/phase.service.js +30 -24
  6. package/dashboard/src/services/roadmap.service.js +3 -3
  7. package/dashboard/src/views/partials/phase-content.ejs +5 -4
  8. package/package.json +1 -1
  9. package/plugins/cursor-pbr/.cursor-plugin/plugin.json +1 -1
  10. package/plugins/cursor-pbr/CHANGELOG.md +15 -0
  11. package/plugins/cursor-pbr/README.md +118 -0
  12. package/plugins/cursor-pbr/agents/codebase-mapper.md +108 -0
  13. package/plugins/cursor-pbr/agents/debugger.md +168 -0
  14. package/plugins/cursor-pbr/agents/executor.md +236 -0
  15. package/plugins/cursor-pbr/agents/general.md +87 -0
  16. package/plugins/cursor-pbr/agents/integration-checker.md +87 -0
  17. package/plugins/cursor-pbr/agents/plan-checker.md +198 -0
  18. package/plugins/cursor-pbr/agents/planner.md +180 -0
  19. package/plugins/cursor-pbr/agents/researcher.md +162 -0
  20. package/plugins/cursor-pbr/agents/synthesizer.md +101 -0
  21. package/plugins/cursor-pbr/agents/verifier.md +193 -0
  22. package/plugins/cursor-pbr/assets/logo.svg +21 -0
  23. package/plugins/cursor-pbr/hooks/hooks.json +189 -7
  24. package/plugins/cursor-pbr/references/agent-anti-patterns.md +25 -0
  25. package/plugins/cursor-pbr/references/agent-interactions.md +135 -0
  26. package/plugins/cursor-pbr/references/agent-teams.md +55 -0
  27. package/plugins/cursor-pbr/references/checkpoints.md +158 -0
  28. package/plugins/cursor-pbr/references/common-bug-patterns.md +14 -0
  29. package/plugins/cursor-pbr/references/config-reference.md +442 -0
  30. package/plugins/cursor-pbr/references/continuation-format.md +213 -0
  31. package/plugins/cursor-pbr/references/deviation-rules.md +113 -0
  32. package/plugins/cursor-pbr/references/git-integration.md +227 -0
  33. package/plugins/cursor-pbr/references/integration-patterns.md +118 -0
  34. package/plugins/cursor-pbr/references/model-profiles.md +100 -0
  35. package/plugins/cursor-pbr/references/model-selection.md +32 -0
  36. package/plugins/cursor-pbr/references/pbr-rules.md +194 -0
  37. package/plugins/cursor-pbr/references/plan-authoring.md +182 -0
  38. package/plugins/cursor-pbr/references/plan-format.md +288 -0
  39. package/plugins/cursor-pbr/references/planning-config.md +214 -0
  40. package/plugins/cursor-pbr/references/questioning.md +215 -0
  41. package/plugins/cursor-pbr/references/reading-verification.md +128 -0
  42. package/plugins/cursor-pbr/references/stub-patterns.md +161 -0
  43. package/plugins/cursor-pbr/references/subagent-coordination.md +120 -0
  44. package/plugins/cursor-pbr/references/ui-formatting.md +462 -0
  45. package/plugins/cursor-pbr/references/verification-patterns.md +199 -0
  46. package/plugins/cursor-pbr/references/wave-execution.md +96 -0
  47. package/plugins/cursor-pbr/rules/pbr-workflow.mdc +48 -0
  48. package/plugins/cursor-pbr/setup.ps1 +78 -0
  49. package/plugins/cursor-pbr/setup.sh +83 -0
  50. package/plugins/cursor-pbr/skills/begin/SKILL.md +566 -0
  51. package/plugins/cursor-pbr/skills/begin/templates/PROJECT.md.tmpl +34 -0
  52. package/plugins/cursor-pbr/skills/begin/templates/REQUIREMENTS.md.tmpl +19 -0
  53. package/plugins/cursor-pbr/skills/begin/templates/STATE.md.tmpl +50 -0
  54. package/plugins/cursor-pbr/skills/begin/templates/config.json.tmpl +64 -0
  55. package/plugins/cursor-pbr/skills/begin/templates/researcher-prompt.md.tmpl +20 -0
  56. package/plugins/cursor-pbr/skills/begin/templates/roadmap-prompt.md.tmpl +31 -0
  57. package/plugins/cursor-pbr/skills/begin/templates/synthesis-prompt.md.tmpl +17 -0
  58. package/plugins/cursor-pbr/skills/build/SKILL.md +902 -0
  59. package/plugins/cursor-pbr/skills/config/SKILL.md +253 -0
  60. package/plugins/cursor-pbr/skills/continue/SKILL.md +159 -0
  61. package/plugins/cursor-pbr/skills/debug/SKILL.md +512 -0
  62. package/plugins/cursor-pbr/skills/debug/templates/continuation-prompt.md.tmpl +17 -0
  63. package/plugins/cursor-pbr/skills/debug/templates/initial-investigation-prompt.md.tmpl +28 -0
  64. package/plugins/cursor-pbr/skills/discuss/SKILL.md +344 -0
  65. package/plugins/cursor-pbr/skills/discuss/templates/CONTEXT.md.tmpl +62 -0
  66. package/plugins/cursor-pbr/skills/discuss/templates/decision-categories.md +10 -0
  67. package/plugins/cursor-pbr/skills/explore/SKILL.md +375 -0
  68. package/plugins/cursor-pbr/skills/health/SKILL.md +218 -0
  69. package/plugins/cursor-pbr/skills/health/templates/check-pattern.md.tmpl +31 -0
  70. package/plugins/cursor-pbr/skills/health/templates/output-format.md.tmpl +64 -0
  71. package/plugins/cursor-pbr/skills/help/SKILL.md +152 -0
  72. package/plugins/cursor-pbr/skills/import/SKILL.md +499 -0
  73. package/plugins/cursor-pbr/skills/milestone/SKILL.md +701 -0
  74. package/plugins/cursor-pbr/skills/milestone/templates/audit-report.md.tmpl +49 -0
  75. package/plugins/cursor-pbr/skills/milestone/templates/stats-file.md.tmpl +31 -0
  76. package/plugins/cursor-pbr/skills/note/SKILL.md +228 -0
  77. package/plugins/cursor-pbr/skills/pause/SKILL.md +246 -0
  78. package/plugins/cursor-pbr/skills/pause/templates/continue-here.md.tmpl +72 -0
  79. package/plugins/cursor-pbr/skills/plan/SKILL.md +648 -0
  80. package/plugins/cursor-pbr/skills/plan/templates/checker-prompt.md.tmpl +22 -0
  81. package/plugins/cursor-pbr/skills/plan/templates/gap-closure-prompt.md.tmpl +33 -0
  82. package/plugins/cursor-pbr/skills/plan/templates/planner-prompt.md.tmpl +39 -0
  83. package/plugins/cursor-pbr/skills/plan/templates/researcher-prompt.md.tmpl +20 -0
  84. package/plugins/cursor-pbr/skills/plan/templates/revision-prompt.md.tmpl +24 -0
  85. package/plugins/cursor-pbr/skills/quick/SKILL.md +351 -0
  86. package/plugins/cursor-pbr/skills/resume/SKILL.md +399 -0
  87. package/plugins/cursor-pbr/skills/review/SKILL.md +649 -0
  88. package/plugins/cursor-pbr/skills/review/templates/debugger-prompt.md.tmpl +61 -0
  89. package/plugins/cursor-pbr/skills/review/templates/gap-planner-prompt.md.tmpl +41 -0
  90. package/plugins/cursor-pbr/skills/review/templates/verifier-prompt.md.tmpl +116 -0
  91. package/plugins/cursor-pbr/skills/scan/SKILL.md +301 -0
  92. package/plugins/cursor-pbr/skills/scan/templates/mapper-prompt.md.tmpl +202 -0
  93. package/plugins/cursor-pbr/skills/setup/SKILL.md +250 -0
  94. package/plugins/cursor-pbr/skills/shared/commit-planning-docs.md +36 -0
  95. package/plugins/cursor-pbr/skills/shared/config-loading.md +103 -0
  96. package/plugins/cursor-pbr/skills/shared/context-budget.md +41 -0
  97. package/plugins/cursor-pbr/skills/shared/context-loader-task.md +87 -0
  98. package/plugins/cursor-pbr/skills/shared/digest-select.md +80 -0
  99. package/plugins/cursor-pbr/skills/shared/domain-probes.md +126 -0
  100. package/plugins/cursor-pbr/skills/shared/error-reporting.md +80 -0
  101. package/plugins/cursor-pbr/skills/shared/gate-prompts.md +389 -0
  102. package/plugins/cursor-pbr/skills/shared/phase-argument-parsing.md +46 -0
  103. package/plugins/cursor-pbr/skills/shared/progress-display.md +54 -0
  104. package/plugins/cursor-pbr/skills/shared/revision-loop.md +82 -0
  105. package/plugins/cursor-pbr/skills/shared/state-loading.md +63 -0
  106. package/plugins/cursor-pbr/skills/shared/state-update.md +162 -0
  107. package/plugins/cursor-pbr/skills/shared/universal-anti-patterns.md +34 -0
  108. package/plugins/cursor-pbr/skills/status/SKILL.md +362 -0
  109. package/plugins/cursor-pbr/skills/todo/SKILL.md +195 -0
  110. package/plugins/cursor-pbr/templates/CONTEXT.md.tmpl +53 -0
  111. package/plugins/cursor-pbr/templates/INTEGRATION-REPORT.md.tmpl +152 -0
  112. package/plugins/cursor-pbr/templates/RESEARCH-SUMMARY.md.tmpl +98 -0
  113. package/plugins/cursor-pbr/templates/ROADMAP.md.tmpl +41 -0
  114. package/plugins/cursor-pbr/templates/SUMMARY.md.tmpl +82 -0
  115. package/plugins/cursor-pbr/templates/VERIFICATION-DETAIL.md.tmpl +117 -0
  116. package/plugins/cursor-pbr/templates/continue-here.md.tmpl +74 -0
  117. package/plugins/cursor-pbr/templates/prompt-partials/phase-project-context.md.tmpl +38 -0
  118. package/plugins/pbr/agents/codebase-mapper.md +41 -206
  119. package/plugins/pbr/agents/debugger.md +65 -171
  120. package/plugins/pbr/agents/executor.md +90 -275
  121. package/plugins/pbr/agents/general.md +27 -97
  122. package/plugins/pbr/agents/integration-checker.md +35 -112
  123. package/plugins/pbr/agents/plan-checker.md +71 -164
  124. package/plugins/pbr/agents/planner.md +76 -245
  125. package/plugins/pbr/agents/researcher.md +63 -255
  126. package/plugins/pbr/agents/synthesizer.md +49 -174
  127. package/plugins/pbr/agents/verifier.md +75 -366
  128. package/plugins/pbr/hooks/hooks.json +14 -10
  129. package/plugins/pbr/references/ui-formatting.md +1 -1
  130. package/plugins/pbr/scripts/auto-continue.js +20 -4
  131. package/plugins/pbr/scripts/check-dangerous-commands.js +1 -1
  132. package/plugins/pbr/scripts/check-phase-boundary.js +1 -1
  133. package/plugins/pbr/scripts/check-plan-format.js +3 -3
  134. package/plugins/pbr/scripts/check-roadmap-sync.js +3 -3
  135. package/plugins/pbr/scripts/check-skill-workflow.js +1 -1
  136. package/plugins/pbr/scripts/check-state-sync.js +2 -2
  137. package/plugins/pbr/scripts/check-subagent-output.js +1 -1
  138. package/plugins/pbr/scripts/check-summary-gate.js +198 -0
  139. package/plugins/pbr/scripts/context-budget-check.js +1 -1
  140. package/plugins/pbr/scripts/event-handler.js +2 -2
  141. package/plugins/pbr/scripts/event-logger.js +1 -1
  142. package/plugins/pbr/scripts/log-subagent.js +1 -1
  143. package/plugins/pbr/scripts/pbr-tools.js +1 -1
  144. package/plugins/pbr/scripts/post-write-dispatch.js +1 -1
  145. package/plugins/pbr/scripts/post-write-quality.js +1 -1
  146. package/plugins/pbr/scripts/pre-bash-dispatch.js +1 -1
  147. package/plugins/pbr/scripts/pre-write-dispatch.js +16 -3
  148. package/plugins/pbr/scripts/session-cleanup.js +1 -1
  149. package/plugins/pbr/scripts/status-line.js +1 -1
  150. package/plugins/pbr/scripts/suggest-compact.js +1 -1
  151. package/plugins/pbr/scripts/task-completed.js +1 -1
  152. package/plugins/pbr/scripts/track-context-budget.js +11 -6
  153. package/plugins/pbr/scripts/validate-commit.js +1 -1
  154. package/plugins/pbr/scripts/validate-task.js +1 -1
  155. package/plugins/pbr/skills/begin/SKILL.md +4 -2
  156. package/plugins/pbr/skills/begin/templates/roadmap-prompt.md.tmpl +2 -0
  157. package/plugins/pbr/skills/build/SKILL.md +6 -4
  158. package/plugins/pbr/skills/continue/SKILL.md +2 -1
  159. package/plugins/pbr/skills/review/SKILL.md +4 -3
  160. package/plugins/pbr/skills/status/SKILL.md +5 -2
  161. package/plugins/pbr/templates/ROADMAP.md.tmpl +6 -1
  162. package/plugins/cursor-pbr/agents/.gitkeep +0 -0
  163. package/plugins/cursor-pbr/references/.gitkeep +0 -0
  164. package/plugins/cursor-pbr/rules/.gitkeep +0 -0
  165. package/plugins/cursor-pbr/skills/.gitkeep +0 -0
  166. package/plugins/cursor-pbr/templates/.gitkeep +0 -0
@@ -0,0 +1,214 @@
1
+ <!-- canonical: ../../pbr/references/planning-config.md -->
2
+ # Planning Config Reference
3
+
4
+ Schema, fields, defaults, and behavioral effects of Plan-Build-Run's `config.json`.
5
+
6
+ ---
7
+
8
+ ## Overview
9
+
10
+ Plan-Build-Run's configuration lives at `.planning/config.json` in the project root. It is created by `/pbr:begin` and can be modified via `/pbr:config` or by editing the file directly. The config controls workflow behavior, model selection, parallelization, git integration, and confirmation gates.
11
+
12
+ ---
13
+
14
+ ## Schema Version
15
+
16
+ ```json
17
+ { "version": 2 }
18
+ ```
19
+
20
+ The `version` field tracks schema migrations. Current version is `2`. When loading a config with an older version, Plan-Build-Run runs automatic migration (e.g., v1 to v2 adds missing fields with defaults, renames `model_profile` to per-agent `models` object).
21
+
22
+ ---
23
+
24
+ ## Top-Level Fields
25
+
26
+ | Field | Type | Default | Description |
27
+ |-------|------|---------|-------------|
28
+ | `version` | number | `2` | Config schema version |
29
+ | `context_strategy` | string | `"aggressive"` | Context budget strategy: `aggressive`, `balanced`, `minimal` |
30
+ | `mode` | string | `"interactive"` | Workflow mode: `interactive` |
31
+ | `depth` | string | `"standard"` | Research/planning depth: `quick`, `standard`, `comprehensive` |
32
+
33
+ ### depth
34
+
35
+ Controls how thorough research and planning phases are:
36
+
37
+ | Value | Behavior |
38
+ |-------|----------|
39
+ | `quick` | Minimal research, smaller plans, faster execution |
40
+ | `standard` | Balanced research depth, standard plan detail |
41
+ | `comprehensive` | Deep research with multiple sources, detailed plans with more tasks |
42
+
43
+ ### context_strategy
44
+
45
+ Controls how aggressively Plan-Build-Run manages context budget:
46
+
47
+ | Value | Behavior |
48
+ |-------|----------|
49
+ | `aggressive` | Proactive compaction warnings, strict context isolation, minimal file reads in main context |
50
+ | `balanced` | Moderate context management with some inline reads |
51
+ | `minimal` | Relaxed context management, more inline content allowed |
52
+
53
+ ---
54
+
55
+ ## features
56
+
57
+ Boolean toggles that enable or disable specific workflow capabilities.
58
+
59
+ | Field | Default | Description |
60
+ |-------|---------|-------------|
61
+ | `structured_planning` | `true` | Use phased planning with ROADMAP and plan files |
62
+ | `goal_verification` | `true` | Run verifier agent after builds to check goals are met |
63
+ | `integration_verification` | `true` | Run cross-phase integration checks |
64
+ | `context_isolation` | `true` | Isolate work into subagents to protect main context |
65
+ | `atomic_commits` | `true` | Require one commit per task (vs. batched commits) |
66
+ | `session_persistence` | `true` | Persist state across sessions via STATE.md |
67
+ | `research_phase` | `true` | Run research before planning |
68
+ | `plan_checking` | `true` | Run plan-checker agent before execution |
69
+ | `tdd_mode` | `false` | Enable Test-Driven Development for all tasks (Red-Green-Refactor) |
70
+ | `status_line` | `true` | Show status line in session UI |
71
+ | `auto_continue` | `false` | Write `.auto-next` signal on phase completion for automatic continuation |
72
+ | `auto_advance` | `false` | Chain build→review→plan automatically in autonomous mode (requires `mode: autonomous`) |
73
+ | `team_discussions` | `false` | Enable team-based discussion workflows (never used for execution) |
74
+ | `inline_verify` | `false` | Run per-task verification after each executor commit (opt-in, adds latency) |
75
+
76
+ ### Notable interactions
77
+
78
+ - `goal_verification: false` skips the post-build verification step. The build skill appends a note suggesting `/pbr:review` manually.
79
+ - `tdd_mode: true` causes all task types to follow Red-Green-Refactor, producing 3 commits per task instead of 1.
80
+ - `auto_continue: true` writes a `.planning/.auto-next` file containing the next command (e.g., `/pbr:plan 4`), allowing wrapper scripts to chain phases.
81
+ - `auto_advance: true` + `mode: autonomous` enables full phase cycling: build completes → auto-invoke review → if verification passes → auto-invoke plan for next phase. Hard stops at: checkpoints, verification gaps, errors, milestone boundaries.
82
+ - `inline_verify: true` spawns a haiku-model verifier after each plan completes within a wave. Adds ~10-20s latency per plan but catches issues before dependent plans run.
83
+
84
+ ---
85
+
86
+ ## models
87
+
88
+ Per-agent model selection. See `references/model-profiles.md` for full details.
89
+
90
+ ```json
91
+ {
92
+ "models": {
93
+ "researcher": "sonnet",
94
+ "planner": "inherit",
95
+ "executor": "inherit",
96
+ "verifier": "sonnet",
97
+ "integration_checker": "sonnet",
98
+ "debugger": "inherit",
99
+ "mapper": "sonnet",
100
+ "synthesizer": "haiku"
101
+ }
102
+ }
103
+ ```
104
+
105
+ Valid values: `sonnet`, `opus`, `haiku`, `inherit`.
106
+
107
+ ---
108
+
109
+ ## parallelization
110
+
111
+ Controls whether and how plans execute concurrently.
112
+
113
+ | Field | Type | Default | Description |
114
+ |-------|------|---------|-------------|
115
+ | `enabled` | boolean | `true` | Enable parallel plan execution within a wave |
116
+ | `plan_level` | boolean | `true` | Parallelize at plan level (multiple plans in same wave) |
117
+ | `task_level` | boolean | `false` | Parallelize at task level within a plan (not currently used) |
118
+ | `max_concurrent_agents` | number | `3` | Maximum simultaneous executor subagents |
119
+ | `min_plans_for_parallel` | number | `2` | Minimum plans in a wave to trigger parallel execution |
120
+ | `use_teams` | boolean | `false` | Use Agent Teams for coordination (discussion only, never execution) |
121
+
122
+ ### Behavior
123
+
124
+ When `enabled: true` and a wave has >= `min_plans_for_parallel` plans, the build orchestrator spawns up to `max_concurrent_agents` executor Task() calls in parallel using `run_in_background: true`.
125
+
126
+ When `enabled: false` or a wave has only 1 plan, executors run sequentially.
127
+
128
+ Git lock conflicts can occur with parallel execution. Executors handle this with retry logic (wait 2s, max 3 attempts). If conflicts persist, reduce `max_concurrent_agents` to 1.
129
+
130
+ ---
131
+
132
+ ## planning
133
+
134
+ Controls planning behavior and documentation.
135
+
136
+ | Field | Type | Default | Description |
137
+ |-------|------|---------|-------------|
138
+ | `commit_docs` | boolean | `true` | Commit planning docs (SUMMARY, VERIFICATION) after builds |
139
+ | `max_tasks_per_plan` | number | `3` | Maximum tasks per plan (keeps plans focused and atomic) |
140
+ | `search_gitignored` | boolean | `false` | Include gitignored files in codebase scanning |
141
+
142
+ ### commit_docs
143
+
144
+ When `true`, after all plans in a phase complete, the build orchestrator stages and commits planning artifacts:
145
+ ```
146
+ docs({phase}): add build summaries and verification
147
+ ```
148
+
149
+ When `false`, planning docs remain unstaged/uncommitted.
150
+
151
+ ---
152
+
153
+ ## git
154
+
155
+ Controls git integration and branching.
156
+
157
+ | Field | Type | Default | Description |
158
+ |-------|------|---------|-------------|
159
+ | `branching` | string | `"none"` | Branching strategy: `none`, `phase`, `milestone`, `disabled` |
160
+ | `commit_format` | string | `"{type}({phase}-{plan}): {description}"` | Commit message template |
161
+ | `phase_branch_template` | string | `"plan-build-run/phase-{phase}-{slug}"` | Phase branch naming |
162
+ | `milestone_branch_template` | string | `"plan-build-run/{milestone}-{slug}"` | Milestone branch naming |
163
+ | `mode` | string | `"enabled"` | Git mode: `enabled` or `disabled` |
164
+
165
+ See `references/git-integration.md` for full branching strategy details.
166
+
167
+ ### mode: disabled
168
+
169
+ When `git.mode` is `"disabled"`, no git commands are run at all -- no commits, no branching, no hook validation. Useful for prototyping or non-git projects.
170
+
171
+ ---
172
+
173
+ ## gates
174
+
175
+ Confirmation gates that pause execution to ask the user before proceeding.
176
+
177
+ | Field | Default | When Triggered |
178
+ |-------|---------|----------------|
179
+ | `confirm_project` | `true` | Before creating a new Plan-Build-Run project (`/pbr:begin`) |
180
+ | `confirm_roadmap` | `true` | Before finalizing a roadmap |
181
+ | `confirm_plan` | `true` | Before finalizing plans for a phase |
182
+ | `confirm_execute` | `false` | Before starting phase execution (`/pbr:build`) |
183
+ | `confirm_transition` | `true` | Before transitioning to the next phase |
184
+ | `issues_review` | `true` | Before proceeding when issues are detected |
185
+
186
+ Setting a gate to `false` makes that step automatic (no user prompt).
187
+
188
+ ---
189
+
190
+ ## safety
191
+
192
+ Safety controls for destructive or external operations.
193
+
194
+ | Field | Type | Default | Description |
195
+ |-------|------|---------|-------------|
196
+ | `always_confirm_destructive` | boolean | `true` | Always ask before destructive git operations |
197
+ | `always_confirm_external_services` | boolean | `true` | Always ask before calling external APIs or services |
198
+
199
+ These cannot be disabled via `/pbr:config` -- they require manual editing of `config.json` as a deliberate action.
200
+
201
+ ---
202
+
203
+ ## Validation Rules
204
+
205
+ When modifying config (via `/pbr:config` or direct edit):
206
+
207
+ | Field | Valid Values |
208
+ |-------|-------------|
209
+ | `depth` | `quick`, `standard`, `comprehensive` |
210
+ | `models.*` | `sonnet`, `inherit`, `haiku`, `opus` |
211
+ | `context_strategy` | `aggressive`, `balanced`, `minimal` |
212
+ | `git.branching` | `none`, `phase`, `milestone`, `disabled` |
213
+ | `git.mode` | `enabled`, `disabled` |
214
+ | All boolean fields | `true`, `false` |
@@ -0,0 +1,215 @@
1
+ <!-- canonical: ../../pbr/references/questioning.md -->
2
+ # Deep Questioning Guide
3
+
4
+ Techniques for understanding a user's project vision during `/pbr:begin`. The goal is to build a complete mental model of what needs to be built, not just a feature list.
5
+
6
+ ---
7
+
8
+ ## Core Questioning Techniques
9
+
10
+ ### Challenge Vagueness
11
+
12
+ When the user says something abstract or general, push for specifics.
13
+
14
+ | They say | You ask |
15
+ |----------|---------|
16
+ | "It should be fast" | "Fast how? Page load under 1 second? API response under 200ms? What's the baseline today?" |
17
+ | "A dashboard" | "What's on the dashboard? What data? What can users do with it?" |
18
+ | "User management" | "What can users do? Sign up, log in, reset password? Roles? Permissions? Teams?" |
19
+ | "It needs to scale" | "Scale to what? 100 users? 100,000? What's the growth timeline?" |
20
+
21
+ ### Make Abstract Concrete
22
+
23
+ Ask for examples and walk-throughs.
24
+
25
+ - "Walk me through what a user does when they first open this."
26
+ - "Give me an example of [that feature] in action."
27
+ - "If I were a user right now, what would I see?"
28
+ - "What does a typical session look like from start to finish?"
29
+
30
+ ### Surface Assumptions
31
+
32
+ Expose hidden assumptions the user hasn't stated.
33
+
34
+ - "Why do you assume [X]? Is that a hard requirement?"
35
+ - "Have you considered [alternative]? What made you choose [their approach]?"
36
+ - "What if [assumption] turns out to be wrong?"
37
+ - "Is that because of a technical constraint, or a preference?"
38
+
39
+ ### Find Edges
40
+
41
+ Probe for edge cases and boundary conditions.
42
+
43
+ - "What happens when [unexpected input]?"
44
+ - "What if two users do [action] at the same time?"
45
+ - "What about offline/slow connections?"
46
+ - "What if the user has [unusual state]?"
47
+ - "What's the maximum [items/users/data] this needs to handle?"
48
+
49
+ ### Reveal Motivation
50
+
51
+ Understand the WHY behind features.
52
+
53
+ - "Why does that matter?"
54
+ - "What problem does that solve for the user?"
55
+ - "What happens if we don't build that?"
56
+ - "Who specifically needs this? Why?"
57
+ - "What's the cost of getting this wrong?"
58
+
59
+ ### Prioritize Ruthlessly
60
+
61
+ Force ranking and trade-off decisions.
62
+
63
+ - "If you could only ship three features, which three?"
64
+ - "Would you rather have [A] done well or [A and B] done halfway?"
65
+ - "What's the minimum that would make this useful?"
66
+ - "What would you cut if you had to ship in half the time?"
67
+
68
+ ### Surface Implications
69
+
70
+ When the user states a preference or makes a choice, surface what it implies before moving on. This avoids surprises later and reveals whether the user has thought through the consequences.
71
+
72
+ - "You want real-time updates. That typically means WebSockets, which adds deployment complexity. Are you prepared for that, or would polling work?"
73
+ - "Card-based layout with sort/filter usually means client-side state management. How complex are your filtering needs?"
74
+ - "You mentioned multi-tenant. That affects database design, auth, billing — have you thought through isolation boundaries?"
75
+ - "Self-hosted deployment means you own uptime. Do you have monitoring and on-call plans?"
76
+
77
+ The pattern: **[stated preference] implies [consequence]. Is that acceptable, or should we reconsider?**
78
+
79
+ ### Frame Trade-offs, Not Menus
80
+
81
+ Replace "Do you want A or B?" with trade-off framing that shows real consequences.
82
+
83
+ | Instead of | Ask |
84
+ |------------|-----|
85
+ | "SQL or NoSQL?" | "SQL gives you strong consistency and relationships but needs schema migrations. NoSQL gives you flexible documents but makes joins painful. What matters more for your data?" |
86
+ | "SSR or SPA?" | "SSR gives you better SEO and initial load, but adds server cost. SPA gives you snappier interactions but hurts discoverability. What's the priority?" |
87
+ | "Monolith or microservices?" | "A monolith ships faster and is simpler to debug, but gets harder to scale independently. Microservices scale cleanly but add deployment and coordination overhead. Where are you on that spectrum?" |
88
+
89
+ The pattern: **A gives you X but costs Y. B gives you Z but costs W. What matters more to you?**
90
+
91
+ This produces better answers than binary choices because users reveal their actual priorities.
92
+
93
+ ---
94
+
95
+ ## Required Context Checklist
96
+
97
+ By the end of questioning, you should have clear answers for ALL of these:
98
+
99
+ ### The Problem
100
+ - [ ] What problem is being solved?
101
+ - [ ] Who has this problem? (specific users/personas)
102
+ - [ ] How are they solving it today? (current state)
103
+ - [ ] Why is the current solution inadequate?
104
+
105
+ ### The Solution
106
+ - [ ] What is being built? (concrete description)
107
+ - [ ] What does "done" look like? (at least 3 success criteria)
108
+ - [ ] What are the core features? (prioritized)
109
+ - [ ] What is explicitly NOT being built? (scope boundaries)
110
+
111
+ ### Constraints
112
+ - [ ] Technology choices already made (language, framework, hosting)
113
+ - [ ] Budget constraints (money, time, resources)
114
+ - [ ] Team constraints (size, skill level, availability)
115
+ - [ ] Integration constraints (existing systems, APIs, databases)
116
+ - [ ] Timeline expectations (deadlines, milestones)
117
+
118
+ ### Decisions Already Made
119
+ - [ ] Architecture preferences or requirements
120
+ - [ ] Deployment environment (cloud, self-hosted, serverless)
121
+ - [ ] Authentication approach
122
+ - [ ] Data storage approach
123
+ - [ ] Third-party services to use
124
+
125
+ ### Edge Cases and Concerns
126
+ - [ ] What keeps them up at night about this project?
127
+ - [ ] What's the hardest part?
128
+ - [ ] What might go wrong?
129
+ - [ ] What are they unsure about?
130
+
131
+ ---
132
+
133
+ ## Progressive Depth Layers
134
+
135
+ Structure the conversation as deepening layers. Each layer builds on the previous one. You do not need to complete every layer in every project, but the order matters — do not jump to Layer 3 before Layer 1 is solid.
136
+
137
+ ### Layer 1: Shape — "What are you building?"
138
+ Establish the broad outline. What is it, who is it for, what does it do?
139
+ - Core purpose and user personas
140
+ - Primary features and workflows
141
+ - Technology preferences or constraints
142
+
143
+ ### Layer 2: Feel — "How should users experience this?"
144
+ Move from structure to experience. How does it feel to use?
145
+ - UI expectations, interaction patterns, responsiveness
146
+ - Tone, branding, visual direction
147
+ - Performance expectations from the user's perspective
148
+
149
+ ### Layer 3: Edges — "What happens when things go wrong?"
150
+ Probe failure modes, edge cases, and the unexpected.
151
+ - Error handling, empty states, data conflicts
152
+ - Permission boundaries, rate limits, abuse scenarios
153
+ - What the user has NOT thought about yet
154
+
155
+ ### Layer 4: System — "How does this fit into the bigger picture?"
156
+ Zoom out to the surrounding ecosystem.
157
+ - Integrations, data flows, deployment environment
158
+ - Operational concerns — monitoring, backups, migrations
159
+ - Future evolution and extensibility
160
+
161
+ ---
162
+
163
+ ## Conversation Flow
164
+
165
+ The conversation should feel natural, not like an interrogation. Follow this general arc:
166
+
167
+ ### Opening (1-2 exchanges)
168
+ Start broad and let them paint the picture:
169
+ - "What are you building?"
170
+ - "Tell me about this project."
171
+
172
+ ### Exploration (3-5 exchanges)
173
+ Dive into specifics on each area they mention:
174
+ - Follow their energy — explore what they're excited about
175
+ - Circle back to areas they glossed over
176
+ - Use "tell me more about..." and "what does that mean exactly?"
177
+
178
+ ### Constraints (2-3 exchanges)
179
+ Shift to practical matters:
180
+ - "What are you working with? Language, framework, hosting?"
181
+ - "Any hard constraints I should know about?"
182
+ - "What's the timeline looking like?"
183
+
184
+ ### Prioritization (1-2 exchanges)
185
+ Force trade-offs:
186
+ - "Of everything we discussed, what's the core? What MUST be in v1?"
187
+ - "What can wait for v2?"
188
+
189
+ ### Confirmation (1 exchange)
190
+ Summarize back what you heard and confirm:
191
+ - "Let me play this back: you're building [X] that [does Y] for [users Z]. The core features are [A, B, C]. You're using [stack]. The biggest risk is [concern]. Did I get that right?"
192
+
193
+ ---
194
+
195
+ ## Domain-Aware Probing
196
+
197
+ When the user mentions a specific technology area (e.g., "React app", "REST API", "real-time chat"), use domain-specific follow-up questions to go deeper. General questions miss critical details that only matter in that domain.
198
+
199
+ See **[skills/shared/domain-probes.md](../shared/domain-probes.md)** for technology-specific probing patterns organized by domain (frontend frameworks, databases, APIs, auth, deployment, etc.). Reference those patterns when the conversation enters a technology-specific area rather than relying on generic follow-ups.
200
+
201
+ ---
202
+
203
+ ## Anti-Patterns
204
+
205
+ 1. **DO NOT** present a form and ask users to fill it in
206
+ 2. **DO NOT** ask all questions at once — have a conversation
207
+ 3. **DO NOT** assume you know what they want — ask
208
+ 4. **DO NOT** suggest technologies before understanding the problem
209
+ 5. **DO NOT** skip edge case exploration
210
+ 6. **DO NOT** accept vague answers — push for specifics
211
+ 7. **DO NOT** rush through questioning to get to planning
212
+ 8. **DO NOT** ignore concerns or hand-wave them away
213
+ 9. **DO NOT** lead the user toward a particular solution
214
+ 10. **DO NOT** forget to summarize and confirm understanding
215
+ 11. **DO NOT** ask what you already know — track what the user has stated and never re-ask it. If they said "I'm using React", do not later ask "Are you using a frontend framework?" If they said "PostgreSQL", do not ask "What database are you using?" Redundant questions waste exchanges and erode trust. Instead, build on what you know: "You mentioned React — are you using Next.js or plain CRA?"
@@ -0,0 +1,128 @@
1
+ <!-- canonical: ../../pbr/references/reading-verification.md -->
2
+ # Reading Verification Reports
3
+
4
+ A user-friendly guide to understanding verification results. For agent-facing patterns, see `verification-patterns.md`.
5
+
6
+ ---
7
+
8
+ ## What Verification Checks
9
+
10
+ After building a phase, Plan-Build-Run runs automated verification to check whether the code actually delivers what was planned. It checks every "must-have" from the plan through three layers:
11
+
12
+ ### Layer 1: Existence
13
+
14
+ **Question**: Does the file/function/route exist at all?
15
+
16
+ This is the most basic check. If the plan said "create `src/auth.ts`" — does that file exist on disk? If it said "add a `/login` route" — can we find it in the codebase?
17
+
18
+ **Common failures**: File was planned but never created, renamed to a different path, or deleted by a later task.
19
+
20
+ ### Layer 2: Substantiveness
21
+
22
+ **Question**: Is the code real, or just a stub/placeholder?
23
+
24
+ A file can exist but contain nothing useful — an empty function, a `throw new Error('Not implemented')`, or a component that just renders its own name. This layer catches those cases.
25
+
26
+ **Common failures**: Function body is empty, returns hardcoded test data, or only has a TODO comment.
27
+
28
+ ### Layer 3: Wiring
29
+
30
+ **Question**: Are the pieces connected to each other?
31
+
32
+ Code can exist and be real, but if nothing imports it or calls it, it's dead code. This layer checks that modules are imported where needed, middleware is applied to routes, and components are rendered in the right places.
33
+
34
+ **Common failures**: Module created but never imported, route handler exists but not registered in the router, component built but not used in any page.
35
+
36
+ ---
37
+
38
+ ## Reading the Verification Report
39
+
40
+ A `VERIFICATION.md` file looks like this:
41
+
42
+ ```
43
+ Status: passed (or gaps_found)
44
+ Must-haves checked: 8
45
+ Passed: 7
46
+ Gaps: 1
47
+ ```
48
+
49
+ ### When status is "passed"
50
+
51
+ All must-haves passed all three layers. The phase is complete and you can move on.
52
+
53
+ ### When status is "gaps_found"
54
+
55
+ One or more must-haves failed verification. Each gap includes:
56
+
57
+ - **Must-have**: What was expected (from the plan)
58
+ - **Failed layer**: Which check failed (existence, substantiveness, or wiring)
59
+ - **Evidence**: The specific command output or file content that shows the failure
60
+ - **Suggested fix**: What to do about it
61
+
62
+ ---
63
+
64
+ ## Common Gap Types and What They Mean
65
+
66
+ ### "File not found"
67
+ **Layer**: Existence
68
+ **Meaning**: A planned file was never created or was created at a different path.
69
+ **Fix**: Usually a simple oversight — the executor may have created it with a slightly different name. Check the phase directory for similar files.
70
+
71
+ ### "Function is a stub"
72
+ **Layer**: Substantiveness
73
+ **Meaning**: The file exists but the implementation is incomplete. Common indicators: empty function bodies, `TODO` comments, placeholder return values.
74
+ **Fix**: The executor may have run out of context before finishing. Re-running the build usually resolves this.
75
+
76
+ ### "Module not imported"
77
+ **Layer**: Wiring
78
+ **Meaning**: The code was written correctly but nothing uses it. The import statement is missing from the consuming file.
79
+ **Fix**: Usually a one-line fix — add the import statement to the right file.
80
+
81
+ ### "Test has no assertions"
82
+ **Layer**: Substantiveness
83
+ **Meaning**: A test file exists but doesn't actually test anything — empty `it()` blocks or `expect(true).toBe(true)`.
84
+ **Fix**: Real test assertions need to be written. This usually happens when TDD mode is off and the executor generates placeholder tests.
85
+
86
+ ### "Route not registered"
87
+ **Layer**: Wiring
88
+ **Meaning**: A route handler function was created but never mounted on the Express/Fastify/etc. router.
89
+ **Fix**: Add the route registration (usually `app.use()` or `router.get()`) to the main app file.
90
+
91
+ ---
92
+
93
+ ## How to Close Gaps
94
+
95
+ You have several options:
96
+
97
+ ### Option 1: Re-run the build (most common)
98
+ ```
99
+ /pbr:build <N>
100
+ ```
101
+ The executor will detect what's already complete and only fix what's missing.
102
+
103
+ ### Option 2: Create a gap-closure plan
104
+ ```
105
+ /pbr:plan <N> --gaps
106
+ ```
107
+ This creates a focused plan that targets only the specific gaps found during verification.
108
+
109
+ ### Option 3: Manual fix
110
+ For small gaps (like a missing import), you can fix the code yourself and then re-run verification:
111
+ ```
112
+ /pbr:review <N>
113
+ ```
114
+
115
+ ### Option 4: Override (for false positives)
116
+ If verification flagged something that's actually correct (e.g., a function intentionally returns an empty array), you can override the gap during review. The override is recorded in the verification report.
117
+
118
+ ---
119
+
120
+ ## Understanding Verification Attempts
121
+
122
+ The verification report tracks `attempt` count. If a phase has been verified multiple times:
123
+
124
+ - **Attempt 1**: Normal first verification
125
+ - **Attempt 2**: Gaps were found and fixed, re-verifying
126
+ - **Attempt 3+**: Escalation — Plan-Build-Run will offer additional options like accepting with gaps, switching to debug mode, or re-planning the phase
127
+
128
+ Multiple attempts don't mean something is wrong — complex phases often need a round of gap-closure before passing.