@ngocsangairvds/vsaf 4.1.24 → 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.
- package/package.json +1 -1
- package/packages/cli/dist/commands/install.d.ts +1 -0
- package/packages/cli/dist/commands/install.d.ts.map +1 -1
- package/packages/cli/dist/commands/install.js +32 -6
- package/packages/cli/dist/commands/install.js.map +1 -1
- package/packages/core/dist/engine/node-runner.d.ts +1 -0
- package/packages/core/dist/engine/node-runner.d.ts.map +1 -1
- package/packages/core/dist/engine/node-runner.js +33 -6
- package/packages/core/dist/engine/node-runner.js.map +1 -1
- package/skills/sdlc/ba-validate-srs/SKILL.md +8 -0
- package/skills/sdlc/ba-validate-srs/data/domain-checklists/insurance.yaml +110 -0
- package/skills/sdlc/ba-validate-srs/data/grep-patterns-srs.yaml +158 -0
- package/skills/sdlc/ba-validate-srs/data/srs-review-glossary.md +237 -0
- package/skills/sdlc/ba-validate-srs/steps-v/step-v-01-discovery.md +280 -0
- package/skills/sdlc/ba-validate-srs/steps-v/step-v-02-business-alignment.md +351 -0
- package/skills/sdlc/ba-validate-srs/steps-v/step-v-03-completeness.md +353 -0
- package/skills/sdlc/ba-validate-srs/steps-v/step-v-04-consistency.md +352 -0
- package/skills/sdlc/ba-validate-srs/steps-v/step-v-05-quality.md +347 -0
- package/skills/sdlc/ba-validate-srs/steps-v/step-v-06-system-nfr.md +217 -0
- package/skills/sdlc/ba-validate-srs/steps-v/step-v-07-delivery-readiness.md +288 -0
- package/skills/sdlc/ba-validate-srs/steps-v/step-v-08-risk-analysis.md +283 -0
- package/skills/sdlc/ba-validate-srs/steps-v/step-v-09-user-impact.md +262 -0
- package/skills/sdlc/ba-validate-srs/steps-v/step-v-10-report.md +308 -0
- package/skills/sdlc/ba-validate-srs/workflow.md +269 -0
- package/skills/sdlc/ba-write-srs/SKILL.md +8 -0
- package/skills/sdlc/ba-write-srs/srs-feature-template.md +669 -0
- package/skills/sdlc/ba-write-srs/srs-system-template.md +430 -0
- package/skills/sdlc/ba-write-srs/workflow.md +139 -0
- package/skills/sdlc/pack.yaml +4 -0
- package/skills/sdlc/srs/SKILL.md +44 -55
- package/skills/vds-skill/install-deps.mjs +21 -3
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
---
|
|
2
|
+
# model: opus
|
|
3
|
+
# findingsOutput: '{output_folder}/_validation_temp/findings-completeness.yaml'
|
|
4
|
+
# contextFile: '{output_folder}/_validation_temp/context.yaml'
|
|
5
|
+
# grepPatterns: '../data/grep-patterns-srs.yaml'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Step V-03: Completeness — Kiểm tra tính đầy đủ
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 1. Section Existence Check (Grep-only)
|
|
13
|
+
|
|
14
|
+
**Load context:** Read `{contextFile}` → get `srs_path`, `section_index`, `uc_cache`.
|
|
15
|
+
**Load patterns:** Read `{grepPatterns}` → get `srs_structure` pattern group.
|
|
16
|
+
|
|
17
|
+
**Use `section_index` from context.yaml first** (already built — no SRS read needed):
|
|
18
|
+
- Check each required section against the section_index titles
|
|
19
|
+
- If section_index is unavailable, run Grep using `srs_structure` patterns against `srs_path`
|
|
20
|
+
|
|
21
|
+
> **Template note (2026-04):** ERD section và Sequence Diagrams đã bị xóa khỏi template. API/DB/Kafka specs chuyển sang TSD. Template mới focus vào screen control tables + Activity Diagrams + Figma mapping + Gap Analysis. Không check `has_erd` và `has_uc_sequence` nữa.
|
|
22
|
+
|
|
23
|
+
Check presence of each item and record score:
|
|
24
|
+
|
|
25
|
+
| Item ID | Check | Pattern/Section | Score |
|
|
26
|
+
|---|---|---|---|
|
|
27
|
+
| has_overview | Section 1 "Mô tả chung" | section_overview | |
|
|
28
|
+
| has_use_case_summary | Bảng 1.1 UC Summary | section_uc_summary | |
|
|
29
|
+
| has_glossary | Section 1.2 Glossary | section_glossary | |
|
|
30
|
+
| has_references | Section 1.3 References | section_references | |
|
|
31
|
+
| has_uc_screens | Each UC có mục Màn hình (2.X.1) | section_uc_screens OR uc_cache | |
|
|
32
|
+
| has_screen_control_table | Each UC có bảng control (cột STT / Tên control / Loại control) | grep "Tên control\|Loại control" | |
|
|
33
|
+
| has_activity_diagram_per_uc | Each UC có Activity Diagram (@startuml block trong 2.X.2) | grep "@startuml UC-\|@startuml.*Activity" | |
|
|
34
|
+
| has_uc_flow_table | Each UC có bảng luồng (cột Bước / Đối tượng / Mô tả) | section_uc_flow_table OR uc_cache | |
|
|
35
|
+
| has_figma_mapping | Section 2 có bảng Figma mapping HOẶC explicit "chưa có Figma" / "Không có Figma" note | grep "Figma.*node\|chưa có Figma\|Không có Figma" | |
|
|
36
|
+
| has_error_codes | Section 3 "Danh sách mã lỗi đối tác trả về" | section_error_codes | |
|
|
37
|
+
| has_impact | Section 4 "Chức năng ảnh hưởng" | section_impact | |
|
|
38
|
+
| has_dependency_map | Section 4 có Dependency Map (@startuml component diagram) | grep "@startuml" within section 4 range | |
|
|
39
|
+
| has_business_rules | Section 5 Business Rules | section_business_rules | |
|
|
40
|
+
| has_nfrs | Section 6 Yêu cầu phi chức năng | section_nfr | |
|
|
41
|
+
| has_dependencies | Section 7 Ràng buộc / Giả định / Phụ thuộc | section_dependencies | |
|
|
42
|
+
| has_gap_analysis | Section 7.4 hoặc Section 9 có Gap Analysis table (cột Gap ID) | grep "Gap ID\|GA-[A-Z]" | |
|
|
43
|
+
| has_state_diagrams | Section 8 State Diagrams hoặc "Không áp dụng" note | section_state_diagrams | |
|
|
44
|
+
| has_traceability | Section 9 Mini-RTM | section_traceability | |
|
|
45
|
+
| has_edge_cases | "Luồng ngoại lệ" hoặc "EX" flows có mặt trong các UC | exception_flow pattern | |
|
|
46
|
+
| has_acceptance_criteria | Acceptance Criteria section | acceptance_criteria pattern | |
|
|
47
|
+
| has_open_questions_footer | Doc có "Các điểm cần Business confirm" footer | grep "cần Business confirm\|cần confirm" | |
|
|
48
|
+
|
|
49
|
+
Score: 1.0=present, 0.0=missing. Items "not applicable" (e.g., state diagrams cho FR không có entity lifecycle, Figma mapping cho backend-only FR) = skip from denominator.
|
|
50
|
+
|
|
51
|
+
Severity defaults khi thiếu:
|
|
52
|
+
- `has_screen_control_table`, `has_activity_diagram_per_uc` → MEDIUM
|
|
53
|
+
- `has_figma_mapping`, `has_dependency_map`, `has_gap_analysis` → MEDIUM
|
|
54
|
+
- `has_open_questions_footer` → LOW
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 2. Semantic completeness checks (LLM analysis)
|
|
59
|
+
|
|
60
|
+
Ngoài section existence, kiểm tra **nội dung** có đầy đủ:
|
|
61
|
+
|
|
62
|
+
### 2.1 UC coverage
|
|
63
|
+
- Đếm số UC trong bảng tóm tắt (1.1)
|
|
64
|
+
- Đếm số UC có section đặc tả chi tiết (2.X)
|
|
65
|
+
- Nếu thiếu UC spec → finding CRITICAL
|
|
66
|
+
|
|
67
|
+
### 2.2 Flow completeness
|
|
68
|
+
- Mỗi UC có: Precondition, Main flow, Alternative flow, Exception flow, Postcondition?
|
|
69
|
+
- Nếu chỉ có Main flow → CRITICAL
|
|
70
|
+
- Nếu thiếu Exception flow → HIGH
|
|
71
|
+
|
|
72
|
+
### 2.3 Cross-reference coverage (nếu có PRD)
|
|
73
|
+
- Đối chiếu FRs trong PRD với UCs trong SRS
|
|
74
|
+
- FR nào trong PRD chưa có UC tương ứng? → HIGH
|
|
75
|
+
|
|
76
|
+
### 2.4 Entity coverage
|
|
77
|
+
- Entities mention trong flow tables có trong ERD section 3 không?
|
|
78
|
+
- Entities trong ERD có mô tả trong bảng 3.2 không?
|
|
79
|
+
|
|
80
|
+
### 2.5 Downstream event consumer coverage
|
|
81
|
+
- Với mỗi event được publish trong flow (VD: `PaymentCompletedEvent`, `PolicyIssuedEvent`):
|
|
82
|
+
- Có mô tả service nào consume event này không?
|
|
83
|
+
- Có mô tả side effects quan trọng của downstream consumer không?
|
|
84
|
+
- VD: payment SRS publish `PaymentCompletedEvent` nhưng không mô tả promotion-service consume event này để redeem voucher → thiếu side effect quan trọng
|
|
85
|
+
- Nếu downstream consumer quan trọng bị thiếu → HIGH
|
|
86
|
+
|
|
87
|
+
Item ID: `downstream_event_consumers`
|
|
88
|
+
|
|
89
|
+
### 2.6 Cancellation sub-flow by context
|
|
90
|
+
- Nếu feature có cooling-off period: có nhánh huỷ riêng cho trong-cooling-off vs ngoài-cooling-off?
|
|
91
|
+
- Trong cooling-off: hoàn 100%, không bắt buộc lý do
|
|
92
|
+
- Ngoài cooling-off: pro-rata, bắt buộc lý do
|
|
93
|
+
- Nếu chỉ có 1 luồng huỷ duy nhất → HIGH
|
|
94
|
+
- Cũng kiểm tra: khi có refund, ngày tính pro-rata có được xác định rõ không?
|
|
95
|
+
- VD: tính từ ngày KH yêu cầu hay ngày insurer confirm? → Nếu không rõ → MEDIUM
|
|
96
|
+
|
|
97
|
+
Item ID: `cancellation_subflows_by_context`
|
|
98
|
+
|
|
99
|
+
### 2.7 PRD Acceptance Criteria coverage (via KG)
|
|
100
|
+
|
|
101
|
+
**Token-efficient:** Read PRD entity → find AC section line range → targeted read.
|
|
102
|
+
|
|
103
|
+
1. From KG fr-to-docs index: find PRD sections for this FR
|
|
104
|
+
2. Targeted read of PRD acceptance criteria for this FR
|
|
105
|
+
3. For each PRD acceptance criterion:
|
|
106
|
+
- Is there a corresponding SRS UC or AC that covers it?
|
|
107
|
+
- Map: PRD AC → SRS UC/AC
|
|
108
|
+
4. Finding: any PRD AC not covered → HIGH severity
|
|
109
|
+
|
|
110
|
+
Item ID: `prd_ac_coverage`
|
|
111
|
+
|
|
112
|
+
### 2.8 Derived-from Traceability — Two-Pass Invention Detection (CRITICAL)
|
|
113
|
+
|
|
114
|
+
**This is an Opus-level check. Two passes prevent false negatives.**
|
|
115
|
+
|
|
116
|
+
#### Pass 1 — Haiku extraction (exhaustive ID listing)
|
|
117
|
+
|
|
118
|
+
Run Grep to extract ALL formally defined SRS artifacts:
|
|
119
|
+
|
|
120
|
+
1. Grep `UC-[A-Z]{2,4}-\d{2}` in `srs_path` → extract unique UC IDs (e.g., UC-FR8-01)
|
|
121
|
+
2. Grep `BR-[A-Z]{2,4}-\d{3}|BR-\d{3}` in `srs_path` → extract unique BR IDs
|
|
122
|
+
3. Grep `NFR-|constraint:|Ràng buộc:` in `srs_path` → extract unique NFR/constraint IDs
|
|
123
|
+
4. Result: `extracted_uc_ids`, `extracted_br_ids`, `extracted_constraint_ids`
|
|
124
|
+
|
|
125
|
+
#### Pass 2 — Opus semantic judgment (traceability per extracted item)
|
|
126
|
+
|
|
127
|
+
Using KG pre-loaded data from `context.yaml` (`kg.prd_key_sections`, `kg.brd_key_sections`, `kg.fr_to_docs`):
|
|
128
|
+
|
|
129
|
+
For EACH UC ID in `extracted_uc_ids`:
|
|
130
|
+
- Can this UC's PURPOSE trace to a PRD FR or BRD requirement? (decomposition is OK — 1 PRD FR → many UCs)
|
|
131
|
+
- If NOT traceable → **CRITICAL: "Invented requirement — {UC_ID} has no upstream source in PRD/BRD"**
|
|
132
|
+
- Use targeted PRD/BRD reads via line ranges from context.yaml `kg` section
|
|
133
|
+
|
|
134
|
+
For EACH BR ID in `extracted_br_ids`:
|
|
135
|
+
- Is this BR derivable from BRD business rules or PRD acceptance criteria?
|
|
136
|
+
- If NOT traceable → **HIGH: "Untraceable business rule — {BR_ID} not found in BRD/PRD"**
|
|
137
|
+
|
|
138
|
+
For EACH constraint in `extracted_constraint_ids`:
|
|
139
|
+
- Is this from Architecture decisions or PRD NFR section?
|
|
140
|
+
- If NOT traceable → **MEDIUM: "Added constraint — not in Architecture/PRD"**
|
|
141
|
+
|
|
142
|
+
**Zero-miss guarantee:** Pass 1 (Grep) ensures every UC/BR is captured before Pass 2 (Opus) judges traceability. No LLM scanning of raw SRS text.
|
|
143
|
+
|
|
144
|
+
Item ID: `derived_from_traceability`
|
|
145
|
+
|
|
146
|
+
### 2.9 Role & Permission per UC
|
|
147
|
+
|
|
148
|
+
Kiểm tra mỗi UC có định nghĩa rõ role/permission không — riêng biệt với RBAC NFR ở V-06:
|
|
149
|
+
|
|
150
|
+
- Mỗi UC table có cột Actor hoặc ghi rõ actor role trong precondition không?
|
|
151
|
+
- Nếu có nhiều role có thể trigger cùng UC (VD: Admin vs Customer), có sub-flow riêng hoặc note rõ sự khác biệt không?
|
|
152
|
+
- Các action nhạy cảm (approve, cancel, refund, config) có ghi rõ role nào được phép không?
|
|
153
|
+
- Nếu SRS có Section 6 Business Rules hoặc bảng actor riêng, danh sách role có đầy đủ với thực tế không?
|
|
154
|
+
|
|
155
|
+
**Không yêu cầu bảng RACI đầy đủ.** Chỉ cần: mỗi UC không bị "ambiguous actor" — người đọc biết ngay ai có quyền trigger/thực hiện.
|
|
156
|
+
|
|
157
|
+
**Scoring:**
|
|
158
|
+
- Tất cả UC có actor rõ, role nhạy cảm đều có permission note → 1.0
|
|
159
|
+
- Phần lớn UC rõ, 1-2 action nhạy cảm thiếu permission boundary → 0.75
|
|
160
|
+
- Nhiều UC chỉ ghi "User" hoặc "System" không phân biệt role → 0.5
|
|
161
|
+
- Không có role/actor định nghĩa trong UC nào → 0.0 (CRITICAL)
|
|
162
|
+
|
|
163
|
+
Item ID: `role_permission_per_uc`
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
### 2.10 Input / Output / Validation Coverage per UC
|
|
168
|
+
|
|
169
|
+
Kiểm tra mỗi UC có mô tả đầy đủ input, output, và validation rules không.
|
|
170
|
+
|
|
171
|
+
> **Template note (2026-04):** Template mới embed validation trực tiếp vào cột Mô tả của screen control table (`**Validate:** • ...` inline), không còn separate input spec table. API request/response specs chuyển sang TSD.
|
|
172
|
+
|
|
173
|
+
**Input (screen control tables — Section 2.X.1):**
|
|
174
|
+
- Mỗi UC có màn hình → có bảng control với các cột: STT, Tên control, Loại control, Require, Maxlength, Giá trị mặc định, Mô tả
|
|
175
|
+
- Mỗi input control quan trọng (Text Input, Checkbox, Dropdown) có ghi Require (Bắt buộc/Tùy chọn)?
|
|
176
|
+
- Maxlength có điền cho Text Input không?
|
|
177
|
+
|
|
178
|
+
**Validation (inline trong cột Mô tả):**
|
|
179
|
+
- Có `**Validate:**` keyword trong Mô tả của các input controls không?
|
|
180
|
+
- Validation messages có tham chiếu đến Error Code trong Section 3 không?
|
|
181
|
+
|
|
182
|
+
**Output (flow table — Section 2.X.2):**
|
|
183
|
+
- Bảng luồng nghiệp vụ có mô tả kết quả sau khi UC thành công không?
|
|
184
|
+
- Cột "Bảng/Thực thể liên quan" có ghi entity nào bị tạo/cập nhật không?
|
|
185
|
+
|
|
186
|
+
**Scoring:**
|
|
187
|
+
- Screen control table đầy đủ + `**Validate:**` inline + error code reference → 1.0
|
|
188
|
+
- Có screen control table nhưng thiếu validate messages → 0.75
|
|
189
|
+
- Chỉ có flow table, không có screen control table (cho UC có màn hình) → 0.5
|
|
190
|
+
- Không có screen control table lẫn validate messages → 0.25 (HIGH)
|
|
191
|
+
- UC không có màn hình (backend-only) → skip item
|
|
192
|
+
|
|
193
|
+
Item ID: `input_output_validation_coverage`
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
### 2.11 Loop / Backward Flow Coverage
|
|
198
|
+
|
|
199
|
+
Kiểm tra các luồng có thể lặp lại hoặc quay lui mà SRS chưa xử lý:
|
|
200
|
+
|
|
201
|
+
**Loop flows (lặp lại trong cùng session):**
|
|
202
|
+
- User re-submit sau khi sửa lỗi (VD: form validation fail → sửa → submit lại)?
|
|
203
|
+
- User reload / refresh giữa chừng — state có được preserve không?
|
|
204
|
+
- Retry action sau timeout — có idempotency concern không?
|
|
205
|
+
|
|
206
|
+
**Backward flows (quay lui bước trước):**
|
|
207
|
+
- User bấm "Quay lại" từ bước N về bước N-1 — data có bị mất không?
|
|
208
|
+
- Checkout wizard: quay lại step 2 từ step 3 → có ảnh hưởng gì đến đơn đang tạo không?
|
|
209
|
+
- Multi-step process: nếu step giữa fail, có cần rollback toàn bộ hay partial?
|
|
210
|
+
|
|
211
|
+
**Dấu hiệu cần flag:**
|
|
212
|
+
- Flow chỉ có "happy path thẳng" mà không có nhánh cho re-try / back-navigation
|
|
213
|
+
- Business rule áp dụng tại step N phụ thuộc data step N-1, nhưng không có guard khi backward
|
|
214
|
+
|
|
215
|
+
**Scoring:**
|
|
216
|
+
- Tất cả loop/backward scenarios có explicit handling → 1.0
|
|
217
|
+
- Có note "user có thể quay lại" nhưng không mô tả data impact → 0.75
|
|
218
|
+
- Flow chỉ one-way, không đề cập loop/backward dù UC có multi-step → 0.5
|
|
219
|
+
- Wizard / multi-step hoàn toàn thiếu backward handling → 0.25 (HIGH)
|
|
220
|
+
- Không applicable (UC single-step) → skip
|
|
221
|
+
|
|
222
|
+
Item ID: `loop_backward_flow_handled`
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
### 2.12 Figma screen coverage (via figma-cache manifests)
|
|
227
|
+
|
|
228
|
+
1. Read Figma design references for screens mapping to this FR:
|
|
229
|
+
- Use Figma MCP tools if available → filter screens matching this feature's FR ID
|
|
230
|
+
2. Read SRS screen mapping section (Mapping Figma ↔ SRS Screens table)
|
|
231
|
+
3. Cross-check:
|
|
232
|
+
- Every SRS screen (SCR-XX-XX) has a mapped Figma page/node? → check manifest
|
|
233
|
+
- Every Figma manifest screen for this FR has a corresponding SRS screen? → orphan design check
|
|
234
|
+
4. Finding: SRS screen without Figma design → MEDIUM; Figma screen without SRS → LOW (informational)
|
|
235
|
+
|
|
236
|
+
Item ID: `figma_screen_coverage`
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## 3. Ghi findings
|
|
241
|
+
|
|
242
|
+
Với mỗi finding, ghi theo format:
|
|
243
|
+
|
|
244
|
+
```markdown
|
|
245
|
+
| # | Severity | Dimension | File | Item ID | Score | Evidence | Suggestion | Business Impact | Source |
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Each finding MUST include `business_impact` with three sub-fields:
|
|
249
|
+
- **WHO**: Primary stakeholder affected (Dev, QA, PO, Ops, Customer)
|
|
250
|
+
- **WHAT**: Impact type (Blocked, Rework risk, UX degradation, Compliance risk)
|
|
251
|
+
- **WHEN**: When impact materializes (Before Sprint, During Sprint, After Release)
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
- Source = `auto` cho section checks, `llm` cho semantic analysis
|
|
255
|
+
- Score: 1.0 / 0.75 / 0.5 / 0.25 / 0.0
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## 4. Tính Completeness dimension score
|
|
260
|
+
|
|
261
|
+
```
|
|
262
|
+
completeness_score = round(sum(item_scores.values()) / 29 × 100, 1)
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Canonical item IDs (N = 29, fixed — excludes meta fields `uc_count`, `invented_requirements`):
|
|
266
|
+
`has_overview`, `has_use_case_summary`, `has_glossary`, `has_references`, `has_uc_screens`, `has_screen_control_table`, `has_activity_diagram_per_uc`, `has_uc_flow_table`, `has_figma_mapping`, `has_error_codes`, `has_impact`, `has_dependency_map`, `has_business_rules`, `has_nfrs`, `has_dependencies`, `has_gap_analysis`, `has_state_diagrams`, `has_traceability`, `has_edge_cases`, `has_acceptance_criteria`, `has_open_questions_footer`, `prd_ac_coverage`, `derived_from_traceability`, `role_permission_per_uc`, `input_output_validation_coverage`, `loop_backward_flow_handled`, `figma_screen_coverage`, `downstream_event_consumers`, `cancellation_subflows_by_context`
|
|
267
|
+
|
|
268
|
+
⚠️ MANDATORY: N = 29 (fixed). N/A items → score = 1.0 (do not skip from denominator). No post-hoc calibration. dimension_score in YAML = formula result only.
|
|
269
|
+
|
|
270
|
+
Ghi nhận: `completeness_score = X%`, status = OK/WARN/FAIL
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## 5. Append findings vào report
|
|
275
|
+
|
|
276
|
+
Append tất cả CRITICAL/HIGH findings vào section "4. Critical & High Findings" của report file.
|
|
277
|
+
Append MEDIUM/LOW findings vào section "5. Medium & Low Findings".
|
|
278
|
+
|
|
279
|
+
Update frontmatter: thêm `step-v-03-completeness` vào `stepsCompleted`.
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## [NEW] Write Structured Findings
|
|
284
|
+
|
|
285
|
+
Write file `{findingsOutput}`:
|
|
286
|
+
```yaml
|
|
287
|
+
# findings-completeness.yaml — generated by step-v-03
|
|
288
|
+
# model: opus | weight: 1.0
|
|
289
|
+
|
|
290
|
+
dimension: completeness
|
|
291
|
+
weight: 1.0
|
|
292
|
+
dimension_score: 0 # = round(sum(item_scores.values()) / 29 × 100, 1)
|
|
293
|
+
status: OK # OK | WARN | FAIL
|
|
294
|
+
findings: []
|
|
295
|
+
summary:
|
|
296
|
+
total: 0
|
|
297
|
+
critical: 0
|
|
298
|
+
high: 0
|
|
299
|
+
medium: 0
|
|
300
|
+
low: 0
|
|
301
|
+
item_scores:
|
|
302
|
+
has_overview: 0.0
|
|
303
|
+
has_use_case_summary: 0.0
|
|
304
|
+
has_glossary: 0.0
|
|
305
|
+
has_references: 0.0
|
|
306
|
+
has_uc_screens: 0.0
|
|
307
|
+
has_screen_control_table: 0.0 # NEW — screen control table per UC
|
|
308
|
+
has_activity_diagram_per_uc: 0.0 # NEW — Activity Diagram per UC (replaces has_uc_sequence)
|
|
309
|
+
has_uc_flow_table: 0.0
|
|
310
|
+
has_figma_mapping: 0.0 # NEW — Figma mapping or explicit N/A note
|
|
311
|
+
has_error_codes: 0.0 # Section 3 (was Section 4)
|
|
312
|
+
has_impact: 0.0 # Section 4 (was Section 5)
|
|
313
|
+
has_dependency_map: 0.0 # NEW — Dependency Map plantuml in Section 4
|
|
314
|
+
has_business_rules: 0.0 # Section 5 (was Section 6)
|
|
315
|
+
has_nfrs: 0.0 # Section 6 (was Section 7)
|
|
316
|
+
has_dependencies: 0.0 # Section 7 (was Section 8)
|
|
317
|
+
has_gap_analysis: 0.0 # NEW — Gap Analysis table in Section 7.4 or Section 9
|
|
318
|
+
has_state_diagrams: 0.0 # Section 8 (was Section 9)
|
|
319
|
+
has_traceability: 0.0 # Section 9 (was Section 10)
|
|
320
|
+
has_edge_cases: 0.0
|
|
321
|
+
has_acceptance_criteria: 0.0
|
|
322
|
+
has_open_questions_footer: 0.0 # NEW — "Các điểm cần Business confirm" footer
|
|
323
|
+
prd_ac_coverage: 0.0
|
|
324
|
+
derived_from_traceability: 0.0
|
|
325
|
+
role_permission_per_uc: 0.0
|
|
326
|
+
input_output_validation_coverage: 0.0
|
|
327
|
+
loop_backward_flow_handled: 0.0
|
|
328
|
+
figma_screen_coverage: 0.0
|
|
329
|
+
downstream_event_consumers: 0.0
|
|
330
|
+
cancellation_subflows_by_context: 0.0
|
|
331
|
+
uc_count: 0
|
|
332
|
+
invented_requirements: [] # list of UC/BR IDs flagged as invented
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
## 6. Menu
|
|
338
|
+
|
|
339
|
+
```
|
|
340
|
+
Completeness Score: {X}% ({status})
|
|
341
|
+
- CRITICAL: {count}
|
|
342
|
+
- HIGH: {count}
|
|
343
|
+
- MEDIUM: {count}
|
|
344
|
+
- LOW: {count}
|
|
345
|
+
|
|
346
|
+
[C] Continue — Sang Consistency (Step V-04)
|
|
347
|
+
[D] Detail — Xem chi tiết findings
|
|
348
|
+
[X] Cancel
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
**Chờ user chọn.**
|
|
352
|
+
|
|
353
|
+
Khi user chọn **C**: đọc fully và follow `./step-v-04-consistency.md`
|