@sandrinio/vbounce 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +107 -0
  2. package/bin/vbounce.mjs +165 -0
  3. package/brains/AGENTS.md +129 -0
  4. package/brains/CLAUDE.md +146 -0
  5. package/brains/GEMINI.md +134 -0
  6. package/brains/SETUP.md +180 -0
  7. package/brains/claude-agents/architect.md +140 -0
  8. package/brains/claude-agents/developer.md +69 -0
  9. package/brains/claude-agents/devops.md +219 -0
  10. package/brains/claude-agents/qa.md +112 -0
  11. package/brains/claude-agents/scribe.md +141 -0
  12. package/brains/cursor-rules/vbounce-docs.mdc +41 -0
  13. package/brains/cursor-rules/vbounce-process.mdc +45 -0
  14. package/brains/cursor-rules/vbounce-rules.mdc +26 -0
  15. package/package.json +40 -0
  16. package/skills/agent-team/SKILL.md +425 -0
  17. package/skills/doc-manager/SKILL.md +278 -0
  18. package/skills/lesson/SKILL.md +90 -0
  19. package/skills/react-best-practices/SKILL.md +3014 -0
  20. package/skills/react-best-practices/rules/_sections.md +46 -0
  21. package/skills/react-best-practices/rules/_template.md +28 -0
  22. package/skills/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  23. package/skills/react-best-practices/rules/advanced-init-once.md +42 -0
  24. package/skills/react-best-practices/rules/advanced-use-latest.md +39 -0
  25. package/skills/react-best-practices/rules/async-api-routes.md +38 -0
  26. package/skills/react-best-practices/rules/async-defer-await.md +80 -0
  27. package/skills/react-best-practices/rules/async-dependencies.md +51 -0
  28. package/skills/react-best-practices/rules/async-parallel.md +28 -0
  29. package/skills/react-best-practices/rules/async-suspense-boundaries.md +99 -0
  30. package/skills/react-best-practices/rules/bundle-barrel-imports.md +59 -0
  31. package/skills/react-best-practices/rules/bundle-conditional.md +31 -0
  32. package/skills/react-best-practices/rules/bundle-defer-third-party.md +49 -0
  33. package/skills/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  34. package/skills/react-best-practices/rules/bundle-preload.md +50 -0
  35. package/skills/react-best-practices/rules/client-event-listeners.md +74 -0
  36. package/skills/react-best-practices/rules/client-localstorage-schema.md +71 -0
  37. package/skills/react-best-practices/rules/client-passive-event-listeners.md +48 -0
  38. package/skills/react-best-practices/rules/client-swr-dedup.md +56 -0
  39. package/skills/react-best-practices/rules/js-batch-dom-css.md +107 -0
  40. package/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
  41. package/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
  42. package/skills/react-best-practices/rules/js-cache-storage.md +70 -0
  43. package/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
  44. package/skills/react-best-practices/rules/js-early-exit.md +50 -0
  45. package/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
  46. package/skills/react-best-practices/rules/js-index-maps.md +37 -0
  47. package/skills/react-best-practices/rules/js-length-check-first.md +49 -0
  48. package/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
  49. package/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
  50. package/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
  51. package/skills/react-best-practices/rules/rendering-activity.md +26 -0
  52. package/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  53. package/skills/react-best-practices/rules/rendering-conditional-render.md +40 -0
  54. package/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
  55. package/skills/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  56. package/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  57. package/skills/react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
  58. package/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
  59. package/skills/react-best-practices/rules/rendering-usetransition-loading.md +75 -0
  60. package/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
  61. package/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
  62. package/skills/react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
  63. package/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
  64. package/skills/react-best-practices/rules/rerender-functional-setstate.md +74 -0
  65. package/skills/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  66. package/skills/react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
  67. package/skills/react-best-practices/rules/rerender-memo.md +44 -0
  68. package/skills/react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
  69. package/skills/react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
  70. package/skills/react-best-practices/rules/rerender-transitions.md +40 -0
  71. package/skills/react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
  72. package/skills/react-best-practices/rules/server-after-nonblocking.md +73 -0
  73. package/skills/react-best-practices/rules/server-auth-actions.md +96 -0
  74. package/skills/react-best-practices/rules/server-cache-lru.md +41 -0
  75. package/skills/react-best-practices/rules/server-cache-react.md +76 -0
  76. package/skills/react-best-practices/rules/server-dedup-props.md +65 -0
  77. package/skills/react-best-practices/rules/server-parallel-fetching.md +83 -0
  78. package/skills/react-best-practices/rules/server-serialization.md +38 -0
  79. package/skills/vibe-code-review/SKILL.md +70 -0
  80. package/skills/vibe-code-review/references/deep-audit.md +259 -0
  81. package/skills/vibe-code-review/references/pr-review.md +234 -0
  82. package/skills/vibe-code-review/references/quick-scan.md +178 -0
  83. package/skills/vibe-code-review/references/report-template.md +189 -0
  84. package/skills/vibe-code-review/references/trend-check.md +224 -0
  85. package/skills/vibe-code-review/scripts/generate-snapshot.sh +89 -0
  86. package/skills/vibe-code-review/scripts/pr-analyze.sh +180 -0
  87. package/skills/write-skill/SKILL.md +133 -0
  88. package/templates/charter.md +144 -0
  89. package/templates/delivery_plan.md +188 -0
  90. package/templates/epic.md +200 -0
  91. package/templates/hotfix.md +57 -0
  92. package/templates/risk_registry.md +89 -0
  93. package/templates/roadmap.md +176 -0
  94. package/templates/sprint_report.md +151 -0
  95. package/templates/story.md +150 -0
package/README.md ADDED
@@ -0,0 +1,107 @@
1
+ # 🎯 V-Bounce OS
2
+
3
+ **Turn your AI coding assistant into a full engineering team.**
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.*
6
+
7
+ > *Inspired by the work of Cory Hymel*
8
+
9
+ ---
10
+
11
+ ## 💡 The Hook: Why V-Bounce OS?
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.
14
+
15
+ **The core differentiator of V-Bounce OS is the Context Loop: Requirements → Bounce Reports → Product Documentation.**
16
+
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.
18
+
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 (`product_documentation/`)**: 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.
22
+
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.
24
+
25
+ ---
26
+
27
+ ## 🚀 Quick Start
28
+
29
+ One command to install the entire methodology directly into your AI assistant.
30
+
31
+ ```bash
32
+ # For Claude Code
33
+ npx @sandrinio/vbounce install claude
34
+
35
+ # For Cursor
36
+ npx @sandrinio/vbounce install cursor
37
+
38
+ # For Gemini / Antigravity
39
+ npx @sandrinio/vbounce install gemini
40
+
41
+ # For Copilot / VS Code
42
+ npx @sandrinio/vbounce install vscode
43
+
44
+ # For OpenAI Codex
45
+ npx @sandrinio/vbounce install codex
46
+ ```
47
+
48
+ ### What gets installed?
49
+ - **Agent Instructions:** The "Brain" file (e.g., `CLAUDE.md`, `.cursor/rules/`) that teaches your AI how to follow the V-Bounce process.
50
+ - **Templates:** Markdown templates for your Charter, Roadmap, Epics, and Stories.
51
+ - **vdoc Integration:** Fully bundled with [`@sandrinio/vdoc`](https://github.com/sandrinio/vdoc) to automatically construct the `vdocs/` semantic documentation folder.
52
+
53
+ ### 🧰 The Bundled Skills
54
+ 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:
55
+
56
+ | Skill | Role | Purpose |
57
+ |-------|------|---------|
58
+ | `agent-team` | Lead | Spawns temporary sub-agents (Dev, QA, DevOps) to parallelize complex tasks without losing context. |
59
+ | `doc-manager` | All | Enforces the strict hierarchy for managing Epic and Story documents *(Charter is optional, used only for new projects or brainstorming)*. |
60
+ | `lesson` | Lead | Extracts mistakes made during Sprints and updates `LESSONS.md` to prevent future regressions. |
61
+ | `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> |
62
+ | `vibe-code-review` | QA/Architect | Runs distinct review modes (Quick Scan, Deep Audit) to validate code against Acceptance Criteria and Architecture rules. |
63
+ | `write-skill` | Lead | Allows the Team Lead to autonomously write and deploy entirely *new* skills if the team repeatedly encounters a novel problem. |
64
+
65
+ ---
66
+
67
+ ## ⚙️ A Skill-Driven Methodology
68
+
69
+ V-Bounce OS enforces a strict hierarchy. No code is written without a plan, and no task is executed without invoking the proper skills.
70
+
71
+ ### 1. Planning Layer
72
+ You use the bundled templates to define the work.
73
+ `Charter ➔ Roadmap ➔ Epic ➔ Story`
74
+
75
+ ### 2. The Bounce Loop (Implementation)
76
+ Once a Story is ready, you kick off the AI sprint.
77
+ 1. The **Developer** AI writes the code and submits an Implementation Report.
78
+ 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).
79
+ 3. The **Architect** AI audits the successful QA build against your Safe Zone and Architecture Decision Records (ADRs).
80
+ 4. Only when both gates pass does the **DevOps** AI merge the isolated worktree into your main branch.
81
+
82
+ ### 3. End of Sprint Reports
83
+ When a sprint concludes, V-Bounce OS generates structured reports so human reviewers can audit the work without reading every line of code:
84
+ - **Sprint Report**: A comprehensive summary by the Team Lead detailing what was delivered, execution metrics, story results, and a retro of what went wrong.
85
+ - **Sprint Release Report**: The DevOps agent's log of the merge process to the main branch, environment changes, and post-merge test validations.
86
+ - **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.
87
+
88
+ ### 4. Progressive Learning (`LESSONS.md`)
89
+ 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.**
90
+
91
+ ---
92
+
93
+ ## 🔍 Keywords for Searchability
94
+ `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`
95
+
96
+ ---
97
+
98
+ ## 📖 Documentation
99
+ - [How to structure an Epic](templates/epic.md)
100
+ - [How the Bounce Loop handles Hotfixes](docs/HOTFIX_EDGE_CASES.md)
101
+ - [Integrating with vdoc](https://github.com/sandrinio/vdoc)
102
+
103
+ ## 🤝 Contributing
104
+ Contributions, issues, and feature requests are welcome! Feel free to check the [issues page]().
105
+
106
+ ## 📝 License
107
+ This project is [MIT](LICENSE) licensed.
@@ -0,0 +1,165 @@
1
+ #!/usr/bin/env node
2
+
3
+ import fs from 'fs';
4
+ import path from 'path';
5
+ import { fileURLToPath } from 'url';
6
+ import readline from 'readline';
7
+
8
+ const __filename = fileURLToPath(import.meta.url);
9
+ const __dirname = path.dirname(__filename);
10
+ const pkgRoot = path.join(__dirname, '..');
11
+
12
+ const args = process.argv.slice(2);
13
+ const command = args[0];
14
+ const targetPlatform = args[1]?.toLowerCase();
15
+
16
+ if (command === '-v' || command === '--version') {
17
+ const pkgPath = path.join(pkgRoot, 'package.json');
18
+ if (fs.existsSync(pkgPath)) {
19
+ const pkgInfo = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
20
+ console.log(`v${pkgInfo.version}`);
21
+ } else {
22
+ console.log('Version information unavailable.');
23
+ }
24
+ process.exit(0);
25
+ }
26
+
27
+ // Utility for interactive prompt
28
+ const rl = readline.createInterface({
29
+ input: process.stdin,
30
+ output: process.stdout
31
+ });
32
+
33
+ const askQuestion = (query) => new Promise(resolve => rl.question(query, resolve));
34
+
35
+ function displayHelp() {
36
+ console.log(`
37
+ 🎯 V-Bounce OS Installer
38
+
39
+ Usage:
40
+ npx vbounce install <platform>
41
+
42
+ Supported Platforms:
43
+ claude : Installs CLAUDE.md and Claude Code subagents
44
+ cursor : Installs modular .cursor/rules/
45
+ gemini : Installs GEMINI.md and Antigravity skills
46
+ codex : Installs AGENTS.md for OpenAI Codex
47
+ vscode : Installs standard system prompt for Copilot
48
+ copilot : Alias for vscode
49
+ `);
50
+ process.exit(0);
51
+ }
52
+
53
+ if (!command || command !== 'install' || !targetPlatform) {
54
+ displayHelp();
55
+ }
56
+
57
+ const CWD = process.cwd();
58
+
59
+ const platformMappings = {
60
+ claude: [
61
+ { src: 'brains/CLAUDE.md', dest: 'CLAUDE.md' },
62
+ { src: 'brains/claude-agents', dest: '.claude/agents' },
63
+ { src: 'templates', dest: 'templates' },
64
+ { src: 'skills', dest: 'skills' }
65
+ ],
66
+ cursor: [
67
+ { src: 'brains/cursor-rules', dest: '.cursor/rules' },
68
+ { src: 'templates', dest: 'templates' },
69
+ { src: 'skills', dest: 'skills' }
70
+ ],
71
+ gemini: [
72
+ { src: 'brains/GEMINI.md', dest: 'GEMINI.md' },
73
+ { src: 'templates', dest: 'templates' },
74
+ { src: 'skills', dest: 'skills' },
75
+ { src: 'skills', dest: '.agents/skills' }
76
+ ],
77
+ codex: [
78
+ { src: 'brains/AGENTS.md', dest: 'AGENTS.md' },
79
+ { src: 'templates', dest: 'templates' },
80
+ { src: 'skills', dest: 'skills' }
81
+ ],
82
+ vscode: [
83
+ { src: 'brains/CLAUDE.md', dest: '.github/copilot-instructions.md' },
84
+ { src: 'templates', dest: 'templates' },
85
+ { src: 'skills', dest: 'skills' }
86
+ ],
87
+ copilot: [
88
+ { src: 'brains/CLAUDE.md', dest: '.github/copilot-instructions.md' },
89
+ { src: 'templates', dest: 'templates' },
90
+ { src: 'skills', dest: 'skills' }
91
+ ]
92
+ };
93
+
94
+ const mapping = platformMappings[targetPlatform];
95
+
96
+ if (!mapping) {
97
+ console.error(`Error: Unsupported platform '${targetPlatform}'.\n`);
98
+ displayHelp();
99
+ }
100
+
101
+ console.log(`\n🚀 Preparing to install V-Bounce OS for \x1b[36m${targetPlatform}\x1b[0m...\n`);
102
+
103
+ const toCopy = [];
104
+ const toOverwrite = [];
105
+
106
+ mapping.forEach(rule => {
107
+ const sourcePath = path.join(pkgRoot, rule.src);
108
+ const destPath = path.join(CWD, rule.dest);
109
+
110
+ if (!fs.existsSync(sourcePath)) {
111
+ return; // Source does not exist internally, skip
112
+ }
113
+
114
+ if (fs.existsSync(destPath)) {
115
+ toOverwrite.push(rule.dest);
116
+ } else {
117
+ toCopy.push(rule.dest);
118
+ }
119
+ });
120
+
121
+ if (toCopy.length > 0) {
122
+ console.log('The following will be \x1b[32mCREATED\x1b[0m:');
123
+ toCopy.forEach(f => console.log(` + ${f}`));
124
+ }
125
+
126
+ if (toOverwrite.length > 0) {
127
+ console.log('\nThe following will be \x1b[33mOVERWRITTEN\x1b[0m:');
128
+ toOverwrite.forEach(f => console.log(` ! ${f}`));
129
+ }
130
+
131
+ console.log('');
132
+
133
+ askQuestion('Proceed with installation? [y/N] ').then(answer => {
134
+ rl.close();
135
+ const confirmation = answer.trim().toLowerCase();
136
+
137
+ if (confirmation !== 'y' && confirmation !== 'yes') {
138
+ console.log('\n❌ Installation cancelled.\n');
139
+ process.exit(0);
140
+ }
141
+
142
+ console.log('\n📦 Installing files...');
143
+
144
+ mapping.forEach(rule => {
145
+ const sourcePath = path.join(pkgRoot, rule.src);
146
+ const destPath = path.join(CWD, rule.dest);
147
+
148
+ if (!fs.existsSync(sourcePath)) return;
149
+
150
+ const stats = fs.statSync(sourcePath);
151
+ if (stats.isDirectory()) {
152
+ fs.mkdirSync(destPath, { recursive: true });
153
+ fs.cpSync(sourcePath, destPath, { recursive: true, force: true });
154
+ } else {
155
+ const destDir = path.dirname(destPath);
156
+ if (!fs.existsSync(destDir)) {
157
+ fs.mkdirSync(destDir, { recursive: true });
158
+ }
159
+ fs.copyFileSync(sourcePath, destPath);
160
+ }
161
+ console.log(` \x1b[32m✓\x1b[0m ${rule.dest}`);
162
+ });
163
+
164
+ console.log('\n✅ V-Bounce OS successfully installed! Welcome to the team.\n');
165
+ });
@@ -0,0 +1,129 @@
1
+ # V-Bounce OS — Agent Brain (Codex CLI)
2
+
3
+ > This file configures OpenAI Codex CLI to operate within the V-Bounce OS framework.
4
+
5
+ ## Identity
6
+
7
+ You are an AI coding agent operating within **V-Bounce OS** — a structured system for planning, implementing, and validating software using AI agents. You work as part of a team: Team Lead, Developer, QA, Architect, DevOps, and Scribe agents collaborate through structured reports.
8
+
9
+ 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
+
11
+ ## Skills
12
+
13
+ Skills are in the `skills/` directory. Each skill has a `SKILL.md` with instructions. Read the relevant SKILL.md before performing any skill-related task.
14
+
15
+ | Skill | Purpose | Used By |
16
+ |-------|---------|---------|
17
+ | `skills/agent-team/` | Subagent orchestration and delegation | Team Lead |
18
+ | `skills/doc-manager/` | Document hierarchy navigation and lifecycle | Team Lead, all agents |
19
+ | `skills/lesson/` | Recording project-specific mistakes and rules | All agents (read), Team Lead (write) |
20
+ | `skills/react-best-practices/` | Frontend coding patterns and anti-patterns | Developer |
21
+ | `skills/vibe-code-review/` | Code quality review (4 modes) | QA, Architect |
22
+ | `skills/write-skill/` | Creating and refining agent skills | Team Lead |
23
+
24
+ ## The V-Bounce Process
25
+
26
+ ### Phase 1: Verification (Planning)
27
+ Documents are created in strict hierarchy — no level can be skipped:
28
+ Charter (why) → Roadmap (strategic what/when) → Epic (detailed what) → Story (how) → Delivery Plan (execution) → Risk Registry (risks)
29
+
30
+ ### Pre-Bounce Checks
31
+ Before starting any sprint, the Team Lead MUST:
32
+ - **Triage the Request**: Is this an L1 Trivial change (1-2 files, cosmetic/minor)?
33
+ - If YES → Use the **Hotfix Path** (create a Hotfix document, bypass Epic/Story).
34
+ - If NO → Use the **Standard Path** (create/find Epic, Story).
35
+ - Read RISK_REGISTRY.md — flag high-severity risks that affect planned stories.
36
+ - Read DELIVERY_PLAN.md §5 Open Questions — do not bounce stories with unresolved blocking questions.
37
+ - If product_documentation/_manifest.json exists, read it — understand what's documented, pass relevant doc references to agents.
38
+
39
+ ### Phase 2: The Bounce (Implementation)
40
+ **Standard Path (L2-L4 Stories):**
41
+ 1. Team Lead sends Story context pack to Developer.
42
+ 2. Developer reads LESSONS.md, implements code, writes Implementation Report.
43
+ 3. QA runs Quick Scan + PR Review, validates against Story §2 The Truth. If fail → Bug Report to Dev.
44
+ 4. Dev fixes and resubmits. 3+ failures → Escalated.
45
+ 5. Architect runs Deep Audit + Trend Check, validates Safe Zone compliance and ADR adherence.
46
+ 6. DevOps merges story branch into sprint branch, validates post-merge, handles release tagging.
47
+ 7. Team Lead consolidates reports into Sprint Report.
48
+
49
+ **Hotfix Path (L1 Trivial Tasks):**
50
+ 1. Team Lead evaluates request and creates `HOTFIX-{Date}-{Name}.md`.
51
+ 2. Developer reads LESSONS.md and Hotfix spec, makes the targeted change (max 1-2 files).
52
+ 3. Developer runs `./scripts/hotfix_manager.sh ledger "{Title}" "{Description}"`.
53
+ 4. Human/Team Lead manually verifies the fix. QA/Architect bounce loops are bypassed.
54
+ 5. Hotfix is merged directly into the active branch.
55
+ 6. DevOps (or Team Lead) runs `./scripts/hotfix_manager.sh sync` to update active worktrees.
56
+
57
+ ### Phase 3: Review
58
+ Sprint Report → Human review → Delivery Plan updated → Lessons recorded → Next sprint.
59
+ If sprint delivered new features or Dev reports flagged stale product docs → spawn Scribe agent to generate/update product_documentation/ via vdoc.
60
+
61
+ ## Story States
62
+
63
+ Draft → Refinement → Ready to Bounce → Bouncing → QA Passed → Architect Passed → Sprint Review → Done
64
+ Refinement → Probing/Spiking → Refinement (L4 spike loop)
65
+ Any → Parking Lot (deferred)
66
+ Bouncing → Escalated (3+ failures)
67
+
68
+ ## Complexity Labels
69
+
70
+ - L1: Trivial — Single file, <1hr, known pattern.
71
+ - L2: Standard — 2-3 files, known pattern, ~2-4hr. (default)
72
+ - L3: Complex — Cross-cutting, spike may be needed, ~1-2 days.
73
+ - L4: Uncertain — Requires Probing/Spiking before Bounce, >2 days.
74
+
75
+ ## Critical Rules
76
+
77
+ ### Before Writing Code
78
+ 1. Read LESSONS.md at the project root. Every time. No exceptions.
79
+ 2. Read the Story spec (§1 The Spec + §3 Implementation Guide). Do not infer requirements.
80
+ 3. Check ADRs in the Roadmap (§3). Comply with recorded architecture decisions.
81
+
82
+ ### During Implementation
83
+ 4. Follow the Safe Zone. No new patterns or libraries without Architect approval.
84
+ 5. No Gold-Plating. Implement exactly what the Story specifies.
85
+ 6. Self-assess Correction Tax. Track % human intervention.
86
+
87
+ ### After Implementation
88
+ 7. Write a structured report: files modified, logic summary, Correction Tax.
89
+ 8. Flag lessons. Gotchas and multi-attempt fixes get flagged for recording.
90
+
91
+ ### Always
92
+ 9. Reports are the only handoff. No direct agent-to-agent communication.
93
+ 10. One source of truth. Reference upstream documents, don't duplicate.
94
+ 11. Change Logs are mandatory on every document modification.
95
+
96
+ ## Framework Structure
97
+
98
+ ```
99
+ V-Bounce OS/
100
+ ├── brains/ — Agent brain files (this file)
101
+ ├── templates/ — Document templates (immutable)
102
+ ├── skills/ — Agent skills (SKILL.md files)
103
+ ├── scripts/ — Automation scripts (e.g., hotfix_manager.sh)
104
+ └── docs/ — Reference docs (e.g., HOTFIX_EDGE_CASES.md)
105
+ ```
106
+
107
+ ## Document Locations
108
+
109
+ Planning docs live in `product_plans/`. Each delivery (= release) gets a folder. Epics are subfolders. Stories live with their Epic. Completed deliveries archived to `product_plans/archive/`.
110
+
111
+ | Document | Output |
112
+ |----------|--------|
113
+ | Charter | `product_plans/{project}_charter.md` |
114
+ | Roadmap | `product_plans/{project}_roadmap.md` |
115
+ | Risk Registry | `product_plans/RISK_REGISTRY.md` |
116
+ | Delivery Plan | `product_plans/{delivery}/DELIVERY_PLAN.md` |
117
+ | Epic | `product_plans/{delivery}/EPIC-{NNN}_{name}/EPIC-{NNN}.md` |
118
+ | Story | `product_plans/{delivery}/EPIC-{NNN}_{name}/STORY-{EpicID}-{StoryID}.md` |
119
+ | Sprint Report | `.bounce/sprint-report.md` |
120
+ | Product Docs | `product_documentation/*.md` + `_manifest.json` |
121
+
122
+ ## Report Formats
123
+
124
+ Dev Report: Files modified, logic summary, Correction Tax, lessons flagged, product docs affected.
125
+ QA Report: Pass/fail, bug descriptions, Gold-Plating audit, plain-language explanations.
126
+ Architect Report: Compliance score, ADR check, AI-ism findings, regression assessment, refactors.
127
+ DevOps Report: Merge status, conflict resolution, post-merge validation, environment changes, deployment status.
128
+ Scribe Report: Mode (init/audit/create), docs created/updated/removed, coverage assessment, accuracy check.
129
+ Sprint Report: What was delivered (user-facing vs internal), story results, execution metrics (tokens, duration, cost, bounces, correction tax), lessons, retrospective (what went well, what didn't, process improvements).
@@ -0,0 +1,146 @@
1
+ # V-Bounce OS — Agent Brain
2
+
3
+ > This file configures Claude Code to operate within the V-Bounce OS framework.
4
+
5
+ ## Identity
6
+
7
+ You are an AI coding agent operating within **V-Bounce OS** — a structured system for planning, implementing, and validating software using AI agents. You work as part of a team: Team Lead, Developer, QA, Architect, DevOps, and Scribe agents collaborate through structured reports.
8
+
9
+ 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
+
11
+ ## Skills
12
+
13
+ @skills/agent-team/SKILL.md
14
+ @skills/doc-manager/SKILL.md
15
+ @skills/lesson/SKILL.md
16
+ @skills/react-best-practices/SKILL.md
17
+ @skills/vibe-code-review/SKILL.md
18
+ @skills/write-skill/SKILL.md
19
+
20
+ ## Subagents
21
+
22
+ Specialized agents are defined in `.claude/agents/` and spawned via the Task tool:
23
+
24
+ | Agent | Config | Role |
25
+ |-------|--------|------|
26
+ | Developer | `.claude/agents/developer.md` | Implements features. Tools: Read, Edit, Write, Bash, Glob, Grep |
27
+ | QA | `.claude/agents/qa.md` | Validates against acceptance criteria. Tools: Read, Bash, Glob, Grep (no Edit/Write) |
28
+ | Architect | `.claude/agents/architect.md` | Audits structure and compliance. Tools: Read, Glob, Grep, Bash (no Edit/Write) |
29
+ | DevOps | `.claude/agents/devops.md` | Merges, deploys, infra checks. Tools: Read, Edit, Write, Bash, Glob, Grep |
30
+ | Scribe | `.claude/agents/scribe.md` | Product documentation generation. Tools: Read, Write, Bash, Glob, Grep |
31
+
32
+ Deploy from: `brains/claude-agents/` → `.claude/agents/`
33
+
34
+ Reports flow through `.bounce/reports/` — see agent-team skill for the full orchestration protocol.
35
+
36
+ ## The V-Bounce Process
37
+
38
+ ### Phase 1: Verification (Planning)
39
+ Documents are created in strict hierarchy — no level can be skipped:
40
+ Charter (why) → Roadmap (strategic what/when) → Epic (detailed what) → Story (how) → Delivery Plan (execution) → Risk Registry (risks)
41
+
42
+ ### Pre-Bounce Checks
43
+ Before starting any sprint, the Team Lead MUST:
44
+ - **Triage the Request**: Is this an L1 Trivial change (1-2 files, cosmetic/minor)?
45
+ - If YES → Use the **Hotfix Path** (create a Hotfix document, bypass Epic/Story).
46
+ - If NO → Use the **Standard Path** (create/find Epic, Story).
47
+ - Read RISK_REGISTRY.md — flag high-severity risks that affect planned stories.
48
+ - Read DELIVERY_PLAN.md §5 Open Questions — do not bounce stories with unresolved blocking questions.
49
+ - If `product_documentation/_manifest.json` exists, read it — understand what's documented, pass relevant doc references to agents, and track what may become stale.
50
+
51
+ ### Phase 2: The Bounce (Implementation)
52
+ **Standard Path (L2-L4 Stories):**
53
+ 1. Team Lead sends Story context pack to Developer.
54
+ 2. Developer reads LESSONS.md, implements code, writes Implementation Report.
55
+ 3. QA runs Quick Scan + PR Review, validates against Story §2 The Truth. If fail → Bug Report to Dev.
56
+ 4. Dev fixes and resubmits. 3+ failures → Escalated.
57
+ 5. Architect runs Deep Audit + Trend Check, validates Safe Zone compliance and ADR adherence.
58
+ 6. DevOps merges story branch into sprint branch, validates post-merge, handles release tagging.
59
+ 7. Team Lead consolidates reports into Sprint Report.
60
+
61
+ **Hotfix Path (L1 Trivial Tasks):**
62
+ 1. Team Lead evaluates request and creates `HOTFIX-{Date}-{Name}.md`.
63
+ 2. Developer reads LESSONS.md and Hotfix spec, makes the targeted change (max 1-2 files).
64
+ 3. Developer runs `./scripts/hotfix_manager.sh ledger "{Title}" "{Description}"`.
65
+ 4. Human/Team Lead manually verifies the fix. QA/Architect bounce loops are bypassed.
66
+ 5. Hotfix is merged directly into the active branch.
67
+ 6. DevOps (or Team Lead) runs `./scripts/hotfix_manager.sh sync` to update active worktrees.
68
+
69
+ ### Phase 3: Review
70
+ Sprint Report → Human review → Delivery Plan updated → Lessons recorded → Next sprint.
71
+ If sprint delivered new features or Developer reports flagged stale product docs → spawn Scribe agent to generate/update product_documentation/ via vdoc.
72
+
73
+ ## Story States
74
+
75
+ ```
76
+ Draft → Refinement → Ready to Bounce → Bouncing → QA Passed → Architect Passed → Sprint Review → Done
77
+ ↳ Refinement → Probing/Spiking → Refinement (L4 spike loop)
78
+ ↳ Any → Parking Lot (deferred)
79
+ ↳ Bouncing → Escalated (3+ failures)
80
+ ```
81
+
82
+ ## Complexity Labels
83
+
84
+ - **L1**: Trivial — Single file, <1hr, known pattern.
85
+ - **L2**: Standard — 2-3 files, known pattern, ~2-4hr. *(default)*
86
+ - **L3**: Complex — Cross-cutting, spike may be needed, ~1-2 days.
87
+ - **L4**: Uncertain — Requires Probing/Spiking before Bounce, >2 days.
88
+
89
+ ## Critical Rules
90
+
91
+ ### Before Writing Code
92
+ 1. **Read LESSONS.md** at the project root. Every time. No exceptions.
93
+ 2. **Read the Story spec** (§1 The Spec + §3 Implementation Guide). Do not infer requirements.
94
+ 3. **Check ADRs** in the Roadmap (§3). Comply with recorded architecture decisions.
95
+
96
+ ### During Implementation
97
+ 4. **Follow the Safe Zone**. No new patterns or libraries without Architect approval.
98
+ 5. **No Gold-Plating**. Implement exactly what the Story specifies.
99
+ 6. **Self-assess Correction Tax**. Track % human intervention.
100
+
101
+ ### After Implementation
102
+ 7. **Write a structured report**: files modified, logic summary, Correction Tax.
103
+ 8. **Flag lessons**. Gotchas and multi-attempt fixes get flagged for recording.
104
+
105
+ ### Always
106
+ 9. **Reports are the only handoff**. No direct agent-to-agent communication.
107
+ 10. **One source of truth**. Reference upstream documents, don't duplicate.
108
+ 11. **Change Logs are mandatory** on every document modification.
109
+
110
+ ## Framework Structure
111
+
112
+ ```
113
+ V-Bounce OS/
114
+ ├── brains/ — Agent brain files (this file)
115
+ ├── templates/ — Document templates (immutable)
116
+ ├── skills/ — Agent skills (SKILL.md files)
117
+ ├── scripts/ — Automation scripts (e.g., hotfix_manager.sh)
118
+ └── docs/ — Reference docs (e.g., HOTFIX_EDGE_CASES.md)
119
+ ```
120
+
121
+ ## Document Locations
122
+
123
+ All planning documents live in `product_plans/`. Each delivery (= Roadmap Release) gets its own folder. Epics are subfolders. Stories live inside their parent Epic folder.
124
+
125
+ | Document | Template | Output |
126
+ |----------|----------|--------|
127
+ | Charter | `templates/charter.md` | `product_plans/{project}_charter.md` |
128
+ | Roadmap | `templates/roadmap.md` | `product_plans/{project}_roadmap.md` |
129
+ | Risk Registry | `templates/risk_registry.md` | `product_plans/RISK_REGISTRY.md` |
130
+ | Delivery Plan | `templates/delivery_plan.md` | `product_plans/{delivery}/DELIVERY_PLAN.md` |
131
+ | Epic | `templates/epic.md` | `product_plans/{delivery}/EPIC-{NNN}_{name}/EPIC-{NNN}.md` |
132
+ | Story | `templates/story.md` | `product_plans/{delivery}/EPIC-{NNN}_{name}/STORY-{EpicID}-{StoryID}.md` |
133
+ | Sprint Report | `templates/sprint_report.md` | `.bounce/sprint-report.md` |
134
+ | Product Docs | (generated by vdoc) | `product_documentation/*.md` |
135
+ | Doc Manifest | (generated by vdoc) | `product_documentation/_manifest.json` |
136
+
137
+ Completed deliveries are archived to `product_plans/archive/` and logged in Roadmap §7 Delivery Log.
138
+
139
+ ## Report Formats
140
+
141
+ **Dev Report**: Files modified, logic summary, Correction Tax, lessons flagged, product docs affected.
142
+ **QA Report**: Pass/fail, bug descriptions, Gold-Plating audit, plain-language explanations.
143
+ **Architect Report**: Compliance score, ADR check, AI-ism findings, regression assessment, refactors.
144
+ **DevOps Report**: Merge status, conflict resolution, post-merge validation, environment changes, deployment status.
145
+ **Scribe Report**: Mode (init/audit/create), docs created/updated/removed, coverage assessment, accuracy check.
146
+ **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).