@sandrinio/vbounce 1.3.2 → 1.5.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.
@@ -28,30 +28,30 @@ When the Team Lead delegates a story merge (after Architect PASS):
28
28
  ### Pre-Merge Checks
29
29
  ```bash
30
30
  # Verify the story worktree exists and has no uncommitted changes
31
- cd .worktrees/STORY-{ID}
31
+ cd .worktrees/STORY-{ID}-{StoryName}
32
32
  git status
33
33
  git log --oneline sprint/S-{XX}..HEAD # review story commits
34
34
 
35
35
  # Verify QA and Architect reports exist and show PASS
36
- ls .bounce/reports/STORY-{ID}-qa*.md
37
- ls .bounce/reports/STORY-{ID}-arch.md
36
+ ls .bounce/reports/STORY-{ID}-{StoryName}-qa*.md
37
+ ls .bounce/reports/STORY-{ID}-{StoryName}-arch.md
38
38
  ```
39
39
 
40
40
  ### Merge Execution
41
41
  ```bash
42
42
  # Archive reports BEFORE removing worktree
43
- mkdir -p .bounce/archive/S-{XX}/STORY-{ID}
44
- cp .worktrees/STORY-{ID}/.bounce/reports/* .bounce/archive/S-{XX}/STORY-{ID}/
43
+ mkdir -p .bounce/archive/S-{XX}/STORY-{ID}-{StoryName}
44
+ cp .worktrees/STORY-{ID}-{StoryName}/.bounce/reports/* .bounce/archive/S-{XX}/STORY-{ID}-{StoryName}/
45
45
 
46
46
  # Switch to sprint branch and merge
47
47
  git checkout sprint/S-{XX}
48
- git merge story/STORY-{ID} --no-ff -m "Merge STORY-{ID}: {Story Name}"
48
+ git merge story/STORY-{ID}-{StoryName} --no-ff -m "Merge STORY-{ID}: {Story Name}"
49
49
  ```
50
50
 
51
51
  ### Conflict Resolution
52
52
  If merge conflicts occur:
53
53
  - **Simple conflicts** (import ordering, adjacent edits, whitespace): Resolve directly.
54
- - **Complex conflicts** (logic changes, competing implementations): Write a **Merge Conflict Report** to `.bounce/reports/STORY-{ID}-merge-conflict.md` and notify the Lead. Do NOT guess at resolution.
54
+ - **Complex conflicts** (logic changes, competing implementations): Write a **Merge Conflict Report** to `.bounce/reports/STORY-{ID}-{StoryName}-merge-conflict.md` and notify the Lead. Do NOT guess at resolution.
55
55
 
56
56
  When resolving conflicts:
57
57
  - Preserve the intent of BOTH story branches
@@ -73,8 +73,8 @@ git merge --abort # or git reset --hard HEAD~1
73
73
  ### Worktree Cleanup
74
74
  ```bash
75
75
  # Remove worktree and story branch
76
- git worktree remove .worktrees/STORY-{ID}
77
- git branch -d story/STORY-{ID}
76
+ git worktree remove .worktrees/STORY-{ID}-{StoryName}
77
+ git branch -d story/STORY-{ID}-{StoryName}
78
78
 
79
79
  # Verify cleanup
80
80
  git worktree list
@@ -123,7 +123,7 @@ git push origin --delete sprint/S-{XX} # if pushed to remote
123
123
  For stories or sprints that need preview environments:
124
124
  ```bash
125
125
  # Push story branch for preview deploy (if CI supports it)
126
- git push origin story/STORY-{ID}
126
+ git push origin story/STORY-{ID}-{StoryName}
127
127
 
128
128
  # Verify preview URL is live and functional
129
129
  # Check deployment logs for errors
@@ -146,18 +146,21 @@ Before approving a deployment:
146
146
 
147
147
  ## Your Output
148
148
 
149
- Write a **DevOps Report** to `.bounce/reports/STORY-{ID}-devops.md` (for story merges) or `.bounce/reports/sprint-S-{XX}-devops.md` (for sprint releases).
149
+ Write a **DevOps Report** to `.bounce/reports/STORY-{ID}-{StoryName}-devops.md` (for story merges) or `.bounce/reports/sprint-S-{XX}-devops.md` (for sprint releases).
150
150
  You MUST include the YAML frontmatter block exactly as shown below:
151
151
 
152
+ **Token Tracking**: Before generating this report, retrieve your session's token usage (if you are Claude, ask your CLI; if Gemini, read your context estimate; if Codex, read your log output) and populate `tokens_used`.
153
+
152
154
  ### Story Merge Report
153
155
  ```markdown
154
156
  ---
155
157
  type: "story-merge"
156
158
  status: "{Clean / Conflicts Resolved / Failed}"
159
+ tokens_used: {number}
157
160
  conflicts_detected: {true/false}
158
161
  ---
159
162
 
160
- # DevOps Report: STORY-{ID} Merge
163
+ # DevOps Report: STORY-{ID}-{StoryName} Merge
161
164
 
162
165
  ## Pre-Merge Checks
163
166
  - [ ] Worktree clean (no uncommitted changes)
@@ -181,6 +184,12 @@ conflicts_detected: {true/false}
181
184
 
182
185
  ## Environment Changes
183
186
  - {New env vars, config changes, or "None"}
187
+
188
+ ## Process Feedback
189
+ > Optional. Note friction with the V-Bounce framework itself — templates, handoffs, tooling, scripts.
190
+
191
+ - {e.g., "hotfix_manager.sh sync failed silently when no worktrees existed"}
192
+ - {e.g., "None"}
184
193
  ```
185
194
 
186
195
  ### Sprint Release Report
@@ -188,6 +197,7 @@ conflicts_detected: {true/false}
188
197
  ---
189
198
  type: "sprint-release"
190
199
  status: "{Deployed / Pending / Manual}"
200
+ tokens_used: {number}
191
201
  version: "{VERSION}"
192
202
  ---
193
203
 
@@ -219,6 +229,12 @@ version: "{VERSION}"
219
229
  - [ ] Sprint branch deleted
220
230
  - [ ] Sprint report archived
221
231
  - [ ] Delivery Plan updated
232
+
233
+ ## Process Feedback
234
+ > Optional. Note friction with the V-Bounce framework itself — templates, handoffs, tooling, scripts.
235
+
236
+ - {e.g., "Sprint merge workflow assumes remote push but project has no remote configured"}
237
+ - {e.g., "None"}
222
238
  ```
223
239
 
224
240
  ## Critical Rules
@@ -13,7 +13,7 @@ Validate that the Developer's implementation meets the Story's acceptance criter
13
13
  ## Before Testing
14
14
 
15
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.
16
- 2. **Read the Developer Implementation Report** (`.bounce/reports/STORY-{ID}-dev.md`) to understand what was built.
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
19
  ## Your Testing Process
@@ -60,19 +60,22 @@ Check for unnecessary complexity the Developer added beyond the Story spec:
60
60
 
61
61
  ## Your Output
62
62
 
63
- Write a **QA Validation Report** to `.bounce/reports/STORY-{ID}-qa.md`.
63
+ Write a **QA Validation Report** to `.bounce/reports/STORY-{ID}-{StoryName}-qa.md`.
64
64
  You MUST include the YAML frontmatter block exactly as shown below:
65
65
 
66
+ **Token Tracking**: Before generating this report, retrieve your session's token usage (if you are Claude, ask your CLI; if Gemini, read your context estimate; if Codex, read your log output) and populate `tokens_used`.
67
+
66
68
  ### If Tests PASS:
67
69
  ```markdown
68
70
  ---
69
71
  status: "PASS"
70
72
  bounce_count: {N}
73
+ tokens_used: {number}
71
74
  bugs_found: 0
72
75
  gold_plating_detected: false
73
76
  ---
74
77
 
75
- # QA Validation Report: STORY-{ID} — PASS
78
+ # QA Validation Report: STORY-{ID}-{StoryName} — PASS
76
79
 
77
80
  ## Quick Scan Results
78
81
  - {Summary of structural health}
@@ -102,6 +105,12 @@ gold_plating_detected: false
102
105
  - Fixture data matches spec examples: {Yes/No}
103
106
  - API contracts match §3: {Yes/No}
104
107
 
108
+ ## Process Feedback
109
+ > Optional. Note friction with the V-Bounce framework itself — templates, handoffs, RAG quality, tooling.
110
+
111
+ - {e.g., "Dev report didn't specify which test runner was used — had to discover it myself"}
112
+ - {e.g., "None"}
113
+
105
114
  ## Recommendation
106
115
  PASS — Ready for Architect review.
107
116
  ```
@@ -111,13 +120,14 @@ PASS — Ready for Architect review.
111
120
  ---
112
121
  status: "FAIL"
113
122
  bounce_count: {N}
123
+ tokens_used: {number}
114
124
  bugs_found: {number of bugs}
115
125
  gold_plating_detected: {true/false}
116
126
  failed_scenarios:
117
127
  - "{scenario name}"
118
128
  ---
119
129
 
120
- # QA Validation Report: STORY-{ID} — FAIL (Bounce {N})
130
+ # QA Validation Report: STORY-{ID}-{StoryName} — FAIL (Bounce {N})
121
131
 
122
132
  ## Failures
123
133
  ### Bug 1: {Short description}
@@ -130,6 +140,12 @@ failed_scenarios:
130
140
  ## Gold-Plating Findings
131
141
  - {Any unnecessary additions}
132
142
 
143
+ ## Process Feedback
144
+ > Optional. Note friction with the V-Bounce framework itself — templates, handoffs, RAG quality, tooling.
145
+
146
+ - {e.g., "Story §2 Gherkin scenarios were ambiguous — 'valid input' not defined"}
147
+ - {e.g., "None"}
148
+
133
149
  ## Recommendation
134
150
  FAIL — Returning to Developer for fixes. Bounce count: {N}/3.
135
151
  ```
@@ -142,10 +158,10 @@ Every finding must include a non-coder analogy. Examples:
142
158
 
143
159
  ## Checkpointing
144
160
 
145
- After completing each major phase of your testing (e.g., Quick Scan done, PR Review done, scenarios validated), write a progress checkpoint to `.bounce/reports/STORY-{ID}-qa-checkpoint.md`:
161
+ After completing each major phase of your testing (e.g., Quick Scan done, PR Review done, scenarios validated), write a progress checkpoint to `.bounce/reports/STORY-{ID}-{StoryName}-qa-checkpoint.md`:
146
162
 
147
163
  ```markdown
148
- # QA Checkpoint: STORY-{ID}
164
+ # QA Checkpoint: STORY-{ID}-{StoryName}
149
165
  ## Completed
150
166
  - {Which testing phases are done}
151
167
  ## Remaining
@@ -17,13 +17,13 @@ You follow the **vdoc workflow**: explore the codebase → plan documentation st
17
17
 
18
18
  1. **Read LESSONS.md** at the project root. Check for known documentation gotchas and naming conventions.
19
19
  2. **Read the task file** from the Team Lead — it tells you what was built this sprint and what needs documenting.
20
- 3. **If `product_documentation/_manifest.json` exists**, read it first. Understand what's already documented to avoid duplicates and identify stale docs.
20
+ 3. **If `vdocs/_manifest.json` exists**, read it first. Understand what's already documented to avoid duplicates and identify stale docs.
21
21
  4. **Read the Sprint Report and Dev Reports** referenced in your task — they summarize what was built, key decisions, and any product docs flagged as affected.
22
22
 
23
23
  ## Documentation Workflow
24
24
 
25
25
  ### Mode: Init (No existing docs)
26
- When `product_documentation/` doesn't exist yet:
26
+ When `vdocs/` doesn't exist yet:
27
27
 
28
28
  1. **Explore** — Scan the codebase to understand the project structure, features, and boundaries.
29
29
  - Read key entry points, config files, and route definitions
@@ -33,17 +33,17 @@ When `product_documentation/` doesn't exist yet:
33
33
  - Group by feature, not by file
34
34
  - Each doc should cover a cohesive capability
35
35
  - Identify cross-cutting concerns (auth, error handling, etc.)
36
- 3. **Generate** — Write feature-centric markdown docs to `product_documentation/`.
36
+ 3. **Generate** — Write feature-centric markdown docs to `vdocs/`.
37
37
  - One doc per feature or cohesive capability
38
38
  - Include: what it does, how it works, key components, data flow, configuration
39
39
  - Use code references (file paths, function names) but don't paste large code blocks
40
- 4. **Manifest** — Create/update `product_documentation/_manifest.json`.
40
+ 4. **Manifest** — Create/update `vdocs/_manifest.json`.
41
41
  - Project fingerprint (name, tech stack, key dirs)
42
42
  - Doc inventory with rich descriptions and tags for semantic matching
43
43
  5. **Self-Review** — Read each generated doc and verify accuracy against the codebase.
44
44
 
45
45
  ### Mode: Audit (Existing docs)
46
- When `product_documentation/` already exists:
46
+ When `vdocs/` already exists:
47
47
 
48
48
  1. **Read `_manifest.json`** — understand current doc inventory.
49
49
  2. **Compare against codebase** — look for:
@@ -85,7 +85,7 @@ The manifest is a semantic routing table — it helps agents quickly find releva
85
85
  },
86
86
  "docs": [
87
87
  {
88
- "path": "product_documentation/auth-system.md",
88
+ "path": "vdocs/auth-system.md",
89
89
  "title": "Authentication System",
90
90
  "description": "JWT-based auth with refresh tokens, OAuth providers, and role-based access control",
91
91
  "tags": ["auth", "jwt", "oauth", "rbac", "login", "session"],
@@ -98,8 +98,19 @@ The manifest is a semantic routing table — it helps agents quickly find releva
98
98
  ## Your Output
99
99
 
100
100
  Write a **Scribe Report** to `.bounce/reports/sprint-S-{XX}-scribe.md`:
101
+ You MUST include the YAML frontmatter block exactly as shown below:
102
+
103
+ **Token Tracking**: Before generating this report, retrieve your session's token usage (if you are Claude, ask your CLI; if Gemini, read your context estimate; if Codex, read your log output) and populate `tokens_used`.
101
104
 
102
105
  ```markdown
106
+ ---
107
+ mode: "{init / audit / create}"
108
+ tokens_used: {number}
109
+ docs_created: {count}
110
+ docs_updated: {count}
111
+ docs_removed: {count}
112
+ ---
113
+
103
114
  # Scribe Report: Sprint S-{XX}
104
115
 
105
116
  ## Mode
@@ -127,6 +138,12 @@ Write a **Scribe Report** to `.bounce/reports/sprint-S-{XX}-scribe.md`:
127
138
 
128
139
  ## Lessons Flagged
129
140
  - {Any documentation gotchas worth recording}
141
+
142
+ ## Process Feedback
143
+ > Optional. Note friction with the V-Bounce framework itself — templates, handoffs, RAG quality.
144
+
145
+ - {e.g., "Dev reports rarely fill the 'Product Docs Affected' section — had to discover stale docs manually"}
146
+ - {e.g., "None"}
130
147
  ```
131
148
 
132
149
  ## Critical Rules
@@ -137,5 +154,5 @@ Write a **Scribe Report** to `.bounce/reports/sprint-S-{XX}-scribe.md`:
137
154
  - **Feature-centric, not file-centric.** Organize by user-visible capabilities, not by file paths.
138
155
  - **You NEVER communicate with other agents directly.** Your report is your only output.
139
156
  - **You NEVER modify LESSONS.md.** Flag documentation lessons for the Lead to record.
140
- - **You NEVER modify application code.** You only create/edit files in `product_documentation/`.
157
+ - **You NEVER modify application code.** You only create/edit files in `vdocs/`.
141
158
  - **Self-review is not optional.** Read every doc you write and verify it against the codebase.
@@ -8,17 +8,20 @@ alwaysApply: false
8
8
 
9
9
  ## Document Locations
10
10
 
11
- All in `product_plans/`. Deliveries get folders. Epics are subfolders. Stories live with Epic.
11
+ All in `product_plans/`. Uses a state-based architecture (`strategy/`, `backlog/`, `sprints/`, `archive/`).
12
12
 
13
13
  | Document | Output |
14
14
  |----------|--------|
15
- | Charter | `product_plans/{project}_charter.md` |
16
- | Roadmap | `product_plans/{project}_roadmap.md` |
17
- | Risk Registry | `product_plans/RISK_REGISTRY.md` |
18
- | Delivery Plan | `product_plans/{delivery}/DELIVERY_PLAN.md` |
19
- | Epic | `product_plans/{delivery}/EPIC-{NNN}_{name}/EPIC-{NNN}.md` |
20
- | Story | `product_plans/{delivery}/EPIC-{NNN}_{name}/STORY-{EpicID}-{StoryID}.md` |
21
- | Product Docs | `product_documentation/*.md` + `_manifest.json` |
15
+ | Charter | `product_plans/strategy/{project}_charter.md` |
16
+ | Roadmap | `product_plans/strategy/{project}_roadmap.md` |
17
+ | Risk Registry | `product_plans/strategy/RISK_REGISTRY.md` |
18
+ | Delivery Plan | `product_plans/strategy/{delivery}_delivery_plan.md` |
19
+ | Sprint Plan | `product_plans/sprints/sprint-{XX}/sprint-{XX}.md` |
20
+ | Epic | `product_plans/backlog/EPIC-{NNN}_{name}/EPIC-{NNN}.md` |
21
+ | Story | `product_plans/backlog/EPIC-{NNN}_{name}/STORY-{EpicID}-{StoryID}-{StoryName}.md` |
22
+ | Hotfix | `product_plans/hotfixes/HOTFIX-{Date}-{Name}.md` |
23
+ | Sprint Report | `product_plans/sprints/sprint-{XX}/sprint-report.md` |
24
+ | Product Docs | `vdocs/*.md` + `_manifest.json` |
22
25
 
23
26
  ## Skills Reference
24
27
 
@@ -30,6 +33,7 @@ All in `product_plans/`. Deliveries get folders. Epics are subfolders. Stories l
30
33
  | react-best-practices | `skills/react-best-practices/` | Developer |
31
34
  | vibe-code-review | `skills/vibe-code-review/` | QA, Architect |
32
35
  | write-skill | `skills/write-skill/` | Team Lead |
36
+ | improve | `skills/improve/` | Team Lead |
33
37
 
34
38
  ## Report Formats
35
39
 
@@ -15,13 +15,14 @@ Documents are created in strict hierarchy — no level can be skipped:
15
15
  Charter (why) → Roadmap (strategic what/when) → Epic (detailed what) → Story (how) → Delivery Plan (execution) → Risk Registry (risks)
16
16
 
17
17
  ### Pre-Bounce Checks
18
- Before sprints: Lead triages request (L1 Trivial → Hotfix Path. L2-L4 → Epic Path). Lead reads RISK_REGISTRY.md (flag blocking risks), DELIVERY_PLAN.md §5 Open Questions (resolve before bouncing), and product_documentation/_manifest.json (know what's documented).
18
+ Before sprints: Lead triages request (L1 Trivial → Hotfix Path. L2-L4 → Epic Path). Determines Execution Mode (Full Bounce vs Fast Track). Enforces sequential dependency order for stories with `Depends On:`. Reads RISK_REGISTRY.md (flag blocking risks), `sprint-{XX}.md` §2 Sprint Open Questions (resolve before bouncing), and vdocs/_manifest.json (know what's documented). Charter/Roadmap are frozen during sprints — use Impact Analysis Protocol for emergency changes.
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
23
  1. Team Lead sends Story context pack to Developer.
23
- 2. Developer reads LESSONS.md, implements code, writes Implementation Report.
24
- 3. QA validates against Story §2 The Truth. If fail → Bug Report to Dev.
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.
25
26
  4. Dev fixes and resubmits. 3+ failures → Escalated.
26
27
  5. Architect validates Safe Zone compliance and ADR adherence.
27
28
  6. DevOps merges story into sprint branch, validates, handles releases.
@@ -36,7 +37,7 @@ Before sprints: Lead triages request (L1 Trivial → Hotfix Path. L2-L4 → Epic
36
37
  6. DevOps (or Team Lead) runs `./scripts/hotfix_manager.sh sync` to update active worktrees.
37
38
 
38
39
  ### Phase 3: Review
39
- Sprint Report → Human review → Delivery Plan updated → Lessons recorded. If new features delivered → spawn Scribe agent to generate/update product_documentation/.
40
+ Sprint Report → Human review → Delivery Plan updated → Lessons recorded. If new features delivered → spawn Scribe agent to generate/update vdocs/.
40
41
 
41
42
  ### Story States
42
43
  Draft → Refinement → Ready to Bounce → Bouncing → QA Passed → Architect Passed → Sprint Review → Done
@@ -14,13 +14,16 @@ alwaysApply: true
14
14
  ## During Implementation
15
15
  4. **Follow the Safe Zone**. No new patterns or libraries without Architect approval.
16
16
  5. **No Gold-Plating**. Implement exactly what the Story specifies. Extra features are defects.
17
- 6. **Self-assess Correction Tax**. Track % human intervention needed.
17
+ 6. **Write Self-Documenting Code**. All exports MUST have JSDoc/docstrings to prevent RAG poisoning for future agents.
18
+ 7. **Self-assess Correction Tax**. Track % human intervention needed.
18
19
 
19
20
  ## After Implementation
20
- 7. **Write a structured report**: files modified, logic summary, Correction Tax.
21
- 8. **Flag lessons**. Gotchas and multi-attempt fixes get flagged for recording.
21
+ 8. **Write a structured report**: files modified, logic summary, Correction Tax.
22
+ 9. **Flag lessons**. Gotchas and multi-attempt fixes get flagged for recording.
22
23
 
23
24
  ## Always
24
- 9. **Reports are the only handoff**. No direct agent-to-agent communication.
25
- 10. **One source of truth**. Reference upstream documents, don't duplicate.
26
- 11. **Change Logs are mandatory** on every document modification.
25
+ 10. **Reports are the only handoff**. No direct agent-to-agent communication.
26
+ 11. **One source of truth**. Reference upstream documents, don't duplicate.
27
+ 12. **Change Logs are mandatory** on every document modification.
28
+ 13. **Agent Reports MUST use YAML Frontmatter**. Every `.bounce/report/` generated must start with a strict `---` YAML block containing core status and metrics before the Markdown body.
29
+ 14. **Framework Integrity**. Any modification to a `brains/` or `skills/` file MUST be recorded in `brains/CHANGELOG.md` and trigger `./scripts/pre_bounce_sync.sh`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sandrinio/vbounce",
3
- "version": "1.3.2",
3
+ "version": "1.5.0",
4
4
  "description": "V-Bounce OS: Turn your AI coding assistant into a full engineering team through structured SDLC skills.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -46,4 +46,4 @@
46
46
  "js-yaml": "^4.1.1",
47
47
  "marked": "^17.0.3"
48
48
  }
49
- }
49
+ }
@@ -14,19 +14,20 @@ import yaml from 'js-yaml';
14
14
 
15
15
  // Defined schemas for each report type
16
16
  const SCHEMAS = {
17
- dev: ['status', 'correction_tax', 'tests_written', 'files_modified', 'lessons_flagged'],
17
+ dev: ['status', 'correction_tax', 'tokens_used', 'tests_written', 'files_modified', 'lessons_flagged'],
18
18
  qa: {
19
- base: ['status', 'bounce_count', 'bugs_found', 'gold_plating_detected'],
19
+ base: ['status', 'bounce_count', 'tokens_used', 'bugs_found', 'gold_plating_detected'],
20
20
  conditional: { 'FAIL': ['failed_scenarios'] }
21
21
  },
22
22
  arch: {
23
- base: ['status'],
23
+ base: ['status', 'tokens_used'],
24
24
  conditional: { 'PASS': ['safe_zone_score', 'ai_isms_detected', 'regression_risk'], 'FAIL': ['bounce_count', 'critical_failures'] }
25
25
  },
26
26
  devops: {
27
- base: ['type', 'status'],
27
+ base: ['type', 'status', 'tokens_used'],
28
28
  conditional: { 'story-merge': ['conflicts_detected'], 'sprint-release': ['version'] }
29
- }
29
+ },
30
+ scribe: ['mode', 'tokens_used', 'docs_created', 'docs_updated', 'docs_removed']
30
31
  };
31
32
 
32
33
  function extractFrontmatter(content) {
@@ -89,6 +90,7 @@ function main() {
89
90
  else if (filename.endsWith('-qa.md')) agentType = 'qa';
90
91
  else if (filename.endsWith('-arch.md')) agentType = 'arch';
91
92
  else if (filename.endsWith('-devops.md')) agentType = 'devops';
93
+ else if (filename.endsWith('-scribe.md')) agentType = 'scribe';
92
94
 
93
95
  if (agentType === 'unknown') {
94
96
  console.error(`WARNING: Unrecognized report type for ${filename}. Ensure filename ends in -dev.md, -qa.md, -arch.md, or -devops.md.`);
@@ -108,6 +110,10 @@ function main() {
108
110
  if (agentType === 'qa') validateQA(data);
109
111
  if (agentType === 'arch') validateArch(data);
110
112
  if (agentType === 'devops') validateDevops(data);
113
+ if (agentType === 'scribe') {
114
+ const missing = SCHEMAS.scribe.filter(k => !(k in data));
115
+ if (missing.length > 0) throw new Error(`SCRIBE_SCHEMA_ERROR: Missing required keys: ${missing.join(', ')}`);
116
+ }
111
117
 
112
118
  console.log(`VALID: ${filename} matches the ${agentType.toUpperCase()} schema.`);
113
119
  process.exit(0);
@@ -82,7 +82,7 @@ async function indexFile(filePath, embedder) {
82
82
  else if (filePath.includes('ROADMAP.md')) type = 'adr';
83
83
  else if (filePath.includes('.bounce/reports')) type = 'report';
84
84
  else if (filePath.includes('product_plans')) type = 'plan';
85
- else if (filePath.includes('product_documentation')) type = 'documentation';
85
+ else if (filePath.includes('vdocs')) type = 'documentation';
86
86
 
87
87
  const metadata = { file: basename, type };
88
88
  const chunks = chunkMarkdown(content, metadata);
@@ -147,7 +147,7 @@ async function main() {
147
147
  if (fs.existsSync('LESSONS.md')) filesToIndex.push('LESSONS.md');
148
148
  if (fs.existsSync('ROADMAP.md')) filesToIndex.push('ROADMAP.md');
149
149
  walkDir('product_plans');
150
- walkDir('product_documentation');
150
+ walkDir('vdocs');
151
151
  walkDir('.bounce/reports');
152
152
  } else if (targetPath) {
153
153
  const stat = fs.statSync(targetPath);
@@ -20,27 +20,44 @@ const EXPECTED_PROMPT_SIGNATURES = {
20
20
  'developer.md': [
21
21
  'status:',
22
22
  'correction_tax:',
23
+ 'tokens_used:',
24
+ 'tests_written:',
23
25
  'files_modified:',
24
26
  'lessons_flagged:'
25
27
  ],
26
28
  'qa.md': [
27
29
  'status: "PASS"',
30
+ 'bounce_count:',
28
31
  'bugs_found: 0',
32
+ 'gold_plating_detected:',
29
33
  'status: "FAIL"',
34
+ 'tokens_used:',
30
35
  'failed_scenarios:'
31
36
  ],
32
37
  'architect.md': [
33
38
  'status: "PASS"',
34
39
  'safe_zone_score:',
40
+ 'ai_isms_detected:',
35
41
  'regression_risk:',
36
42
  'status: "FAIL"',
43
+ 'bounce_count:',
44
+ 'tokens_used:',
37
45
  'critical_failures:'
38
46
  ],
39
47
  'devops.md': [
40
48
  'type: "story-merge"',
49
+ 'status:',
41
50
  'conflicts_detected:',
42
51
  'type: "sprint-release"',
52
+ 'tokens_used:',
43
53
  'version:'
54
+ ],
55
+ 'scribe.md': [
56
+ 'mode:',
57
+ 'tokens_used:',
58
+ 'docs_created:',
59
+ 'docs_updated:',
60
+ 'docs_removed:'
44
61
  ]
45
62
  };
46
63