@shanyucoder/flowgrid 0.1.8 → 0.1.10
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/bin/flowgrid.mjs +43 -9
- package/bin/lib/audit-run.mjs +5 -1
- package/bin/lib/docs-hub-locale.mjs +9 -0
- package/bin/lib/init-scaffold.mjs +30 -2
- package/dist/docs/mcp/tools.js +4 -4
- package/dist/docs/mcp/tools.js.map +1 -1
- package/dist/docs/scan/ids.d.ts +1 -1
- package/dist/docs/scan/ids.js +6 -6
- package/dist/docs/scan/ids.js.map +1 -1
- package/dist/docs/scan/route.js +2 -2
- package/dist/docs/scan/route.js.map +1 -1
- package/engines/cases/render-cases.mjs +33 -25
- package/engines/docs/lib/audit-hub-prd.mjs +136 -0
- package/engines/docs/lib/audit-risks-catalog.mjs +142 -0
- package/engines/docs/lib/docs-hub-locale.mjs +100 -0
- package/engines/docs/lib/qa-item.mjs +91 -0
- package/engines/docs/lib/render-bundle-markdown.mjs +8 -1
- package/engines/docs/lib/render-qa-list.mjs +123 -25
- package/engines/docs/vitepress/config.ts +4 -4
- package/engines/spec/lib/audit-bundle-gaps.mjs +38 -7
- package/engines/spec/lib/audit-flow-gaps.mjs +2 -2
- package/engines/spec/lib/bundle-schema.mjs +3 -1
- package/engines/spec/lib/open-qa.mjs +71 -21
- package/engines/testcase/runners/lib/resolve-hub-id.mjs +3 -3
- package/harness/common/skills/legacy/SKILL.md +2 -2
- package/harness/docs/extracts/agent-execution-protocol.md +2 -2
- package/harness/docs/extracts/api-codegen-readiness.md +1 -1
- package/harness/docs/extracts/api-spec-sync.md +1 -1
- package/harness/docs/extracts/call-external.md +1 -1
- package/harness/docs/extracts/common-scope.md +8 -8
- package/harness/docs/extracts/design-leaf-signoff.md +2 -2
- package/harness/docs/extracts/extract-registry.docs.json +2 -1
- package/harness/docs/extracts/qa-inbox.md +19 -10
- package/harness/docs/extracts/qa-team.md +32 -0
- package/harness/docs/extracts/spec-core.md +1 -1
- package/harness/docs/extracts/spec-evolution.md +1 -1
- package/harness/docs/extracts/spec-prd-lite.md +11 -13
- package/harness/docs/extracts/tpl-module.md +9 -40
- package/harness/docs/extracts/tpl-overview-prd.md +11 -0
- package/harness/docs/extracts/tpl-risk-register.md +28 -0
- package/harness/docs/extracts/tpl-surface-prd.md +7 -0
- package/harness/docs/rules/docs-hub.mdc +1 -1
- package/harness/docs/rules/flowgrid-process.mdc +1 -1
- package/harness/docs/schemas/flowgrid-docs/qa-item.schema.json +65 -0
- package/harness/docs/skills/adopt/SKILL.md +1 -1
- package/harness/docs/skills/api-spec/SKILL.md +1 -1
- package/harness/docs/skills/api-update/SKILL.md +1 -1
- package/harness/docs/skills/background-logic/SKILL.md +1 -1
- package/harness/docs/skills/common-spec/SKILL.md +1 -1
- package/harness/docs/skills/cross-service/SKILL.md +1 -1
- package/harness/docs/skills/db-erd/SKILL.md +1 -1
- package/harness/docs/skills/grill/SKILL.md +2 -0
- package/harness/docs/skills/grill-bqa/SKILL.md +2 -2
- package/harness/docs/skills/grill-dev/SKILL.md +1 -1
- package/harness/docs/skills/grill-docs/SKILL.md +2 -2
- package/harness/docs/skills/grill-hub-prd/SKILL.md +38 -0
- package/harness/docs/skills/module/SKILL.md +8 -5
- package/harness/docs/skills/overview/SKILL.md +7 -6
- package/harness/docs/skills/qa-resolve/SKILL.md +13 -12
- package/harness/docs/skills/qa-review/SKILL.md +45 -0
- package/harness/docs/skills/risk-register/SKILL.md +29 -0
- package/harness/docs/skills/spec/SKILL.md +4 -4
- package/harness/docs/skills/surfaces/SKILL.md +3 -1
- package/harness/docs/skills/update-spec/SKILL.md +2 -2
- package/harness/docs/skills/{business-process → user-flow}/SKILL.md +8 -8
- package/harness/fe/extracts/wire-audit-loop.md +1 -1
- package/harness/fe/skills/gen-common/SKILL.md +1 -1
- package/harness/fe/skills/grill-wire/SKILL.md +1 -1
- package/harness/fe/skills/wire/SKILL.md +1 -1
- package/harness/tests/extracts/grill-scenario-flow.md +2 -2
- package/harness/tests/skills/grill-testcase/SKILL.md +1 -1
- package/harness/tests/skills/scenario/SKILL.md +11 -11
- package/harness/tests/skills/testcase/SKILL.md +1 -1
- package/harness/tests/templates/SC.example.md +16 -16
- package/lexicon/registry-tags.en.txt +2 -2
- package/package.json +1 -1
- package/templates/project-skeleton/architecture/03-business-process/index.md +3 -0
- package/templates/project-skeleton/architecture/{03-business-process → 03-user-flows}/FLOW-login.md +6 -6
- package/templates/project-skeleton/architecture/{03-business-process → 03-user-flows}/FLOW-template.md +6 -7
- package/templates/project-skeleton/architecture/11-risks/index.md +7 -17
- package/templates/project-skeleton/architecture/11-risks/risk-register.md +34 -0
- package/templates/project-skeleton/architecture/12-glossary/index.md +2 -1
- package/templates/project-skeleton/overview/index.md +21 -43
- package/templates/project-skeleton/overview/operational-areas/_template.md +15 -22
- package/templates/project-skeleton/qa/README.md +4 -8
- package/templates/project-skeleton/surfaces/_module-index.template.md +40 -0
- package/templates/project-skeleton/surfaces/_surface-index.template.md +43 -0
- package/templates/schemas/qa-item.schema.json +98 -0
- package/templates/shared/bundle-authoring.md +10 -6
- package/templates/shared/default-layout.ejs +108 -62
- package/templates/shared/feature.bundle.yaml +15 -6
- package/templates/shared/ir/generated/spec.md +24 -24
- package/templates/shared/ir-spec.yaml +1 -1
- package/templates/shared/qa-authoring.md +78 -0
- package/templates/shared/qa-item.yaml +35 -14
- package/templates/shared/tpl-api-contract.md +6 -6
- package/templates/tests-skeleton/catalog/locale.yaml +16 -15
- package/templates/tests-skeleton/tpl-testcase-plan.md +6 -6
|
@@ -56,7 +56,7 @@ flowgrid audit e2e --e2e-root <playwright-dir> --tests-docs "$FLOWGRID_TESTS_DOC
|
|
|
56
56
|
Optional: pass explicit `cases/**/TC-*.yaml` paths instead of `--tests-docs`.
|
|
57
57
|
|
|
58
58
|
- Parse JSON: `missingInPlaywright`, `matrixRowsUncovered`, `orphanTestCases`, `orphanSpecs`, `gaps[]`.
|
|
59
|
-
- **[MANDATORY]** Fix or defer every `critical` / `warning` gap before marking wire done; log deferrals in `qa
|
|
59
|
+
- **[MANDATORY]** Fix or defer every `critical` / `warning` gap before marking wire done; log deferrals in `qa` if team policy allows.
|
|
60
60
|
- **[MANDATORY]** Portal leaf with `apiRef`: `flowgrid audit fe-be <bundle.yaml>`.
|
|
61
61
|
- **[MANDATORY]** When `SC-*` covers screen: `flowgrid audit scenario <SC.yaml> --tests-docs "$FLOWGRID_TESTS_DOC"`.
|
|
62
62
|
|
|
@@ -4,7 +4,7 @@ Hub SSOT: `docs/workflows/test.md#grill-scenario-flow`.
|
|
|
4
4
|
|
|
5
5
|
## Scope
|
|
6
6
|
|
|
7
|
-
- Docs **`FLOW-*.md`** exists (Phase 0 /
|
|
7
|
+
- Docs **`FLOW-*.md`** exists (Phase 0 / user-flow) — **no SC without FLOW**
|
|
8
8
|
- Tests: `scenarios/<mirror>/FLOW-<name>/SC-*.yaml` with `screens: [W-*, W-*, …]`
|
|
9
9
|
- **Per screen touched:** at least one `cases/…/TC-*.yaml` OR documented defer (`coverage_deferred` + `QA-*` on docs)
|
|
10
10
|
|
|
@@ -36,4 +36,4 @@ Hub SSOT: `docs/workflows/test.md#grill-scenario-flow`.
|
|
|
36
36
|
- [ ] Each screen's TC passed `cases:gate --strict` traceability
|
|
37
37
|
- [ ] SC `screens[]` matches docs FLOW touchpoints (spot vs `FLOW-*.md`)
|
|
38
38
|
|
|
39
|
-
Handoff thin FLOW → `/docs-hub /
|
|
39
|
+
Handoff thin FLOW → `/docs-hub /user-flow` or `/update-spec` — not tests hub.
|
|
@@ -26,7 +26,7 @@ query a workspace-parent graph.
|
|
|
26
26
|
- **[MANDATORY]** Read the entire function **`*.bundle.yaml`** (sibling of `ir/`). Cross-reference plans against bundle `userStories`, `acceptanceCriteria`, `spec.ui`, and `design.*` — not split IR files.
|
|
27
27
|
- If scenarios/acceptance are thin or missing → hand off docs-hub `/update-spec` or `/spec` (paste-ready prompt). Do not patch bundle from tests hub.
|
|
28
28
|
- **[STRICTLY FORBIDDEN]** Do NOT read generated `*.md`.
|
|
29
|
-
- If auditing **SC-***, the YAML/MD path MUST mirror the docs `FLOW-*.md` (cluster/module/surface `common/
|
|
29
|
+
- If auditing **SC-***, the YAML/MD path MUST mirror the docs `FLOW-*.md` (cluster/module/surface `common/user-flows/` or `architecture/03-user-flows/`). Flag `scenarios/auth/…` or `common/` leftovers.
|
|
30
30
|
|
|
31
31
|
## Audit Rules
|
|
32
32
|
|
|
@@ -13,7 +13,7 @@ disable-model-invocation: true
|
|
|
13
13
|
|
|
14
14
|
Author cross-flow scenarios (SC) on the current tests hub. Design rules stay on the docs hub.
|
|
15
15
|
|
|
16
|
-
Scenarios test a **
|
|
16
|
+
Scenarios test a **user flow** (`FLOW-*`) that spans multiple screens (`W-*`) or modules. They mirror the docs FLOW file **after** bộ docs LCA `common/` placement (not a flat `common/` tree).
|
|
17
17
|
|
|
18
18
|
## Output Rules
|
|
19
19
|
|
|
@@ -30,12 +30,12 @@ Scenarios test a **business process** (`FLOW-*`) that spans multiple screens (`W
|
|
|
30
30
|
|
|
31
31
|
- **[MANDATORY]** Agent MUST locate the **`FLOW-*.md`** file on the docs hub (`FLOWGRID_DOCS_ROOT`) via `flowgrid_docs_route` / `flowgrid_docs_get_element` / glob. Filenames are `FLOW-…md`, not `flow-*`.
|
|
32
32
|
- Search in this order (same LCA as bộ docs `common-scope.md`):
|
|
33
|
-
1. `surfaces/<surface>/<CMP-id>/<NN>/common/
|
|
34
|
-
2. `surfaces/<surface>/<CMP-id>/common/
|
|
35
|
-
3. `surfaces/<surface>/common/
|
|
36
|
-
4. `surfaces/common/
|
|
37
|
-
5. `architecture/03-
|
|
38
|
-
- **Strict:** Only author a scenario if that `FLOW-*.md` exists. Missing FLOW or thin business rules → hand off to docs-hub `/
|
|
33
|
+
1. `surfaces/<surface>/<CMP-id>/<NN>/common/user-flows/FLOW-*.md` (cluster)
|
|
34
|
+
2. `surfaces/<surface>/<CMP-id>/common/user-flows/FLOW-*.md` (module)
|
|
35
|
+
3. `surfaces/<surface>/common/user-flows/FLOW-*.md` (surface)
|
|
36
|
+
4. `surfaces/common/user-flows/FLOW-*.md` (cross-surface product common)
|
|
37
|
+
5. `architecture/03-user-flows/FLOW-*.md` (org catalog only)
|
|
38
|
+
- **Strict:** Only author a scenario if that `FLOW-*.md` exists. Missing FLOW or thin business rules → hand off to docs-hub `/user-flow` or `/update-spec`, do not invent SC. **[MANDATORY]** When handing off, you MUST output a comprehensive gap report (formatted as a complete, ready-to-use prompt starting with `/docs-hub`) detailing exactly what flows or business rules are missing, so the user can copy-paste it directly to run the docs-hub skill.
|
|
39
39
|
- **[STRICTLY FORBIDDEN]** Do not treat `common/yaml/` or `common/patterns/` as scenario sources.
|
|
40
40
|
|
|
41
41
|
## Directory Mirroring Rule (Docs SSOT)
|
|
@@ -44,13 +44,13 @@ Mirror the FLOW file path onto the tests hub. Strip **only** these prefixes:
|
|
|
44
44
|
|
|
45
45
|
| Docs FLOW path | Tests hub |
|
|
46
46
|
|----------------|-----------|
|
|
47
|
-
| `surfaces/<rest>/common/
|
|
48
|
-
| `architecture/03-
|
|
47
|
+
| `surfaces/<rest>/common/user-flows/FLOW-checkout.md` | `scenarios/<rest>/common/user-flows/FLOW-checkout/SC-*.yaml` |
|
|
48
|
+
| `architecture/03-user-flows/FLOW-checkout.md` | `scenarios/architecture/03-user-flows/FLOW-checkout/SC-*.yaml` |
|
|
49
49
|
|
|
50
50
|
Examples:
|
|
51
51
|
|
|
52
|
-
- Docs `surfaces/admin/CMP-ADM-002/02/common/
|
|
53
|
-
- Docs `surfaces/admin/CMP-ADM-002/common/
|
|
52
|
+
- Docs `surfaces/admin/CMP-ADM-002/02/common/user-flows/FLOW-checkout.md` → `scenarios/admin/CMP-ADM-002/02/common/user-flows/FLOW-checkout/SC-*.yaml`
|
|
53
|
+
- Docs `surfaces/admin/CMP-ADM-002/common/user-flows/FLOW-onboard.md` → `scenarios/admin/CMP-ADM-002/common/user-flows/FLOW-onboard/SC-*.yaml`
|
|
54
54
|
|
|
55
55
|
Do **not** flatten to `scenarios/auth/…`. Do **not** use `common/` (legacy). Keep numeric cluster folders (`02/`) in the tests path.
|
|
56
56
|
|
|
@@ -51,7 +51,7 @@ disable-model-invocation: true
|
|
|
51
51
|
- **[MANDATORY]** Mirror function folder: `cases/<relative-path>/TC-*.yaml`.
|
|
52
52
|
- ✅ `surfaces/admin/CMP-ADM-002/02/01/login/` → `cases/admin/CMP-ADM-002/02/01/login/TC-*.yaml`
|
|
53
53
|
- ❌ `cases/admin/auth/W-…` — invented path not matching docs structure.
|
|
54
|
-
- Cross-flow plans → `/scenario` (mirror `common/
|
|
54
|
+
- Cross-flow plans → `/scenario` (mirror `common/user-flows/FLOW-*` or `architecture/03-user-flows/FLOW-*`).
|
|
55
55
|
|
|
56
56
|
---
|
|
57
57
|
|
|
@@ -20,28 +20,28 @@ coverage_plan:
|
|
|
20
20
|
Scenario thuộc **CMP-01-auth** · Tính năng năng lực **CAP-AUTH-001**.
|
|
21
21
|
Quy tắc chi tiết và schema cơ sở dữ liệu tham chiếu tại **Docs Hub** (cite ID: `spec.yaml`).
|
|
22
22
|
|
|
23
|
-
|
|
|
24
|
-
|
|
23
|
+
| Attribute | Value |
|
|
24
|
+
| --- | --- |
|
|
25
25
|
| **Scenario ID** | `SC-EXAMPLE` |
|
|
26
26
|
| **Module** | `CMP-01-auth` |
|
|
27
|
-
| **
|
|
28
|
-
| **
|
|
29
|
-
| **
|
|
27
|
+
| **Surface** | `admin` |
|
|
28
|
+
| **Screen** | `W-AD-AUTH-001` (`/admin/records/create`) |
|
|
29
|
+
| **Priority** | `High` |
|
|
30
30
|
|
|
31
|
-
## 1.
|
|
31
|
+
## 1. Business context & risk analysis
|
|
32
32
|
|
|
33
33
|
Màn hình khởi tạo hồ sơ là cửa ngõ dữ liệu tài chính của khách hàng. Nếu bỏ sót kiểm tra trùng mã hoặc không xử lý chặn click đúp (double-submit), hệ thống sẽ tạo các bản ghi rác gây xung đột số liệu doanh thu và vi phạm tính toàn vẹn dữ liệu kế toán.
|
|
34
34
|
|
|
35
|
-
## 2.
|
|
35
|
+
## 2. BDD behavior (Given / When / Then)
|
|
36
36
|
|
|
37
37
|
- **Given (Tiền điều kiện):** Người dùng đăng nhập thành công với vai trò Quản trị viên (`ADMIN`), tài khoản có quyền `records.create`, và chưa tồn tại bản ghi nào có mã `REC-2026-001` trong cơ sở dữ liệu.
|
|
38
38
|
- **When (Thao tác):** Người dùng nhập đầy đủ các trường thông tin hợp lệ (mã hồ sơ, tên hồ sơ, chọn gói dịch vụ) và nhấn nút "Lưu & Xác Nhận".
|
|
39
39
|
- **Then (Hậu điều kiện):** Hệ thống khóa nút để tránh gửi trùng lặp, gửi request kèm header `X-Idempotency-Key`, tạo mới bản ghi thành công trong bảng `records`, hiển thị Toast thông báo màu xanh và điều hướng sang màn hình chi tiết `W-ADM-DETAIL-01`.
|
|
40
40
|
|
|
41
|
-
## 3.
|
|
41
|
+
## 3. Equivalence & boundary test matrix
|
|
42
42
|
|
|
43
|
-
|
|
|
44
|
-
|
|
43
|
+
| Case ID | Facet | Input | Expected outcome | HTTP & UI | Automation case |
|
|
44
|
+
| --- | --- | --- | --- | --- | --- |
|
|
45
45
|
| **TC-VAL-01** | `positive_boundary` (Biên tối thiểu) | `code: "REC01"` (5 chars), `name: "Hồ sơ A"` | Form hợp lệ, gửi dữ liệu thành công | `HTTP 200` · Toast Success xanh | `TC-EXAMPLE-VALID` |
|
|
46
46
|
| **TC-VAL-02** | `positive_boundary` (Biên tối đa) | `code: "REC-2026-MAXIMUM-001"` (20 chars) | Form hợp lệ, gửi dữ liệu thành công | `HTTP 200` · Toast Success xanh | `TC-EXAMPLE-VALID` |
|
|
47
47
|
| **TC-VAL-03** | `negative_length` (Dưới độ dài min) | `code: "REC"` (3 chars) | Chặn submit, báo lỗi inline dưới ô nhập | `Client Error` · "Độ dài từ 5 đến 20 ký tự" | `TC-EXAMPLE-INVALID` |
|
|
@@ -50,10 +50,10 @@ Màn hình khởi tạo hồ sơ là cửa ngõ dữ liệu tài chính của kh
|
|
|
50
50
|
| **TC-ACT-06** | `concurrency_double_submit` | Click nút "Lưu" liên tục 2 lần trong 100ms | Nút khóa disabled tức thì, chỉ 1 request gửi đi | `UI Locked` · Không tạo 2 bản ghi trùng | `TC-EXAMPLE-CONCURRENCY` |
|
|
51
51
|
| **TC-SYS-07** | `network_interruption` (Mất mạng) | Ngắt kết nối mạng ngay khi gửi request | Hiện banner cảnh báo mất kết nối, giữ nguyên dữ liệu form | `Network Banner` · Form state preserved | `TC-EXAMPLE-OFFLINE` |
|
|
52
52
|
|
|
53
|
-
## 4.
|
|
53
|
+
## 4. Quality dimensions coverage
|
|
54
54
|
|
|
55
|
-
|
|
|
56
|
-
|
|
55
|
+
| Dimension | Coverage | Notes |
|
|
56
|
+
| --- | --- | --- |
|
|
57
57
|
| **Happy Path & Workflow** | 100% | Toàn bộ luồng khởi tạo đến xem chi tiết hoàn tất |
|
|
58
58
|
| **Boundary Value Analysis** | 100% | Kiểm thử đầy đủ tại ngưỡng min-1, min, max, max+1 |
|
|
59
59
|
| **Data Integrity & Concurrency** | 100% | Kiểm tra unique mã hồ sơ qua async DB & chặn double-click |
|
|
@@ -75,10 +75,10 @@ stateDiagram-v2
|
|
|
75
75
|
ChuyenTrangChiTiet --> [*]
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
## 5.
|
|
78
|
+
## 5. Test case mapping
|
|
79
79
|
|
|
80
|
-
|
|
|
81
|
-
|
|
80
|
+
| Case ID | Facets | Priority | Tests hub path |
|
|
81
|
+
| --- | --- | --- | --- |
|
|
82
82
|
| `TC-EXAMPLE-VALID` | happy, boundary | Critical | `cases/admin/CMP-01-auth/01/create/` |
|
|
83
83
|
| `TC-EXAMPLE-INVALID` | validation, boundary | High | `cases/admin/CMP-01-auth/01/create/` |
|
|
84
84
|
| `TC-EXAMPLE-DUPLICATE` | concurrency, remote_unique | High | `cases/admin/CMP-01-auth/01/create/` |
|
|
@@ -127,7 +127,7 @@ PII / Sensitive / Masked
|
|
|
127
127
|
K. Business architecture — process hierarchy & synonyms
|
|
128
128
|
================================================================================
|
|
129
129
|
Business Capability
|
|
130
|
-
|
|
130
|
+
User flow
|
|
131
131
|
End-to-End Flow / E2E Flow
|
|
132
132
|
Use Case
|
|
133
133
|
Scenario
|
|
@@ -138,7 +138,7 @@ Cross-Service Flow / Service Orchestration / Service Choreography
|
|
|
138
138
|
Saga Flow / Distributed Transaction
|
|
139
139
|
Domain Workflow / Event Flow / Command Flow
|
|
140
140
|
#process: business-capability
|
|
141
|
-
#process:
|
|
141
|
+
#process: user-flow
|
|
142
142
|
#process: e2e-flow
|
|
143
143
|
#process: use-case
|
|
144
144
|
#process: scenario
|
package/package.json
CHANGED
package/templates/project-skeleton/architecture/{03-business-process → 03-user-flows}/FLOW-login.md
RENAMED
|
@@ -12,7 +12,7 @@ status: "approved"
|
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
-
## 1.
|
|
15
|
+
## 1. Context & role matrix
|
|
16
16
|
|
|
17
17
|
* **Bối cảnh kích hoạt:** Quản trị viên truy cập vào cổng quản trị để quản lý hệ thống. Phiên đăng nhập hiện tại chưa có hoặc đã hết hạn.
|
|
18
18
|
* **Ma trận Vai trò & Quyền hạn:**
|
|
@@ -22,7 +22,7 @@ status: "approved"
|
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
|
-
## 2.
|
|
25
|
+
## 2. User stories (multi-tier)
|
|
26
26
|
|
|
27
27
|
### Story 1: Xác thực & Truy cập Hệ thống (Primary Action Story)
|
|
28
28
|
> **Là một** Quản trị viên hệ thống,
|
|
@@ -38,7 +38,7 @@ status: "approved"
|
|
|
38
38
|
|
|
39
39
|
---
|
|
40
40
|
|
|
41
|
-
## 3.
|
|
41
|
+
## 3. Business rules & state lifecycle
|
|
42
42
|
|
|
43
43
|
### Danh mục Quy tắc Nghiệp vụ
|
|
44
44
|
* **BR-01 (Giới hạn thử lại):** Cho phép nhập sai tối đa 5 lần liên tiếp. Nếu vượt quá, khóa tài khoản tạm thời trong 15 phút.
|
|
@@ -53,7 +53,7 @@ status: "approved"
|
|
|
53
53
|
|
|
54
54
|
---
|
|
55
55
|
|
|
56
|
-
## 4.
|
|
56
|
+
## 4. Step-by-step journey
|
|
57
57
|
|
|
58
58
|
### Chặng 1: Nhập thông tin trên `[W-AD-AUTH-01]`
|
|
59
59
|
1. **Thao tác:** Quản trị viên mở trang đăng nhập, điền `username` và `password`.
|
|
@@ -64,7 +64,7 @@ status: "approved"
|
|
|
64
64
|
|
|
65
65
|
---
|
|
66
66
|
|
|
67
|
-
## 5.
|
|
67
|
+
## 5. Traceability matrix
|
|
68
68
|
|
|
69
69
|
| Bước trong User Story | Màn hình liên quan | Hành động trên Sequence Diagram | Thành phần kỹ thuật đảm nhiệm |
|
|
70
70
|
| :--- | :--- | :--- | :--- |
|
|
@@ -74,7 +74,7 @@ status: "approved"
|
|
|
74
74
|
|
|
75
75
|
---
|
|
76
76
|
|
|
77
|
-
## 6.
|
|
77
|
+
## 6. Screen-to-screen sequence diagram
|
|
78
78
|
|
|
79
79
|
```mermaid
|
|
80
80
|
sequenceDiagram
|
|
@@ -11,11 +11,10 @@ status: "draft"
|
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
## 1.
|
|
14
|
+
## 1. Context & role matrix
|
|
15
15
|
|
|
16
16
|
* **Bối cảnh kích hoạt (Trigger Context):** [Mô tả hoàn cảnh hoặc sự kiện nào khiến quy trình này diễn ra. Ví dụ: Khách hàng yêu cầu đặt hàng, hoặc quản trị viên khởi tạo chiến dịch khuyến mãi...]
|
|
17
17
|
* **Mục tiêu kinh doanh (Business Goal):** [Giá trị kinh doanh hoặc bài toán mà quy trình này giải quyết...]
|
|
18
|
-
* **Chỉ số thành công (Success metrics):** [Đo được nếu có — VD: thời gian xử lý, tỷ lệ lỗi, SLA phản hồi]
|
|
19
18
|
* **Phạm vi không làm (Non-goals):** [Quy trình/phase này cố ý không bao gồm — tránh trùng FLOW khác]
|
|
20
19
|
* **Ma trận Vai trò & Quyền hạn (Role & Permission Matrix):**
|
|
21
20
|
| Tác nhân (Actor) | Vai trò trong Quy trình | Quyền hạn trên Màn hình |
|
|
@@ -28,7 +27,7 @@ status: "draft"
|
|
|
28
27
|
|
|
29
28
|
---
|
|
30
29
|
|
|
31
|
-
## 2.
|
|
30
|
+
## 2. User stories (multi-tier)
|
|
32
31
|
|
|
33
32
|
### Story 1: Thao tác Chuẩn bị / Cấu hình (Setup Story - Tùy chọn)
|
|
34
33
|
> **Là một** [Vai trò chuẩn bị, vd: Quản trị viên],
|
|
@@ -52,7 +51,7 @@ status: "draft"
|
|
|
52
51
|
|
|
53
52
|
---
|
|
54
53
|
|
|
55
|
-
## 3.
|
|
54
|
+
## 3. Business rules & state lifecycle
|
|
56
55
|
|
|
57
56
|
### Danh mục Quy tắc Nghiệp vụ (Business Rules)
|
|
58
57
|
* **BR-01 (Quy tắc thẩm định dữ liệu):** [Mô tả điều kiện hợp lệ để cho phép đi tiếp sang bước kế tiếp...]
|
|
@@ -70,7 +69,7 @@ status: "draft"
|
|
|
70
69
|
|
|
71
70
|
---
|
|
72
71
|
|
|
73
|
-
## 4.
|
|
72
|
+
## 4. Step-by-step journey
|
|
74
73
|
|
|
75
74
|
### Chặng 1: Thao tác & Nhập liệu trên Màn hình `[W-ACTION-01]`
|
|
76
75
|
1. **Thao tác người dùng:** Người dùng truy cập form, điền các thông tin bắt buộc.
|
|
@@ -96,7 +95,7 @@ status: "draft"
|
|
|
96
95
|
|
|
97
96
|
---
|
|
98
97
|
|
|
99
|
-
## 5.
|
|
98
|
+
## 5. Traceability matrix
|
|
100
99
|
|
|
101
100
|
| Bước trong User Story | Màn hình liên quan | Hành động trên Sequence Diagram | Thành phần kỹ thuật đảm nhiệm |
|
|
102
101
|
| :--- | :--- | :--- | :--- |
|
|
@@ -107,7 +106,7 @@ status: "draft"
|
|
|
107
106
|
|
|
108
107
|
---
|
|
109
108
|
|
|
110
|
-
## 6.
|
|
109
|
+
## 6. Screen-to-screen sequence diagram
|
|
111
110
|
|
|
112
111
|
```mermaid
|
|
113
112
|
sequenceDiagram
|
|
@@ -2,24 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
status: active
|
|
4
4
|
|
|
5
|
-
Risks
|
|
5
|
+
Risks live **only** in the central register — not on feature bundles.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Register (member-facing)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|------|------------|
|
|
11
|
-
| Stale paths after arc42 migrate | Redirect stubs on old flat paths; skills + start-now / SYSTEM-DOC-STRUCTURE |
|
|
12
|
-
| Orphan / wrong IDs in MD | FlowGrid bộ docs MCP orphans + validate_links; add FLOW-* only with lead IDs |
|
|
13
|
-
| “Full sequence every story” pressure | Principle: curated ~10–20%; skill `/journey` refusal |
|
|
14
|
-
| Mermaid render confusion | Reader = VitePress only; no Mermaid MCP; Structurizr only if C4 hierarchy pain |
|
|
15
|
-
| Invented deployment topology | §07 stub-first; `/deployment` refuses fiction |
|
|
9
|
+
**[risk-register.md](./risk-register.md)** — bảng `RISK-*`, hạn mức vs nhu cầu peak.
|
|
16
10
|
|
|
17
|
-
|
|
11
|
+
```bash
|
|
12
|
+
flowgrid audit risks architecture/11-risks/risk-register.md
|
|
13
|
+
```
|
|
18
14
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
## See also
|
|
22
|
-
|
|
23
|
-
- [10 Quality](/architecture/10-quality/)
|
|
24
|
-
- [Start now](/platform/guide/start-now)
|
|
25
|
-
- [Doc structure](/platform/guide/SYSTEM-DOC-STRUCTURE)
|
|
15
|
+
Skill: `/risk-register`
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: draft
|
|
3
|
+
owner: product-team
|
|
4
|
+
contentLocale: vi
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Risk register
|
|
8
|
+
|
|
9
|
+
**SSOT** for project risks — members edit this file only. **Do not** use `risks:` on `*.bundle.yaml`.
|
|
10
|
+
|
|
11
|
+
Add a row when **limit** (quota, SLA, license) differs from **need** (peak, campaign).
|
|
12
|
+
|
|
13
|
+
## Summary
|
|
14
|
+
|
|
15
|
+
| Metric | Value |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| Open risks | 0 |
|
|
18
|
+
| Quota / capacity gaps | 0 |
|
|
19
|
+
| With mitigation | 0 |
|
|
20
|
+
|
|
21
|
+
## Risk table
|
|
22
|
+
|
|
23
|
+
| ID | Type | Description | Limit | Need | Gap | Impact | Mitigation | Status |
|
|
24
|
+
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
|
25
|
+
| RISK-QUOTA-EMAIL-001 | Quota / infra | System notification email | 500 emails/day (SMTP) | ~700 emails/day (month start, reminders) | +200 (~40%) | Users miss timely email | (1) Spread queue (2) Upgrade plan (3) SMS for critical | Open |
|
|
26
|
+
|
|
27
|
+
### Suggested types
|
|
28
|
+
|
|
29
|
+
Quota / infra · Vendor · Data / compliance · Operations capacity · Product / scope
|
|
30
|
+
|
|
31
|
+
## Links
|
|
32
|
+
|
|
33
|
+
- Open questions: `qa/index.md`
|
|
34
|
+
- Skill: `/risk-register` · `flowgrid audit risks architecture/11-risks/risk-register.md`
|
|
@@ -21,7 +21,8 @@ status: active
|
|
|
21
21
|
|
|
22
22
|
| Term | Meaning |
|
|
23
23
|
|------|---------|
|
|
24
|
-
| Journey
|
|
24
|
+
| Journey / Luồng người dùng | `FLOW-*` under `architecture/03-user-flows` or `common/user-flows` |
|
|
25
|
+
| `/user-flow` | Docs skill to author product `FLOW-*` |
|
|
25
26
|
| business-process-trace | Brownfield process-through-code skill — **not** product journey `FLOW-*` |
|
|
26
27
|
| flow-trace | Deprecated alias of business-process-trace |
|
|
27
28
|
| `_legacy.dynamics*` | Extract/artifact name for old dynamics — keep filename; wording → FLOW/journey |
|
|
@@ -1,68 +1,46 @@
|
|
|
1
1
|
---
|
|
2
2
|
status: draft
|
|
3
3
|
owner: product-team
|
|
4
|
+
contentLocale: vi
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
# Product overview
|
|
7
|
+
# Product overview
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
Product-level docs for this hub. Screen detail → `surfaces/` · technical architecture → `architecture/`.
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
> Section titles are **English** (global keys). Prose uses `contentLocale` in frontmatter / `docs-hub.locale.yaml`.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
2. **Đối tượng phục vụ** — [Vai trò / operational area chính.]
|
|
14
|
-
3. **Nguyên tắc sản phẩm** — [VD: một SSOT docs, trace `W-*` / `API-*`, grill trước codegen.]
|
|
13
|
+
## Goals {#goals}
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
1. **Business value** — [Main problem this product solves.]
|
|
16
|
+
2. **Primary audience** — [Roles / channels — one line.]
|
|
17
|
+
3. **Product principles** — [e.g. single SSOT, trace `W-*` / `API-*`.]
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
| --- | --- |
|
|
20
|
-
| PO / BA | Phạm vi, persona, operational area |
|
|
21
|
-
| Dev / QA | Boundary module, link `CMP-*` |
|
|
22
|
-
| Leadership | Goals + success metrics cấp product |
|
|
23
|
-
|
|
24
|
-
## Top quality goals (arc42)
|
|
25
|
-
|
|
26
|
-
| # | Thuộc tính | Mục tiêu (đo được nếu có) |
|
|
27
|
-
| --- | --- | --- |
|
|
28
|
-
| 1 | Khả dụng | [VD: uptime SLA nội bộ] |
|
|
29
|
-
| 2 | Bảo mật | [VD: RBAC trên admin portal] |
|
|
30
|
-
| 3 | Khả năng mở rộng | [VD: multi-tenant / module mới không phá SSOT] |
|
|
31
|
-
| 4 | Khả năng bảo trì | [VD: spec bundle + split + audit] |
|
|
32
|
-
| 5 | Trải nghiệm | [VD: affordance UX portal chuẩn] |
|
|
33
|
-
|
|
34
|
-
## Personas (tóm tắt)
|
|
35
|
-
|
|
36
|
-
- **[Persona A]** — [Một câu: nhu cầu chính trên surface nào.]
|
|
37
|
-
- **[Persona B]** — […]
|
|
38
|
-
|
|
39
|
-
Leaf `userStories.primary.asA` **tham chiếu** persona ở đây (không copy persona dài trên từng màn).
|
|
40
|
-
|
|
41
|
-
## Phạm vi & không làm (product-level)
|
|
19
|
+
## Background {#background}
|
|
42
20
|
|
|
43
|
-
|
|
21
|
+
[Short paragraph: current situation, why this product/phase exists. No infra deep-dive.]
|
|
44
22
|
|
|
45
|
-
|
|
23
|
+
## Scope {#scope}
|
|
46
24
|
|
|
47
|
-
**
|
|
25
|
+
**In scope:**
|
|
48
26
|
|
|
49
|
-
- [
|
|
50
|
-
- [VD: không thay quy trình UAT Excel deliverable — xem tests-docs]
|
|
27
|
+
- [Operational areas / surfaces documented in this hub]
|
|
51
28
|
|
|
52
|
-
|
|
29
|
+
**Out of scope:**
|
|
53
30
|
|
|
54
|
-
- [
|
|
31
|
+
- [e.g. deployment detail → `architecture/07-deployment/`]
|
|
32
|
+
- [personas / KPIs managed outside the hub]
|
|
55
33
|
|
|
56
34
|
## Operational areas
|
|
57
35
|
|
|
58
|
-
|
|
36
|
+
One file per area under `overview/operational-areas/` — see [`_template.md`](./operational-areas/_template.md).
|
|
59
37
|
|
|
60
38
|
| Area | File |
|
|
61
39
|
| --- | --- |
|
|
62
|
-
| [
|
|
40
|
+
| [Area name] | `operational-areas/<slug>.md` |
|
|
63
41
|
|
|
64
42
|
## See also
|
|
65
43
|
|
|
66
|
-
- Surfaces
|
|
67
|
-
-
|
|
68
|
-
-
|
|
44
|
+
- Surfaces: `surfaces/`
|
|
45
|
+
- User flows catalog: `architecture/03-user-flows/`
|
|
46
|
+
- Risk register: `architecture/11-risks/risk-register.md`
|
|
@@ -1,37 +1,30 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: OA-TEMPLATE
|
|
3
|
-
title: "
|
|
3
|
+
title: "Operational area name"
|
|
4
4
|
status: draft
|
|
5
5
|
surfaces: ["admin-web"]
|
|
6
|
+
contentLocale: vi
|
|
6
7
|
---
|
|
7
8
|
|
|
8
|
-
# Operational area: [
|
|
9
|
+
# Operational area: [Name]
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
> Section titles are **English**. Prose uses `contentLocale` / `docs-hub.locale.yaml`.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
**Purpose:** [One paragraph — who does what, on which channel.]
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
| --- | --- | --- |
|
|
16
|
-
| [VD: Nhân viên vận hành] | [Nhu cầu] | `admin-web` |
|
|
15
|
+
## Scope {#scope}
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
- **In scope:** [Processes / modules in this area]
|
|
18
|
+
- **Out of scope:** [Other area or later phase]
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
- **Out of scope:** [Chuyển sang area khác hoặc phase sau]
|
|
20
|
+
## Module links
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- [Metric 1 — đo được]
|
|
26
|
-
- [Metric 2]
|
|
27
|
-
|
|
28
|
-
## Liên kết module
|
|
29
|
-
|
|
30
|
-
| CMP | Mô tả |
|
|
22
|
+
| CMP | Summary |
|
|
31
23
|
| --- | --- |
|
|
32
|
-
| `CMP-XX-…` | [
|
|
24
|
+
| `CMP-XX-…` | [One-line boundary] |
|
|
33
25
|
|
|
34
|
-
##
|
|
26
|
+
## Related user flows
|
|
35
27
|
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
| FLOW | Summary |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| `FLOW-…` | [Link under `architecture/03-user-flows/` or `common/user-flows/`] |
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
# QA inbox
|
|
1
|
+
# QA inbox
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
One file per case: `qa/<SHORT>_0001.yaml`.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
- `bundle.id` is the screen leaf id from `/spec` (e.g. `cmp-adm-002-02-01-02`)
|
|
7
|
-
- Sequence is **per screen** (`0001`, `0002`, …). Different screens never share a counter.
|
|
8
|
-
- Close with **`/qa-resolve QA-<bundle.id>-NNNN`** plus the decision (skill deletes the file).
|
|
5
|
+
After `flowgrid init`, copy from `.flowgrid/templates/qa-item.yaml` and follow `.flowgrid/templates/qa-authoring.md`.
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
Rules: `.cursor/extracts/qa-inbox.md`
|
|
7
|
+
Append-only `updates[]` · `flowgrid render` refreshes `index.md`.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: CMP-NN-slug
|
|
3
|
+
title: "Module name"
|
|
4
|
+
status: draft
|
|
5
|
+
contentLocale: vi
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# CMP-{NN} — [Name]
|
|
9
|
+
|
|
10
|
+
> Section titles are **English**. Prose uses `contentLocale` / `docs-hub.locale.yaml`.
|
|
11
|
+
|
|
12
|
+
## Goals {#goals}
|
|
13
|
+
|
|
14
|
+
[Module value — one paragraph.]
|
|
15
|
+
|
|
16
|
+
## Scope {#scope}
|
|
17
|
+
|
|
18
|
+
- **In scope:** [Capabilities owned by this CMP on this surface.]
|
|
19
|
+
- **Out of scope:** [Other CMP / phase / channel.]
|
|
20
|
+
|
|
21
|
+
## Features overview {#features-overview}
|
|
22
|
+
|
|
23
|
+
| Function | Screen / API | Notes |
|
|
24
|
+
| --- | --- | --- |
|
|
25
|
+
| `<slug>` | `W-…` / `API-…` | Leaf: `ir/generated/spec.md` |
|
|
26
|
+
|
|
27
|
+
## Depends on {#depends-on}
|
|
28
|
+
|
|
29
|
+
| ID / artifact | Reason |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| `CMP-…` / `FLOW-…` | [Upstream dependency] |
|
|
32
|
+
|
|
33
|
+
## Module metadata
|
|
34
|
+
|
|
35
|
+
| Field | Value |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| **ID** | `CMP-{NN}` |
|
|
38
|
+
| **User flows** | `…/common/user-flows/FLOW-…` · [`architecture/03-user-flows/`](../../architecture/03-user-flows/) |
|
|
39
|
+
| **Functions** | `<function-slug>`, … |
|
|
40
|
+
| **Screens** | `W-…` |
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: SURFACE-TEMPLATE
|
|
3
|
+
title: "Surface channel name"
|
|
4
|
+
status: draft
|
|
5
|
+
contentLocale: vi
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Surface: [Channel name]
|
|
9
|
+
|
|
10
|
+
> Section titles are **English**. Prose uses `contentLocale` / `docs-hub.locale.yaml`.
|
|
11
|
+
|
|
12
|
+
## Goals {#goals}
|
|
13
|
+
|
|
14
|
+
[Value of this channel — one paragraph.]
|
|
15
|
+
|
|
16
|
+
## Background {#background}
|
|
17
|
+
|
|
18
|
+
[Who uses this channel and in what context.]
|
|
19
|
+
|
|
20
|
+
## Scope {#scope}
|
|
21
|
+
|
|
22
|
+
**In scope:**
|
|
23
|
+
|
|
24
|
+
- [CMP modules on this surface]
|
|
25
|
+
|
|
26
|
+
**Out of scope:**
|
|
27
|
+
|
|
28
|
+
- [Other surface or integration-only scope]
|
|
29
|
+
|
|
30
|
+
## Modules (CMP)
|
|
31
|
+
|
|
32
|
+
| CMP | Summary | Primary flow |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| `CMP-…` | […] | `FLOW-…` (if any) |
|
|
35
|
+
|
|
36
|
+
## User flows on this surface
|
|
37
|
+
|
|
38
|
+
- Catalog: [`architecture/03-user-flows/`](/architecture/03-user-flows/)
|
|
39
|
+
- Shared on surface: `common/user-flows/FLOW-*.md` (when ≥2 modules share)
|
|
40
|
+
|
|
41
|
+
## Features overview
|
|
42
|
+
|
|
43
|
+
[1–2 paragraphs: how to read the hub — detail per screen in bundles and `ir/generated/spec.md`.]
|