@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,195 @@
1
+ ---
2
+ name: todo
3
+ description: "File-based persistent todos. Add, list, complete — survives sessions."
4
+ argument-hint: "add <description> | list [theme] | done <NNN>"
5
+ ---
6
+
7
+ ## Step 0 — Immediate Output
8
+
9
+ **Before ANY tool calls**, display this banner:
10
+
11
+ ```
12
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
13
+ PLAN-BUILD-RUN ► TODO
14
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
15
+ ```
16
+
17
+ Then proceed to Step 1.
18
+
19
+ # /pbr:todo — Persistent File-Based Todos
20
+
21
+ ## Why File-Based
22
+
23
+ Native Claude Code Tasks are session-scoped — they vanish when the conversation ends. Plan-Build-Run todos are individual `.md` files in `.planning/todos/` that persist across sessions, context resets, and compactions.
24
+
25
+ ## Subcommands
26
+
27
+ Parse `$ARGUMENTS` to determine the subcommand:
28
+
29
+ ### `add <description>`
30
+
31
+ 1. Ensure `.planning/todos/pending/` directory exists
32
+ 2. Generate NNN: scan **both** `.planning/todos/pending/` and `.planning/todos/done/` for the highest existing number, then increment by 1 (zero-padded to 3 digits)
33
+ 3. Generate slug: take the first ~4 meaningful words from the description, lowercase, hyphen-separated (e.g., "Add rate limiting to login" → `add-rate-limiting-login`)
34
+ 4. Infer theme from description (e.g., "auth" → security, "test" → testing, "UI" → frontend, "refactor" → quality)
35
+ 5. Check for duplicates — read existing pending todos, if a similar one exists, ask user via AskUserQuestion
36
+ 6. Create `.planning/todos/pending/{NNN}-{slug}.md`:
37
+
38
+ ```yaml
39
+ ---
40
+ title: "{description}"
41
+ status: pending
42
+ priority: P2
43
+ source: conversation
44
+ created: {YYYY-MM-DD}
45
+ theme: {inferred-theme}
46
+ ---
47
+
48
+ ## Goal
49
+
50
+ {description expanded into a clear goal statement}
51
+
52
+ ## Scope
53
+
54
+ {any relevant context from the current conversation, or bullet points of what's in/out of scope}
55
+
56
+ ## Acceptance Criteria
57
+
58
+ - [ ] {primary acceptance criterion derived from description}
59
+ ```
60
+
61
+ 7. Update STATE.md Pending Todos section
62
+
63
+ If the Write fails, display:
64
+ ```
65
+ ╔══════════════════════════════════════════════════════════════╗
66
+ ║ ERROR ║
67
+ ╚══════════════════════════════════════════════════════════════╝
68
+
69
+ Failed to write todo file.
70
+
71
+ **To fix:** Check that `.planning/todos/pending/` exists and is writable.
72
+ ```
73
+
74
+ 8. Confirm with branded output:
75
+ ```
76
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
77
+ PLAN-BUILD-RUN ► TODO ADDED ✓
78
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
79
+
80
+ **Todo {NNN}:** {description}
81
+
82
+ ───────────────────────────────────────────────────────────────
83
+
84
+ ## ▶ Next Up
85
+
86
+ **Work on it now** or see your task list
87
+
88
+ `/pbr:quick`
89
+
90
+ <sub>`/clear` first → fresh context window</sub>
91
+
92
+ ───────────────────────────────────────────────────────────────
93
+
94
+ **Also available:**
95
+ - `/pbr:todo list` — see all pending todos
96
+ - `/pbr:status` — see project status
97
+
98
+ ───────────────────────────────────────────────────────────────
99
+ ```
100
+
101
+ ### `list [theme]`
102
+
103
+ 1. Read all files in `.planning/todos/pending/`
104
+ 2. Parse frontmatter from each
105
+ 3. If theme filter provided, filter by theme
106
+ 4. Display as table:
107
+
108
+ ```
109
+ Pending Todos:
110
+ | # | Title | Priority | Theme | Created |
111
+ |---|-------|----------|-------|---------|
112
+ | 074 | Status-line customization options | P2 | capability | 2026-02-10 |
113
+ | 075 | Add WebSearch/WebFetch/Context7 to researcher | P2 | capability | 2026-02-10 |
114
+ ```
115
+
116
+ 5. Offer actions with branded routing:
117
+ ```
118
+ ───────────────────────────────────────────────────────────────
119
+
120
+ ## ▶ Next Up
121
+
122
+ **Pick a todo** — mark one done or start working
123
+
124
+ `/pbr:todo done <NNN>`
125
+
126
+ ───────────────────────────────────────────────────────────────
127
+
128
+ **Also available:**
129
+ - `/pbr:quick` — work on one now
130
+ - `/pbr:status` — see project status
131
+
132
+ ───────────────────────────────────────────────────────────────
133
+ ```
134
+
135
+ ### `done <NNN>`
136
+
137
+ 1. Find `.planning/todos/pending/{NNN}-*.md` (match by number prefix)
138
+ 2. If not found, display:
139
+ ```
140
+ ╔══════════════════════════════════════════════════════════════╗
141
+ ║ ERROR ║
142
+ ╚══════════════════════════════════════════════════════════════╝
143
+
144
+ Todo {NNN} not found in pending todos.
145
+
146
+ **To fix:** Run `/pbr:todo list` to see available numbers.
147
+ ```
148
+ 3. Ensure `.planning/todos/done/` directory exists (create if needed)
149
+ 4. Read the pending file content
150
+ 5. Update frontmatter in the content: set `status: done` and add `completed: {YYYY-MM-DD}`
151
+ 6. Write the updated content to `.planning/todos/done/{NNN}-{slug}.md`
152
+ 7. Delete the original file from `.planning/todos/pending/` (use `rm` via Bash)
153
+ 8. Update STATE.md
154
+ 9. Confirm with branded output:
155
+ ```
156
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
157
+ PLAN-BUILD-RUN ► TODO COMPLETED ✓
158
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
159
+
160
+ **Todo {NNN}:** {title}
161
+
162
+ ───────────────────────────────────────────────────────────────
163
+
164
+ ## ▶ Next Up
165
+
166
+ **See remaining tasks**
167
+
168
+ `/pbr:todo list`
169
+
170
+ <sub>`/clear` first → fresh context window</sub>
171
+
172
+ ───────────────────────────────────────────────────────────────
173
+
174
+ **Also available:**
175
+ - `/pbr:continue` — execute next logical step
176
+ - `/pbr:status` — see project status
177
+
178
+ ───────────────────────────────────────────────────────────────
179
+ ```
180
+
181
+ ### No arguments
182
+
183
+ Show a brief summary: count of pending todos, grouped by theme, plus usage hint.
184
+
185
+ ## State Integration
186
+
187
+ After any todo operation, update the "Pending Todos" section of STATE.md with the current count and list.
188
+
189
+ ## Git Integration
190
+
191
+ Reference: `skills/shared/commit-planning-docs.md` for the standard commit pattern.
192
+
193
+ If `planning.commit_docs: true` in config, commit todo changes:
194
+ - `docs(planning): add todo {NNN}`
195
+ - `docs(planning): complete todo {NNN}`
@@ -0,0 +1,53 @@
1
+ <!-- canonical: ../../pbr/templates/CONTEXT.md.tmpl -->
2
+ # CONTEXT.md Template
3
+
4
+ > Referenced by: begin skill (Step 9c), discuss skill, plan skill
5
+ > Created during /pbr:begin. Updated by /pbr:discuss and /pbr:plan --assumptions.
6
+
7
+ ## Structure
8
+
9
+ ```markdown
10
+ # Project Context
11
+
12
+ ## Locked Decisions
13
+
14
+ {Technology choices, architecture decisions, and constraints that are NON-NEGOTIABLE.
15
+ These MUST be honored by every plan and executor — no exceptions.}
16
+
17
+ | Decision | Rationale | Locked By |
18
+ |----------|-----------|-----------|
19
+ | {e.g., "Use TypeScript"} | {User preference, team skill} | User |
20
+ | {e.g., "PostgreSQL via Supabase"} | {Existing infrastructure} | User |
21
+
22
+ ## User Constraints
23
+
24
+ {Budget, timeline, skill level, hosting, team size — factors that shape planning}
25
+
26
+ - {e.g., "Solo developer, no team"}
27
+ - {e.g., "Deploy to Hetzner VPS"}
28
+ - {e.g., "Must work offline"}
29
+
30
+ ## Deferred Ideas
31
+
32
+ {Features explicitly moved to v2 or out-of-scope. Plans MUST NOT include these.}
33
+
34
+ | Idea | Reason Deferred |
35
+ |------|----------------|
36
+ | {feature} | {reason} |
37
+
38
+ ## Claude's Discretion Areas
39
+
40
+ {Areas where the planner can make implementation choices without asking the user.
41
+ Document the choice made and rationale when exercised.}
42
+
43
+ | Area | Choice Made | Rationale |
44
+ |------|------------|-----------|
45
+ | {e.g., "State management library"} | {e.g., "Zustand"} | {e.g., "Lightweight, fits project size"} |
46
+ ```
47
+
48
+ ## Rules
49
+
50
+ - Locked decisions are immutable once set — only the user can change them
51
+ - Deferred ideas must NEVER appear in plans
52
+ - Discretion areas are documented when the planner exercises choice
53
+ - Phase-level CONTEXT.md files (in phase directories) override project-level for that phase
@@ -0,0 +1,152 @@
1
+ <!-- canonical: ../../pbr/templates/INTEGRATION-REPORT.md.tmpl -->
2
+ <!-- Source: agents/integration-checker.md | Purpose: Output format for cross-phase integration verification reports -->
3
+
4
+ ```markdown
5
+ # Integration Verification Report
6
+
7
+ > Verified: {date}
8
+ > Phases checked: {comma-separated list of phase IDs}
9
+ > Status: **{INTEGRATED | GAPS_FOUND}**
10
+
11
+ ## Phase Dependency Graph
12
+
13
+ ```
14
+ Phase 01 (Setup) ──provides──→ Phase 02 (Auth)
15
+ Phase 01 (Setup) ──provides──→ Phase 03 (Core)
16
+ Phase 02 (Auth) ──provides──→ Phase 03 (Core)
17
+ Phase 02 (Auth) ──provides──→ Phase 04 (Frontend)
18
+ Phase 03 (Core) ──provides──→ Phase 04 (Frontend)
19
+ ```
20
+
21
+ ## 1. Export/Import Wiring
22
+
23
+ ### Export Status Summary
24
+
25
+ | Phase | Total Exports | Consumed | Orphaned | Unused Imports | Mismatched |
26
+ |-------|--------------|----------|----------|---------------|------------|
27
+ | 01 | {n} | {n} | {n} | {n} | {n} |
28
+ | 02 | {n} | {n} | {n} | {n} | {n} |
29
+
30
+ ### Detailed Export Map
31
+
32
+ | Export | Source Phase | Source File:Line | Consumer(s) | Status |
33
+ |--------|------------|-----------------|-------------|--------|
34
+ | DatabaseConnection | 01 | src/db/conn.ts:5 | Phase 02, 03 | CONSUMED |
35
+ | ConfigLoader | 01 | src/config/index.ts:12 | Phase 03 | CONSUMED |
36
+ | ThemeProvider | 04 | src/theme/provider.tsx:8 | - | ORPHANED |
37
+
38
+ ### Orphaned Exports (created but never used)
39
+
40
+ | Export | Phase | File | Line | Likely Intended Consumer |
41
+ |--------|-------|------|------|------------------------|
42
+ | {name} | {phase} | {file} | {line} | {best guess or "unknown"} |
43
+
44
+ ### Unused Imports (imported but symbol never called)
45
+
46
+ | File | Imported Symbol | Source Module | Line |
47
+ |------|----------------|--------------|------|
48
+ | {file} | {symbol} | {module} | {line} |
49
+
50
+ ## 2. API Coverage
51
+
52
+ ### Route Coverage Matrix
53
+
54
+ | Route | Method | Handler | Frontend Caller | Auth | Status |
55
+ |-------|--------|---------|----------------|------|--------|
56
+ | /api/users | GET | users.ts:12 | UserList.tsx:34 | YES | COVERED |
57
+ | /api/users/:id | DELETE | users.ts:45 | - | YES | NO_CALLER |
58
+ | /api/settings | PUT | - | Settings.tsx:22 | - | NO_HANDLER |
59
+
60
+ ### Uncovered Routes (backend exists, no frontend caller)
61
+
62
+ | Route | Method | Handler | Possible Reason |
63
+ |-------|--------|---------|----------------|
64
+ | {route} | {method} | {file:line} | {guess: future feature, admin only, etc.} |
65
+
66
+ ### Missing Handlers (frontend calls, no backend route)
67
+
68
+ | Frontend File | Calls | Expected Route | Expected Method |
69
+ |--------------|-------|---------------|----------------|
70
+ | {file} | fetch('/api/X') | /api/X | GET |
71
+
72
+ ## 3. Auth Protection
73
+
74
+ ### Route Protection Summary
75
+
76
+ | Category | Total | Protected | Unprotected | Status |
77
+ |----------|-------|-----------|-------------|--------|
78
+ | API Routes | {n} | {n} | {n} | {OK/ISSUES} |
79
+ | Pages | {n} | {n} | {n} | {OK/ISSUES} |
80
+ | Public Routes | {n} | - | {n} | OK |
81
+
82
+ ### Unprotected Routes (SECURITY ISSUES)
83
+
84
+ | Route | Method | Handler | Should Protect | Evidence |
85
+ |-------|--------|---------|---------------|----------|
86
+ | {route} | {method} | {file:line} | YES | No auth middleware in chain |
87
+
88
+ ### Auth Flow Completeness
89
+
90
+ | Step | Status | Evidence |
91
+ |------|--------|----------|
92
+ | Login form exists | {YES/NO} | {file:line} |
93
+ | Auth API called | {YES/NO} | {file:line} |
94
+ | Token/session created | {YES/NO} | {file:line} |
95
+ | Token sent with requests | {YES/NO} | {file:line} |
96
+ | Auth middleware applied | {YES/NO} | {file:line} |
97
+ | Unauthorized redirect | {YES/NO} | {file:line} |
98
+
99
+ ## 4. End-to-End Flows
100
+
101
+ ### Flow 1: {Flow Name} - {STATUS}
102
+
103
+ | Step | Description | Component | Exists | Connected to Next | Evidence |
104
+ |------|------------|-----------|--------|-------------------|----------|
105
+ | 1 | {step desc} | {file} | YES | YES | import at L12, call at L45 |
106
+ | 2 | {step desc} | {file} | YES | NO | handler exists but not called |
107
+ | 3 | {step desc} | - | NO | - | File not found |
108
+
109
+ **Break point**: {If BROKEN, where exactly the chain breaks}
110
+ **Impact**: {What user action fails because of this break}
111
+
112
+ ### Flow 2: {Flow Name} - {STATUS}
113
+ ...
114
+
115
+ ## 5. Integration Issues Summary
116
+
117
+ ### Critical Issues (system cannot function)
118
+
119
+ 1. **{Issue}**: {description with evidence}
120
+ - Impact: {what breaks}
121
+ - Fix: {recommended action}
122
+
123
+ ### Warnings (partial functionality)
124
+
125
+ 1. **{Issue}**: {description with evidence}
126
+ - Impact: {what's degraded}
127
+ - Fix: {recommended action}
128
+
129
+ ### Info (cleanup opportunities)
130
+
131
+ 1. **{Issue}**: {description}
132
+ - Fix: {recommended action}
133
+
134
+ ## 6. Integration Score
135
+
136
+ | Category | Items Checked | Passed | Failed | Score |
137
+ |----------|--------------|--------|--------|-------|
138
+ | Export wiring | {n} | {n} | {n} | {%} |
139
+ | API coverage | {n} | {n} | {n} | {%} |
140
+ | Auth protection | {n} | {n} | {n} | {%} |
141
+ | E2E flows | {n} | {n} | {n} | {%} |
142
+ | **Overall** | {n} | {n} | {n} | **{%}** |
143
+
144
+ ## Recommendations
145
+
146
+ {Prioritized list of actions to fix integration issues}
147
+
148
+ 1. **[CRITICAL]** {Most important fix}
149
+ 2. **[CRITICAL]** {Second most important}
150
+ 3. **[WARNING]** {Important but not blocking}
151
+ 4. ...
152
+ ```
@@ -0,0 +1,98 @@
1
+ <!-- canonical: ../../pbr/templates/RESEARCH-SUMMARY.md.tmpl -->
2
+ # Research Summary
3
+
4
+ > Synthesized: {date}
5
+ > Input documents: {count}
6
+ > Sources: {list of document names/paths}
7
+
8
+ ## Executive Summary
9
+
10
+ {3-5 sentences maximum. What was researched, the single most important conclusion, and the recommended approach. This paragraph should give a planner enough context to start planning without reading further.}
11
+
12
+ ## Recommended Stack
13
+
14
+ {Only include if project-level synthesis. For phase-level, skip this section.}
15
+
16
+ | Layer | Choice | Version | Confidence | Alternatives | Source |
17
+ |-------|--------|---------|------------|-------------|--------|
18
+ | Runtime | {Node.js} | {20.x} | HIGH | {Bun, Deno} | {Doc A, Doc B} |
19
+ | Framework | {Next.js} | {14.x} | HIGH | {Remix, Astro} | {Doc A} |
20
+ | Database | {PostgreSQL} | {16.x} | HIGH | {MySQL} | {Doc A, Doc C} |
21
+ | ORM | {Prisma} | {5.x} | MEDIUM | {Drizzle, TypeORM} | {Doc B} |
22
+ | Auth | {NextAuth.js} | {5.x} | MEDIUM | {Clerk, Auth0} | {Doc A} |
23
+ | Hosting | {Vercel} | - | MEDIUM | {AWS, Railway} | {Doc C} |
24
+ | Testing | {Vitest} | {1.x} | HIGH | {Jest} | {Doc B} |
25
+
26
+ ### Stack Rationale
27
+
28
+ {Brief explanation of why this combination. 2-3 sentences.}
29
+
30
+ ## Architecture Recommendations
31
+
32
+ {Key architectural decisions informed by research. Use bullet points.}
33
+
34
+ - **Pattern**: {Recommended pattern with rationale}
35
+ - **Data flow**: {How data should move through the system}
36
+ - **Separation**: {How to organize the code}
37
+ - **State**: {How to manage state}
38
+
39
+ ## Key Patterns
40
+
41
+ {Patterns to follow during implementation.}
42
+
43
+ | Pattern | When to Use | Example |
44
+ |---------|------------|---------|
45
+ | {Repository} | {Database access} | {Brief code hint} |
46
+ | {Middleware} | {Auth, logging, validation} | {Brief code hint} |
47
+ | {DTO validation} | {API input/output} | {Zod schemas} |
48
+
49
+ ## Pitfalls & Warnings
50
+
51
+ {Ranked by severity. These are the things most likely to cause problems.}
52
+
53
+ | # | Pitfall | Severity | Source | Mitigation |
54
+ |---|---------|----------|--------|------------|
55
+ | 1 | {Most critical pitfall} | CRITICAL | {Doc A} | {How to avoid} |
56
+ | 2 | {Second pitfall} | HIGH | {Doc B, Doc C} | {How to avoid} |
57
+ | 3 | {Third pitfall} | MEDIUM | {Doc A} | {How to avoid} |
58
+
59
+ ## Contradictions Resolved
60
+
61
+ {Where input documents disagreed and how it was resolved.}
62
+
63
+ | Topic | Position A | Position B | Resolution | Basis |
64
+ |-------|-----------|-----------|------------|-------|
65
+ | {Database} | PostgreSQL (Doc A, C) | MongoDB (Doc B) | PostgreSQL | Majority + S2 source |
66
+ | {Auth} | JWT (Doc A, B) | Sessions (Doc C) | JWT | Majority + better for API |
67
+
68
+ {If any contradictions could not be resolved:}
69
+
70
+ ### Unresolved: {Topic}
71
+
72
+ **Options**: {A} vs {B}
73
+ **Trade-offs**: {A is better for X, B is better for Y}
74
+ **Recommendation**: {best guess} `[NEEDS DECISION]`
75
+
76
+ ## Open Questions
77
+
78
+ {Things that none of the research documents could definitively answer.}
79
+
80
+ 1. {Question} -- Impact: {what planning/implementation is blocked by this}
81
+ 2. {Question} -- Impact: {what planning/implementation is blocked by this}
82
+
83
+ ## Additional Notes
84
+
85
+ {P3 (Nice to Know) items. Brief bullet points only.}
86
+
87
+ - {Performance tip from Doc A}
88
+ - {Future consideration from Doc C}
89
+ - {Alternative approach worth noting from Doc B}
90
+
91
+ ## Sources
92
+
93
+ {Consolidated source list from all input documents.}
94
+
95
+ | # | Document | Key Contribution | Confidence |
96
+ |---|----------|-----------------|------------|
97
+ | 1 | {path/name} | {what it contributed} | {overall confidence} |
98
+ | 2 | {path/name} | {what it contributed} | {overall confidence} |
@@ -0,0 +1,41 @@
1
+ <!-- canonical: ../../pbr/templates/ROADMAP.md.tmpl -->
2
+ # Project Roadmap
3
+
4
+ > Generated: {date}
5
+ > Total phases: {n}
6
+ > Estimated plans: {n}
7
+
8
+ ## Phase Overview
9
+
10
+ | Phase | Name | Goal | Plans | Wave | Status |
11
+ |-------|------|------|-------|------|--------|
12
+ | 01 | Project Setup | Development environment ready | 2 | 1 | pending |
13
+ | 02 | Authentication | Users can sign in | 3 | 1 | pending |
14
+ | 03 | Core Models | Data layer complete | 4 | 2 | pending |
15
+ | ... | ... | ... | ... | ... | ... |
16
+
17
+ ## Dependency Graph
18
+
19
+ ```
20
+ Phase 01 ──→ Phase 02 ──→ Phase 04
21
+ └──→ Phase 03 ──→ Phase 05
22
+ └──→ Phase 04
23
+ ```
24
+
25
+ ## Phase Details
26
+
27
+ ### Phase 01: Project Setup
28
+
29
+ **Goal**: {goal statement}
30
+ **Must-Haves**:
31
+ - {truth 1}
32
+ - {truth 2}
33
+
34
+ **Planned Plans**:
35
+ 1. {plan name} (Wave 1, autonomous)
36
+ 2. {plan name} (Wave 1, autonomous)
37
+
38
+ **Dependencies**: None (starting phase)
39
+
40
+ ### Phase 02: Authentication
41
+ ...
@@ -0,0 +1,82 @@
1
+ <!-- canonical: ../../pbr/templates/SUMMARY.md.tmpl -->
2
+ # SUMMARY.md Template
3
+
4
+ > Referenced by: executor agent, build skill, review skill
5
+ > Do not edit this template during execution — copy the structure into your output.
6
+
7
+ ## Frontmatter (YAML)
8
+
9
+ ```yaml
10
+ ---
11
+ phase: "{phase_id}"
12
+ plan: "{plan_id}"
13
+ status: "complete" # complete | partial | checkpoint
14
+ subsystem: "{main subsystem affected}"
15
+ tags:
16
+ - "{tag1}"
17
+ - "{tag2}"
18
+ requires: # What this plan needs from other plans
19
+ - "{plan_id}: {artifact}"
20
+ provides: # What this plan produces for other plans
21
+ - "{export/artifact description}"
22
+ affects:
23
+ - "{affected area 1}"
24
+ - "{affected area 2}"
25
+ tech_stack:
26
+ - "{technology used}"
27
+ key_files:
28
+ - "{file1}: {what it does}"
29
+ - "{file2}: {what it does}"
30
+ key_decisions:
31
+ - "{decision 1}: {rationale}"
32
+ patterns:
33
+ - "{pattern used}: {where}"
34
+ metrics:
35
+ duration_minutes: {n}
36
+ tasks_completed: {n}
37
+ tasks_total: {n}
38
+ commits: {n}
39
+ files_created: {n}
40
+ files_modified: {n}
41
+ deferred:
42
+ - "{thing noticed but not implemented}"
43
+ self_check_failures: # Only present if self-check found issues
44
+ - "{failure description}"
45
+ ---
46
+ ```
47
+
48
+ ## Body Structure
49
+
50
+ ```markdown
51
+ # Plan Summary: {plan_id}
52
+
53
+ ## What Was Built
54
+
55
+ {2-3 paragraph description of what was accomplished}
56
+
57
+ ## Task Results
58
+
59
+ | Task | Status | Commit | Files | Verify |
60
+ |------|--------|--------|-------|--------|
61
+ | {task_id}: {name} | done | {hash} | {count} | passed |
62
+
63
+ ## Key Implementation Details
64
+
65
+ {Important details about HOW things were implemented that future plans need to know}
66
+
67
+ ## Known Issues
68
+
69
+ {Any issues discovered during execution that weren't blockers but should be tracked}
70
+
71
+ ## Dependencies Provided
72
+
73
+ {What other plans can now depend on — exports, files, APIs created}
74
+ ```
75
+
76
+ ## Status Values
77
+
78
+ | Status | Meaning |
79
+ |--------|---------|
80
+ | `complete` | All tasks completed successfully |
81
+ | `partial` | Some tasks completed, execution stopped |
82
+ | `checkpoint` | Execution paused at a checkpoint task, waiting for human |