@sandrinio/vbounce 1.5.0 → 1.7.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 (50) hide show
  1. package/README.md +108 -18
  2. package/bin/vbounce.mjs +291 -146
  3. package/brains/AGENTS.md +12 -10
  4. package/brains/CHANGELOG.md +99 -1
  5. package/brains/CLAUDE.md +29 -22
  6. package/brains/GEMINI.md +47 -9
  7. package/brains/SETUP.md +11 -5
  8. package/brains/claude-agents/architect.md +22 -6
  9. package/brains/claude-agents/developer.md +2 -2
  10. package/brains/claude-agents/devops.md +3 -0
  11. package/brains/claude-agents/qa.md +25 -9
  12. package/brains/copilot/copilot-instructions.md +49 -0
  13. package/brains/cursor-rules/vbounce-process.mdc +9 -7
  14. package/brains/windsurf/.windsurfrules +30 -0
  15. package/package.json +2 -4
  16. package/scripts/close_sprint.mjs +94 -0
  17. package/scripts/complete_story.mjs +113 -0
  18. package/scripts/doctor.mjs +144 -0
  19. package/scripts/init_gate_config.sh +151 -0
  20. package/scripts/init_sprint.mjs +121 -0
  21. package/scripts/pre_gate_common.sh +576 -0
  22. package/scripts/pre_gate_runner.sh +176 -0
  23. package/scripts/prep_arch_context.mjs +178 -0
  24. package/scripts/prep_qa_context.mjs +134 -0
  25. package/scripts/prep_sprint_context.mjs +118 -0
  26. package/scripts/prep_sprint_summary.mjs +154 -0
  27. package/scripts/sprint_trends.mjs +160 -0
  28. package/scripts/suggest_improvements.mjs +200 -0
  29. package/scripts/update_state.mjs +132 -0
  30. package/scripts/validate_bounce_readiness.mjs +125 -0
  31. package/scripts/validate_report.mjs +39 -2
  32. package/scripts/validate_sprint_plan.mjs +117 -0
  33. package/scripts/validate_state.mjs +99 -0
  34. package/skills/agent-team/SKILL.md +56 -21
  35. package/skills/agent-team/references/cleanup.md +42 -0
  36. package/skills/agent-team/references/delivery-sync.md +43 -0
  37. package/skills/agent-team/references/git-strategy.md +52 -0
  38. package/skills/agent-team/references/mid-sprint-triage.md +71 -0
  39. package/skills/agent-team/references/report-naming.md +34 -0
  40. package/skills/doc-manager/SKILL.md +5 -4
  41. package/skills/improve/SKILL.md +27 -1
  42. package/skills/lesson/SKILL.md +23 -0
  43. package/templates/delivery_plan.md +1 -1
  44. package/templates/hotfix.md +1 -1
  45. package/templates/sprint.md +65 -13
  46. package/templates/sprint_report.md +8 -1
  47. package/templates/story.md +1 -1
  48. package/scripts/pre_bounce_sync.sh +0 -37
  49. package/scripts/vbounce_ask.mjs +0 -98
  50. package/scripts/vbounce_index.mjs +0 -184
@@ -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/*` |
@@ -107,6 +107,32 @@ For script changes, describe the new behavior.}
107
107
  **Reversibility:** {Easy — revert the edit / Medium — downstream docs may need updating}
108
108
  ```
109
109
 
110
+ #### Special Case: Gate Check Proposals
111
+
112
+ When agent feedback reveals a mechanical check that was repeated manually across multiple stories (e.g., "QA checked for inline styles 4 times"), propose adding it as a pre-gate check instead of a skill/template change:
113
+
114
+ ```markdown
115
+ ### Proposal {N}: Add pre-gate check — {check name}
116
+
117
+ **Finding:** {Agent} manually performed {check description} in {N} stories this sprint.
118
+ **Tokens saved:** ~{estimate} per story (based on agent token usage for this check type)
119
+ **Gate:** qa / arch
120
+ **Check config to add to `.bounce/gate-checks.json`:**
121
+ ```json
122
+ {
123
+ "id": "custom_grep",
124
+ "gate": "arch",
125
+ "enabled": true,
126
+ "pattern": "{regex}",
127
+ "glob": "{file pattern}",
128
+ "should_find": false,
129
+ "description": "{human-readable description}"
130
+ }
131
+ ```
132
+ ```
133
+
134
+ This is the primary mechanism for the gate system to grow organically — the `improve` skill reads what agents repeatedly checked by hand and proposes automating those checks via `gate-checks.json`.
135
+
110
136
  ### Step 5: Present to Human
111
137
  Present ALL proposals as a numbered list. The human can:
112
138
  - **Approve** — apply the change
@@ -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
@@ -72,6 +72,13 @@ delivery_plan_ref: "product_plans/{delivery}/DELIVERY_PLAN.md"
72
72
  ### Escalated Stories (if any)
73
73
  - **STORY-{ID}-{story_name}**: Escalated after {N} bounces. Root cause: {why}. Recommendation: {rewrite spec / descope / kill}.
74
74
 
75
+ ### 2.1 Change Requests
76
+ > 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.
77
+
78
+ | Story | Category | Description | Impact |
79
+ |-------|----------|-------------|--------|
80
+ | STORY-{ID} | Bug / Spec Clarification / Scope Change / Approach Change | {One-line description} | {e.g., No bounce reset / Dev pass reset / +1 session} |
81
+
75
82
  ---
76
83
 
77
84
  ## 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`.
@@ -1,37 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- # pre_bounce_sync.sh
4
- #
5
- # Run this before kicking off the Implementation Loop (Bounce).
6
- # This prevents the "Stale Context" edge case by forcing the LanceDB
7
- # index to refresh with the latest rules from LESSONS.md and ROADMAP.md.
8
-
9
- echo "==========================================="
10
- echo " V-Bounce OS: Pre-Bounce Sync Started"
11
- echo "==========================================="
12
-
13
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)"
14
- ROOT_DIR="$(dirname "$SCRIPT_DIR")"
15
-
16
- cd "$ROOT_DIR" || exit 1
17
-
18
- # 1. Check for Node Modules
19
- if [ ! -d "node_modules" ]; then
20
- echo "Error: node_modules not found. Run 'npm install'."
21
- exit 1
22
- fi
23
-
24
- # 2. Rebuild the semantic search index
25
- echo "Syncing V-Bounce Knowledge Base (LanceDB)..."
26
- node ./scripts/vbounce_index.mjs --all
27
-
28
- if [ $? -ne 0 ]; then
29
- echo "Error: LanceDB index sync failed."
30
- exit 1
31
- fi
32
-
33
- echo "==========================================="
34
- echo " Pre-Bounce Sync Complete. RAG is fresh."
35
- echo " Ready for Team Lead delegation."
36
- echo "==========================================="
37
- exit 0
@@ -1,98 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import fs from 'fs';
4
- import path from 'path';
5
- import { connect } from '@lancedb/lancedb';
6
- import { pipeline } from '@xenova/transformers';
7
- import { program } from 'commander';
8
-
9
- const LANCE_DIR = path.join(process.cwd(), '.bounce', '.lancedb');
10
-
11
- program
12
- .name('vbounce_ask')
13
- .description('Query V-Bounce OS LanceDB for relevant context')
14
- .argument('<query>', 'The semantic query to search for')
15
- .option('-f, --filter <field=value>', 'Filter by metadata (e.g., type=lesson)')
16
- .option('-l, --limit <number>', 'Number of results to return', 3)
17
- .parse(process.argv);
18
-
19
- const options = program.opts();
20
- const query = program.args[0];
21
-
22
- class LocalEmbeddingFunction {
23
- constructor() {
24
- this.modelName = 'Xenova/all-MiniLM-L6-v2';
25
- this.extractor = null;
26
- }
27
-
28
- async init() {
29
- if (!this.extractor) {
30
- this.extractor = await pipeline('feature-extraction', this.modelName, {
31
- quantized: true,
32
- });
33
- }
34
- }
35
-
36
- async embedQuery(text) {
37
- await this.init();
38
- const output = await this.extractor(text, { pooling: 'mean', normalize: true });
39
- return Array.from(output.data);
40
- }
41
- }
42
-
43
- async function main() {
44
- if (!query) {
45
- console.error("Error: Must provide a semantic query string.");
46
- process.exit(1);
47
- }
48
-
49
- if (!fs.existsSync(LANCE_DIR)) {
50
- console.error(`Error: LanceDB not found at ${LANCE_DIR}. Have you run vbounce_index yet?`);
51
- process.exit(1);
52
- }
53
-
54
- const db = await connect(LANCE_DIR);
55
- let table;
56
- try {
57
- table = await db.openTable('vbounce_context');
58
- } catch (e) {
59
- console.error("Error: Table 'vbounce_context' not found. Please index documents first.");
60
- process.exit(1);
61
- }
62
-
63
- const embedder = new LocalEmbeddingFunction();
64
- const queryVector = await embedder.embedQuery(query);
65
-
66
- let search = table.vectorSearch(queryVector).limit(parseInt(options.limit));
67
-
68
- if (options.filter) {
69
- const [field, value] = options.filter.split('=');
70
- // LanceDB JS uses SQL-like string criteria for filtering
71
- if (field === "type") {
72
- search = search.where(`\`type\` = '${value}'`);
73
- } else if (field === "section") {
74
- search = search.where(`\`section\` = '${value}'`);
75
- }
76
- }
77
-
78
- const results = await search.toArray();
79
-
80
- if (results.length === 0) {
81
- console.log("No relevant context found.");
82
- return;
83
- }
84
-
85
- console.log(`\n--- V-Bounce Semantic Retrieval ---`);
86
- console.log(`Query: "${query}"`);
87
- console.log(`Found ${results.length} relevant chunks.\n`);
88
-
89
- results.forEach((r, idx) => {
90
- console.log(`[Result ${idx + 1}] Source: ${r.file} (${r.type || 'unknown'} > ${r.section || 'General'})`);
91
- console.log(`Distance: ${r._distance ? r._distance.toFixed(4) : 'N/A'}`);
92
- console.log('-'.repeat(40));
93
- console.log(r.text.trim());
94
- console.log('\n');
95
- });
96
- }
97
-
98
- main().catch(console.error);