@sandrinio/vbounce 1.8.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.
Files changed (39) hide show
  1. package/README.md +439 -159
  2. package/bin/vbounce.mjs +255 -25
  3. package/brains/AGENTS.md +62 -24
  4. package/brains/CHANGELOG.md +24 -2
  5. package/brains/CLAUDE.md +124 -30
  6. package/brains/GEMINI.md +64 -27
  7. package/brains/SETUP.md +15 -15
  8. package/brains/claude-agents/architect.md +1 -1
  9. package/brains/claude-agents/developer.md +7 -5
  10. package/brains/claude-agents/devops.md +1 -1
  11. package/brains/claude-agents/qa.md +1 -1
  12. package/brains/claude-agents/scribe.md +1 -1
  13. package/brains/copilot/copilot-instructions.md +8 -3
  14. package/brains/cursor-rules/vbounce-docs.mdc +2 -2
  15. package/brains/cursor-rules/vbounce-process.mdc +6 -3
  16. package/brains/cursor-rules/vbounce-rules.mdc +2 -2
  17. package/brains/windsurf/.windsurfrules +7 -2
  18. package/docs/HOTFIX_EDGE_CASES.md +1 -1
  19. package/package.json +5 -5
  20. package/scripts/close_sprint.mjs +32 -1
  21. package/scripts/doctor.mjs +3 -3
  22. package/scripts/hotfix_manager.sh +2 -2
  23. package/scripts/init_gate_config.sh +1 -1
  24. package/scripts/post_sprint_improve.mjs +486 -0
  25. package/scripts/pre_gate_common.sh +1 -1
  26. package/scripts/pre_gate_runner.sh +1 -1
  27. package/scripts/suggest_improvements.mjs +207 -44
  28. package/scripts/validate_report.mjs +1 -1
  29. package/scripts/verify_framework.mjs +1 -1
  30. package/skills/agent-team/SKILL.md +48 -25
  31. package/skills/agent-team/references/discovery.md +97 -0
  32. package/skills/doc-manager/SKILL.md +146 -22
  33. package/skills/improve/SKILL.md +149 -58
  34. package/skills/lesson/SKILL.md +14 -0
  35. package/templates/epic.md +19 -16
  36. package/templates/spike.md +143 -0
  37. package/templates/sprint.md +32 -12
  38. package/templates/sprint_report.md +6 -4
  39. package/templates/story.md +23 -8
package/README.md CHANGED
@@ -1,246 +1,526 @@
1
- # 🎯 V-Bounce OS
1
+ # V-Bounce Engine
2
2
 
3
- **Turn your AI coding assistant into a full engineering team.**
3
+ **A structured SDLC framework for AI coding agents.**
4
4
 
5
- *Stop letting your AI code in a vacuum. V-Bounce OS is a structured, agentic framework that enforces a strict Software Development Lifecycle (SDLC) on AI agents like Claude Code, Cursor, Copilot, Gemini, and Codex.*
5
+ V-Bounce Engine turns AI assistants Claude Code, Cursor, Gemini, Copilot, Codex into disciplined engineering teams. Instead of letting agents code in a vacuum, it enforces a planning-first workflow with automated quality gates, structured handoffs, and a persistent learning loop.
6
6
 
7
- > *Inspired by the work of Cory Hymel*
7
+ > Inspired by the work of Cory Hymel
8
8
 
9
9
  ---
10
10
 
11
- ## 💡 The Hook: Why V-Bounce OS?
11
+ ## The Problem
12
12
 
13
- Multi-agent frameworks are everywhere. But simply putting three agents in a chatroom doesn't write scalable software. When left unchecked, AI coding teams still hallucinate requirements, introduce architectural drift, and break existing patterns because they are disconnected from the truth of what they actually built.
13
+ AI coding agents are powerful but without structure, they create expensive chaos:
14
14
 
15
- **The core differentiator of V-Bounce OS is the Context Loop: Requirements Bounce Reports Product Documentation.**
15
+ - **No accountability.** The agent writes code, but nobody reviews it against requirements before it ships. Bugs that a junior engineer would catch survive to production.
16
+ - **Invisible progress.** You ask "how's the feature going?" and the only answer is "the agent is still running." No milestones, no intermediate artifacts, no way to course-correct mid-sprint.
17
+ - **No institutional memory.** Every session starts from zero. The agent makes the same architectural mistake it made last week because nothing captures what went wrong.
18
+ - **Rework cycles.** Without quality gates, bad code compounds. A missed requirement discovered late costs 10x more to fix than one caught early.
19
+ - **Risk blindness.** There's no structured way to assess what could go wrong before the agent starts building.
16
20
 
17
- Instead of treating your AI as a solo developer, V-Bounce OS forces distinct, specialized roles (Team Lead, Developer, QA, Architect, Scribe) to communicate exclusively through structured artifacts.
21
+ V-Bounce Engine solves this by wrapping AI agents in the same discipline that makes human engineering teams reliable: planning documents, role-based reviews, automated gates, and a learning loop that compounds knowledge across sprints.
18
22
 
19
- 1. **Requirements (`product_plans/`)**: The Team Lead defines standard, immutable templates (Charter, Epic, Story) before a single line of code is written.
20
- 2. **Bounce Reports (`.bounce/`)**: During implementation, the QA and Architect agents do not edit code. They run deep codebase audits and emit structured "Bounce Reports" summarizing anti-patterns and regressions. The Developer must fix the issues and run the loop again until the code passes validation.
21
- 3. **Product Documentation (`vdocs/`)**: The Scribe agent explores the *actual* codebase post-merge and uses our integrated `vdoc` tool to update feature-centric documentation and the semantic `_manifest.json` map.
23
+ ---
24
+
25
+ ## Built-in Guardrails
22
26
 
23
- The next time an agent writes code, it reads the `_manifest.json` and the `LESSONS.md` file from previous sprints. The context loop closes. Your AI writes better code because it finally understands the reality of your evolving system.
27
+ Every risk that keeps you up at night has a specific mechanism that catches it:
28
+
29
+ | Risk | What catches it |
30
+ |------|----------------|
31
+ | Agent ships code that doesn't match requirements | **QA gate** — validates every story against acceptance criteria before merge |
32
+ | Architectural drift over time | **Architect gate** — audits against your ADRs and safe-zone rules on every story |
33
+ | One bad story breaks everything | **Git worktrees** — every story is isolated; failures can't contaminate other work |
34
+ | Agent gets stuck in a loop | **3-bounce escalation** — after 3 failed attempts, the story surfaces to a human |
35
+ | Scope creep on "quick fixes" | **Hotfix hard-stop** — Developer must stop if a fix touches more than 2 files |
36
+ | Same mistakes keep happening | **LESSONS.md** — agents read accumulated mistakes before writing future code |
37
+ | Silent regressions | **Root cause tagging** — every failure is tagged and tracked across sprints |
38
+ | Framework itself becomes stale | **Self-improvement skill** — analyzes friction patterns and proposes changes (with your approval) |
24
39
 
25
40
  ---
26
41
 
27
- ## 📂 State-Based Folder Structure
42
+ ## Planning With V-Bounce
43
+
44
+ V-Bounce separates planning into two layers: **what to build** and **how to ship it**. The AI is your planning partner — not a tool you invoke with commands.
45
+
46
+ ### Product Planning — What to Build
47
+
48
+ Just talk to the AI. Say "plan a feature for X" or "create an epic for payments" and it handles the rest — reading upstream documents, researching your codebase, and drafting planning documents.
49
+
50
+ A document hierarchy that mirrors how product teams already think:
51
+
52
+ ```
53
+ Charter (WHY — vision, principles, constraints)
54
+ → Roadmap (WHAT/WHEN — releases, milestones, architecture decisions)
55
+ → Epic (scoped WHAT — a feature with clear boundaries)
56
+ → Story (HOW — implementation spec with acceptance criteria)
57
+ ```
58
+
59
+ **You write the top levels. The AI builds the bottom — informed by your actual codebase.**
60
+
61
+ When creating Epics, the AI researches your codebase to fill Technical Context with real file paths and verified dependencies — not guesses. When decomposing Epics into Stories, the AI reads affected files, explores architecture patterns, and creates small, focused stories by deliverable (vertical slices), not by layer.
62
+
63
+ Every document includes an **ambiguity score**:
64
+ - 🔴 High — requirements unclear, blocked from development
65
+ - 🟡 Medium — tech TBD but logic is clear, safe to plan
66
+ - 🟢 Low — fully specified, ready to build
67
+
68
+ No level can be skipped. This prevents the most common AI failure mode: building the wrong thing because requirements were vague.
69
+
70
+ ### Execution Planning — How to Ship It
28
71
 
29
- V-Bounce OS organizes planning documents (`product_plans/`) through a strict state machine based on folder location:
72
+ Once you know *what* to build, three documents govern *how* it gets delivered:
30
73
 
31
- - **`strategy/`**: High-level context (Charter, Roadmap, Risk Registry, Release Plans). Frozen during active sprints.
32
- - **`backlog/`**: Where unassigned work lives. Epics and their child Stories are refined here until selected for a sprint.
33
- - **`sprints/`**: The active execution workspace. A physical `sprint-XX/` boundary is created and Stories are moved in. Only one sprint is "Active" at a time.
34
- - **`hotfixes/`**: Trivial, emergency tasks that bypass sprint cycles.
35
- - **`archive/`**: Immutable history. Finished sprint folders and fully completed Epics are permanently moved here.
74
+ | Document | Scope | Who uses it | What it tracks |
75
+ |----------|-------|-------------|----------------|
76
+ | **Delivery Plan** | A full release (multiple sprints) | PM | Which Epics are included, project window (start/end dates), high-level backlog prioritization, escalated/parked stories |
77
+ | **Sprint Plan** | One sprint (typically 1 week) | Team Lead + PM | Active story scope, context pack readiness checklists, execution strategy (parallel vs sequential phases), dependency chains, risk flags, and a live execution log |
78
+ | **Risk Registry** | Cross-cutting (all levels) | PM + Architect | Active risks with likelihood/impact scoring, phase-stamped analysis log, mitigations, and resolution history |
79
+
80
+ **How they connect:**
81
+
82
+ ```
83
+ Delivery Plan (the milestone — "we're shipping auth + payments by March 30")
84
+ → Sprint Plan (this week — "stories 01-03 in parallel, 04 depends on 01")
85
+
86
+ Risk Registry (cross-cutting — reviewed at every sprint boundary)
87
+ ```
88
+
89
+ The **Delivery Plan** is updated only at sprint boundaries. The **Sprint Plan** is the single source of truth during active execution — every story state transition is recorded there. At sprint end, the Sprint Plan's execution log becomes the skeleton for the Sprint Report automatically.
90
+
91
+ The **Sprint Plan** also includes a **Context Pack Readiness** checklist for each story — a preflight check ensuring the spec is complete, acceptance criteria are defined, and ambiguity is low before any code is written. If a story isn't ready, it stays in Refinement.
36
92
 
37
93
  ---
38
94
 
39
- ## 🛠️ The Tech Stack
95
+ ## Reports and Visibility
96
+
97
+ V-Bounce generates structured reports at every stage — designed to answer stakeholder questions without requiring anyone to read code:
40
98
 
41
- V-Bounce OS is built to be **local-first, privacy-conscious, and dependency-light**.
99
+ | Report | When it's generated | What it answers |
100
+ |--------|-------------------|-----------------|
101
+ | **Implementation Report** | After each story is built | What was built? What decisions were made? What tests were added? |
102
+ | **QA Report** | After validation | Does the implementation match the acceptance criteria? What failed? |
103
+ | **Architect Report** | After audit | Does this align with our architecture? Any ADR violations? |
104
+ | **Sprint Report** | End of sprint | What shipped? What bounced? What's the correction tax? Lessons learned? |
105
+ | **Release Report** | After merge | What went to production? Environment changes? Post-merge validations? |
106
+ | **Scribe Report** | After documentation pass | What product docs were created, updated, or flagged as stale? |
42
107
 
43
- - **Runtime**: Node.js Powering the validation pipeline, context preparation, and CLI.
44
- - **Data Contract**: YAML Frontmatter + Markdown — Human-readable agent handoffs that are also strictly machine-parsable.
45
- - **State Management**: `.bounce/state.json` — Machine-readable sprint state for instant crash recovery without re-reading documents.
46
- - **Context Budget**: On-demand prep scripts (`vbounce prep sprint/qa/arch`) generate capped context packs — no embedding or vector DB required.
108
+ **You don't need to read code to manage the sprint.** The reports surface exactly what a PM or PO needs to make decisions.
47
109
 
48
110
  ---
49
111
 
50
- ## 🚀 Quick Start
112
+ ## What You Can Measure
51
113
 
52
- One command to install the entire methodology directly into your AI assistant.
114
+ V-Bounce tracks metrics that map directly to product and delivery health:
53
115
 
54
- ```bash
55
- # For Claude Code
56
- npx @sandrinio/vbounce install claude
116
+ | Metric | What it tells you | Action when it's bad |
117
+ |--------|------------------|---------------------|
118
+ | **Bounce Rate (QA)** | How often code fails acceptance criteria | Stories may have vague requirements — tighten acceptance criteria |
119
+ | **Bounce Rate (Architect)** | How often code violates architecture rules | ADRs may be unclear, or the agent needs better context |
120
+ | **Correction Tax** | 0% = agent delivered autonomously, 100% = human rewrote everything | High tax means the agent needs better guidance (Charter, Roadmap, or Skills) |
121
+ | **Root Cause Distribution** | Why things fail — `missing_tests`, `adr_violation`, `spec_ambiguity`, etc. | Invest in the category that fails most often |
122
+ | **Escalation Rate** | How often stories hit the 3-bounce limit | Chronic escalation signals structural issues in planning docs |
123
+ | **Sprint Velocity** | Stories completed per sprint | Track trend over time — should improve as LESSONS.md grows |
124
+
125
+ Run `vbounce trends` to see cross-sprint analysis. Run `vbounce suggest` for AI-generated improvement recommendations.
57
126
 
58
- # For Cursor
59
- npx @sandrinio/vbounce install cursor
127
+ ---
60
128
 
61
- # For Gemini / Antigravity
62
- npx @sandrinio/vbounce install gemini
129
+ ## How a Sprint Flows
63
130
 
64
- # For Copilot / VS Code
65
- npx @sandrinio/vbounce install vscode
131
+ Here's what a sprint looks like from the product side — no terminal commands, no code:
66
132
 
67
- # For OpenAI Codex
68
- npx @sandrinio/vbounce install codex
69
- ```
133
+ **Phase 1 Planning**
134
+ You talk to the AI about what to build. The AI creates Epics and Stories by reading upstream documents and researching your codebase. Ambiguity, risks, and open questions are surfaced and discussed collaboratively.
135
+
136
+ **Phase 2 — Sprint Planning**
137
+ You and the AI decide what goes into the sprint together. The AI reads the backlog, proposes scope, and surfaces blockers — open questions, unresolved ambiguity, dependency risks, edge cases. You discuss, adjust, and confirm. **No sprint starts without your explicit confirmation.** The Sprint Plan is mandatory.
138
+
139
+ **Phase 3 — The Bounce**
140
+ The AI team works autonomously. For each Story:
141
+ 1. The **Developer** builds the feature in isolation (with E2E tests, not just unit tests)
142
+ 2. The **QA agent** checks: does the code meet the acceptance criteria?
143
+ 3. The **Architect agent** checks: does the code follow our architecture rules?
144
+ 4. If either check fails, the work "bounces" back to the Developer with a tagged reason
145
+ 5. After 3 bounces, the story escalates — the AI presents root causes and options (re-scope, split, spike, or remove), and you decide
146
+
147
+ Lessons are recorded **immediately** after each story merges, not deferred to sprint close.
70
148
 
71
- ### What gets installed?
72
- - **Agent Instructions:** The "Brain" file (e.g., `CLAUDE.md`, `.cursor/rules/`) that teaches your AI how to follow the V-Bounce process.
73
- - **Templates:** Markdown templates for your Charter, Roadmap, Epics, Stories, Sprint Plans, and Delivery Plans.
74
- - **Bundled Scripts:** 16+ automation scripts validation pipeline, context preparation, state management, sprint lifecycle, and the self-improvement loop.
75
- - **Lightweight Dependencies:** The installer runs `npm install` for `js-yaml`, `marked`, and `commander` — nothing else. No vector DBs, no embedding models.
76
- - **vdoc Integration:** The installer offers to install [`@sandrinio/vdoc`](https://github.com/sandrinio/vdoc) for your platform — enabling automatic semantic product documentation generation via the Scribe agent.
149
+ **Phase 4 Review**
150
+ The Sprint Report lands. It tells you:
151
+ - What shipped and what didn't
152
+ - How many bounces each story took (and why)
153
+ - The correction tax (how much human intervention was needed)
154
+ - Test counts per story
155
+ - Lessons already captured during the sprint
156
+ - Recommendations for process improvements
77
157
 
78
- After installing, run `vbounce doctor` to verify your setup is complete.
158
+ You review, approve the release, and the sprint archives itself. The next sprint starts smarter because the agents now carry forward everything they learned.
79
159
 
80
160
  ---
81
161
 
82
- ## 🛠️ The `vbounce` CLI
162
+ ## Continuous Improvement
83
163
 
84
- All V-Bounce OS operations route through a unified CLI. Every command is designed to be run by the Team Lead agent — not just humans.
164
+ Most AI coding setups are stateless every session starts from scratch. V-Bounce is the opposite.
85
165
 
86
- ```bash
87
- # Sprint lifecycle
88
- vbounce sprint init S-01 D-01 # Initialize sprint state.json + plan dir
89
- vbounce sprint close S-01 # Validate terminal states, archive, close
166
+ The **Context Loop** is a closed feedback system that makes your AI team measurably better over time:
90
167
 
91
- # Story lifecycle
92
- vbounce story complete STORY-001-01-login # Update state.json + sprint plan §4
168
+ ```
169
+ Plan ──> Build ──> Bounce ──> Document ──> Learn
170
+ │ │ │ │
171
+ │ QA + Arch │ LESSONS.md
172
+ │ gate code Scribe maps │
173
+ │ the codebase │
174
+ └─────────────────────────────────────────────────────┘
175
+ Next sprint reads it all
176
+ ```
93
177
 
94
- # State management (crash recovery)
95
- vbounce state show # Print current state.json
96
- vbounce state update STORY-001-01-login "QA Passed" # Update story state
97
- vbounce state update STORY-001-01-login "Bouncing" --qa-bounce # Increment QA bounce
178
+ After each sprint:
179
+ - **LESSONS.md** captures every mistake — agents read this before writing future code
180
+ - **Trend analysis** spots recurring patterns (e.g., "auth-related stories bounce 3x more than average")
181
+ - **Self-improvement pipeline** analyzes friction and proposes concrete framework changes
182
+ - **Scribe** keeps product documentation in sync with actual code
98
183
 
99
- # Context preparation (context budget management)
100
- vbounce prep sprint S-01 # Generate sprint-context-S-01.md (≤200 lines)
101
- vbounce prep qa STORY-001-01-login # Generate qa-context-STORY-ID.md (≤300 lines)
102
- vbounce prep arch STORY-001-01-login # Generate arch-context with truncated diff
184
+ Sprint 1 might have a 40% bounce rate. By Sprint 5, that number drops — because the agents have accumulated context about your codebase, your architecture decisions, and your team's standards.
103
185
 
104
- # Validation gates
105
- vbounce validate report .bounce/reports/STORY-001-01-login-qa.md
106
- vbounce validate state # Validate state.json schema
107
- vbounce validate sprint S-01 # Validate sprint plan structure + cross-refs
108
- vbounce validate ready STORY-001-01-login # Pre-bounce readiness gate
186
+ ### The Self-Improvement Pipeline
109
187
 
110
- # Self-improvement loop
111
- vbounce trends # Compute sprint metrics → .bounce/trends.md
112
- vbounce suggest S-01 # Generate improvement suggestions
188
+ When a sprint closes (`vbounce sprint close`), an automated pipeline analyzes what went wrong and proposes how to fix the framework itself:
113
189
 
114
- # Framework health
115
- vbounce doctor # Check all required files, scripts, templates
116
190
  ```
191
+ Sprint Close
192
+
193
+ ├── Trend Analysis → Cross-sprint bounce patterns
194
+
195
+ ├── Retro Parser → Reads §5 Framework Self-Assessment tables
196
+ │ from the Sprint Report
197
+
198
+ ├── Lesson Analyzer → Classifies LESSONS.md rules by what they
199
+ │ can become: gate checks, scripts, template
200
+ │ fields, or permanent agent rules
201
+
202
+ ├── Recurrence Detector → Cross-references archived sprint reports
203
+ │ to find findings that keep coming back
204
+
205
+ ├── Effectiveness Checker → Did last sprint's improvements actually
206
+ │ resolve their target findings?
207
+
208
+ └── Improvement Suggestions → Human-readable proposals with impact levels
209
+ ```
210
+
211
+ Every proposal gets an **impact level** so you know what to fix first:
212
+
213
+ | Level | Label | Meaning | When to fix |
214
+ |-------|-------|---------|-------------|
215
+ | **P0** | Critical | Blocks agent work or causes incorrect output | Before next sprint |
216
+ | **P1** | High | Causes rework — bounces, wasted tokens, repeated manual steps | This improvement cycle |
217
+ | **P2** | Medium | Friction that slows agents but doesn't block | Within 2 sprints |
218
+ | **P3** | Low | Polish — nice-to-have | Batch when convenient |
219
+
220
+ ### Lessons Become Automation
221
+
222
+ The pipeline doesn't just track lessons — it classifies each one by what it can become:
223
+
224
+ | Lesson pattern | Becomes | Example |
225
+ |---------------|---------|---------|
226
+ | "Always check X", "Never use Y" | **Gate check** — automated grep/lint rule | "Never import from internal modules" → pre-gate grep pattern |
227
+ | "Run X before Y" | **Script** — validation step | "Run type-check before QA" → added to pre_gate_runner.sh |
228
+ | "Include X in the story" | **Template field** — required section | "Include rollback plan" → new field in story template |
229
+ | General behavioral rules (3+ sprints old) | **Agent config** — permanent brain rule | "Always check for N+1 queries" → graduated to Architect config |
230
+
231
+ This means your framework evolves organically: agents report friction, the pipeline classifies it, you approve the fix, and the next sprint runs smoother. No manual analysis required.
232
+
233
+ Run `vbounce improve S-XX` anytime to trigger the pipeline on demand.
117
234
 
118
235
  ---
119
236
 
120
- ## 🔄 State Management & Crash Recovery
237
+ ## Is V-Bounce Right For You?
121
238
 
122
- V-Bounce OS tracks sprint state in `.bounce/state.json` — a machine-readable snapshot that survives context resets and session interruptions.
239
+ **Best fit:**
240
+ - Teams using AI agents for production code (not just prototypes)
241
+ - Projects with clear requirements that can be expressed as acceptance criteria
242
+ - Codebases where architectural consistency matters
243
+ - Teams that want to scale AI usage without losing quality control
123
244
 
124
- ```json
125
- {
126
- "sprint_id": "S-01",
127
- "delivery_id": "D-01",
128
- "current_phase": "bouncing",
129
- "last_action": "QA failed STORY-001-01-login — bounce 1",
130
- "stories": {
131
- "STORY-001-01-login": {
132
- "state": "Bouncing",
133
- "qa_bounces": 1,
134
- "arch_bounces": 0,
135
- "worktree": ".worktrees/STORY-001-01-login",
136
- "updated_at": "2026-03-12T10:00:00Z"
137
- }
138
- }
139
- }
140
- ```
245
+ **Less ideal for:**
246
+ - One-off scripts or throwaway prototypes (overkill)
247
+ - Exploratory research with no defined requirements
248
+ - Projects where the entire team is deeply embedded in every code change anyway
141
249
 
142
- When a new session starts, the Team Lead reads `state.json` in under 5 seconds to know exactly where the sprint left off — no re-reading 10 markdown files.
250
+ **Minimum setup:** One person who can run `npx` commands + one person who can write a Charter and Epics. That's it.
143
251
 
144
252
  ---
145
253
 
146
- ## 📊 Self-Improvement Loop
254
+ ## Roles and Responsibilities
255
+
256
+ ### Human
257
+
258
+ You own the planning and the final say. The agents never ship without your approval.
147
259
 
148
- V-Bounce OS tracks its own performance and suggests improvements automatically.
260
+ | Responsibility | What it involves |
261
+ |---------------|-----------------|
262
+ | **Set vision and constraints** | Write the Charter and Roadmap — define what to build and what's off-limits |
263
+ | **Define requirements** | Break Roadmap into Epics and Stories with acceptance criteria |
264
+ | **Review and approve** | Read sprint reports, approve releases, intervene on escalations |
265
+ | **Tune agent performance** | Adjust brain files, skills, and ADRs based on trend data and bounce patterns |
266
+ | **Install and configure** | Run the installer, verify setup with `vbounce doctor` |
149
267
 
150
- 1. **Root Cause Tagging**: Every QA and Architect FAIL report includes a `root_cause:` field (e.g., `missing_tests`, `adr_violation`, `spec_ambiguity`) that feeds into trend analysis.
151
- 2. **Sprint Trends**: `vbounce trends` scans all archived reports to compute first-pass rate, average bounce count, correction tax, and root cause breakdown per sprint.
152
- 3. **Improvement Suggestions**: `vbounce suggest S-{XX}` reads trends, LESSONS.md, and the improvement log to flag stale lessons, recurring failure patterns, and graduation candidates.
153
- 4. **Improvement Log**: `.bounce/improvement-log.md` tracks every suggestion with Applied/Rejected/Deferred status — so nothing falls through the cracks.
268
+ ### Agent Team Lead (Orchestrator)
269
+
270
+ The Team Lead reads your planning documents and coordinates the entire sprint. It never writes code it delegates, tracks state, and generates reports.
271
+
272
+ | Responsibility | What it involves |
273
+ |---------------|-----------------|
274
+ | **Sprint orchestration** | Assigns stories, manages state transitions, enforces the bounce loop |
275
+ | **Agent delegation** | Spawns Developer, QA, Architect, DevOps, and Scribe agents as needed |
276
+ | **Report routing** | Reads each agent's output and decides the next step (pass, bounce, escalate) |
277
+ | **Escalation** | Surfaces stories to the human after 3 failed bounces |
278
+ | **Sprint reporting** | Consolidates execution data into Sprint Reports and Release Reports |
279
+
280
+ ### Agent — Specialists (Developer, QA, Architect, DevOps, Scribe)
281
+
282
+ Five specialist agents, each with a single job and strict boundaries:
283
+
284
+ | Agent | What it does | Constraints |
285
+ |-------|-------------|-------------|
286
+ | **Developer** | Implements stories in isolated worktrees, submits implementation reports | Works only in its assigned worktree |
287
+ | **QA** | Validates code against acceptance criteria | Read-only — cannot modify code |
288
+ | **Architect** | Audits against ADRs, architecture rules, and safe-zone boundaries | Read-only — cannot modify code |
289
+ | **DevOps** | Merges passing stories into the sprint branch | Only acts after both gates pass |
290
+ | **Scribe** | Generates and maintains product documentation from the actual codebase | Only runs after merge |
291
+
292
+ One person can fill the entire human side. The framework scales to the team you have.
154
293
 
155
294
  ---
156
295
 
157
- ## 🔧 Tool Tier Model
296
+ ## Quick Start
158
297
 
159
- V-Bounce OS supports four tiers of AI tools with dedicated brain files for each.
298
+ ```bash
299
+ npx @sandrinio/vbounce install claude # Claude Code
300
+ npx @sandrinio/vbounce install cursor # Cursor
301
+ npx @sandrinio/vbounce install gemini # Gemini CLI
302
+ npx @sandrinio/vbounce install codex # OpenAI Codex
303
+ npx @sandrinio/vbounce install vscode # GitHub Copilot
304
+ ```
160
305
 
161
- | Tier | Tools | Brain File | Capabilities |
162
- |------|-------|------------|--------------|
163
- | **Tier 1** | Claude Code | `brains/CLAUDE.md` | Full orchestration — spawns subagents, manages state, runs all CLI commands |
164
- | **Tier 2** | Gemini CLI, OpenAI Codex | `brains/GEMINI.md`, `brains/codex/` | Single-agent — follows bounce loop, reads state.json, all CLI commands |
165
- | **Tier 3** | Cursor | `brains/cursor-rules/` | Role-specific context injection via `.cursor/rules/` MDC files |
166
- | **Tier 4** | GitHub Copilot, Windsurf | `brains/copilot/`, `brains/windsurf/` | Awareness mode — checklist-driven, reads state.json, CLI commands for safe operations |
306
+ Then verify your setup:
167
307
 
168
- Install the appropriate brain for your tool:
169
308
  ```bash
170
- npx @sandrinio/vbounce install claude # Tier 1
171
- npx @sandrinio/vbounce install gemini # Tier 2
172
- npx @sandrinio/vbounce install cursor # Tier 3
173
- npx @sandrinio/vbounce install vscode # Tier 4
309
+ npx vbounce doctor
310
+ ```
311
+
312
+ ### What gets installed
313
+
314
+ Here's what lands in your repo (example: Claude Code):
315
+
316
+ ```
317
+ your-project/
318
+ ├── CLAUDE.md # Brain file — teaches the agent the V-Bounce process
319
+ ├── .claude/agents/ # Subagent instructions (Claude Code only)
320
+ │ ├── developer.md
321
+ │ ├── qa.md
322
+ │ ├── architect.md
323
+ │ ├── devops.md
324
+ │ └── scribe.md
325
+ ├── templates/ # 9 Markdown + YAML frontmatter templates
326
+ │ ├── charter.md
327
+ │ ├── roadmap.md
328
+ │ ├── epic.md
329
+ │ ├── story.md
330
+ │ ├── sprint.md
331
+ │ ├── delivery_plan.md
332
+ │ ├── sprint_report.md
333
+ │ ├── hotfix.md
334
+ │ └── risk_registry.md
335
+ ├── skills/ # 7 modular skill files (see Skills below)
336
+ │ ├── agent-team/
337
+ │ ├── doc-manager/
338
+ │ ├── lesson/
339
+ │ ├── vibe-code-review/
340
+ │ ├── write-skill/
341
+ │ ├── improve/
342
+ │ └── react-best-practices/ # Example — customize for your stack
343
+ ├── scripts/ # 23 automation scripts (validation, context prep, state)
344
+ └── package.json # 3 deps: js-yaml, marked, commander. Nothing else.
345
+ ```
346
+
347
+ Other platforms install the same `templates/`, `skills/`, and `scripts/` — only the brain file differs (`.cursor/rules/`, `GEMINI.md`, `AGENTS.md`, or `.github/copilot-instructions.md`).
348
+
349
+ Everything is plain Markdown and Node.js. No vector DBs, no embedding models, no background services.
350
+
351
+ ---
352
+
353
+ ## Supported Tools
354
+
355
+ V-Bounce Engine adapts to each tool's capabilities:
356
+
357
+ | Tier | Tool | How it works |
358
+ |------|------|-------------|
359
+ | 1 | Claude Code | Full orchestration — spawns subagents for each role, manages state, runs all CLI commands |
360
+ | 2 | Gemini CLI, Codex | Single-agent mode — follows the bounce loop sequentially, full CLI access |
361
+ | 3 | Cursor | Role-specific context injection via `.cursor/rules/` MDC files |
362
+ | 4 | Copilot, Windsurf | Awareness mode — checklist-driven, reads state, safe CLI operations |
363
+
364
+ ---
365
+
366
+ ## The Bounce Loop
367
+
368
+ This is the core execution cycle for every Story:
369
+
370
+ ```
371
+ Developer QA Architect DevOps
372
+ │ │ │ │
373
+ Writes code in worktree │ │ │
374
+ Submits Implementation ──────> │ │ │
375
+ Report Validates against (waits for QA) │
376
+ acceptance criteria │ │
377
+ │ │ │
378
+ PASS ──────────────────────> │ │
379
+ FAIL ──> bounces back Audits against │
380
+ to Developer ADRs + safe zone │
381
+ │ │
382
+ PASS ──────────────────> │
383
+ FAIL ──> bounces back Merges worktree
384
+ to Developer into main branch
174
385
  ```
175
386
 
387
+ After 3 failed bounces on either gate, the Story escalates to you for intervention.
388
+
389
+ Each FAIL report includes a `root_cause` tag that feeds into cross-sprint trend analysis via `vbounce trends`.
390
+
176
391
  ---
177
392
 
178
- ### 🧰 The Bundled Skills
179
- V-Bounce OS installs a powerful suite of specialized markdown `skills/` directly into your workspace. These act as modular capabilities you can invoke dynamically or that the Team Lead agent will invoke automatically during the SDLC process:
393
+ ## Skills
394
+
395
+ Skills are modular markdown instructions the Team Lead invokes automatically during the SDLC:
180
396
 
181
- | Skill | Role | Purpose |
182
- |-------|------|---------|
183
- | `agent-team` | Lead | Spawns temporary sub-agents (Dev, QA, DevOps) to parallelize complex tasks without losing context. |
184
- | `doc-manager` | All | Enforces the strict hierarchy for managing Epic and Story documents *(Charter is optional, used only for new projects or brainstorming)*. |
185
- | `lesson` | Lead | Extracts mistakes made during Sprints and updates `LESSONS.md` to prevent future regressions. |
186
- | `react-best-practices` | Developer | A strict set of frontend execution rules the Developer must follow during implementation. <mark>*(Note: This skill serves as a template and must be customized by the human according to the specific tech stack being used.)*</mark> |
187
- | `vibe-code-review` | QA/Architect | Runs distinct review modes (Quick Scan, Deep Audit) to validate code against Acceptance Criteria and Architecture rules. |
188
- | `write-skill` | Lead | Allows the Team Lead to autonomously write and deploy entirely *new* skills if the team repeatedly encounters a novel problem. |
189
- | `improve` | Lead | The framework's self-improvement loop. Reads agent friction signals from sprint retros and proposes targeted changes to templates, skills, brain files, and scripts — with human approval. |
397
+ | Skill | Purpose |
398
+ |-------|---------|
399
+ | `agent-team` | Spawns temporary sub-agents (Dev, QA, Architect, DevOps, Scribe) to parallelize work |
400
+ | `doc-manager` | Enforces the document hierarchy for Epics and Stories |
401
+ | `lesson` | Extracts mistakes from sprints into `LESSONS.md` |
402
+ | `vibe-code-review` | Runs Quick Scan or Deep Audit against acceptance criteria and architecture rules |
403
+ | `write-skill` | Allows the Team Lead to author new skills when the team encounters a recurring problem |
404
+ | `improve` | Self-improvement loop reads agent friction signals across sprints and proposes framework changes (with your approval) |
405
+ | `react-best-practices` | Example tech-stack skill customize this for your own stack |
190
406
 
191
407
  ---
192
408
 
193
- ## ⚙️ A Skill-Driven Methodology
409
+ ## State Management
410
+
411
+ Sprint state lives in `.bounce/state.json` — a machine-readable snapshot that survives context resets and session interruptions:
412
+
413
+ ```json
414
+ {
415
+ "sprint_id": "S-01",
416
+ "current_phase": "bouncing",
417
+ "stories": {
418
+ "STORY-001-01-login": {
419
+ "state": "Bouncing",
420
+ "qa_bounces": 1,
421
+ "arch_bounces": 0,
422
+ "worktree": ".worktrees/STORY-001-01-login"
423
+ }
424
+ }
425
+ }
426
+ ```
194
427
 
195
- V-Bounce OS enforces a strict hierarchy. No code is written without a plan, and no task is executed without invoking the proper skills.
428
+ When a session starts, the Team Lead reads `state.json` to resume exactly where the sprint left off.
196
429
 
197
- ### 1. Planning Layer
198
- You use the bundled templates to define the work.
199
- `Charter ➔ Roadmap ➔ Epic ➔ Story`
430
+ ---
200
431
 
201
- ### 2. The Bounce Loop (Implementation)
202
- Once a Story is ready, you kick off the AI sprint.
203
- 1. The **Developer** AI writes the code and submits an Implementation Report.
204
- 2. The **QA** AI reads the report and tests it against the Story's requirements. If it fails, it bounces back. (Max 3 attempts before escalating to you).
205
- 3. The **Architect** AI audits the successful QA build against your Safe Zone and Architecture Decision Records (ADRs).
206
- 4. Only when both gates pass does the **DevOps** AI merge the isolated worktree into your main branch.
432
+ ## CLI Reference
207
433
 
208
- ### 3. End of Sprint Reports
209
- When a sprint concludes, V-Bounce OS generates structured reports so human reviewers can audit the work without reading every line of code:
210
- - **Sprint Report**: A comprehensive summary by the Team Lead detailing what was delivered, execution metrics, story results, and a retro of what went wrong.
211
- - **Sprint Release Report**: The DevOps agent's log of the merge process to the main branch, environment changes, and post-merge test validations.
212
- - **Scribe Report**: The Scribe agent's complete audit of which product documentation files were generated, updated, or removed (using `vdoc`) to map the new codebase reality.
434
+ ```bash
435
+ # Sprint lifecycle
436
+ vbounce sprint init S-01 D-01 # Initialize sprint
437
+ vbounce sprint close S-01 # Validate, archive, close
213
438
 
214
- ### 4. Progressive Learning (`LESSONS.md`)
215
- Every time the AI makes a mistake during the Bounce Loop, it flags the issue. During the sprint retrospective, these mistakes are recorded in `LESSONS.md`—a permanent project memory that all agents read *before* writing any future code. **Your AI gets smarter about your specific codebase with every single sprint.**
439
+ # Story lifecycle
440
+ vbounce story complete STORY-ID # Mark story done, update state
441
+
442
+ # State management
443
+ vbounce state show # Print current state
444
+ vbounce state update STORY-ID STATE # Update story state
445
+
446
+ # Context preparation
447
+ vbounce prep sprint S-01 # Sprint context pack
448
+ vbounce prep qa STORY-ID # QA context pack
449
+ vbounce prep arch STORY-ID # Architect context pack
450
+
451
+ # Validation
452
+ vbounce validate report <file> # Validate report YAML
453
+ vbounce validate state # Validate state.json schema
454
+ vbounce validate sprint S-01 # Validate sprint plan
455
+ vbounce validate ready STORY-ID # Pre-bounce readiness gate
456
+
457
+ # Self-improvement
458
+ vbounce trends # Cross-sprint trend analysis
459
+ vbounce suggest S-01 # Generate improvement suggestions
460
+ vbounce improve S-01 # Full self-improvement pipeline
461
+
462
+ # Health check
463
+ vbounce doctor # Verify setup
464
+ ```
216
465
 
217
- ### 5. Self-Improving Framework (`improve` skill)
218
- V-Bounce OS doesn't just improve your code — it improves *itself*. Every agent report includes a **Process Feedback** section where agents flag friction with the framework: a template missing a critical field, a handoff that lost context, a RAG query that returned irrelevant results, or a skill instruction that was unclear.
466
+ ---
219
467
 
220
- These signals are aggregated into the Sprint Report's **Framework Self-Assessment** — categorized by area (Templates, Handoffs, RAG Pipeline, Skills, Process Flow, Tooling) with severity ratings and suggested fixes.
468
+ ## Runtime Structure
221
469
 
222
- After every 2-3 sprints, the Team Lead runs the `improve` skill which:
223
- 1. Reads accumulated friction signals across sprints
224
- 2. Identifies recurring patterns (same complaint from multiple agents = real problem)
225
- 3. Proposes specific, targeted changes to templates, skills, brain files, or scripts
226
- 4. **Applies nothing without your approval** — you review every proposed change
470
+ As you use V-Bounce Engine, the framework creates these directories to manage your sprints:
227
471
 
228
- The result: templates get sharper, handoffs get cleaner, skills get more precise, and the bounce loop gets tighter — all driven by the agents who actually use the framework every day.
472
+ ```
473
+ product_plans/ # Created when you start planning
474
+ strategy/ # Charter, Roadmap, Risk Registry (frozen during sprints)
475
+ backlog/ # Epics and Stories awaiting sprint assignment
476
+ sprints/ # Active sprint workspace (one active at a time)
477
+ hotfixes/ # Emergency fixes that bypass sprint cycles
478
+ archive/ # Completed sprints and Epics (immutable history)
479
+
480
+ .bounce/ # Created on first sprint init
481
+ state.json # Machine-readable sprint state (crash recovery)
482
+ reports/ # QA and Architect bounce reports
483
+ improvement-manifest.json # Machine-readable improvement proposals (auto-generated)
484
+ improvement-suggestions.md # Human-readable suggestions with impact levels (auto-generated)
485
+ improvement-log.md # Applied/rejected/deferred improvement tracking
486
+
487
+ .worktrees/ # Git worktrees for isolated story branches
488
+
489
+ LESSONS.md # Accumulated mistakes — agents read this before coding
490
+ ```
229
491
 
230
492
  ---
231
493
 
232
- ## 🔍 Keywords for Searchability
233
- `ai coding agent` `claude code` `cursor` `github copilot` `gemini` `openai codex` `software development lifecycle` `sdlc` `ai software engineer` `autonomous coding` `agentic framework` `software architecture` `ai team` `vdoc` `ai documentation` `prompt engineering`
494
+ ## Glossary
495
+
496
+ | Term | Definition |
497
+ |------|-----------|
498
+ | **Bounce** | When a story fails a quality gate (QA or Architect) and gets sent back to the Developer for fixes |
499
+ | **Bounce Rate** | Percentage of stories that fail a gate on the first attempt |
500
+ | **Context Loop** | The closed feedback cycle: Plan → Build → Bounce → Document → Learn → next sprint |
501
+ | **Correction Tax** | How much human intervention a story needed — 0% is fully autonomous, 100% means a human rewrote it |
502
+ | **Escalation** | When a story hits the 3-bounce limit and surfaces to a human for intervention |
503
+ | **Gate** | An automated quality checkpoint — QA validates requirements, Architect validates structure |
504
+ | **Hotfix Path** | A fast track for trivial (L1) changes: 1-2 files, no QA/Architect gates, human verifies directly |
505
+ | **L1–L4** | Complexity labels: L1 Trivial, L2 Standard, L3 Complex, L4 Strategic |
506
+ | **Root Cause Tag** | A label on every bounce failure (e.g., `missing_tests`, `adr_violation`) used for trend analysis |
507
+ | **Scribe** | The documentation agent that maps code into semantic product docs |
508
+ | **Sprint Report** | End-of-sprint summary: what shipped, metrics, bounce analysis, lessons, retrospective |
509
+ | **Worktree** | An isolated git checkout where a single story is implemented — prevents cross-story interference |
234
510
 
235
511
  ---
236
512
 
237
- ## 📖 Documentation
238
- - [How to structure an Epic](templates/epic.md)
239
- - [How the Bounce Loop handles Hotfixes](docs/HOTFIX_EDGE_CASES.md)
240
- - [Integrating with vdoc](https://github.com/sandrinio/vdoc)
513
+ ## Documentation
514
+
515
+ - [System Overview with diagrams](OVERVIEW.md)
516
+ - [Epic template and structure](templates/epic.md)
517
+ - [Hotfix edge cases](docs/HOTFIX_EDGE_CASES.md)
518
+ - [vdoc integration](https://github.com/sandrinio/vdoc)
519
+
520
+ ## Contributing
521
+
522
+ Contributions, issues, and feature requests are welcome. Check the [issues page](https://github.com/sandrinio/v-bounce-engine/issues).
241
523
 
242
- ## 🤝 Contributing
243
- Contributions, issues, and feature requests are welcome! Feel free to check the [issues page]().
524
+ ## License
244
525
 
245
- ## 📝 License
246
- This project is [MIT](LICENSE) licensed.
526
+ [MIT](LICENSE)