@sandrinio/vbounce 1.6.0 → 1.8.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 (48) hide show
  1. package/README.md +108 -18
  2. package/bin/vbounce.mjs +306 -145
  3. package/brains/AGENTS.md +5 -5
  4. package/brains/CHANGELOG.md +88 -1
  5. package/brains/CLAUDE.md +22 -17
  6. package/brains/GEMINI.md +40 -4
  7. package/brains/SETUP.md +11 -5
  8. package/brains/claude-agents/architect.md +13 -6
  9. package/brains/claude-agents/developer.md +2 -2
  10. package/brains/claude-agents/qa.md +17 -7
  11. package/brains/copilot/copilot-instructions.md +49 -0
  12. package/brains/cursor-rules/vbounce-process.mdc +2 -2
  13. package/brains/windsurf/.windsurfrules +30 -0
  14. package/package.json +2 -4
  15. package/scripts/close_sprint.mjs +94 -0
  16. package/scripts/complete_story.mjs +113 -0
  17. package/scripts/doctor.mjs +144 -0
  18. package/scripts/init_sprint.mjs +121 -0
  19. package/scripts/prep_arch_context.mjs +178 -0
  20. package/scripts/prep_qa_context.mjs +152 -0
  21. package/scripts/prep_sprint_context.mjs +141 -0
  22. package/scripts/prep_sprint_summary.mjs +154 -0
  23. package/scripts/sprint_trends.mjs +160 -0
  24. package/scripts/suggest_improvements.mjs +200 -0
  25. package/scripts/update_state.mjs +132 -0
  26. package/scripts/validate_bounce_readiness.mjs +152 -0
  27. package/scripts/validate_report.mjs +39 -2
  28. package/scripts/validate_sprint_plan.mjs +117 -0
  29. package/scripts/validate_state.mjs +99 -0
  30. package/scripts/vdoc_match.mjs +269 -0
  31. package/scripts/vdoc_staleness.mjs +199 -0
  32. package/skills/agent-team/SKILL.md +53 -28
  33. package/skills/agent-team/references/cleanup.md +42 -0
  34. package/skills/agent-team/references/delivery-sync.md +43 -0
  35. package/skills/agent-team/references/git-strategy.md +52 -0
  36. package/skills/agent-team/references/mid-sprint-triage.md +71 -0
  37. package/skills/agent-team/references/report-naming.md +34 -0
  38. package/skills/doc-manager/SKILL.md +5 -4
  39. package/skills/improve/SKILL.md +1 -1
  40. package/skills/lesson/SKILL.md +23 -0
  41. package/templates/delivery_plan.md +1 -1
  42. package/templates/hotfix.md +1 -1
  43. package/templates/sprint.md +65 -13
  44. package/templates/sprint_report.md +14 -3
  45. package/templates/story.md +1 -1
  46. package/scripts/pre_bounce_sync.sh +0 -37
  47. package/scripts/vbounce_ask.mjs +0 -98
  48. package/scripts/vbounce_index.mjs +0 -184
@@ -61,12 +61,12 @@ repo/ ← main working directory
61
61
 
62
62
  └── .bounce/
63
63
  ├── reports/ ← active working reports (GITIGNORED)
64
- ├── sprint-report.md ← current sprint report (GITIGNORED)
64
+ ├── sprint-report-S-{XX}.md ← current sprint report (GITIGNORED)
65
65
  └── archive/ ← completed sprint history (COMMITTED TO GIT)
66
66
  └── S-01/
67
67
  ├── STORY-001-01/ ← all agent reports for this story
68
- ├── sprint-report.md ← final sprint report
69
- └── sprint-devops.md ← release report
68
+ ├── sprint-report-S-{XX}.md ← final sprint report
69
+ └── sprint-S-{XX}-devops.md ← release report
70
70
  ```
71
71
 
72
72
  ### V-Bounce State → Git Operations
@@ -154,7 +154,7 @@ For tools without native subagent support (Cursor, Codex, Gemini, Antigravity):
154
154
 
155
155
  **After story completes:** Reports are archived to the shared `.bounce/archive/S-{XX}/STORY-{ID}-{StoryName}/` in the main repo before the worktree is removed.
156
156
 
157
- **Sprint Report:** Always written to `.bounce/sprint-report.md` in the main repo (not in any worktree).
157
+ **Sprint Report:** Always written to `.bounce/sprint-report-S-{XX}.md` in the main repo (not in any worktree).
158
158
 
159
159
  ### Report File Naming
160
160
 
@@ -327,7 +327,7 @@ After ALL stories are merged into `sprint/S-01`:
327
327
  ```
328
328
  1. Read all archived reports in .bounce/archive/S-{XX}/
329
329
  2. **Sum the `tokens_used` field** from every agent report to calculate the sprint's total resource cost.
330
- 3. Generate Sprint Report to .bounce/sprint-report.md:
330
+ 3. Generate Sprint Report to .bounce/sprint-report-S-{XX}.md:
331
331
  - Ensure the Sprint Report starts with a YAML frontmatter block containing:
332
332
  ```yaml
333
333
  ---
@@ -347,9 +347,9 @@ After ALL stories are merged into `sprint/S-01`:
347
347
  - Run full test suite + build + lint on main
348
348
  - Sprint branch cleanup
349
349
  - Environment verification (if applicable)
350
- - DevOps writes Sprint Release Report to .bounce/archive/S-{XX}/sprint-devops.md
350
+ - DevOps writes Sprint Release Report to .bounce/archive/S-{XX}/sprint-S-{XX}-devops.md
351
351
  6. Lead finalizes:
352
- - Move sprint-report.md to .bounce/archive/S-{XX}/
352
+ - Move sprint-report-S-{XX}.md to .bounce/archive/S-{XX}/
353
353
  - Record lessons (with user approval)
354
354
  - Update delivery_plan.md to reflect the completed sprint.
355
355
  7. **Framework Self-Assessment** (aggregated from agent reports):
@@ -359,17 +359,24 @@ After ALL stories are merged into `sprint/S-01`:
359
359
  - Offer to run the `improve` skill to propose framework changes
360
360
  - If user approves → read `skills/improve/SKILL.md` and execute the improvement process
361
361
  8. Product Documentation check (runs on `main` after sprint merge):
362
- - If sprint delivered 3+ features, or if any Developer report flagged
363
- stale product docs offer to run vdoc to generate/update
364
- vdocs/
365
- - If user approves spawn scribe subagent on `main` branch with:
366
- - Sprint Report (what was built)
367
- - Dev reports that flagged affected product docs
368
- - Current _manifest.json (if exists)
369
- - Mode: "audit" (if docs exist) or "init" (if first time)
370
- - Scribe generates/updates docs and writes Scribe Report
371
- - Documentation is post-implementation it reflects what was built
372
- - Scribe commits documentation as a follow-up commit on `main`
362
+ a. **Staleness Detection** run `./scripts/vdoc_staleness.mjs S-{XX}`
363
+ - Cross-references all Dev Reports' `files_modified` against manifest key files
364
+ - Generates `.bounce/scribe-task-S-{XX}.md` with targeted list of stale docs
365
+ - Populates Sprint Report §1 "Product Docs Affected" table
366
+ - If no `vdocs/_manifest.json` exists → skip silently (graceful no-op)
367
+ b. **Scribe Task Decision:**
368
+ - If staleness detection found stale docs → offer targeted Scribe task
369
+ - If sprint delivered 3+ features and no vdocs exist offer vdoc init
370
+ - If any Developer report flagged stale product docs offer Scribe update
371
+ c. If user approves spawn scribe subagent on `main` branch with:
372
+ - `.bounce/scribe-task-S-{XX}.md` (targeted task when available)
373
+ - Sprint Report (what was built)
374
+ - Dev reports that flagged affected product docs
375
+ - Current _manifest.json (if exists)
376
+ - Mode: "audit" (if docs exist) or "init" (if first time)
377
+ d. Scribe generates/updates docs and writes Scribe Report
378
+ - Documentation is post-implementation — it reflects what was built
379
+ - Scribe commits documentation as a follow-up commit on `main`
373
380
  ```
374
381
 
375
382
  ---
@@ -420,15 +427,18 @@ When ALL sprints in a delivery (release) are done:
420
427
 
421
428
  The Team Lead MUST update the active `sprint-{XX}.md` at every state transition. This is the source of truth for execution.
422
429
 
423
- | Action | Sprint Plan Update |
424
- |--------|---------------------|
425
- | Worktree created | §1 Active Scope: V-Bounce State → "Bouncing" |
426
- | Dev report written | No update (still "Bouncing") |
427
- | QA passes | §1 Active Scope: V-Bounce State → "QA Passed" |
428
- | Architect passes | §1 Active Scope: V-Bounce State → "Architect Passed" |
429
- | DevOps merges story | §1 Active Scope: V-Bounce State → "Done" |
430
- | Escalated | §1 Escalated table |
431
- | DevOps merges sprint | Update `delivery_plan.md` to flag sprint delivered |
430
+ | Action | Sprint Plan Update | Delivery Plan Update |
431
+ |--------|-------------------|--------------------|
432
+ | Worktree created | §1: V-Bounce State → "Bouncing" | **Nothing** — Sprint Plan is source of truth |
433
+ | Dev report written | No update (still "Bouncing") | **Nothing** |
434
+ | QA passes | §1: V-Bounce State → "QA Passed" | **Nothing** |
435
+ | Architect passes | §1: V-Bounce State → "Architect Passed" | **Nothing** |
436
+ | DevOps merges story | §1: V-Bounce State → "Done". §4: Add Execution Log row (via `vbounce story complete`) | **Nothing** |
437
+ | Escalated | §1: Move story to Escalated section | **Nothing** |
438
+ | Sprint CLOSES | Status → "Completed" in frontmatter | §2: sprint → Completed. §4: add summary. §3: remove delivered stories |
439
+
440
+ > **Key rule**: The Delivery Plan is updated ONLY at sprint close, never during active bouncing.
441
+ > See `skills/agent-team/references/delivery-sync.md` for full sync rules.
432
442
 
433
443
  ---
434
444
 
@@ -448,6 +458,21 @@ When QA bounce count >= 3 OR Architect bounce count >= 3:
448
458
  - **If returned to Refinement:** The spec has been rewritten. You MUST reset the QA and Architect bounce counters to 0 for this story.
449
459
  - If killed: `git worktree remove`, branch preserved unmerged
450
460
 
461
+ ### Mid-Sprint Change Requests
462
+ When the user provides input mid-bounce that isn't a direct answer to an agent question (e.g., "this is broken", "change the approach", "I meant X not Y"), the Team Lead MUST triage it before acting.
463
+
464
+ > See `skills/agent-team/references/mid-sprint-triage.md` for the full triage flow, routing rules, and logging requirements.
465
+
466
+ **Quick reference — categories:**
467
+ | Category | Route | Bounce Impact |
468
+ |----------|-------|---------------|
469
+ | **Bug** | Hotfix or bug-fix task in current story | No bounce increment |
470
+ | **Spec Clarification** | Update Story spec, continue bounce | No impact |
471
+ | **Scope Change** | Pause, update spec, confirm with user | Resets Dev pass |
472
+ | **Approach Change** | Update §3 Implementation Guide, re-delegate | Resets Dev pass |
473
+
474
+ Every change request is logged in `sprint-{XX}.md` §4 Execution Log with event type `CR` and reported in Sprint Report §2.1.
475
+
451
476
  ### Mid-Sprint Strategic Changes
452
477
  Charter and Roadmap are typically **frozen** during active sprints. However, if an emergency requires modifying them:
453
478
  1. You MUST pause active bouncing across all stories.
@@ -470,7 +495,7 @@ If merging story branch into sprint branch creates conflicts:
470
495
  - **Reports are the only handoff.** No agent communicates with another directly.
471
496
  - **One bounce = one report.** Every agent pass produces exactly one report file.
472
497
  - **Archive before remove.** Always copy reports to shared archive before removing a worktree.
473
- - **Sync the Delivery Plan.** Update V-Bounce state at EVERY transition. The Delivery Plan is the source of truth.
498
+ - **Sync the Sprint Plan.** Update V-Bounce State in sprint-{XX}.md §1 at EVERY transition. The Sprint Plan is the source of truth DURING the sprint. The Delivery Plan is updated at sprint boundaries only — see `skills/agent-team/references/delivery-sync.md`.
474
499
  - **Track bounce counts.** QA and Architect bounces are tracked separately per story.
475
500
  - **Git tracking rules.** `.worktrees/`, `.bounce/reports/`, and `.bounce/sprint-report.md` are gitignored (ephemeral). `.bounce/archive/` is **committed to git** (permanent audit trail).
476
501
  - **Check risks before bouncing.** Read RISK_REGISTRY.md at sprint start. Flag high-severity risks that affect planned stories.
@@ -0,0 +1,42 @@
1
+ # Cleanup & Archive Rules
2
+
3
+ > On-demand reference from agent-team/SKILL.md. Read during sprint close or when archiving.
4
+
5
+ ## After Each Story Completes (DevOps Step 5)
6
+
7
+ 1. Archive all reports to `.bounce/archive/S-{XX}/STORY-{ID}-{StoryName}/`
8
+ 2. Merge story branch into sprint branch (--no-ff)
9
+ 3. Validate tests/build on sprint branch
10
+ 4. Remove worktree: `git worktree remove .worktrees/STORY-{ID}-{StoryName}`
11
+ 5. Delete story branch: `git branch -d story/STORY-{ID}-{StoryName}`
12
+ 6. Write DevOps Merge Report to `.bounce/archive/S-{XX}/STORY-{ID}-{StoryName}/`
13
+
14
+ ## After Sprint Completes (DevOps Step 7)
15
+
16
+ 1. Merge sprint branch into main (--no-ff)
17
+ 2. Tag release: `git tag -a v{VERSION}`
18
+ 3. Run full validation (tests + build + lint)
19
+ 4. Delete sprint branch: `git branch -d sprint/S-{XX}`
20
+ 5. Verify `.worktrees/` is empty
21
+ 6. Write Sprint Release Report to `.bounce/archive/S-{XX}/sprint-S-{XX}-devops.md`
22
+ 7. Lead archives Sprint Plan: `mv product_plans/sprints/sprint-{XX}/ product_plans/archive/sprints/sprint-{XX}/`
23
+ 8. Lead archives sprint report: `mv .bounce/sprint-report-S-{XX}.md .bounce/archive/S-{XX}/`
24
+ 9. Run: `vbounce trends && vbounce suggest S-{XX}` — generates improvement recommendations
25
+
26
+ ## Retention Policy
27
+
28
+ | Location | Status | Rule |
29
+ |----------|--------|------|
30
+ | `.bounce/archive/` | **Committed to git** | Permanent audit trail — never delete |
31
+ | `.bounce/reports/` | **Gitignored** | Active working files only — ephemeral |
32
+ | `.bounce/sprint-report-S-{XX}.md` | **Gitignored** | Active sprint report — archived on close |
33
+ | `.bounce/sprint-context-*.md` | **Gitignored** | Regenerated each session |
34
+ | `.worktrees/` | **Gitignored** | Ephemeral — exists only during active bouncing |
35
+ | `product_plans/archive/` | **Committed** | Completed deliveries with all docs |
36
+
37
+ ## After Delivery Completes (Team Lead)
38
+
39
+ 1. Verify all stories in delivery are "Done" in Delivery Plan §4
40
+ 2. Move delivery folder: `mv product_plans/D-{NN}_{name}/ product_plans/archive/D-{NN}_{name}/`
41
+ 3. Add Delivery Log entry to Roadmap §7
42
+ 4. Update Roadmap §2 Release Plan: status → "Delivered"
@@ -0,0 +1,43 @@
1
+ # Delivery Plan Sync Rules
2
+
3
+ > On-demand reference from agent-team/SKILL.md. When and how to update the Delivery Plan.
4
+
5
+ ## Core Rule
6
+
7
+ **The Delivery Plan is updated ONLY at sprint boundaries — not during active bouncing.**
8
+
9
+ Story state changes are tracked in the Sprint Plan (sprint-{XX}.md) §1 ONLY.
10
+ The Delivery Plan is a strategic document — it does not track story states.
11
+
12
+ ## Sync Table
13
+
14
+ | Action | Sprint Plan Update | Delivery Plan Update |
15
+ |--------|-------------------|---------------------|
16
+ | Sprint starts | Status → "Active" (frontmatter) | §2: sprint status → Active |
17
+ | Story state changes | §1 V-Bounce State ONLY | **Nothing** |
18
+ | Story completes | §1 state → Done, §4 Execution Log row added | **Nothing** |
19
+ | Sprint ends | Status → "Completed" (frontmatter) | §2: sprint → Completed, §4: add summary row, §3: remove delivered stories |
20
+ | Hotfix applied | No sprint plan change | **Nothing** |
21
+
22
+ ## What Each Document Owns
23
+
24
+ **Sprint Plan** (sprint-{XX}.md):
25
+ - Story states (§1 V-Bounce State column)
26
+ - Context Pack Readiness (§1)
27
+ - Execution Strategy and phases (§2)
28
+ - Sprint open questions (§3)
29
+ - Execution Log accumulation (§4)
30
+
31
+ **Delivery Plan** (D-{NN}_DELIVERY_PLAN.md):
32
+ - Epic-level status (§2)
33
+ - Unassigned backlog stories (§3)
34
+ - Completed sprint history (§4)
35
+ - Project window and team (§1)
36
+
37
+ ## Never Do This
38
+
39
+ - ❌ Update Delivery Plan §2/§3 when a story bounces
40
+ - ❌ Update Delivery Plan §2/§3 when QA passes
41
+ - ❌ Update Delivery Plan §2/§3 when Architect passes
42
+ - ✅ Update Sprint Plan §1 for ALL state transitions during the sprint
43
+ - ✅ Update Delivery Plan §4 only when a sprint CLOSES
@@ -0,0 +1,52 @@
1
+ # Git Strategy Reference
2
+
3
+ > On-demand reference from agent-team/SKILL.md. Read when setting up worktrees or performing git operations.
4
+
5
+ ## Branch Model
6
+
7
+ ```
8
+ main ← production
9
+ └── sprint/S-01 ← sprint branch (cut from main)
10
+ ├── story/STORY-001-01-login ← story branch (worktree)
11
+ ├── story/STORY-001-02-auth ← story branch (worktree)
12
+ └── story/STORY-001-03-api ← story branch (worktree)
13
+ ```
14
+
15
+ ## Sprint Commands
16
+
17
+ ```bash
18
+ # Cut sprint branch
19
+ git checkout -b sprint/S-06 main
20
+
21
+ # Create story worktree
22
+ git worktree add .worktrees/STORY-001-01-login -b story/STORY-001-01-login sprint/S-06
23
+ mkdir -p .worktrees/STORY-001-01-login/.bounce/{tasks,reports}
24
+
25
+ # List active worktrees
26
+ git worktree list
27
+
28
+ # Merge story into sprint
29
+ git checkout sprint/S-06
30
+ git merge story/STORY-001-01-login --no-ff -m "Merge STORY-001-01: {Story Name}"
31
+
32
+ # Remove worktree after merge
33
+ git worktree remove .worktrees/STORY-001-01-login
34
+ git branch -d story/STORY-001-01-login
35
+
36
+ # Merge sprint into main
37
+ git checkout main
38
+ git merge sprint/S-06 --no-ff -m "Sprint S-06: {Sprint Goal}"
39
+ git tag -a v{VERSION} -m "Release v{VERSION}"
40
+ ```
41
+
42
+ ## V-Bounce State → Git Operations
43
+
44
+ | V-Bounce State | Git Operation |
45
+ |---------------|---------------|
46
+ | Sprint starts | `git checkout -b sprint/S-XX main` |
47
+ | Ready to Bounce | `git worktree add .worktrees/STORY-{ID} -b story/STORY-{ID} sprint/S-XX` |
48
+ | Bouncing | All work happens inside `.worktrees/STORY-{ID}/` |
49
+ | Done | Merge story branch → sprint branch, `git worktree remove` |
50
+ | Sprint Review → Done | Merge sprint branch → main |
51
+ | Escalated | Worktree kept but frozen (no new commits) |
52
+ | Parking Lot | Worktree removed, branch preserved unmerged |
@@ -0,0 +1,71 @@
1
+ # Mid-Sprint Change Request Triage
2
+
3
+ > On-demand reference from agent-team/SKILL.md. How the Team Lead handles user interruptions during an active sprint.
4
+
5
+ ## When This Applies
6
+
7
+ Any time the user provides input mid-bounce that is **not** a direct answer to a question the agent asked. Examples:
8
+ - "This is broken"
9
+ - "Actually, change the auth to use OAuth"
10
+ - "I meant X, not Y"
11
+ - "Can we also add Z?"
12
+ - "The wiring between A and B doesn't work"
13
+
14
+ ## Step 1 — Categorize
15
+
16
+ The Team Lead MUST classify the request before acting:
17
+
18
+ | Category | Definition | Example |
19
+ |----------|-----------|---------|
20
+ | **Bug** | Something built (or pre-existing) is broken | "Login crashes when email has a plus sign" |
21
+ | **Spec Clarification** | The spec was ambiguous; user is clarifying intent, not changing scope | "By 'admin' I meant workspace admin, not super admin" |
22
+ | **Scope Change** | User wants to add, remove, or modify requirements for the current story | "Also add a forgot-password flow to the login story" |
23
+ | **Approach Change** | Implementation strategy is wrong; needs a different technical path | "Don't use REST for this — wire it through WebSockets instead" |
24
+
25
+ ### How to Decide
26
+
27
+ ```
28
+ Is existing behavior broken?
29
+ YES → Bug
30
+ NO → Is the user adding/removing/changing a requirement?
31
+ YES → Scope Change
32
+ NO → Is the user correcting an ambiguity in the spec?
33
+ YES → Spec Clarification
34
+ NO → Approach Change (technical direction shift)
35
+ ```
36
+
37
+ ## Step 2 — Route
38
+
39
+ | Category | Action | Bounce Impact |
40
+ |----------|--------|---------------|
41
+ | **Bug** | If L1 (1-2 files): Hotfix Path. If larger: add as a bug-fix task within the current story bounce. | Does NOT increment QA/Arch bounce count. |
42
+ | **Spec Clarification** | Update Story spec inline (§1 or §2). Add a note in the Change Log. Continue current bounce. | Does NOT reset or increment bounce count. |
43
+ | **Scope Change** | Pause bounce. Update Story spec. If scope grew significantly, consider splitting into a new story. Reset Dev pass (QA/Arch counts preserved if prior passes are still valid). | Resets Dev pass only. Prior QA/Arch passes invalidated if the change affects tested areas. |
44
+ | **Approach Change** | Update Story §3 Implementation Guide. Re-delegate to Developer with updated context. | Resets Dev pass only. Prior QA/Arch passes invalidated. |
45
+
46
+ ## Step 3 — Log
47
+
48
+ Every change request MUST be logged in the Sprint Plan `sprint-{XX}.md` §4 Execution Log:
49
+
50
+ ```
51
+ | {timestamp} | CR | {Category} | {STORY-ID} | {One-line description} |
52
+ ```
53
+
54
+ Use `CR` as the event type to distinguish from regular bounce events.
55
+
56
+ ## Sprint Report Tracking
57
+
58
+ At sprint consolidation (Step 7), the Team Lead includes a **§2.1 Change Requests** section in the Sprint Report summarizing all mid-sprint CRs. This keeps change-request-driven work separate from agent-driven bounces so metrics aren't skewed.
59
+
60
+ | Story | Category | Description | Impact |
61
+ |-------|----------|-------------|--------|
62
+ | STORY-{ID} | Spec Clarification | Clarified admin role scope | No bounce reset |
63
+ | STORY-{ID} | Scope Change | Added forgot-password flow | Dev pass reset, +1 session |
64
+
65
+ ## Key Rules
66
+
67
+ - **Never silently absorb a user change.** Always categorize and log it.
68
+ - **Bugs don't penalize the bounce count.** They are defects, not process failures.
69
+ - **Spec clarifications are cheap.** Update the spec and move on — no ceremony needed.
70
+ - **Scope changes are expensive.** Always pause, update the spec, and confirm with the user before resuming.
71
+ - **Correction Tax still applies.** Human intervention is tracked, but the category explains *why*.
@@ -0,0 +1,34 @@
1
+ # Report Naming Conventions
2
+
3
+ > On-demand reference from agent-team/SKILL.md. Canonical naming for all report files.
4
+
5
+ ## Story Report Files
6
+
7
+ Pattern: `STORY-{EpicID}-{StoryID}-{StoryName}-{agent}[-bounce{N}].md`
8
+
9
+ | Report | Filename | Location |
10
+ |--------|----------|----------|
11
+ | Dev (first pass) | `STORY-001-01-login-dev.md` | `.worktrees/STORY-001-01-login/.bounce/reports/` |
12
+ | QA FAIL (first bounce) | `STORY-001-01-login-qa-bounce1.md` | `.worktrees/STORY-001-01-login/.bounce/reports/` |
13
+ | Dev fix (second pass) | `STORY-001-01-login-dev-bounce2.md` | `.worktrees/STORY-001-01-login/.bounce/reports/` |
14
+ | QA PASS | `STORY-001-01-login-qa-bounce2.md` | `.worktrees/STORY-001-01-login/.bounce/reports/` |
15
+ | Architect | `STORY-001-01-login-arch.md` | `.worktrees/STORY-001-01-login/.bounce/reports/` |
16
+ | DevOps merge | `STORY-001-01-login-devops.md` | `.bounce/archive/S-{XX}/STORY-001-01-login/` |
17
+
18
+ ## Sprint-Level Files
19
+
20
+ | Report | Filename | Location |
21
+ |--------|----------|----------|
22
+ | Sprint DevOps | `sprint-S-{XX}-devops.md` | `.bounce/archive/S-{XX}/` |
23
+ | Sprint Scribe | `sprint-S-{XX}-scribe.md` | `.bounce/archive/S-{XX}/` |
24
+ | Sprint Report (active) | `sprint-report-S-{XX}.md` | `.bounce/` (gitignored) |
25
+ | Sprint Report (archived) | `sprint-report-S-{XX}.md` | `.bounce/archive/S-{XX}/` (committed) |
26
+ | Sprint Context Pack | `sprint-context-S-{XX}.md` | `.bounce/` (gitignored) |
27
+ | Sprint Summary | `sprint-summary-S-{XX}.md` | `.bounce/` (gitignored) |
28
+
29
+ ## Key Rules
30
+
31
+ - Sprint ID always uses `S-{XX}` format (two digits, zero-padded)
32
+ - No delivery prefix on sprint-level files — sprint ID is globally unique
33
+ - Active sprint reports include sprint ID in filename
34
+ - `bounce{N}` suffix counts from 1 (bounce1 = first failure, bounce2 = second failure)
@@ -52,15 +52,16 @@ Epic §4 (Technical Context) ──→ Story §3 (Implementation Guide)
52
52
  Epic §5 (Decomposition) ──→ Story creation sequence
53
53
  Epic §6 (Risks) ──→ Risk Registry §1 (Active Risks)
54
54
  Epic §7 (Acceptance Criteria) ──→ Story §2 (The Truth)
55
- Epic §9 (Artifact Links) ──→ Delivery Plan §3 (Active Sprint)
55
+ Epic §9 (Artifact Links) ──→ Delivery Plan §3 (Backlog)
56
56
 
57
57
  Story §1 (The Spec) ──→ Developer Agent
58
58
  Story §2 (The Truth) ──→ QA Agent
59
59
  Story §3 (Implementation Guide) ──→ Developer Agent
60
- Story status ──→ Delivery Plan §3 (V-Bounce State)
60
+ Story status ──→ Sprint Plan §1 (V-Bounce State) [NOT Delivery Plan — see delivery-sync.md]
61
61
 
62
- Delivery Plan §3 (Active Sprint) ──→ Team Lead Agent (initialization)
63
- Delivery Plan §5 (Context Pack) ──→ Ready to Bounce gate
62
+ Sprint Plan §1 (Active Scope) ──→ Team Lead Agent (source of truth during sprint)
63
+ Sprint Plan §1 (Context Pack Readiness) ──→ Ready to Bounce gate
64
+ Delivery Plan ──→ Updated at sprint boundaries ONLY (never mid-sprint)
64
65
 
65
66
  Risk Registry ←── ALL levels (cross-cutting input)
66
67
  ```
@@ -70,7 +70,7 @@ Group findings by framework area:
70
70
  |------|-----------------|----------------|
71
71
  | **Templates** | Missing fields, unused sections, ambiguous instructions | `templates/*.md` |
72
72
  | **Agent Handoffs** | Missing report fields, redundant data, unclear formats | `brains/claude-agents/*.md` |
73
- | **RAG Pipeline** | Irrelevant results, missing context, stale embeddings | `scripts/vbounce_index.mjs`, `scripts/vbounce_ask.mjs`, `scripts/pre_bounce_sync.sh` |
73
+ | **Context Prep** | Missing context, stale prep packs, truncation issues | `scripts/prep_sprint_context.mjs`, `scripts/prep_qa_context.mjs`, `scripts/prep_arch_context.mjs` |
74
74
  | **Skills** | Unclear instructions, missing steps, outdated references | `skills/*/SKILL.md`, `skills/*/references/*` |
75
75
  | **Process Flow** | Unnecessary steps, wrong ordering, missing gates | `skills/agent-team/SKILL.md`, `skills/doc-manager/SKILL.md` |
76
76
  | **Tooling** | Script failures, validation gaps, missing automation | `scripts/*`, `bin/*` |
@@ -88,3 +88,26 @@ Rules for formatting:
88
88
  - **Rules are imperatives.** Write rules as direct commands, not suggestions.
89
89
  - **No duplicates.** Before recording, check if a similar lesson already exists. If so, update it instead of creating a new one.
90
90
  - **Keep it flat.** No categories, no tags, no metadata beyond the entry format. Simplicity is the feature.
91
+
92
+ ## Lesson Graduation
93
+
94
+ Lessons that have been proven effective across 3+ sprints become permanent agent config rules.
95
+
96
+ ### Graduation Criteria
97
+
98
+ A lesson is a **graduation candidate** when:
99
+ - It has been active for 3+ sprints
100
+ - It has been triggered (prevented a recurrence) at least once
101
+ - No bounce in the last 3 sprints matches its root cause
102
+
103
+ ### Graduation Process
104
+
105
+ 1. `scripts/suggest_improvements.mjs` flags graduation candidates in improvement suggestions
106
+ 2. Human approves graduation
107
+ 3. Lead adds the rule to the relevant agent config (`brains/claude-agents/developer.md`, etc.)
108
+ 4. Lead removes or archives the lesson from `LESSONS.md` with a note: `[Graduated to {agent} config on {date}]`
109
+ 5. Record in `.bounce/improvement-log.md` under "Applied"
110
+
111
+ ### Why Graduation Matters
112
+
113
+ `LESSONS.md` is a staging area, not a permanent rule store. Lessons that graduate become enforced constraints in the agent's core instructions — they can't be forgotten or overlooked. Lessons that stay in `LESSONS.md` are read on every session but are softer guidance. Keep `LESSONS.md` lean — stale lessons dilute the signal.
@@ -10,7 +10,7 @@ Delivery Lifecycle:
10
10
  - Active sprint work happens inside `sprints/sprint-{XX}/sprint-{XX}.md`, not here.
11
11
  - When the delivery is fully shipped, this entire document is archived.
12
12
 
13
- Output location: `product_plans/strategy/{delivery}_delivery_plan.md`
13
+ Output location: `product_plans/D-{NN}_{release_name}/D-{NN}_DELIVERY_PLAN.md`
14
14
  Do NOT output these instructions.
15
15
  </instructions>
16
16
  # Delivery Plan: {Project Name}
@@ -53,5 +53,5 @@ complexity_label: "L1 (Trivial)"
53
53
 
54
54
  - [ ] {Simple step, e.g., "Open the settings modal and verify the button is aligned."}
55
55
  - [ ] Automated tests still pass (`npm test`).
56
- - [ ] **Framework Integrity**: If `brains/` or `skills/` were modified, log to `brains/CHANGELOG.md` and run `./scripts/pre_bounce_sync.sh`.
56
+ - [ ] **Framework Integrity**: If `brains/` or `skills/` were modified, log to `brains/CHANGELOG.md`.
57
57
  - [ ] **Post-Fix Action**: Run `./scripts/hotfix_manager.sh ledger "HOTFIX: {Name}" "{Brief Fix Description}"`
@@ -1,21 +1,25 @@
1
1
  <instructions>
2
- FOLLOW THIS EXACT STRUCTURE. Output sections in order 1-2.
2
+ FOLLOW THIS EXACT STRUCTURE. Output sections in order 1-4.
3
3
 
4
- 1. **YAML Frontmatter**: Sprint ID, Goal, Dates, Status
5
- 2. **§1 Active Scope**: Table of stories pulled into this sprint. The V-Bounce state tracks its progression.
6
- 3. **§2 Sprint Open Questions**: Unresolved items blocking this active execution window.
4
+ 1. **YAML Frontmatter**: Sprint ID, Goal, Dates, Status, Delivery ref
5
+ 2. **§1 Active Scope**: Table of stories + Context Pack Readiness checklists
6
+ 3. **§2 Execution Strategy**: Parallel phases, dependencies, risk flags
7
+ 4. **§3 Sprint Open Questions**: Unresolved items blocking this sprint
8
+ 5. **§4 Execution Log**: Accumulated story results (populated during sprint, becomes Sprint Report §2 source)
7
9
 
8
10
  Output location: `product_plans/sprints/sprint-{XX}/sprint-{XX}.md`
9
11
 
10
12
  Role of this document:
11
- - This is the Tactical view of the active sprint execution.
12
- - It tracks ONLY the stories claimed for this 1-week window.
13
- - The Team Lead agent reads this to know what is in scope.
13
+ - This is the SINGLE SOURCE OF TRUTH during active sprint execution.
14
+ - The Team Lead updates this file at every state transition — NOT the Delivery Plan.
15
+ - The Delivery Plan is only updated at sprint boundaries (start and end).
14
16
 
15
17
  Document Lifecycle:
16
- - Created by the Team Lead or PM during Sprint Setup.
17
- - Selected stories are physically moved from `product_plans/backlog/EPIC-*/` to `product_plans/sprints/sprint-{XX}/`.
18
- - When the sprint completes, this document (and the entire sprint folder) moves to `product_plans/archive/sprints/sprint-{XX}/`.
18
+ - Created by the Team Lead at Sprint Setup (Step 0) via `vbounce sprint init`.
19
+ - §1 V-Bounce States updated at every story transition.
20
+ - §4 Execution Log gets one row per completed story (via `vbounce story complete`).
21
+ - At sprint end, §4 becomes the skeleton for Sprint Report §2 — no reconstruction needed.
22
+ - When the sprint completes, this document moves to `product_plans/archive/sprints/sprint-{XX}/`.
19
23
 
20
24
  Do NOT output these instructions.
21
25
  </instructions>
@@ -25,24 +29,72 @@ sprint_id: "sprint-{XX}"
25
29
  sprint_goal: "{One-sentence North Star}"
26
30
  dates: "{MM/DD - MM/DD}"
27
31
  status: "Planning / Active / Completed"
32
+ delivery: "D-{NN}"
28
33
  ---
29
34
 
30
35
  # Sprint S-{XX} Plan
31
36
 
32
37
  ## 1. Active Scope
33
38
  > Stories pulled from the backlog for execution during this sprint window.
34
- > The V-Bounce State tracks the live status of the story (Draft -> Ready to Bounce -> Bouncing -> QA Passed -> Architect Passed -> Sprint Review -> Done).
39
+ > V-Bounce State is the ONLY authoritative source for story status during the sprint.
35
40
 
36
41
  | Priority | Story | Epic | Label | V-Bounce State | Blocker |
37
42
  |----------|-------|------|-------|----------------|---------|
38
43
  | 1 | [STORY-XXX-YY: name](./STORY-XXX-YY-name.md) | EPIC-XXX | L2 | Draft | — |
39
44
 
45
+ ### Context Pack Readiness
46
+ > Check before moving story to "Ready to Bounce". All items must be ✅.
47
+ > Run `vbounce validate ready STORY-ID` to verify programmatically.
48
+
49
+ **STORY-{ID}: {name}**
50
+ - [ ] Story spec complete (§1)
51
+ - [ ] Acceptance criteria defined (§2)
52
+ - [ ] Implementation guide written (§3)
53
+ - [ ] Ambiguity: Low / Medium (if High → back to Refinement)
54
+
55
+ V-Bounce State: Draft / Refinement / Ready to Bounce
56
+
40
57
  ### Escalated / Parking Lot
41
58
  - STORY-XXX-YY: {name} — Reason: {escalated / deferred}
42
59
 
43
- ## 2. Sprint Open Questions
44
- > Unresolved items that affect this specific 1-week execution window.
60
+ ---
61
+
62
+ ## 2. Execution Strategy
63
+ > Written during sprint planning. Guides the Lead's delegation order.
64
+
65
+ ### Phase Plan
66
+ - **Phase 1 (parallel)**: {Story IDs that can run simultaneously}
67
+ - **Phase 2 (sequential)**: {Story IDs with dependencies — run in order}
68
+
69
+ ### Risk Flags
70
+ - {Which stories touch shared modules — coordinate access}
71
+ - {Sprint-specific risks pulled from Risk Registry}
72
+
73
+ ### Dependency Chain
74
+ > Stories that MUST run sequentially (depends_on relationships).
75
+
76
+ | Story | Depends On | Reason |
77
+ |-------|-----------|--------|
78
+ | STORY-XXX-YY | STORY-XXX-YY | {why sequential} |
79
+
80
+ ---
81
+
82
+ ## 3. Sprint Open Questions
83
+ > Unresolved items that affect this specific sprint execution window.
84
+ > Strategic questions belong in the Delivery Plan, not here.
45
85
 
46
86
  | Question | Options | Impact | Owner | Status |
47
87
  |----------|---------|--------|-------|--------|
48
88
  | {question} | A: {x}, B: {y} | Blocks {stories} | {name} | Open / Decided |
89
+
90
+ ---
91
+
92
+ <!-- EXECUTION_LOG_START -->
93
+ ## 4. Execution Log
94
+ > Updated by the Lead after each story completes via `vbounce story complete STORY-ID`.
95
+ > This table becomes Sprint Report §2 at sprint end — no reconstruction needed.
96
+
97
+ | Story | Final State | QA Bounces | Arch Bounces | Correction Tax | Notes |
98
+ |-------|-------------|------------|--------------|----------------|-------|
99
+ | STORY-XXX-YY | Done | 0 | 0 | 0% | {brief note} |
100
+ <!-- EXECUTION_LOG_END -->
@@ -3,7 +3,7 @@ FOLLOW THIS EXACT STRUCTURE. Output sections in order 1-6.
3
3
 
4
4
  1. **YAML Frontmatter**: Sprint ID, Goal, Dates, Status, Delivery Ref, Delivery Plan Ref
5
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
6
+ 3. **§2 Story Results**: Table of all stories with final status and per-story metrics. §2.1 Change Requests logs any mid-sprint user interventions (bugs, spec clarifications, scope/approach changes)
7
7
  4. **§3 Execution Metrics**: AI performance metrics — tokens, duration, bounces, correction tax
8
8
  5. **§4 Lessons Learned**: Flagged from agent reports, pending user approval to record
9
9
  6. **§5 Retrospective**: What went well, what didn't, and what to change — covers both project and delivery process
@@ -54,9 +54,13 @@ delivery_plan_ref: "product_plans/{delivery}/DELIVERY_PLAN.md"
54
54
  - {e.g., "STORY-001-03-email_notifications — Escalated (template integration failed 3x)"}
55
55
 
56
56
  ### Product Docs Affected
57
- > Any product documentation files modified, created, or identified for updates. Handed off to Scribe agent.
57
+ > Auto-populated from staleness detection (`vbounce docs check S-{XX}`). Shows which vdocs were impacted by this sprint's code changes. Scribe agent receives a targeted task from `.bounce/scribe-task-S-{XX}.md`.
58
58
 
59
- - {e.g., "vdocs/api_reference.md Added rate limiting details"}
59
+ | Doc | Stale Key Files | Touched By | Priority | Scribe Action |
60
+ |-----|----------------|------------|----------|---------------|
61
+ | {e.g., `AUTHENTICATION_DOC.md`} | {e.g., `src/auth/index.ts`} | {e.g., `STORY-001-02`} | {HIGH/MEDIUM/LOW} | {Update / Quality Fix / New} |
62
+
63
+ > If no `vdocs/_manifest.json` exists, write "N/A — vdoc not installed".
60
64
 
61
65
  ---
62
66
 
@@ -72,6 +76,13 @@ delivery_plan_ref: "product_plans/{delivery}/DELIVERY_PLAN.md"
72
76
  ### Escalated Stories (if any)
73
77
  - **STORY-{ID}-{story_name}**: Escalated after {N} bounces. Root cause: {why}. Recommendation: {rewrite spec / descope / kill}.
74
78
 
79
+ ### 2.1 Change Requests
80
+ > Mid-sprint user interventions — bugs found, spec clarifications, scope or approach changes. Tracked separately from agent-driven bounces so metrics aren't skewed. Omit this section if no CRs occurred.
81
+
82
+ | Story | Category | Description | Impact |
83
+ |-------|----------|-------------|--------|
84
+ | STORY-{ID} | Bug / Spec Clarification / Scope Change / Approach Change | {One-line description} | {e.g., No bounce reset / Dev pass reset / +1 session} |
85
+
75
86
  ---
76
87
 
77
88
  ## 3. Execution Metrics
@@ -153,4 +153,4 @@ POST /api/resource
153
153
  - [ ] LESSONS.md consulted before implementation.
154
154
  - [ ] No violations of Roadmap ADRs.
155
155
  - [ ] Documentation (API/Tech Stack) updated.
156
- - [ ] **Framework Integrity**: If `brains/` or `skills/` were modified, log to `brains/CHANGELOG.md` and run `./scripts/pre_bounce_sync.sh`.
156
+ - [ ] **Framework Integrity**: If `brains/` or `skills/` were modified, log to `brains/CHANGELOG.md`.