@sienklogic/plan-build-run 2.0.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 (221) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/CLAUDE.md +149 -0
  3. package/LICENSE +21 -0
  4. package/README.md +247 -0
  5. package/dashboard/bin/cli.js +25 -0
  6. package/dashboard/package.json +34 -0
  7. package/dashboard/public/.gitkeep +0 -0
  8. package/dashboard/public/css/layout.css +406 -0
  9. package/dashboard/public/css/status-colors.css +98 -0
  10. package/dashboard/public/js/htmx-title.js +5 -0
  11. package/dashboard/public/js/sidebar-toggle.js +20 -0
  12. package/dashboard/src/app.js +78 -0
  13. package/dashboard/src/middleware/errorHandler.js +52 -0
  14. package/dashboard/src/middleware/notFoundHandler.js +9 -0
  15. package/dashboard/src/repositories/planning.repository.js +128 -0
  16. package/dashboard/src/routes/events.routes.js +40 -0
  17. package/dashboard/src/routes/index.routes.js +31 -0
  18. package/dashboard/src/routes/pages.routes.js +195 -0
  19. package/dashboard/src/server.js +42 -0
  20. package/dashboard/src/services/dashboard.service.js +222 -0
  21. package/dashboard/src/services/phase.service.js +167 -0
  22. package/dashboard/src/services/project.service.js +57 -0
  23. package/dashboard/src/services/roadmap.service.js +171 -0
  24. package/dashboard/src/services/sse.service.js +58 -0
  25. package/dashboard/src/services/todo.service.js +254 -0
  26. package/dashboard/src/services/watcher.service.js +48 -0
  27. package/dashboard/src/views/coming-soon.ejs +11 -0
  28. package/dashboard/src/views/error.ejs +13 -0
  29. package/dashboard/src/views/index.ejs +5 -0
  30. package/dashboard/src/views/layout.ejs +1 -0
  31. package/dashboard/src/views/partials/dashboard-content.ejs +77 -0
  32. package/dashboard/src/views/partials/footer.ejs +3 -0
  33. package/dashboard/src/views/partials/head.ejs +21 -0
  34. package/dashboard/src/views/partials/header.ejs +12 -0
  35. package/dashboard/src/views/partials/layout-bottom.ejs +15 -0
  36. package/dashboard/src/views/partials/layout-top.ejs +8 -0
  37. package/dashboard/src/views/partials/phase-content.ejs +181 -0
  38. package/dashboard/src/views/partials/phases-content.ejs +117 -0
  39. package/dashboard/src/views/partials/roadmap-content.ejs +142 -0
  40. package/dashboard/src/views/partials/sidebar.ejs +38 -0
  41. package/dashboard/src/views/partials/todo-create-content.ejs +53 -0
  42. package/dashboard/src/views/partials/todo-detail-content.ejs +38 -0
  43. package/dashboard/src/views/partials/todos-content.ejs +53 -0
  44. package/dashboard/src/views/phase-detail.ejs +5 -0
  45. package/dashboard/src/views/phases.ejs +5 -0
  46. package/dashboard/src/views/roadmap.ejs +5 -0
  47. package/dashboard/src/views/todo-create.ejs +5 -0
  48. package/dashboard/src/views/todo-detail.ejs +5 -0
  49. package/dashboard/src/views/todos.ejs +5 -0
  50. package/package.json +57 -0
  51. package/plugins/pbr/.claude-plugin/plugin.json +13 -0
  52. package/plugins/pbr/UI-CONSISTENCY-GAPS.md +61 -0
  53. package/plugins/pbr/agents/codebase-mapper.md +271 -0
  54. package/plugins/pbr/agents/debugger.md +281 -0
  55. package/plugins/pbr/agents/executor.md +407 -0
  56. package/plugins/pbr/agents/general.md +164 -0
  57. package/plugins/pbr/agents/integration-checker.md +141 -0
  58. package/plugins/pbr/agents/plan-checker.md +280 -0
  59. package/plugins/pbr/agents/planner.md +358 -0
  60. package/plugins/pbr/agents/researcher.md +363 -0
  61. package/plugins/pbr/agents/synthesizer.md +230 -0
  62. package/plugins/pbr/agents/verifier.md +454 -0
  63. package/plugins/pbr/commands/begin.md +5 -0
  64. package/plugins/pbr/commands/build.md +5 -0
  65. package/plugins/pbr/commands/config.md +5 -0
  66. package/plugins/pbr/commands/continue.md +5 -0
  67. package/plugins/pbr/commands/debug.md +5 -0
  68. package/plugins/pbr/commands/discuss.md +5 -0
  69. package/plugins/pbr/commands/explore.md +5 -0
  70. package/plugins/pbr/commands/health.md +5 -0
  71. package/plugins/pbr/commands/help.md +5 -0
  72. package/plugins/pbr/commands/import.md +5 -0
  73. package/plugins/pbr/commands/milestone.md +5 -0
  74. package/plugins/pbr/commands/note.md +5 -0
  75. package/plugins/pbr/commands/pause.md +5 -0
  76. package/plugins/pbr/commands/plan.md +5 -0
  77. package/plugins/pbr/commands/quick.md +5 -0
  78. package/plugins/pbr/commands/resume.md +5 -0
  79. package/plugins/pbr/commands/review.md +5 -0
  80. package/plugins/pbr/commands/scan.md +5 -0
  81. package/plugins/pbr/commands/setup.md +5 -0
  82. package/plugins/pbr/commands/status.md +5 -0
  83. package/plugins/pbr/commands/todo.md +5 -0
  84. package/plugins/pbr/contexts/dev.md +27 -0
  85. package/plugins/pbr/contexts/research.md +28 -0
  86. package/plugins/pbr/contexts/review.md +36 -0
  87. package/plugins/pbr/hooks/hooks.json +183 -0
  88. package/plugins/pbr/references/agent-anti-patterns.md +24 -0
  89. package/plugins/pbr/references/agent-interactions.md +134 -0
  90. package/plugins/pbr/references/agent-teams.md +54 -0
  91. package/plugins/pbr/references/checkpoints.md +157 -0
  92. package/plugins/pbr/references/common-bug-patterns.md +13 -0
  93. package/plugins/pbr/references/continuation-format.md +212 -0
  94. package/plugins/pbr/references/deviation-rules.md +112 -0
  95. package/plugins/pbr/references/git-integration.md +226 -0
  96. package/plugins/pbr/references/integration-patterns.md +117 -0
  97. package/plugins/pbr/references/model-profiles.md +99 -0
  98. package/plugins/pbr/references/model-selection.md +31 -0
  99. package/plugins/pbr/references/pbr-rules.md +193 -0
  100. package/plugins/pbr/references/plan-authoring.md +181 -0
  101. package/plugins/pbr/references/plan-format.md +283 -0
  102. package/plugins/pbr/references/planning-config.md +213 -0
  103. package/plugins/pbr/references/questioning.md +214 -0
  104. package/plugins/pbr/references/reading-verification.md +127 -0
  105. package/plugins/pbr/references/stub-patterns.md +160 -0
  106. package/plugins/pbr/references/subagent-coordination.md +119 -0
  107. package/plugins/pbr/references/ui-formatting.md +399 -0
  108. package/plugins/pbr/references/verification-patterns.md +198 -0
  109. package/plugins/pbr/references/wave-execution.md +95 -0
  110. package/plugins/pbr/scripts/auto-continue.js +80 -0
  111. package/plugins/pbr/scripts/check-dangerous-commands.js +136 -0
  112. package/plugins/pbr/scripts/check-doc-sprawl.js +102 -0
  113. package/plugins/pbr/scripts/check-phase-boundary.js +196 -0
  114. package/plugins/pbr/scripts/check-plan-format.js +270 -0
  115. package/plugins/pbr/scripts/check-roadmap-sync.js +252 -0
  116. package/plugins/pbr/scripts/check-skill-workflow.js +262 -0
  117. package/plugins/pbr/scripts/check-state-sync.js +476 -0
  118. package/plugins/pbr/scripts/check-subagent-output.js +144 -0
  119. package/plugins/pbr/scripts/config-schema.json +251 -0
  120. package/plugins/pbr/scripts/context-budget-check.js +287 -0
  121. package/plugins/pbr/scripts/event-handler.js +151 -0
  122. package/plugins/pbr/scripts/event-logger.js +92 -0
  123. package/plugins/pbr/scripts/hook-logger.js +76 -0
  124. package/plugins/pbr/scripts/hooks-schema.json +79 -0
  125. package/plugins/pbr/scripts/log-subagent.js +152 -0
  126. package/plugins/pbr/scripts/log-tool-failure.js +88 -0
  127. package/plugins/pbr/scripts/pbr-tools.js +1301 -0
  128. package/plugins/pbr/scripts/post-write-dispatch.js +66 -0
  129. package/plugins/pbr/scripts/post-write-quality.js +207 -0
  130. package/plugins/pbr/scripts/pre-bash-dispatch.js +56 -0
  131. package/plugins/pbr/scripts/pre-write-dispatch.js +62 -0
  132. package/plugins/pbr/scripts/progress-tracker.js +228 -0
  133. package/plugins/pbr/scripts/session-cleanup.js +254 -0
  134. package/plugins/pbr/scripts/status-line.js +285 -0
  135. package/plugins/pbr/scripts/suggest-compact.js +119 -0
  136. package/plugins/pbr/scripts/task-completed.js +45 -0
  137. package/plugins/pbr/scripts/track-context-budget.js +119 -0
  138. package/plugins/pbr/scripts/validate-commit.js +200 -0
  139. package/plugins/pbr/scripts/validate-plugin-structure.js +172 -0
  140. package/plugins/pbr/skills/begin/SKILL.md +545 -0
  141. package/plugins/pbr/skills/begin/templates/PROJECT.md.tmpl +33 -0
  142. package/plugins/pbr/skills/begin/templates/REQUIREMENTS.md.tmpl +18 -0
  143. package/plugins/pbr/skills/begin/templates/STATE.md.tmpl +49 -0
  144. package/plugins/pbr/skills/begin/templates/config.json.tmpl +63 -0
  145. package/plugins/pbr/skills/begin/templates/researcher-prompt.md.tmpl +19 -0
  146. package/plugins/pbr/skills/begin/templates/roadmap-prompt.md.tmpl +30 -0
  147. package/plugins/pbr/skills/begin/templates/synthesis-prompt.md.tmpl +16 -0
  148. package/plugins/pbr/skills/build/SKILL.md +962 -0
  149. package/plugins/pbr/skills/config/SKILL.md +241 -0
  150. package/plugins/pbr/skills/continue/SKILL.md +127 -0
  151. package/plugins/pbr/skills/debug/SKILL.md +489 -0
  152. package/plugins/pbr/skills/debug/templates/continuation-prompt.md.tmpl +16 -0
  153. package/plugins/pbr/skills/debug/templates/initial-investigation-prompt.md.tmpl +27 -0
  154. package/plugins/pbr/skills/discuss/SKILL.md +338 -0
  155. package/plugins/pbr/skills/discuss/templates/CONTEXT.md.tmpl +61 -0
  156. package/plugins/pbr/skills/discuss/templates/decision-categories.md +9 -0
  157. package/plugins/pbr/skills/explore/SKILL.md +362 -0
  158. package/plugins/pbr/skills/health/SKILL.md +186 -0
  159. package/plugins/pbr/skills/health/templates/check-pattern.md.tmpl +30 -0
  160. package/plugins/pbr/skills/health/templates/output-format.md.tmpl +63 -0
  161. package/plugins/pbr/skills/help/SKILL.md +140 -0
  162. package/plugins/pbr/skills/import/SKILL.md +490 -0
  163. package/plugins/pbr/skills/milestone/SKILL.md +673 -0
  164. package/plugins/pbr/skills/milestone/templates/audit-report.md.tmpl +48 -0
  165. package/plugins/pbr/skills/milestone/templates/stats-file.md.tmpl +30 -0
  166. package/plugins/pbr/skills/note/SKILL.md +212 -0
  167. package/plugins/pbr/skills/pause/SKILL.md +235 -0
  168. package/plugins/pbr/skills/pause/templates/continue-here.md.tmpl +71 -0
  169. package/plugins/pbr/skills/plan/SKILL.md +628 -0
  170. package/plugins/pbr/skills/plan/decimal-phase-calc.md +98 -0
  171. package/plugins/pbr/skills/plan/templates/checker-prompt.md.tmpl +21 -0
  172. package/plugins/pbr/skills/plan/templates/gap-closure-prompt.md.tmpl +32 -0
  173. package/plugins/pbr/skills/plan/templates/planner-prompt.md.tmpl +38 -0
  174. package/plugins/pbr/skills/plan/templates/researcher-prompt.md.tmpl +19 -0
  175. package/plugins/pbr/skills/plan/templates/revision-prompt.md.tmpl +23 -0
  176. package/plugins/pbr/skills/quick/SKILL.md +335 -0
  177. package/plugins/pbr/skills/resume/SKILL.md +388 -0
  178. package/plugins/pbr/skills/review/SKILL.md +652 -0
  179. package/plugins/pbr/skills/review/templates/debugger-prompt.md.tmpl +60 -0
  180. package/plugins/pbr/skills/review/templates/gap-planner-prompt.md.tmpl +40 -0
  181. package/plugins/pbr/skills/review/templates/verifier-prompt.md.tmpl +115 -0
  182. package/plugins/pbr/skills/scan/SKILL.md +269 -0
  183. package/plugins/pbr/skills/scan/templates/mapper-prompt.md.tmpl +201 -0
  184. package/plugins/pbr/skills/setup/SKILL.md +227 -0
  185. package/plugins/pbr/skills/shared/commit-planning-docs.md +35 -0
  186. package/plugins/pbr/skills/shared/config-loading.md +102 -0
  187. package/plugins/pbr/skills/shared/context-budget.md +40 -0
  188. package/plugins/pbr/skills/shared/context-loader-task.md +86 -0
  189. package/plugins/pbr/skills/shared/digest-select.md +79 -0
  190. package/plugins/pbr/skills/shared/domain-probes.md +125 -0
  191. package/plugins/pbr/skills/shared/error-reporting.md +79 -0
  192. package/plugins/pbr/skills/shared/gate-prompts.md +388 -0
  193. package/plugins/pbr/skills/shared/phase-argument-parsing.md +45 -0
  194. package/plugins/pbr/skills/shared/progress-display.md +53 -0
  195. package/plugins/pbr/skills/shared/revision-loop.md +81 -0
  196. package/plugins/pbr/skills/shared/state-loading.md +62 -0
  197. package/plugins/pbr/skills/shared/state-update.md +161 -0
  198. package/plugins/pbr/skills/shared/universal-anti-patterns.md +33 -0
  199. package/plugins/pbr/skills/status/SKILL.md +353 -0
  200. package/plugins/pbr/skills/todo/SKILL.md +181 -0
  201. package/plugins/pbr/templates/CONTEXT.md.tmpl +52 -0
  202. package/plugins/pbr/templates/INTEGRATION-REPORT.md.tmpl +151 -0
  203. package/plugins/pbr/templates/RESEARCH-SUMMARY.md.tmpl +97 -0
  204. package/plugins/pbr/templates/ROADMAP.md.tmpl +40 -0
  205. package/plugins/pbr/templates/SUMMARY.md.tmpl +81 -0
  206. package/plugins/pbr/templates/VERIFICATION-DETAIL.md.tmpl +116 -0
  207. package/plugins/pbr/templates/codebase/ARCHITECTURE.md.tmpl +98 -0
  208. package/plugins/pbr/templates/codebase/CONCERNS.md.tmpl +93 -0
  209. package/plugins/pbr/templates/codebase/CONVENTIONS.md.tmpl +104 -0
  210. package/plugins/pbr/templates/codebase/INTEGRATIONS.md.tmpl +78 -0
  211. package/plugins/pbr/templates/codebase/STACK.md.tmpl +78 -0
  212. package/plugins/pbr/templates/codebase/STRUCTURE.md.tmpl +80 -0
  213. package/plugins/pbr/templates/codebase/TESTING.md.tmpl +107 -0
  214. package/plugins/pbr/templates/continue-here.md.tmpl +73 -0
  215. package/plugins/pbr/templates/prompt-partials/phase-project-context.md.tmpl +37 -0
  216. package/plugins/pbr/templates/research/ARCHITECTURE.md.tmpl +124 -0
  217. package/plugins/pbr/templates/research/STACK.md.tmpl +71 -0
  218. package/plugins/pbr/templates/research/SUMMARY.md.tmpl +112 -0
  219. package/plugins/pbr/templates/research-outputs/phase-research.md.tmpl +81 -0
  220. package/plugins/pbr/templates/research-outputs/project-research.md.tmpl +99 -0
  221. package/plugins/pbr/templates/research-outputs/synthesis.md.tmpl +36 -0
@@ -0,0 +1,107 @@
1
+ <!-- Source: agents/codebase-mapper.md | Purpose: Output format for TESTING.md codebase analysis -->
2
+ # Testing Infrastructure
3
+
4
+ > Analyzed: {date}
5
+ > Test files found: {n}
6
+ > Coverage: {percentage if configured}
7
+
8
+ ## Framework
9
+
10
+ | Aspect | Value | Config |
11
+ |--------|-------|--------|
12
+ | Test runner | {Jest / Vitest / pytest / etc.} | {config file path} |
13
+ | Assertion library | {built-in / chai / etc.} | - |
14
+ | Mocking | {jest.mock / vitest.mock / unittest.mock} | - |
15
+ | Coverage tool | {c8 / istanbul / coverage.py} | {config} |
16
+
17
+ ## Running Tests
18
+
19
+ ```bash
20
+ # All tests
21
+ {npm test}
22
+
23
+ # Specific file
24
+ {npm test -- path/to/file}
25
+
26
+ # Watch mode
27
+ {npm run test:watch}
28
+
29
+ # Coverage
30
+ {npm run test:coverage}
31
+
32
+ # Specific pattern
33
+ {npm test -- --grep "pattern"}
34
+ ```
35
+
36
+ ## Test Organization
37
+
38
+ | Aspect | Pattern | Example |
39
+ |--------|---------|---------|
40
+ | Location | {co-located / separate directory} | `src/auth/auth.test.ts` or `tests/auth.test.ts` |
41
+ | File naming | {.test.ts / .spec.ts / test_.py} | `UserService.test.ts` |
42
+ | Describe blocks | {module/function/feature} | `describe('UserService')` |
43
+ | Test naming | {should X / it X / test_X} | `it('should return user by id')` |
44
+
45
+ ## Test Structure Pattern
46
+
47
+ ```{language}
48
+ // Pattern used in this codebase: {evidence file:line}
49
+ {actual test structure from codebase}
50
+ ```
51
+
52
+ ## Mocking Patterns
53
+
54
+ ### External Services
55
+
56
+ ```{language}
57
+ // How external services are mocked: {evidence file:line}
58
+ {actual mock pattern from codebase}
59
+ ```
60
+
61
+ ### Database
62
+
63
+ ```{language}
64
+ // How database is mocked/seeded: {evidence file:line}
65
+ {actual pattern from codebase}
66
+ ```
67
+
68
+ ### API Calls
69
+
70
+ ```{language}
71
+ // How API calls are mocked: {evidence file:line}
72
+ {actual pattern from codebase}
73
+ ```
74
+
75
+ ## Fixtures & Test Data
76
+
77
+ | Type | Location | Pattern |
78
+ |------|----------|---------|
79
+ | {Factories} | {tests/factories/} | {createUser(), createPost()} |
80
+ | {Fixtures} | {tests/fixtures/} | {JSON files} |
81
+ | {Seeds} | {prisma/seed.ts} | {Prisma seed script} |
82
+
83
+ ## Coverage Configuration
84
+
85
+ | Setting | Value |
86
+ |---------|-------|
87
+ | Threshold | {if configured: line %, branch %, function %} |
88
+ | Include | {file patterns} |
89
+ | Exclude | {file patterns} |
90
+ | Reporter | {text / html / lcov} |
91
+
92
+ ## E2E Testing
93
+
94
+ | Aspect | Value | Config |
95
+ |--------|-------|--------|
96
+ | Framework | {Playwright / Cypress / none} | {config file} |
97
+ | Location | {e2e/ or tests/e2e/} | - |
98
+ | Base URL | {config} | - |
99
+
100
+ ## Testing Gaps
101
+
102
+ | Area | Has Tests | Notes |
103
+ |------|-----------|-------|
104
+ | {Unit tests} | {YES/NO/PARTIAL} | {coverage details} |
105
+ | {Integration tests} | {YES/NO/PARTIAL} | {coverage details} |
106
+ | {E2E tests} | {YES/NO/PARTIAL} | {coverage details} |
107
+ | {API tests} | {YES/NO/PARTIAL} | {coverage details} |
@@ -0,0 +1,73 @@
1
+ <!-- Source: skills/pause/SKILL.md | Purpose: Handoff file for session pause/resume, placed in the active phase directory -->
2
+
3
+ # Template: Continue Here Handoff File
4
+ # Used by: pause/SKILL.md (Step 4)
5
+ # Output path: .planning/phases/{NN}-{phase-name}/.continue-here.md
6
+ # Variables: {datetime}, {hours}, {phase}, {plan}, {status}, {session work}, {remaining}, {decisions}, {blockers}, {context}, {next steps}
7
+
8
+ # Continue Here
9
+
10
+ **Paused:** {ISO datetime}
11
+ **Session duration:** ~{estimated hours} (based on git log timestamps)
12
+
13
+ ## Position
14
+
15
+ Phase: {N} -- {name}
16
+ Plan: {M} of {total} (or "between plans" / "phase complete")
17
+ Status: {in-progress / between-plans / reviewing / planning}
18
+
19
+ ## Completed This Session
20
+
21
+ {List of work done, with commit references where available}
22
+
23
+ - Plan {A}: {summary} (commit: {short hash})
24
+ - Plan {B}: {summary} (commit: {short hash})
25
+ - Quick task: {description} (commit: {short hash})
26
+
27
+ {If nothing was completed:}
28
+ - No plans completed this session (discussion/planning only)
29
+
30
+ ## Remaining
31
+
32
+ {What still needs to be done in this phase}
33
+
34
+ - Plan {C}: {brief description from plan frontmatter}
35
+ - Plan {D}: {brief description from plan frontmatter}
36
+
37
+ {If phase is complete:}
38
+ - Phase {N} is complete. Next: {review or next phase}
39
+
40
+ ## Decisions Made
41
+
42
+ {Key decisions from this session that affect future work}
43
+
44
+ - {decision 1}: {brief description}
45
+ - {decision 2}: {brief description}
46
+
47
+ {If no notable decisions:}
48
+ - No major decisions this session
49
+
50
+ ## Blockers
51
+
52
+ {Any issues preventing progress}
53
+
54
+ - {blocker description}
55
+
56
+ {If no blockers:}
57
+ - None
58
+
59
+ ## Context Notes
60
+
61
+ {Any additional context that would help the next session}
62
+
63
+ - {note about something tricky}
64
+ - {note about something to watch out for}
65
+ - {note about user preferences expressed during this session}
66
+
67
+ ## Next Steps
68
+
69
+ {Ordered list of what to do when resuming}
70
+
71
+ 1. {Specific first action with command}
72
+ 2. {Following action}
73
+ 3. {And so on}
@@ -0,0 +1,37 @@
1
+ <!-- Source: templates/prompt-partials/ | Purpose: Shared context blocks for agent prompt templates -->
2
+ <!-- Usage: Read this file and fill in placeholders, then include the result in agent prompts. -->
3
+ <!-- Orchestrators should omit sections that don't apply to their agent type. -->
4
+
5
+ <phase_context>
6
+ Phase: {NN} - {phase_name}
7
+ Phase directory: .planning/phases/{NN}-{slug}/
8
+ Phase goal: {goal from roadmap}
9
+ Phase requirements: {REQ-IDs mapped to this phase, or "None"}
10
+ Phase depends on: {dependency phases, or "None"}
11
+ Success criteria from roadmap:
12
+ {success criteria list, or omit if not applicable}
13
+ </phase_context>
14
+
15
+ <project_context>
16
+ {Decision Summary from .planning/CONTEXT.md — compact locked/deferred/discretion list}
17
+ {If no CONTEXT.md exists: "No project-level context."}
18
+
19
+ Phase-specific decisions:
20
+ {Decision Summary from .planning/phases/{NN}-{slug}/CONTEXT.md}
21
+ {If no phase-level CONTEXT.md exists: "No phase-specific discussion captured."}
22
+
23
+ Full context files (Read on-demand if you need scope/quality/integration details):
24
+ - .planning/CONTEXT.md
25
+ - .planning/phases/{NN}-{slug}/CONTEXT.md
26
+ </project_context>
27
+
28
+ <prior_work>
29
+ The following prior phase summaries are available. Read any you need via the Read tool.
30
+
31
+ | Phase | Summary File | Status | Key Exports |
32
+ |-------|-------------|--------|-------------|
33
+ {For each preceding phase SUMMARY.md:}
34
+ | {M} - {name} | {absolute path to SUMMARY.md} | {complete/partial} | {one-line provides list} |
35
+
36
+ {If no prior phases: "No prior phases completed."}
37
+ </prior_work>
@@ -0,0 +1,124 @@
1
+ <!-- Source: agents/researcher.md | Purpose: Output format for research project ARCHITECTURE.md -->
2
+ # Architecture Research
3
+
4
+ **Domain:** {domain}
5
+ **Researched:** {date}
6
+ **Confidence:** {confidence}
7
+
8
+ ## Standard Architecture
9
+
10
+ ### System Overview
11
+
12
+ ```
13
+ {ascii_architecture_diagram}
14
+ ```
15
+
16
+ ### Component Responsibilities
17
+
18
+ | Component | Responsibility | Typical Implementation |
19
+ |-----------|----------------|------------------------|
20
+ | {component} | {responsibility} | {implementation} |
21
+
22
+ ## Recommended Project Structure
23
+
24
+ ```
25
+ src/
26
+ {project_structure}
27
+ ```
28
+
29
+ ### Structure Rationale
30
+
31
+ - **{folder}/:** {rationale}
32
+
33
+ ## Architectural Patterns
34
+
35
+ ### Pattern 1: {pattern_name}
36
+
37
+ **What:** {description}
38
+ **When to use:** {conditions}
39
+ **Trade-offs:** {pros_and_cons}
40
+
41
+ **Example:**
42
+ ```{language}
43
+ {code_example}
44
+ ```
45
+
46
+ ### Pattern 2: {pattern_name}
47
+
48
+ **What:** {description}
49
+ **When to use:** {conditions}
50
+ **Trade-offs:** {pros_and_cons}
51
+
52
+ ### Pattern 3: {pattern_name}
53
+
54
+ **What:** {description}
55
+ **When to use:** {conditions}
56
+ **Trade-offs:** {pros_and_cons}
57
+
58
+ ## Data Flow
59
+
60
+ ### Request Flow
61
+
62
+ ```
63
+ {request_flow_diagram}
64
+ ```
65
+
66
+ ### State Management
67
+
68
+ ```
69
+ {state_management_diagram}
70
+ ```
71
+
72
+ ### Key Data Flows
73
+
74
+ 1. **{flow_name}:** {description}
75
+ 2. **{flow_name}:** {description}
76
+
77
+ ## Scaling Considerations
78
+
79
+ | Scale | Architecture Adjustments |
80
+ |-------|--------------------------|
81
+ | 0-1k users | {approach} |
82
+ | 1k-100k users | {approach} |
83
+ | 100k+ users | {approach} |
84
+
85
+ ### Scaling Priorities
86
+
87
+ 1. **First bottleneck:** {description}
88
+ 2. **Second bottleneck:** {description}
89
+
90
+ ## Anti-Patterns
91
+
92
+ ### Anti-Pattern 1: {name}
93
+
94
+ **What people do:** {mistake}
95
+ **Why it's wrong:** {problem}
96
+ **Do this instead:** {correct_approach}
97
+
98
+ ### Anti-Pattern 2: {name}
99
+
100
+ **What people do:** {mistake}
101
+ **Why it's wrong:** {problem}
102
+ **Do this instead:** {correct_approach}
103
+
104
+ ## Integration Points
105
+
106
+ ### External Services
107
+
108
+ | Service | Integration Pattern | Notes |
109
+ |---------|---------------------|-------|
110
+ | {service} | {pattern} | {notes} |
111
+
112
+ ### Internal Boundaries
113
+
114
+ | Boundary | Communication | Notes |
115
+ |----------|---------------|-------|
116
+ | {boundary} | {communication} | {notes} |
117
+
118
+ ## Sources
119
+
120
+ - {sources}
121
+
122
+ ---
123
+ *Architecture research for: {domain}*
124
+ *Researched: {date}*
@@ -0,0 +1,71 @@
1
+ <!-- Source: agents/researcher.md | Purpose: Output format for research project STACK.md (external tech evaluation) -->
2
+ # Stack Research
3
+
4
+ **Domain:** {domain}
5
+ **Researched:** {date}
6
+ **Confidence:** {confidence}
7
+
8
+ ## Recommended Stack
9
+
10
+ ### Core Technologies
11
+
12
+ | Technology | Version | Purpose | Why Recommended |
13
+ |------------|---------|---------|-----------------|
14
+ | {technology} | {version} | {purpose} | {rationale} |
15
+
16
+ ### Supporting Libraries
17
+
18
+ | Library | Version | Purpose | When to Use |
19
+ |---------|---------|---------|-------------|
20
+ | {library} | {version} | {purpose} | {use_case} |
21
+
22
+ ### Development Tools
23
+
24
+ | Tool | Purpose | Notes |
25
+ |------|---------|-------|
26
+ | {tool} | {purpose} | {notes} |
27
+
28
+ ## Installation
29
+
30
+ ```bash
31
+ # Core
32
+ {core_install_commands}
33
+
34
+ # Supporting
35
+ {supporting_install_commands}
36
+
37
+ # Dev dependencies
38
+ {dev_install_commands}
39
+ ```
40
+
41
+ ## Alternatives Considered
42
+
43
+ | Recommended | Alternative | When to Use Alternative |
44
+ |-------------|-------------|-------------------------|
45
+ | {our_choice} | {alternative} | {conditions} |
46
+
47
+ ## What NOT to Use
48
+
49
+ | Avoid | Why | Use Instead |
50
+ |-------|-----|-------------|
51
+ | {technology} | {problem} | {alternative} |
52
+
53
+ ## Stack Patterns by Variant
54
+
55
+ **If {condition}:**
56
+ - Use {variation}
57
+ - Because {reason}
58
+
59
+ ## Version Compatibility
60
+
61
+ | Package A | Compatible With | Notes |
62
+ |-----------|-----------------|-------|
63
+ | {package_a} | {package_b} | {notes} |
64
+
65
+ ## Sources
66
+
67
+ - {sources}
68
+
69
+ ---
70
+ *Stack research for: {domain}*
71
+ *Researched: {date}*
@@ -0,0 +1,112 @@
1
+ <!-- Source: agents/researcher.md | Purpose: Output format for research project SUMMARY.md (executive overview with roadmap implications) -->
2
+ # Project Research Summary
3
+
4
+ **Project:** {project_name}
5
+ **Domain:** {domain}
6
+ **Researched:** {date}
7
+ **Confidence:** {confidence}
8
+
9
+ ## Executive Summary
10
+
11
+ {executive_summary}
12
+
13
+ ## Key Findings
14
+
15
+ ### Recommended Stack
16
+
17
+ {stack_summary}
18
+
19
+ **Core technologies:**
20
+ - {technology}: {purpose} -- {rationale}
21
+
22
+ ### Expected Features
23
+
24
+ {features_summary}
25
+
26
+ **Must have (table stakes):**
27
+ - {feature} -- users expect this
28
+
29
+ **Should have (competitive):**
30
+ - {feature} -- differentiator
31
+
32
+ **Defer (v2+):**
33
+ - {feature} -- not essential for launch
34
+
35
+ ### Architecture Approach
36
+
37
+ {architecture_summary}
38
+
39
+ **Major components:**
40
+ 1. {component} -- {responsibility}
41
+ 2. {component} -- {responsibility}
42
+ 3. {component} -- {responsibility}
43
+
44
+ ### Critical Pitfalls
45
+
46
+ {pitfalls_summary}
47
+
48
+ 1. **{pitfall}** -- {avoidance}
49
+ 2. **{pitfall}** -- {avoidance}
50
+ 3. **{pitfall}** -- {avoidance}
51
+
52
+ ## Implications for Roadmap
53
+
54
+ Based on research, suggested phase structure:
55
+
56
+ ### Phase 1: {phase_name}
57
+ **Rationale:** {why_first}
58
+ **Delivers:** {deliverables}
59
+ **Addresses:** {features}
60
+ **Avoids:** {pitfall}
61
+
62
+ ### Phase 2: {phase_name}
63
+ **Rationale:** {why_this_order}
64
+ **Delivers:** {deliverables}
65
+ **Uses:** {stack_elements}
66
+ **Implements:** {architecture_component}
67
+
68
+ ### Phase 3: {phase_name}
69
+ **Rationale:** {why_this_order}
70
+ **Delivers:** {deliverables}
71
+
72
+ ### Phase Ordering Rationale
73
+
74
+ - {ordering_rationale}
75
+
76
+ ### Research Flags
77
+
78
+ Phases likely needing deeper research during planning:
79
+ - **Phase {x}:** {reason}
80
+
81
+ Phases with standard patterns (skip research-phase):
82
+ - **Phase {x}:** {reason}
83
+
84
+ ## Confidence Assessment
85
+
86
+ | Area | Confidence | Notes |
87
+ |------|------------|-------|
88
+ | Stack | {confidence} | {notes} |
89
+ | Features | {confidence} | {notes} |
90
+ | Architecture | {confidence} | {notes} |
91
+ | Pitfalls | {confidence} | {notes} |
92
+
93
+ **Overall confidence:** {confidence}
94
+
95
+ ### Gaps to Address
96
+
97
+ - {gap}: {handling}
98
+
99
+ ## Sources
100
+
101
+ ### Primary (HIGH confidence)
102
+ - {source}
103
+
104
+ ### Secondary (MEDIUM confidence)
105
+ - {source}
106
+
107
+ ### Tertiary (LOW confidence)
108
+ - {source}
109
+
110
+ ---
111
+ *Research completed: {date}*
112
+ *Ready for roadmap: yes*
@@ -0,0 +1,81 @@
1
+ # Phase Research: {Phase Name}
2
+
3
+ > Research conducted: {date}
4
+ > Research date: {ISO date}
5
+ > Mode: phase-research
6
+ > Phase: {NN}-{phase-name}
7
+ > Confidence: {overall HIGH/MEDIUM/LOW}
8
+ > Coverage: {COMPLETE/PARTIAL/INSUFFICIENT}
9
+ > Retrieval cycles: {1-3}
10
+
11
+ ## User Constraints
12
+
13
+ {Copied verbatim from CONTEXT.md}
14
+
15
+ ## Phase Goal
16
+
17
+ {What this phase aims to achieve, extracted from the phase definition}
18
+
19
+ ## Implementation Approach
20
+
21
+ ### Recommended Approach
22
+
23
+ {Detailed implementation strategy with source attribution}
24
+
25
+ **Steps**:
26
+ 1. {Step with [S{n}] attribution}
27
+ 2. ...
28
+
29
+ **Key decisions**:
30
+ - {Decision with rationale and source}
31
+
32
+ ### Configuration Details
33
+
34
+ {Specific configuration values, environment variables, file paths}
35
+
36
+ ```{language}
37
+ // Source: [S{n}]
38
+ {configuration example}
39
+ ```
40
+
41
+ ### API Patterns
42
+
43
+ {Relevant API signatures, request/response formats, authentication patterns}
44
+
45
+ ### Data Models
46
+
47
+ {Database schemas, type definitions, data flow}
48
+
49
+ ## Dependencies
50
+
51
+ {What needs to be installed, configured, or available}
52
+
53
+ | Dependency | Version | Purpose | Required By |
54
+ |-----------|---------|---------|-------------|
55
+ | ... | ... | ... | ... |
56
+
57
+ ## Pitfalls for This Phase
58
+
59
+ {Phase-specific things that can go wrong}
60
+
61
+ 1. **{Pitfall}** [S{n}]: {Description}
62
+
63
+ ## Testing Strategy
64
+
65
+ {How to verify this phase works correctly}
66
+
67
+ ## Coverage Assessment
68
+
69
+ | Question | Status | Confidence | Cycle Resolved |
70
+ |----------|--------|------------|----------------|
71
+ | {Implementation question 1} | ANSWERED | HIGH | 1 |
72
+ | {Implementation question 2} | GAP | — | — |
73
+
74
+ **Overall coverage**: {COMPLETE/PARTIAL/INSUFFICIENT}
75
+ **Gaps remaining**: {List any unresolved questions}
76
+
77
+ ## Sources
78
+
79
+ | # | Type | URL/Description | Confidence |
80
+ |---|------|----------------|------------|
81
+ | ... | ... | ... | ... |
@@ -0,0 +1,99 @@
1
+ # Research: {Topic Title}
2
+
3
+ > Research conducted: {date}
4
+ > Research date: {ISO date}
5
+ > Mode: project-research
6
+ > Confidence: {overall HIGH/MEDIUM/LOW}
7
+ > Coverage: {COMPLETE/PARTIAL/INSUFFICIENT}
8
+ > Retrieval cycles: {1-3}
9
+ > Sources consulted: {count}
10
+
11
+ ## User Constraints
12
+
13
+ {Copied verbatim from CONTEXT.md if it exists. Otherwise: "No CONTEXT.md found."}
14
+
15
+ ## Executive Summary
16
+
17
+ {2-3 paragraph overview of findings. What is this technology/domain? Why does it matter for this project? What is the recommended approach?}
18
+
19
+ ## Standard Stack
20
+
21
+ {The conventional/recommended technology stack for this domain}
22
+
23
+ | Layer | Technology | Version | Confidence | Source |
24
+ |-------|-----------|---------|------------|--------|
25
+ | Runtime | Node.js | 20.x LTS | HIGH | [S2] |
26
+ | Framework | Next.js | 14.x | HIGH | [S2] |
27
+ | ... | ... | ... | ... | ... |
28
+
29
+ ### Stack Rationale
30
+
31
+ {Why this combination? What alternatives were considered and why they were rejected?}
32
+
33
+ ### Stack Risks
34
+
35
+ {Known issues, upcoming deprecations, migration concerns}
36
+
37
+ ## Architecture Patterns
38
+
39
+ ### Recommended Pattern: {Name}
40
+
41
+ {Description with source attribution}
42
+
43
+ **When to use**: ...
44
+ **When to avoid**: ...
45
+ **Example structure**:
46
+ ```
47
+ project/
48
+ src/
49
+ ...
50
+ ```
51
+
52
+ ### Alternative Pattern: {Name}
53
+
54
+ {Only include if CONTEXT.md doesn't lock the architecture}
55
+
56
+ ## Common Pitfalls
57
+
58
+ {Numbered list of things that commonly go wrong}
59
+
60
+ 1. **{Pitfall name}** [S{n}]: {Description and how to avoid}
61
+ 2. ...
62
+
63
+ ## Code Examples
64
+
65
+ {Working code snippets for key patterns. Every snippet must include source attribution.}
66
+
67
+ ### {Pattern Name}
68
+
69
+ ```{language}
70
+ // Source: [S{n}] {url or description}
71
+ {code}
72
+ ```
73
+
74
+ ## Integration Points
75
+
76
+ {How this technology connects with other systems. API patterns, data flow, authentication.}
77
+
78
+ ## Coverage Assessment
79
+
80
+ | Question | Status | Confidence | Cycle Resolved |
81
+ |----------|--------|------------|----------------|
82
+ | {Core question 1} | ANSWERED | HIGH | 1 |
83
+ | {Core question 2} | ANSWERED | MEDIUM | 2 |
84
+ | {Core question 3} | GAP | — | — |
85
+
86
+ **Overall coverage**: {COMPLETE/PARTIAL/INSUFFICIENT}
87
+ **Gaps remaining**: {List any unresolved questions and why they couldn't be answered}
88
+
89
+ ## Open Questions
90
+
91
+ {Things the research could not definitively answer. These need human input or further investigation.}
92
+
93
+ ## Sources
94
+
95
+ | # | Type | URL/Description | Confidence |
96
+ |---|------|----------------|------------|
97
+ | S1 | Official Docs | {url} | HIGH |
98
+ | S2 | GitHub | {url} | HIGH |
99
+ | ... | ... | ... | ... |