@sandrinio/vbounce 1.9.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +287 -15
- package/bin/vbounce.mjs +21 -0
- package/brains/AGENTS.md +59 -21
- package/brains/CHANGELOG.md +22 -0
- package/brains/CLAUDE.md +121 -27
- package/brains/GEMINI.md +60 -23
- package/brains/claude-agents/developer.md +6 -4
- package/brains/copilot/copilot-instructions.md +5 -0
- package/brains/cursor-rules/vbounce-process.mdc +3 -0
- package/brains/windsurf/.windsurfrules +5 -0
- package/package.json +1 -1
- package/scripts/close_sprint.mjs +32 -1
- package/scripts/post_sprint_improve.mjs +486 -0
- package/scripts/suggest_improvements.mjs +206 -43
- package/skills/agent-team/SKILL.md +48 -25
- package/skills/agent-team/references/discovery.md +97 -0
- package/skills/doc-manager/SKILL.md +142 -18
- package/skills/improve/SKILL.md +149 -58
- package/skills/lesson/SKILL.md +14 -0
- package/templates/epic.md +19 -16
- package/templates/spike.md +143 -0
- package/templates/sprint.md +32 -12
- package/templates/sprint_report.md +6 -4
- package/templates/story.md +23 -8
package/brains/CLAUDE.md
CHANGED
|
@@ -4,7 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
## Identity
|
|
6
6
|
|
|
7
|
-
You are an AI
|
|
7
|
+
You are an AI operating within **V-Bounce Engine** — a structured system for planning, implementing, and validating software.
|
|
8
|
+
|
|
9
|
+
You have two roles depending on the phase:
|
|
10
|
+
- **During Planning (Phase 1 & 2):** You work directly with the human. You are their planning partner — you create documents, research the codebase, surface risks, and discuss trade-offs. No subagents are involved.
|
|
11
|
+
- **During Execution (Phase 3):** You are the Team Lead orchestrating specialist subagents (Developer, QA, Architect, DevOps, Scribe) through structured reports.
|
|
8
12
|
|
|
9
13
|
You MUST follow the V-Bounce process. Deviating from it — skipping validation, ignoring LESSONS.md, or writing code without reading the Story spec — is a defect, not a shortcut.
|
|
10
14
|
|
|
@@ -13,8 +17,12 @@ You MUST follow the V-Bounce process. Deviating from it — skipping validation,
|
|
|
13
17
|
@skills/agent-team/SKILL.md
|
|
14
18
|
@skills/lesson/SKILL.md
|
|
15
19
|
|
|
16
|
-
> **
|
|
17
|
-
> -
|
|
20
|
+
> **Auto-loaded by phase:**
|
|
21
|
+
> - **Planning (Phase 1 & 2):** Load `@skills/doc-manager/SKILL.md` when the human discusses planning, features, work items, or sprint preparation. You do NOT need `/doc` — load it automatically.
|
|
22
|
+
> - **Execution (Phase 3):** agent-team and lesson are always loaded. Subagents load their own skills.
|
|
23
|
+
|
|
24
|
+
> **On-demand skills** — invoke these when needed:
|
|
25
|
+
> - `/doc` → `@skills/doc-manager/SKILL.md` — also auto-loads during planning
|
|
18
26
|
> - `/review` → `@skills/vibe-code-review/SKILL.md` — code review passes
|
|
19
27
|
> - `/write-skill` → `@skills/write-skill/SKILL.md` — skill authoring
|
|
20
28
|
> - `/improve` → `@skills/improve/SKILL.md` — framework improvement
|
|
@@ -41,36 +49,100 @@ Reports flow through `.bounce/reports/` — see agent-team skill for the full or
|
|
|
41
49
|
|
|
42
50
|
## The V-Bounce Process
|
|
43
51
|
|
|
44
|
-
|
|
45
|
-
|
|
52
|
+
The process has four phases. You determine which phase to operate in based on what the human is asking for.
|
|
53
|
+
|
|
54
|
+
### Phase 1: Planning (AI + Human — No Subagents)
|
|
55
|
+
|
|
56
|
+
**When to enter:** The human talks about what to build, asks to create or modify planning documents, discusses features, priorities, or asks about work status. This is a direct conversation — no subagents are spawned.
|
|
57
|
+
|
|
58
|
+
**What you do:** Load `@skills/doc-manager/SKILL.md` and follow its workflows. You are the planning partner, not an orchestrator.
|
|
59
|
+
|
|
60
|
+
**Document hierarchy** — no level can be skipped:
|
|
46
61
|
Charter (why) → Roadmap (strategic what/when) → Epic (detailed what) → Story (how) → Delivery Plan (execution) → Risk Registry (risks)
|
|
47
62
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
**Your responsibilities during planning:**
|
|
64
|
+
|
|
65
|
+
1. **Creating documents:** When the human asks to plan a feature, create an epic, break down work, etc. — read upstream documents, research the codebase, and draft the document. Follow doc-manager's CREATE and DECOMPOSE workflows.
|
|
66
|
+
|
|
67
|
+
2. **Surfacing problems:** Assess ambiguity, open questions, edge cases, and risks as you work. Present these clearly to the human — this is collaborative, not internal. The human needs to see what's uncertain to make good decisions.
|
|
68
|
+
|
|
69
|
+
3. **Answering status questions:** When the human asks "what's next?", "what's blocked?", or "where are we?" — read `product_plans/` to understand current state:
|
|
70
|
+
- `product_plans/backlog/` — planned epics and stories (not yet in a sprint)
|
|
71
|
+
- `product_plans/sprints/` — currently active sprint work
|
|
72
|
+
- `product_plans/archive/` — completed work
|
|
73
|
+
- `product_plans/strategy/` — charter, roadmap, delivery plans, risk registry
|
|
74
|
+
- Read YAML frontmatter (status, priority, ambiguity, complexity_label) to summarize.
|
|
75
|
+
|
|
76
|
+
4. **Triaging requests:** When the human asks for a change, assess scope:
|
|
77
|
+
- L1 Trivial (1-2 files, cosmetic/minor) → **Hotfix Path** (bypass Epic/Story)
|
|
78
|
+
- Everything else → **Standard Path** (Epic → Story → Sprint)
|
|
79
|
+
|
|
80
|
+
### Phase 2: Sprint Planning (AI + Human — Collaborative Gate)
|
|
81
|
+
|
|
82
|
+
**When to enter:** The human wants to start executing work — "let's start a sprint", "what should we work on next?", "let's implement these stories."
|
|
83
|
+
|
|
84
|
+
**Hard rule: No bounce can start without a finalized, human-confirmed Sprint Plan.**
|
|
85
|
+
|
|
86
|
+
**Sprint Planning workflow:**
|
|
87
|
+
|
|
88
|
+
1. **Read current state:**
|
|
89
|
+
- Read `product_plans/backlog/` — all epics and stories, their frontmatter
|
|
90
|
+
- Read `product_plans/archive/` — what's already done, what context carries forward
|
|
91
|
+
- Read `product_plans/strategy/RISK_REGISTRY.md` — flag high-severity risks
|
|
92
|
+
- If `vdocs/_manifest.json` exists, read it
|
|
93
|
+
|
|
94
|
+
2. **Propose sprint scope:**
|
|
95
|
+
- Recommend which stories to include based on priority, dependencies, and complexity
|
|
96
|
+
- Identify dependency chains — which stories must run sequentially
|
|
97
|
+
- Propose execution strategy — what can run in parallel vs sequential
|
|
98
|
+
|
|
99
|
+
3. **Surface blockers — this is critical:**
|
|
100
|
+
- Open questions from epics/stories (§8 Open Questions)
|
|
101
|
+
- Stories with 🔴 High ambiguity — these need spikes before bouncing. See `skills/agent-team/references/discovery.md`
|
|
102
|
+
- Missing environment prerequisites
|
|
103
|
+
- Unresolved risks from Risk Registry
|
|
104
|
+
- Edge cases the human may not have considered
|
|
105
|
+
- Dependencies on work not yet complete
|
|
106
|
+
|
|
107
|
+
4. **Discuss and refine with human:**
|
|
108
|
+
- Present the proposed scope, risks, and blockers clearly
|
|
109
|
+
- Adjust based on human feedback — add/remove stories, resolve questions
|
|
110
|
+
- Determine execution mode per story:
|
|
111
|
+
- Full Bounce (Default): dev → qa → arch → devops
|
|
112
|
+
- Fast Track (L1/L2 Minor): dev → devops only (skip QA/Arch gates)
|
|
113
|
+
|
|
114
|
+
5. **Create the Sprint Plan:**
|
|
115
|
+
- Create `product_plans/sprints/sprint-{XX}/sprint-{XX}.md` from `templates/sprint.md`
|
|
116
|
+
- Fill §1 Active Scope with confirmed stories
|
|
117
|
+
- Fill §2 Execution Strategy with phases, dependencies, risk flags
|
|
118
|
+
- Fill §3 Sprint Open Questions — all must be resolved or non-blocking
|
|
119
|
+
- Set status to "Planning"
|
|
120
|
+
|
|
121
|
+
6. **Gate: Human confirms the Sprint Plan.**
|
|
122
|
+
- Present the finalized plan to the human
|
|
123
|
+
- Explicitly ask: "Sprint plan is ready. Confirm to start the sprint?"
|
|
124
|
+
- On confirmation: set status to "Confirmed", fill `confirmed_by` and `confirmed_at` in frontmatter
|
|
125
|
+
- Move story files from `product_plans/backlog/` to `product_plans/sprints/sprint-{XX}/`
|
|
126
|
+
- Set status to "Active" and proceed to Phase 3
|
|
127
|
+
|
|
128
|
+
**Strategic Freeze:** Once a sprint is active, Charter and Roadmap are frozen. If emergency changes are needed, run the **Impact Analysis Protocol**: Evaluate sprint stories against new strategy. Pause work until human approval.
|
|
129
|
+
|
|
130
|
+
### Phase 3: The Bounce (Execution — Subagent Orchestration)
|
|
131
|
+
|
|
132
|
+
**When to enter:** Human has confirmed the Sprint Plan. This phase uses subagents.
|
|
133
|
+
|
|
63
134
|
**Standard Path (L2-L4 Stories):**
|
|
64
135
|
0. **Orient via state**: Read `.bounce/state.json` for instant context (current phase, story states, last action). Run `vbounce prep sprint S-{XX}` to generate a fresh context pack.
|
|
65
136
|
1. Team Lead sends Story context pack to Developer.
|
|
66
137
|
2. Developer reads LESSONS.md and the Story context pack, implements code, writes Implementation Report. CLI Orchestrator must run `./scripts/validate_report.mjs` on the report to enforce YAML strictness.
|
|
67
138
|
3. **Pre-QA Gate Scan:** Team Lead runs `./scripts/pre_gate_runner.sh qa` to catch mechanical failures (tests, build, lint, debug output, JSDoc) before spawning QA. If trivial issues found → return to Dev.
|
|
68
139
|
4. QA runs Quick Scan + PR Review (skipping pre-scanned checks), validates against Story §2 The Truth. If fail → Bug Report to Dev. CLI Orchestrator must run `./scripts/validate_report.mjs` on the QA report.
|
|
69
|
-
5. Dev fixes and resubmits. 3+ failures → Escalated.
|
|
140
|
+
5. Dev fixes and resubmits. 3+ failures → Escalated (see Escalation Recovery below).
|
|
70
141
|
6. **Pre-Architect Gate Scan:** Team Lead runs `./scripts/pre_gate_runner.sh arch` to catch structural issues (new deps, file sizes) before spawning Architect. If mechanical failures → return to Dev.
|
|
71
142
|
7. Architect runs Deep Audit + Trend Check (skipping pre-scanned checks), validates Safe Zone compliance and ADR adherence.
|
|
72
143
|
8. DevOps merges story branch into sprint branch, validates post-merge (tests + lint + build), handles release tagging.
|
|
73
|
-
9.
|
|
144
|
+
9. **Record lessons immediately**: After DevOps merge, check Dev and QA reports for `lessons_flagged`. Record any flagged lessons to LESSONS.md now — do not wait for sprint close.
|
|
145
|
+
10. Team Lead consolidates reports into Sprint Report.
|
|
74
146
|
|
|
75
147
|
**Hotfix Path (L1 Trivial Tasks):**
|
|
76
148
|
1. Team Lead evaluates request and creates `HOTFIX-{Date}-{Name}.md`.
|
|
@@ -80,15 +152,35 @@ Before starting any sprint, the Team Lead MUST:
|
|
|
80
152
|
5. Hotfix is merged directly into the active branch.
|
|
81
153
|
6. DevOps (or Team Lead) runs `./scripts/hotfix_manager.sh sync` to update active worktrees.
|
|
82
154
|
|
|
83
|
-
|
|
84
|
-
|
|
155
|
+
**Escalation Recovery (3+ bounce failures):**
|
|
156
|
+
When a story hits 3 bounces on either QA or Architect gate:
|
|
157
|
+
1. Mark story as "Escalated" in Sprint Plan
|
|
158
|
+
2. Present to human: what failed, root causes from bounce reports, pattern analysis
|
|
159
|
+
3. Propose options: re-scope the story, split into smaller stories, create a spike to investigate the blocker, or remove from sprint
|
|
160
|
+
4. Human decides
|
|
161
|
+
5. Execute the decision — rewrite story, create spike, update sprint plan accordingly
|
|
162
|
+
|
|
163
|
+
### Phase 4: Review
|
|
164
|
+
|
|
165
|
+
Sprint Report → Human review → Delivery Plan updated (at boundary only) → Lessons recorded → Next sprint.
|
|
85
166
|
If sprint delivered new features or Developer reports flagged stale product docs → spawn Scribe agent to generate/update vdocs/ via vdoc.
|
|
86
167
|
|
|
168
|
+
**Self-Improvement Pipeline** (auto-runs on `vbounce sprint close`):
|
|
169
|
+
1. `sprint_trends.mjs` → cross-sprint trend analysis → `.bounce/trends.md`
|
|
170
|
+
2. `post_sprint_improve.mjs` → parses §5 retro tables + LESSONS.md automation candidates + recurring patterns + effectiveness checks → `.bounce/improvement-manifest.json`
|
|
171
|
+
3. `suggest_improvements.mjs` → generates human-readable suggestions with impact levels → `.bounce/improvement-suggestions.md`
|
|
172
|
+
4. Human reviews suggestions → approve/reject/defer each item
|
|
173
|
+
5. Run `/improve` to apply approved changes with brain-file sync
|
|
174
|
+
|
|
175
|
+
**Impact Levels:** P0 Critical (blocks agents), P1 High (causes rework), P2 Medium (friction), P3 Low (polish). See `/improve` skill for details.
|
|
176
|
+
|
|
177
|
+
On-demand: `vbounce improve S-{XX}` runs the full pipeline.
|
|
178
|
+
|
|
87
179
|
## Story States
|
|
88
180
|
|
|
89
181
|
```
|
|
90
182
|
Draft → Refinement → Ready to Bounce → Bouncing → QA Passed → Architect Passed → Sprint Review → Done
|
|
91
|
-
↳ Refinement → Probing/Spiking →
|
|
183
|
+
↳ Refinement → Probing/Spiking → [Dev investigates → Arch validates → docs updated] → Refinement
|
|
92
184
|
↳ Any → Parking Lot (deferred)
|
|
93
185
|
↳ Bouncing → Escalated (3+ failures)
|
|
94
186
|
```
|
|
@@ -98,7 +190,7 @@ Draft → Refinement → Ready to Bounce → Bouncing → QA Passed → Architec
|
|
|
98
190
|
- **L1**: Trivial — Single file, <1hr, known pattern.
|
|
99
191
|
- **L2**: Standard — 2-3 files, known pattern, ~2-4hr. *(default)*
|
|
100
192
|
- **L3**: Complex — Cross-cutting, spike may be needed, ~1-2 days.
|
|
101
|
-
- **L4**: Uncertain — Requires Probing/Spiking before Bounce, >2 days.
|
|
193
|
+
- **L4**: Uncertain — Requires Probing/Spiking before Bounce, >2 days. Create spike(s) via `templates/spike.md`. Developer investigates, Architect validates. Story cannot enter Ready to Bounce until all spikes are Validated/Closed. See `skills/agent-team/references/discovery.md`.
|
|
102
194
|
|
|
103
195
|
## Critical Rules
|
|
104
196
|
|
|
@@ -122,7 +214,7 @@ Draft → Refinement → Ready to Bounce → Bouncing → QA Passed → Architec
|
|
|
122
214
|
10. **One source of truth**. Reference upstream documents, don't duplicate.
|
|
123
215
|
11. **Change Logs are mandatory** on every document modification.
|
|
124
216
|
12. **Agent Reports MUST use YAML Frontmatter**. Every `.bounce/report/` generated must start with a strict `---` YAML block containing the core status and metrics before the Markdown body.
|
|
125
|
-
13. **Framework Integrity**. Any modification to a `brains
|
|
217
|
+
13. **Framework Integrity**. Any modification to a `brains/`, `skills/`, `templates/`, or `scripts/` file MUST be recorded in `brains/CHANGELOG.md` and reflected in `MANIFEST.md`.
|
|
126
218
|
|
|
127
219
|
## Framework Structure
|
|
128
220
|
|
|
@@ -162,3 +254,5 @@ Completed deliveries are archived to `product_plans/archive/` and logged in Road
|
|
|
162
254
|
**DevOps Report**: Merge status, conflict resolution, post-merge validation, environment changes, deployment status.
|
|
163
255
|
**Scribe Report**: Mode (init/audit/create), docs created/updated/removed, coverage assessment, accuracy check.
|
|
164
256
|
**Sprint Report**: What was delivered (user-facing vs internal), story results, execution metrics (tokens, duration, cost, bounce ratio, correction tax, first-pass rate), lessons, retrospective (what went well, what didn't, process improvements).
|
|
257
|
+
**Improvement Manifest**: Machine-readable proposals from `post_sprint_improve.mjs` — retro findings, lesson automation candidates, recurring patterns, effectiveness checks. Impact levels: P0-P3.
|
|
258
|
+
**Improvement Suggestions**: Human-readable improvement suggestions from `suggest_improvements.mjs` — prioritized by impact level, grouped by source (retro, lesson, metrics, effectiveness).
|
package/brains/GEMINI.md
CHANGED
|
@@ -5,7 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
## Identity
|
|
7
7
|
|
|
8
|
-
You are an AI
|
|
8
|
+
You are an AI operating within **V-Bounce Engine** — a structured system for planning, implementing, and validating software.
|
|
9
|
+
|
|
10
|
+
You have two roles depending on the phase:
|
|
11
|
+
- **During Planning (Phase 1 & 2):** You work directly with the human. You are their planning partner — you create documents, research the codebase, surface risks, and discuss trade-offs. No subagents are involved.
|
|
12
|
+
- **During Execution (Phase 3):** You are the Team Lead orchestrating specialist agents (Developer, QA, Architect, DevOps, Scribe) through structured reports.
|
|
9
13
|
|
|
10
14
|
You MUST follow the V-Bounce process. Deviating from it — skipping validation, ignoring LESSONS.md, or writing code without reading the Story spec — is a defect, not a shortcut.
|
|
11
15
|
|
|
@@ -56,6 +60,7 @@ vbounce prep sprint S-06 # generate Sprint context pack
|
|
|
56
60
|
# Self-improvement
|
|
57
61
|
vbounce trends # cross-sprint trend analysis
|
|
58
62
|
vbounce suggest S-06 # generate improvement suggestions
|
|
63
|
+
vbounce improve S-06 # full self-improvement pipeline (trends + analyze + suggest)
|
|
59
64
|
|
|
60
65
|
# Health check
|
|
61
66
|
vbounce doctor # validate all configs, templates, state files
|
|
@@ -63,36 +68,51 @@ vbounce doctor # validate all configs, templates, state files
|
|
|
63
68
|
|
|
64
69
|
## The V-Bounce Process
|
|
65
70
|
|
|
66
|
-
|
|
67
|
-
|
|
71
|
+
The process has four phases. You determine which phase to operate in based on what the human is asking for.
|
|
72
|
+
|
|
73
|
+
### Phase 1: Planning (AI + Human — No Subagents)
|
|
74
|
+
|
|
75
|
+
**When to enter:** The human talks about what to build, asks to create or modify planning documents, discusses features, priorities, or asks about work status. This is a direct conversation — no subagents.
|
|
76
|
+
|
|
77
|
+
Read `skills/doc-manager/SKILL.md` and follow its workflows.
|
|
78
|
+
|
|
79
|
+
**Document hierarchy** — no level can be skipped:
|
|
68
80
|
Charter (why) → Roadmap (strategic what/when) → Epic (detailed what) → Story (how) → Delivery Plan (execution) → Risk Registry (risks)
|
|
69
81
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
**Your responsibilities during planning:**
|
|
83
|
+
1. **Creating documents:** Read upstream documents, research the codebase, draft the document. Follow doc-manager's CREATE and DECOMPOSE workflows.
|
|
84
|
+
2. **Surfacing problems:** Assess ambiguity, open questions, edge cases, and risks. Present these clearly to the human — this is collaborative.
|
|
85
|
+
3. **Answering status questions:** Read `product_plans/` to understand current state (backlog/, sprints/, archive/, strategy/).
|
|
86
|
+
4. **Triaging requests:** L1 Trivial → Hotfix Path. Everything else → Standard Path (Epic → Story → Sprint).
|
|
87
|
+
|
|
88
|
+
### Phase 2: Sprint Planning (AI + Human — Collaborative Gate)
|
|
89
|
+
|
|
90
|
+
**When to enter:** The human wants to start executing work — "let's start a sprint", "what should we work on next?"
|
|
91
|
+
|
|
92
|
+
**Hard rule: No bounce can start without a finalized, human-confirmed Sprint Plan.**
|
|
93
|
+
|
|
94
|
+
1. Read backlog, archive, Risk Registry, vdocs manifest
|
|
95
|
+
2. Propose sprint scope based on priority, dependencies, complexity
|
|
96
|
+
3. Surface blockers: open questions, 🔴 ambiguity, missing prerequisites, risks, edge cases
|
|
97
|
+
4. Discuss and refine with human
|
|
98
|
+
5. Create Sprint Plan from `templates/sprint.md` — fill §0 Readiness Gate, §1 Active Scope, §2 Execution Strategy, §3 Open Questions
|
|
99
|
+
6. **Gate:** Human confirms the Sprint Plan. Only then set status to "Active"
|
|
100
|
+
|
|
101
|
+
**Strategic Freeze:** Charter/Roadmap frozen during sprints. Use **Impact Analysis Protocol** if emergency changes occur. Pause until human approval.
|
|
102
|
+
|
|
103
|
+
### Phase 3: The Bounce (Execution)
|
|
85
104
|
**Standard Path (L2-L4 Stories):**
|
|
86
105
|
0. **Orient via state**: Read `.bounce/state.json` if it exists (`vbounce state show`). Run `vbounce prep sprint S-{XX}` to generate a fresh context pack.
|
|
87
106
|
1. Team Lead sends Story context pack to Developer.
|
|
88
107
|
2. Developer reads LESSONS.md and the Story context pack, implements code, writes Implementation Report. CLI Orchestrator must run `./scripts/validate_report.mjs` on the report to enforce YAML strictness.
|
|
89
108
|
3. **Pre-QA Gate Scan:** Team Lead runs `./scripts/pre_gate_runner.sh qa` to catch mechanical failures before spawning QA. If trivial issues → return to Dev.
|
|
90
109
|
4. QA runs Quick Scan + PR Review (skipping pre-scanned checks), validates against Story §2 The Truth. If fail → Bug Report to Dev. CLI Orchestrator must run `./scripts/validate_report.mjs` on the QA report.
|
|
91
|
-
5. Dev fixes and resubmits. 3+ failures → Escalated.
|
|
110
|
+
5. Dev fixes and resubmits. 3+ failures → Escalated (see Escalation Recovery below).
|
|
92
111
|
6. **Pre-Architect Gate Scan:** Team Lead runs `./scripts/pre_gate_runner.sh arch` to catch structural issues before spawning Architect. If mechanical failures → return to Dev.
|
|
93
112
|
7. Architect runs Deep Audit + Trend Check (skipping pre-scanned checks), validates Safe Zone compliance and ADR adherence.
|
|
94
113
|
8. DevOps merges story branch into sprint branch, validates post-merge (tests + lint + build), handles release tagging.
|
|
95
|
-
9.
|
|
114
|
+
9. **Record lessons immediately**: After DevOps merge, check Dev and QA reports for `lessons_flagged`. Record to LESSONS.md now — do not wait for sprint close.
|
|
115
|
+
10. Team Lead consolidates reports into Sprint Report.
|
|
96
116
|
|
|
97
117
|
**Hotfix Path (L1 Trivial Tasks):**
|
|
98
118
|
1. Team Lead evaluates request and creates `HOTFIX-{Date}-{Name}.md`.
|
|
@@ -102,10 +122,27 @@ Before starting any sprint, the Team Lead MUST:
|
|
|
102
122
|
5. Hotfix is merged directly into the active branch.
|
|
103
123
|
6. DevOps (or Team Lead) runs `./scripts/hotfix_manager.sh sync` to update active worktrees.
|
|
104
124
|
|
|
105
|
-
|
|
106
|
-
|
|
125
|
+
**Escalation Recovery (3+ bounce failures):**
|
|
126
|
+
1. Mark story as "Escalated" in Sprint Plan
|
|
127
|
+
2. Present to human: what failed, root causes from bounce reports, pattern analysis
|
|
128
|
+
3. Propose options: re-scope the story, split into smaller stories, create a spike, or remove from sprint
|
|
129
|
+
4. Human decides. Execute the decision.
|
|
130
|
+
|
|
131
|
+
### Phase 4: Review
|
|
132
|
+
Sprint Report → Human review → Delivery Plan updated (at boundary only) → Lessons recorded → Next sprint.
|
|
107
133
|
If sprint delivered new features or Dev reports flagged stale product docs → spawn Scribe agent to generate/update vdocs/ via vdoc.
|
|
108
134
|
|
|
135
|
+
**Self-Improvement Pipeline** (auto-runs on `vbounce sprint close`):
|
|
136
|
+
1. `sprint_trends.mjs` → cross-sprint trend analysis → `.bounce/trends.md`
|
|
137
|
+
2. `post_sprint_improve.mjs` → parses §5 retro tables + LESSONS.md automation candidates + recurring patterns + effectiveness checks → `.bounce/improvement-manifest.json`
|
|
138
|
+
3. `suggest_improvements.mjs` → generates human-readable suggestions with impact levels → `.bounce/improvement-suggestions.md`
|
|
139
|
+
4. Human reviews suggestions → approve/reject/defer each item
|
|
140
|
+
5. Run `/improve` to apply approved changes with brain-file sync
|
|
141
|
+
|
|
142
|
+
**Impact Levels:** P0 Critical (blocks agents), P1 High (causes rework), P2 Medium (friction), P3 Low (polish). See `/improve` skill for details.
|
|
143
|
+
|
|
144
|
+
On-demand: `vbounce improve S-{XX}` runs the full pipeline.
|
|
145
|
+
|
|
109
146
|
## Story States
|
|
110
147
|
|
|
111
148
|
```
|
|
@@ -144,7 +181,7 @@ Draft → Refinement → Ready to Bounce → Bouncing → QA Passed → Architec
|
|
|
144
181
|
10. **One source of truth**. Reference upstream documents, don't duplicate.
|
|
145
182
|
11. **Change Logs are mandatory** on every document modification.
|
|
146
183
|
12. **Agent Reports MUST use YAML Frontmatter**. Every `.bounce/report/` generated must start with a strict `---` YAML block containing the core status and metrics before the Markdown body.
|
|
147
|
-
13. **Framework Integrity**. Any modification to a `brains
|
|
184
|
+
13. **Framework Integrity**. Any modification to a `brains/`, `skills/`, `templates/`, or `scripts/` file MUST be recorded in `brains/CHANGELOG.md` and reflected in `MANIFEST.md`.
|
|
148
185
|
|
|
149
186
|
## Framework Structure
|
|
150
187
|
|
|
@@ -15,16 +15,18 @@ Implement features and fix bugs as specified in Story documents. You write code
|
|
|
15
15
|
1. **Read LESSONS.md** at the project root. Scan for entries relevant to your task — treat them as hard constraints. No exceptions.
|
|
16
16
|
2. **Read ADR references**: If your task involves core systems (auth, db, state), read Roadmap §3 ADRs directly.
|
|
17
17
|
3. **Read the Story spec** — §1 The Spec for requirements, §3 Implementation Guide for technical approach.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
4. **Check ADR references** in §3.1 — comply with all architecture decisions from the Roadmap.
|
|
19
|
+
5. **Check environment prerequisites** — if Story §3 lists required env vars, services, or migrations, verify they're available before starting. If prerequisites are missing, flag in your report immediately — do not waste a bounce cycle on setup failures.
|
|
20
|
+
6. **Read relevant react-best-practices rules** — consult `skills/react-best-practices/` for patterns matching your task.
|
|
21
|
+
7. **Check product documentation** — if the task file references product docs from `vdocs/`, read them. Understand how the existing feature works before changing adjacent code. If your implementation changes behavior described in a product doc, flag it in your report.
|
|
21
22
|
|
|
22
23
|
## During Implementation
|
|
23
24
|
|
|
24
25
|
**You MUST follow the Test-Driven Development (TDD) Red-Green-Refactor cycle:**
|
|
25
|
-
1. **Red (Write Failing Tests):** Before writing any implementation logic, write
|
|
26
|
+
1. **Red (Write Failing Tests):** Before writing any implementation logic, write automated tests that cover the Gherkin scenarios defined in `§2 The Truth`. This includes both unit tests AND acceptance-level/E2E tests where applicable. Run them to prove they fail.
|
|
26
27
|
2. **Green (Write Implementation):** Write the minimum code required to make your tests pass.
|
|
27
28
|
3. **Refactor:** Clean up the code for readability and architecture without breaking the tests.
|
|
29
|
+
4. **Verify (E2E):** After refactoring, run the full test suite including any acceptance-level tests. All Gherkin scenarios from §2 must have corresponding passing tests before you write your report. Do not rely on QA to catch missing E2E coverage.
|
|
28
30
|
|
|
29
31
|
- **Follow the Safe Zone.** Do not introduce new patterns, libraries, or architectural changes.
|
|
30
32
|
- **Write Self-Documenting Code.** To prevent RAG poisoning downstream, you MUST write clear JSDoc/docstrings for all exported functions, components, schemas, and routing logic. Explain the *why*, not just the *what*. If you fail to document your code, the Scribe agent cannot generate an accurate `_manifest.json` for future sprints.
|
|
@@ -23,8 +23,13 @@ vbounce state show # current sprint state
|
|
|
23
23
|
vbounce validate report <f> # validate a report file
|
|
24
24
|
vbounce doctor # project health check
|
|
25
25
|
vbounce prep qa STORY-ID # generate QA context
|
|
26
|
+
vbounce improve S-XX # run self-improvement pipeline
|
|
26
27
|
```
|
|
27
28
|
|
|
29
|
+
## Self-Improvement
|
|
30
|
+
|
|
31
|
+
After sprint close, V-Bounce automatically analyzes retro findings, LESSONS.md, and cross-sprint patterns to generate improvement suggestions with impact levels (P0 Critical → P3 Low). See `.bounce/improvement-suggestions.md` after running `vbounce sprint close` or `vbounce improve S-XX`.
|
|
32
|
+
|
|
28
33
|
## Document Hierarchy
|
|
29
34
|
|
|
30
35
|
Charter → Roadmap → Epic → Story → Sprint Plan → Delivery Plan
|
|
@@ -41,6 +41,9 @@ Before sprints: Lead triages request (L1 Trivial → Hotfix Path. L2-L4 → Epic
|
|
|
41
41
|
### Phase 3: Review
|
|
42
42
|
Sprint Report → Human review → Delivery Plan updated → Lessons recorded. If new features delivered → spawn Scribe agent to generate/update vdocs/.
|
|
43
43
|
|
|
44
|
+
**Self-Improvement Pipeline** (auto-runs on `vbounce sprint close`):
|
|
45
|
+
Analyzes §5 retro tables + LESSONS.md automation candidates + recurring patterns → generates `.bounce/improvement-suggestions.md` with impact levels (P0 Critical → P3 Low). Human approves/rejects/defers. Run `/improve` skill to apply. On-demand: `vbounce improve S-{XX}`.
|
|
46
|
+
|
|
44
47
|
### Story States
|
|
45
48
|
Draft → Refinement → Ready to Bounce → Bouncing → QA Passed → Architect Passed → Sprint Review → Done
|
|
46
49
|
|
|
@@ -20,8 +20,13 @@ This project uses V-Bounce Engine. You are operating in Tier 4 (Awareness) mode.
|
|
|
20
20
|
vbounce state show # where is the sprint right now?
|
|
21
21
|
vbounce validate report <f> # is this report valid?
|
|
22
22
|
vbounce doctor # is the framework healthy?
|
|
23
|
+
vbounce improve S-XX # run self-improvement pipeline
|
|
23
24
|
```
|
|
24
25
|
|
|
26
|
+
## Self-Improvement
|
|
27
|
+
|
|
28
|
+
After sprint close, V-Bounce auto-analyzes retro findings + LESSONS.md + cross-sprint patterns → generates `.bounce/improvement-suggestions.md` with impact levels (P0 Critical → P3 Low). Use `/improve` skill to apply approved changes.
|
|
29
|
+
|
|
25
30
|
## Critical Rules
|
|
26
31
|
|
|
27
32
|
- Read LESSONS.md before coding. No exceptions.
|
package/package.json
CHANGED
package/scripts/close_sprint.mjs
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import fs from 'fs';
|
|
12
12
|
import path from 'path';
|
|
13
13
|
import { fileURLToPath } from 'url';
|
|
14
|
+
import { spawnSync } from 'child_process';
|
|
14
15
|
|
|
15
16
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
16
17
|
const ROOT = path.resolve(__dirname, '..');
|
|
@@ -81,6 +82,35 @@ console.log(`✓ Updated state.json`);
|
|
|
81
82
|
const sprintPlanPath = `product_plans/sprints/sprint-${sprintNum}`;
|
|
82
83
|
const archivePath = `product_plans/archive/sprints/sprint-${sprintNum}`;
|
|
83
84
|
|
|
85
|
+
// 7. Auto-run improvement pipeline
|
|
86
|
+
console.log('');
|
|
87
|
+
console.log('Running self-improvement pipeline...');
|
|
88
|
+
const suggestScript = path.join(__dirname, 'suggest_improvements.mjs');
|
|
89
|
+
if (fs.existsSync(suggestScript)) {
|
|
90
|
+
// Run trends first (if available)
|
|
91
|
+
const trendsScript = path.join(__dirname, 'sprint_trends.mjs');
|
|
92
|
+
if (fs.existsSync(trendsScript)) {
|
|
93
|
+
const trendsResult = spawnSync(process.execPath, [trendsScript], {
|
|
94
|
+
stdio: 'inherit',
|
|
95
|
+
cwd: process.cwd(),
|
|
96
|
+
});
|
|
97
|
+
if (trendsResult.status !== 0) {
|
|
98
|
+
console.warn(' ⚠ Trends analysis returned non-zero — continuing.');
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Run suggest (which internally runs post_sprint_improve.mjs)
|
|
103
|
+
const suggestResult = spawnSync(process.execPath, [suggestScript, sprintId], {
|
|
104
|
+
stdio: 'inherit',
|
|
105
|
+
cwd: process.cwd(),
|
|
106
|
+
});
|
|
107
|
+
if (suggestResult.status !== 0) {
|
|
108
|
+
console.warn(' ⚠ Improvement suggestions returned non-zero.');
|
|
109
|
+
}
|
|
110
|
+
} else {
|
|
111
|
+
console.warn(' ⚠ suggest_improvements.mjs not found — skipping improvement pipeline.');
|
|
112
|
+
}
|
|
113
|
+
|
|
84
114
|
console.log('');
|
|
85
115
|
console.log('Manual steps remaining:');
|
|
86
116
|
console.log(` 1. Archive sprint plan folder:`);
|
|
@@ -89,6 +119,7 @@ console.log(` 2. Update Delivery Plan §4 Completed Sprints with a summary row`
|
|
|
89
119
|
console.log(` 3. Remove delivered stories from Delivery Plan §3 Backlog`);
|
|
90
120
|
console.log(` 4. Delete sprint branch (after merge to main):`);
|
|
91
121
|
console.log(` git branch -d sprint/${sprintId}`);
|
|
92
|
-
console.log(` 5.
|
|
122
|
+
console.log(` 5. Review .bounce/improvement-suggestions.md — approve/reject/defer each item`);
|
|
123
|
+
console.log(` 6. Run /improve to apply approved changes with brain-file sync`);
|
|
93
124
|
console.log('');
|
|
94
125
|
console.log(`✓ Sprint ${sprintId} closed.`);
|