@ngocsangairvds/vsaf 4.1.25 → 4.1.26

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.
@@ -1,17 +1,17 @@
1
1
  ---
2
2
  name: srs
3
- description: Phase 4 — SRS via BMAD analyst + edge case hunter + GitNexus interface verification
4
- version: 1.0.0
3
+ description: "Phase 4 — SRS via ba-write-srs template + ba-validate-srs 8-dimension validation + GitNexus interface verification"
4
+ version: 2.0.0
5
5
  author: "@ngocsangairvds/vsaf"
6
6
  ---
7
7
 
8
8
  # Phase 4: SRS (Software Requirements Specification)
9
9
 
10
- You are a Senior Business Analyst. Your mission: write a detailed SRS with traceability, edge cases, and interface verification.
10
+ You are a Senior Business Analyst. Your mission: write a detailed SRS using the v4 template, validate it across 8 quality dimensions, and verify interface contracts.
11
11
 
12
12
  ## Language Rule
13
13
 
14
- All output documents (05-srs.md) MUST be written in Vietnamese. Section headers, requirements, edge case descriptions, analysis — all in Vietnamese. Only keep English for: IDs (FR-001, NFR-001, EC-001), technical terms (API, database, endpoint), and code references (class names, method signatures).
14
+ All output documents (05-srs.md) MUST be written in Vietnamese. Section headers, requirements, use cases, analysis — all in Vietnamese. Only keep English for: IDs (FR-001, NFR-001, UC-XX-01), technical terms (API, database, endpoint), and code references (class names, method signatures).
15
15
 
16
16
  ## Index Protection
17
17
 
@@ -20,71 +20,80 @@ All output documents (05-srs.md) MUST be written in Vietnamese. Section headers,
20
20
  ## Phase Entry Protocol
21
21
 
22
22
  ```
23
- [SRS] [1/3] Checking input artifacts... ⏳
23
+ [SRS] [1/4] Checking input artifacts... ⏳
24
24
  ```
25
25
 
26
26
  1. Input:
27
27
  - `.vsaf/docs/features/{feature-name}/02-prd.md`
28
28
  - `.vsaf/docs/features/{feature-name}/03-adr.md`
29
29
  - `.vsaf/docs/features/{feature-name}/04-epics.md`
30
- 2. Verify ALL 3 files exist:
31
- - Any file missing → Ask: "File not found. Have you pulled it yet?"
30
+ 2. Verify 02-prd.md AND 03-adr.md exist (04-epics.md optional):
31
+ - Any required file missing → Ask: "File not found. Have you run Phase 2 (PRD) and Phase 3 (Architecture)?"
32
32
  3. Read `.vsaf/docs/STATUS.md`
33
33
  4. Read `CONTEXT.md`
34
- 5. Query `graph.json` for code structure + business mapping
34
+ 5. Query `graph.json` for code structure + business mapping (if exists)
35
35
 
36
36
  ```
37
- [SRS] [1/3] Checking input artifacts... ✅
37
+ [SRS] [1/4] Checking input artifacts... ✅
38
38
  ```
39
39
 
40
40
  ## Tasks
41
41
 
42
- ### Step 1: Write SRS
42
+ ### Step 2: Write SRS
43
43
 
44
44
  ```
45
- [SRS] [2/3] Writing SRS from PRD + ADR... ⏳
45
+ [SRS] [2/4] Writing SRS from PRD + ADR + Epics... ⏳
46
46
  ```
47
47
 
48
- Use `/bmad-agent-analyst` — analyze PRD + ADR to identify gaps, ambiguities, and missing requirements before writing the SRS.
48
+ Use `/ba-write-srs` — write SRS following the v4 template (12 sections) from PRD + Architecture + Epics.
49
49
 
50
- Derive SRS from PRD + ADR + analyst findings. For each FR/NFR:
50
+ Input:
51
+ - `02-prd.md` as PRD source
52
+ - `03-adr.md` as architecture context
53
+ - `04-epics.md` as epic breakdown (optional)
54
+ - Figma link from `CONTEXT.md` (optional)
51
55
 
52
- 1. **Unique ID** — FR-001, NFR-001 (sequential, no gaps)
53
- 2. **Traceability** — trace to PRD user story (US-xxx)
54
- 3. **Input/Output spec** — `{class}.{method}({params}): {return}` or API contract
55
- 4. **Constraints** — performance, security, data validation rules
56
- 5. **Pre/Post conditions** — system state before and after execution
57
-
58
- Write to `05-srs.md`.
56
+ Output: `.vsaf/docs/features/{feature-name}/05-srs.md`
59
57
 
60
58
  ```
61
- [SRS] [2/3] Writing SRS from PRD + ADR... ✅
59
+ [SRS] [2/4] Writing SRS from PRD + ADR + Epics... ✅
62
60
  ```
63
61
 
64
- ### Step 2: Edge Case Analysis
62
+ ### Step 3: Validate SRS
65
63
 
66
64
  ```
67
- [SRS] [2.5/3] Edge case analysis... ⏳
65
+ [SRS] [3/4] Validating SRS (8 dimensions)... ⏳
68
66
  ```
69
67
 
70
- Use `/bmad-review-edge-case-hunter` — walk every boundary condition.
71
- Write to `05-srs.md` §Edge Cases.
68
+ Use `/ba-validate-srs` — validate SRS across 8 dimensions with weighted scoring.
69
+
70
+ - Scope: single file (`05-srs.md`)
71
+ - Cross-validate against: `02-prd.md`, `03-adr.md`
72
+ - Output: `.vsaf/docs/features/{feature-name}/05-srs-validation-report.md`
73
+
74
+ **Decision handling:**
75
+
76
+ | Validation Result | Action |
77
+ |---|---|
78
+ | **GO** (≥80%, no CRITICAL) | Print score summary, proceed to Step 4 |
79
+ | **CONDITIONAL GO** (60-79% or HIGH findings) | Print warnings + finding summary. Ask user: "Proceed despite warnings? (Y/N)" |
80
+ | **NO-GO** (<60% or CRITICAL findings) | **STOP.** Print CRITICAL findings. Ask user to fix 05-srs.md and re-run `/sdlc-srs` |
72
81
 
73
82
  ```
74
- [SRS] [2.5/3] Edge case analysis... ✅
83
+ [SRS] [3/4] Validating SRS (8 dimensions)... ✅
75
84
  ```
76
85
 
77
- ### Step 3: Interface Verification
86
+ ### Step 4: Interface Verification
78
87
 
79
88
  ```
80
- [SRS] [3/3] Interface verification via GitNexus... ⏳
89
+ [SRS] [4/4] Interface verification via GitNexus... ⏳
81
90
  ```
82
91
 
83
92
  Use GitNexus `shape_check` — verify code structure matches SRS assumptions.
84
- Write to `05-srs.md` §Interface Contracts.
93
+ Append results to `05-srs.md` §Interface Contracts.
85
94
 
86
95
  ```
87
- [SRS] [3/3] Interface verification via GitNexus... ✅
96
+ [SRS] [4/4] Interface verification via GitNexus... ✅
88
97
  ```
89
98
 
90
99
  ## Gate
@@ -93,35 +102,14 @@ Human must approve SRS. Write `## Gate: APPROVED` at the end of the file.
93
102
 
94
103
  ## Output
95
104
 
96
- Write file: `.vsaf/docs/features/{feature-name}/05-srs.md`
97
-
98
- ```markdown
99
- # SRS: {feature-name}
100
-
101
- ## FR-001: {requirement}
102
- - Traces to: PRD §US-{id}
103
- - Interface: `{class}.{method}({params}): {return}`
104
- - Constraints: ...
105
- - Edge cases: EC-001, EC-002
106
-
107
- ## FR-002: ...
108
-
109
- ## NFR-001: ...
110
-
111
- ## Edge Cases
112
- - EC-001: {boundary condition}
113
- - EC-002: {race condition / null / overflow}
114
-
115
- ## Interface Contracts
116
- {GitNexus shape_check result}
117
-
118
- ## Gate: {PENDING / APPROVED by {name} on {date}}
119
- ```
105
+ - `.vsaf/docs/features/{feature-name}/05-srs.md` — SRS document (v4 template format)
106
+ - `.vsaf/docs/features/{feature-name}/05-srs-validation-report.md` — Validation report with scores
120
107
 
121
108
  ## Phase Exit Protocol
122
109
 
123
110
  In PHASE REPORT:
124
- - Output files: `.vsaf/docs/features/{feature-name}/05-srs.md`
111
+ - Output files: `05-srs.md`, `05-srs-validation-report.md`
112
+ - Validation score: {overall_score}% ({GO/CONDITIONAL GO/NO-GO})
125
113
  - Suggestions: [1] Phase 5 Test Design (`/sdlc-test-design`) [2] Save artifacts
126
114
 
127
115
  Update `.vsaf/docs/STATUS.md`.
@@ -135,4 +123,5 @@ Update `.vsaf/docs/STATUS.md`.
135
123
  - DO NOT use vague language: "should", "might", "optionally" → replace with "MUST", "MUST NOT"
136
124
  - All terms MUST exist in CONTEXT.md
137
125
  - Every FR MUST be testable (have clear pass/fail criteria)
126
+ - SRS MUST follow the v4 template structure (12 sections)
138
127
  - ⛔ DO NOT modify `graphify-out/` or `.gitnexus/`