@ngocsangairvds/vsaf 4.1.25 → 4.1.27
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/skills/sdlc/pack.yaml +4 -0
- package/skills/sdlc/sdlc-validate-srs/SKILL.md +8 -0
- package/skills/sdlc/sdlc-validate-srs/data/domain-checklists/insurance.yaml +110 -0
- package/skills/sdlc/sdlc-validate-srs/data/grep-patterns-srs.yaml +158 -0
- package/skills/sdlc/sdlc-validate-srs/data/srs-review-glossary.md +237 -0
- package/skills/sdlc/sdlc-validate-srs/steps-v/step-v-01-discovery.md +280 -0
- package/skills/sdlc/sdlc-validate-srs/steps-v/step-v-02-business-alignment.md +351 -0
- package/skills/sdlc/sdlc-validate-srs/steps-v/step-v-03-completeness.md +353 -0
- package/skills/sdlc/sdlc-validate-srs/steps-v/step-v-04-consistency.md +352 -0
- package/skills/sdlc/sdlc-validate-srs/steps-v/step-v-05-quality.md +347 -0
- package/skills/sdlc/sdlc-validate-srs/steps-v/step-v-06-system-nfr.md +217 -0
- package/skills/sdlc/sdlc-validate-srs/steps-v/step-v-07-delivery-readiness.md +288 -0
- package/skills/sdlc/sdlc-validate-srs/steps-v/step-v-08-risk-analysis.md +283 -0
- package/skills/sdlc/sdlc-validate-srs/steps-v/step-v-09-user-impact.md +262 -0
- package/skills/sdlc/sdlc-validate-srs/steps-v/step-v-10-report.md +308 -0
- package/skills/sdlc/sdlc-validate-srs/workflow.md +269 -0
- package/skills/sdlc/sdlc-write-srs/SKILL.md +8 -0
- package/skills/sdlc/sdlc-write-srs/srs-feature-template.md +669 -0
- package/skills/sdlc/sdlc-write-srs/srs-system-template.md +430 -0
- package/skills/sdlc/sdlc-write-srs/workflow.md +139 -0
- package/skills/sdlc/srs/SKILL.md +44 -55
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
---
|
|
2
|
+
# model: sonnet
|
|
3
|
+
# findingsOutput: '{output_folder}/_validation_temp/findings-system-nfr.yaml'
|
|
4
|
+
# contextFile: '{output_folder}/_validation_temp/context.yaml'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Step V-06: System & NFR — Validate kiến trúc và yêu cầu phi chức năng
|
|
8
|
+
|
|
9
|
+
Weight: **1.0**
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 0. Load Context
|
|
14
|
+
Read `{contextFile}` → get `srs_path`, `kg.prd_key_sections`, `kg.brd_key_sections`. Use KG line ranges for all upstream document reads — do NOT read full PRD/BRD.
|
|
15
|
+
|
|
16
|
+
## 1. Performance check
|
|
17
|
+
|
|
18
|
+
Kiểm tra mỗi SRS file:
|
|
19
|
+
|
|
20
|
+
- Có **latency target** cho key operations? (VD: API response < 200ms, page load < 3s)
|
|
21
|
+
- Có **TPS / throughput** targets? (VD: 1000 requests/second)
|
|
22
|
+
- Có **SLA** định nghĩa? (VD: 99.9% uptime)
|
|
23
|
+
- Có **load expectations** cụ thể? (VD: concurrent users, peak traffic)
|
|
24
|
+
|
|
25
|
+
**Scoring:**
|
|
26
|
+
- Đủ cả 4: latency + TPS + SLA + load → 1.0
|
|
27
|
+
- Có 2-3 mục → 0.75
|
|
28
|
+
- Chỉ có 1 mục chung chung → 0.5
|
|
29
|
+
- Không có → 0.0
|
|
30
|
+
|
|
31
|
+
Item ID: `nfr_performance`
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 2. Reliability & Resilience check
|
|
36
|
+
|
|
37
|
+
Kiểm tra:
|
|
38
|
+
|
|
39
|
+
- **Retry policy** cho external calls? (số lần retry, backoff strategy)
|
|
40
|
+
- **Idempotency** cho payment / order operations?
|
|
41
|
+
- **Fallback strategy** khi service xuống?
|
|
42
|
+
- **Circuit breaker** pattern?
|
|
43
|
+
- **Data consistency** khi failure (rollback, compensating transaction)?
|
|
44
|
+
|
|
45
|
+
**Scoring:**
|
|
46
|
+
- Retry + idempotency + fallback đầy đủ → 1.0
|
|
47
|
+
- Có retry + idempotency nhưng thiếu fallback → 0.75
|
|
48
|
+
- Chỉ mention "cần xử lý lỗi" chung chung → 0.5
|
|
49
|
+
- Không có → 0.0
|
|
50
|
+
|
|
51
|
+
Item ID: `nfr_reliability`
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 3. Security & Compliance check
|
|
56
|
+
|
|
57
|
+
Kiểm tra:
|
|
58
|
+
|
|
59
|
+
- **Authentication** required cho sensitive operations?
|
|
60
|
+
- **Authorization (RBAC)** cho từng role?
|
|
61
|
+
- **PII protection**: Dữ liệu cá nhân được xử lý như thế nào?
|
|
62
|
+
- **Compliance requirements**: PDPA, PCI-DSS, ISO, Nghị định liên quan?
|
|
63
|
+
- **Data encryption**: in-transit và at-rest?
|
|
64
|
+
- **Audit logging** cho financial operations?
|
|
65
|
+
|
|
66
|
+
**Scoring:**
|
|
67
|
+
- Auth + RBAC + PII + compliance đầy đủ → 1.0
|
|
68
|
+
- Auth + RBAC + PII có nhưng thiếu compliance detail → 0.75
|
|
69
|
+
- Chỉ có auth requirement → 0.5
|
|
70
|
+
- Không đề cập → 0.0
|
|
71
|
+
|
|
72
|
+
Item ID: `nfr_security`
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 4. Observability check
|
|
77
|
+
|
|
78
|
+
Kiểm tra:
|
|
79
|
+
|
|
80
|
+
- **Logging requirements**: log level, log format, log retention?
|
|
81
|
+
- **Metrics**: key metrics cần track? (VD: order success rate, payment latency)
|
|
82
|
+
- **Alerts / thresholds**: điều kiện trigger alert?
|
|
83
|
+
- **Tracing**: distributed tracing / correlation ID?
|
|
84
|
+
- **Health check / readiness probe** requirements?
|
|
85
|
+
|
|
86
|
+
**Scoring:**
|
|
87
|
+
- Logging + metrics + alerts đầy đủ → 1.0
|
|
88
|
+
- Có logging + metrics nhưng thiếu alerts → 0.75
|
|
89
|
+
- Chỉ mention "cần log" chung chung → 0.5
|
|
90
|
+
- Không có → 0.0
|
|
91
|
+
|
|
92
|
+
Item ID: `nfr_observability`
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 5. Scalability check
|
|
97
|
+
|
|
98
|
+
Kiểm tra:
|
|
99
|
+
|
|
100
|
+
- **Horizontal scaling**: có thể scale out không?
|
|
101
|
+
- **Stateless design** cho API services?
|
|
102
|
+
- **Caching strategy**: Redis, CDN, in-memory?
|
|
103
|
+
- **Database**: read replica, sharding, partition strategy?
|
|
104
|
+
- **Queue / async processing** cho heavy operations?
|
|
105
|
+
|
|
106
|
+
**Scoring:**
|
|
107
|
+
- Scalability approach rõ ràng với strategy cụ thể → 1.0
|
|
108
|
+
- Có đề cập caching + async nhưng không chi tiết → 0.75
|
|
109
|
+
- Chỉ mention "cần scalable" chung chung → 0.5
|
|
110
|
+
- Không đề cập → 0.0
|
|
111
|
+
|
|
112
|
+
Item ID: `nfr_scalability`
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## 6. Architecture Alignment check
|
|
117
|
+
|
|
118
|
+
Kiểm tra SRS có consistent với architecture decisions:
|
|
119
|
+
|
|
120
|
+
- Technology stack (DB, messaging, framework) có nhất quán với System SRS?
|
|
121
|
+
- Integration patterns (sync vs async, REST vs event) rõ ràng?
|
|
122
|
+
- Service boundaries rõ ràng? (không có SRS function vượt ranh giới service)
|
|
123
|
+
|
|
124
|
+
Item ID: `architecture_alignment`
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## 7. Architecture NFR Alignment (via KG)
|
|
129
|
+
|
|
130
|
+
**Token-efficient:** Read architecture entity → find NFR/ADR sections → targeted read.
|
|
131
|
+
|
|
132
|
+
1. From KG: read architecture entity `key_sections` → find NFR-related sections
|
|
133
|
+
2. Targeted read of architecture NFR targets
|
|
134
|
+
3. Compare:
|
|
135
|
+
- SRS performance targets (latency, TPS) align with architecture capacity planning?
|
|
136
|
+
- SRS security requirements consistent with architecture security decisions?
|
|
137
|
+
- SRS data storage decisions match architecture DB choices (from service entity)?
|
|
138
|
+
|
|
139
|
+
Item ID: `architecture_nfr_alignment`
|
|
140
|
+
Scoring: 1.0 (consistent) / 0.75 (minor gaps) / 0.5 (significant deviation) / 0.0 (contradicts)
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## 9. Ghi findings
|
|
145
|
+
|
|
146
|
+
```markdown
|
|
147
|
+
| # | Severity | Dimension | File | Item ID | Score | Evidence | Suggestion | Business Impact | Source |
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Each finding MUST include `business_impact` with three sub-fields:
|
|
151
|
+
- **WHO**: Primary stakeholder affected (Dev, QA, PO, Ops, Customer)
|
|
152
|
+
- **WHAT**: Impact type (Blocked, Rework risk, UX degradation, Compliance risk)
|
|
153
|
+
- **WHEN**: When impact materializes (Before Sprint, During Sprint, After Release)
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## 10. Tính System & NFR dimension score
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
system_nfr_score = round(sum(item_scores.values()) / 7 × 100, 1)
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Canonical item IDs (N = 7, fixed):
|
|
165
|
+
`nfr_performance`, `nfr_reliability`, `nfr_security`, `nfr_observability`, `nfr_scalability`, `architecture_alignment`, `architecture_nfr_alignment`
|
|
166
|
+
|
|
167
|
+
⚠️ MANDATORY: N = 7 (fixed). N/A items → score = 1.0 (do not skip from denominator). No post-hoc calibration. dimension_score in YAML = formula result only.
|
|
168
|
+
|
|
169
|
+
Weight: **1.0**
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## 11. Append findings vào report
|
|
174
|
+
|
|
175
|
+
Append CRITICAL/HIGH → section "4. Critical & High Findings".
|
|
176
|
+
Append MEDIUM/LOW → section "5. Medium & Low Findings".
|
|
177
|
+
|
|
178
|
+
Update frontmatter: thêm `step-v-06-system-nfr` vào `stepsCompleted`.
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## [NEW] Write Structured Findings
|
|
183
|
+
Write `{findingsOutput}`:
|
|
184
|
+
```yaml
|
|
185
|
+
dimension: system_nfr
|
|
186
|
+
weight: 1.0
|
|
187
|
+
dimension_score: 0 # = round(sum(item_scores.values()) / 7 × 100, 1)
|
|
188
|
+
status: OK
|
|
189
|
+
findings: []
|
|
190
|
+
summary: {total: 0, critical: 0, high: 0, medium: 0, low: 0}
|
|
191
|
+
item_scores:
|
|
192
|
+
nfr_performance: 0.0
|
|
193
|
+
nfr_reliability: 0.0
|
|
194
|
+
nfr_security: 0.0
|
|
195
|
+
nfr_observability: 0.0
|
|
196
|
+
nfr_scalability: 0.0
|
|
197
|
+
architecture_alignment: 0.0
|
|
198
|
+
architecture_nfr_alignment: 0.0
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## 12. Menu
|
|
202
|
+
|
|
203
|
+
```
|
|
204
|
+
System & NFR Score: {X}% ({status}) [weight 1.0]
|
|
205
|
+
- CRITICAL: {count}
|
|
206
|
+
- HIGH: {count}
|
|
207
|
+
- MEDIUM: {count}
|
|
208
|
+
- LOW: {count}
|
|
209
|
+
|
|
210
|
+
[C] Continue — Sang Delivery Readiness (Step V-07)
|
|
211
|
+
[D] Detail — Xem chi tiết findings
|
|
212
|
+
[X] Cancel
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Chờ user chọn.**
|
|
216
|
+
|
|
217
|
+
Khi user chọn **C**: đọc fully và follow `./step-v-07-delivery-readiness.md`
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
---
|
|
2
|
+
# model: sonnet
|
|
3
|
+
# findingsOutput: '{output_folder}/_validation_temp/findings-delivery-readiness.yaml'
|
|
4
|
+
# contextFile: '{output_folder}/_validation_temp/context.yaml'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Step V-07: Delivery Readiness — Đánh giá mức độ sẵn sàng triển khai
|
|
8
|
+
|
|
9
|
+
Weight: **1.0**
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 0. Load Context
|
|
14
|
+
Read `{contextFile}` → get `srs_path`, `kg.prd_key_sections`, `kg.brd_key_sections`. Use KG line ranges for all upstream document reads — do NOT read full PRD/BRD.
|
|
15
|
+
|
|
16
|
+
> **Template note (2026-04):** API endpoint specs, DB schema, và Kafka event payload schemas đã bị **xóa khỏi SRS** — những artifact này thuộc về TSD (Technical Specification Document). Không check `api_contracts_defined`, `db_schema_specified`, `event_payload_schema` nữa. Thay bằng các check mới phù hợp template.
|
|
17
|
+
|
|
18
|
+
## 1. TSD Delegation & Screen Validation
|
|
19
|
+
|
|
20
|
+
### 1.1 TSD Delegation noted
|
|
21
|
+
|
|
22
|
+
- SRS có ghi rõ "API design → TSD" / "DB schema → TSD" thay vì cố inline API/DB spec không?
|
|
23
|
+
- Nếu SRS có inline API endpoint table với full request/response schema → flag MEDIUM (wrong artifact level)
|
|
24
|
+
|
|
25
|
+
**Scoring:**
|
|
26
|
+
- Không có inline API/DB spec (clean) OR có note "see TSD" → 1.0
|
|
27
|
+
- Có mention API path nhưng không có full schema (ví dụ: trong flow step) → 0.75 (acceptable)
|
|
28
|
+
- Có inline API spec table với full schema → 0.5 (MEDIUM — belongs in TSD)
|
|
29
|
+
|
|
30
|
+
Item ID: `tsd_delegation_noted`
|
|
31
|
+
|
|
32
|
+
### 1.2 Screen Control Validation Complete
|
|
33
|
+
|
|
34
|
+
Áp dụng cho mỗi UC có màn hình B2C/Admin.
|
|
35
|
+
|
|
36
|
+
Kiểm tra bảng screen control (Section 2.X.1):
|
|
37
|
+
- Cột `Require` điền đầy đủ (Bắt buộc / Tùy chọn) cho mỗi control?
|
|
38
|
+
- Cột `Maxlength` điền cho Text Input controls?
|
|
39
|
+
- Cột `Mô tả` có `**Validate:**` với error messages cho các input controls quan trọng?
|
|
40
|
+
- Error messages trỏ đến mã lỗi trong Section 3 không?
|
|
41
|
+
|
|
42
|
+
**Scoring:**
|
|
43
|
+
- Đầy đủ Require + Maxlength + Validate messages + error code ref → 1.0
|
|
44
|
+
- Có Require/Maxlength nhưng thiếu Validate messages → 0.75
|
|
45
|
+
- Bảng control có cấu trúc nhưng nhiều ô trống / thiếu thông tin → 0.5
|
|
46
|
+
- Không có bảng control (cho UC có màn hình) → 0.0 (MEDIUM)
|
|
47
|
+
- UC không có màn hình (backend-only) → skip
|
|
48
|
+
|
|
49
|
+
Item ID: `screen_control_validation_complete`
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 3. Error Handling
|
|
54
|
+
|
|
55
|
+
### 3.1 Error code registry
|
|
56
|
+
- Có danh sách error codes trong Section 3 "Danh sách mã lỗi đối tác trả về"?
|
|
57
|
+
- Format nhất quán: STT, Bước, Trường hợp, Mã lỗi, Mã thông báo lỗi?
|
|
58
|
+
- Mapping rõ ràng với bước trong flow (cột "Bước" trỏ đến bước trong activity diagram)?
|
|
59
|
+
|
|
60
|
+
### 3.2 Central registry (cross-file)
|
|
61
|
+
- Có central error code registry trong System SRS?
|
|
62
|
+
- Format nhất quán giữa modules?
|
|
63
|
+
|
|
64
|
+
Item ID: `error_handling_defined`
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## 4. State Machine Completeness
|
|
69
|
+
|
|
70
|
+
Kiểm tra state diagrams (Section 8):
|
|
71
|
+
|
|
72
|
+
- Tất cả states được define?
|
|
73
|
+
- Tất cả transitions có trigger/guard/action?
|
|
74
|
+
- Initial state → final state path exists?
|
|
75
|
+
- Orphan states (no transition in/out)?
|
|
76
|
+
- Missing transitions (VD: error recovery)?
|
|
77
|
+
|
|
78
|
+
Item ID: `state_machine_complete`
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## 5. Integration Specs
|
|
83
|
+
|
|
84
|
+
Kiểm tra external integrations:
|
|
85
|
+
|
|
86
|
+
- External API: format, auth method, timeout, retry policy?
|
|
87
|
+
- Third-party services: contract defined?
|
|
88
|
+
|
|
89
|
+
Item ID: `integration_specs`
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## 6. Validation Rules
|
|
94
|
+
|
|
95
|
+
Kiểm tra input field validation trong screen control tables (Section 2.X.1):
|
|
96
|
+
|
|
97
|
+
> **Template note (2026-04):** Validation rules được định nghĩa INLINE trong cột Mô tả của screen control table, không phải separate section.
|
|
98
|
+
|
|
99
|
+
- Mỗi input control quan trọng trong bảng màn hình có keyword `**Validate:**`?
|
|
100
|
+
- Các validation conditions: bỏ trống, sai định dạng, ngoài range, duplicate?
|
|
101
|
+
- Error messages rõ ràng và tham chiếu mã lỗi trong Section 3?
|
|
102
|
+
- Dropdown/Checkbox có ghi giá trị hợp lệ?
|
|
103
|
+
|
|
104
|
+
Item ID: `validation_rules`
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 7. Business Rules Implementability
|
|
109
|
+
|
|
110
|
+
- Mỗi BR có thể code trực tiếp mà không cần interpret?
|
|
111
|
+
- BR có đầy đủ: condition, action, exception?
|
|
112
|
+
- BR có tham chiếu nguồn (PRD, nghị định)?
|
|
113
|
+
|
|
114
|
+
Item ID: `br_implementable`
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## 8. Test Readiness
|
|
119
|
+
|
|
120
|
+
Kiểm tra khả năng test:
|
|
121
|
+
|
|
122
|
+
- AC có trực tiếp map được sang test cases không?
|
|
123
|
+
- Có test data examples hoặc test scenarios?
|
|
124
|
+
- Edge cases đã được đặc tả đủ để viết tests?
|
|
125
|
+
|
|
126
|
+
**Scoring:**
|
|
127
|
+
- AC → test case mapping rõ ràng + test data → 1.0
|
|
128
|
+
- AC testable nhưng thiếu test data → 0.75
|
|
129
|
+
- AC khó map sang test cases (too vague) → 0.5
|
|
130
|
+
- Không có AC → 0.0
|
|
131
|
+
|
|
132
|
+
Item ID: `test_readiness`
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## 8b. Async SLA & Escalation
|
|
137
|
+
|
|
138
|
+
Kiểm tra mỗi async operation (insurer callback, UW async, endorsement, webhook):
|
|
139
|
+
|
|
140
|
+
- Có SLA timeout rõ ràng? (VD: insurer phải trả kết quả trong 24h)
|
|
141
|
+
- Có hành vi khi timeout: tự huỷ, escalate, hay retry?
|
|
142
|
+
- Có escalation path khi quá SLA? Ai nhận alert? Ai xử lý?
|
|
143
|
+
- **HIGH**: async flow không có SLA → system không biết khi nào nên dừng chờ, KH/partner bị treo vô thời hạn
|
|
144
|
+
- VD: endorsement treo ở `INSURER_PROCESSING` mãi vì không có timeout → pattern lỗi phổ biến
|
|
145
|
+
|
|
146
|
+
**Scoring:**
|
|
147
|
+
- Tất cả async flows có SLA + escalation → 1.0
|
|
148
|
+
- Có SLA nhưng không có escalation/behavior → 0.5
|
|
149
|
+
- Không có SLA cho bất kỳ async flow nào → 0.0 (HIGH)
|
|
150
|
+
|
|
151
|
+
Item ID: `async_sla_defined`
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## 8c. Auth Method Mapping
|
|
156
|
+
|
|
157
|
+
Áp dụng khi SRS là API gateway hoặc có nhiều loại integration partner (FR13 API Factory, FR8 Purchase Flow, FR10 Policy Lifecycle...).
|
|
158
|
+
|
|
159
|
+
> **Template note (2026-04):** Auth method mapping là TSD concern với feature SRS thông thường. Chỉ check ở SRS level khi FR có nhiều channels với auth khác nhau. Severity downgrade LOW (không còn MEDIUM) cho feature SRS.
|
|
160
|
+
|
|
161
|
+
- Có bảng mapping rõ ràng: channel/actor nào dùng auth method nào?
|
|
162
|
+
- VD: Channel Partner → API Key, KH B2C → JWT, Insurer callback → HMAC, Internal service → mTLS
|
|
163
|
+
- **LOW**: thiếu mapping ở SRS level → acceptable nếu TSD sẽ define. Flag chỉ nếu FR có explicit multi-auth requirement
|
|
164
|
+
|
|
165
|
+
**Scoring:**
|
|
166
|
+
- Có mapping table đầy đủ → 1.0
|
|
167
|
+
- Có mention nhưng không có mapping → 0.5
|
|
168
|
+
- Không đề cập → 0.75 (skip nếu single-channel feature)
|
|
169
|
+
|
|
170
|
+
Item ID: `auth_method_mapping`
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## 8d. Configurable Thresholds
|
|
175
|
+
|
|
176
|
+
Kiểm tra các thresholds/config values trong SRS:
|
|
177
|
+
|
|
178
|
+
- Hardcoded values có nên là configurable không?
|
|
179
|
+
- VD: OCR confidence threshold 0.85 (có thể khác nhau per insurer/product)
|
|
180
|
+
- VD: retry count, grace period duration, rate limit values
|
|
181
|
+
- Nếu value có thể hợp lệ ở mức khác nhau per product/insurer/context → phải đánh dấu configurable
|
|
182
|
+
- **MEDIUM**: threshold hardcode có thể tạo ra nhiều PRs/deploys khi business muốn thay đổi
|
|
183
|
+
|
|
184
|
+
Item ID: `configurable_thresholds_flagged`
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## 8e. Error Code Edge-State Coverage
|
|
189
|
+
|
|
190
|
+
Kiểm tra section 4 (error codes) có cover các tình huống "cross-state edges":
|
|
191
|
+
|
|
192
|
+
- Có mã lỗi cho: cố thực hiện action X trên entity ở trạng thái Y không tương thích?
|
|
193
|
+
- VD: gia hạn HĐ đã quá grace period → cần mã lỗi riêng, không dùng generic 400
|
|
194
|
+
- VD: huỷ HĐ đang LAPSED, endorsement khi HĐ còn < N ngày
|
|
195
|
+
- VD: quote expired rồi mới gọi purchase, purchase khi có session pending
|
|
196
|
+
- Đếm số state × action combinations quan trọng, kiểm tra coverage
|
|
197
|
+
- **MEDIUM**: thiếu mã lỗi cross-state → partner/KH nhận HTTP 400 chung chung, không xây được UX
|
|
198
|
+
|
|
199
|
+
Item ID: `error_code_edge_states`
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## 9. Rollout & Migration
|
|
204
|
+
|
|
205
|
+
Kiểm tra deployment considerations từ Section 7.4 "Yêu cầu chuyển đổi":
|
|
206
|
+
|
|
207
|
+
- **Rollout strategy**: big bang, phased, feature flag?
|
|
208
|
+
- **Migration plan**: data migration scripts, backward compatibility?
|
|
209
|
+
- **Transition requirements table**: có TR-001, TR-002... hoặc ghi rõ "Không áp dụng — flow mới hoàn toàn"?
|
|
210
|
+
- **Feature flags**: toggle strategy cho new features?
|
|
211
|
+
- **Rollback plan**: nếu rollout thất bại?
|
|
212
|
+
|
|
213
|
+
**Scoring:**
|
|
214
|
+
- Có rollout strategy + migration plan + rollback → 1.0
|
|
215
|
+
- Có rollout strategy nhưng thiếu migration/rollback → 0.75
|
|
216
|
+
- Chỉ mention "cần migration" chung chung → 0.5
|
|
217
|
+
- Không đề cập → 0.0
|
|
218
|
+
|
|
219
|
+
Item ID: `rollout_migration_plan`
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## 10. Tính Delivery Readiness dimension score
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
delivery_readiness_score = round(sum(item_scores.values()) / 13 × 100, 1)
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Canonical item IDs (N = 13, fixed):
|
|
230
|
+
`tsd_delegation_noted`, `screen_control_validation_complete`, `error_handling_defined`, `state_machine_complete`, `integration_specs`, `validation_rules`, `br_implementable`, `test_readiness`, `async_sla_defined`, `auth_method_mapping`, `configurable_thresholds_flagged`, `error_code_edge_states`, `rollout_migration_plan`
|
|
231
|
+
|
|
232
|
+
⚠️ MANDATORY: N = 13 (fixed). N/A items → score = 1.0 (do not skip from denominator). No post-hoc calibration. dimension_score in YAML = formula result only.
|
|
233
|
+
|
|
234
|
+
Weight: **1.0**
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## 11. Append findings vào report
|
|
239
|
+
|
|
240
|
+
Append CRITICAL/HIGH → section "4. Critical & High Findings".
|
|
241
|
+
Append MEDIUM/LOW → section "5. Medium & Low Findings".
|
|
242
|
+
|
|
243
|
+
Update frontmatter: thêm `step-v-07-delivery-readiness` vào `stepsCompleted`.
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## [NEW] Write Structured Findings
|
|
248
|
+
Write `{findingsOutput}`:
|
|
249
|
+
```yaml
|
|
250
|
+
dimension: delivery_readiness
|
|
251
|
+
weight: 1.0
|
|
252
|
+
dimension_score: 0 # = round(sum(item_scores.values()) / 13 × 100, 1)
|
|
253
|
+
status: OK
|
|
254
|
+
findings: []
|
|
255
|
+
summary: {total: 0, critical: 0, high: 0, medium: 0, low: 0}
|
|
256
|
+
item_scores:
|
|
257
|
+
tsd_delegation_noted: 0.0
|
|
258
|
+
screen_control_validation_complete: 0.0
|
|
259
|
+
error_handling_defined: 0.0
|
|
260
|
+
state_machine_complete: 0.0
|
|
261
|
+
integration_specs: 0.0
|
|
262
|
+
validation_rules: 0.0
|
|
263
|
+
br_implementable: 0.0
|
|
264
|
+
test_readiness: 0.0
|
|
265
|
+
async_sla_defined: 0.0
|
|
266
|
+
auth_method_mapping: 0.0
|
|
267
|
+
configurable_thresholds_flagged: 0.0
|
|
268
|
+
error_code_edge_states: 0.0
|
|
269
|
+
rollout_migration_plan: 0.0
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
## 12. Menu
|
|
273
|
+
|
|
274
|
+
```
|
|
275
|
+
Delivery Readiness Score: {X}% ({status}) [weight 1.0]
|
|
276
|
+
- CRITICAL: {count}
|
|
277
|
+
- HIGH: {count}
|
|
278
|
+
- MEDIUM: {count}
|
|
279
|
+
- LOW: {count}
|
|
280
|
+
|
|
281
|
+
[C] Continue — Sang Risk Analysis (Step V-08)
|
|
282
|
+
[D] Detail — Xem chi tiết findings
|
|
283
|
+
[X] Cancel
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
**Chờ user chọn.**
|
|
287
|
+
|
|
288
|
+
Khi user chọn **C**: đọc fully và follow `./step-v-08-risk-analysis.md`
|