@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.
@@ -0,0 +1,308 @@
1
+ ---
2
+ # model: haiku
3
+ # findingsDir: '{output_folder}/_validation_temp'
4
+ # contextFile: '{output_folder}/_validation_temp/context.yaml'
5
+ ---
6
+
7
+ # Step V-10: Tổng hợp Report
8
+
9
+ ---
10
+
11
+ ## 0. Load All Findings from YAML Files
12
+
13
+ **Read all findings YAML files from `{findingsDir}` (do NOT re-read the report prose):**
14
+ - `findings-business-alignment.yaml` (weight 1.2)
15
+ - `findings-completeness.yaml` (weight 1.0)
16
+ - `findings-consistency.yaml` (weight 1.0)
17
+ - `findings-quality.yaml` (weight 1.0)
18
+ - `findings-system-nfr.yaml` (weight 1.0)
19
+ - `findings-delivery-readiness.yaml` (weight 1.0)
20
+ - `findings-risk-analysis.yaml` (weight 0.8)
21
+ - `findings-user-impact.yaml` (weight 0.7)
22
+
23
+ Extract `dimension_score` and `findings` array from each file. These 8 YAML files (~400 lines total) replace re-reading the entire prose report.
24
+
25
+ **Score verification (MANDATORY — unconditional):**
26
+
27
+ Canonical N per dimension: BA=11, COMP=29, CONS=19, QUAL=15, NFR=7, DR=13, RA=13, UI=13
28
+
29
+ For each findings YAML file:
30
+ 1. Read ALL `item_scores` values (must have exactly N entries per dimension above)
31
+ 2. Compute `verified_score = round(sum(item_scores.values()) / N × 100, 1)` using canonical N
32
+ 3. **ALWAYS use `verified_score` as the authoritative score — unconditionally, regardless of diff size**
33
+ - If verified ≠ header: log "⚠ {dimension}: header={X}%, calculated={Y}%, using {Y}%"
34
+ - If verified = header: log "✓ {dimension}: {Y}% (verified)"
35
+ 4. Use verified scores for ALL subsequent calculations
36
+
37
+ Do NOT use `dimension_score` from YAML header under any circumstance — headers are informational only.
38
+ Do NOT apply any post-hoc adjustment or calibration to verified scores.
39
+
40
+ ## 1. Tính Overall Score & Confidence Level
41
+
42
+ Lấy scores từ các steps trước:
43
+
44
+ | Dimension | Weight | Score | Status |
45
+ |---|---|---|---|
46
+ | Business Alignment | 1.2 | {biz_alignment_score}% | {OK/WARN/FAIL} |
47
+ | Completeness | 1.0 | {completeness_score}% | {OK/WARN/FAIL} |
48
+ | Consistency | 1.0 | {consistency_score}% | {OK/WARN/FAIL} |
49
+ | Quality | 1.0 | {quality_score}% | {OK/WARN/FAIL} |
50
+ | System & NFR | 1.0 | {system_nfr_score}% | {OK/WARN/FAIL} |
51
+ | Delivery Readiness | 1.0 | {delivery_readiness_score}% | {OK/WARN/FAIL} |
52
+ | Risk Analysis | 0.8 | {risk_score}% | {OK/WARN/FAIL} |
53
+ | User Impact | 0.7 | {user_impact_score}% | {OK/WARN/FAIL} |
54
+
55
+ ```
56
+ overall_score = (biz×1.2 + comp×1.0 + cons×1.0 + qual×1.0 + nfr×1.0 + ready×1.0 + risk×0.8 + user×0.7)
57
+ / 7.7 × 100%
58
+ ```
59
+
60
+ Overall status: OK ≥ 80%, WARN 60–79%, FAIL < 60%
61
+
62
+ **Confidence Level:**
63
+ - **High**: ≥ 5 dimensions có Full evidence (score ≥ 0.75)
64
+ - **Medium**: 3–4 dimensions có Full evidence
65
+ - **Low**: ≤ 2 dimensions có Full evidence hoặc có nhiều TBD/Missing
66
+
67
+ ---
68
+
69
+ ## 2. GO / NO-GO Decision
70
+
71
+ Xác định:
72
+
73
+ - **GO**: overall_score ≥ 80% AND không có CRITICAL findings
74
+ - **CONDITIONAL GO**: overall_score 60–79% OR có HIGH findings nhưng không CRITICAL
75
+ - **NO-GO**: overall_score < 60% OR có CRITICAL findings
76
+
77
+ ---
78
+
79
+ ## 3. Viết Executive Summary (section 1)
80
+
81
+ Thay nội dung section "1. Executive Summary" trong report file:
82
+
83
+ ```markdown
84
+ ## 1. Executive Summary
85
+
86
+ **Decision: {GO / CONDITIONAL GO / NO-GO}**
87
+ **Overall Score: {overall_score}% — {overall_status}**
88
+ **Confidence: {High / Medium / Low}**
89
+
90
+ | Metric | Value |
91
+ |---|---|
92
+ | Files reviewed | {count} |
93
+ | Total findings | {total} |
94
+ | CRITICAL | {count_critical} |
95
+ | HIGH | {count_high} |
96
+ | MEDIUM | {count_medium} |
97
+ | LOW | {count_low} |
98
+ | Unresolved Questions | {count_questions} |
99
+
100
+ ### Tóm tắt
101
+ {2-3 câu tổng quan về chất lượng SRS, highlight vấn đề lớn nhất}
102
+
103
+ ### Top 3 Risks
104
+ 1. {risk 1 — 1 dòng}
105
+ 2. {risk 2 — 1 dòng}
106
+ 3. {risk 3 — 1 dòng}
107
+ ```
108
+
109
+ ---
110
+
111
+ ## 4. Viết Overall Score & Confidence (section 2)
112
+
113
+ ```markdown
114
+ ## 2. Overall Score & Confidence
115
+
116
+ **Score: {overall_score}% ({overall_status}) | Confidence: {level}**
117
+
118
+ | Dimension | Weight | Score | Status |
119
+ |---|---|---|---|
120
+ | Business Alignment | 1.2 | {X}% | {status} |
121
+ | Completeness | 1.0 | {X}% | {status} |
122
+ | Consistency | 1.0 | {X}% | {status} |
123
+ | Quality | 1.0 | {X}% | {status} |
124
+ | System & NFR | 1.0 | {X}% | {status} |
125
+ | Delivery Readiness | 1.0 | {X}% | {status} |
126
+ | Risk Analysis | 0.8 | {X}% | {status} |
127
+ | User Impact | 0.7 | {X}% | {status} |
128
+ | **Overall** | **7.7** | **{X}%** | **{status}** |
129
+ ```
130
+
131
+ ---
132
+
133
+ ## 5. Viết Heatmap (section 3)
134
+
135
+ ```markdown
136
+ ## 3. Heatmap — Score by Dimension
137
+
138
+ | Dimension | Score | Bar |
139
+ |---|---|---|
140
+ | Business Alignment | {X}% | {████░░░░░░} |
141
+ | Completeness | {X}% | {████████░░} |
142
+ | Consistency | {X}% | {██████░░░░} |
143
+ | Quality | {X}% | {███████░░░} |
144
+ | System & NFR | {X}% | {████░░░░░░} |
145
+ | Delivery Readiness | {X}% | {██████░░░░} |
146
+ | Risk Analysis | {X}% | {████████░░} |
147
+ | User Impact | {X}% | {█████░░░░░} |
148
+
149
+ Legend: █ = 10%, OK ≥ 80%, WARN 60–79%, FAIL < 60%
150
+ ```
151
+
152
+ Use █ for filled blocks and░ for empty, 10 blocks total per row.
153
+
154
+ ---
155
+
156
+ ## 6. Viết Top Missing Areas (section 6)
157
+
158
+ Phân tích findings và liệt kê top areas bị thiếu nhất:
159
+
160
+ ```markdown
161
+ ## 6. Top Missing Areas
162
+
163
+ | Priority | Area | Dimensions Affected | Severity |
164
+ |---|---|---|---|
165
+ | 1 | {VD: NFR / Performance targets} | System & NFR | CRITICAL |
166
+ | 2 | {VD: API contracts thiếu schema} | Delivery Readiness | HIGH |
167
+ | 3 | {VD: Business KPI chưa có} | Business Alignment | HIGH |
168
+ | ... | | | |
169
+ ```
170
+
171
+ ---
172
+
173
+ ## 7. Viết Action Plan (section 8)
174
+
175
+ ```markdown
176
+ ## 8. Action Plan
177
+
178
+ ### Fix ngay — Trước Sprint (CRITICAL)
179
+ 1. {action} — Ref: finding #{n}
180
+ 2. ...
181
+
182
+ ### Fix trước Dev — Sprint 1 (HIGH)
183
+ 1. {action} — Ref: finding #{n}
184
+ 2. ...
185
+
186
+ ### Fix sau Release — Sprint 2+ (MEDIUM/LOW)
187
+ 1. {action}
188
+ 2. ...
189
+
190
+ ### Cần PO/Stakeholder quyết định
191
+ 1. {question} — Ref: question #{n}
192
+ 2. ...
193
+ ```
194
+
195
+ ---
196
+
197
+ ## 7b. Regression Analysis
198
+
199
+ Read `regression` from context.yaml.
200
+
201
+ If `previous_report` exists:
202
+ 1. **Score trend:** `{previous_score}% → {current_score}%` (↑/↓/→)
203
+ 2. **Fixed findings:** For each previous CRITICAL/HIGH finding ID, check if it still appears in current findings. If not → "FIXED ✓"
204
+ 3. **Recurring findings:** Present in both → "RECURRING ⚠ — not fixed since {previous_date}"
205
+ 4. **New findings:** Current findings not in previous → "NEW"
206
+
207
+ Write regression table in report:
208
+
209
+ ```markdown
210
+ ## 7b. Regression Analysis
211
+
212
+ Previous: {previous_report} — {previous_score}% {previous_status}
213
+ Current: {current_score}% {current_status}
214
+ Trend: {↑X% | ↓X% | →}
215
+
216
+ | Finding | Previous | Current | Status |
217
+ |---|---|---|---|
218
+ | C-001 (service boundary) | CRITICAL | CRITICAL | RECURRING ⚠ |
219
+ | DR-002 (API specs) | HIGH | HIGH | RECURRING ⚠ |
220
+ | RISK-001 (appeal flow) | — | HIGH | NEW |
221
+ ```
222
+
223
+ If `previous_report` is null: write "First validation run — no regression baseline available."
224
+
225
+ ---
226
+
227
+ ## 8. Viết Appendix: Full Scoring Matrix (section 9)
228
+
229
+ ```markdown
230
+ ## 9. Appendix: Full Scoring Matrix
231
+
232
+ ### Per-File Summary
233
+
234
+ | File | Biz Align | Completeness | Consistency | Quality | Sys NFR | Readiness | Risk | User Impact | Average |
235
+ |---|---|---|---|---|---|---|---|---|---|
236
+ | {file1} | {X}% | {X}% | {X}% | {X}% | {X}% | {X}% | {X}% | {X}% | {X}% |
237
+
238
+ ### All Findings
239
+
240
+ | # | Severity | Dimension | File | Item ID | Score | Evidence | Suggestion | Source |
241
+ |---|---|---|---|---|---|---|---|---|
242
+ | {complete findings table from all steps} |
243
+ ```
244
+
245
+ ---
246
+
247
+ ## 9. Update frontmatter
248
+
249
+ Update report file frontmatter:
250
+
251
+ ```yaml
252
+ overall_score: {overall_score}%
253
+ overall_status: {OK/WARN/FAIL}
254
+ confidence_level: {High/Medium/Low}
255
+ go_nogo: {GO/CONDITIONAL GO/NO-GO}
256
+ stepsCompleted:
257
+ - step-v-01-discovery
258
+ - step-v-02-business-alignment
259
+ - step-v-03-completeness
260
+ - step-v-04-consistency
261
+ - step-v-05-quality
262
+ - step-v-06-system-nfr
263
+ - step-v-07-delivery-readiness
264
+ - step-v-08-risk-analysis
265
+ - step-v-09-user-impact
266
+ - step-v-10-report
267
+ ```
268
+
269
+ ---
270
+
271
+ ## 10. Final Output
272
+
273
+ Thông báo cho user:
274
+
275
+ ```
276
+ SRS Validation Report (V2) hoàn tất!
277
+
278
+ Decision: {GO / CONDITIONAL GO / NO-GO}
279
+ Overall Score: {overall_score}% — {overall_status}
280
+ Confidence: {High / Medium / Low}
281
+ Report: {output_path}
282
+
283
+ Findings: {total} (CRITICAL: {c}, HIGH: {h}, MEDIUM: {m}, LOW: {l})
284
+ Unresolved Questions: {count}
285
+
286
+ Dimension scores:
287
+ Business Alignment: {X}% {status} [w:1.2]
288
+ Completeness: {X}% {status} [w:1.0]
289
+ Consistency: {X}% {status} [w:1.0]
290
+ Quality: {X}% {status} [w:1.0]
291
+ System & NFR: {X}% {status} [w:1.0]
292
+ Delivery Readiness: {X}% {status} [w:1.0]
293
+ Risk Analysis: {X}% {status} [w:0.8]
294
+ User Impact: {X}% {status} [w:0.7]
295
+
296
+ Action Required:
297
+ - {count} CRITICAL issues → Fix trước Sprint
298
+ - {count} HIGH issues → Fix trước implementation
299
+ - {count} questions → Cần PO decision
300
+ ```
301
+
302
+ **Workflow hoàn tất. Không có step tiếp theo.**
303
+
304
+ ## [NEW] Cleanup
305
+
306
+ After report is complete:
307
+ - Delete all `{findingsDir}/findings-*.yaml` temp files
308
+ - Keep `{findingsDir}/context.yaml` for potential re-runs
@@ -0,0 +1,269 @@
1
+ ---
2
+ validateWorkflow: './steps-v/step-v-01-discovery.md'
3
+ glossary: './data/srs-review-glossary.md'
4
+ outputDir: '.vsaf/docs/features/{feature-name}'
5
+ upstreamPrd: '.vsaf/docs/features/{feature-name}/02-prd.md'
6
+ upstreamAdr: '.vsaf/docs/features/{feature-name}/03-adr.md'
7
+ upstreamEpics: '.vsaf/docs/features/{feature-name}/04-epics.md'
8
+ kgGraph: 'graphify-out/graph.json'
9
+ domainChecklistDir: './data/domain-checklists'
10
+ parallel_mode: true
11
+ silent_mode: false
12
+ ---
13
+
14
+ # SRS Validate Workflow
15
+
16
+ **Goal:** Validate SRS documents against 6 review dimensions with weighted scoring, producing actionable findings report.
17
+
18
+ **Your Role:** SRS Quality Assurance Specialist and Validation Architect.
19
+
20
+ You will continue to operate with your given name, identity, and communication_style, merged with the details of this role description.
21
+
22
+ ## REVIEW DIMENSIONS & WEIGHTS
23
+
24
+ | Dimension | Weight | Description |
25
+ |---|---|---|
26
+ | Business Alignment | 1.2 | Mục tiêu: problem statement, KPI/success metrics, scope alignment, out-of-scope clarity |
27
+ | Completeness | 1.0 | Đầy đủ: Overview, Use Cases, AC, NFRs, ERD, Business Rules, Error Codes, Dependencies, Traceability |
28
+ | Consistency | 1.0 | Nhất quán: entity naming, UC ID prefix, state machine, data model, API patterns, terminology |
29
+ | Quality | 1.0 | Chất lượng: ngôn ngữ mơ hồ, testability, AC format, duplicate requirements, scope clarity |
30
+ | System & NFR | 1.0 | Kiến trúc + NFR: performance, reliability, security, observability, scalability |
31
+ | Delivery Readiness | 1.0 | Sẵn sàng triển khai: API contracts, DB schema, integration specs, rollout strategy, migration plan |
32
+ | Risk Analysis | 0.8 | Rủi ro: flow completeness, external dependencies, integration gaps, scope creep, assumptions |
33
+ | User Impact | 0.7 | Tác động người dùng: persona coverage, journey completeness, error UX, onboarding, accessibility |
34
+
35
+ ## SEVERITY LEVELS
36
+
37
+ | Severity | Description | Action |
38
+ |---|---|---|
39
+ | CRITICAL | Block implementation — dev không thể implement | Phải sửa TRƯỚC khi bắt đầu Sprint |
40
+ | HIGH | Nên clarify sớm — risk rework hoặc bugs | Fix trước khi bắt đầu implementation |
41
+ | MEDIUM | Nice to fix — improve quality, UX, maintainability | Phân bổ vào Sprint 2 |
42
+ | LOW | Minor — pass hoặc cải thiện nhỏ | Fix khi có thời gian (optional enhancement) |
43
+
44
+ ## SCORING
45
+
46
+ ### Score Levels
47
+ - 1.0 = Good — đầy đủ, rõ ràng, không vấn đề
48
+ - 0.75 = Minor issue — vấn đề nhỏ, dễ fix
49
+ - 0.5 = Partial — có nhưng thiếu sót đáng kể
50
+ - 0.25 = Major gap — có hình thức nhưng substance rất thiếu
51
+ - 0.0 = Missing — không có
52
+
53
+ ### Dimension & Overall
54
+ - Dimension score: Weighted average of all findings in dimension
55
+ - Overall score formula:
56
+ ```
57
+ overall = (bizalign×1.2 + comp×1.0 + cons×1.0 + qual×1.0 + sysnfr×1.0 + ready×1.0 + risk×0.8 + user×0.7)
58
+ / (1.2 + 1.0 + 1.0 + 1.0 + 1.0 + 1.0 + 0.8 + 0.7) × 100%
59
+ ```
60
+ Total weight divisor = **7.7**
61
+
62
+ ### Thresholds
63
+ - OK: ≥ 80%
64
+ - WARN: 60–79%
65
+ - FAIL: < 60%
66
+
67
+ ### Confidence Level
68
+ | Level | Description |
69
+ |---|---|
70
+ | High | Full evidence, well-defined — tất cả sections đầy đủ |
71
+ | Medium | Some missing sections — một số gaps nhưng còn usable |
72
+ | Low | Many assumptions — nhiều TBD, thiếu evidence cốt lõi |
73
+
74
+ ## WORKFLOW ARCHITECTURE
75
+
76
+ This uses **step-file architecture** for disciplined execution:
77
+
78
+ ### Core Principles
79
+
80
+ - **Micro-file Design**: Each step is a self-contained instruction file
81
+ - **Just-In-Time Loading**: Only the current step file is in memory
82
+ - **Sequential Enforcement**: Steps must be completed in order
83
+ - **State Tracking**: Document progress in output file frontmatter using `stepsCompleted` array
84
+ - **Append-Only Building**: Build report by appending findings as directed
85
+
86
+ ### Step Processing Rules
87
+
88
+ 1. **READ COMPLETELY**: Always read the entire step file before taking any action
89
+ 2. **FOLLOW SEQUENCE**: Execute all numbered sections in order
90
+ 3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
91
+ 4. **CHECK CONTINUATION**: Only proceed to next step when user selects 'C' (Continue)
92
+ 5. **SAVE STATE**: Update `stepsCompleted` in frontmatter before loading next step
93
+ 6. **LOAD NEXT**: When directed, read fully and follow the next step file
94
+
95
+ ### Critical Rules (NO EXCEPTIONS)
96
+
97
+ - NEVER load multiple step files simultaneously (sequential mode) — in **parallel mode**, spawn multiple Agents in a SINGLE response instead
98
+ - ALWAYS read entire step file before execution
99
+ - NEVER skip steps or optimize the sequence
100
+ - ALWAYS update frontmatter of output files when writing final output for a step
101
+ - ALWAYS follow the exact instructions in the step file
102
+ - ALWAYS halt at menus and wait for user input
103
+ - NEVER create mental todo lists from future steps
104
+ - 🔀 **PARALLEL MODE**: When `{parallel_mode}` is true, after Step V-01 completes, follow **PARALLEL EXECUTION ROUNDS** below — do NOT load step-v-02 sequentially
105
+
106
+ ## STEP SEQUENCE (V2)
107
+
108
+ | Step | File | Dimension |
109
+ |---|---|---|
110
+ | V-01 | step-v-01-discovery.md | Discovery & scope |
111
+ | V-02 | step-v-02-business-alignment.md | Business Alignment (weight 1.2) |
112
+ | V-03 | step-v-03-completeness.md | Completeness (weight 1.0) |
113
+ | V-04 | step-v-04-consistency.md | Consistency (weight 1.0) |
114
+ | V-05 | step-v-05-quality.md | Quality (weight 1.0) |
115
+ | V-06 | step-v-06-system-nfr.md | System & NFR (weight 1.0) |
116
+ | V-07 | step-v-07-delivery-readiness.md | Delivery Readiness (weight 1.0) |
117
+ | V-08 | step-v-08-risk-analysis.md | Risk Analysis (weight 0.8) |
118
+ | V-09 | step-v-09-user-impact.md | User Impact (weight 0.7) |
119
+ | V-10 | step-v-10-report.md | Report & Scoring |
120
+
121
+ ## INITIALIZATION SEQUENCE
122
+
123
+ ### 1. Configuration Loading
124
+
125
+ Resolve config from VSAF context:
126
+
127
+ - `project_name` → from `CONTEXT.md` or `.vsaf/config.yaml`
128
+ - `feature_name` → from current feature directory name
129
+ - `output_folder` → `.vsaf/docs/features/{feature-name}/`
130
+ - `planning_artifacts` → `.vsaf/docs/features/{feature-name}/`
131
+ - `communication_language` → `vi` (default)
132
+ - `document_output_language` → `vi` (default)
133
+ - `date` → system-generated current datetime
134
+ - `domain` → from `CONTEXT.md` field `domain` (optional, for domain-specific checklists)
135
+
136
+ YOU MUST ALWAYS SPEAK OUTPUT in Vietnamese.
137
+ YOU MUST ALWAYS WRITE all artifact and document content in Vietnamese (except IDs, technical terms, code references).
138
+
139
+ ### 2. Load Review Glossary
140
+
141
+ Read and internalize the review glossary from {glossary}. This defines all review dimensions, item ID patterns, question categories, and scoring methodology.
142
+
143
+ ### 3. Route to Validate Workflow
144
+
145
+ "**Validate Mode: Validating SRS document(s) against 8 review dimensions (V2).**"
146
+
147
+ Then read fully and follow: `{validateWorkflow}` (steps-v/step-v-01-discovery.md)
148
+
149
+ ---
150
+
151
+ ## PARALLEL EXECUTION ROUNDS
152
+
153
+ **Triggered when:** `parallel_mode: true` AND Step V-01 (discovery) completes with user selecting 'C'.
154
+
155
+ **Do NOT load step-v-02 sequentially. Execute rounds below instead.**
156
+
157
+ ---
158
+
159
+ ### Round 0 — Complete (Step V-01 already ran)
160
+
161
+ Step V-01 has produced:
162
+ - `{output_folder}/_validation_temp/context.yaml` — SRS metadata, section index, UC cache, glossary dimension items, KG pre-loaded data
163
+ - Validation report initialized at path in context.yaml
164
+
165
+ ---
166
+
167
+ ### Round 1 — Parallel Dimension Validation (8 agents simultaneously)
168
+
169
+ ⚠️ **CRITICAL: Spawn ALL 8 agents in a SINGLE response using the Agent tool. Do not send them one at a time.**
170
+
171
+ Announce to user (unless `silent_mode: true`):
172
+ > "Launching parallel SRS validation across 8 dimension agents. This replaces sequential steps V-02 through V-09..."
173
+
174
+ **Agent 1 — model: sonnet** (Business Alignment — weight 1.2)
175
+ ```
176
+ You are a business alignment validation sub-agent for ba-validate-srs.
177
+ Read file: {output_folder}/_validation_temp/context.yaml
178
+ Then read fully and follow ALL instructions in: ./steps-v/step-v-02-business-alignment.md
179
+ Write output to: {output_folder}/_validation_temp/findings-business-alignment.yaml
180
+ Do NOT produce any user-facing messages. Write findings file only.
181
+ ```
182
+
183
+ **Agent 2 — model: opus** (Completeness — weight 1.0 — two-pass invention detection)
184
+ ```
185
+ You are a completeness validation sub-agent for ba-validate-srs.
186
+ Read file: {output_folder}/_validation_temp/context.yaml
187
+ Then read fully and follow ALL instructions in: ./steps-v/step-v-03-completeness.md
188
+ Write output to: {output_folder}/_validation_temp/findings-completeness.yaml
189
+ Do NOT produce any user-facing messages. Write findings file only.
190
+ ```
191
+
192
+ > ⚠️ **DO NOT downgrade Agent 2 to sonnet.** Completeness requires Opus for two-pass invention detection (SRS requirements not traceable to PRD/BRD), cross-file semantic analysis, and subtle naming/scope mismatches (e.g., FR17 label vs PRD FR17 content).
193
+
194
+ **Agent 3 — model: sonnet** (Consistency — weight 1.0)
195
+ ```
196
+ You are a consistency validation sub-agent for ba-validate-srs.
197
+ Read file: {output_folder}/_validation_temp/context.yaml
198
+ Then read fully and follow ALL instructions in: ./steps-v/step-v-04-consistency.md
199
+ Write output to: {output_folder}/_validation_temp/findings-consistency.yaml
200
+ Do NOT produce any user-facing messages. Write findings file only.
201
+ ```
202
+
203
+ **Agent 4 — model: haiku** (Quality — weight 1.0 — Grep-only mechanical checks)
204
+ ```
205
+ You are a quality validation sub-agent for ba-validate-srs.
206
+ Read file: {output_folder}/_validation_temp/context.yaml
207
+ Then read fully and follow ALL instructions in: ./steps-v/step-v-05-quality.md
208
+ Write output to: {output_folder}/_validation_temp/findings-quality.yaml
209
+ Do NOT produce any user-facing messages. Write findings file only.
210
+ ```
211
+
212
+ **Agent 5 — model: sonnet** (System & NFR — weight 1.0)
213
+ ```
214
+ You are a system and NFR validation sub-agent for ba-validate-srs.
215
+ Read file: {output_folder}/_validation_temp/context.yaml
216
+ Then read fully and follow ALL instructions in: ./steps-v/step-v-06-system-nfr.md
217
+ Write output to: {output_folder}/_validation_temp/findings-system-nfr.yaml
218
+ Do NOT produce any user-facing messages. Write findings file only.
219
+ ```
220
+
221
+ **Agent 6 — model: sonnet** (Delivery Readiness — weight 1.0)
222
+ ```
223
+ You are a delivery readiness validation sub-agent for ba-validate-srs.
224
+ Read file: {output_folder}/_validation_temp/context.yaml
225
+ Then read fully and follow ALL instructions in: ./steps-v/step-v-07-delivery-readiness.md
226
+ Write output to: {output_folder}/_validation_temp/findings-delivery-readiness.yaml
227
+ Do NOT produce any user-facing messages. Write findings file only.
228
+ ```
229
+
230
+ **Agent 7 — model: sonnet** (Risk Analysis — weight 0.8)
231
+ ```
232
+ You are a risk analysis validation sub-agent for ba-validate-srs.
233
+ Read file: {output_folder}/_validation_temp/context.yaml
234
+ Then read fully and follow ALL instructions in: ./steps-v/step-v-08-risk-analysis.md
235
+ Write output to: {output_folder}/_validation_temp/findings-risk-analysis.yaml
236
+ Do NOT produce any user-facing messages. Write findings file only.
237
+ ```
238
+
239
+ **Agent 8 — model: haiku** (User Impact — weight 0.7 — lightweight persona checks)
240
+ ```
241
+ You are a user impact validation sub-agent for ba-validate-srs.
242
+ Read file: {output_folder}/_validation_temp/context.yaml
243
+ Then read fully and follow ALL instructions in: ./steps-v/step-v-09-user-impact.md
244
+ Write output to: {output_folder}/_validation_temp/findings-user-impact.yaml
245
+ Do NOT produce any user-facing messages. Write findings file only.
246
+ ```
247
+
248
+ **After ALL 8 agents complete:** Announce (unless silent_mode):
249
+ > "Round 1 complete. All 8 dimensions validated. Running final report synthesis..."
250
+
251
+ ---
252
+
253
+ ### Round 2 — Sequential Report Synthesis
254
+
255
+ Execute sequentially:
256
+
257
+ **Step V-10 — model: haiku** (Final report + scoring + cleanup):
258
+ Read fully and follow: `./steps-v/step-v-10-report.md`
259
+
260
+ This step reads all 8 findings YAML files, computes weighted scores, writes the final validation report, and deletes intermediate findings-*.yaml files.
261
+
262
+ ---
263
+
264
+ ### Fallback: Sequential Mode (`parallel_mode: false`)
265
+
266
+ When `parallel_mode: false`, load step files in original sequential order after V-01:
267
+ `step-v-02 → step-v-03 → step-v-04 → step-v-05 → step-v-06 → step-v-07 → step-v-08 → step-v-09 → step-v-10`
268
+
269
+ Each step loads the next via its own `nextStepFile` frontmatter variable.
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: ba-write-srs
3
+ description: "Write SRS feature-level theo template v4 chuẩn 12 sections. Triggers: 'write srs', 'viết srs', 'tạo srs'."
4
+ version: 1.0.0
5
+ author: "@ngocsangairvds/vsaf"
6
+ ---
7
+
8
+ Follow the instructions in ./workflow.md.