@shanyucoder/flowgrid 0.1.9 → 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/render-bundle-markdown.mjs +8 -1
- 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/testcase/runners/lib/resolve-hub-id.mjs +3 -3
- package/harness/common/skills/legacy/SKILL.md +2 -2
- package/harness/docs/extracts/common-scope.md +8 -8
- package/harness/docs/extracts/spec-core.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/skills/adopt/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-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/risk-register/SKILL.md +29 -0
- package/harness/docs/skills/spec/SKILL.md +3 -3
- package/harness/docs/skills/surfaces/SKILL.md +3 -1
- package/harness/docs/skills/{business-process → user-flow}/SKILL.md +8 -8
- package/harness/fe/skills/gen-common/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/surfaces/_module-index.template.md +40 -0
- package/templates/project-skeleton/surfaces/_surface-index.template.md +43 -0
- package/templates/shared/bundle-authoring.md +5 -2
- 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/tpl-api-contract.md +5 -5
- package/templates/tests-skeleton/catalog/locale.yaml +16 -15
- package/templates/tests-skeleton/tpl-testcase-plan.md +6 -6
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/`] |
|
|
@@ -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`.]
|
|
@@ -8,8 +8,11 @@ Hub: `docs/templates/feature.bundle.yaml` · split: `pnpm spec:split`
|
|
|
8
8
|
|-----|---------|
|
|
9
9
|
| `page-id` | Screen identity (`cmp-adm-000-01`). Split copies this onto `ir/spec.yaml` as `page-id` (not `id`, so it does not collide with requirement/section ids). Legacy bundles may still use `id`. |
|
|
10
10
|
| `summary` | Phải trình bày dạng bullet. Bắt buộc có các tiêu đề (chuẩn Arc42 business): **mục tiêu nghiệp vụ** (business_goals), **các bên liên quan** (stakeholders), **kịch bản người dùng** (user_journey), **bối cảnh** (description, input liên kết cross-page/module, output) và **cách giải quyết** (tùy chọn). Mục đích để 100% Non-tech Stakeholder hiểu và duyệt. |
|
|
11
|
-
| `
|
|
12
|
-
| `nonGoals` | **
|
|
11
|
+
| `scopeIn` | **Khuyến nghị** — trong phạm vi màn/phase (PRD). Audit `WARN_NO_SCOPE_IN`. |
|
|
12
|
+
| `nonGoals` | **Khuyến nghị** — ngoài phạm vi màn/phase (PRD). Audit `WARN_NO_NON_GOALS`. |
|
|
13
|
+
| `userFlows` | **Khuyến nghị** — link `FLOW-*` (`03-user-flows` / `common/user-flows`) hoặc journey ngắn. Audit `WARN_NO_USER_FLOWS` khi multi-screen. |
|
|
14
|
+
| `nfr` | **Khuyến nghị** — hiệu năng, bảo mật. Audit `WARN_NO_NFR`. |
|
|
15
|
+
| _(rủi ro)_ | **Không** khai báo trên bundle. SSOT: `architecture/11-risks/risk-register.md` — `/risk-register`. Key `risks:` → audit `WARN_BUNDLE_RISKS_FORBIDDEN`. |
|
|
13
16
|
| `userStories` | **Khối User Stories chuyên sâu cho màn hình:** `primary`, `contextAndHandoff` (+ `screenAccess`), `scenarios` (5 kịch bản chuẩn + **scenario thứ 6 “Affordances UX”** khi màn có delete/filter/breadcrumb/disabled/import — xem `feature.bundle.yaml`), `acceptanceCriteria` (kèm checkbox UX khi áp dụng). **Split:** `pnpm spec:split` copy nguyên khối sang `ir/spec.yaml` (business prose); **không** tự sinh từ `design` — Agent phải cập nhật `userStories` khi bổ sung DSL/`#needs-component`/audit `UX_*`. Render → `## User Stories & Screen Journey` trong Markdown. |
|
|
14
17
|
| `spec` | Design v1 — **`entities`**, **`relationships`**, actors, requirements, `ui.routes`, **`ui.list` / `ui.form` / `ui.detail`**, `acceptance`. **Không** author `spec.api` — API SSOT là `api/<seq>/01-backend-spec.yaml`. |
|
|
15
18
|
| `gen` | **Bắt buộc trước flowgrid gen:** `codegen.profile` (`auth` login/forgot/reset; `change-password`; `public`; `not-found`/`error`; `list`/`create`/`admin-crud`) + entity/module, `tags`, derived `ui.*`. `/grill-dev` ghi. Endpoint `action` ghi trên **01**, không trên bundle. |
|