@shanyucoder/flowgrid 0.1.9 → 0.1.11
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/adapters/nextjs/codegen/runners/lib/resolve-hub-id.mjs +7 -4
- package/adapters/nextjs/unitgen/runners/README.md +4 -4
- package/adapters/nextjs/unitgen/runners/generate.mjs +1 -1
- package/adapters/nuxt4/codegen/runners/lib/resolve-hub-id.mjs +7 -4
- package/adapters/nuxt4/unitgen/runners/README.md +4 -4
- package/adapters/nuxt4/unitgen/runners/generate.mjs +1 -1
- package/adapters/shared/common-gen.mjs +1 -1
- package/adapters/shared/resolve-hub-id.mjs +7 -4
- 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 +9 -8
- 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/dist/graph/mcp/tools.js +1 -1
- package/dist/graph/mcp/tools.js.map +1 -1
- package/engines/cases/render-cases.mjs +34 -26
- 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/audit-legacy-gaps.mjs +10 -0
- package/engines/spec/lib/bundle-schema.mjs +3 -1
- package/engines/testcase/_staging-from-portal/runners/README.md +3 -3
- package/engines/testcase/_staging-from-portal/runners/generate.mjs +2 -2
- package/engines/testcase/_staging-from-portal/runners/lib/read-testcase.mjs +1 -1
- package/engines/testcase/runners/README.md +3 -3
- package/engines/testcase/runners/generate.mjs +2 -2
- package/engines/testcase/runners/lib/read-testcase.mjs +1 -1
- package/engines/testcase/runners/lib/resolve-hub-id.mjs +6 -6
- package/harness/be/skills/audit-api/SKILL.md +1 -1
- package/harness/be/skills/grill-api-unit/SKILL.md +1 -1
- package/harness/common/skills/legacy/SKILL.md +2 -2
- package/harness/docs/extracts/architecture-core.md +2 -0
- package/harness/docs/extracts/common-scope.md +8 -8
- package/harness/docs/extracts/extract-registry.docs.json +7 -3
- package/harness/docs/extracts/product-id-convention.md +58 -0
- package/harness/docs/extracts/spec-core.md +1 -1
- package/harness/docs/extracts/spec-prd-lite.md +11 -13
- package/harness/docs/extracts/spec-requirement.md +1 -1
- package/harness/docs/extracts/tpl-adoption-inventory.md +32 -0
- 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/agent-compliance.mdc +1 -1
- 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 +43 -11
- 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-hub-prd/SKILL.md +38 -0
- package/harness/docs/skills/module/SKILL.md +9 -6
- 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 +5 -4
- package/harness/docs/skills/surfaces/SKILL.md +4 -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/fe/skills/grill-prototype/SKILL.md +1 -1
- package/harness/fe/skills/prototype/SKILL.md +6 -6
- package/harness/fe/skills/unit/SKILL.md +4 -4
- package/harness/shared/SSOT_AGENT_PROTOCOL.md +1 -1
- package/harness/tests/extracts/grill-scenario-flow.md +2 -2
- package/harness/tests/skills/grill-testcase/SKILL.md +2 -2
- package/harness/tests/skills/scenario/SKILL.md +11 -11
- package/harness/tests/skills/testcase/SKILL.md +2 -2
- package/harness/tests/templates/SC.example.md +26 -26
- package/harness/tests/templates/TC.example.yaml +3 -3
- 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 +16 -16
- package/templates/project-skeleton/architecture/{03-business-process → 03-user-flows}/FLOW-template.md +6 -7
- package/templates/project-skeleton/architecture/04-solution-strategy/index.md +1 -1
- package/templates/project-skeleton/architecture/08-cross-cutting/security.md +1 -1
- 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 +5 -3
- package/templates/project-skeleton/architecture/model/workspace.dsl +7 -7
- 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 +44 -0
- package/templates/shared/bundle-authoring.md +6 -3
- 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/cases/README.md +1 -1
- package/templates/tests-skeleton/catalog/locale.yaml +16 -15
- package/templates/tests-skeleton/tpl-testcase-plan.md +6 -6
|
@@ -19,7 +19,7 @@ only.
|
|
|
19
19
|
2. Use `flowgrid_docs_get_element` for one ID.
|
|
20
20
|
3. Use `flowgrid_docs_deps_of` and `flowgrid_docs_dependents_of` for reference impact.
|
|
21
21
|
4. Run `flowgrid_docs_orphans` and `flowgrid_docs_validate_links` before claiming completeness.
|
|
22
|
-
5. Use `
|
|
22
|
+
5. Use `flowgrid_docs_user_flows` before reading all journey files.
|
|
23
23
|
|
|
24
24
|
Do not require bộ docs for architecture work: if the MCP is unavailable, inspect
|
|
25
25
|
the repository Markdown directly or explain how to run project-local setup.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: adopt
|
|
3
|
-
description: "/adopt — Scan legacy repositories and generate a high-level index mapping catalog
|
|
3
|
+
description: "/adopt — Scan legacy repositories and generate a high-level index mapping catalog, user flows (incl. cross-surface), and common candidates at root."
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
extractBundle: architecture-core
|
|
6
6
|
---
|
|
@@ -14,6 +14,8 @@ extractBundle: architecture-core
|
|
|
14
14
|
|
|
15
15
|
**Handoff SSOT spec:** Sau adopt, member drill [spec-ssot-prep.md](../../../docs/workflows/spec-ssot-prep.md) — Phase 0 → `/legacy /spec` per `W-*` (không nhảy thẳng bundle không có ID trong inventory).
|
|
16
16
|
|
|
17
|
+
**Inventory template:** `.cursor/extracts/tpl-adoption-inventory.md` — section layout + **user-flow placement tiers** (cross-surface → `architecture/03-user-flows/`).
|
|
18
|
+
|
|
17
19
|
---
|
|
18
20
|
|
|
19
21
|
## Rule: Pre-Scan Mode Selection (AskQuestion Wizard)
|
|
@@ -71,16 +73,35 @@ extractBundle: architecture-core
|
|
|
71
73
|
- **Surfaces**: Application and channel names (Admin Portal, Customer Web, Gateway…)
|
|
72
74
|
- **Modules (`CMP-*`)**: Primary feature groups (Auth, Orders, Profile…)
|
|
73
75
|
- **Screens (`W-*`) & APIs (`API-*`)**: UI screens + API endpoints with legacy file paths (`ID → Legacy File Path`)
|
|
74
|
-
- **
|
|
76
|
+
- **User flows (`FLOW-*`)**: Multi-step business journeys — **classify every candidate** (see Rule: User flow discovery)
|
|
75
77
|
- **Common Candidates (`CMN-UI-*`, `CMN-API-*`, `CMN-DTO-*`)**: (If Common Analysis mode selected)
|
|
76
78
|
|
|
77
79
|
---
|
|
78
80
|
|
|
81
|
+
## Rule: User flow discovery (incl. cross-surface)
|
|
82
|
+
|
|
83
|
+
- **[MANDATORY]** Section **4. User flows (`FLOW-*`)** in `adoption-inventory.md` is **not optional** when the legacy scan finds any journey that spans **more than one screen** or **more than one deployable app/repo** in one business outcome.
|
|
84
|
+
- **[MANDATORY]** For each `FLOW-*`, assign a **placement tier** (target path in the **new** docs hub after `/legacy /user-flow`):
|
|
85
|
+
|
|
86
|
+
| Tier | Label | List under inventory subsection | New hub path |
|
|
87
|
+
| --- | --- | --- | --- |
|
|
88
|
+
| **A** | Cross-surface / org catalog | `### A — Cross-surface (org catalog)` | `architecture/03-user-flows/FLOW-*.md` |
|
|
89
|
+
| **B** | Surface-shared | `### B — Shared on one surface` | `surfaces/<surface>/common/user-flows/FLOW-*.md` |
|
|
90
|
+
| **C** | Module / cluster | `### C — Module or cluster scope` | `surfaces/.../CMP-*/common/user-flows/` (or `…/<NN>/common/user-flows/`) |
|
|
91
|
+
| **D** | (omit) | — | Single `W-*` only — **no** `FLOW-*` |
|
|
92
|
+
|
|
93
|
+
- **[MANDATORY]** Each `FLOW-*` bullet MUST state: **surfaces + CMPs involved**, **ordered steps** (`W-*` / `API-*` or legacy route names), **legacy evidence paths** (routers, orchestrators, saga/worker, shared tokens), **tier A/B/C**.
|
|
94
|
+
- **[MANDATORY]** **Cross-surface (tier A)** examples: checkout/payment across customer web + admin ops; partner webhook + internal portal; SSO/login handoff across two SPAs in different legacy repos; order fulfillment touching warehouse API + customer notification app.
|
|
95
|
+
- **[STRICTLY FORBIDDEN]** Listing only `W-*`/`API-*` while ignoring obvious multi-app journeys (tier A/B/C) — Tier 2 audit (`/legacy /user-flow`) depends on this index.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
79
99
|
## Rule: ID Standardization
|
|
80
100
|
|
|
101
|
+
- **[MANDATORY]** Follow `.cursor/extracts/product-id-convention.md` — declare `surfaceCode` per surface; `CMP-{SURF}-{DOMAIN}-{NN}`, `W-{SURF}-{DOMAIN}-{NN}`, `API-{SURF}-{DOMAIN}-{NN}` (duplicate capability across surfaces ⇒ distinct IDs).
|
|
81
102
|
- **[MANDATORY]** All items MUST use standardized IDs: `CMP-*`, `W-*`, `API-*`, `FLOW-*`, `CMN-UI-*`, `CMN-API-*`, `CMN-DTO-*`.
|
|
82
103
|
- **[MANDATORY]** Every ID MUST map to its corresponding legacy file or directory path.
|
|
83
|
-
- ✅ `W-
|
|
104
|
+
- ✅ `W-ADM-AUTH-01: Login → admin-fe/src/pages/Login.tsx`
|
|
84
105
|
- ✅ `CMN-UI-001: Filter Toolbar → duplicated in admin-fe/src/pages/Orders.tsx, Users.tsx`
|
|
85
106
|
|
|
86
107
|
---
|
|
@@ -96,15 +117,25 @@ extractBundle: architecture-core
|
|
|
96
117
|
- **Admin Portal** (`surfaces/admin`) → Legacy repo: `admin-fe`
|
|
97
118
|
|
|
98
119
|
## 2. Modules Catalog (`CMP-*`)
|
|
99
|
-
- **CMP-ADM-
|
|
120
|
+
- **CMP-ADM-AUTH-01**: Auth & Identity Management → Legacy: `admin-fe/src/modules/auth/`
|
|
100
121
|
|
|
101
122
|
## 3. Screens & API Function Inventory (`W-*`, `API-*`)
|
|
102
|
-
### Admin Portal (`surfaces/admin/CMP-ADM-
|
|
103
|
-
- **W-
|
|
123
|
+
### Admin Portal (`surfaces/admin/CMP-ADM-AUTH-01`)
|
|
124
|
+
- **W-ADM-AUTH-01**: Login → Legacy: `admin-fe/src/pages/Login.tsx`
|
|
104
125
|
- **API-ADM-AUTH-01**: Auth Services → Legacy: `auth-service/src/controllers/AuthController.java`
|
|
105
126
|
|
|
106
|
-
## 4.
|
|
107
|
-
|
|
127
|
+
## 4. User flows (`FLOW-*`)
|
|
128
|
+
|
|
129
|
+
### A — Cross-surface (org catalog) → `architecture/03-user-flows/`
|
|
130
|
+
- **FLOW-checkout**: Checkout & payment — Surfaces: `customer-web` (`CMP-CUS-CART-01`), `admin` (`CMP-ADM-ORD-01`) — Steps: cart `W-CUS-CART-01` → pay `API-CUS-PAY-01` → ops `W-ADM-ORD-01` — Legacy: `customer-fe/src/routes/checkout/*`, `admin-fe/src/pages/Orders.tsx`, `payment-svc/...` — Tier: **A**
|
|
131
|
+
|
|
132
|
+
### B — Shared on one surface → `surfaces/<surface>/common/user-flows/`
|
|
133
|
+
- **FLOW-onboard-admin**: Admin onboarding — Surface: `admin` only — CMPs: `CMP-ADM-AUTH-01`, `CMP-ADM-USR-01` — Steps: … — Legacy: … — Tier: **B**
|
|
134
|
+
|
|
135
|
+
### C — Module / cluster scope → `…/CMP-*/common/user-flows/`
|
|
136
|
+
- **FLOW-password-reset**: Reset password — Surface: `admin` — CMP: `CMP-ADM-AUTH-01` — Steps: … — Legacy: … — Tier: **C**
|
|
137
|
+
|
|
138
|
+
> If no multi-step journeys found, write: `_(none detected — screen-only inventory in §3)_`
|
|
108
139
|
|
|
109
140
|
## 5. Common Catalog Candidates (Anti-Copy-Paste Guard)
|
|
110
141
|
> **Purpose**: Reuse for specs and code of new features / spec updates.
|
|
@@ -122,12 +153,12 @@ extractBundle: architecture-core
|
|
|
122
153
|
|
|
123
154
|
### ⚠️ Whole Page Duplication Warnings
|
|
124
155
|
> **Note**: Do not create `CMN-*` for full pages. Recommend consolidating into a single polymorphic spec (`mode: create | edit`).
|
|
125
|
-
- **W-
|
|
156
|
+
- **W-ADM-USR-01 (Create User)** & **W-ADM-USR-02 (Edit User)**: 95% identical → *Recommendation: Consolidate into single Form Spec `CMP-ADM-USR-FORM`*
|
|
126
157
|
|
|
127
158
|
---
|
|
128
159
|
## 6. Handoff Usage Guide
|
|
129
|
-
- `/legacy /spec W-
|
|
130
|
-
- `/legacy /
|
|
160
|
+
- `/legacy /spec W-ADM-AUTH-01` — spec a legacy screen (MUST reuse CMN-* if applicable)
|
|
161
|
+
- `/legacy /user-flow FLOW-checkout` — map a legacy flow
|
|
131
162
|
```
|
|
132
163
|
|
|
133
164
|
---
|
|
@@ -138,5 +169,6 @@ extractBundle: architecture-core
|
|
|
138
169
|
- [ ] Audit script run; index checked or gaps reported.
|
|
139
170
|
- [ ] `adoption-inventory.md` created directly at workspace root.
|
|
140
171
|
- [ ] All items use standardized `CMP-*`, `W-*`, `API-*`, `FLOW-*`, `CMN-*` IDs.
|
|
172
|
+
- [ ] Section 4 lists user flows with tier **A/B/C** when multi-step/cross-app journeys exist; tier **A** cross-surface rows are explicit.
|
|
141
173
|
- [ ] Common Catalog Candidates listed with source files if Common mode selected.
|
|
142
174
|
- [ ] Anti-Copy-Paste Guard enforced for new spec/code.
|
|
@@ -28,7 +28,7 @@ Shared extracts: `api-spec-sync.md`, `spec-evolution.md`, `entity-relationship.m
|
|
|
28
28
|
|
|
29
29
|
## Rule: ID Resolution & Folder Location
|
|
30
30
|
|
|
31
|
-
- **[MANDATORY]** If an ID is provided (e.g. `CMP-ADM-
|
|
31
|
+
- **[MANDATORY]** If an ID is provided (e.g. `CMP-ADM-AUTH-01-001`, `W-ADM-AUTH-01`) → use `flowgrid_docs_route` or glob to resolve to `…/api/<seq>/01-backend-spec.yaml`. Do NOT force user to provide full filesystem path.
|
|
32
32
|
- **[MANDATORY]** Trio lives under `api/<seq>/` — never adjacent to `*.bundle.yaml`.
|
|
33
33
|
- Common APIs: `…/common/yaml/<slug>/01-backend-spec.yaml` (one trio per API).
|
|
34
34
|
|
|
@@ -19,7 +19,7 @@ extractBundle: architecture-core
|
|
|
19
19
|
## Rule: When to Use /background-logic
|
|
20
20
|
|
|
21
21
|
- **[MANDATORY]** Use this skill when:
|
|
22
|
-
1. A `FLOW-*`
|
|
22
|
+
1. A `FLOW-*` user flow has established UI steps but requires background automation (e.g. dispatching Zalo/SMS notifications upon booking creation, auto-cancelling orders after 15 minutes of non-payment).
|
|
23
23
|
2. Existing background logic needs updating (changing dispatch channels, modifying filtering conditions, adjusting retry policies, updating storage buckets).
|
|
24
24
|
3. Auditing background tasks for comprehensive error scenarios, retry strategies, and idempotency guarantees.
|
|
25
25
|
- **[STRICTLY FORBIDDEN]** Do NOT use this skill to edit UI screen specifications (use `/update-spec`) or author new APIs (use `/api-spec`).
|
|
@@ -10,7 +10,7 @@ Common technical bundles (`common/yaml`, `*.bundle.yaml` under `surfaces/.../com
|
|
|
10
10
|
|
|
11
11
|
| Need | Use |
|
|
12
12
|
|------|-----|
|
|
13
|
-
| Cross-flow product doc | `common/
|
|
13
|
+
| Cross-flow product doc | `common/user-flows/FLOW-*.md` |
|
|
14
14
|
| Shared UX/business rules | `/common` → `common/patterns/*.md` |
|
|
15
15
|
| UI patterns (delete flow, badges, flat design, …) | FE **base** + `flowgrid-ux-common.mdc` during `/spec` / grill |
|
|
16
16
|
| New shared component / codegen template | [custom-base](../../../docs/workflows/custom-base.md) → `build-template-code` |
|
|
@@ -18,7 +18,7 @@ extractBundle: architecture-core
|
|
|
18
18
|
|
|
19
19
|
- **[MANDATORY]** Use when a flow crosses a service, system, or boundary: sync RPC, async messaging, event-driven handoffs, retries, idempotency, integration contracts.
|
|
20
20
|
- **[STRICTLY FORBIDDEN]** Do NOT use for internal code execution paths inside a single service — that belongs in architecture internals.
|
|
21
|
-
- **[STRICTLY FORBIDDEN]** Do NOT use for business action flows on a surface → use `/
|
|
21
|
+
- **[STRICTLY FORBIDDEN]** Do NOT use for business action flows on a surface → use `/user-flow`.
|
|
22
22
|
- **[STRICTLY FORBIDDEN]** Do NOT use for runtime journey narratives focusing on user/system step order across the whole product → use `/journey`.
|
|
23
23
|
|
|
24
24
|
---
|
|
@@ -10,7 +10,7 @@ extractBundle: architecture-core
|
|
|
10
10
|
|
|
11
11
|
# /db-erd — Business Data Model (ERD)
|
|
12
12
|
|
|
13
|
-
**Phase:** **0 Architecture** — sau `/overview`, `/module`, `/
|
|
13
|
+
**Phase:** **0 Architecture** — sau `/overview`, `/module`, `/user-flow` khi có entity/bảng mới. **Trước** `/spec` leaf.
|
|
14
14
|
|
|
15
15
|
**Hub SSOT:** [architecture-data.md](../../../docs/workflows/architecture-data.md)
|
|
16
16
|
|
|
@@ -21,6 +21,8 @@ SSOT flow: `docs/workflows/grill-and-human-review.md` · close checklist: `docs/
|
|
|
21
21
|
|
|
22
22
|
| Gap context | Route to |
|
|
23
23
|
| --- | --- |
|
|
24
|
+
| Overview / surface / CMP `index.md` PRD sections | `/grill-hub-prd` |
|
|
25
|
+
| Sổ rủi ro quota / hạn mức / peak | `/risk-register` |
|
|
24
26
|
| UI acceptance, copy, validation, UX affordance | `/grill-bqa` |
|
|
25
27
|
| `bundle.gen`, codegen profile, `#gen:*`, endpoint `action` on `01` | `/grill-dev` |
|
|
26
28
|
| BQA ↔ Dev contradiction on same bundle | `/grill-docs` |
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grill-hub-prd
|
|
3
|
+
description: EXCLUSIVE /grill-hub-prd — PRD sections on overview, surface, CMP index.md. Audit-first like grill-bqa.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
> [!CRITICAL] MANDATORY PRE-FLIGHT
|
|
8
|
+
> **[MANDATORY]** Re-read this entire `SKILL.md` via file-read tool.
|
|
9
|
+
|
|
10
|
+
# /grill-hub-prd — Hub PRD validation
|
|
11
|
+
|
|
12
|
+
**Targets:** `overview/index.md`, `overview/operational-areas/*.md`, `surfaces/<surface>/index.md`, `surfaces/.../CMP-*/index.md`.
|
|
13
|
+
|
|
14
|
+
**Extracts:** `tpl-overview-prd.md`, `tpl-surface-prd.md`, `tpl-module.md`.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Rule: Audit interlock
|
|
19
|
+
|
|
20
|
+
- **[MANDATORY]** Run `flowgrid audit hub-prd <path-to.md>` before editing.
|
|
21
|
+
- **[MANDATORY]** Fix all `gaps[]`; resolve `warnings[]` via patch or `AskQuestion` (Recommended / Other / Log as Tech Debt → `qa/` per `qa-authoring.md`).
|
|
22
|
+
- **[MANDATORY]** Re-run audit until `totalGaps === 0` or gaps deferred to `qa/*.yaml`.
|
|
23
|
+
- **[STRICTLY FORBIDDEN]** Author Personas tables or Success metrics on hub — KPI/persona ngoài hub.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Rule: Missing information (Law 2)
|
|
28
|
+
|
|
29
|
+
- **≤5 gaps:** `AskQuestion` one at a time, ≥3 options.
|
|
30
|
+
- **≥10 gaps:** STOP — Plan Mode / phased doc offloading.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Verification
|
|
35
|
+
|
|
36
|
+
- [ ] English headings: Goals, Background, Scope (prose = `contentLocale` from `docs-hub.locale.yaml`).
|
|
37
|
+
- [ ] No bracket placeholders `[...]` for sign-off.
|
|
38
|
+
- [ ] `flowgrid audit hub-prd` clean or qa defer documented.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: module
|
|
3
|
-
description: EXCLUSIVE /module — Handles business modules (CMP
|
|
3
|
+
description: EXCLUSIVE /module — Handles business modules (CMP-{SURF}-{DOMAIN}-{NN}). DO NOT output fake Markdown reports.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
extractBundle: architecture-core
|
|
6
6
|
---
|
|
@@ -11,11 +11,14 @@ extractBundle: architecture-core
|
|
|
11
11
|
|
|
12
12
|
# /module — Business Module (CMP-*)
|
|
13
13
|
|
|
14
|
-
**Template:**
|
|
14
|
+
**Template:** `templates/project-skeleton/surfaces/_module-index.template.md` → `surfaces/<surface>/CMP-*/index.md` (extract: `tpl-module.md`).
|
|
15
15
|
|
|
16
|
-
**
|
|
17
|
-
-
|
|
18
|
-
|
|
16
|
+
- **[MANDATORY]** Sections: **Goals**, **Scope**, **Features overview**, **Depends on** — English headings; prose in `contentLocale`.
|
|
17
|
+
- **[MANDATORY]** After edit: `flowgrid audit hub-prd surfaces/.../CMP-*/index.md` or `/grill-hub-prd`.
|
|
18
|
+
|
|
19
|
+
**Target paths:**
|
|
20
|
+
- Module folder: `surfaces/<surface>/CMP-<NN>-<slug>/`
|
|
21
|
+
- Hub doc: `index.md` only (not README) — MD hub for grill/audit
|
|
19
22
|
|
|
20
23
|
---
|
|
21
24
|
|
|
@@ -30,7 +33,7 @@ extractBundle: architecture-core
|
|
|
30
33
|
## Rule: Common Scope for `/module … common`
|
|
31
34
|
|
|
32
35
|
- **[MANDATORY]** When called with `common` modifier:
|
|
33
|
-
- Default: `surfaces/[Surface]/[CMP-ID]/common/` (`patterns/`, `
|
|
36
|
+
- Default: `surfaces/[Surface]/[CMP-ID]/common/` (`patterns/`, `user-flows/`).
|
|
34
37
|
- If user names a cluster (e.g. `02`, draft `2-*`) → `…/[CMP-ID]/02/common/` (or deeper if sub-prefix specified).
|
|
35
38
|
- **[STRICTLY FORBIDDEN]** Do NOT create `surfaces/[Surface]/common` from `/module` — that scope requires `/surfaces`.
|
|
36
39
|
|
|
@@ -14,15 +14,16 @@ extractBundle: architecture-core
|
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
## Rule:
|
|
17
|
+
## Rule: PRD sections (English keys)
|
|
18
18
|
|
|
19
|
-
- **[MANDATORY]** `overview/index.md
|
|
20
|
-
- **[MANDATORY]** Each operational
|
|
21
|
-
- **[
|
|
19
|
+
- **[MANDATORY]** `overview/index.md` from `templates/project-skeleton/overview/index.md`: **Goals**, **Background**, **Scope** (in/out bullets), operational-areas table, see-also links. Extract: `tpl-overview-prd.md`.
|
|
20
|
+
- **[MANDATORY]** Each `overview/operational-areas/<slug>.md` from `operational-areas/_template.md`: **Scope**, module links, related user flows.
|
|
21
|
+
- **[STRICTLY FORBIDDEN]** Personas tables or Success metrics on hub — defer outside hub or bundle `userStories`.
|
|
22
|
+
- **[MANDATORY]** After edit: `flowgrid audit hub-prd overview/index.md` (or operational/surface path) — zero gaps or `/grill-hub-prd`.
|
|
22
23
|
|
|
23
|
-
## Rule: Content
|
|
24
|
+
## Rule: Content boundary
|
|
24
25
|
|
|
25
|
-
- **[MANDATORY]** Overview
|
|
26
|
+
- **[MANDATORY]** Overview is business prose in hub `contentLocale`; section titles stay English.
|
|
26
27
|
- **[STRICTLY FORBIDDEN]** Do NOT include technical details (database schemas, cloud infrastructure configurations, internal routing mechanisms).
|
|
27
28
|
- **[MANDATORY]** When mentioning 3rd-party systems, use business names only (e.g. "Payment Gateway"), not technical specifications or protocols.
|
|
28
29
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: risk-register
|
|
3
|
+
description: /risk-register — Maintain architecture/11-risks/risk-register.md (quota, limits vs peak need).
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /risk-register — Sổ rủi ro tổng hợp
|
|
8
|
+
|
|
9
|
+
**SSOT:** `architecture/11-risks/risk-register.md`
|
|
10
|
+
**Template:** `harness/docs/extracts/tpl-risk-register.md`
|
|
11
|
+
|
|
12
|
+
**Khi dùng:** Rủi ro **không gắn một màn** — hạn mức email/SMS/API, license, SLA vendor, capacity cao điểm.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Rule: Audit interlock
|
|
17
|
+
|
|
18
|
+
- **[MANDATORY]** `flowgrid audit risks architecture/11-risks/risk-register.md` trước/sau sửa.
|
|
19
|
+
- **[MANDATORY]** Mỗi dòng: so sánh **Hạn mức** vs **Nhu cầu** → **Chênh lệch** → **Ảnh hưởng** → **Phương án**.
|
|
20
|
+
- **[STRICTLY FORBIDDEN]** Ghi `risks:` trên `*.bundle.yaml` — SSOT chỉ file này.
|
|
21
|
+
|
|
22
|
+
## Rule: AskQuestion (Law 2)
|
|
23
|
+
|
|
24
|
+
Thiếu số (quota, peak): wizard ≥3 options (Recommended / Other / Tech debt → `qa/`).
|
|
25
|
+
|
|
26
|
+
## Verification
|
|
27
|
+
|
|
28
|
+
- [ ] Ít nhất một rủi ro thật (không chỉ RISK-EXAMPLE).
|
|
29
|
+
- [ ] Audit `risks` trên register: gaps = 0 hoặc defer qa.
|
|
@@ -62,7 +62,7 @@ Hub: [spec-ssot-prep.md](../../../docs/workflows/spec-ssot-prep.md) · extract `
|
|
|
62
62
|
- `<pageType>` = page type đã xác định ở bước trên (list | create | detail | admin-crud | auth | ...).
|
|
63
63
|
- Script output:
|
|
64
64
|
- `gaps[]` → required fields missing → Agent patches bundle directly.
|
|
65
|
-
- `warnings[]` → **quality hints
|
|
65
|
+
- `warnings[]` → **quality hints** (`scopeIn`, `nonGoals`, `nfr`, `userFlows`, placeholders) — fix when info exists; **does not** block split. Rủi ro → `/risk-register` only (`WARN_BUNDLE_RISKS_FORBIDDEN` if `risks:` on bundle).
|
|
66
66
|
- `confirms[]` → AskQuestion wizard (one question at a time, ≥3 options):
|
|
67
67
|
- UX: `category: ux`, `UX_*`, `CONFIRM_UX_*` — `flowgrid-ux-common.mdc`
|
|
68
68
|
- **DB:** `category: db`, `CONFIRM_DB_*` — `.cursor/extracts/db-audit-wizard.md` (entities, multi-table, `db` vs `01`, `#derived-data`)
|
|
@@ -85,9 +85,10 @@ Hub: [spec-ssot-prep.md](../../../docs/workflows/spec-ssot-prep.md) · extract `
|
|
|
85
85
|
|
|
86
86
|
## Rule: Target / ID Resolution
|
|
87
87
|
|
|
88
|
+
- **[MANDATORY]** Product IDs per `product-id-convention.md` (`surfaceCode`, `CMP-{SURF}-{DOMAIN}-{NN}`, `W-{SURF}-{DOMAIN}-{NN}`).
|
|
88
89
|
- **[MANDATORY]** Resolve screen ID, module ID, slug, or Draft ID before generating any file.
|
|
89
90
|
- Draft ID `1-1-2` → pad each segment → `01/01/02/`
|
|
90
|
-
- Bundle ID: module prefix + padded segments, e.g. `CMP-ADM-
|
|
91
|
+
- Bundle ID: module prefix + padded segments, e.g. `CMP-ADM-ORD-01` + `02-01-02` → `page-id: cmp-adm-ord-01-02-01-02`
|
|
91
92
|
- **[MANDATORY]** Search for input `.md` file at resolved path. If found, read it as primary requirement source — do NOT say "I cannot hallucinate" or ask user for input that is already present.
|
|
92
93
|
- **[STRICTLY FORBIDDEN]** Do NOT demand full filesystem path from user when ID or slug is given.
|
|
93
94
|
|
|
@@ -152,7 +153,7 @@ Each zone turn — **in order**:
|
|
|
152
153
|
|
|
153
154
|
### Rule: Summary extensions (PRD lite)
|
|
154
155
|
- **[MANDATORY]** `summary` bullets: business_goals, stakeholders, user_journey, context (input/output), optional solution.
|
|
155
|
-
- **[RECOMMENDED]**
|
|
156
|
+
- **[RECOMMENDED]** Fill `scopeIn`, `nonGoals`, `userFlows`, `nfr` when PO/BA có thông tin. Rủi ro dự án → **`/risk-register`** (`architecture/11-risks/risk-register.md`), never `risks:` on bundle.
|
|
156
157
|
- **[MANDATORY]** Replace template `[placeholder]` brackets in `summary` / metrics / non-goals before handoff grill.
|
|
157
158
|
|
|
158
159
|
### Rule: User Stories (`userStories`)
|
|
@@ -268,6 +269,6 @@ Each zone turn — **in order**:
|
|
|
268
269
|
- [ ] UX gap questions used checklist-backed `(Recommended)` options (`flowgrid-ux-common.mdc`), not open brainstorming.
|
|
269
270
|
- [ ] `userStories` scenarios/AC reflect UX affordances patched in `design` (incl. audit `suggestedStoryPatch`).
|
|
270
271
|
- [ ] YAML strings with `:` or `[]` are double-quoted. No `.md` written by hand.
|
|
271
|
-
- [ ] `
|
|
272
|
+
- [ ] PRD fields (`scopeIn`, `nonGoals`, `userFlows`, `nfr`) filled or deferred via `qa/` (no template brackets). Rủi ro không trên bundle.
|
|
272
273
|
- [ ] `pnpm docs:split` + `pnpm docs:render` run with zero errors; `ir/generated/spec.md` has TOC + overview sections.
|
|
273
274
|
- [ ] Handoff → `/testcase` created.
|
|
@@ -16,6 +16,7 @@ extractBundle: architecture-core
|
|
|
16
16
|
|
|
17
17
|
## Rule: Target Resolution
|
|
18
18
|
|
|
19
|
+
- **[MANDATORY]** On create: set `surfaceCode` (2–4 uppercase letters) in `surfaces/<slug>/index.md` frontmatter — SSOT for all `CMP-*` / `W-*` / `API-*` on this channel (`product-id-convention.md`).
|
|
19
20
|
- **[MANDATORY]** Use `flowgrid_docs_route` or `flowgrid_docs_get_element` (or glob) to resolve the target surface directory under `surfaces/[Surface Name]/`.
|
|
20
21
|
- **[STRICTLY FORBIDDEN]** Do NOT confuse an API with a surface. APIs belong to architecture containers or function-level API contracts.
|
|
21
22
|
|
|
@@ -31,7 +32,9 @@ extractBundle: architecture-core
|
|
|
31
32
|
|
|
32
33
|
## Rule: Overview Alignment
|
|
33
34
|
|
|
34
|
-
- **[MANDATORY]** When
|
|
35
|
+
- **[MANDATORY]** When creating or updating a surface hub, copy `templates/project-skeleton/surfaces/_surface-index.template.md` → `surfaces/<surface>/index.md` (**Goals**, **Background**, **Scope**, CMP table, user-flow links, features overview). Extract: `tpl-surface-prd.md`.
|
|
36
|
+
- **[MANDATORY]** Before handoff: `flowgrid audit hub-prd surfaces/<surface>/index.md` — zero gaps or `/grill-hub-prd`.
|
|
37
|
+
- **[MANDATORY]** Describe actors, channels, and business responsibilities in plain language (no infra detail).
|
|
35
38
|
- **[MANDATORY]** Surface technical boundary: UI layout, component states, props, single-API data schemas specific to that screen.
|
|
36
39
|
- **[STRICTLY FORBIDDEN]** Do NOT include system-level architecture details (backend server configuration, load balancers, database schemas) in surface documentation.
|
|
37
40
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: /
|
|
2
|
+
name: user-flow
|
|
3
|
+
description: /user-flow — Luồng người dùng (FLOW-*) trên surfaces.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
extractBundle: architecture-core
|
|
6
6
|
---
|
|
@@ -8,11 +8,11 @@ extractBundle: architecture-core
|
|
|
8
8
|
> [!CRITICAL] MANDATORY PRE-FLIGHT
|
|
9
9
|
> **[MANDATORY]** Re-read this entire `SKILL.md` via file-read tool. STRICTLY FORBIDDEN to rely on memory.
|
|
10
10
|
|
|
11
|
-
# /
|
|
11
|
+
# /user-flow
|
|
12
12
|
|
|
13
13
|
**Mindset:** Model the process by **business actions on surfaces**, not by repository or service topology.
|
|
14
14
|
|
|
15
|
-
**Template:** `architecture/03-
|
|
15
|
+
**Template:** `architecture/03-user-flows/FLOW-template.md` (or `**/common/user-flows/FLOW-*.md`) — **Non-goals** in §1 when information exists (KPI ngoài hub).
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
@@ -36,8 +36,8 @@ extractBundle: architecture-core
|
|
|
36
36
|
## Rule: Target Path Resolution
|
|
37
37
|
|
|
38
38
|
- **[MANDATORY]** Resolve placement path via `.cursor/extracts/common-scope.md` §4.
|
|
39
|
-
- Surface-level: `surfaces/**/common/
|
|
40
|
-
- Architecture-level: `architecture/03-
|
|
39
|
+
- Surface-level: `surfaces/**/common/user-flows/FLOW-*.md`
|
|
40
|
+
- Architecture-level: `architecture/03-user-flows/`
|
|
41
41
|
- **[STRICTLY FORBIDDEN]** Do NOT use an unstandardized path like `[Target Path]/Common/Business processes`.
|
|
42
42
|
|
|
43
43
|
---
|
|
@@ -59,7 +59,7 @@ extractBundle: architecture-core
|
|
|
59
59
|
|
|
60
60
|
### When co-activated with `/architecture`:
|
|
61
61
|
- **[MANDATORY]** Focus on technical `sequenceDiagram` for entire long-running flow: backend services, DB interactions, cronjobs, external APIs, 3rd-party handshakes.
|
|
62
|
-
- Placement: `architecture/03-
|
|
62
|
+
- Placement: `architecture/03-user-flows/`.
|
|
63
63
|
|
|
64
64
|
---
|
|
65
65
|
|
|
@@ -93,7 +93,7 @@ extractBundle: architecture-core
|
|
|
93
93
|
|
|
94
94
|
- **[MANDATORY]** If `adoption-inventory.md` does NOT exist at workspace root → STOP: *"Run `/docs-hub /adopt` first."*
|
|
95
95
|
- **[MANDATORY]** If file exists: look up `FLOW-*` candidates and map legacy module/screens. Write with `legacy-` prefix (e.g. `legacy-FLOW-checkout.md`).
|
|
96
|
-
- **[MANDATORY - CROSS-FLOW LEGACY AUDIT]**: When analyzing legacy
|
|
96
|
+
- **[MANDATORY - CROSS-FLOW LEGACY AUDIT]**: When analyzing legacy user flows (`/legacy /user-flow`), Agent **MUST PROACTIVELY AUDIT END-TO-END FLOW GAPS**:
|
|
97
97
|
- Compare Data Output at Step $N$ (e.g., Screen 1 / API 1) with Input expectations at Step $N+1$ (e.g., Screen 2 / API 2) to identify schema or status misalignments.
|
|
98
98
|
- Flag orphan steps/APIs (not attached to any valid flow step) or processes lacking Confirmation / Rollback / Idempotency handling on failure.
|
|
99
99
|
- Tag issues with `[LEGACY_FLOW_GAP]` and generate Open Questions for member resolution.
|
|
@@ -13,7 +13,7 @@ disable-model-invocation: true
|
|
|
13
13
|
| `common/yaml` + `flowgrid gen-common` | FE base components + `design.registry.json` |
|
|
14
14
|
| New Mo* / adapter templates | [custom-base workflow](../../../docs/workflows/custom-base.md) → `build-template-code` |
|
|
15
15
|
| Cross-scope business rules | `/common` → `common/patterns/*.md` |
|
|
16
|
-
| Cross-flow | `common/
|
|
16
|
+
| Cross-flow | `common/user-flows/FLOW-*.md` |
|
|
17
17
|
|
|
18
18
|
**If a member invokes `/gen-common`:** STOP — explain deprecation; continue with `/prototype` (`gen:dry` → `gen`) when `grillStatus.dev: done`.
|
|
19
19
|
|
|
@@ -14,7 +14,7 @@ disable-model-invocation: true
|
|
|
14
14
|
|
|
15
15
|
## Target / ID Resolution Rule
|
|
16
16
|
|
|
17
|
-
- User prompt MAY specify screen ID, function ID, or slug (e.g. `W-
|
|
17
|
+
- User prompt MAY specify screen ID, function ID, or slug (e.g. `W-ADM-AUTH-01`, `login`).
|
|
18
18
|
- **Read the entire `ir/design.yaml`** on the screen leaf (`…/CMP-*/<NN…>/ir/design.yaml`). Do **not** use `01-backend-spec.yaml` as FE input.
|
|
19
19
|
- Docs hub is **read-only**. Do not patch `*.bundle.yaml` or `ir/*`.
|
|
20
20
|
- Compare route + rendered UI to `ir/design.yaml` (actions, validation copy, states, testIds).
|
|
@@ -10,7 +10,7 @@ disable-model-invocation: true
|
|
|
10
10
|
|
|
11
11
|
## Artifact & Target ID Resolution Rule
|
|
12
12
|
|
|
13
|
-
- User prompt MAY specify a screen ID, function ID, or slug (e.g. `W-
|
|
13
|
+
- User prompt MAY specify a screen ID, function ID, or slug (e.g. `W-ADM-AUTH-01`, `login`).
|
|
14
14
|
- Agent MUST use `--id` or resolve `surfaces/<surface>/CMP-*/<NN…>/ir/design.yaml` via `FLOWGRID_DOCS_ROOT` or `flowgrid_docs_route` (same leaf as the bundle; API trio is sibling `api/<seq>/`, not this file).
|
|
15
15
|
- Shared UI (list shell, chips, delete flow, …) is **already in the FE base** — do not run `/gen-common` (deprecated).
|
|
16
16
|
- `surfaces/…/common/` on the docs hub is **Markdown only** (`processes/FLOW-*.md`, `patterns/`) — read for context; never codegen from `common/yaml`.
|
|
@@ -18,7 +18,7 @@ disable-model-invocation: true
|
|
|
18
18
|
|
|
19
19
|
```text
|
|
20
20
|
surfaces/<surface>/CMP-*/<NN…>/ir/design.yaml
|
|
21
|
-
# e.g. …/CMP-ADM-
|
|
21
|
+
# e.g. …/CMP-ADM-DEMO-01/01/01/01/ir/design.yaml
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
Read the **entire** `ir/design.yaml` (script + agent inspection). Do not filter keys from `*.bundle.yaml`. **`ir/spec.yaml`** is business prose only.
|
|
@@ -47,12 +47,12 @@ only.
|
|
|
47
47
|
## Workflow
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
|
-
npm run codegen:dry -- --id W-
|
|
51
|
-
npm run codegen -- --id W-
|
|
50
|
+
npm run codegen:dry -- --id W-ADM-AUTH-01
|
|
51
|
+
npm run codegen -- --id W-ADM-AUTH-01
|
|
52
52
|
|
|
53
53
|
# Fallback direct CLI if wrappers missing:
|
|
54
|
-
flowgrid gen:dry --adapter=nuxt4 --docs-root=/path/to/docs-hub -- --id W-
|
|
55
|
-
flowgrid gen --adapter=nuxt4 --docs-root=/path/to/docs-hub -- --id W-
|
|
54
|
+
flowgrid gen:dry --adapter=nuxt4 --docs-root=/path/to/docs-hub -- --id W-ADM-AUTH-01
|
|
55
|
+
flowgrid gen --adapter=nuxt4 --docs-root=/path/to/docs-hub -- --id W-ADM-AUTH-01
|
|
56
56
|
|
|
57
57
|
flowgrid gen:dry --adapter=nextjs -- --spec ir/design.yaml
|
|
58
58
|
flowgrid gen --adapter=nextjs -- --spec ir/design.yaml
|
|
@@ -9,12 +9,12 @@ disable-model-invocation: true
|
|
|
9
9
|
**Owner:** bộ code (`--type=fe`)
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
npm run codegen:unit:dry -- --id W-
|
|
13
|
-
npm run codegen:unit -- --id W-
|
|
12
|
+
npm run codegen:unit:dry -- --id W-ADM-AUTH-01
|
|
13
|
+
npm run codegen:unit -- --id W-ADM-AUTH-01
|
|
14
14
|
|
|
15
15
|
# Fallback direct CLI if wrappers missing:
|
|
16
|
-
flowgrid unit-gen:dry --adapter=nuxt4 --docs-root=/path/to/docs-hub -- --id W-
|
|
17
|
-
flowgrid unit-gen --adapter=nuxt4 --docs-root=/path/to/docs-hub -- --id W-
|
|
16
|
+
flowgrid unit-gen:dry --adapter=nuxt4 --docs-root=/path/to/docs-hub -- --id W-ADM-AUTH-01
|
|
17
|
+
flowgrid unit-gen --adapter=nuxt4 --docs-root=/path/to/docs-hub -- --id W-ADM-AUTH-01
|
|
18
18
|
flowgrid unit-registry --adapter=nuxt4
|
|
19
19
|
```
|
|
20
20
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
> These are **PHYSICAL INTERLOCKS**, not casual reminders.
|
|
5
5
|
> Any violation of these laws → run **FAILED**. Chat-only "done" = **STRICTLY REJECTED**.
|
|
6
6
|
>
|
|
7
|
-
> Path SSOT: `surfaces/<surface>/CMP-*/<slug>/` (NO `modules/` segment).
|
|
7
|
+
> Path SSOT: `surfaces/<surface>/CMP-*/<slug>/` (NO `modules/` segment). Product IDs: `product-id-convention.md` (`surfaceCode`, `CMP-{SURF}-{DOMAIN}-{NN}`, `W-{SURF}-{DOMAIN}-{NN}`).
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -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.
|
|
@@ -21,12 +21,12 @@ query a workspace-parent graph.
|
|
|
21
21
|
|
|
22
22
|
## Target / ID Resolution Rule
|
|
23
23
|
|
|
24
|
-
- User prompt MAY specify a screen ID, module ID, or short slug (e.g. `W-
|
|
24
|
+
- User prompt MAY specify a screen ID, module ID, or short slug (e.g. `W-ADM-AUTH-01`, `CMP-ADM-AUTH-01`, `login`).
|
|
25
25
|
- **[MANDATORY]** Agent MUST use `flowgrid_docs_route` or `flowgrid_docs_get_element` (or glob search under `FLOWGRID_DOCS_ROOT` / `surfaces/...`) to resolve target paths.
|
|
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-
|
|
53
|
-
- Docs `surfaces/admin/CMP-ADM-
|
|
52
|
+
- Docs `surfaces/admin/CMP-ADM-ORD-01/02/common/user-flows/FLOW-checkout.md` → `scenarios/admin/CMP-ADM-ORD-01/02/common/user-flows/FLOW-checkout/SC-*.yaml`
|
|
53
|
+
- Docs `surfaces/admin/CMP-ADM-ORD-01/common/user-flows/FLOW-onboard.md` → `scenarios/admin/CMP-ADM-ORD-01/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
|
|
|
@@ -49,9 +49,9 @@ disable-model-invocation: true
|
|
|
49
49
|
## Rule: Directory Mirroring (Docs SSOT)
|
|
50
50
|
|
|
51
51
|
- **[MANDATORY]** Mirror function folder: `cases/<relative-path>/TC-*.yaml`.
|
|
52
|
-
- ✅ `surfaces/admin/CMP-ADM-
|
|
52
|
+
- ✅ `surfaces/admin/CMP-ADM-ORD-01/02/01/login/` → `cases/admin/CMP-ADM-ORD-01/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
|
|