@sandrinio/vbounce 1.5.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +108 -18
  2. package/bin/vbounce.mjs +291 -146
  3. package/brains/AGENTS.md +12 -10
  4. package/brains/CHANGELOG.md +99 -1
  5. package/brains/CLAUDE.md +29 -22
  6. package/brains/GEMINI.md +47 -9
  7. package/brains/SETUP.md +11 -5
  8. package/brains/claude-agents/architect.md +22 -6
  9. package/brains/claude-agents/developer.md +2 -2
  10. package/brains/claude-agents/devops.md +3 -0
  11. package/brains/claude-agents/qa.md +25 -9
  12. package/brains/copilot/copilot-instructions.md +49 -0
  13. package/brains/cursor-rules/vbounce-process.mdc +9 -7
  14. package/brains/windsurf/.windsurfrules +30 -0
  15. package/package.json +2 -4
  16. package/scripts/close_sprint.mjs +94 -0
  17. package/scripts/complete_story.mjs +113 -0
  18. package/scripts/doctor.mjs +144 -0
  19. package/scripts/init_gate_config.sh +151 -0
  20. package/scripts/init_sprint.mjs +121 -0
  21. package/scripts/pre_gate_common.sh +576 -0
  22. package/scripts/pre_gate_runner.sh +176 -0
  23. package/scripts/prep_arch_context.mjs +178 -0
  24. package/scripts/prep_qa_context.mjs +134 -0
  25. package/scripts/prep_sprint_context.mjs +118 -0
  26. package/scripts/prep_sprint_summary.mjs +154 -0
  27. package/scripts/sprint_trends.mjs +160 -0
  28. package/scripts/suggest_improvements.mjs +200 -0
  29. package/scripts/update_state.mjs +132 -0
  30. package/scripts/validate_bounce_readiness.mjs +125 -0
  31. package/scripts/validate_report.mjs +39 -2
  32. package/scripts/validate_sprint_plan.mjs +117 -0
  33. package/scripts/validate_state.mjs +99 -0
  34. package/skills/agent-team/SKILL.md +56 -21
  35. package/skills/agent-team/references/cleanup.md +42 -0
  36. package/skills/agent-team/references/delivery-sync.md +43 -0
  37. package/skills/agent-team/references/git-strategy.md +52 -0
  38. package/skills/agent-team/references/mid-sprint-triage.md +71 -0
  39. package/skills/agent-team/references/report-naming.md +34 -0
  40. package/skills/doc-manager/SKILL.md +5 -4
  41. package/skills/improve/SKILL.md +27 -1
  42. package/skills/lesson/SKILL.md +23 -0
  43. package/templates/delivery_plan.md +1 -1
  44. package/templates/hotfix.md +1 -1
  45. package/templates/sprint.md +65 -13
  46. package/templates/sprint_report.md +8 -1
  47. package/templates/story.md +1 -1
  48. package/scripts/pre_bounce_sync.sh +0 -37
  49. package/scripts/vbounce_ask.mjs +0 -98
  50. package/scripts/vbounce_index.mjs +0 -184
package/brains/AGENTS.md CHANGED
@@ -42,14 +42,16 @@ Before starting any sprint, the Team Lead MUST:
42
42
 
43
43
  ### Phase 2: The Bounce (Implementation)
44
44
  **Standard Path (L2-L4 Stories):**
45
- 0. Team Lead runs `./scripts/pre_bounce_sync.sh` to ensure LanceDB RAG context is fresh.
45
+ 0. **Orient via state**: Read `.bounce/state.json` (`vbounce state show`) for instant context. Run `vbounce prep sprint S-{XX}` to generate a fresh context pack.
46
46
  1. Team Lead sends Story context pack to Developer.
47
- 2. Developer queries LanceDB, implements code, writes Implementation Report. CLI Orchestrator must run `./scripts/validate_report.mjs` on the report to enforce YAML strictness.
48
- 3. QA runs Quick Scan + PR Review, validates against Story §2 The Truth. If fail → Bug Report to Dev. CLI Orchestrator must run `./scripts/validate_report.mjs` on the QA report before passing to Architect/Dev.
49
- 4. Dev fixes and resubmits. 3+ failuresEscalated.
50
- 5. Architect runs Deep Audit + Trend Check, validates Safe Zone compliance and ADR adherence.
51
- 6. DevOps merges story branch into sprint branch, validates post-merge, handles release tagging.
52
- 7. Team Lead consolidates reports into Sprint Report.
47
+ 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.
48
+ 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.
49
+ 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.
50
+ 5. Dev fixes and resubmits. 3+ failures Escalated.
51
+ 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.
52
+ 7. Architect runs Deep Audit + Trend Check (skipping pre-scanned checks), validates Safe Zone compliance and ADR adherence.
53
+ 8. DevOps merges story branch into sprint branch, validates post-merge (tests + lint + build), handles release tagging.
54
+ 9. Team Lead consolidates reports into Sprint Report.
53
55
 
54
56
  **Hotfix Path (L1 Trivial Tasks):**
55
57
  1. Team Lead evaluates request and creates `HOTFIX-{Date}-{Name}.md`.
@@ -99,7 +101,7 @@ Bouncing → Escalated (3+ failures)
99
101
  10. One source of truth. Reference upstream documents, don't duplicate.
100
102
  11. Change Logs are mandatory on every document modification.
101
103
  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.
102
- 13. Framework Integrity. Any modification to a `brains/` or `skills/` file MUST be recorded in `brains/CHANGELOG.md` and trigger `./scripts/pre_bounce_sync.sh`.
104
+ 13. Framework Integrity. Any modification to a `brains/` or `skills/` file MUST be recorded in `brains/CHANGELOG.md`.
103
105
 
104
106
  ## Framework Structure
105
107
 
@@ -121,11 +123,11 @@ Planning docs live in `product_plans/`. It uses a state-based architecture (`str
121
123
  | Charter | `product_plans/strategy/{project}_charter.md` |
122
124
  | Roadmap | `product_plans/strategy/{project}_roadmap.md` |
123
125
  | Risk Registry | `product_plans/strategy/RISK_REGISTRY.md` |
124
- | Delivery Plan | `product_plans/strategy/{delivery}_delivery_plan.md` |
126
+ | Delivery Plan | `product_plans/D-{NN}_{release_name}/D-{NN}_DELIVERY_PLAN.md` |
125
127
  | Sprint Plan | `product_plans/sprints/sprint-{XX}/sprint-{XX}.md` |
126
128
  | Epic | `product_plans/backlog/EPIC-{NNN}_{name}/EPIC-{NNN}.md` |
127
129
  | Story | `product_plans/backlog/EPIC-{NNN}_{name}/STORY-{EpicID}-{StoryID}-{StoryName}.md` |
128
- | Sprint Report | `product_plans/sprints/sprint-{XX}/sprint-report.md` |
130
+ | Sprint Report | `.bounce/sprint-report-S-{XX}.md` |
129
131
  | Product Docs | `vdocs/*.md` + `_manifest.json` |
130
132
 
131
133
  ## Report Formats
@@ -1,11 +1,109 @@
1
1
  # V-Bounce OS Brains & Skills Changelog
2
2
 
3
3
  This log tracks modifications to the core agentic framework (e.g., `brains/`, `skills/`).
4
- Per **Rule 13: Framework Integrity**, anytime an entry is made here, the orchestrator MUST trigger `./scripts/pre_bounce_sync.sh` to update the RAG embeddings globally.
4
+ Per **Rule 13: Framework Integrity**, anytime an entry is made here, all tool-specific brain files must be reviewed for consistency.
5
+
6
+ ## [2026-03-12] — LanceDB Removal
7
+
8
+ - **Removed**: `scripts/vbounce_ask.mjs` — LanceDB semantic query tool. Replaced by direct `LESSONS.md` reads.
9
+ - **Removed**: `scripts/vbounce_index.mjs` — LanceDB indexer. No longer needed.
10
+ - **Removed**: `scripts/pre_bounce_sync.sh` — RAG sync script. No longer needed.
11
+ - **Modified**: `package.json` — Removed `@lancedb/lancedb` and `@xenova/transformers` dependencies. Only `js-yaml`, `marked`, `commander` remain.
12
+ - **Modified**: `bin/vbounce.mjs` — Removed `vbounce sync` command; simplified `install` to not run RAG init or install embedding deps.
13
+ - **Modified**: `brains/CLAUDE.md`, `brains/AGENTS.md`, `brains/GEMINI.md`, `brains/cursor-rules/vbounce-process.mdc` — Phase 2 Step 0 now reads state.json + runs `vbounce prep sprint` instead of `pre_bounce_sync.sh`; Step 2 now says "read LESSONS.md" instead of "query LanceDB".
14
+ - **Modified**: `brains/claude-agents/developer.md`, `qa.md`, `architect.md` — "Before" steps now read LESSONS.md directly instead of calling `vbounce_ask.mjs`.
15
+ - **Modified**: `brains/SETUP.md` — Step 7 rewritten as "Initialize Your First Sprint" (`vbounce sprint init`, `vbounce doctor`, `vbounce prep sprint`).
16
+ - **Modified**: `brains/CHANGELOG.md` Rule 13 — Removed `pre_bounce_sync.sh` trigger; only CHANGELOG.md update required.
17
+ - **Modified**: `templates/story.md`, `templates/hotfix.md` — Framework Integrity checklist item no longer mentions `pre_bounce_sync.sh`.
18
+ - **Modified**: `scripts/doctor.mjs` — Removed `pre_bounce_sync.sh` from required scripts list (now 15 scripts).
19
+ - **Modified**: `skills/improve/SKILL.md` — "RAG Pipeline" area renamed to "Context Prep" pointing to prep scripts.
20
+ - **Modified**: `README.md` — Removed "Semantic Context (Local RAG)" section; updated Tech Stack to reflect file-based context model; updated CLI reference.
21
+ - **Modified**: `.gitignore` — Removed `.bounce/.lancedb/` entry.
22
+ - **Rationale**: Modern LLMs have 200K+ token context windows. The prep scripts (`vbounce prep sprint/qa/arch`) + LESSONS.md graduation provide targeted, deterministic context without embedding models, sync steps, or heavy dependencies. Removes ~50MB of node_modules and eliminates the most common setup failure point.
23
+
24
+ ## [2026-03-12] — V-Bounce OS Optimization Plan (12-Change Batch)
25
+
26
+ ### State Management (Change #1)
27
+ - **Added**: `.bounce/state.json` — machine-readable sprint state snapshot for crash recovery. Tracks sprint_id, delivery_id, current_phase, last_action, and per-story state (V-Bounce state, bounce counts, worktree path, updated_at).
28
+ - **Added**: `scripts/validate_state.mjs` — schema validator for state.json; exports `validateState(obj)` function with strict checks on format, enum values, and cross-field consistency.
29
+ - **Added**: `scripts/update_state.mjs` — atomic state.json updater; supports `--qa-bounce`, `--arch-bounce`, `--set-phase`, `--set-action`, `--show` flags; calls validateState after every write.
30
+ - **Modified**: `brains/CLAUDE.md` Phase 2 Step 0 — updated to "Orient via state: Read `.bounce/state.json`" for instant context recovery.
31
+ - **Modified**: `brains/GEMINI.md` Phase 2 Step 0 — same state.json orientation update.
32
+
33
+ ### Sprint Scripts (Change #2)
34
+ - **Added**: `scripts/init_sprint.mjs` — creates `.bounce/` dir, state.json (stories in Draft), sprint plan dir, copies template; prints git commands.
35
+ - **Added**: `scripts/close_sprint.mjs` — validates terminal states, archives sprint report, updates state.json, prints manual steps.
36
+ - **Added**: `scripts/complete_story.mjs` — updates state.json to Done, updates sprint plan §1 V-Bounce State, appends row to §4 Execution Log via `<!-- EXECUTION_LOG_START -->` anchor.
37
+
38
+ ### Sprint Plan as Accumulator (Change #3)
39
+ - **Modified**: `templates/sprint.md` — added `delivery` frontmatter field; new §2 Execution Strategy with phase plan and risk flags; Context Pack Readiness checklists in §1; §4 Execution Log with `<!-- EXECUTION_LOG_START -->` / `<!-- EXECUTION_LOG_END -->` anchors.
40
+ - **Added**: `scripts/validate_sprint_plan.mjs` — validates sprint plan YAML frontmatter, §1 table structure, cross-checks story IDs with state.json, checks §4 on Completed sprints.
41
+
42
+ ### Richer YAML in Agent Reports (Change #4)
43
+ - **Modified**: `brains/claude-agents/qa.md` — FAIL report template now includes `bugs:` array (scenario/expected/actual/files/severity) and `gold_plating:` array in YAML frontmatter; added `template_version: "2.0"` to both PASS and FAIL templates. Markdown body is now narrative-only expansion.
44
+ - **Modified**: `brains/claude-agents/architect.md` — FAIL report template now includes `failures:` array (dimension/severity/what_wrong/fix_required) in YAML frontmatter; added `template_version: "2.0"` to both PASS and FAIL templates.
45
+ - **Modified**: `scripts/validate_report.mjs` — added `validateBugsArray()` and `validateFailuresArray()` helpers; QA FAIL validates `bugs[]` structure when present; Arch FAIL validates `failures[]` structure when present; added `ROOT_CAUSE_ENUM` validation for both QA and Arch FAIL reports.
46
+
47
+ ### Validation Layer (Change #9)
48
+ - **Added**: `scripts/validate_bounce_readiness.mjs` — pre-bounce gate; checks story state, sprint plan, story spec, required sections, worktree existence; exits 1 on any failure.
49
+ - **Added**: `scripts/validate_sprint_plan.mjs` — validates sprint plan structure and cross-references.
50
+
51
+ ### Context Management (Change #12)
52
+ - **Added**: `scripts/prep_sprint_context.mjs` — generates `.bounce/sprint-context-S-XX.md`; reads state.json (required), sprint plan, LESSONS.md (first 50 lines), RISK_REGISTRY; MAX_CONTEXT_LINES=200.
53
+ - **Added**: `scripts/prep_qa_context.mjs` — generates `.bounce/qa-context-STORY-ID.md`; exits 1 if dev report or story spec missing; MAX_CONTEXT_LINES=300.
54
+ - **Added**: `scripts/prep_arch_context.mjs` — generates `.bounce/arch-context-STORY-ID.md`; exits 1 if dev report/story spec missing; git diff truncated at MAX_DIFF_LINES=500.
55
+ - **Added**: `scripts/prep_sprint_summary.mjs` — generates `.bounce/sprint-summary-S-XX.md` from archived reports.
56
+ - **Added**: `vbounce.config.json` — `{ maxDiffLines: 500, maxContextLines: 200, maxQaContextLines: 300, contextBudgetWarningTokens: 12000, lessonStaleDays: 90, tool: "claude" }`.
57
+ - **Modified**: `brains/CLAUDE.md` Skills section — agent-team + lesson always-loaded; other skills moved to on-demand; context budget note added.
58
+
59
+ ### Self-Improvement Loop (Change #10)
60
+ - **Added**: `scripts/sprint_trends.mjs` — scans `.bounce/archive/` dirs; computes per-sprint first-pass rate, avg bounces, correction tax, root_cause breakdown; generates `.bounce/trends.md`.
61
+ - **Added**: `scripts/suggest_improvements.mjs` — reads trends.md, LESSONS.md, improvement-log.md; flags stale lessons (>90 days), low first-pass rate, high correction tax; generates `.bounce/improvement-suggestions.md`.
62
+ - **Added**: `.bounce/improvement-log.md` — Applied/Rejected/Deferred tracking table.
63
+ - **Modified**: `brains/CLAUDE.md` Phase 3 — added `vbounce trends` + `vbounce suggest S-{XX}` to end-of-sprint workflow.
64
+
65
+ ### Root Cause Tagging (Change #11)
66
+ - **Modified**: `brains/claude-agents/qa.md` — added `root_cause:` enum field to FAIL report YAML template.
67
+ - **Modified**: `brains/claude-agents/architect.md` — added `root_cause:` enum field to FAIL report YAML template.
68
+ - **Modified**: `scripts/validate_report.mjs` — `root_cause` validated against 12-value enum for QA and Arch FAIL reports.
69
+
70
+ ### Document Separation of Concerns (Change #7)
71
+ - **Modified**: `skills/agent-team/SKILL.md` — Sprint Plan Sync table updated to 3-column format; Delivery Plan updated ONLY at sprint close.
72
+ - **Added**: `skills/agent-team/references/delivery-sync.md` — core rule table, what each document owns, "Never Do This" list.
73
+ - **Added**: `skills/agent-team/references/report-naming.md` — canonical naming conventions for all report files.
74
+ - **Added**: `skills/agent-team/references/cleanup.md` — after-story and after-sprint cleanup procedures, retention policy table.
75
+ - **Added**: `skills/agent-team/references/git-strategy.md` — branch model, all git commands for sprint/worktree/merge/cleanup.
76
+
77
+ ### Lesson Graduation (Change #6)
78
+ - **Modified**: `skills/lesson/SKILL.md` — added Lesson Graduation section: criteria (3+ sprints, triggered once, no recent recurrence), process (suggest→approve→add to config→remove→log), rationale ("LESSONS.md is a staging area, not a permanent rule store").
79
+
80
+ ### Automation CLI (Change #8)
81
+ - **Modified**: `bin/vbounce.mjs` — all new commands wired: `state show/update`, `sprint init/close`, `story complete`, `validate report/state/sprint/ready`, `prep qa/arch/sprint/summary`, `sync`, `trends`, `suggest`, `doctor`.
82
+
83
+ ### Framework Health (Change #8)
84
+ - **Added**: `scripts/doctor.mjs` — health check; verifies LESSONS.md, templates, .bounce/, state.json, brain files, skills, scripts; exits 1 on hard failures.
85
+
86
+ ### Tier 4 Brain Files (Change #12)
87
+ - **Added**: `brains/copilot/copilot-instructions.md` — Tier 4 (Copilot/VS Code) brain file: key behaviors, CLI commands, document hierarchy, report format, critical rules.
88
+ - **Added**: `brains/windsurf/.windsurfrules` — Tier 4 (Windsurf) brain file: before-coding checklist, document rules, state management commands, critical rules.
89
+ - **Modified**: `brains/GEMINI.md` — added full `## CLI Commands` section with all 15+ vbounce commands.
90
+
91
+ ---
5
92
 
6
93
  ## [2026-03-02]
7
94
  - **Initialized**: Created strict Framework Integrity tracking, YAML context handoffs, and RAG validation pipeline.
8
95
 
96
+ ## [2026-03-06] — Pre-Gate Automation
97
+ - **Added**: `scripts/pre_gate_common.sh` — shared gate check functions with auto-detection for JS/TS, Python, Rust, Go stacks.
98
+ - **Added**: `scripts/pre_gate_runner.sh` — universal pre-gate scanner. Reads `.bounce/gate-checks.json` config or falls back to auto-detected defaults. Runs before QA (`qa`) and Architect (`arch`) agents to catch mechanical failures with zero tokens.
99
+ - **Added**: `scripts/init_gate_config.sh` — auto-detects project stack (language, framework, test runner, build/lint commands) and generates `.bounce/gate-checks.json`.
100
+ - **Modified**: `brains/claude-agents/qa.md` — added Pre-Computed Scan Results section. QA skips checks covered by `pre-qa-scan.txt`.
101
+ - **Modified**: `brains/claude-agents/architect.md` — added Pre-Computed Scan Results section. Architect skips mechanical checks covered by `pre-arch-scan.txt`.
102
+ - **Modified**: `brains/claude-agents/devops.md` — added `npm run lint` (tsc --noEmit) to post-merge validation.
103
+ - **Modified**: `skills/agent-team/SKILL.md` — wired pre-gate scans into Steps 3 (QA) and 4 (Architect). Added gate config init to Step 0 sprint setup. Added lint to post-merge validation.
104
+ - **Modified**: All brain files (`CLAUDE.md`, `GEMINI.md`, `AGENTS.md`, `cursor-rules/vbounce-process.mdc`) — updated bounce sequence to include pre-gate scan steps.
105
+ - **Modified**: `skills/improve/SKILL.md` — added Gate Check Proposals section for iteratively growing project-specific checks via `gate-checks.json`.
106
+
9
107
  ## [2026-03-06]
10
108
  - **Fixed**: All brain files (`CLAUDE.md`, `GEMINI.md`, `AGENTS.md`) incorrectly referenced `DELIVERY_PLAN.md §5 Open Questions` or `ACTIVE_SPRINT.md §3 Open Questions`. Corrected to `sprint-{XX}.md §2 Sprint Open Questions` to match the authoritative `agent-team/SKILL.md` and `sprint.md` template.
11
109
  - **Fixed**: Removed duplicate "Product Plans Folder Structure" header in `doc-manager/SKILL.md`.
package/brains/CLAUDE.md CHANGED
@@ -11,24 +11,29 @@ You MUST follow the V-Bounce process. Deviating from it — skipping validation,
11
11
  ## Skills
12
12
 
13
13
  @skills/agent-team/SKILL.md
14
- @skills/doc-manager/SKILL.md
15
14
  @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
- @skills/improve/SKILL.md
15
+
16
+ > **On-demand skills** — invoke these when needed (lower context overhead):
17
+ > - `/doc` → `@skills/doc-manager/SKILL.md` — document creation/editing
18
+ > - `/review` → `@skills/vibe-code-review/SKILL.md` — code review passes
19
+ > - `/write-skill` → `@skills/write-skill/SKILL.md` — skill authoring
20
+ > - `/improve` → `@skills/improve/SKILL.md` — framework improvement
21
+ > - `/react` → `@skills/react-best-practices/SKILL.md` — frontend patterns
22
+
23
+ > **Context budget**: Always-loaded skills (agent-team + lesson) use ~9,000 tokens.
24
+ > On-demand skills are read by subagents directly from `skills/` when needed.
20
25
 
21
26
  ## Subagents
22
27
 
23
- Specialized agents are defined in `.claude/agents/` and spawned via the Task tool:
28
+ Specialized agents are defined in `brains/claude-agents/` (deploy to `.claude/agents/` via `vbounce init --tool claude`) and spawned via the Task tool:
24
29
 
25
30
  | Agent | Config | Role |
26
31
  |-------|--------|------|
27
- | Developer | `.claude/agents/developer.md` | Implements features. Tools: Read, Edit, Write, Bash, Glob, Grep |
28
- | QA | `.claude/agents/qa.md` | Validates against acceptance criteria. Tools: Read, Bash, Glob, Grep (no Edit/Write) |
29
- | Architect | `.claude/agents/architect.md` | Audits structure and compliance. Tools: Read, Glob, Grep, Bash (no Edit/Write) |
30
- | DevOps | `.claude/agents/devops.md` | Merges, deploys, infra checks. Tools: Read, Edit, Write, Bash, Glob, Grep |
31
- | Scribe | `.claude/agents/scribe.md` | Product documentation generation. Tools: Read, Write, Bash, Glob, Grep |
32
+ | Developer | `brains/claude-agents/developer.md` | Implements features. Tools: Read, Edit, Write, Bash, Glob, Grep |
33
+ | QA | `brains/claude-agents/qa.md` | Validates against acceptance criteria. Tools: Read, Bash, Glob, Grep (no Edit/Write) |
34
+ | Architect | `brains/claude-agents/architect.md` | Audits structure and compliance. Tools: Read, Glob, Grep, Bash (no Edit/Write) |
35
+ | DevOps | `brains/claude-agents/devops.md` | Merges, deploys, infra checks. Tools: Read, Edit, Write, Bash, Glob, Grep |
36
+ | Scribe | `brains/claude-agents/scribe.md` | Product documentation generation. Tools: Read, Write, Bash, Glob, Grep |
32
37
 
33
38
  Deploy from: `brains/claude-agents/` → `.claude/agents/`
34
39
 
@@ -56,14 +61,16 @@ Before starting any sprint, the Team Lead MUST:
56
61
 
57
62
  ### Phase 2: The Bounce (Implementation)
58
63
  **Standard Path (L2-L4 Stories):**
59
- 0. Team Lead runs `./scripts/pre_bounce_sync.sh` to ensure LanceDB RAG context is fresh.
64
+ 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.
60
65
  1. Team Lead sends Story context pack to Developer.
61
- 2. Developer queries LanceDB, implements code, writes Implementation Report. CLI Orchestrator must run `./scripts/validate_report.mjs` on the report to enforce YAML strictness.
62
- 3. QA runs Quick Scan + PR Review, validates against Story §2 The Truth. If fail Bug Report to Dev. CLI Orchestrator must run `./scripts/validate_report.mjs` on the QA report before passing to Architect/Dev.
63
- 4. Dev fixes and resubmits. 3+ failuresEscalated.
64
- 5. Architect runs Deep Audit + Trend Check, validates Safe Zone compliance and ADR adherence.
65
- 6. DevOps merges story branch into sprint branch, validates post-merge, handles release tagging.
66
- 7. Team Lead consolidates reports into Sprint Report.
66
+ 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
+ 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
+ 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.
70
+ 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
+ 7. Architect runs Deep Audit + Trend Check (skipping pre-scanned checks), validates Safe Zone compliance and ADR adherence.
72
+ 8. DevOps merges story branch into sprint branch, validates post-merge (tests + lint + build), handles release tagging.
73
+ 9. Team Lead consolidates reports into Sprint Report.
67
74
 
68
75
  **Hotfix Path (L1 Trivial Tasks):**
69
76
  1. Team Lead evaluates request and creates `HOTFIX-{Date}-{Name}.md`.
@@ -74,7 +81,7 @@ Before starting any sprint, the Team Lead MUST:
74
81
  6. DevOps (or Team Lead) runs `./scripts/hotfix_manager.sh sync` to update active worktrees.
75
82
 
76
83
  ### Phase 3: Review
77
- Sprint Report → Human review → Delivery Plan updated → Lessons recorded → Next sprint.
84
+ Sprint Report → Human review → Delivery Plan updated (at boundary only) → Lessons recorded → Run `vbounce trends` + `vbounce suggest S-{XX}` for improvement recommendations → Next sprint.
78
85
  If sprint delivered new features or Developer reports flagged stale product docs → spawn Scribe agent to generate/update vdocs/ via vdoc.
79
86
 
80
87
  ## Story States
@@ -115,7 +122,7 @@ Draft → Refinement → Ready to Bounce → Bouncing → QA Passed → Architec
115
122
  10. **One source of truth**. Reference upstream documents, don't duplicate.
116
123
  11. **Change Logs are mandatory** on every document modification.
117
124
  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.
118
- 13. **Framework Integrity**. Any modification to a `brains/` or `skills/` file MUST be recorded in `brains/CHANGELOG.md` and trigger `./scripts/pre_bounce_sync.sh`.
125
+ 13. **Framework Integrity**. Any modification to a `brains/` or `skills/` file MUST be recorded in `brains/CHANGELOG.md`.
119
126
 
120
127
  ## Framework Structure
121
128
 
@@ -137,11 +144,11 @@ All planning documents live in `product_plans/`, separated by state (`strategy/`
137
144
  | Charter | `templates/charter.md` | `product_plans/strategy/{project}_charter.md` |
138
145
  | Roadmap | `templates/roadmap.md` | `product_plans/strategy/{project}_roadmap.md` |
139
146
  | Risk Registry | `templates/risk_registry.md` | `product_plans/strategy/RISK_REGISTRY.md` |
140
- | Delivery Plan | `templates/delivery_plan.md` | `product_plans/strategy/{delivery}_delivery_plan.md` |
147
+ | Delivery Plan | `templates/delivery_plan.md` | `product_plans/D-{NN}_{release_name}/D-{NN}_DELIVERY_PLAN.md` |
141
148
  | Sprint Plan | `templates/sprint.md` | `product_plans/sprints/sprint-{XX}/sprint-{XX}.md` |
142
149
  | Epic | `templates/epic.md` | `product_plans/backlog/EPIC-{NNN}_{name}/EPIC-{NNN}.md` |
143
150
  | Story | `templates/story.md` | `product_plans/backlog/EPIC-{NNN}_{name}/STORY-{EpicID}-{StoryID}-{StoryName}.md` |
144
- | Sprint Report | `templates/sprint_report.md` | `product_plans/sprints/sprint-{XX}/sprint-report.md` |
151
+ | Sprint Report | `templates/sprint_report.md` | `.bounce/sprint-report-S-{XX}.md` |
145
152
  | Product Docs | (generated by vdoc) | `vdocs/*.md` |
146
153
  | Doc Manifest | (generated by vdoc) | `vdocs/_manifest.json` |
147
154
 
package/brains/GEMINI.md CHANGED
@@ -25,6 +25,42 @@ For Antigravity: copy skills to `.agents/skills/` for workspace-scoped discovery
25
25
  | `skills/write-skill/` | Creating and refining agent skills | Team Lead |
26
26
  | `skills/improve/` | Framework self-improvement from agent feedback | Team Lead |
27
27
 
28
+ ## CLI Commands
29
+
30
+ V-Bounce OS ships a CLI. Use these commands for state management instead of editing files manually:
31
+
32
+ ```bash
33
+ # Sprint management
34
+ vbounce sprint init S-06 D-02 --stories STORY-001,STORY-002
35
+ vbounce sprint close S-05
36
+
37
+ # Story management
38
+ vbounce story complete STORY-005-02 --qa-bounces 1 --arch-bounces 0 --correction-tax 5
39
+
40
+ # State transitions
41
+ vbounce state show # see current sprint state
42
+ vbounce state update STORY-005-02 "QA Passed" # transition story state
43
+ vbounce state update STORY-005-02 --qa-bounce # increment QA bounce counter
44
+
45
+ # Validation
46
+ vbounce validate report <file> # validate agent report YAML
47
+ vbounce validate state # validate state.json
48
+ vbounce validate sprint # validate Sprint Plan
49
+ vbounce validate ready STORY-ID # pre-bounce gate check
50
+
51
+ # Context packs
52
+ vbounce prep qa STORY-005-02 # generate QA context pack
53
+ vbounce prep arch STORY-005-02 # generate Architect context pack
54
+ vbounce prep sprint S-06 # generate Sprint context pack
55
+
56
+ # Self-improvement
57
+ vbounce trends # cross-sprint trend analysis
58
+ vbounce suggest S-06 # generate improvement suggestions
59
+
60
+ # Health check
61
+ vbounce doctor # validate all configs, templates, state files
62
+ ```
63
+
28
64
  ## The V-Bounce Process
29
65
 
30
66
  ### Phase 1: Verification (Planning)
@@ -47,14 +83,16 @@ Before starting any sprint, the Team Lead MUST:
47
83
 
48
84
  ### Phase 2: The Bounce (Implementation)
49
85
  **Standard Path (L2-L4 Stories):**
50
- 0. Team Lead runs `./scripts/pre_bounce_sync.sh` to ensure LanceDB RAG context is fresh.
86
+ 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.
51
87
  1. Team Lead sends Story context pack to Developer.
52
- 2. Developer queries LanceDB, implements code, writes Implementation Report. CLI Orchestrator must run `./scripts/validate_report.mjs` on the report to enforce YAML strictness.
53
- 3. QA runs Quick Scan + PR Review, validates against Story §2 The Truth. If fail → Bug Report to Dev. CLI Orchestrator must run `./scripts/validate_report.mjs` on the QA report before passing to Architect/Dev.
54
- 4. Dev fixes and resubmits. 3+ failuresEscalated.
55
- 5. Architect runs Deep Audit + Trend Check, validates Safe Zone compliance and ADR adherence.
56
- 6. DevOps merges story branch into sprint branch, validates post-merge, handles release tagging.
57
- 7. Team Lead consolidates reports into Sprint Report.
88
+ 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
+ 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
+ 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.
92
+ 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
+ 7. Architect runs Deep Audit + Trend Check (skipping pre-scanned checks), validates Safe Zone compliance and ADR adherence.
94
+ 8. DevOps merges story branch into sprint branch, validates post-merge (tests + lint + build), handles release tagging.
95
+ 9. Team Lead consolidates reports into Sprint Report.
58
96
 
59
97
  **Hotfix Path (L1 Trivial Tasks):**
60
98
  1. Team Lead evaluates request and creates `HOTFIX-{Date}-{Name}.md`.
@@ -128,11 +166,11 @@ Planning docs live in `product_plans/`. It uses a state-based architecture (`str
128
166
  | Charter | `product_plans/strategy/{project}_charter.md` |
129
167
  | Roadmap | `product_plans/strategy/{project}_roadmap.md` |
130
168
  | Risk Registry | `product_plans/strategy/RISK_REGISTRY.md` |
131
- | Delivery Plan | `product_plans/strategy/{delivery}_delivery_plan.md` |
169
+ | Delivery Plan | `product_plans/D-{NN}_{release_name}/D-{NN}_DELIVERY_PLAN.md` |
132
170
  | Sprint Plan | `product_plans/sprints/sprint-{XX}/sprint-{XX}.md` |
133
171
  | Epic | `product_plans/backlog/EPIC-{NNN}_{name}/EPIC-{NNN}.md` |
134
172
  | Story | `product_plans/backlog/EPIC-{NNN}_{name}/STORY-{EpicID}-{StoryID}-{StoryName}.md` |
135
- | Sprint Report | `product_plans/sprints/sprint-{XX}/sprint-report.md` |
173
+ | Sprint Report | `.bounce/sprint-report-S-{XX}.md` |
136
174
  | Product Docs | `vdocs/*.md` + `_manifest.json` |
137
175
 
138
176
  ## Report Formats
package/brains/SETUP.md CHANGED
@@ -117,16 +117,22 @@ The agent will:
117
117
  4. Merge completed stories
118
118
  5. Generate a Sprint Report for your review
119
119
 
120
- ## Step 7: Automated RAG Initialization
120
+ ## Step 7: Initialize Your First Sprint
121
121
 
122
- V-Bounce OS uses LanceDB to provide agents with targeted context. While the `npx @sandrinio/vbounce install` command handles this automatically, you can manually re-trigger a sync if you add new architectural rules or change your brains:
122
+ Once installed, start your first sprint:
123
123
 
124
124
  ```bash
125
- # Re-build your local knowledge base
126
- ./scripts/pre_bounce_sync.sh
125
+ # Create state.json + sprint plan directory
126
+ vbounce sprint init S-01 D-01
127
+
128
+ # Verify everything is in order
129
+ vbounce doctor
130
+
131
+ # Generate a context pack for your sprint
132
+ vbounce prep sprint S-01
127
133
  ```
128
134
 
129
- This updates your local embeddings in `.bounce/.lancedb/`. Agents use `./scripts/vbounce_ask.mjs` to fetch rules on demand, ensuring they are always aligned with your latest Roadmap and Lessons.
135
+ Context packs are generated on-demand before each bounce. Agents read `LESSONS.md`, the sprint plan, and relevant story specs directly no embedding or sync step required.
130
136
 
131
137
  ## Folder Structure After Setup
132
138
 
@@ -14,11 +14,20 @@ Audit the codebase for structural integrity, standards compliance, and long-term
14
14
 
15
15
  ## Before Auditing
16
16
 
17
- 1. **Query Project Lessons**: Run `./scripts/vbounce_ask.mjs "architectural constraints and historical mistakes for <story summary>"` to retrieve relevant context from `LESSONS.md` and past reports.
17
+ 1. **Read LESSONS.md**: Scan for architectural constraints and historical mistakes relevant to this story. Any entry touching the affected modules is a mandatory audit target.
18
18
  2. **Read all reports** for this story (`.bounce/reports/STORY-{ID}-{StoryName}-*.md`) — Dev Report, QA Report.
19
19
  3. **Read the full Story spec** — especially §3 Implementation Guide and §3.1 ADR References.
20
20
  4. **Read Roadmap §3 ADRs** — every architecture decision the implementation must comply with.
21
21
 
22
+ ## Pre-Computed Scan Results
23
+
24
+ Before you were spawned, the Team Lead ran `scripts/pre_gate_runner.sh arch`. Read the results at `.bounce/reports/pre-arch-scan.txt`.
25
+
26
+ - If **ALL checks PASS**: Skip mechanical verification in your Deep Audit (dependency changes, file sizes, test/build/lint status). Focus on **judgment-based dimensions**: architectural consistency, error handling quality, data flow traceability, coupling assessment, and AI-ism detection.
27
+ - If **ANY check FAILS**: Note failures in your report. Focus your audit on the areas that failed.
28
+
29
+ The 6-dimension evaluation should focus on qualitative judgment. Mechanical checks (new deps, file sizes, exports documentation) are pre-computed — reference `pre-arch-scan.txt` rather than re-running them.
30
+
22
31
  ## Your Audit Process
23
32
 
24
33
  ### Deep Audit (Full Codebase Analysis)
@@ -84,6 +93,7 @@ safe_zone_score: {SCORE}
84
93
  tokens_used: {number}
85
94
  ai_isms_detected: {count}
86
95
  regression_risk: "{Low/Medium/High}"
96
+ template_version: "2.0"
87
97
  ---
88
98
 
89
99
  # Architectural Audit Report: STORY-{ID}-{StoryName} — PASS
@@ -136,17 +146,23 @@ status: "FAIL"
136
146
  bounce_count: {N}
137
147
  tokens_used: {number}
138
148
  critical_failures: {count}
149
+ root_cause: "{adr_violation|missing_tests|spec_ambiguity|logic_error|coupling|duplication|error_handling|state_management|gold_plating|integration_gap}"
150
+ template_version: "2.0"
151
+ failures:
152
+ - dimension: "{Architectural Consistency|Error Handling|Data Flow|Duplication|Test Quality|Coupling}"
153
+ severity: "Critical"
154
+ what_wrong: "{Specific problem — machine-readable summary}"
155
+ fix_required: "{Exact change the Dev must make}"
139
156
  ---
140
157
 
141
158
  # Architectural Audit Report: STORY-{ID}-{StoryName} — FAIL
142
159
 
143
160
  ## Critical Failures
161
+ > Structured failure data is in the YAML frontmatter above (`failures:` array). Expand on each issue here with depth.
162
+
144
163
  ### Issue 1: {Short description}
145
- - **Dimension**: {Which of the 6 dimensions}
146
- - **Severity**: Critical / High
147
- - **What's wrong**: {Specific problem}
148
- - **What's wrong (plain language)**: {Non-coder analogy}
149
- - **Fix required**: {What the Dev needs to change}
164
+ - **Plain language**: {Non-coder analogy}
165
+ - **Context**: {Why this matters architecturally — historical precedent, ADR violated, risk to future stories}
150
166
 
151
167
  ## Process Feedback
152
168
  > Optional. Note friction with the V-Bounce framework itself — templates, handoffs, RAG quality, skills.
@@ -12,8 +12,8 @@ Implement features and fix bugs as specified in Story documents. You write code
12
12
 
13
13
  ## Before Writing ANY Code
14
14
 
15
- 1. **Query Project Lessons**: Run `./scripts/vbounce_ask.mjs "<summarize your specific coding task here>"` to retrieve relevant constraints and gotchas from `LESSONS.md` and historical reports. Treat these as hard constraints. No exceptions.
16
- 2. **Query Architectural Decisions**: If your task involves core systems (auth, db, state), run `./scripts/vbounce_ask.mjs "<system> decisions"` to get relevant ADRs from the Roadmap.
15
+ 1. **Read LESSONS.md** at the project root. Scan for entries relevant to your task treat them as hard constraints. No exceptions.
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
18
  3. **Check ADR references** in §3.1 — comply with all architecture decisions from the Roadmap.
19
19
  4. **Read relevant react-best-practices rules** — consult `skills/react-best-practices/` for patterns matching your task.
@@ -63,6 +63,9 @@ When resolving conflicts:
63
63
  # Run test suite on the merged sprint branch
64
64
  npm test # or project-appropriate test command
65
65
 
66
+ # Type check (if applicable)
67
+ npm run lint # tsc --noEmit or equivalent linter
68
+
66
69
  # Verify no regressions
67
70
  npm run build # or project-appropriate build command
68
71
 
@@ -12,16 +12,23 @@ Validate that the Developer's implementation meets the Story's acceptance criter
12
12
 
13
13
  ## Before Testing
14
14
 
15
- 1. **Query Project Lessons**: Run `./scripts/vbounce_ask.mjs "<summarize the story spec here>"` to retrieve known failure patterns relevant to this story from `LESSONS.md` and past reports.
15
+ 1. **Read LESSONS.md**: Scan for failure patterns relevant to this story. Treat matching entries as known risk areas to probe first.
16
16
  2. **Read the Developer Implementation Report** (`.bounce/reports/STORY-{ID}-{StoryName}-dev.md`) to understand what was built.
17
17
  3. **Read Story §2 The Truth** — these are your pass/fail criteria. If the Gherkin scenarios don't pass, the bounce failed.
18
18
 
19
+ ## Pre-Computed Scan Results
20
+
21
+ Before you were spawned, the Team Lead ran `scripts/pre_gate_runner.sh qa`. Read the results at `.bounce/reports/pre-qa-scan.txt`.
22
+
23
+ - If **ALL checks PASS**: Skip the mechanical portions of Quick Scan (test existence, build, debug statements, TODOs, JSDoc coverage). Focus your Quick Scan on **architectural consistency and error handling** only.
24
+ - If **ANY check FAILS**: The Team Lead should have fixed trivial failures before spawning you. If failures remain, note them in your report but do not re-run the checks — trust the scan output.
25
+
19
26
  ## Your Testing Process
20
27
 
21
28
  ### Quick Scan (Health Check)
22
- Run a fast structural check of the project using the vibe-code-review skill (Quick Scan mode):
29
+ Run a fast structural check using the vibe-code-review skill (Quick Scan mode):
23
30
  - Read `skills/vibe-code-review/SKILL.md` and `skills/vibe-code-review/references/quick-scan.md`
24
- - Execute the checks against the codebase
31
+ - Skip checks already covered by `pre-qa-scan.txt` (tests exist, build passes, no debug output, no TODOs, JSDoc coverage). Focus on **judgment-based structural assessment**.
25
32
  - Flag any obvious structural issues
26
33
 
27
34
  ### PR Review (Diff Analysis)
@@ -73,6 +80,7 @@ bounce_count: {N}
73
80
  tokens_used: {number}
74
81
  bugs_found: 0
75
82
  gold_plating_detected: false
83
+ template_version: "2.0"
76
84
  ---
77
85
 
78
86
  # QA Validation Report: STORY-{ID}-{StoryName} — PASS
@@ -123,22 +131,30 @@ bounce_count: {N}
123
131
  tokens_used: {number}
124
132
  bugs_found: {number of bugs}
125
133
  gold_plating_detected: {true/false}
134
+ template_version: "2.0"
126
135
  failed_scenarios:
127
136
  - "{scenario name}"
137
+ root_cause: "{missing_tests|missing_validation|spec_ambiguity|gold_plating|logic_error|integration_gap|type_error|state_management|error_handling|coupling|duplication}"
138
+ bugs:
139
+ - scenario: "{Which Gherkin scenario failed}"
140
+ expected: "{What should happen}"
141
+ actual: "{What actually happens}"
142
+ files: ["{src/path/to/file.ts}"]
143
+ severity: "High"
144
+ gold_plating: []
128
145
  ---
129
146
 
130
147
  # QA Validation Report: STORY-{ID}-{StoryName} — FAIL (Bounce {N})
131
148
 
132
149
  ## Failures
150
+ > Structured bug data is in the YAML frontmatter above (`bugs:` array). Expand on each finding here with plain-language context.
151
+
133
152
  ### Bug 1: {Short description}
134
- - **Scenario**: {Which Gherkin scenario failed}
135
- - **Expected**: {What should happen}
136
- - **Actual**: {What actually happens}
137
- - **Files**: {Which files are likely involved}
138
- - **Severity**: Critical / High / Medium / Low
153
+ - **Plain language**: {Non-coder analogy}
154
+ - **Context**: {Additional detail not captured in YAML — reproduction steps, environment notes, related code smell}
139
155
 
140
156
  ## Gold-Plating Findings
141
- - {Any unnecessary additions}
157
+ - {Any unnecessary additions not captured in gold_plating[] array, or "None"}
142
158
 
143
159
  ## Process Feedback
144
160
  > Optional. Note friction with the V-Bounce framework itself — templates, handoffs, RAG quality, tooling.
@@ -0,0 +1,49 @@
1
+ # V-Bounce OS — GitHub Copilot Instructions
2
+
3
+ This project uses **V-Bounce OS** — a structured AI-agent development framework.
4
+
5
+ ## What This Means for You
6
+
7
+ You are operating in Tier 4 (Awareness) mode. You understand the project uses V-Bounce OS but you do not orchestrate agents.
8
+
9
+ ## Key Behaviors
10
+
11
+ 1. **When editing planning documents** (`product_plans/**/*.md`): follow the templates in `templates/`. Do not change section numbering or YAML frontmatter structure.
12
+
13
+ 2. **When editing agent reports** (`.bounce/reports/**/*.md`): YAML frontmatter is mandatory. Never remove it.
14
+
15
+ 3. **When asked about project state**: suggest running `vbounce state show` or reading `.bounce/state.json`.
16
+
17
+ 4. **When creating new stories or epics**: use `templates/story.md` and `templates/epic.md`.
18
+
19
+ ## CLI Commands
20
+
21
+ ```bash
22
+ vbounce state show # current sprint state
23
+ vbounce validate report <f> # validate a report file
24
+ vbounce doctor # project health check
25
+ vbounce prep qa STORY-ID # generate QA context
26
+ ```
27
+
28
+ ## Document Hierarchy
29
+
30
+ Charter → Roadmap → Epic → Story → Sprint Plan → Delivery Plan
31
+
32
+ Never skip levels. Stories must trace back to an Epic. Sprints must reference a Delivery Plan.
33
+
34
+ ## Report Format
35
+
36
+ All agent reports must start with YAML frontmatter:
37
+ ```yaml
38
+ ---
39
+ status: "PASS" | "FAIL"
40
+ tokens_used: {number}
41
+ # ... agent-specific fields
42
+ ---
43
+ ```
44
+
45
+ ## Critical Rules
46
+
47
+ - Read `LESSONS.md` before modifying code in this project
48
+ - No gold-plating — implement exactly what the Story specifies
49
+ - Follow the Safe Zone — no new patterns without Architect approval
@@ -19,14 +19,16 @@ Before sprints: Lead triages request (L1 Trivial → Hotfix Path. L2-L4 → Epic
19
19
 
20
20
  ### Phase 2: The Bounce (Implementation)
21
21
  **Standard Path (L2-L4):**
22
- 0. Team Lead runs `./scripts/pre_bounce_sync.sh` to ensure LanceDB RAG context is fresh.
22
+ 0. Team Lead reads `.bounce/state.json` (`vbounce state show`) and runs `vbounce prep sprint S-{XX}` for a fresh context pack.
23
23
  1. Team Lead sends Story context pack to Developer.
24
- 2. Developer reads LESSONS.md, implements code, writes Implementation Report. CLI Orchestrator must run `./scripts/validate_report.mjs` on the report to enforce YAML strictness.
25
- 3. QA validates against Story §2 The Truth. If fail Bug Report to Dev. CLI Orchestrator must run `./scripts/validate_report.mjs` on the QA report before passing to Architect/Dev.
26
- 4. Dev fixes and resubmits. 3+ failuresEscalated.
27
- 5. Architect validates Safe Zone compliance and ADR adherence.
28
- 6. DevOps merges story into sprint branch, validates, handles releases.
29
- 7. Team Lead consolidates into Sprint Report.
24
+ 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.
25
+ 3. Pre-QA Gate Scan: `./scripts/pre_gate_runner.sh qa` catches mechanical failures before spawning QA. Trivial issues return to Dev.
26
+ 4. QA validates against Story §2 The Truth (skipping pre-scanned checks). If failBug Report to Dev.
27
+ 5. Dev fixes and resubmits. 3+ failures Escalated.
28
+ 6. Pre-Architect Gate Scan: `./scripts/pre_gate_runner.sh arch` catches structural issues before spawning Architect.
29
+ 7. Architect validates Safe Zone compliance and ADR adherence (skipping pre-scanned checks).
30
+ 8. DevOps merges story into sprint branch, validates (tests + lint + build), handles releases.
31
+ 9. Team Lead consolidates into Sprint Report.
30
32
 
31
33
  **Hotfix Path (L1 Trivial Task):**
32
34
  1. Team Lead evaluates request and creates `HOTFIX-{Date}-{Name}.md`.