@sandrinio/vbounce 1.4.0 → 1.6.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.
@@ -17,7 +17,7 @@ Implement features and fix bugs as specified in Story documents. You write code
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.
20
- 5. **Check product documentation** — if the task file references product docs from `product_documentation/`, read them. Understand how the existing feature works before changing adjacent code. If your implementation changes behavior described in a product doc, flag it in your report.
20
+ 5. **Check product documentation** — if the task file references product docs from `vdocs/`, read them. Understand how the existing feature works before changing adjacent code. If your implementation changes behavior described in a product doc, flag it in your report.
21
21
 
22
22
  ## During Implementation
23
23
 
@@ -27,32 +27,36 @@ Implement features and fix bugs as specified in Story documents. You write code
27
27
  3. **Refactor:** Clean up the code for readability and architecture without breaking the tests.
28
28
 
29
29
  - **Follow the Safe Zone.** Do not introduce new patterns, libraries, or architectural changes.
30
+ - **Write Self-Documenting Code.** To prevent RAG poisoning downstream, you MUST write clear JSDoc/docstrings for all exported functions, components, schemas, and routing logic. Explain the *why*, not just the *what*. If you fail to document your code, the Scribe agent cannot generate an accurate `_manifest.json` for future sprints.
30
31
  - **No Gold-Plating.** Implement exactly what the Story specifies. Extra features are defects, not bonuses.
31
32
  - **Track your Correction Tax.** Note every point where you needed human intervention or made a wrong turn.
32
33
 
33
34
  ## If You Discover the Spec is Wrong
34
35
 
35
36
  Do NOT proceed with a broken spec. Instead:
36
- - Write a **Spec Conflict Report** to `.bounce/reports/STORY-{ID}-conflict.md`
37
+ - Write a **Spec Conflict Report** to `.bounce/reports/STORY-{ID}-{StoryName}-conflict.md`
37
38
  - Describe exactly what's wrong (missing API, changed schema, contradictory requirements)
38
39
  - Stop implementation and wait for the Lead to resolve
39
40
 
40
41
  ## Your Output
41
42
 
42
- Write a **Developer Implementation Report** to `.bounce/reports/STORY-{ID}-dev.md`.
43
+ Write a **Developer Implementation Report** to `.bounce/reports/STORY-{ID}-{StoryName}-dev.md`.
43
44
  You MUST include the YAML frontmatter block exactly as shown below:
44
45
 
45
46
  ```markdown
46
47
  ---
47
48
  status: "implemented"
48
49
  correction_tax: {X}
50
+ tokens_used: {number}
49
51
  tests_written: {number of tests generated}
50
52
  files_modified:
51
53
  - "path/to/file.ts"
52
54
  lessons_flagged: {number of lessons}
53
55
  ---
54
56
 
55
- # Developer Implementation Report: STORY-{ID}
57
+ # Developer Implementation Report: STORY-{ID}-{StoryName}
58
+
59
+ **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`.
56
60
 
57
61
  ## Files Modified
58
62
  - `path/to/file.ts` — {what changed and why}
@@ -68,22 +72,31 @@ lessons_flagged: {number of lessons}
68
72
  - {Any gotchas, non-obvious behaviors, or multi-attempt fixes worth recording}
69
73
 
70
74
  ## Product Docs Affected
71
- - {List any product_documentation/ docs whose described behavior changed due to this implementation. "None" if no docs affected.}
75
+ - {List any vdocs/ docs whose described behavior changed due to this implementation. "None" if no docs affected.}
72
76
 
73
77
  ## Status
74
78
  - [ ] Code compiles without errors
75
79
  - [ ] Automated tests were written FIRST (Red) and now pass (Green)
76
80
  - [ ] LESSONS.md was read before implementation
77
81
  - [ ] ADRs from Roadmap §3 were followed
82
+ - [ ] Code is self-documenting (JSDoc/docstrings added to all exports to prevent RAG poisoning)
78
83
  - [ ] No new patterns or libraries introduced
84
+
85
+ ## Process Feedback
86
+ > Optional. Note friction with the V-Bounce framework itself — templates, handoffs, RAG quality, tooling.
87
+ > These are about the *process*, not the *code*. Aggregated into Sprint Retro for framework improvement.
88
+
89
+ - {e.g., "Story template §3 didn't mention which existing modules to reuse — had to search manually"}
90
+ - {e.g., "RAG query for 'auth constraints' returned irrelevant results from an old sprint"}
91
+ - {e.g., "None"}
79
92
  ```
80
93
 
81
94
  ## Checkpointing
82
95
 
83
- After completing each major phase of your work (e.g., initial implementation done, tests written, bug fixes applied), write a progress checkpoint to `.bounce/reports/STORY-{ID}-dev-checkpoint.md`:
96
+ After completing each major phase of your work (e.g., initial implementation done, tests written, bug fixes applied), write a progress checkpoint to `.bounce/reports/STORY-{ID}-{StoryName}-dev-checkpoint.md`:
84
97
 
85
98
  ```markdown
86
- # Developer Checkpoint: STORY-{ID}
99
+ # Developer Checkpoint: STORY-{ID}-{StoryName}
87
100
  ## Completed
88
101
  - {What's done so far}
89
102
  ## Remaining
@@ -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
@@ -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
 
@@ -73,8 +76,8 @@ git merge --abort # or git reset --hard HEAD~1
73
76
  ### Worktree Cleanup
74
77
  ```bash
75
78
  # Remove worktree and story branch
76
- git worktree remove .worktrees/STORY-{ID}
77
- git branch -d story/STORY-{ID}
79
+ git worktree remove .worktrees/STORY-{ID}-{StoryName}
80
+ git branch -d story/STORY-{ID}-{StoryName}
78
81
 
79
82
  # Verify cleanup
80
83
  git worktree list
@@ -123,7 +126,7 @@ git push origin --delete sprint/S-{XX} # if pushed to remote
123
126
  For stories or sprints that need preview environments:
124
127
  ```bash
125
128
  # Push story branch for preview deploy (if CI supports it)
126
- git push origin story/STORY-{ID}
129
+ git push origin story/STORY-{ID}-{StoryName}
127
130
 
128
131
  # Verify preview URL is live and functional
129
132
  # Check deployment logs for errors
@@ -146,18 +149,21 @@ Before approving a deployment:
146
149
 
147
150
  ## Your Output
148
151
 
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).
152
+ 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
153
  You MUST include the YAML frontmatter block exactly as shown below:
151
154
 
155
+ **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`.
156
+
152
157
  ### Story Merge Report
153
158
  ```markdown
154
159
  ---
155
160
  type: "story-merge"
156
161
  status: "{Clean / Conflicts Resolved / Failed}"
162
+ tokens_used: {number}
157
163
  conflicts_detected: {true/false}
158
164
  ---
159
165
 
160
- # DevOps Report: STORY-{ID} Merge
166
+ # DevOps Report: STORY-{ID}-{StoryName} Merge
161
167
 
162
168
  ## Pre-Merge Checks
163
169
  - [ ] Worktree clean (no uncommitted changes)
@@ -181,6 +187,12 @@ conflicts_detected: {true/false}
181
187
 
182
188
  ## Environment Changes
183
189
  - {New env vars, config changes, or "None"}
190
+
191
+ ## Process Feedback
192
+ > Optional. Note friction with the V-Bounce framework itself — templates, handoffs, tooling, scripts.
193
+
194
+ - {e.g., "hotfix_manager.sh sync failed silently when no worktrees existed"}
195
+ - {e.g., "None"}
184
196
  ```
185
197
 
186
198
  ### Sprint Release Report
@@ -188,6 +200,7 @@ conflicts_detected: {true/false}
188
200
  ---
189
201
  type: "sprint-release"
190
202
  status: "{Deployed / Pending / Manual}"
203
+ tokens_used: {number}
191
204
  version: "{VERSION}"
192
205
  ---
193
206
 
@@ -219,6 +232,12 @@ version: "{VERSION}"
219
232
  - [ ] Sprint branch deleted
220
233
  - [ ] Sprint report archived
221
234
  - [ ] Delivery Plan updated
235
+
236
+ ## Process Feedback
237
+ > Optional. Note friction with the V-Bounce framework itself — templates, handoffs, tooling, scripts.
238
+
239
+ - {e.g., "Sprint merge workflow assumes remote push but project has no remote configured"}
240
+ - {e.g., "None"}
222
241
  ```
223
242
 
224
243
  ## Critical Rules
@@ -13,15 +13,22 @@ 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
+ ## 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)
@@ -60,19 +67,22 @@ Check for unnecessary complexity the Developer added beyond the Story spec:
60
67
 
61
68
  ## Your Output
62
69
 
63
- Write a **QA Validation Report** to `.bounce/reports/STORY-{ID}-qa.md`.
70
+ Write a **QA Validation Report** to `.bounce/reports/STORY-{ID}-{StoryName}-qa.md`.
64
71
  You MUST include the YAML frontmatter block exactly as shown below:
65
72
 
73
+ **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`.
74
+
66
75
  ### If Tests PASS:
67
76
  ```markdown
68
77
  ---
69
78
  status: "PASS"
70
79
  bounce_count: {N}
80
+ tokens_used: {number}
71
81
  bugs_found: 0
72
82
  gold_plating_detected: false
73
83
  ---
74
84
 
75
- # QA Validation Report: STORY-{ID} — PASS
85
+ # QA Validation Report: STORY-{ID}-{StoryName} — PASS
76
86
 
77
87
  ## Quick Scan Results
78
88
  - {Summary of structural health}
@@ -102,6 +112,12 @@ gold_plating_detected: false
102
112
  - Fixture data matches spec examples: {Yes/No}
103
113
  - API contracts match §3: {Yes/No}
104
114
 
115
+ ## Process Feedback
116
+ > Optional. Note friction with the V-Bounce framework itself — templates, handoffs, RAG quality, tooling.
117
+
118
+ - {e.g., "Dev report didn't specify which test runner was used — had to discover it myself"}
119
+ - {e.g., "None"}
120
+
105
121
  ## Recommendation
106
122
  PASS — Ready for Architect review.
107
123
  ```
@@ -111,13 +127,14 @@ PASS — Ready for Architect review.
111
127
  ---
112
128
  status: "FAIL"
113
129
  bounce_count: {N}
130
+ tokens_used: {number}
114
131
  bugs_found: {number of bugs}
115
132
  gold_plating_detected: {true/false}
116
133
  failed_scenarios:
117
134
  - "{scenario name}"
118
135
  ---
119
136
 
120
- # QA Validation Report: STORY-{ID} — FAIL (Bounce {N})
137
+ # QA Validation Report: STORY-{ID}-{StoryName} — FAIL (Bounce {N})
121
138
 
122
139
  ## Failures
123
140
  ### Bug 1: {Short description}
@@ -130,6 +147,12 @@ failed_scenarios:
130
147
  ## Gold-Plating Findings
131
148
  - {Any unnecessary additions}
132
149
 
150
+ ## Process Feedback
151
+ > Optional. Note friction with the V-Bounce framework itself — templates, handoffs, RAG quality, tooling.
152
+
153
+ - {e.g., "Story §2 Gherkin scenarios were ambiguous — 'valid input' not defined"}
154
+ - {e.g., "None"}
155
+
133
156
  ## Recommendation
134
157
  FAIL — Returning to Developer for fixes. Bounce count: {N}/3.
135
158
  ```
@@ -142,10 +165,10 @@ Every finding must include a non-coder analogy. Examples:
142
165
 
143
166
  ## Checkpointing
144
167
 
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`:
168
+ 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
169
 
147
170
  ```markdown
148
- # QA Checkpoint: STORY-{ID}
171
+ # QA Checkpoint: STORY-{ID}-{StoryName}
149
172
  ## Completed
150
173
  - {Which testing phases are done}
151
174
  ## 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"],
@@ -100,9 +100,12 @@ The manifest is a semantic routing table — it helps agents quickly find releva
100
100
  Write a **Scribe Report** to `.bounce/reports/sprint-S-{XX}-scribe.md`:
101
101
  You MUST include the YAML frontmatter block exactly as shown below:
102
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`.
104
+
103
105
  ```markdown
104
106
  ---
105
107
  mode: "{init / audit / create}"
108
+ tokens_used: {number}
106
109
  docs_created: {count}
107
110
  docs_updated: {count}
108
111
  docs_removed: {count}
@@ -135,6 +138,12 @@ docs_removed: {count}
135
138
 
136
139
  ## Lessons Flagged
137
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"}
138
147
  ```
139
148
 
140
149
  ## Critical Rules
@@ -145,5 +154,5 @@ docs_removed: {count}
145
154
  - **Feature-centric, not file-centric.** Organize by user-visible capabilities, not by file paths.
146
155
  - **You NEVER communicate with other agents directly.** Your report is your only output.
147
156
  - **You NEVER modify LESSONS.md.** Flag documentation lessons for the Lead to record.
148
- - **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/`.
149
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,17 +15,20 @@ 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 failBug Report to Dev.
25
- 4. Dev fixes and resubmits. 3+ failuresEscalated.
26
- 5. Architect validates Safe Zone compliance and ADR adherence.
27
- 6. DevOps merges story into sprint branch, validates, handles releases.
28
- 7. Team Lead consolidates into Sprint Report.
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. Pre-QA Gate Scan: `./scripts/pre_gate_runner.sh qa` catches mechanical failures before spawning QA. Trivial issuesreturn 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.
29
32
 
30
33
  **Hotfix Path (L1 Trivial Task):**
31
34
  1. Team Lead evaluates request and creates `HOTFIX-{Date}-{Name}.md`.
@@ -36,7 +39,7 @@ Before sprints: Lead triages request (L1 Trivial → Hotfix Path. L2-L4 → Epic
36
39
  6. DevOps (or Team Lead) runs `./scripts/hotfix_manager.sh sync` to update active worktrees.
37
40
 
38
41
  ### 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/.
42
+ Sprint Report → Human review → Delivery Plan updated → Lessons recorded. If new features delivered → spawn Scribe agent to generate/update vdocs/.
40
43
 
41
44
  ### Story States
42
45
  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.4.0",
3
+ "version": "1.6.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": {
@@ -0,0 +1,151 @@
1
+ #!/usr/bin/env bash
2
+ # init_gate_config.sh — Auto-detect project stack and generate .bounce/gate-checks.json
3
+ # Usage: ./scripts/init_gate_config.sh [project-path]
4
+ #
5
+ # Run once during project setup or when the improve skill suggests new checks.
6
+ # Safe to re-run — merges with existing config (preserves custom checks).
7
+
8
+ set -euo pipefail
9
+
10
+ PROJECT_PATH="${1:-.}"
11
+ PROJECT_PATH="$(cd "$PROJECT_PATH" && pwd)"
12
+ CONFIG_PATH="${PROJECT_PATH}/.bounce/gate-checks.json"
13
+
14
+ RED='\033[0;31m'
15
+ GREEN='\033[0;32m'
16
+ YELLOW='\033[1;33m'
17
+ CYAN='\033[0;36m'
18
+ NC='\033[0m'
19
+
20
+ echo -e "${CYAN}V-Bounce OS Gate Config Initializer${NC}"
21
+ echo -e "Project: ${PROJECT_PATH}"
22
+ echo ""
23
+
24
+ # ── Detect stack ─────────────────────────────────────────────────────
25
+
26
+ LANGUAGE="unknown"
27
+ FRAMEWORK="unknown"
28
+ TEST_RUNNER="unknown"
29
+ BUILD_CMD=""
30
+ LINT_CMD=""
31
+ TEST_CMD=""
32
+
33
+ # Language detection
34
+ if [[ -f "${PROJECT_PATH}/tsconfig.json" ]]; then
35
+ LANGUAGE="typescript"
36
+ elif [[ -f "${PROJECT_PATH}/package.json" ]]; then
37
+ LANGUAGE="javascript"
38
+ elif [[ -f "${PROJECT_PATH}/pyproject.toml" || -f "${PROJECT_PATH}/setup.py" || -f "${PROJECT_PATH}/requirements.txt" ]]; then
39
+ LANGUAGE="python"
40
+ elif [[ -f "${PROJECT_PATH}/Cargo.toml" ]]; then
41
+ LANGUAGE="rust"
42
+ elif [[ -f "${PROJECT_PATH}/go.mod" ]]; then
43
+ LANGUAGE="go"
44
+ elif [[ -f "${PROJECT_PATH}/build.gradle" || -f "${PROJECT_PATH}/pom.xml" ]]; then
45
+ LANGUAGE="java"
46
+ elif [[ -f "${PROJECT_PATH}/Package.swift" ]]; then
47
+ LANGUAGE="swift"
48
+ fi
49
+
50
+ echo -e "Language: ${GREEN}${LANGUAGE}${NC}"
51
+
52
+ # Framework detection (JS/TS ecosystem)
53
+ if [[ -f "${PROJECT_PATH}/package.json" ]]; then
54
+ PKG_CONTENT=$(cat "${PROJECT_PATH}/package.json")
55
+
56
+ if echo "$PKG_CONTENT" | grep -q '"next"'; then FRAMEWORK="nextjs"
57
+ elif echo "$PKG_CONTENT" | grep -q '"react"'; then FRAMEWORK="react"
58
+ elif echo "$PKG_CONTENT" | grep -q '"vue"'; then FRAMEWORK="vue"
59
+ elif echo "$PKG_CONTENT" | grep -q '"svelte"'; then FRAMEWORK="svelte"
60
+ elif echo "$PKG_CONTENT" | grep -q '"express"'; then FRAMEWORK="express"
61
+ elif echo "$PKG_CONTENT" | grep -q '"fastify"'; then FRAMEWORK="fastify"
62
+ elif echo "$PKG_CONTENT" | grep -q '"@angular/core"'; then FRAMEWORK="angular"
63
+ fi
64
+
65
+ # Test runner
66
+ if echo "$PKG_CONTENT" | grep -q '"vitest"'; then TEST_RUNNER="vitest"
67
+ elif echo "$PKG_CONTENT" | grep -q '"jest"'; then TEST_RUNNER="jest"
68
+ elif echo "$PKG_CONTENT" | grep -q '"mocha"'; then TEST_RUNNER="mocha"
69
+ elif echo "$PKG_CONTENT" | grep -q '"ava"'; then TEST_RUNNER="ava"
70
+ fi
71
+
72
+ # Commands from scripts
73
+ BUILD_CMD=$(node -e "try{const p=require('${PROJECT_PATH}/package.json');console.log(p.scripts&&p.scripts.build||'')}catch(e){}" 2>/dev/null || echo "")
74
+ LINT_CMD=$(node -e "try{const p=require('${PROJECT_PATH}/package.json');console.log(p.scripts&&p.scripts.lint||'')}catch(e){}" 2>/dev/null || echo "")
75
+ TEST_CMD=$(node -e "try{const p=require('${PROJECT_PATH}/package.json');const t=p.scripts&&p.scripts.test||'';if(t&&!t.includes('no test specified'))console.log(t);else console.log('')}catch(e){}" 2>/dev/null || echo "")
76
+ elif [[ "$LANGUAGE" == "python" ]]; then
77
+ if command -v pytest &>/dev/null; then TEST_RUNNER="pytest"; fi
78
+ if command -v ruff &>/dev/null; then LINT_CMD="ruff check ."; fi
79
+ elif [[ "$LANGUAGE" == "rust" ]]; then
80
+ TEST_RUNNER="cargo"
81
+ BUILD_CMD="cargo build"
82
+ LINT_CMD="cargo clippy"
83
+ elif [[ "$LANGUAGE" == "go" ]]; then
84
+ TEST_RUNNER="go"
85
+ BUILD_CMD="go build ./..."
86
+ LINT_CMD="golangci-lint run"
87
+ fi
88
+
89
+ echo -e "Framework: ${GREEN}${FRAMEWORK}${NC}"
90
+ echo -e "Test runner: ${GREEN}${TEST_RUNNER}${NC}"
91
+ [[ -n "$BUILD_CMD" ]] && echo -e "Build: ${GREEN}${BUILD_CMD}${NC}"
92
+ [[ -n "$LINT_CMD" ]] && echo -e "Lint: ${GREEN}${LINT_CMD}${NC}"
93
+ echo ""
94
+
95
+ # ── Generate config ──────────────────────────────────────────────────
96
+
97
+ # Build QA checks array
98
+ QA_CHECKS='[
99
+ { "id": "tests_exist", "enabled": true, "description": "Verify test files exist for modified source files" },
100
+ { "id": "tests_pass", "enabled": true, "description": "Run test suite" },
101
+ { "id": "build", "enabled": true, "description": "Run build command" },
102
+ { "id": "lint", "enabled": true, "description": "Run linter" },
103
+ { "id": "no_debug_output", "enabled": true, "description": "No debug statements in modified files" },
104
+ { "id": "no_todo_fixme", "enabled": true, "description": "No TODO/FIXME in modified files" },
105
+ { "id": "exports_have_docs", "enabled": true, "description": "Exported symbols have doc comments" }
106
+ ]'
107
+
108
+ # Build Architect checks array
109
+ ARCH_CHECKS='[
110
+ { "id": "tests_exist", "enabled": true, "description": "Verify test files exist for modified source files" },
111
+ { "id": "tests_pass", "enabled": true, "description": "Run test suite" },
112
+ { "id": "build", "enabled": true, "description": "Run build command" },
113
+ { "id": "lint", "enabled": true, "description": "Run linter" },
114
+ { "id": "no_debug_output", "enabled": true, "description": "No debug statements in modified files" },
115
+ { "id": "no_todo_fixme", "enabled": true, "description": "No TODO/FIXME in modified files" },
116
+ { "id": "exports_have_docs", "enabled": true, "description": "Exported symbols have doc comments" },
117
+ { "id": "no_new_deps", "enabled": true, "description": "No new dependencies without review" },
118
+ { "id": "file_size", "enabled": true, "max_lines": 500, "description": "Source files under 500 lines" }
119
+ ]'
120
+
121
+ # Write config
122
+ mkdir -p "$(dirname "$CONFIG_PATH")"
123
+
124
+ cat > "$CONFIG_PATH" << HEREDOC
125
+ {
126
+ "version": 1,
127
+ "detected_stack": {
128
+ "language": "${LANGUAGE}",
129
+ "framework": "${FRAMEWORK}",
130
+ "test_runner": "${TEST_RUNNER}",
131
+ "build_cmd": "${BUILD_CMD}",
132
+ "lint_cmd": "${LINT_CMD}",
133
+ "test_cmd": "${TEST_CMD}"
134
+ },
135
+ "qa_checks": ${QA_CHECKS},
136
+ "arch_checks": ${ARCH_CHECKS},
137
+ "custom_checks": []
138
+ }
139
+ HEREDOC
140
+
141
+ echo -e "${GREEN}Generated: ${CONFIG_PATH}${NC}"
142
+ echo ""
143
+ echo "Universal checks enabled. To add project-specific checks:"
144
+ echo " 1. Run sprints and let agents collect Process Feedback"
145
+ echo " 2. Use the 'improve' skill to propose new checks"
146
+ echo " 3. Or manually add entries to the custom_checks array"
147
+ echo ""
148
+ echo -e "Example custom check (add to custom_checks):"
149
+ echo ' { "id": "custom_grep", "gate": "arch", "enabled": true,'
150
+ echo ' "pattern": "var\\(--my-prefix-", "glob": "*.tsx",'
151
+ echo ' "should_find": false, "description": "No raw CSS vars in components" }'