@sandrinio/vbounce 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -29,7 +29,7 @@ Every risk that keeps you up at night has a specific mechanism that catches it:
29
29
  | Risk | What catches it |
30
30
  |------|----------------|
31
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 |
32
+ | Architectural drift over time | **Architect gate** — audits against your ADRs on every story |
33
33
  | One bad story breaks everything | **Git worktrees** — every story is isolated; failures can't contaminate other work |
34
34
  | Agent gets stuck in a loop | **3-bounce escalation** — after 3 failed attempts, the story surfaces to a human |
35
35
  | Scope creep on "quick fixes" | **Hotfix hard-stop** — Developer must stop if a fix touches more than 2 files |
@@ -285,7 +285,7 @@ Five specialist agents, each with a single job and strict boundaries:
285
285
  |-------|-------------|-------------|
286
286
  | **Developer** | Implements stories in isolated worktrees, submits implementation reports | Works only in its assigned worktree |
287
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 |
288
+ | **Architect** | Audits against ADRs and architecture rules | Read-only — cannot modify code |
289
289
  | **DevOps** | Merges passing stories into the sprint branch | Only acts after both gates pass |
290
290
  | **Scribe** | Generates and maintains product documentation from the actual codebase | Only runs after merge |
291
291
 
@@ -322,25 +322,30 @@ your-project/
322
322
  │ ├── architect.md
323
323
  │ ├── devops.md
324
324
  │ └── scribe.md
325
- ├── templates/ # 9 Markdown + YAML frontmatter templates
325
+ ├── templates/ # 12 Markdown + YAML frontmatter templates
326
326
  │ ├── charter.md
327
327
  │ ├── roadmap.md
328
328
  │ ├── epic.md
329
329
  │ ├── story.md
330
+ │ ├── spike.md
330
331
  │ ├── sprint.md
331
332
  │ ├── delivery_plan.md
332
333
  │ ├── sprint_report.md
333
334
  │ ├── hotfix.md
335
+ │ ├── bug.md
336
+ │ ├── change_request.md
334
337
  │ └── risk_registry.md
335
- ├── skills/ # 7 modular skill files (see Skills below)
338
+ ├── skills/ # 9 modular skill files (see Skills below)
336
339
  │ ├── agent-team/
337
340
  │ ├── doc-manager/
341
+ │ ├── product-graph/
338
342
  │ ├── lesson/
339
343
  │ ├── vibe-code-review/
340
344
  │ ├── write-skill/
341
345
  │ ├── improve/
346
+ │ ├── file-organization/
342
347
  │ └── react-best-practices/ # Example — customize for your stack
343
- ├── scripts/ # 23 automation scripts (validation, context prep, state)
348
+ ├── scripts/ # 26 automation scripts (validation, context prep, state, graph)
344
349
  └── package.json # 3 deps: js-yaml, marked, commander. Nothing else.
345
350
  ```
346
351
 
@@ -397,11 +402,13 @@ Skills are modular markdown instructions the Team Lead invokes automatically dur
397
402
  | Skill | Purpose |
398
403
  |-------|---------|
399
404
  | `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 |
405
+ | `doc-manager` | Enforces the document hierarchy, cascade rules, and planning workflows |
406
+ | `product-graph` | Dependency-aware document intelligence — knows what's blocked, what's affected by changes |
401
407
  | `lesson` | Extracts mistakes from sprints into `LESSONS.md` |
402
408
  | `vibe-code-review` | Runs Quick Scan or Deep Audit against acceptance criteria and architecture rules |
403
409
  | `write-skill` | Allows the Team Lead to author new skills when the team encounters a recurring problem |
404
410
  | `improve` | Self-improvement loop — reads agent friction signals across sprints and proposes framework changes (with your approval) |
411
+ | `file-organization` | File structure management and organization verification |
405
412
  | `react-best-practices` | Example tech-stack skill — customize this for your own stack |
406
413
 
407
414
  ---
@@ -443,6 +450,10 @@ vbounce story complete STORY-ID # Mark story done, update state
443
450
  vbounce state show # Print current state
444
451
  vbounce state update STORY-ID STATE # Update story state
445
452
 
453
+ # Product graph
454
+ vbounce graph # Generate document dependency graph
455
+ vbounce graph impact EPIC-002 # Show what's affected by a change
456
+
446
457
  # Context preparation
447
458
  vbounce prep sprint S-01 # Sprint context pack
448
459
  vbounce prep qa STORY-ID # QA context pack
@@ -479,6 +490,7 @@ product_plans/ # Created when you start planning
479
490
 
480
491
  .bounce/ # Created on first sprint init
481
492
  state.json # Machine-readable sprint state (crash recovery)
493
+ product-graph.json # Document dependency graph (auto-generated)
482
494
  reports/ # QA and Architect bounce reports
483
495
  improvement-manifest.json # Machine-readable improvement proposals (auto-generated)
484
496
  improvement-suggestions.md # Human-readable suggestions with impact levels (auto-generated)
@@ -502,7 +514,7 @@ LESSONS.md # Accumulated mistakes — agents read this bef
502
514
  | **Escalation** | When a story hits the 3-bounce limit and surfaces to a human for intervention |
503
515
  | **Gate** | An automated quality checkpoint — QA validates requirements, Architect validates structure |
504
516
  | **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 |
517
+ | **L1–L4** | Complexity labels: L1 Trivial, L2 Standard, L3 Complex, L4 Uncertain |
506
518
  | **Root Cause Tag** | A label on every bounce failure (e.g., `missing_tests`, `adr_violation`) used for trend analysis |
507
519
  | **Scribe** | The documentation agent that maps code into semantic product docs |
508
520
  | **Sprint Report** | End-of-sprint summary: what shipped, metrics, bounce analysis, lessons, retrospective |
package/bin/vbounce.mjs CHANGED
@@ -82,6 +82,8 @@ Usage:
82
82
  vbounce prep qa <storyId> Generate QA context pack
83
83
  vbounce prep arch <storyId> Generate Architect context pack
84
84
  vbounce prep sprint <sprintId> Generate Sprint context pack
85
+ vbounce graph [generate] Generate product document graph
86
+ vbounce graph impact <DOC-ID> Show what's affected by a document change
85
87
  vbounce docs match --story <ID> Match story scope against vdoc manifest
86
88
  vbounce docs check <sprintId> Detect stale vdocs and generate Scribe task
87
89
  vbounce trends Cross-sprint trend analysis
@@ -216,6 +218,20 @@ if (command === 'improve') {
216
218
  runScript('suggest_improvements.mjs', [sprintArg]);
217
219
  }
218
220
 
221
+ // -- graph --
222
+ if (command === 'graph') {
223
+ rl.close();
224
+ if (sub === 'impact') {
225
+ runScript('product_impact.mjs', args.slice(2));
226
+ } else if (!sub || sub === 'generate') {
227
+ runScript('product_graph.mjs', args.slice(2));
228
+ } else {
229
+ console.error(`Unknown graph subcommand: ${sub}`);
230
+ console.error('Usage: vbounce graph [generate] | vbounce graph impact <DOC-ID>');
231
+ process.exit(1);
232
+ }
233
+ }
234
+
219
235
  // -- docs --
220
236
  if (command === 'docs') {
221
237
  rl.close();
@@ -561,6 +577,13 @@ if (command === 'install') {
561
577
  console.log(` \x1b[32m✓\x1b[0m ${rule.dest}`);
562
578
  }
563
579
 
580
+ // Create LESSONS.md if missing
581
+ const lessonsPath = path.join(CWD, 'LESSONS.md');
582
+ if (!fs.existsSync(lessonsPath)) {
583
+ fs.writeFileSync(lessonsPath, '# Lessons Learned\n\nProject-specific lessons recorded after each story merge. Read this before writing code.\n');
584
+ console.log(` \x1b[32m✓\x1b[0m LESSONS.md (created)`);
585
+ }
586
+
564
587
  // Write install metadata
565
588
  writeInstallMeta(pkgVersion, targetPlatform, installedFiles, hashes);
566
589
  console.log(` \x1b[32m✓\x1b[0m .bounce/install-meta.json`);
package/brains/AGENTS.md CHANGED
@@ -12,167 +12,60 @@ You have two roles depending on the phase:
12
12
 
13
13
  You MUST follow the V-Bounce process. Deviating from it — skipping validation, ignoring LESSONS.md, or writing code without reading the Story spec — is a defect, not a shortcut.
14
14
 
15
- ## Skills
16
-
17
- 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.
18
-
19
- | Skill | Purpose | Used By |
20
- |-------|---------|---------|
21
- | `skills/agent-team/` | Subagent orchestration and delegation | Team Lead |
22
- | `skills/doc-manager/` | Document hierarchy navigation and lifecycle | Team Lead, all agents |
23
- | `skills/lesson/` | Recording project-specific mistakes and rules | All agents (read), Team Lead (write) |
24
- | `skills/react-best-practices/` | Frontend coding patterns and anti-patterns | Developer |
25
- | `skills/vibe-code-review/` | Code quality review (4 modes) | QA, Architect |
26
- | `skills/write-skill/` | Creating and refining agent skills | Team Lead |
27
- | `skills/improve/` | Framework self-improvement from agent feedback | Team Lead |
28
-
29
- ## The V-Bounce Process
30
-
31
- The process has four phases. You determine which phase to operate in based on what the human is asking for.
32
-
33
- ### Phase 1: Planning (AI + Human — No Subagents)
34
-
35
- **When to enter:** The human talks about what to build, asks to create or modify planning documents, discusses features, priorities, or asks about work status. This is a direct conversation — no subagents.
36
-
37
- Read `skills/doc-manager/SKILL.md` and follow its workflows.
38
-
39
- **Document 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
- **Your responsibilities during planning:**
43
- 1. **Creating documents:** Read upstream documents, research the codebase, draft the document. Follow doc-manager's CREATE and DECOMPOSE workflows.
44
- 2. **Surfacing problems:** Assess ambiguity, open questions, edge cases, and risks. Present these clearly to the human — this is collaborative.
45
- 3. **Answering status questions:** Read `product_plans/` to understand current state (backlog/, sprints/, archive/, strategy/).
46
- 4. **Triaging requests:** L1 Trivial → Hotfix Path. Everything else → Standard Path (Epic → Story → Sprint).
47
-
48
- ### Phase 2: Sprint Planning (AI + Human — Collaborative Gate)
49
-
50
- **When to enter:** The human wants to start executing work — "let's start a sprint", "what should we work on next?"
51
-
52
- **Hard rule: No bounce can start without a finalized, human-confirmed Sprint Plan.**
53
-
54
- 1. Read backlog, archive, Risk Registry, vdocs manifest
55
- 2. Propose sprint scope based on priority, dependencies, complexity
56
- 3. Surface blockers: open questions, 🔴 ambiguity, missing prerequisites, risks, edge cases
57
- 4. Discuss and refine with human
58
- 5. Create Sprint Plan from `templates/sprint.md` — fill §0 Readiness Gate, §1 Active Scope, §2 Execution Strategy, §3 Open Questions
59
- 6. **Gate:** Human confirms the Sprint Plan. Only then set status to "Active"
60
-
61
- **Strategic Freeze:** Charter/Roadmap frozen during sprints. Use **Impact Analysis Protocol** if emergency changes occur. Pause until human approval.
15
+ ## Phase Routing
62
16
 
63
- ### Phase 3: The Bounce (Execution)
64
- **Standard Path (L2-L4 Stories):**
65
- 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.
66
- 1. Team Lead sends Story context pack to Developer.
67
- 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.
68
- 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.
69
- 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.
70
- 5. Dev fixes and resubmits. 3+ failures → Escalated (see Escalation Recovery below).
71
- 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.
72
- 7. Architect runs Deep Audit + Trend Check (skipping pre-scanned checks), validates Safe Zone compliance and ADR adherence.
73
- 8. DevOps merges story branch into sprint branch, validates post-merge (tests + lint + build), handles release tagging.
74
- 9. **Record lessons immediately**: After DevOps merge, check Dev and QA reports for `lessons_flagged`. Record to LESSONS.md now — do not wait for sprint close.
75
- 10. Team Lead consolidates reports into Sprint Report.
17
+ Determine which phase you're in from what the human is asking, then load the right skill.
76
18
 
77
- **Hotfix Path (L1 Trivial Tasks):**
78
- 1. Team Lead evaluates request and creates `HOTFIX-{Date}-{Name}.md`.
79
- 2. Developer reads LESSONS.md and Hotfix spec, makes the targeted change (max 1-2 files).
80
- 3. Developer runs `./scripts/hotfix_manager.sh ledger "{Title}" "{Description}"`.
81
- 4. Human/Team Lead manually verifies the fix. QA/Architect bounce loops are bypassed.
82
- 5. Hotfix is merged directly into the active branch.
83
- 6. DevOps (or Team Lead) runs `./scripts/hotfix_manager.sh sync` to update active worktrees.
19
+ | User Intent | Phase | Load |
20
+ |---|---|---|
21
+ | Plan, create, discuss features, priorities, status | Phase 1 (Planning) | `doc-manager`, `product-graph` |
22
+ | "Start a sprint", scope selection, "what should we work on?" | Phase 2 (Sprint Planning) | `doc-manager`, `product-graph` |
23
+ | Sprint confirmed, "bounce", implement stories | Phase 3 (Execution) | `agent-team` |
24
+ | Review sprint, retrospective, improvement | Phase 4 (Review) | `improve` |
25
+ | Scope change to existing documents | Any | `product-graph` (impact first), then `doc-manager` |
26
+ | Code review | Any | `vibe-code-review` |
27
+ | Lesson or gotcha to record | Any | `lesson` |
84
28
 
85
- **Escalation Recovery (3+ bounce failures):**
86
- 1. Mark story as "Escalated" in Sprint Plan
87
- 2. Present to human: what failed, root causes from bounce reports, pattern analysis
88
- 3. Propose options: re-scope the story, split into smaller stories, create a spike, or remove from sprint
89
- 4. Human decides. Execute the decision.
90
-
91
- ### Phase 4: Review
92
- Sprint Report → Human review → Delivery Plan updated (at boundary only) → Lessons recorded → Next sprint.
93
- If sprint delivered new features or Dev reports flagged stale product docs → spawn Scribe agent to generate/update vdocs/ via vdoc.
94
-
95
- **Self-Improvement Pipeline** (auto-runs on `vbounce sprint close`):
96
- 1. `sprint_trends.mjs` → cross-sprint trend analysis → `.bounce/trends.md`
97
- 2. `post_sprint_improve.mjs` → parses §5 retro tables + LESSONS.md automation candidates + recurring patterns + effectiveness checks → `.bounce/improvement-manifest.json`
98
- 3. `suggest_improvements.mjs` → generates human-readable suggestions with impact levels → `.bounce/improvement-suggestions.md`
99
- 4. Human reviews suggestions → approve/reject/defer each item
100
- 5. Run `/improve` to apply approved changes with brain-file sync
101
-
102
- **Impact Levels:** P0 Critical (blocks agents), P1 High (causes rework), P2 Medium (friction), P3 Low (polish). See `/improve` skill for details.
29
+ ## Critical Rules
103
30
 
104
- On-demand: `vbounce improve S-{XX}` runs the full pipeline.
31
+ ### Before Writing Code
32
+ 1. **Read LESSONS.md** at the project root. Every time. No exceptions.
33
+ 2. **Read the Story spec** (§1 The Spec + §3 Implementation Guide). Do not infer requirements.
34
+ 3. **Check ADRs** in the Roadmap (§3). Comply with recorded architecture decisions.
105
35
 
106
- ## Story States
36
+ ### During Implementation
37
+ 4. **Comply with ADRs**. No new patterns or libraries unless approved in Roadmap §3. The Architect validates compliance.
38
+ 5. **No Gold-Plating**. Implement exactly what the Story specifies.
39
+ 6. **Write Self-Documenting Code**. All exports MUST have JSDoc/docstrings.
40
+ 7. **Self-assess Correction Tax**. Track % human intervention.
107
41
 
108
- Draft Refinement → Ready to Bounce → Bouncing → QA Passed → Architect Passed → Sprint Review → Done
109
- Refinement Probing/Spiking Refinement (L4 spike loop)
110
- Any Parking Lot (deferred)
111
- Bouncing → Escalated (3+ failures)
42
+ ### After Implementation
43
+ 8. **Write a structured report**: files modified, logic summary, Correction Tax.
44
+ 9. **Flag lessons**. Gotchas and multi-attempt fixes get flagged for recording.
112
45
 
113
- ## Complexity Labels
46
+ ### Always
47
+ 10. **Reports are the only handoff**. No direct agent-to-agent communication.
48
+ 11. **One source of truth**. Reference upstream documents, don't duplicate.
49
+ 12. **Change Logs are mandatory** on every document modification.
50
+ 13. **Agent Reports MUST use YAML Frontmatter**. Every `.bounce/report/` file starts with strict YAML.
51
+ 14. **Framework Integrity**. Any modification to `brains/`, `skills/`, `templates/`, or `scripts/` MUST be recorded in `brains/CHANGELOG.md` and reflected in `MANIFEST.md`.
114
52
 
115
- - L1: Trivial — Single file, <1hr, known pattern.
116
- - L2: Standard — 2-3 files, known pattern, ~2-4hr. (default)
117
- - L3: Complex — Cross-cutting, spike may be needed, ~1-2 days.
118
- - L4: Uncertain — Requires Probing/Spiking before Bounce, >2 days.
53
+ ## Skills
119
54
 
120
- ## Critical Rules
55
+ Skills are in the `skills/` directory. Each skill has a `SKILL.md` with instructions.
121
56
 
122
- ### Before Writing Code
123
- 1. Read LESSONS.md at the project root. Every time. No exceptions.
124
- 2. Read the Story spec (§1 The Spec + §3 Implementation Guide). Do not infer requirements.
125
- 3. Check ADRs in the Roadmap (§3). Comply with recorded architecture decisions.
57
+ **Loaded by phase** (see Phase Routing above):
58
+ - **Always:** Read `skills/lesson/SKILL.md`
59
+ - **Planning (Phase 1 & 2):** Read `skills/doc-manager/SKILL.md` + `skills/product-graph/SKILL.md`
60
+ - **Execution (Phase 3):** Read `skills/agent-team/SKILL.md`
126
61
 
127
- ### During Implementation
128
- 4. Follow the Safe Zone. No new patterns or libraries without Architect approval.
129
- 5. No Gold-Plating. Implement exactly what the Story specifies.
130
- 6. Write Self-Documenting Code. JSDoc/docstrings required on all exports to prevent RAG poisoning.
131
- 7. Self-assess Correction Tax. Track % human intervention.
62
+ **On-demand:** `vibe-code-review`, `react-best-practices`, `write-skill`, `improve`, `file-organization`
132
63
 
133
- ### After Implementation
134
- 7. Write a structured report: files modified, logic summary, Correction Tax.
135
- 8. Flag lessons. Gotchas and multi-attempt fixes get flagged for recording.
64
+ ## Quick Reference
136
65
 
137
- ### Always
138
- 9. Reports are the only handoff. No direct agent-to-agent communication.
139
- 10. One source of truth. Reference upstream documents, don't duplicate.
140
- 11. Change Logs are mandatory on every document modification.
141
- 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.
142
- 13. Framework Integrity. Any modification to a `brains/`, `skills/`, `templates/`, or `scripts/` file MUST be recorded in `brains/CHANGELOG.md` and reflected in `MANIFEST.md`.
143
-
144
- ## Framework Structure
145
-
146
- ```
147
- V-Bounce Engine/
148
- ├── brains/ — Agent brain files (this file)
149
- ├── templates/ — Document templates (immutable)
150
- ├── skills/ — Agent skills (SKILL.md files)
151
- ├── scripts/ — Automation scripts (e.g., hotfix_manager.sh)
152
- └── docs/ — Reference docs (e.g., HOTFIX_EDGE_CASES.md)
153
- ```
154
-
155
- ## Document Locations
156
-
157
- Planning docs live in `product_plans/`. It uses a state-based architecture (`strategy/`, `backlog/`, `sprints/`, `archive/`). Completed items are archived to `product_plans/archive/`.
158
-
159
- | Document | Output |
160
- |----------|--------|
161
- | Charter | `product_plans/strategy/{project}_charter.md` |
162
- | Roadmap | `product_plans/strategy/{project}_roadmap.md` |
163
- | Risk Registry | `product_plans/strategy/RISK_REGISTRY.md` |
164
- | Delivery Plan | `product_plans/D-{NN}_{release_name}/D-{NN}_DELIVERY_PLAN.md` |
165
- | Sprint Plan | `product_plans/sprints/sprint-{XX}/sprint-{XX}.md` |
166
- | Epic | `product_plans/backlog/EPIC-{NNN}_{name}/EPIC-{NNN}.md` |
167
- | Story | `product_plans/backlog/EPIC-{NNN}_{name}/STORY-{EpicID}-{StoryID}-{StoryName}.md` |
168
- | Sprint Report | `.bounce/sprint-report-S-{XX}.md` |
169
- | Product Docs | `vdocs/*.md` + `_manifest.json` |
170
-
171
- ## Report Formats
172
-
173
- Dev Report: Files modified, logic summary, Correction Tax, lessons flagged, product docs affected.
174
- QA Report: Pass/fail, bug descriptions, Gold-Plating audit, plain-language explanations.
175
- Architect Report: Compliance score, ADR check, AI-ism findings, regression assessment, refactors.
176
- DevOps Report: Merge status, conflict resolution, post-merge validation, environment changes, deployment status.
177
- Scribe Report: Mode (init/audit/create), docs created/updated/removed, coverage assessment, accuracy check.
178
- 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).
66
+ - **Document ops:** `skills/doc-manager/SKILL.md` — hierarchy, cascade rules, planning workflows
67
+ - **Product graph:** `.bounce/product-graph.json` document relationships and state
68
+ - **Bounce orchestration:** `skills/agent-team/SKILL.md` agent delegation, sprint execution
69
+ - **Planning docs:** `product_plans/` `strategy/`, `backlog/`, `sprints/`, `hotfixes/`, `archive/`
70
+ - **Sprint state:** `.bounce/state.json` machine-readable sprint state
71
+ - **Framework map:** `MANIFEST.md` complete file and process registry
@@ -3,6 +3,119 @@
3
3
  This log tracks modifications to the core agentic framework (e.g., `brains/`, `skills/`).
4
4
  Per **Rule 13: Framework Integrity**, anytime an entry is made here, all tool-specific brain files must be reviewed for consistency.
5
5
 
6
+ ## [2026-03-22] — Bug & Change Request Templates + Process Fixes
7
+
8
+ ### Bug Report Template (New)
9
+ - **Added**: `templates/bug.md` — documents defects found mid-sprint or post-sprint. YAML frontmatter (bug_id, status, severity, found_during, affected_story, reporter). Sections: The Bug (repro steps, expected/actual), Impact (blocking?, affected areas, data impact), Fix Approach (root cause, files, complexity), Verification. Triage rule: L1 bugs use hotfix.md, larger bugs use this template.
10
+
11
+ ### Change Request Template (New)
12
+ - **Added**: `templates/change_request.md` — documents scope changes or approach changes mid-sprint. YAML frontmatter (cr_id, status, category, urgency, affected_stories, requestor). Sections: The Change (original vs proposed), Impact Assessment (affected stories, sprint impact, risk), Decision (human approves/rejects/defers), Execution Plan. Categories: Scope Change and Approach Change (from mid-sprint-triage.md).
13
+
14
+ ### Mid-Sprint Triage Update
15
+ - **Modified**: `skills/agent-team/references/mid-sprint-triage.md` — added Template column to categorization table linking each category to its template. Added decision tree that routes L1 bugs to hotfix.md, larger bugs to bug.md, scope/approach changes to change_request.md, spec clarifications to inline updates. Added Step 4 (present to human). Updated Sprint Report tracking table with Document column.
16
+
17
+ ### Doc-Manager Update
18
+ - **Modified**: `skills/doc-manager/SKILL.md` — added Bug Report and Change Request to Template Locations table.
19
+
20
+ ### Sprint Template Improvements
21
+ - **Modified**: `templates/sprint.md` — added Shared File Map table to §2 (forces explicit merge ordering for parallel stories touching same files). Added Execution Mode table (L1→Fast Track, L2→needs human approval, L3/L4→Full Bounce always). Updated Dependency Chain reason column to include "shared file" as a dependency type.
22
+
23
+ ### Process Fixes
24
+ - **Modified**: `skills/agent-team/SKILL.md` — pre-gate scan escalation after 3 failures (present to human with options). Post-merge test failure recovery path (revert → return to Dev → re-enter Step 2 → escalate after 3). Integration audit fix stories go to backlog (not current sprint) unless release-blocking. Delivery Plan Sync table clarified: updates ONLY at sprint close.
25
+ - **Modified**: `skills/doc-manager/SKILL.md` — added Complexity Labels (L1-L4) to TRANSITION section. Epic readiness gate changed from "reviewed" to "decided mitigation OR explicitly accepted as known risk."
26
+ - **Modified**: `skills/improve/SKILL.md` — fixed stale `pre_bounce_sync.sh` references → `vbounce doctor`. Clarified improvement cadence: analysis runs every sprint, applying is human's call.
27
+ - **Modified**: `brains/CLAUDE.md`, `brains/GEMINI.md`, `brains/AGENTS.md` — replaced "Follow the Safe Zone" with "Comply with ADRs" (concrete, already enforced by Architect).
28
+ - **Modified**: `bin/vbounce.mjs` — install now creates LESSONS.md if missing.
29
+ - **Modified**: `MANIFEST.md` — added bug.md and change_request.md to Template Registry. Updated template count (10→12).
30
+
31
+ ---
32
+
33
+ ## [2026-03-22] — Ownership Restructure: Eliminate Process Knowledge Duplication
34
+
35
+ ### Problem
36
+ Process knowledge (cascade rules, document hierarchy, critical rules, script registry, story states) was duplicated 2-3x across process-guide skill, doc-manager skill, MANIFEST.md, and brain files. Six concepts had no clear single owner, creating drift risk.
37
+
38
+ ### Solution: Each concept has exactly ONE owner
39
+
40
+ **Ownership map:**
41
+ - **Brain files** own: identity, phase routing table, critical rules (14 rules), skill loading
42
+ - **doc-manager** owns: document hierarchy, information flow, cascade rules, story states, complexity labels, ambiguity rubric, planning workflows, transitions, archiving
43
+ - **agent-team** owns: bounce sequence, worktrees, reports, git strategy, escalation, cleanup
44
+ - **product-graph** owns: graph JSON interpretation, impact analysis, blocked document detection
45
+ - **lesson** owns: lesson recording, graduation
46
+ - **MANIFEST.md** owns: file/skill/script registries, file counts, version tracking (maintainer tool, not deployed)
47
+
48
+ ### Changes
49
+
50
+ #### Deleted
51
+ - **Deleted**: `skills/process-guide/SKILL.md` — its content was distributed:
52
+ - Phase routing table → brain files (all three)
53
+ - Critical rules (14 rules) → brain files (all three)
54
+ - Script registry → deleted (redundant with CLI `--help` and each skill mentioning its own scripts)
55
+ - Cascade rules → already in doc-manager (single owner)
56
+ - Story states → already in doc-manager (single owner)
57
+ - Document hierarchy → already in doc-manager (single owner)
58
+ - Complexity labels → moved to doc-manager
59
+
60
+ #### Modified
61
+ - **Modified**: `skills/doc-manager/SKILL.md` — added Complexity Labels section (L1-L4 definitions) to TRANSITION area. doc-manager is now the single owner of all document-related cross-cutting concepts.
62
+ - **Modified**: `brains/CLAUDE.md` — added Phase Routing table (~10 lines) and Critical Rules (14 rules, ~25 lines). Removed process-guide references. ~85 lines total.
63
+ - **Modified**: `brains/GEMINI.md` — mirrored: added Phase Routing + Critical Rules, removed process-guide references. ~95 lines total (includes CLI commands).
64
+ - **Modified**: `brains/AGENTS.md` — mirrored: added Phase Routing + Critical Rules, removed process-guide references. ~70 lines total.
65
+ - **Modified**: `MANIFEST.md` — removed process-guide from Skill Registry. Updated skill count (48→47). Updated total count.
66
+
67
+ ### Sync Notes
68
+ - All three main brain files (CLAUDE.md, GEMINI.md, AGENTS.md) have identical Phase Routing and Critical Rules sections.
69
+ - Cursor rules and Tier 4 brains (copilot, windsurf) not yet updated — should be synced in a follow-up change.
70
+
71
+ ---
72
+
73
+ ## [2026-03-22] — Product Graph + Process Awareness (EPIC-003 + EPIC-004)
74
+
75
+ ### Product Graph (EPIC-003)
76
+
77
+ #### Graph Generation Script (New)
78
+ - **Added**: `scripts/product_graph.mjs` — scans `product_plans/` active directories (strategy/, backlog/, sprints/, hotfixes/), extracts YAML frontmatter, outputs `.bounce/product-graph.json` with nodes (type, status, ambiguity, path, title) and edges (parent, depends-on, unlocks, context-source, feeds). Graceful empty graph for missing/empty product_plans/, skips malformed YAML with warning.
79
+
80
+ #### Impact Analysis Script (New)
81
+ - **Added**: `scripts/product_impact.mjs` — queries "what's affected by X?" using BFS traversal of the product graph. Outputs direct dependents, transitive dependents, upstream feeders. Visited-set for cycle protection. Supports `--json` output mode.
82
+
83
+ #### Product Graph Skill (New)
84
+ - **Added**: `skills/product-graph/SKILL.md` — interpretation rules for the product graph JSON. Three-tier loading protocol (graph JSON → specific frontmatter → full documents). Edge type semantics, regeneration triggers, blocked document detection logic.
85
+
86
+ #### CLI Wiring
87
+ - **Modified**: `bin/vbounce.mjs` — added `graph` command (`vbounce graph [generate]`, `vbounce graph impact <DOC-ID>`). Updated help text.
88
+
89
+ #### Sprint Lifecycle Integration
90
+ - **Modified**: `scripts/init_sprint.mjs` — added non-blocking product graph regeneration after sprint init.
91
+ - **Modified**: `scripts/complete_story.mjs` — added non-blocking product graph regeneration after story completion.
92
+ - **Modified**: `scripts/close_sprint.mjs` — added non-blocking product graph regeneration after sprint close.
93
+
94
+ #### Doc-Manager Cascade Rule
95
+ - **Modified**: `skills/doc-manager/SKILL.md` — added cascade rule: "After any cascade, run `vbounce graph` to regenerate the product graph."
96
+
97
+ ### Process Awareness (EPIC-004)
98
+
99
+ #### Process-Guide Skill (New)
100
+ - **Added**: `skills/process-guide/SKILL.md` — condensed process intelligence from MANIFEST.md, doc-manager, and CLAUDE.md. Contains: process flow (4 phases), phase routing table (user intent → phase → skill to load), script registry (all scripts by category), document hierarchy and cascade rules, story states, complexity labels, self-improvement awareness, and all 14 critical rules. ~200 lines, ~3,000 tokens.
101
+
102
+ #### Brain File Slim-Down
103
+ - **Modified**: `brains/CLAUDE.md` — reduced from ~259 lines to ~55 lines. Moved process flow (Phase 1-4), critical rules, document locations, report formats, story states, complexity labels to process-guide skill. Kept: identity, skill pointers (with phase-based loading), subagent table, quick reference. agent-team now loads only during Phase 3 (was always-loaded).
104
+ - **Modified**: `brains/GEMINI.md` — mirrored slim-down. Skill loading now phase-based (process-guide always, doc-manager/product-graph for planning, agent-team for execution). Kept CLI commands section and quick reference.
105
+ - **Modified**: `brains/AGENTS.md` — mirrored slim-down. Same phase-based skill loading structure.
106
+
107
+ #### Agent-Team Conditional Loading
108
+ - **Modified**: `brains/CLAUDE.md` Skills section — agent-team is no longer `@`-included (always-loaded). Instead, it loads on-demand when entering Phase 3. Only lesson remains always-loaded via `@`. Context budget reduced from ~9,000 tokens always to ~500 tokens always + ~3,000 during planning + ~9,000 during execution.
109
+
110
+ ### Integration
111
+ - **Modified**: `MANIFEST.md` — added process-guide and product-graph to Skill Registry. Added product_graph.mjs and product_impact.mjs to Script Registry (new "Product Graph" category). Updated Process Flow to reference new skills. Updated file counts (skills: 46→48, scripts: 24→26, total: ~162→~166). Version bumped to 2.1.0.
112
+
113
+ ### Sync Notes
114
+ - All three main brain files (CLAUDE.md, GEMINI.md, AGENTS.md) are consistent in their skill loading structure and quick reference section.
115
+ - Cursor rules and Tier 4 brains (copilot, windsurf) not yet updated — should be synced in a follow-up change.
116
+
117
+ ---
118
+
6
119
  ## [2026-03-13] — Discovery Phase: Structured Spike System
7
120
 
8
121
  ### Spike Template (New)