@ngocsangairvds/vsaf 4.1.1 → 4.1.2

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,37 +17,17 @@ Print progress at each step in this format:
17
17
  [SHIP] [step/5] description... ✅
18
18
  ```
19
19
 
20
- ## Flow Detection
21
-
22
- This skill supports TWO flows. Detect which one by checking the input context:
23
-
24
- | Signal | Flow | Artifact path |
25
- |---|---|---|
26
- | `.vsaf/docs/features/{name}/08-review.md` exists | **Feature flow** | `.vsaf/docs/features/{name}/` |
27
- | `.vsaf/docs/hotfixes/{bug-id}/02-review.md` exists | **Hotfix flow** | `.vsaf/docs/hotfixes/{bug-id}/` |
28
-
29
- Set `{artifact-dir}` to the matching path. All subsequent steps use `{artifact-dir}` instead of hardcoded paths.
30
-
31
20
  ## Phase Entry Protocol
32
21
 
33
22
  ```
34
23
  [SHIP] [1/5] Checking prerequisites... ⏳
35
24
  ```
36
25
 
37
- **Feature flow:**
38
26
  1. Input: `.vsaf/docs/features/{feature-name}/08-review.md`
39
27
  2. Check that the file exists + **check for Gate: APPROVED**
40
28
  - No Gate → Stop: "Review has not been approved"
41
29
  3. Check `.vsaf/docs/STATUS.md` — feature must be in "Knowledge Updated" status
42
30
  - If not → Stop: "Feature has not passed feature-complete. Run `/sdlc-feature-complete` first."
43
-
44
- **Hotfix flow:**
45
- 1. Input: `.vsaf/docs/hotfixes/{bug-id}/02-review.md`
46
- 2. Check that the file exists + **check for Gate: APPROVED**
47
- - No Gate → Stop: "Hotfix review has not been approved"
48
- 3. STATUS.md check: NOT required for hotfix (no feature-complete step)
49
-
50
- **Both flows:**
51
31
  4. Read `CONTEXT.md`
52
32
 
53
33
  ```
@@ -114,12 +94,7 @@ Generate PR description from review artifacts:
114
94
  - Create a structured PR description
115
95
  - Open PR (or suggest command if multi-repo)
116
96
 
117
- **Branch naming:**
118
-
119
- | Flow | Branch pattern |
120
- |---|---|
121
- | Feature | `feat/{feature-name}` |
122
- | Hotfix | `hotfix/{bug-id}` |
97
+ **Branch naming:** `feat/{feature-name}`
123
98
 
124
99
  **Single repo:**
125
100
  ```bash
@@ -149,8 +124,7 @@ For each repo with code changes:
149
124
  [SHIP] [5/5] Writing ship report... ⏳
150
125
  ```
151
126
 
152
- **Feature flow:** Write file `{artifact-dir}/09-ship.md`
153
- **Hotfix flow:** Write file `{artifact-dir}/03-ship.md`
127
+ Write file: `.vsaf/docs/features/{feature-name}/09-ship.md`
154
128
 
155
129
  ```
156
130
  [SHIP] [5/5] Writing ship report... ✅
@@ -158,10 +132,6 @@ For each repo with code changes:
158
132
 
159
133
  ## Output
160
134
 
161
- Write ship report to `{artifact-dir}`:
162
-
163
- **Feature flow template:**
164
-
165
135
  ```markdown
166
136
  # Ship Report: {feature-name}
167
137
 
@@ -192,43 +162,9 @@ After pulling the code, run:
192
162
  - `/graphify` — rebuild knowledge graph
193
163
  ```
194
164
 
195
- **Hotfix flow template:**
196
-
197
- ```markdown
198
- # Ship Report: {bug-id}
199
-
200
- ## PR
201
- - {repo}: PR #{number} — {url}
202
-
203
- ## Merge Strategy
204
- {merge commit / squash / rebase}
205
-
206
- ## Commit Scope
207
- - Source code: {N} files (minimal fix)
208
- - .vsaf/docs/: {M} files (hotfix artifacts)
209
- - Excluded: graphify-out/, .gitnexus/ (local index)
210
-
211
- ## Final Status
212
- - Build: PASS
213
- - Tests: all GREEN (including regression test)
214
- - Review: APPROVED
215
-
216
- ## Bug Fix Summary
217
- - Root cause: {from 01-analysis.md}
218
- - Reproduction test: {test file + test name}
219
- - Fix: {minimal diff description}
220
-
221
- ## Post-pull Setup
222
- After pulling the code, run:
223
- - `npx -y gitnexus@latest analyze` — re-index code
224
- - `/graphify` — rebuild knowledge graph
225
- ```
226
-
227
165
  ## Phase Exit Protocol
228
166
 
229
- Print PHASE REPORT (adapt to flow):
230
-
231
- **Feature flow:**
167
+ Print PHASE REPORT:
232
168
  ```
233
169
  ═══════════════════════════════════════════
234
170
  SHIP COMPLETE: {feature-name}
@@ -240,39 +176,18 @@ Print PHASE REPORT (adapt to flow):
240
176
  Excluded: graphify-out/, .gitnexus/
241
177
 
242
178
  Phases completed: 1→2→3→4→5→6→7→8→9
243
- Artifacts: {artifact-dir} (9 files)
179
+ Artifacts: .vsaf/docs/features/{feature-name}/ (9 files)
244
180
 
245
181
  Feature DONE.
246
182
  ═══════════════════════════════════════════
247
183
  ```
248
184
 
249
- **Hotfix flow:**
250
- ```
251
- ═══════════════════════════════════════════
252
- SHIP COMPLETE: {bug-id}
253
- ═══════════════════════════════════════════
254
- Phase: Ship (hotfix final phase)
255
-
256
- PR: #{number} — {url}
257
- Commit: source code + .vsaf/docs/ only
258
- Excluded: graphify-out/, .gitnexus/
259
-
260
- Phases completed: Analyze → RED → GREEN → Review → Ship
261
- Artifacts: {artifact-dir} (3 files)
262
-
263
- Hotfix DONE.
264
- ═══════════════════════════════════════════
265
- ```
266
-
267
- **Both flows:** Update `.vsaf/docs/STATUS.md`:
268
- - Feature flow → move to "Completed Features"
269
- - Hotfix flow → move to "Completed Hotfixes"
185
+ Update `.vsaf/docs/STATUS.md` → move to "Completed Features".
270
186
 
271
187
  ## Rules
272
188
 
273
189
  - DO NOT review code — that is the review phase's job
274
- - Feature flow: only ship code that is APPROVED + knowledge UPDATED (feature-complete done)
275
- - Hotfix flow: only ship code that is APPROVED (no feature-complete step)
190
+ - Only ship code that is APPROVED + knowledge UPDATED (feature-complete done)
276
191
  - PR description MUST be self-contained (reading the PR alone should be enough to understand the feature without reading artifacts)
277
192
  - **ABSOLUTELY DO NOT commit `graphify-out/` or `.gitnexus/`** — verify .gitignore first
278
193
  - **ONLY commit source code + `.vsaf/docs/`**
@@ -45,7 +45,9 @@ All output documents (05-srs.md) MUST be written in Vietnamese. Section headers,
45
45
  [SRS] [2/3] Writing SRS from PRD + ADR... ⏳
46
46
  ```
47
47
 
48
- Derive SRS from PRD + ADR. For each FR/NFR:
48
+ Use `/bmad-agent-analyst` analyze PRD + ADR to identify gaps, ambiguities, and missing requirements before writing the SRS.
49
+
50
+ Derive SRS from PRD + ADR + analyst findings. For each FR/NFR:
49
51
 
50
52
  1. **Unique ID** — FR-001, NFR-001 (sequential, no gaps)
51
53
  2. **Traceability** — trace to PRD user story (US-xxx)
@@ -37,7 +37,9 @@ You are a QA Lead. Your mission: design test cases FROM the SRS (spec), NOT from
37
37
  [TEST-DESIGN] [2/4] Generating test cases from SRS... ⏳
38
38
  ```
39
39
 
40
- Derive test cases from SRS FRs/NFRs. For each requirement, design ≥1 test case:
40
+ Use `/bmad-qa-generate-e2e-tests` — generate test cases from SRS FRs/NFRs.
41
+
42
+ For each requirement, ensure ≥1 test case with:
41
43
 
42
44
  1. **Unique ID** — TC-001 (sequential)
43
45
  2. **Traceability** — TC → FR/NFR → PRD user story (US-xxx)
@@ -1,23 +1,18 @@
1
1
  name: hotfix-tdd
2
- description: "Sub-flow: TDD RED GREEN → Test Gate — write failing test, fix, verify"
2
+ description: "Sub-flow: Hotfix Implement (TDD) → Test Gate"
3
3
 
4
4
  nodes:
5
- - id: red
6
- description: "RED: write failing test that reproduces the bug"
7
- command: sdlc-hotfix-red
5
+ - id: implement
6
+ description: "Implement TDD (RED GREEN REFACTOR), SonarQube-in-loop"
7
+ command: sdlc-hotfix-implement
8
8
  depends_on: []
9
9
 
10
- - id: green
11
- description: "GREEN: implement minimal fix to make the test pass"
12
- command: sdlc-hotfix-green
13
- depends_on: [red]
14
-
15
10
  - id: test-gate
16
- description: "Test Gate: run full test suite to verify fix and catch regressions"
11
+ description: "Test Gate run full test suite"
17
12
  bash: |
18
13
  cd $WORKSPACE && npm test 2>&1
19
- depends_on: [green]
14
+ depends_on: [implement]
20
15
  loop:
21
- on_fail: green
16
+ on_fail: implement
22
17
  max_retries: 3
23
18
  inject_error: true
@@ -1,34 +1,35 @@
1
1
  name: hotfix
2
- description: "Hotfix — Bug report AnalyzeTDD (RED → GREEN) → Test Gate → Review → Ship"
2
+ description: "Hotfix — AnalyzePRDImplement (TDD) → Ship"
3
3
 
4
4
  nodes:
5
5
  - id: analyze
6
+ description: "Analyze — grill user, GitNexus impact, root cause, blast radius"
6
7
  command: sdlc-hotfix-analyze
7
8
  workspace: false
8
9
 
9
- - id: red
10
- command: sdlc-hotfix-red
10
+ - id: prd
11
+ description: "PRD — fix requirements, acceptance criteria, scope boundary"
12
+ command: sdlc-hotfix-prd
11
13
  depends_on: [analyze]
14
+ workspace: false
12
15
 
13
- - id: green
14
- command: sdlc-hotfix-green
15
- depends_on: [red]
16
+ - id: implement
17
+ description: "Implement — TDD (RED → GREEN → REFACTOR), SonarQube-in-loop"
18
+ command: sdlc-hotfix-implement
19
+ depends_on: [prd]
16
20
 
17
21
  - id: test-gate
22
+ description: "Test Gate — run full test suite"
18
23
  bash: |
19
24
  cd $WORKSPACE && npm test 2>&1
20
- depends_on: [green]
25
+ depends_on: [implement]
21
26
  loop:
22
- on_fail: green
27
+ on_fail: implement
23
28
  max_retries: 3
24
29
  inject_error: true
25
30
 
26
- - id: review
27
- command: sdlc-hotfix-review
28
- depends_on: [test-gate]
29
- workspace: false
30
-
31
31
  - id: ship
32
- command: sdlc-ship
33
- depends_on: [review]
32
+ description: "Ship — commit, PR on hotfix branch"
33
+ command: sdlc-hotfix-ship
34
+ depends_on: [test-gate]
34
35
  workspace: false
@@ -1,101 +0,0 @@
1
- ---
2
- name: hotfix-green
3
- description: "Hotfix Phase 3 — TDD GREEN — write the minimal fix to make the failing test pass"
4
- version: 1.0.0
5
- author: "@ngocsangairvds/vsaf"
6
- ---
7
-
8
- # Hotfix Phase 3: TDD GREEN — Minimal Fix
9
-
10
- You are a Senior Developer applying a surgical fix. Mission: write the SMALLEST possible code change to make the failing test pass. Nothing more.
11
-
12
- ## Progress Protocol
13
-
14
- Print progress at each step:
15
- ```
16
- [HOTFIX-GREEN] [step/3] description... ⏳
17
- [HOTFIX-GREEN] [step/3] description... ✅
18
- ```
19
-
20
- ## Index Protection
21
-
22
- ⛔ Do NOT modify `graphify-out/` or `.gitnexus/` — READ only.
23
-
24
- ## Phase Entry Protocol
25
-
26
- ```
27
- [HOTFIX-GREEN] [1/3] Verifying failing test... ⏳
28
- ```
29
-
30
- 1. Read `.vsaf/docs/hotfixes/{bug-id}/01-analysis.md` — understand root cause and fix strategy
31
- 2. Locate the test file written in the RED phase
32
- 3. Run the test — confirm it FAILS (if it passes, something changed — STOP and investigate)
33
- 4. Read the production code that needs to be fixed
34
-
35
- ```
36
- [HOTFIX-GREEN] [1/3] Verifying failing test... ✅
37
- ```
38
-
39
- ## Tasks
40
-
41
- ### Step 2: Apply Minimal Fix
42
-
43
- ```
44
- [HOTFIX-GREEN] [2/3] Applying minimal fix... ⏳
45
- ```
46
-
47
- 1. Apply the fix strategy from the analysis
48
- 2. Change ONLY what is necessary to fix the bug
49
- 3. Rules for the fix:
50
- - Smallest possible diff
51
- - Do NOT refactor surrounding code
52
- - Do NOT fix other issues you notice
53
- - Do NOT add features
54
- - Do NOT change formatting of untouched code
55
- - 1 bug = 1 focused fix
56
- 4. Apply SonarQube rules on the changed code:
57
- - Issues = 0, Blocker = 0, Critical = 0
58
- - Security Hotspots = 0
59
- - No new code smells introduced
60
-
61
- ```
62
- [HOTFIX-GREEN] [2/3] Applying minimal fix... ✅
63
- ```
64
-
65
- ### Step 3: Run Tests — MUST PASS
66
-
67
- ```
68
- [HOTFIX-GREEN] [3/3] Running tests... ⏳
69
- ```
70
-
71
- 1. Run the specific reproduction test — it MUST PASS now
72
- 2. If it still FAILS → read the error, adjust the fix, try again
73
- 3. Run the FULL test suite — check for regressions
74
- 4. If any existing test FAILS → the fix introduced a regression
75
- - Analyze which test failed and why
76
- - Adjust the fix to not break existing behavior
77
- - Re-run until all tests pass
78
-
79
- ```
80
- [HOTFIX-GREEN] [3/3] Running tests... ✅ (reproduction test PASS + full suite PASS)
81
- ```
82
-
83
- ## Phase Exit Protocol
84
-
85
- Print PHASE REPORT:
86
- - Bug: {bug-id}
87
- - Status: TDD GREEN COMPLETED
88
- - Fix applied: {one-line description of what changed}
89
- - Files changed: {list of changed files}
90
- - Reproduction test: PASS
91
- - Full test suite: PASS ({N}/{N} tests)
92
- - Next step: test-gate (automatic) → `/hotfix-review`
93
-
94
- ## Rules
95
-
96
- - ⛔ MINIMAL fix only — do NOT refactor, do NOT fix other things
97
- - ⛔ Do NOT modify `graphify-out/` or `.gitnexus/`
98
- - ⛔ Do NOT change any test file from the RED phase (the test must stay as-is)
99
- - If the fix requires changing more than 3 files → STOP and verify with user that this is still a hotfix scope
100
- - The reproduction test must pass WITHOUT modifying the test
101
- - All existing tests must continue to pass (zero regressions)
@@ -1,96 +0,0 @@
1
- ---
2
- name: hotfix-red
3
- description: "Hotfix Phase 2 — TDD RED — write a failing test that reproduces the bug before any fix"
4
- version: 1.0.0
5
- author: "@ngocsangairvds/vsaf"
6
- ---
7
-
8
- # Hotfix Phase 2: TDD RED — Write Failing Test
9
-
10
- You are a Test Engineer. Mission: write a test that reproduces the bug. The test MUST FAIL — proving the bug exists before anyone writes a fix.
11
-
12
- ## Progress Protocol
13
-
14
- Print progress at each step:
15
- ```
16
- [HOTFIX-RED] [step/3] description... ⏳
17
- [HOTFIX-RED] [step/3] description... ✅
18
- ```
19
-
20
- ## Index Protection
21
-
22
- ⛔ Do NOT modify `graphify-out/` or `.gitnexus/` — READ only.
23
-
24
- ## Phase Entry Protocol
25
-
26
- ```
27
- [HOTFIX-RED] [1/3] Reading analysis... ⏳
28
- ```
29
-
30
- 1. Read `.vsaf/docs/hotfixes/{bug-id}/01-analysis.md`
31
- 2. Verify file exists — if not, ask: "Analysis not found. Have you run hotfix-analyze?"
32
- 3. Understand: root cause, affected files, reproduction steps
33
- 4. Detect the project's test framework (scan `package.json`, `pom.xml`, existing test files)
34
- 5. Read at least one existing test file to understand conventions (naming, structure, assertions)
35
-
36
- ```
37
- [HOTFIX-RED] [1/3] Reading analysis... ✅
38
- ```
39
-
40
- ## Tasks
41
-
42
- ### Step 2: Write Reproduction Test
43
-
44
- ```
45
- [HOTFIX-RED] [2/3] Writing reproduction test... ⏳
46
- ```
47
-
48
- 1. Create a test that exercises the EXACT code path identified in the analysis
49
- 2. The test must:
50
- - Target the root cause specifically (not a generic test)
51
- - Follow the project's existing test conventions
52
- - Have a descriptive name: `test_{bug-id}_should_{expected_behavior}`
53
- - Include a comment linking to the bug: `// Regression test for {bug-id}`
54
- 3. Place the test file in the correct directory per project convention
55
-
56
- ```
57
- [HOTFIX-RED] [2/3] Writing reproduction test... ✅
58
- ```
59
-
60
- ### Step 3: Run Test — MUST FAIL
61
-
62
- ```
63
- [HOTFIX-RED] [3/3] Running test — expecting FAILURE... ⏳
64
- ```
65
-
66
- 1. Run ONLY the new test (not the full suite)
67
- 2. Expected result: **TEST FAILS**
68
- 3. If test FAILS → Correct. The bug is proven to exist. Proceed.
69
- 4. If test PASSES → **STOP.** Something is wrong:
70
- - The test does not exercise the buggy code path
71
- - The analysis root cause is incorrect
72
- - Re-read the analysis, rewrite the test, and try again
73
- 5. Capture the failure output as evidence
74
-
75
- ```
76
- [HOTFIX-RED] [3/3] Running test — expecting FAILURE... ✅ (test failed as expected)
77
- ```
78
-
79
- ## Phase Exit Protocol
80
-
81
- Print PHASE REPORT:
82
- - Bug: {bug-id}
83
- - Status: TDD RED COMPLETED
84
- - Test file: {path to test file}
85
- - Test result: FAIL (as expected)
86
- - Failure output: {key line from test failure}
87
- - Next step: `/hotfix-green`
88
-
89
- ## Rules
90
-
91
- - ⛔ Do NOT fix the bug — only write the test
92
- - ⛔ Do NOT modify any production code
93
- - ⛔ Do NOT modify `graphify-out/` or `.gitnexus/`
94
- - The test MUST FAIL — a passing test means the test is wrong, not that the bug is fixed
95
- - One test per bug — do not write extra tests beyond what reproduces this specific bug
96
- - The test must be specific enough that fixing the bug (and only the bug) will make it pass