vbounce-engine 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/README.md +142 -0
  2. package/VBOUNCE_MANIFEST.md +404 -0
  3. package/bin/vbounce.mjs +882 -0
  4. package/brains/AGENTS.md +71 -0
  5. package/brains/CHANGELOG.md +398 -0
  6. package/brains/CLAUDE.md +90 -0
  7. package/brains/GEMINI.md +102 -0
  8. package/brains/SETUP.md +195 -0
  9. package/brains/claude-agents/architect.md +226 -0
  10. package/brains/claude-agents/developer.md +133 -0
  11. package/brains/claude-agents/devops.md +267 -0
  12. package/brains/claude-agents/explorer.md +157 -0
  13. package/brains/claude-agents/qa.md +225 -0
  14. package/brains/claude-agents/scribe.md +171 -0
  15. package/brains/copilot/copilot-instructions.md +54 -0
  16. package/brains/cursor-rules/vbounce-docs.mdc +45 -0
  17. package/brains/cursor-rules/vbounce-process.mdc +51 -0
  18. package/brains/cursor-rules/vbounce-rules.mdc +29 -0
  19. package/brains/windsurf/.windsurfrules +35 -0
  20. package/docs/HOTFIX_EDGE_CASES.md +37 -0
  21. package/docs/IMPROVEMENT.md +46 -0
  22. package/docs/agent-skill-profiles.docx +0 -0
  23. package/docs/icons/alert.svg +1 -0
  24. package/docs/icons/beaker.svg +1 -0
  25. package/docs/icons/book.svg +1 -0
  26. package/docs/icons/git-branch.svg +1 -0
  27. package/docs/icons/git-merge.svg +1 -0
  28. package/docs/icons/graph.svg +1 -0
  29. package/docs/icons/light-bulb.svg +1 -0
  30. package/docs/icons/logo.svg +9 -0
  31. package/docs/icons/pencil.svg +1 -0
  32. package/docs/icons/rocket.svg +1 -0
  33. package/docs/icons/shield.svg +1 -0
  34. package/docs/icons/sync.svg +1 -0
  35. package/docs/icons/terminal.svg +1 -0
  36. package/docs/icons/tools.svg +1 -0
  37. package/docs/icons/zap.svg +1 -0
  38. package/docs/images/bounce_loop_diagram.png +0 -0
  39. package/docs/vbounce-os-manual.docx +0 -0
  40. package/package.json +48 -0
  41. package/scripts/close_sprint.mjs +134 -0
  42. package/scripts/complete_story.mjs +121 -0
  43. package/scripts/count_tokens.mjs +494 -0
  44. package/scripts/doctor.mjs +144 -0
  45. package/scripts/hotfix_manager.sh +157 -0
  46. package/scripts/init_gate_config.sh +151 -0
  47. package/scripts/init_sprint.mjs +129 -0
  48. package/scripts/post_sprint_improve.mjs +486 -0
  49. package/scripts/pre_gate_common.sh +576 -0
  50. package/scripts/pre_gate_runner.sh +176 -0
  51. package/scripts/prep_arch_context.mjs +178 -0
  52. package/scripts/prep_qa_context.mjs +152 -0
  53. package/scripts/prep_sprint_context.mjs +141 -0
  54. package/scripts/prep_sprint_summary.mjs +154 -0
  55. package/scripts/product_graph.mjs +387 -0
  56. package/scripts/product_impact.mjs +167 -0
  57. package/scripts/sprint_trends.mjs +160 -0
  58. package/scripts/suggest_improvements.mjs +363 -0
  59. package/scripts/update_state.mjs +132 -0
  60. package/scripts/validate_bounce_readiness.mjs +152 -0
  61. package/scripts/validate_report.mjs +165 -0
  62. package/scripts/validate_sprint_plan.mjs +117 -0
  63. package/scripts/validate_state.mjs +99 -0
  64. package/scripts/vdoc_match.mjs +269 -0
  65. package/scripts/vdoc_staleness.mjs +199 -0
  66. package/scripts/verify_framework.mjs +122 -0
  67. package/scripts/verify_framework.sh +13 -0
  68. package/skills/agent-team/SKILL.md +579 -0
  69. package/skills/agent-team/references/cleanup.md +42 -0
  70. package/skills/agent-team/references/delivery-sync.md +43 -0
  71. package/skills/agent-team/references/discovery.md +97 -0
  72. package/skills/agent-team/references/git-strategy.md +52 -0
  73. package/skills/agent-team/references/mid-sprint-triage.md +85 -0
  74. package/skills/agent-team/references/report-naming.md +34 -0
  75. package/skills/doc-manager/SKILL.md +444 -0
  76. package/skills/file-organization/SKILL.md +146 -0
  77. package/skills/file-organization/TEST-RESULTS.md +193 -0
  78. package/skills/file-organization/evals/evals.json +41 -0
  79. package/skills/file-organization/references/gitignore-template.md +53 -0
  80. package/skills/file-organization/references/quick-checklist.md +48 -0
  81. package/skills/improve/SKILL.md +296 -0
  82. package/skills/lesson/SKILL.md +136 -0
  83. package/skills/product-graph/SKILL.md +102 -0
  84. package/skills/react-best-practices/SKILL.md +3014 -0
  85. package/skills/react-best-practices/rules/_sections.md +46 -0
  86. package/skills/react-best-practices/rules/_template.md +28 -0
  87. package/skills/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  88. package/skills/react-best-practices/rules/advanced-init-once.md +42 -0
  89. package/skills/react-best-practices/rules/advanced-use-latest.md +39 -0
  90. package/skills/react-best-practices/rules/async-api-routes.md +38 -0
  91. package/skills/react-best-practices/rules/async-defer-await.md +80 -0
  92. package/skills/react-best-practices/rules/async-dependencies.md +51 -0
  93. package/skills/react-best-practices/rules/async-parallel.md +28 -0
  94. package/skills/react-best-practices/rules/async-suspense-boundaries.md +99 -0
  95. package/skills/react-best-practices/rules/bundle-barrel-imports.md +59 -0
  96. package/skills/react-best-practices/rules/bundle-conditional.md +31 -0
  97. package/skills/react-best-practices/rules/bundle-defer-third-party.md +49 -0
  98. package/skills/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  99. package/skills/react-best-practices/rules/bundle-preload.md +50 -0
  100. package/skills/react-best-practices/rules/client-event-listeners.md +74 -0
  101. package/skills/react-best-practices/rules/client-localstorage-schema.md +71 -0
  102. package/skills/react-best-practices/rules/client-passive-event-listeners.md +48 -0
  103. package/skills/react-best-practices/rules/client-swr-dedup.md +56 -0
  104. package/skills/react-best-practices/rules/js-batch-dom-css.md +107 -0
  105. package/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
  106. package/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
  107. package/skills/react-best-practices/rules/js-cache-storage.md +70 -0
  108. package/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
  109. package/skills/react-best-practices/rules/js-early-exit.md +50 -0
  110. package/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
  111. package/skills/react-best-practices/rules/js-index-maps.md +37 -0
  112. package/skills/react-best-practices/rules/js-length-check-first.md +49 -0
  113. package/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
  114. package/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
  115. package/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
  116. package/skills/react-best-practices/rules/rendering-activity.md +26 -0
  117. package/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  118. package/skills/react-best-practices/rules/rendering-conditional-render.md +40 -0
  119. package/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
  120. package/skills/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  121. package/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  122. package/skills/react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
  123. package/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
  124. package/skills/react-best-practices/rules/rendering-usetransition-loading.md +75 -0
  125. package/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
  126. package/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
  127. package/skills/react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
  128. package/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
  129. package/skills/react-best-practices/rules/rerender-functional-setstate.md +74 -0
  130. package/skills/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  131. package/skills/react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
  132. package/skills/react-best-practices/rules/rerender-memo.md +44 -0
  133. package/skills/react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
  134. package/skills/react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
  135. package/skills/react-best-practices/rules/rerender-transitions.md +40 -0
  136. package/skills/react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
  137. package/skills/react-best-practices/rules/server-after-nonblocking.md +73 -0
  138. package/skills/react-best-practices/rules/server-auth-actions.md +96 -0
  139. package/skills/react-best-practices/rules/server-cache-lru.md +41 -0
  140. package/skills/react-best-practices/rules/server-cache-react.md +76 -0
  141. package/skills/react-best-practices/rules/server-dedup-props.md +65 -0
  142. package/skills/react-best-practices/rules/server-parallel-fetching.md +83 -0
  143. package/skills/react-best-practices/rules/server-serialization.md +38 -0
  144. package/skills/vibe-code-review/SKILL.md +70 -0
  145. package/skills/vibe-code-review/references/deep-audit.md +259 -0
  146. package/skills/vibe-code-review/references/pr-review.md +234 -0
  147. package/skills/vibe-code-review/references/quick-scan.md +178 -0
  148. package/skills/vibe-code-review/references/report-template.md +189 -0
  149. package/skills/vibe-code-review/references/trend-check.md +224 -0
  150. package/skills/vibe-code-review/scripts/generate-snapshot.sh +89 -0
  151. package/skills/vibe-code-review/scripts/pr-analyze.sh +180 -0
  152. package/skills/write-skill/SKILL.md +133 -0
  153. package/templates/bug.md +100 -0
  154. package/templates/change_request.md +105 -0
  155. package/templates/charter.md +144 -0
  156. package/templates/delivery_plan.md +44 -0
  157. package/templates/epic.md +203 -0
  158. package/templates/hotfix.md +58 -0
  159. package/templates/risk_registry.md +87 -0
  160. package/templates/roadmap.md +174 -0
  161. package/templates/spike.md +143 -0
  162. package/templates/sprint.md +134 -0
  163. package/templates/sprint_context.md +61 -0
  164. package/templates/sprint_report.md +215 -0
  165. package/templates/story.md +193 -0
@@ -0,0 +1,203 @@
1
+ <instructions>
2
+ FOLLOW THIS EXACT STRUCTURE. Output sections in order.
3
+
4
+ 1. **YAML Frontmatter**: Epic ID, Status, Ambiguity, Context Source, Release, Owner, Priority, Tags, Target Date
5
+ 2. **§1 Problem & Value**: Why (problem), What (solution), Success Metrics
6
+ 3. **§2 Scope Boundaries**: IN-SCOPE checkboxes, OUT-OF-SCOPE list
7
+ 4. **§3 Context**: Personas, User Journey diagram, Constraints table
8
+ 5. **§4 Technical Context**: Affected files, Dependencies, Integrations, Data changes
9
+ 6. **§5 Decomposition Guidance**: Story categories checklist + suggested sequence
10
+ 7. **§6 Risks & Edge Cases**: Risk table with mitigations
11
+ 8. **§7 Acceptance Criteria**: Gherkin scenarios (happy path + error case)
12
+ 9. **§8 Open Questions**: Blocking decisions table
13
+ 10. **§9 Artifact Links**: Stories list + references
14
+
15
+ Ambiguity Score:
16
+ - 🔴 High: Scope unclear → Needs refinement
17
+ - 🟡 Medium: Scope clear, tech TBD → Ready for decomposition
18
+ - 🟢 Low: All filled → Ready for Stories
19
+
20
+ Output location: `product_plans/backlog/EPIC-{NNN}_{epic_name}/EPIC-{NNN}_{epic_name}.md`
21
+
22
+ Document Hierarchy Position: LEVEL 3 (Charter → Roadmap → **Epic** → Story)
23
+
24
+ **Codebase research is mandatory when filling §4 Technical Context.** Do NOT guess at affected files, dependencies, or integration points. Read the actual codebase — explore directories, read files listed in upstream documents, understand current architecture — then fill §4 with real file paths and verified dependencies.
25
+
26
+ Upstream sources:
27
+ - §1 Problem & Value traces to Charter §1.1 (What It Is) and §5 (Key Workflows)
28
+ - §3.3 Constraints inherits from Charter §6 and Roadmap §5 Strategic Constraints
29
+ - §4 Technical Context references Roadmap §3 ADRs for architecture decisions AND actual codebase exploration
30
+ - Metadata.Priority aligns with Roadmap §2 Release Plan epic priorities
31
+
32
+ Downstream consumers:
33
+ - Stories are decomposed from §5 Decomposition Guidance
34
+ - Story §1 The Spec inherits from Epic §2 Scope Boundaries
35
+ - Story §3 Implementation Guide references Epic §4 Technical Context
36
+ - Delivery Plan §3 Active Sprint pulls stories linked in §9 Artifact Links
37
+ - Risk Registry §1 Active Risks may reference Epic §6 Risks
38
+
39
+ Do NOT output these instructions.
40
+ </instructions>
41
+
42
+ ---
43
+ epic_id: "EPIC-{ID}"
44
+ status: "Draft / Ready / In Progress / Done"
45
+ ambiguity: "🔴 High / 🟡 Medium / 🟢 Low"
46
+ context_source: "Charter §{section} / Roadmap §{section} / User Input"
47
+ release: "{Release name from Roadmap §2}"
48
+ owner: "{PM/PO name}"
49
+ priority: "P0 - Critical / P1 - High / P2 - Medium"
50
+ tags: ["frontend", "api", "auth"]
51
+ target_date: "{YYYY-MM-DD}"
52
+ ---
53
+
54
+ # EPIC-{ID}: {Epic Name}
55
+
56
+ ## 1. Problem & Value
57
+ > Target Audience: Stakeholders, Business Sponsors
58
+
59
+ ### 1.1 The Problem
60
+ > 1-2 sentences. Why are we doing this?
61
+
62
+ ### 1.2 The Solution
63
+ > High-level what we're building.
64
+
65
+ ### 1.3 Success Metrics (North Star)
66
+ - {Measurable outcome 1}
67
+ - {Measurable outcome 2}
68
+
69
+ ---
70
+
71
+ ## 2. Scope Boundaries
72
+ > Target Audience: AI Agents (Critical for preventing hallucinations)
73
+
74
+ ### ✅ IN-SCOPE (Build This)
75
+ - [ ] {Capability 1}
76
+ - [ ] {Capability 2}
77
+ - [ ] {Capability 3}
78
+
79
+ ### ❌ OUT-OF-SCOPE (Do NOT Build This)
80
+ - {Explicitly excluded capability}
81
+ - {Deferred to EPIC-XXX}
82
+
83
+ ---
84
+
85
+ ## 3. Context
86
+
87
+ ### 3.1 User Personas
88
+ - **{Persona A}**: {Role} - {Primary Goal}
89
+ - **{Persona B}**: {Role} - {Primary Goal}
90
+
91
+ ### 3.2 User Journey (Happy Path)
92
+ ```mermaid
93
+ flowchart LR
94
+ A[User Action] --> B[System Response] --> C[Success State]
95
+ ```
96
+
97
+ ### 3.3 Constraints
98
+ | Type | Constraint |
99
+ |------|------------|
100
+ | **Performance** | {e.g., Must complete in < 200ms} |
101
+ | **Security** | {e.g., GDPR compliant, no PII logging} |
102
+ | **Tech Stack** | {e.g., Must use existing UserAPI v2} |
103
+
104
+ ---
105
+
106
+ ## 4. Technical Context
107
+ > Target Audience: AI Agents - READ THIS before decomposing.
108
+
109
+ ### 4.1 Affected Areas
110
+ | Area | Files/Modules | Change Type |
111
+ |------|---------------|-------------|
112
+ | API | `src/api/{file}.ts` | New / Modify |
113
+ | Database | `prisma/schema.prisma` | Add table / Modify |
114
+ | UI | `src/components/` | New component |
115
+ | Config | `.env`, `config/` | Add vars |
116
+
117
+ ### 4.2 Dependencies
118
+ | Type | Dependency | Status |
119
+ |------|------------|--------|
120
+ | **Requires** | EPIC-{ID}: {name} | Done / In Progress / Blocked |
121
+ | **Unlocks** | EPIC-{ID}: {name} | Waiting |
122
+
123
+ ### 4.3 Integration Points
124
+ | System | Purpose | Docs |
125
+ |--------|---------|------|
126
+ | {External API} | {what we use it for} | {link} |
127
+
128
+ ### 4.4 Data Changes
129
+ | Entity | Change | Fields |
130
+ |--------|--------|--------|
131
+ | {Entity} | NEW | id, name, ... |
132
+ | {Entity} | MODIFY | + new_field |
133
+
134
+ ---
135
+
136
+ ## 5. Decomposition Guidance
137
+ > The AI agent will analyze this epic and research the codebase to create small, focused stories. Each story must deliver a tangible, verifiable result — not just a layer of work.
138
+
139
+ ### Affected Areas (for codebase research)
140
+ - [ ] {Area 1: e.g., "Authentication flow in `src/auth/`"}
141
+ - [ ] {Area 2: e.g., "User profile API in `src/api/users.ts`"}
142
+ - [ ] {Area 3: e.g., "Dashboard component in `src/components/Dashboard/`"}
143
+
144
+ ### Key Constraints for Story Sizing
145
+ - Each story should touch 1-3 files and have one clear goal
146
+ - Prefer vertical slices (thin end-to-end) over horizontal layers
147
+ - Stories must be independently verifiable
148
+
149
+ ### Suggested Sequencing Hints
150
+ 1. {What must exist first for other work to build on}
151
+ 2. {What depends on #1}
152
+ 3. {What can run in parallel}
153
+
154
+ ---
155
+
156
+ ## 6. Risks & Edge Cases
157
+ | Risk | Likelihood | Mitigation |
158
+ |------|------------|------------|
159
+ | {e.g., Email delivery delay} | Medium | {e.g., "Resend" button after 30s} |
160
+ | {e.g., Rate limiting hit} | Low | {e.g., Exponential backoff} |
161
+
162
+ ---
163
+
164
+ ## 7. Acceptance Criteria (Epic-Level)
165
+ > How do we know the EPIC is complete? Full user flow.
166
+
167
+ ```gherkin
168
+ Feature: {Epic Name}
169
+
170
+ Scenario: Complete Happy Path
171
+ Given {precondition - user state}
172
+ When {user completes full flow}
173
+ Then {end-to-end outcome achieved}
174
+ And {data persisted correctly}
175
+
176
+ Scenario: Key Error Case
177
+ Given {precondition}
178
+ When {error condition}
179
+ Then {graceful handling}
180
+ ```
181
+
182
+ ---
183
+
184
+ ## 8. Open Questions
185
+ | Question | Options | Impact | Owner | Status |
186
+ |----------|---------|--------|-------|--------|
187
+ | {decision needed} | A: {x}, B: {y} | Blocks {stories X,Y} | {name} | Open / Decided |
188
+
189
+ ---
190
+
191
+ ## 9. Artifact Links
192
+ > Auto-populated as Epic is decomposed.
193
+
194
+ **Stories (Status Tracking):**
195
+ > Keep track of where stories live contextually.
196
+ - [ ] STORY-{ID}-01-{story_name} -> Backlog
197
+ - [ ] STORY-{ID}-02-{story_name} -> Active (Sprint XX)
198
+ - [x] STORY-{ID}-03-{story_name} -> Archived (Sprint YY)
199
+
200
+ **References:**
201
+ - Charter: [PROJECT CHARTER](link)
202
+ - Design: {link}
203
+ - API Spec: {link}
@@ -0,0 +1,58 @@
1
+ <instructions>
2
+ FOLLOW THIS EXACT STRUCTURE. This is a lightweight alternative to the Epic/Story hierarchy for L1 (Trivial) tasks.
3
+
4
+ 1. **YAML Frontmatter**: Hotfix ID, Status, Target Release, Actor, Complexity Label
5
+ 2. **§1 The Fix**: What is broken/changing and why
6
+ 3. **§2 Implementation Instructions**: Which file(s) to change and what to do
7
+ 4. **§3 Verification**: Simple manual test
8
+
9
+ Output location: `product_plans/{delivery}/HOTFIX-{Date}-{Name}.md`
10
+
11
+ Document Hierarchy Position: BYPASS
12
+ This document bypasses the Roadmap → Epic → Story hierarchy. It is for L1 (Trivial) changes only (e.g., typos, CSS tweaks, single-line logic fixes).
13
+
14
+ Constraints:
15
+ - Must touch 1-2 files maximum.
16
+ - Must NOT introduce new architectural patterns.
17
+ - Must NOT require complex new testing infrastructure.
18
+ - If it violates these constraints, the Team Lead MUST escalate it to an Epic.
19
+
20
+ Do NOT output these instructions.
21
+ </instructions>
22
+
23
+ ---
24
+ hotfix_id: "HOTFIX-{Date}-{Name}"
25
+ status: "Draft / Bouncing / Done"
26
+ target_release: "D-{NN}_{release_name}"
27
+ actor: "{Persona Name / User}"
28
+ complexity_label: "L1 (Trivial)"
29
+ ---
30
+
31
+ # HOTFIX: {Name}
32
+
33
+ ## 1. The Fix
34
+ > What needs to be changed and why.
35
+
36
+ - **Current Behavior**: {What is wrong}
37
+ - **Desired Behavior**: {What it should be}
38
+
39
+ ---
40
+
41
+ ## 2. Implementation Instructions
42
+ > Direct commands for the Developer Agent.
43
+
44
+ - **Files to Modify**: `{filepath}`
45
+ - **Instructions**: {e.g., "Change the padding-left from 10px to 20px" or "Fix the typo in the error message."}
46
+
47
+ > **CONSTRAINT**: If this fix requires modifying more than 2 files, STOP immediately and escalate to the Team Lead. The task must be promoted to an Epic/Story.
48
+
49
+ ---
50
+
51
+ ## 3. Verification
52
+ > How the Human or QA agent will quickly verify this.
53
+
54
+ - [ ] {Simple step, e.g., "Open the settings modal and verify the button is aligned."}
55
+ - [ ] Automated tests still pass (`npm test`).
56
+ - [ ] **Framework Integrity**: If `.claude/agents/` or `.vbounce/skills/` were modified, log to `.vbounce/CHANGELOG.md`.
57
+ - [ ] **Post-Fix Action**: Run `./.vbounce/scripts/hotfix_manager.sh ledger "HOTFIX: {Name}" "{Brief Fix Description}"`
58
+ - [ ] **Token Tracking**: Run `node .vbounce/scripts/count_tokens.mjs --self --append <this-file> --name Developer`
@@ -0,0 +1,87 @@
1
+ <instructions>
2
+ FOLLOW THIS EXACT STRUCTURE. Output sections in order 1-4.
3
+
4
+ 1. **YAML Frontmatter**: Set status, last updated, and roadmap ref
5
+ 2. **§1 Active Risks**: Table of open risks with phase, source, likelihood, impact, mitigation
6
+ 3. **§2 Risk Analysis Log**: Phase-stamped entries appended on state transitions
7
+ 4. **§3 Closed Risks**: Resolved/mitigated risks moved here
8
+ 5. **§4 Change Log**: Auto-appended on updates
9
+
10
+ Risk Levels:
11
+ - Likelihood: Low / Medium / High
12
+ - Impact: Low / Medium / High / Critical
13
+
14
+ Risk Statuses: Open → Mitigating → Mitigated → Closed / Accepted
15
+
16
+ Output location: `product_plans/strategy/RISK_REGISTRY.md`
17
+
18
+ Document Hierarchy Position: LEVEL 6 — CROSS-CUTTING
19
+ Charter (why) → Roadmap (strategic what/when) → Epic (detailed what) → Story (how) → Delivery Plan (execution) → **Risk Registry** (risks)
20
+
21
+ This document is fed by ALL levels of the hierarchy:
22
+ - Charter §6 Constraints → initial strategic risks
23
+ - Roadmap §4 Dependencies → integration and external service risks
24
+ - Roadmap §5 Strategic Constraints → capacity, budget, deadline risks
25
+ - Epic §6 Risks & Edge Cases → feature-level risks
26
+ - Delivery Plan sprint transitions → trigger Risk Analysis Log entries (§2)
27
+ - Architect Agent's Deep Audit findings → may surface new risks
28
+
29
+ The Risk Registry is reviewed by the Team Lead at sprint boundaries and by the Architect Agent during Deep Audit reviews.
30
+
31
+ Do NOT output these instructions.
32
+ </instructions>
33
+
34
+ ---
35
+ last_updated: "{YYYY-MM-DD}"
36
+ status: "Active / Archived"
37
+ roadmap_ref: "product_plans/{project}_roadmap.md"
38
+ ---
39
+
40
+ # Risk Registry: {Project Name}
41
+
42
+ ## 1. Active Risks
43
+
44
+ | ID | Risk | Phase | Source | Likelihood | Impact | Mitigation | Owner | Status |
45
+ |----|------|-------|--------|------------|--------|------------|-------|--------|
46
+ | R-001 | {Risk description} | {Verification/Bounce/Review} | {EPIC-XXX or STORY-XXX-YY-{story_name}} | Low/Medium/High | Low/Medium/High/Critical | {Mitigation strategy} | {Owner} | Open |
47
+
48
+ **Summary**: {X} Active | {Y} Mitigating | {Z} Accepted
49
+
50
+ ---
51
+
52
+ ## 2. Risk Analysis Log
53
+
54
+ > Phase-stamped entries. Each entry is appended when a document transitions between V-Bounce phases.
55
+
56
+ ### {YYYY-MM-DD} — Phase: {Verification / Bounce / Review} ({Sprint S-XX})
57
+ **Trigger**: {What caused this analysis — e.g., "Sprint 1 stories moved to Ready to Bounce"}
58
+ **Documents Analyzed**: {List of docs reviewed}
59
+
60
+ **New Risks Identified**:
61
+ - R-{NNN}: {Risk description} — Source: {doc reference}
62
+
63
+ **Risks Updated**:
64
+ - R-{NNN}: {Status change and reason}
65
+
66
+ **Risks Resolved**:
67
+ - R-{NNN}: {Resolution description}
68
+
69
+ **Recommendation**: {Action items if any}
70
+
71
+ ---
72
+
73
+ ## 3. Closed Risks
74
+
75
+ | ID | Risk | Resolution | Phase Closed | Closed Date |
76
+ |----|------|------------|--------------|-------------|
77
+ | R-{NNN} | {Risk description} | {How it was resolved} | {Phase} | {YYYY-MM-DD} |
78
+
79
+ ---
80
+
81
+ ## 4. Change Log
82
+
83
+ <!-- Auto-appended when Risk Registry is updated -->
84
+
85
+ | Date | Change | By |
86
+ |------|--------|-----|
87
+ | {YYYY-MM-DD} | Initial creation | Architect |
@@ -0,0 +1,174 @@
1
+ <instructions>
2
+ FOLLOW THIS EXACT STRUCTURE. Output sections in order 1-7.
3
+
4
+ 1. **YAML Frontmatter**: Set status, last updated, charter ref, and risk registry ref
5
+ 2. **§1 Strategic Context**: Vision (from Charter), primary goal, target users, success metrics
6
+ 3. **§2 Release Plan**: Group epics into named releases with exit criteria — NOT sprint-level tracking
7
+ 4. **§3 Technical Architecture Decisions**: Key choices with rationale and status (this is the ADR log)
8
+ 5. **§4 Dependencies & Integration Map**: External services, cross-epic dependencies, blocking relationships
9
+ 6. **§5 Strategic Constraints**: Budget, capacity, hard deadlines, regulatory requirements
10
+ 7. **§6 Open Questions**: Unresolved items that affect strategic direction
11
+ 8. **§7 Delivery Log**: Release notes for completed deliveries (appended by Team Lead on delivery archive)
12
+ 9. **§8 Change Log**: Auto-appended on updates
13
+
14
+ Output location: `product_plans/strategy/{project}_roadmap.md`
15
+
16
+ Role of this document:
17
+ - This is the STRATEGIC layer between Charter (why) and Delivery Plan (operational execution).
18
+ - It answers: "What are we shipping, in what order, and what architectural bets are we making?"
19
+ - It does NOT track sprint-level progress — that belongs in the Delivery Plan.
20
+ - It does NOT track individual story status — that belongs in the Delivery Plan.
21
+ - It DOES define release milestones, architectural decisions, and strategic constraints.
22
+
23
+ Document Hierarchy Position: LEVEL 2 — STRATEGIC
24
+ Charter (why) → **Roadmap** (strategic what/when) → Epic (detailed what) → Story (how) → Delivery Plan (execution) → Risk Registry (risks)
25
+
26
+ Do NOT output these instructions.
27
+ </instructions>
28
+
29
+ ---
30
+ last_updated: "{YYYY-MM-DD}"
31
+ status: "Planning / Active / MVP Complete / Shipped"
32
+ charter_ref: "product_plans/{project}_charter.md"
33
+ risk_registry_ref: "product_plans/RISK_REGISTRY.md"
34
+ ---
35
+
36
+ # Product Roadmap: {Project Name}
37
+
38
+ ## 1. Strategic Context
39
+
40
+ | Key | Value |
41
+ |-----|-------|
42
+ | **Vision** | {One sentence from Charter §1.1} |
43
+ | **Primary Goal** | {Main objective for this project window} |
44
+ | **Tech Stack** | {e.g., Next.js, FastAPI, Supabase} |
45
+ | **Target Users** | {Primary user persona from Charter} |
46
+
47
+ ### Success Metrics
48
+ > Pulled from Charter §1.3. These define when the project is "done."
49
+
50
+ - {Metric 1: e.g., "User signup conversion > 60%"}
51
+ - {Metric 2: e.g., "Page load < 2s on 3G"}
52
+
53
+ ---
54
+
55
+ ## 2. Release Plan
56
+
57
+ > Group epics into named releases with clear exit criteria. Each release is a shippable milestone.
58
+ > Releases are NOT sprints — a release may span multiple sprints.
59
+ > Sprint-level tracking belongs in the Delivery Plan.
60
+
61
+ ### Release 1: {Release Name} (e.g., "Foundation")
62
+ **Target**: {YYYY-MM-DD or Quarter}
63
+ **Exit Criteria**: {What must be true for this release to ship — e.g., "Users can sign up, log in, and see dashboard"}
64
+
65
+ | Epic | Priority | Status | Notes |
66
+ |------|----------|--------|-------|
67
+ | EPIC-001: {Name} | P0 | Draft / Ready / In Progress / Done | {Dependencies or blockers} |
68
+ | EPIC-002: {Name} | P1 | Draft | |
69
+
70
+ ### Release 2: {Release Name} (e.g., "Core Features")
71
+ **Target**: {YYYY-MM-DD or Quarter}
72
+ **Exit Criteria**: {e.g., "Full CRUD on all entities, third-party integration live"}
73
+
74
+ | Epic | Priority | Status | Notes |
75
+ |------|----------|--------|-------|
76
+ | EPIC-003: {Name} | P0 | Draft | |
77
+
78
+ ### Release 3: {Release Name} (e.g., "Polish & Scale")
79
+ **Target**: {YYYY-MM-DD or Quarter}
80
+ **Exit Criteria**: {e.g., "Performance targets met, monitoring in place"}
81
+
82
+ | Epic | Priority | Status | Notes |
83
+ |------|----------|--------|-------|
84
+ | {Future Epics} | | | |
85
+
86
+ ---
87
+
88
+ ## 3. Technical Architecture Decisions
89
+
90
+ > Architecture Decision Records (ADRs). Agents reference these when hitting ambiguity.
91
+ > Each decision is immutable once "Decided" — create a new row to override.
92
+
93
+ | ID | Decision | Choice | Rationale | Status | Date |
94
+ |----|----------|--------|-----------|--------|------|
95
+ | ADR-001 | Auth Provider | {e.g., Supabase Auth} | {Why — cost, speed, integration} | Decided / Proposed / Superseded | {YYYY-MM-DD} |
96
+ | ADR-002 | Database | {e.g., PostgreSQL via Supabase} | {Why} | Decided | |
97
+ | ADR-003 | Hosting | {e.g., Vercel + Railway} | {Why} | Proposed | |
98
+ | ADR-004 | State Management | {e.g., Zustand} | {Why} | Decided | |
99
+
100
+ ---
101
+
102
+ ## 4. Dependencies & Integration Map
103
+
104
+ > External services, cross-epic dependencies, and anything that blocks progress if unavailable.
105
+
106
+ ### External Dependencies
107
+ | Service | Purpose | Status | Risk if Unavailable |
108
+ |---------|---------|--------|---------------------|
109
+ | {e.g., Stripe API} | Payment processing | Available / Pending Access / TBD | {e.g., "Cannot ship Release 2"} |
110
+ | {e.g., SendGrid} | Transactional email | Available | Low — fallback exists |
111
+
112
+ ### Cross-Epic Dependencies
113
+ | Epic | Depends On | Relationship | Status |
114
+ |------|------------|--------------|--------|
115
+ | EPIC-003 | EPIC-001 | Requires auth system | Blocked / Ready |
116
+ | EPIC-004 | EPIC-002 | Shares data model | In Progress |
117
+
118
+ ---
119
+
120
+ ## 5. Strategic Constraints
121
+
122
+ > Hard boundaries that shape prioritization and scope. These override feature requests.
123
+
124
+ | Constraint | Type | Impact | Mitigation |
125
+ |------------|------|--------|------------|
126
+ | {e.g., Launch by Q2 2026} | Deadline | Caps scope to Release 1 + 2 | Cut P2 epics if behind |
127
+ | {e.g., Solo developer} | Capacity | Max 2 epics per sprint | Lean on AI agents for L1-L2 stories |
128
+ | {e.g., GDPR compliance} | Regulatory | Must audit data flows before launch | Include in Release 1 exit criteria |
129
+ | {e.g., $0 infrastructure budget} | Budget | Free-tier only | Supabase free tier + Vercel hobby |
130
+
131
+ ---
132
+
133
+ ## 6. Open Questions
134
+
135
+ > Unresolved items that affect strategic direction. Operational questions go in the Delivery Plan.
136
+
137
+ | Question | Options | Impact | Owner | Status |
138
+ |----------|---------|--------|-------|--------|
139
+ | {e.g., "Build mobile app or PWA?"} | A: Native, B: PWA | Affects Release 3 scope | {name} | Open / Decided |
140
+ | {e.g., "Self-host or managed DB?"} | A: Supabase, B: PlanetScale | ADR-002 | {name} | Decided |
141
+
142
+ ---
143
+
144
+ ## 7. Delivery Log
145
+
146
+ > Appended by Team Lead when a delivery (release) is archived.
147
+ > Each entry is the release notes — a summary of sprint reports from that delivery.
148
+
149
+ ### D-{NN}: {Release Name}
150
+ **Delivered**: {YYYY-MM-DD}
151
+ **Release Tag**: v{VERSION}
152
+ **Delivery Folder**: `product_plans/archive/D-{NN}_{release_name}/`
153
+
154
+ **Release Notes**:
155
+ > {Summary of what was shipped — compiled from sprint reports. Key features, important fixes, architectural changes.}
156
+
157
+ **Metrics**:
158
+ | Metric | Value |
159
+ |--------|-------|
160
+ | Stories Delivered | {X} |
161
+ | Stories Escalated | {Y} |
162
+ | Total Sprints | {N} |
163
+ | Average Bounce Ratio | {X}% |
164
+ | Average Correction Tax | {X}% |
165
+
166
+ ---
167
+
168
+ ## 8. Change Log
169
+
170
+ <!-- Auto-appended when Roadmap is updated -->
171
+
172
+ | Date | Change | By |
173
+ |------|--------|-----|
174
+ | {YYYY-MM-DD} | Initial creation from Charter | Architect |
@@ -0,0 +1,143 @@
1
+ <instructions>
2
+ FOLLOW THIS EXACT STRUCTURE. Output sections in order 1-8.
3
+
4
+ 1. **YAML Frontmatter**: Spike ID, Parent Epic, Parent Story (optional), Status, Ambiguity Before, Time Box, Owner, Tags, Created
5
+ 2. **§1 Question**: The specific unknown to resolve
6
+ 3. **§2 Constraints**: Time box, scope limits, what is NOT being investigated
7
+ 4. **§3 Approach**: Investigation method
8
+ 5. **§4 Findings**: Evidence, data, observations discovered
9
+ 6. **§5 Decision**: Choice made + rationale + alternatives rejected
10
+ 7. **§6 Residual Risk**: What's still uncertain after the spike
11
+ 8. **§7 Affected Documents**: Checklist of upstream/downstream docs to update on close
12
+ 9. **§8 Change Log**: Modification history
13
+
14
+ Spike Statuses: Open → Investigating → Findings Ready → Validated → Closed
15
+
16
+ Output location: `product_plans/backlog/EPIC-{NNN}_{name}/SPIKE-{EpicID}-{NNN}-{topic}.md`
17
+
18
+ Document Hierarchy Position: LEVEL 3.5 (Charter → Roadmap → Epic → **Spike** / Story)
19
+ Spikes are children of Epics, siblings of Stories. They travel with their Epic folder (archiving is automatic).
20
+
21
+ Upstream sources:
22
+ - §1 Question derives from parent Epic §8 Open Questions (blocking items)
23
+ - §3 Approach references parent Epic §4 Technical Context
24
+ - Roadmap §3 ADRs informs existing architectural decisions
25
+
26
+ Downstream consumers:
27
+ - §4 Findings → parent Epic §4 Technical Context (update with new knowledge)
28
+ - §5 Decision → Roadmap §3 ADRs (if architectural decision)
29
+ - §6 Residual Risk → Risk Registry §1 Active Risks (if new risk identified)
30
+ - §5 Decision → parent Story §3 Implementation Guide (if story-level spike)
31
+
32
+ Agent handoff:
33
+ - Team Lead creates the spike from template, links to Epic §9
34
+ - Developer investigates (fills §4 Findings and §5 Decision)
35
+ - Architect validates findings against Safe Zone (Findings Ready → Validated)
36
+ - Team Lead propagates findings to affected documents (Validated → Closed)
37
+
38
+ Do NOT output these instructions.
39
+ </instructions>
40
+
41
+ ---
42
+ spike_id: "SPIKE-{EpicID}-{NNN}-{topic}"
43
+ parent_epic_ref: "EPIC-{ID}"
44
+ parent_story_ref: "(optional — omit for epic-level spikes)"
45
+ status: "Open / Investigating / Findings Ready / Validated / Closed"
46
+ ambiguity_before: "🔴 High / 🟡 Medium"
47
+ time_box: "e.g., 4 hours / 1 day"
48
+ owner: "Developer / Architect"
49
+ tags: []
50
+ created: "YYYY-MM-DD"
51
+ ---
52
+
53
+ # SPIKE-{EpicID}-{NNN}: {Topic}
54
+
55
+ ## 1. Question
56
+ > The specific unknown to resolve. Derived from Epic §8 Open Questions.
57
+
58
+ {What exactly do we need to find out? Frame as a single, concrete question.}
59
+
60
+ ---
61
+
62
+ ## 2. Constraints
63
+ > What boundaries apply to this investigation.
64
+
65
+ | Constraint | Value |
66
+ |------------|-------|
67
+ | **Time Box** | {e.g., 4 hours / 1 day} |
68
+ | **Scope Limit** | {What IS being investigated} |
69
+ | **Out of Scope** | {What is NOT being investigated — prevents scope creep} |
70
+
71
+ ---
72
+
73
+ ## 3. Approach
74
+ > How the investigation will be conducted.
75
+
76
+ **Method:** {Code exploration / Prototyping / Benchmarks / Doc research / Proof of concept}
77
+
78
+ ### Steps
79
+ 1. {First investigation step}
80
+ 2. {Second investigation step}
81
+ 3. {Third investigation step}
82
+
83
+ ---
84
+
85
+ ## 4. Findings
86
+ > Evidence, data, and observations discovered during investigation.
87
+ > Filled by the Developer during the Investigating phase.
88
+
89
+ ### Evidence
90
+ - {Observation 1 — with data or code references}
91
+ - {Observation 2}
92
+
93
+ ### Data
94
+ | Metric | Value | Notes |
95
+ |--------|-------|-------|
96
+ | {e.g., Response time} | {value} | {context} |
97
+
98
+ ---
99
+
100
+ ## 5. Decision
101
+ > Choice made based on findings. Becomes an ADR if architectural.
102
+
103
+ ### Chosen Approach
104
+ {What we decided to do and why.}
105
+
106
+ ### Alternatives Rejected
107
+ | Alternative | Why Rejected |
108
+ |-------------|--------------|
109
+ | {Option A} | {Reason} |
110
+ | {Option B} | {Reason} |
111
+
112
+ ### ADR Required?
113
+ - [ ] Yes — create ADR in Roadmap §3 (decision affects architecture)
114
+ - [ ] No — decision is implementation-level only
115
+
116
+ ---
117
+
118
+ ## 6. Residual Risk
119
+ > What's still uncertain after the spike. Feeds Risk Registry if non-trivial.
120
+
121
+ | Risk | Likelihood | Impact | Mitigation |
122
+ |------|------------|--------|------------|
123
+ | {Remaining unknown} | {Low/Medium/High} | {description} | {how to manage} |
124
+
125
+ ---
126
+
127
+ ## 7. Affected Documents
128
+ > Checklist of upstream/downstream docs to update when closing this spike.
129
+ > ALL items must be checked before spike status can move to Closed.
130
+
131
+ - [ ] Epic §4 Technical Context — update with findings
132
+ - [ ] Epic §8 Open Questions — mark resolved
133
+ - [ ] Epic §9 Artifact Links — add spike reference
134
+ - [ ] Roadmap §3 ADRs — if architectural decision (see §5)
135
+ - [ ] Risk Registry §1 — if new risk identified (see §6)
136
+ - [ ] Story §3 Implementation Guide — if story-level spike
137
+
138
+ ---
139
+
140
+ ## 8. Change Log
141
+ | Date | Author | Change |
142
+ |------|--------|--------|
143
+ | {YYYY-MM-DD} | {name} | Created spike |