@sandrinio/vbounce 1.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 (95) hide show
  1. package/README.md +107 -0
  2. package/bin/vbounce.mjs +165 -0
  3. package/brains/AGENTS.md +129 -0
  4. package/brains/CLAUDE.md +146 -0
  5. package/brains/GEMINI.md +134 -0
  6. package/brains/SETUP.md +180 -0
  7. package/brains/claude-agents/architect.md +140 -0
  8. package/brains/claude-agents/developer.md +69 -0
  9. package/brains/claude-agents/devops.md +219 -0
  10. package/brains/claude-agents/qa.md +112 -0
  11. package/brains/claude-agents/scribe.md +141 -0
  12. package/brains/cursor-rules/vbounce-docs.mdc +41 -0
  13. package/brains/cursor-rules/vbounce-process.mdc +45 -0
  14. package/brains/cursor-rules/vbounce-rules.mdc +26 -0
  15. package/package.json +40 -0
  16. package/skills/agent-team/SKILL.md +425 -0
  17. package/skills/doc-manager/SKILL.md +278 -0
  18. package/skills/lesson/SKILL.md +90 -0
  19. package/skills/react-best-practices/SKILL.md +3014 -0
  20. package/skills/react-best-practices/rules/_sections.md +46 -0
  21. package/skills/react-best-practices/rules/_template.md +28 -0
  22. package/skills/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  23. package/skills/react-best-practices/rules/advanced-init-once.md +42 -0
  24. package/skills/react-best-practices/rules/advanced-use-latest.md +39 -0
  25. package/skills/react-best-practices/rules/async-api-routes.md +38 -0
  26. package/skills/react-best-practices/rules/async-defer-await.md +80 -0
  27. package/skills/react-best-practices/rules/async-dependencies.md +51 -0
  28. package/skills/react-best-practices/rules/async-parallel.md +28 -0
  29. package/skills/react-best-practices/rules/async-suspense-boundaries.md +99 -0
  30. package/skills/react-best-practices/rules/bundle-barrel-imports.md +59 -0
  31. package/skills/react-best-practices/rules/bundle-conditional.md +31 -0
  32. package/skills/react-best-practices/rules/bundle-defer-third-party.md +49 -0
  33. package/skills/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  34. package/skills/react-best-practices/rules/bundle-preload.md +50 -0
  35. package/skills/react-best-practices/rules/client-event-listeners.md +74 -0
  36. package/skills/react-best-practices/rules/client-localstorage-schema.md +71 -0
  37. package/skills/react-best-practices/rules/client-passive-event-listeners.md +48 -0
  38. package/skills/react-best-practices/rules/client-swr-dedup.md +56 -0
  39. package/skills/react-best-practices/rules/js-batch-dom-css.md +107 -0
  40. package/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
  41. package/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
  42. package/skills/react-best-practices/rules/js-cache-storage.md +70 -0
  43. package/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
  44. package/skills/react-best-practices/rules/js-early-exit.md +50 -0
  45. package/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
  46. package/skills/react-best-practices/rules/js-index-maps.md +37 -0
  47. package/skills/react-best-practices/rules/js-length-check-first.md +49 -0
  48. package/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
  49. package/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
  50. package/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
  51. package/skills/react-best-practices/rules/rendering-activity.md +26 -0
  52. package/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  53. package/skills/react-best-practices/rules/rendering-conditional-render.md +40 -0
  54. package/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
  55. package/skills/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  56. package/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  57. package/skills/react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
  58. package/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
  59. package/skills/react-best-practices/rules/rendering-usetransition-loading.md +75 -0
  60. package/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
  61. package/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
  62. package/skills/react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
  63. package/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
  64. package/skills/react-best-practices/rules/rerender-functional-setstate.md +74 -0
  65. package/skills/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  66. package/skills/react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
  67. package/skills/react-best-practices/rules/rerender-memo.md +44 -0
  68. package/skills/react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
  69. package/skills/react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
  70. package/skills/react-best-practices/rules/rerender-transitions.md +40 -0
  71. package/skills/react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
  72. package/skills/react-best-practices/rules/server-after-nonblocking.md +73 -0
  73. package/skills/react-best-practices/rules/server-auth-actions.md +96 -0
  74. package/skills/react-best-practices/rules/server-cache-lru.md +41 -0
  75. package/skills/react-best-practices/rules/server-cache-react.md +76 -0
  76. package/skills/react-best-practices/rules/server-dedup-props.md +65 -0
  77. package/skills/react-best-practices/rules/server-parallel-fetching.md +83 -0
  78. package/skills/react-best-practices/rules/server-serialization.md +38 -0
  79. package/skills/vibe-code-review/SKILL.md +70 -0
  80. package/skills/vibe-code-review/references/deep-audit.md +259 -0
  81. package/skills/vibe-code-review/references/pr-review.md +234 -0
  82. package/skills/vibe-code-review/references/quick-scan.md +178 -0
  83. package/skills/vibe-code-review/references/report-template.md +189 -0
  84. package/skills/vibe-code-review/references/trend-check.md +224 -0
  85. package/skills/vibe-code-review/scripts/generate-snapshot.sh +89 -0
  86. package/skills/vibe-code-review/scripts/pr-analyze.sh +180 -0
  87. package/skills/write-skill/SKILL.md +133 -0
  88. package/templates/charter.md +144 -0
  89. package/templates/delivery_plan.md +188 -0
  90. package/templates/epic.md +200 -0
  91. package/templates/hotfix.md +57 -0
  92. package/templates/risk_registry.md +89 -0
  93. package/templates/roadmap.md +176 -0
  94. package/templates/sprint_report.md +151 -0
  95. package/templates/story.md +150 -0
@@ -0,0 +1,57 @@
1
+ <instructions>
2
+ FOLLOW THIS EXACT STRUCTURE. This is a lightweight alternative to the Epic/Story hierarchy for L1 (Trivial) tasks.
3
+
4
+ 1. **Metadata Table**: Target Release, Status, Actor
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
+ # HOTFIX: {Name}
24
+
25
+ ## Metadata
26
+
27
+ | Field | Value |
28
+ |-------|-------|
29
+ | **Target Release** | `D-{NN}_{release_name}` |
30
+ | **Status** | Draft / Bouncing / Done |
31
+ | **Actor** | {Persona Name / User} |
32
+ | **Complexity Label** | L1 (Trivial) |
33
+
34
+ ---
35
+
36
+ ## 1. The Fix
37
+ > What needs to be changed and why.
38
+
39
+ - **Current Behavior**: {What is wrong}
40
+ - **Desired Behavior**: {What it should be}
41
+
42
+ ---
43
+
44
+ ## 2. Implementation Instructions
45
+ > Direct commands for the Developer Agent.
46
+
47
+ - **Files to Modify**: `{filepath}`
48
+ - **Instructions**: {e.g., "Change the padding-left from 10px to 20px" or "Fix the typo in the error message."}
49
+
50
+ ---
51
+
52
+ ## 3. Verification
53
+ > How the Human or QA agent will quickly verify this.
54
+
55
+ - [ ] {Simple step, e.g., "Open the settings modal and verify the button is aligned."}
56
+ - [ ] Automated tests still pass (`npm test`).
57
+ - [ ] **Post-Fix Action**: Run `./scripts/hotfix_manager.sh ledger "HOTFIX: {Name}" "{Brief Fix Description}"`
@@ -0,0 +1,89 @@
1
+ <instructions>
2
+ FOLLOW THIS EXACT STRUCTURE. Output sections in order 1-4.
3
+
4
+ 1. **Header**: Set Status, link to Roadmap and Delivery Plan
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/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
+ # Risk Registry: {Project Name}
35
+
36
+ ---
37
+
38
+ > **Last Updated**: {YYYY-MM-DD}
39
+ > **Status**: Active / Archived
40
+ > **Roadmap**: `product_plans/{project}_roadmap.md`
41
+
42
+ ---
43
+
44
+ ## 1. Active Risks
45
+
46
+ | ID | Risk | Phase | Source | Likelihood | Impact | Mitigation | Owner | Status |
47
+ |----|------|-------|--------|------------|--------|------------|-------|--------|
48
+ | R-001 | {Risk description} | {Verification/Bounce/Review} | {EPIC-XXX or STORY-XXX-YY} | Low/Medium/High | Low/Medium/High/Critical | {Mitigation strategy} | {Owner} | Open |
49
+
50
+ **Summary**: {X} Active | {Y} Mitigating | {Z} Accepted
51
+
52
+ ---
53
+
54
+ ## 2. Risk Analysis Log
55
+
56
+ > Phase-stamped entries. Each entry is appended when a document transitions between V-Bounce phases.
57
+
58
+ ### {YYYY-MM-DD} — Phase: {Verification / Bounce / Review} ({Sprint S-XX})
59
+ **Trigger**: {What caused this analysis — e.g., "Sprint 1 stories moved to Ready to Bounce"}
60
+ **Documents Analyzed**: {List of docs reviewed}
61
+
62
+ **New Risks Identified**:
63
+ - R-{NNN}: {Risk description} — Source: {doc reference}
64
+
65
+ **Risks Updated**:
66
+ - R-{NNN}: {Status change and reason}
67
+
68
+ **Risks Resolved**:
69
+ - R-{NNN}: {Resolution description}
70
+
71
+ **Recommendation**: {Action items if any}
72
+
73
+ ---
74
+
75
+ ## 3. Closed Risks
76
+
77
+ | ID | Risk | Resolution | Phase Closed | Closed Date |
78
+ |----|------|------------|--------------|-------------|
79
+ | R-{NNN} | {Risk description} | {How it was resolved} | {Phase} | {YYYY-MM-DD} |
80
+
81
+ ---
82
+
83
+ ## 4. Change Log
84
+
85
+ <!-- Auto-appended when Risk Registry is updated -->
86
+
87
+ | Date | Change | By |
88
+ |------|--------|-----|
89
+ | {YYYY-MM-DD} | Initial creation | Architect |
@@ -0,0 +1,176 @@
1
+ <instructions>
2
+ FOLLOW THIS EXACT STRUCTURE. Output sections in order 1-7.
3
+
4
+ 1. **Header**: Set Status, Last Updated, link to Charter
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/{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
+ # Product Roadmap: {Project Name}
30
+
31
+ ---
32
+
33
+ > **Last Updated**: {YYYY-MM-DD}
34
+ > **Status**: Planning / Active / MVP Complete / Shipped
35
+ > **Charter**: `product_plans/{project}_charter.md`
36
+ > **Risk Registry**: `product_plans/RISK_REGISTRY.md`
37
+
38
+ ---
39
+
40
+ ## 1. Strategic Context
41
+
42
+ | Key | Value |
43
+ |-----|-------|
44
+ | **Vision** | {One sentence from Charter §1.1} |
45
+ | **Primary Goal** | {Main objective for this project window} |
46
+ | **Tech Stack** | {e.g., Next.js, FastAPI, Supabase} |
47
+ | **Target Users** | {Primary user persona from Charter} |
48
+
49
+ ### Success Metrics
50
+ > Pulled from Charter §1.3. These define when the project is "done."
51
+
52
+ - {Metric 1: e.g., "User signup conversion > 60%"}
53
+ - {Metric 2: e.g., "Page load < 2s on 3G"}
54
+
55
+ ---
56
+
57
+ ## 2. Release Plan
58
+
59
+ > Group epics into named releases with clear exit criteria. Each release is a shippable milestone.
60
+ > Releases are NOT sprints — a release may span multiple sprints.
61
+ > Sprint-level tracking belongs in the Delivery Plan.
62
+
63
+ ### Release 1: {Release Name} (e.g., "Foundation")
64
+ **Target**: {YYYY-MM-DD or Quarter}
65
+ **Exit Criteria**: {What must be true for this release to ship — e.g., "Users can sign up, log in, and see dashboard"}
66
+
67
+ | Epic | Priority | Status | Notes |
68
+ |------|----------|--------|-------|
69
+ | EPIC-001: {Name} | P0 | Draft / Ready / In Progress / Done | {Dependencies or blockers} |
70
+ | EPIC-002: {Name} | P1 | Draft | |
71
+
72
+ ### Release 2: {Release Name} (e.g., "Core Features")
73
+ **Target**: {YYYY-MM-DD or Quarter}
74
+ **Exit Criteria**: {e.g., "Full CRUD on all entities, third-party integration live"}
75
+
76
+ | Epic | Priority | Status | Notes |
77
+ |------|----------|--------|-------|
78
+ | EPIC-003: {Name} | P0 | Draft | |
79
+
80
+ ### Release 3: {Release Name} (e.g., "Polish & Scale")
81
+ **Target**: {YYYY-MM-DD or Quarter}
82
+ **Exit Criteria**: {e.g., "Performance targets met, monitoring in place"}
83
+
84
+ | Epic | Priority | Status | Notes |
85
+ |------|----------|--------|-------|
86
+ | {Future Epics} | | | |
87
+
88
+ ---
89
+
90
+ ## 3. Technical Architecture Decisions
91
+
92
+ > Architecture Decision Records (ADRs). Agents reference these when hitting ambiguity.
93
+ > Each decision is immutable once "Decided" — create a new row to override.
94
+
95
+ | ID | Decision | Choice | Rationale | Status | Date |
96
+ |----|----------|--------|-----------|--------|------|
97
+ | ADR-001 | Auth Provider | {e.g., Supabase Auth} | {Why — cost, speed, integration} | Decided / Proposed / Superseded | {YYYY-MM-DD} |
98
+ | ADR-002 | Database | {e.g., PostgreSQL via Supabase} | {Why} | Decided | |
99
+ | ADR-003 | Hosting | {e.g., Vercel + Railway} | {Why} | Proposed | |
100
+ | ADR-004 | State Management | {e.g., Zustand} | {Why} | Decided | |
101
+
102
+ ---
103
+
104
+ ## 4. Dependencies & Integration Map
105
+
106
+ > External services, cross-epic dependencies, and anything that blocks progress if unavailable.
107
+
108
+ ### External Dependencies
109
+ | Service | Purpose | Status | Risk if Unavailable |
110
+ |---------|---------|--------|---------------------|
111
+ | {e.g., Stripe API} | Payment processing | Available / Pending Access / TBD | {e.g., "Cannot ship Release 2"} |
112
+ | {e.g., SendGrid} | Transactional email | Available | Low — fallback exists |
113
+
114
+ ### Cross-Epic Dependencies
115
+ | Epic | Depends On | Relationship | Status |
116
+ |------|------------|--------------|--------|
117
+ | EPIC-003 | EPIC-001 | Requires auth system | Blocked / Ready |
118
+ | EPIC-004 | EPIC-002 | Shares data model | In Progress |
119
+
120
+ ---
121
+
122
+ ## 5. Strategic Constraints
123
+
124
+ > Hard boundaries that shape prioritization and scope. These override feature requests.
125
+
126
+ | Constraint | Type | Impact | Mitigation |
127
+ |------------|------|--------|------------|
128
+ | {e.g., Launch by Q2 2026} | Deadline | Caps scope to Release 1 + 2 | Cut P2 epics if behind |
129
+ | {e.g., Solo developer} | Capacity | Max 2 epics per sprint | Lean on AI agents for L1-L2 stories |
130
+ | {e.g., GDPR compliance} | Regulatory | Must audit data flows before launch | Include in Release 1 exit criteria |
131
+ | {e.g., $0 infrastructure budget} | Budget | Free-tier only | Supabase free tier + Vercel hobby |
132
+
133
+ ---
134
+
135
+ ## 6. Open Questions
136
+
137
+ > Unresolved items that affect strategic direction. Operational questions go in the Delivery Plan.
138
+
139
+ | Question | Options | Impact | Owner | Status |
140
+ |----------|---------|--------|-------|--------|
141
+ | {e.g., "Build mobile app or PWA?"} | A: Native, B: PWA | Affects Release 3 scope | {name} | Open / Decided |
142
+ | {e.g., "Self-host or managed DB?"} | A: Supabase, B: PlanetScale | ADR-002 | {name} | Decided |
143
+
144
+ ---
145
+
146
+ ## 7. Delivery Log
147
+
148
+ > Appended by Team Lead when a delivery (release) is archived.
149
+ > Each entry is the release notes — a summary of sprint reports from that delivery.
150
+
151
+ ### D-{NN}: {Release Name}
152
+ **Delivered**: {YYYY-MM-DD}
153
+ **Release Tag**: v{VERSION}
154
+ **Delivery Folder**: `product_plans/archive/D-{NN}_{release_name}/`
155
+
156
+ **Release Notes**:
157
+ > {Summary of what was shipped — compiled from sprint reports. Key features, important fixes, architectural changes.}
158
+
159
+ **Metrics**:
160
+ | Metric | Value |
161
+ |--------|-------|
162
+ | Stories Delivered | {X} |
163
+ | Stories Escalated | {Y} |
164
+ | Total Sprints | {N} |
165
+ | Average Bounce Ratio | {X}% |
166
+ | Average Correction Tax | {X}% |
167
+
168
+ ---
169
+
170
+ ## 8. Change Log
171
+
172
+ <!-- Auto-appended when Roadmap is updated -->
173
+
174
+ | Date | Change | By |
175
+ |------|--------|-----|
176
+ | {YYYY-MM-DD} | Initial creation from Charter | Architect |
@@ -0,0 +1,151 @@
1
+ <instructions>
2
+ FOLLOW THIS EXACT STRUCTURE. Output sections in order 1-6.
3
+
4
+ 1. **Header**: Sprint ID, Goal, Dates, Status, Delivery
5
+ 2. **§1 What Was Delivered**: User-facing summary — what's accessible/usable vs what's internal/backend
6
+ 3. **§2 Story Results**: Table of all stories with final status and per-story metrics
7
+ 4. **§3 Execution Metrics**: AI performance metrics — tokens, duration, bounces, correction tax
8
+ 5. **§4 Lessons Learned**: Flagged from agent reports, pending user approval to record
9
+ 6. **§5 Retrospective**: What went well, what didn't, and what to change — covers both project and delivery process
10
+
11
+ This template is used by the Team Lead at Sprint Consolidation (Step 7).
12
+ Written to `.bounce/sprint-report.md`, then archived to `.bounce/archive/S-{XX}/`.
13
+
14
+ When the delivery completes, sprint reports are summarized into the Roadmap §7 Delivery Log
15
+ as Release Notes.
16
+
17
+ The §1 section is critical — the user wants to know what they can see, touch, and use NOW
18
+ versus what was built under the hood. Write it from the user's perspective, not the developer's.
19
+
20
+ Do NOT output these instructions.
21
+ </instructions>
22
+
23
+ # Sprint Report: S-{XX}
24
+
25
+ ---
26
+
27
+ > **Sprint Goal**: {One-sentence North Star}
28
+ > **Dates**: {MM/DD - MM/DD}
29
+ > **Status**: Achieved / Partially Achieved / Failed
30
+ > **Delivery**: D-{NN}_{release_name}
31
+ > **Delivery Plan**: `product_plans/{delivery}/DELIVERY_PLAN.md`
32
+
33
+ ---
34
+
35
+ ## 1. What Was Delivered
36
+
37
+ ### User-Facing (Accessible Now)
38
+ > Features, screens, or workflows the user can see, interact with, or test right now.
39
+
40
+ - {e.g., "Login page with email/password authentication — accessible at /login"}
41
+ - {e.g., "Dashboard with project overview cards — accessible at /dashboard"}
42
+ - {e.g., "Settings page with profile editing — accessible at /settings"}
43
+
44
+ ### Internal / Backend (Not Directly Visible)
45
+ > Infrastructure, APIs, database changes, or plumbing that supports future features.
46
+
47
+ - {e.g., "User roles and permissions system — API endpoints ready, no UI yet"}
48
+ - {e.g., "Database migration for notifications table — schema deployed"}
49
+ - {e.g., "Rate limiting middleware on all API routes"}
50
+
51
+ ### Not Completed
52
+ > Stories that were planned but didn't make it (escalated, deferred, or partially done).
53
+
54
+ - {e.g., "STORY-001-03: Email notifications — Escalated (template integration failed 3x)"}
55
+
56
+ ### Product Docs Affected
57
+ > Any product documentation files modified, created, or identified for updates. Handed off to Scribe agent.
58
+
59
+ - {e.g., "product_documentation/api_reference.md — Added rate limiting details"}
60
+
61
+ ---
62
+
63
+ ## 2. Story Results
64
+
65
+ | Story | Epic | Label | Final State | Bounces (QA) | Bounces (Arch) | Correction Tax |
66
+ |-------|------|-------|-------------|--------------|----------------|----------------|
67
+ | STORY-{ID}: {name} | EPIC-{ID} | L{N} | Done / Escalated / Parking Lot | {N} | {N} | {X}% |
68
+
69
+ ### Story Highlights
70
+ - **{STORY-ID}**: {1-sentence summary of what was built and any notable decisions}
71
+
72
+ ### Escalated Stories (if any)
73
+ - **{STORY-ID}**: Escalated after {N} bounces. Root cause: {why}. Recommendation: {rewrite spec / descope / kill}.
74
+
75
+ ---
76
+
77
+ ## 3. Execution Metrics
78
+
79
+ ### AI Performance
80
+
81
+ | Metric | Value | Notes |
82
+ |--------|-------|-------|
83
+ | **Total Tokens Used** | {N} | input + output across all agents |
84
+ | **Output Tokens** | {N} | tokens generated by agents |
85
+ | **Input Tokens** | {N} | context fed to agents |
86
+ | **Total Execution Duration** | {X}h {Y}m | wall-clock time from sprint start to completion |
87
+ | **Agent Sessions** | {N} | total subagent spawns (Dev + QA + Arch + DevOps + Scribe) |
88
+ | **Estimated Cost** | ${X.XX} | based on model pricing at time of execution |
89
+
90
+ ### V-Bounce Quality
91
+
92
+ | Metric | Value | Notes |
93
+ |--------|-------|-------|
94
+ | **Stories Planned** | {X} | |
95
+ | **Stories Delivered** | {Y} | |
96
+ | **Stories Escalated** | {Z} | |
97
+ | **Total QA Bounces** | {N} | across all stories |
98
+ | **Total Architect Bounces** | {N} | across all stories |
99
+ | **Bounce Ratio** | {X}% | (total bounces / total stories) |
100
+ | **Average Correction Tax** | {X}% | (0% = autonomous, 100% = human rewrote everything) |
101
+ | **First-Pass Success Rate** | {X}% | stories that passed QA on first try |
102
+ | **Merge Conflicts** | {N} simple, {N} complex | |
103
+
104
+ ### Per-Story Breakdown
105
+
106
+ | Story | Tokens | Duration | Agent Sessions | Bounces | Cost |
107
+ |-------|--------|----------|----------------|---------|------|
108
+ | STORY-{ID} | {N} | {Xh Ym} | {N} | {N} | ${X.XX} |
109
+
110
+ ---
111
+
112
+ ## 4. Lessons Learned
113
+
114
+ > Flagged by agents during the sprint. Each needs user approval before recording to LESSONS.md.
115
+
116
+ | Source | Lesson | Approved? |
117
+ |--------|--------|-----------|
118
+ | STORY-{ID} Dev Report | {What happened and proposed rule} | Pending / Yes / No |
119
+
120
+ ---
121
+
122
+ ## 5. Retrospective
123
+
124
+ ### What Went Well
125
+ > Practices, patterns, or decisions that worked and should be repeated.
126
+
127
+ - {e.g., "Splitting EPIC-001 into small L2 stories kept bounces low — 80% first-pass success"}
128
+ - {e.g., "Reading _manifest.json upfront saved Dev from duplicating existing API docs"}
129
+
130
+ ### What Didn't Go Well
131
+ > Problems encountered, root causes, and impact on the sprint.
132
+
133
+ - {e.g., "STORY-001-03 escalated because the spec was ambiguous — 3 QA bounces wasted"}
134
+ - {e.g., "Merge conflict on STORY-002-01 required a fix story — cost an extra half-day"}
135
+
136
+ ### Process Improvements
137
+ > Changes to the V-Bounce delivery process itself — not just this project, but how we work.
138
+
139
+ - {e.g., "Story specs for L3+ stories should require Architect pre-review before bouncing"}
140
+ - {e.g., "QA found the same import ordering issue in 3 stories — add linting rule to Dev setup, not just LESSONS.md"}
141
+ - {e.g., "L3 stories consumed 4x the tokens of L2s — add a complexity budget to sprint planning"}
142
+ - {e.g., "First-pass success rate was 40% — require Ambiguity 🟢 on all stories, not just Context Pack checks"}
143
+ - {e.g., "Sprint Integration Audit (Step 6) found no issues in 3 consecutive sprints — consider making it conditional for small sprints"}
144
+
145
+ ---
146
+
147
+ ## 6. Change Log
148
+
149
+ | Date | Change | By |
150
+ |------|--------|-----|
151
+ | {YYYY-MM-DD} | Sprint Report generated | Team Lead |
@@ -0,0 +1,150 @@
1
+ <instructions>
2
+ FOLLOW THIS EXACT STRUCTURE. Output sections in order 1-4.
3
+
4
+ 1. **Metadata Table**: Parent Epic, Status, Ambiguity, Actor, Complexity, Complexity Label
5
+ 2. **§1 The Spec**: User Story (As a... I want... So that...) + Detailed Requirements
6
+ 3. **§2 The Truth**: Gherkin acceptance criteria + manual verification steps
7
+ 4. **§3 Implementation Guide**: Files to modify, technical logic, API contract
8
+ 5. **§4 Definition of Done**: Checklist (compiles, tests pass, linting, docs)
9
+
10
+ Ambiguity Score:
11
+ - 🔴 High: Requirements unclear
12
+ - 🟡 Medium: Logic clear, files TBD
13
+ - 🟢 Low: Ready for coding
14
+
15
+ Output location: `product_plans/{delivery}/EPIC-{NNN}_{epic_name}/STORY-{EpicID}-{StoryID}.md`
16
+ (Stories live inside their parent Epic folder — a Story never exists without an Epic.)
17
+
18
+ Document Hierarchy Position: LEVEL 4 (Charter → Roadmap → Epic → **Story**)
19
+
20
+ Upstream sources:
21
+ - §1 The Spec inherits from parent Epic §2 Scope Boundaries
22
+ - §3 Implementation Guide references Epic §4 Technical Context and Roadmap §3 ADRs
23
+ - Acceptance criteria (§2) refine Epic §7 Acceptance Criteria into per-story scenarios
24
+ - Complexity Label aligns with Delivery Plan story label definitions (L1-L4)
25
+
26
+ Downstream consumers:
27
+ - Developer Agent reads §1 The Spec and §3 Implementation Guide (with react-best-practices skill)
28
+ - QA Agent reads §2 The Truth to validate implementation (with vibe-code-review skill)
29
+ - Architect Agent reads full story context for Safe Zone compliance audit
30
+ - Delivery Plan §3 Active Sprint tracks story V-Bounce state
31
+ - Delivery Plan §5 Context Pack Status tracks per-story readiness using this template's sections
32
+
33
+ Agent handoff sections:
34
+ - §1 The Spec → Human contract (PM/BA writes, Dev reads)
35
+ - §2 The Truth → QA contract (BA writes, QA Agent executes)
36
+ - §3 Implementation Guide → AI-to-AI instructions (Architect writes, Dev Agent executes)
37
+
38
+ Do NOT output these instructions.
39
+ </instructions>
40
+
41
+ # STORY-{EpicID}-{StoryID}: {Story Name}
42
+
43
+ ## Metadata
44
+
45
+ | Field | Value |
46
+ |-------|-------|
47
+ | **Parent Epic** | [EPIC-{ID}: {Name}](link) |
48
+ | **Status** | Draft / Refinement / Probing/Spiking / Ready to Bounce / Bouncing / QA Passed / Architect Passed / Sprint Review / Done / Escalated / Parking Lot |
49
+ | **Ambiguity** | 🔴 High / 🟡 Medium / 🟢 Low |
50
+ | **Context Source** | Epic §{section} / Codebase / User Input |
51
+ | **Actor** | {Persona Name} |
52
+ | **Complexity** | Small (1 file) / Medium (2-3 files) / Large (Refactor needed) |
53
+ | **Complexity Label** | L1 / L2 / L3 / L4 (default: L2) |
54
+
55
+ ### Complexity Labels (Sprint Planning)
56
+
57
+ - **L1**: Trivial — Single file, <1hr vibe time, known pattern
58
+ - **L2**: Standard — 2-3 files, known pattern, ~2-4hr vibe time *(default)*
59
+ - **L3**: Complex — Cross-cutting, spike may be needed, ~1-2 days
60
+ - **L4**: Uncertain — Requires Probing/Spiking before Bounce, >2 days
61
+
62
+ This story is labeled: **{L1/L2/L3/L4}**
63
+
64
+ ---
65
+
66
+ ## 1. The Spec (The Contract)
67
+ > Human-Readable Requirements. The "What".
68
+ > Target Audience: PM, BA, Stakeholders, Developer Agent.
69
+
70
+ ### 1.1 User Story
71
+ > As a **{Persona}**,
72
+ > I want to **{Action}**,
73
+ > So that **{Benefit}**.
74
+
75
+ ### 1.2 Detailed Requirements
76
+ - **Requirement 1**: {Specific behavior, e.g., "The button must be disabled until..."}
77
+ - **Requirement 2**: {Specific data, e.g., "The field accepts only valid UUIDs."}
78
+ - **Requirement 3**: {UI state, e.g., "Show a spinner while loading."}
79
+
80
+ ---
81
+
82
+ ## 2. The Truth (Executable Tests)
83
+ > The QA Agent uses this to verify the work. If these don't pass, the Bounce failed.
84
+ > Target Audience: QA Agent (with vibe-code-review skill).
85
+
86
+ ### 2.1 Acceptance Criteria (Gherkin/Pseudocode)
87
+ ```gherkin
88
+ Feature: {Story Name}
89
+
90
+ Scenario: {Happy Path}
91
+ Given {precondition}
92
+ When {user action}
93
+ Then {system response}
94
+ And {database state change}
95
+
96
+ Scenario: {Edge Case / Error}
97
+ Given {precondition}
98
+ When {invalid action}
99
+ Then {error message}
100
+ ```
101
+
102
+ ### 2.2 Verification Steps (Manual/Mob)
103
+ - [ ] Verify visual alignment with Design System.
104
+ - [ ] Check mobile responsiveness.
105
+
106
+ ---
107
+
108
+ ## 3. The Implementation Guide (AI-to-AI)
109
+ > Instructions for the Developer Agent. The "How".
110
+ > Target Audience: Developer Agent (with react-best-practices + lesson skills).
111
+
112
+ ### 3.1 Context & Files
113
+ | Item | Value |
114
+ |------|-------|
115
+ | **Primary File** | `{filepath/to/main/component.ts}` |
116
+ | **Related Files** | `{filepath/to/api/service.ts}`, `{filepath/to/types.ts}` |
117
+ | **New Files Needed** | Yes/No — `{Name of file}` |
118
+ | **ADR References** | ADR-{NNN} from Roadmap §3 |
119
+
120
+ ### 3.2 Technical Logic
121
+ - {Describe the logic flow, e.g., "Use the existing useAuth hook to check permissions."}
122
+ - {Describe state management, e.g., "Store the result in the global Zustand store."}
123
+
124
+ ### 3.3 API Contract (If applicable)
125
+ ```json
126
+ // Expected Request
127
+ POST /api/resource
128
+ {
129
+ "id": "string",
130
+ "value": number
131
+ }
132
+
133
+ // Expected Response
134
+ 200 OK
135
+ {
136
+ "id": "string",
137
+ "status": "created"
138
+ }
139
+ ```
140
+
141
+ ---
142
+
143
+ ## 4. Definition of Done (The Gate)
144
+ - [ ] Code compiles without errors.
145
+ - [ ] New Unit Tests are written and passing.
146
+ - [ ] All Acceptance Criteria (§2.1) pass.
147
+ - [ ] Linting rules passed.
148
+ - [ ] LESSONS.md consulted before implementation.
149
+ - [ ] No violations of Roadmap ADRs.
150
+ - [ ] Documentation (API/Tech Stack) updated.