@shanyucoder/flowgrid 0.1.5 → 0.1.9
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/README.md +1 -1
- package/adapters/laravel/registries/codegen.registry.json +9 -9
- package/bin/flowgrid.mjs +326 -115
- package/bin/lib/agent-mcp.mjs +4 -0
- package/bin/lib/agent-profiles.mjs +30 -6
- package/bin/lib/audit-run.mjs +1 -1
- package/bin/lib/cli-update.mjs +48 -8
- package/bin/lib/doctor.mjs +90 -3
- package/bin/lib/harness-overlay.mjs +12 -5
- package/bin/lib/harness-sync.mjs +17 -3
- package/bin/lib/init-adapters.mjs +75 -0
- package/bin/lib/init-scaffold.mjs +9 -0
- package/bin/lib/inject-consumer-scripts.mjs +115 -0
- package/bin/lib/merge-stack-config.mjs +89 -0
- package/bin/lib/project-gitignore.mjs +1 -0
- package/bin/lib/repo-maps-align.mjs +203 -0
- package/dist/graph/config/load-config.js +7 -2
- package/dist/graph/config/load-config.js.map +1 -1
- package/dist/graph/mcp/tools.js +1 -1
- package/dist/graph/mcp/tools.js.map +1 -1
- package/dist/graph/registry/load-registries.d.ts +1 -0
- package/dist/graph/registry/load-registries.js +14 -1
- package/dist/graph/registry/load-registries.js.map +1 -1
- package/engines/cases/render-cases.mjs +67 -5
- package/engines/docs/lib/qa-item.mjs +91 -0
- package/engines/docs/lib/render-api-summary-markdown.mjs +28 -0
- package/engines/docs/lib/render-bundle-markdown.mjs +77 -2
- package/engines/docs/lib/render-data-model-markdown.mjs +171 -0
- package/engines/docs/lib/render-design-tables.mjs +89 -7
- package/engines/docs/lib/render-qa-list.mjs +123 -25
- package/engines/docs/lib/render-template.mjs +6 -0
- package/engines/docs/render-docs.mjs +6 -2
- package/engines/docs/vitepress/config.ts +7 -7
- package/engines/docs/vitepress/surfaces-nav.mjs +45 -14
- package/engines/openapi/check-backend-spec.mjs +2 -2
- package/engines/openapi/lib/markdown-table.mjs +8 -0
- package/engines/openapi/lib/render-backend-spec-markdown.mjs +78 -0
- package/engines/registry-sync/be-capabilities-sync.mjs +118 -0
- package/engines/registry-sync/fe-design-sync.mjs +258 -0
- package/engines/registry-sync/run-registry-sync.mjs +107 -0
- package/engines/shared/e2e-output-layout.mjs +68 -0
- package/engines/shared/flowgrid-e2e-root.mjs +19 -0
- package/engines/shared/resolve-flowgrid-context.mjs +176 -0
- package/engines/spec/lib/audit-api-gaps.mjs +1 -1
- package/engines/spec/lib/audit-bundle-gaps.mjs +92 -3
- package/engines/spec/lib/audit-db-tables.mjs +529 -0
- package/engines/spec/lib/audit-e2e-coverage.mjs +88 -30
- package/engines/spec/lib/bundle-schema.mjs +4 -1
- package/engines/spec/lib/open-qa.mjs +71 -21
- package/engines/spec/split-bundle.mjs +11 -1
- package/engines/testcase/runners/generate-api.mjs +23 -23
- package/engines/testcase/runners/generate.mjs +19 -17
- package/engines/testcase/runners/lib/bootstrap-context.mjs +44 -0
- package/engines/testcase/runners/lib/write-files.mjs +37 -9
- package/harness/agents/antigravity/rules/antigravity-mcp.mdc +12 -0
- package/harness/agents/gemini/rules/gemini-mcp.mdc +11 -0
- package/harness/agents/gemini_antigravity/rules/antigravity-mcp.mdc +8 -6
- package/harness/be/skills/{grill-api → audit-api}/SKILL.md +8 -7
- package/harness/common/extracts/artifact-graph.md +2 -2
- package/harness/common/extracts/artifactgraph-phase-hooks.md +2 -2
- package/harness/common/extracts/docs-mark-detect.md +2 -2
- package/harness/common/extracts/entity-relationship.md +23 -0
- package/harness/common/rules/flowgrid-ux-common.mdc +3 -3
- package/harness/common/skills/configure-repo-maps/SKILL.md +4 -2
- package/harness/docs/extracts/agent-execution-protocol.md +3 -3
- package/harness/docs/extracts/api-codegen-readiness.md +34 -0
- package/harness/docs/extracts/api-codegen-tags.md +30 -0
- package/harness/docs/extracts/api-contract.md +43 -0
- package/harness/docs/extracts/api-spec-sync.md +35 -0
- package/harness/docs/extracts/artifactgraph-hooks-docs.md +1 -1
- package/harness/docs/extracts/call-external.md +16 -0
- package/harness/docs/extracts/common-scope.md +9 -10
- package/harness/docs/extracts/db-audit-wizard.md +45 -0
- package/harness/docs/extracts/derived-data.md +18 -0
- package/harness/docs/extracts/design-leaf-signoff.md +16 -0
- package/harness/docs/extracts/extract-registry.docs.json +11 -2
- 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 +7 -3
- package/harness/docs/extracts/spec-evolution.md +21 -0
- package/harness/docs/extracts/spec-prd-lite.md +19 -0
- package/harness/docs/extracts/spec-requirement.md +6 -2
- package/harness/docs/extracts/spec-ssot-prep.md +25 -0
- package/harness/docs/extracts/tpl-module.md +12 -0
- package/harness/docs/extracts/verify-gate.md +33 -0
- package/harness/docs/extracts/wire-spec-feedback.md +31 -0
- package/harness/docs/rules/agent-compliance.mdc +1 -1
- package/harness/docs/rules/team-flow-spec.mdc +3 -4
- package/harness/docs/schemas/flowgrid-docs/qa-item.schema.json +65 -0
- package/harness/docs/skills/adopt/SKILL.md +2 -0
- package/harness/docs/skills/api/SKILL.md +4 -5
- package/harness/docs/skills/api-spec/SKILL.md +19 -6
- package/harness/docs/skills/api-update/SKILL.md +4 -4
- package/harness/docs/skills/architecture/SKILL.md +1 -1
- package/harness/docs/skills/business-process/SKILL.md +2 -0
- package/harness/docs/skills/common/SKILL.md +2 -2
- package/harness/docs/skills/common-spec/SKILL.md +10 -47
- package/harness/docs/skills/db-erd/SKILL.md +26 -0
- package/harness/docs/skills/grill/SKILL.md +28 -22
- package/harness/docs/skills/grill-api/SKILL.md +4 -6
- package/harness/docs/skills/grill-api-spec/SKILL.md +44 -24
- package/harness/docs/skills/grill-bqa/SKILL.md +28 -13
- package/harness/docs/skills/grill-common-spec/SKILL.md +10 -35
- package/harness/docs/skills/grill-dev/SKILL.md +8 -7
- package/harness/docs/skills/grill-docs/SKILL.md +11 -4
- package/harness/docs/skills/module/SKILL.md +3 -1
- package/harness/docs/skills/openapi/SKILL.md +2 -1
- package/harness/docs/skills/overview/SKILL.md +7 -1
- package/harness/docs/skills/qa-resolve/SKILL.md +13 -12
- package/harness/docs/skills/qa-review/SKILL.md +45 -0
- package/harness/docs/skills/spec/SKILL.md +43 -10
- package/harness/docs/skills/update-spec/SKILL.md +5 -2
- package/harness/fe/extracts/wire-audit-loop.md +72 -0
- package/harness/fe/extracts/wire-phase.md +45 -0
- package/harness/fe/rules/platform-design-vocabulary.mdc +1 -1
- package/harness/fe/rules/team-flow-prototype.mdc +8 -4
- package/harness/fe/skills/gen-common/SKILL.md +11 -84
- package/harness/fe/skills/grill-prototype/SKILL.md +51 -25
- package/harness/fe/skills/grill-test/SKILL.md +78 -20
- package/harness/fe/skills/grill-wire/SKILL.md +81 -0
- package/harness/fe/skills/prototype/SKILL.md +3 -2
- package/harness/fe/skills/wire/SKILL.md +8 -3
- package/harness/shared/AGENTS.md +3 -3
- package/harness/shared/SSOT_AGENT_PROTOCOL.md +3 -3
- package/harness/tests/extracts/grill-api-hook.md +69 -0
- package/harness/tests/extracts/grill-scenario-flow.md +39 -0
- package/harness/tests/extracts/grill-screen-tc.md +40 -0
- package/harness/tests/extracts/testcase-gen-cli.md +57 -0
- package/harness/tests/extracts/testcase-plan.md +29 -0
- package/harness/tests/extracts/tests-verify-gate.md +29 -0
- package/harness/tests/extracts/wire-test-handoff.md +37 -0
- package/harness/tests/skills/grill-testcase/SKILL.md +1 -0
- package/harness/tests/skills/test-api/SKILL.md +14 -6
- package/harness/tests/skills/testcase/SKILL.md +3 -1
- package/harness/tests/templates/TC.example-api.yaml +7 -1
- package/harness/tests/templates/TC.example.yaml +4 -1
- package/harness/tests/templates/tpl-testcase-plan.md +75 -0
- package/package.json +1 -1
- package/stacks/fastapi.json +1 -0
- package/stacks/laravel.json +1 -0
- package/stacks/nestjs.json +72 -0
- package/stacks/nextjs-nest.json +1 -0
- package/stacks/nuxt4-nest.json +1 -0
- package/templates/project-skeleton/architecture/03-business-process/FLOW-template.md +2 -0
- package/templates/project-skeleton/overview/index.md +68 -2
- package/templates/project-skeleton/overview/operational-areas/_template.md +37 -0
- package/templates/project-skeleton/qa/README.md +4 -8
- package/templates/project-skeleton/surfaces/common/data-model/index.md +10 -2
- package/templates/schemas/qa-item.schema.json +98 -0
- package/templates/shared/api-03-mock.stub.yaml +14 -0
- package/templates/shared/backend-api.bundle.yaml +3 -0
- package/templates/shared/backend-api.yaml +4 -0
- package/templates/shared/be-capabilities.registry.base.json +8 -0
- package/templates/shared/bundle-authoring.md +44 -7
- package/templates/shared/default-layout.ejs +131 -18
- package/templates/shared/design-spec.yaml +2 -3
- package/templates/shared/design.registry.base.json +38 -0
- package/templates/shared/feature.bundle.yaml +16 -9
- package/templates/shared/ir/generated/spec.md +281 -0
- 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 +133 -0
- package/templates/shared/tpl-screen-data-model.md +76 -0
- package/templates/tests-skeleton/cases/README.md +4 -0
- package/templates/tests-skeleton/catalog/locale.yaml +9 -0
- package/templates/tests-skeleton/tpl-testcase-plan.md +9 -0
- package/harness/docs/skills/api-integration/SKILL.md +0 -110
- package/harness/docs/skills/grill-integration-spec/SKILL.md +0 -51
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Wire phase — tests-hub handoff
|
|
2
|
+
|
|
3
|
+
When **FE `/wire` or `/grill-wire`** finds plan gaps (real API behaviour, status codes, matrix facets), fix on **tests-docs** — not on FE repo.
|
|
4
|
+
|
|
5
|
+
Hub: `docs/workflows/wire.md#gap-loop` · FE extract: `harness/fe/extracts/wire-audit-loop.md`.
|
|
6
|
+
|
|
7
|
+
## Triggers from wire audits
|
|
8
|
+
|
|
9
|
+
| Signal | Tests action |
|
|
10
|
+
|--------|----------------|
|
|
11
|
+
| `audit e2e` `matrixRowsUncovered` for post-wire facet | Extend `TC-*.yaml` `testMatrix` + `steps[]` (real API, no mock) |
|
|
12
|
+
| New error path seen on wire (409, 422 field) | Add negative TC row; mirror bundle `#err:*` |
|
|
13
|
+
| `SC_SCREEN_NO_TC` after wire | `/testcase` under `cases/...` or update `SC-*.yaml` |
|
|
14
|
+
| Plan still describes mock-only setup | Set lifecycle / steps for **wire** runtime; remove mock-only `setup` notes |
|
|
15
|
+
|
|
16
|
+
## Grill sequence
|
|
17
|
+
|
|
18
|
+
1. Read full `*.bundle.yaml` on docs (post `/update-spec` if spec changed).
|
|
19
|
+
2. Patch `cases/**/TC-*.yaml` — `traceability`, `testMatrix`, `refs`.
|
|
20
|
+
3. `flowgrid cases:check`
|
|
21
|
+
4. `flowgrid audit testcase <TC.yaml> --bundle <bundle>`
|
|
22
|
+
5. `flowgrid cases:gate --strict --docs-root $FLOWGRID_DOCS_ROOT`
|
|
23
|
+
6. `flowgrid cases:render` (hub 5174)
|
|
24
|
+
7. `/grill-testcase` sign-off for scope
|
|
25
|
+
|
|
26
|
+
## Back to FE
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
testcase:gen --id TC-* # e2e-root
|
|
30
|
+
/test → scoped test:e2e (post-wire)
|
|
31
|
+
/grill-test → audit e2e
|
|
32
|
+
/grill-wire → full convergence chain
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Spec hole (not test-only)
|
|
36
|
+
|
|
37
|
+
If AC/UX wrong → paste `/docs-hub /update-spec …` — do not invent business rules on tests hub.
|
|
@@ -6,6 +6,7 @@ disable-model-invocation: true
|
|
|
6
6
|
|
|
7
7
|
> [!CRITICAL] MANDATORY PRE-FLIGHT
|
|
8
8
|
> **[MANDATORY]** Re-read this entire `SKILL.md` via file-read tool. STRICTLY FORBIDDEN to rely on memory.
|
|
9
|
+
> **[MANDATORY]** Read `.cursor/extracts/tests-verify-gate.md`, `testcase-plan.md`, and the mode extract matching scope: `grill-screen-tc.md` (one `W-*`), `grill-scenario-flow.md` (`SC-*`), `grill-api-hook.md` (`genType: api-e2e`). After FE wire gaps: also `wire-test-handoff.md`.
|
|
9
10
|
|
|
10
11
|
# /grill-testcase
|
|
11
12
|
|
|
@@ -6,7 +6,7 @@ disable-model-invocation: true
|
|
|
6
6
|
|
|
7
7
|
> [!CRITICAL] MANDATORY PRE-FLIGHT
|
|
8
8
|
> **[MANDATORY]** Re-read this `SKILL.md` via file-read tool.
|
|
9
|
-
> **[MANDATORY]**
|
|
9
|
+
> **[MANDATORY]** Contract SSOT on docs-hub: `…/api/<seq>/01-backend-spec.yaml` — `/api-spec` then `/grill-api-spec`.
|
|
10
10
|
|
|
11
11
|
# /test-api — API hook E2E (tests-docs + codegen)
|
|
12
12
|
|
|
@@ -27,11 +27,11 @@ disable-model-invocation: true
|
|
|
27
27
|
- **[MANDATORY]** `api.baseUrlEnv` (CI env) + `api.baseURL` fallback; optional `api.defaultHeaders`.
|
|
28
28
|
- **[MANDATORY]** `apiSteps[]`: `method`, `path`, `expectStatus`, optional `body`, `headers`, `expectJson`, `expectBodyContains`.
|
|
29
29
|
- **[MANDATORY]** Human `steps[]` + `testMatrix` (same gate as UI TC).
|
|
30
|
-
- Mirror path: `cases
|
|
30
|
+
- Mirror path: `cases/.../<module>/.../TC-*.yaml` aligned with docs API leaf on the same surface.
|
|
31
31
|
|
|
32
|
-
Template: `harness/tests/templates/TC.example-api.yaml`.
|
|
32
|
+
Template: hub `_templates/TC.example-api.yaml` or `harness/tests/templates/TC.example-api.yaml`.
|
|
33
33
|
|
|
34
|
-
Audit: `flowgrid audit testcase <TC.yaml> --bundle
|
|
34
|
+
Audit: `flowgrid audit testcase <TC.yaml> --bundle <*.bundle.yaml>` when bundle exists on docs hub.
|
|
35
35
|
|
|
36
36
|
---
|
|
37
37
|
|
|
@@ -53,7 +53,15 @@ Output (e2e-root): `tests/api-e2e/<module>/<TC-id>.api.spec.ts` — run with Pla
|
|
|
53
53
|
|
|
54
54
|
- Fix auth (HMAC, rotating tokens) in generated spec or TC `headers` — do not commit secrets; use env in CI.
|
|
55
55
|
- Hybrid UI → API: run UI spec first (or fixture API) then API spec; share `orderId` via `process.env` / `test.info().attach` / storageState as team convention.
|
|
56
|
-
|
|
56
|
+
## Newman / Postman (optional)
|
|
57
|
+
|
|
58
|
+
- **[MANDATORY]** FlowGrid SSOT remains `TC-*.yaml` (`api-e2e`) — Newman does **not** replace plan or `cases:gate`.
|
|
59
|
+
- Store partner collections under e.g. `integrations/postman/`; CI: `newman run … -e …`.
|
|
60
|
+
- Tag TC: `contract-postman`; document collection path in `description`.
|
|
61
|
+
- Use Newman when: partner-owned collection, heavy pre-request scripts, or contractual replay — **in addition to** Playwright gen for traceability.
|
|
62
|
+
- Grill cross-flow: same `SC-*` may list UI `TC` (e2e) + API `TC` (api-e2e) — `audit scenario` must cover both screens/API refs.
|
|
63
|
+
|
|
64
|
+
Extract: `.cursor/extracts/grill-api-hook.md`.
|
|
57
65
|
|
|
58
66
|
---
|
|
59
67
|
|
|
@@ -61,5 +69,5 @@ Output (e2e-root): `tests/api-e2e/<module>/<TC-id>.api.spec.ts` — run with Pla
|
|
|
61
69
|
|
|
62
70
|
- Author plan: `/testcase` (UI), `/scenario` (SC-*)
|
|
63
71
|
- Grill hub: `/grill-testcase`
|
|
64
|
-
- Docs SSOT: `/api-
|
|
72
|
+
- Docs SSOT: `/api-spec`, `/grill-api-spec`
|
|
65
73
|
- UI E2E after skeleton: `/test` + `testcase:gen`
|
|
@@ -7,6 +7,7 @@ disable-model-invocation: true
|
|
|
7
7
|
> [!CRITICAL] MANDATORY PRE-FLIGHT
|
|
8
8
|
> **[MANDATORY]** Re-read this entire `SKILL.md` via file-read tool. STRICTLY FORBIDDEN to rely on memory.
|
|
9
9
|
> **[MANDATORY]** Read the entire function **`*.bundle.yaml`** (sibling of `ir/` on docs hub) BEFORE authoring any test case. Do not split-read `ir/spec.yaml` + `ir/design.yaml` for coverage traceability.
|
|
10
|
+
> **[MANDATORY]** Read `.cursor/extracts/testcase-plan.md` and golden `TC.example.yaml` from hub `_templates/` (after init) or package `harness/tests/templates/`.
|
|
10
11
|
|
|
11
12
|
# /testcase — E2E Test Case Authoring (Tests Hub)
|
|
12
13
|
|
|
@@ -91,8 +92,9 @@ disable-model-invocation: true
|
|
|
91
92
|
- [ ] Function `*.bundle.yaml` read in full (not partial slices).
|
|
92
93
|
- [ ] All `userStories.scenarios` covered by corresponding test cases.
|
|
93
94
|
- [ ] Equivalence Partitioning & Boundary Value Analysis `testMatrix` declared (min/max boundary, regex failure, duplicate 409, double-submit lock, offline preservation).
|
|
94
|
-
- [ ]
|
|
95
|
+
- [ ] Cross-flow: `refs.scenario` points to existing `SC-*`; per-screen TC still authored via `/testcase` (optional review prose: `SC.example.md` pattern).
|
|
95
96
|
- [ ] `meaning` + `purpose` used for step descriptions.
|
|
96
97
|
- [ ] `id` short; `title` ≤20 chars; `description` is rich and business-meaningful.
|
|
97
98
|
- [ ] YAML syntax valid — no JS expressions in test data values.
|
|
98
99
|
- [ ] Directory structure mirrors docs SSOT path exactly.
|
|
100
|
+
- [ ] `flowgrid cases:render` run so `TC-*.md` exposes steps, testMatrix table, and traceability for QA.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
schemaVersion: 2
|
|
2
2
|
id: TC-EXAMPLE-PARTNER-EXPORT
|
|
3
|
-
title: Partner export
|
|
3
|
+
title: Partner export
|
|
4
4
|
summary: Ví dụ — đối tác đọc export API sau khi đơn đã sẵn sàng.
|
|
5
5
|
story: |
|
|
6
6
|
Given đơn ORD-EXAMPLE-001 đã được portal xử lý
|
|
@@ -38,7 +38,13 @@ steps:
|
|
|
38
38
|
- Partner gọi GET export với token hợp lệ
|
|
39
39
|
- Hệ thống trả JSON orderId và status
|
|
40
40
|
tags: [integration, partner-api, webhook]
|
|
41
|
+
# contract-postman: integrations/postman/partner-export.json # optional Newman — see grill-api-hook extract
|
|
41
42
|
automation: automated
|
|
43
|
+
traceability:
|
|
44
|
+
bundleScreen: API-EXAMPLE-EXPORT-001
|
|
45
|
+
bundleScenarios: []
|
|
46
|
+
acceptanceRefs: []
|
|
47
|
+
actionRefs: []
|
|
42
48
|
dimensions:
|
|
43
49
|
business: [workflow]
|
|
44
50
|
technical: [api]
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
schemaVersion: 2
|
|
2
2
|
id: TC-EXAMPLE-VALID
|
|
3
|
-
title:
|
|
3
|
+
title: Valid create flow
|
|
4
4
|
summary: Ví dụ — luồng hợp lệ đi đến trạng thái thành công.
|
|
5
|
+
description: |
|
|
6
|
+
Member tạo hồ sơ mới với dữ liệu hợp lệ theo ma trận positive_boundary.
|
|
7
|
+
Kỳ vọng: lưu thành công, thông báo rõ, không mất dữ liệu khi lỗi mạng tạm thời.
|
|
5
8
|
story: |
|
|
6
9
|
Given điều kiện đầu vào hợp lệ và người dùng có quyền
|
|
7
10
|
When thực hiện thao tác nhập liệu và nhấn lưu
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Template — Testcase plan (`TC-*.yaml`)
|
|
2
|
+
|
|
3
|
+
**Mục đích:** SSOT **kế hoạch** kiểm thử (hub tests-docs) → `cases:render` → **user case** trên VitePress (port **5174**) → `testcase:gen` → Playwright (e2e-root).
|
|
4
|
+
|
|
5
|
+
**Workflow:** [docs/workflows/test.md](../../../docs/workflows/test.md) · Artifact: [docs/artifacts/tests-docs.md](../../../docs/artifacts/tests-docs.md).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Ai đọc gì
|
|
10
|
+
|
|
11
|
+
| Ai | Đọc | Ghi |
|
|
12
|
+
|----|-----|-----|
|
|
13
|
+
| BA / PO | Docs hub `ir/generated/spec.md` (AC, scenarios) | Không sửa `TC-*.yaml` |
|
|
14
|
+
| QA | Tests hub `TC-*.md` (sau render) + YAML SSOT | `/testcase`, `/scenario` |
|
|
15
|
+
| Dev FE | `TC-*.md` + `ir/design.yaml` (`testIds`) | `/test`, `/grill-test` |
|
|
16
|
+
| Dev BE | `TC` `genType: api-e2e` + docs `01` | `/test-api` |
|
|
17
|
+
|
|
18
|
+
**Không** sửa tay `TC-*.md` — chỉnh YAML → `flowgrid cases:render`.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Path mirror
|
|
23
|
+
|
|
24
|
+
```text
|
|
25
|
+
docs: surfaces/<surface>/CMP-*/<NN…>/<slug>/*.bundle.yaml
|
|
26
|
+
tests: cases/<surface>/CMP-*/<NN…>/<slug>/TC-*.yaml
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Cross-flow: `scenarios/.../FLOW-<name>/SC-*.yaml` mirror `FLOW-*.md` trên docs.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Golden file
|
|
34
|
+
|
|
35
|
+
Copy shape từ `harness/tests/templates/TC.example.yaml` (sau init tests hub: `.flowgrid/` hoặc package harness path).
|
|
36
|
+
|
|
37
|
+
Bắt buộc:
|
|
38
|
+
|
|
39
|
+
- `schemaVersion: 2`
|
|
40
|
+
- `story` / `description` (ngữ cảnh nghiệp vụ)
|
|
41
|
+
- `testMatrix[]` — facet: `positive_boundary`, `negative_length`, `negative_format`, `negative_duplicate`, `concurrency_double_submit`, `network_interruption`
|
|
42
|
+
- `steps[]` — chuỗi bước QA (string hoặc machine step)
|
|
43
|
+
- `traceability` — `bundleScreen`, `bundleScenarios[]`, `acceptanceRefs[]`, `actionRefs[]` (cho `cases:gate --strict`)
|
|
44
|
+
- `testIds.required` — khớp bundle/design sau split
|
|
45
|
+
- `genType: e2e` | `api-e2e`
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Trước khi author
|
|
50
|
+
|
|
51
|
+
1. Đọc **cả** `*.bundle.yaml` trên docs leaf — không chỉ IR.
|
|
52
|
+
2. Bundle thiếu story/AC → STOP → `/update-spec` trên docs hub.
|
|
53
|
+
3. `flowgrid audit testcase <TC> --bundle <bundle>` sau draft.
|
|
54
|
+
|
|
55
|
+
## Gate release
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
flowgrid cases:check
|
|
59
|
+
flowgrid cases:render
|
|
60
|
+
flowgrid cases:gate --strict --docs-root $FLOWGRID_DOCS_ROOT
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Grill — chọn mode
|
|
66
|
+
|
|
67
|
+
| Mode | Extract / workflow |
|
|
68
|
+
|------|-------------------|
|
|
69
|
+
| Một màn `W-*` | `extracts/grill-screen-tc.md` · [test.md#grill-single-screen](../../../docs/workflows/test.md#grill-single-screen) |
|
|
70
|
+
| Flow dài `SC-*` | `extracts/grill-scenario-flow.md` · [test.md#grill-scenario-flow](../../../docs/workflows/test.md#grill-scenario-flow) |
|
|
71
|
+
| API hook | `/test-api` · `extracts/grill-api-hook.md` · Playwright `testcase:gen:api` (+ Newman tùy chọn) |
|
|
72
|
+
|
|
73
|
+
## Excel UAT
|
|
74
|
+
|
|
75
|
+
Excel deliverable **xuất sau** YAML/MD chốt — không SSOT ngược. Xem tests-docs § Excel.
|
package/package.json
CHANGED
package/stacks/fastapi.json
CHANGED
package/stacks/laravel.json
CHANGED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"stack": "nestjs",
|
|
3
|
+
"mode": "brownfield",
|
|
4
|
+
"commands": {
|
|
5
|
+
"genDry": [
|
|
6
|
+
"flowgrid",
|
|
7
|
+
"api-gen:dry",
|
|
8
|
+
"--",
|
|
9
|
+
"--spec",
|
|
10
|
+
"{spec}"
|
|
11
|
+
],
|
|
12
|
+
"gen": [
|
|
13
|
+
"flowgrid",
|
|
14
|
+
"api-gen",
|
|
15
|
+
"--",
|
|
16
|
+
"--spec",
|
|
17
|
+
"{spec}"
|
|
18
|
+
],
|
|
19
|
+
"unitGenDry": [
|
|
20
|
+
"flowgrid",
|
|
21
|
+
"api-unit-gen:dry",
|
|
22
|
+
"--",
|
|
23
|
+
"--spec",
|
|
24
|
+
"{spec}"
|
|
25
|
+
],
|
|
26
|
+
"unitGen": [
|
|
27
|
+
"flowgrid",
|
|
28
|
+
"api-unit-gen",
|
|
29
|
+
"--",
|
|
30
|
+
"--spec",
|
|
31
|
+
"{spec}"
|
|
32
|
+
],
|
|
33
|
+
"registryValidate": [
|
|
34
|
+
"flowgrid",
|
|
35
|
+
"api-registry"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"registries": [
|
|
39
|
+
"registries/be-capabilities.registry.json",
|
|
40
|
+
"registries/nest-codegen.registry.json",
|
|
41
|
+
"registries/nest-unit-test.registry.json"
|
|
42
|
+
],
|
|
43
|
+
"gapSources": [
|
|
44
|
+
"**/generated/HANDOFF.md",
|
|
45
|
+
"**/generated/UNIT-HANDOFF.md",
|
|
46
|
+
"**/generated/codegen.manifest.json"
|
|
47
|
+
],
|
|
48
|
+
"specRoots": [],
|
|
49
|
+
"templates": {
|
|
50
|
+
"root": "adapters/nestjs/nestgen/templates",
|
|
51
|
+
"engine": "handlebars",
|
|
52
|
+
"note": "SSOT in FlowGrid package; product registries at repo root"
|
|
53
|
+
},
|
|
54
|
+
"dsl": {
|
|
55
|
+
"ssot": "product-repo",
|
|
56
|
+
"lanes": {
|
|
57
|
+
"be": {
|
|
58
|
+
"registries": ["registries/nest-codegen.registry.json"],
|
|
59
|
+
"genKeys": ["genDry", "gen"],
|
|
60
|
+
"needsTags": ["#needs-endpoint", "#needs-dto"]
|
|
61
|
+
},
|
|
62
|
+
"unit": {
|
|
63
|
+
"registries": ["registries/nest-unit-test.registry.json"],
|
|
64
|
+
"genKeys": ["unitGenDry", "unitGen"],
|
|
65
|
+
"needsTags": ["#needs-unit-test"]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"vocabularies": {
|
|
70
|
+
"registryTags": "artifactgraph/lexicon/registry-tags.en.txt"
|
|
71
|
+
}
|
|
72
|
+
}
|
package/stacks/nextjs-nest.json
CHANGED
package/stacks/nuxt4-nest.json
CHANGED
|
@@ -15,6 +15,8 @@ status: "draft"
|
|
|
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
|
+
* **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]
|
|
18
20
|
* **Ma trận Vai trò & Quyền hạn (Role & Permission Matrix):**
|
|
19
21
|
| Tác nhân (Actor) | Vai trò trong Quy trình | Quyền hạn trên Màn hình |
|
|
20
22
|
| :--- | :--- | :--- |
|
|
@@ -1,2 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
---
|
|
2
|
+
status: draft
|
|
3
|
+
owner: product-team
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Product overview (arc42 §1 — Introduction & Goals)
|
|
7
|
+
|
|
8
|
+
Tài liệu **sản phẩm** cho toàn docs hub: *vì sao* hệ thống tồn tại, *ai* dùng, *phạm vi* operational area. Chi tiết màn/API → `surfaces/`; kiến trúc kỹ thuật → `architecture/`.
|
|
9
|
+
|
|
10
|
+
## Mục tiêu (Goals)
|
|
11
|
+
|
|
12
|
+
1. **Giá trị nghiệp vụ** — [Một đoạn: bài toán chính product giải quyết.]
|
|
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.]
|
|
15
|
+
|
|
16
|
+
## Stakeholders
|
|
17
|
+
|
|
18
|
+
| Vai trò | Mục đích đọc overview |
|
|
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)
|
|
42
|
+
|
|
43
|
+
**In scope (overview):**
|
|
44
|
+
|
|
45
|
+
- [Operational area / surface được document trong hub này]
|
|
46
|
+
|
|
47
|
+
**Non-goals (product-level):**
|
|
48
|
+
|
|
49
|
+
- [VD: không mô tả hạ tầng chi tiết — xem `architecture/`]
|
|
50
|
+
- [VD: không thay quy trình UAT Excel deliverable — xem tests-docs]
|
|
51
|
+
|
|
52
|
+
## Success metrics (product-level)
|
|
53
|
+
|
|
54
|
+
- [Chỉ số đo được cấp product — VD: thời gian onboard member đọc SSOT, % leaf có audit sạch trước test lane]
|
|
55
|
+
|
|
56
|
+
## Operational areas
|
|
57
|
+
|
|
58
|
+
Mỗi area một file dưới `overview/operational-areas/` — dùng [`_template.md`](./operational-areas/_template.md).
|
|
59
|
+
|
|
60
|
+
| Area | File |
|
|
61
|
+
| --- | --- |
|
|
62
|
+
| [Tên area] | `operational-areas/<slug>.md` |
|
|
63
|
+
|
|
64
|
+
## See also
|
|
65
|
+
|
|
66
|
+
- Surfaces SSOT: `surfaces/`
|
|
67
|
+
- Architecture: `architecture/01-introduction/`
|
|
68
|
+
- Workflow Design: `platform` hoặc `docs/workflows/design.md` (khi publish site)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: OA-TEMPLATE
|
|
3
|
+
title: "Tên operational area"
|
|
4
|
+
status: draft
|
|
5
|
+
surfaces: ["admin-web"]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Operational area: [Tên]
|
|
9
|
+
|
|
10
|
+
**Mục đích:** [Một đoạn — bối cảnh vận hành: ai làm việc gì, trên kênh nào.]
|
|
11
|
+
|
|
12
|
+
## Personas trong area
|
|
13
|
+
|
|
14
|
+
| Persona | Mô tả ngắn | Surface chính |
|
|
15
|
+
| --- | --- | --- |
|
|
16
|
+
| [VD: Nhân viên vận hành] | [Nhu cầu] | `admin-web` |
|
|
17
|
+
|
|
18
|
+
## Phạm vi nghiệp vụ
|
|
19
|
+
|
|
20
|
+
- **In scope:** [Quy trình / module thuộc area]
|
|
21
|
+
- **Out of scope:** [Chuyển sang area khác hoặc phase sau]
|
|
22
|
+
|
|
23
|
+
## Success metrics (area)
|
|
24
|
+
|
|
25
|
+
- [Metric 1 — đo được]
|
|
26
|
+
- [Metric 2]
|
|
27
|
+
|
|
28
|
+
## Liên kết module
|
|
29
|
+
|
|
30
|
+
| CMP | Mô tả |
|
|
31
|
+
| --- | --- |
|
|
32
|
+
| `CMP-XX-…` | [Boundary một dòng] |
|
|
33
|
+
|
|
34
|
+
## Non-goals
|
|
35
|
+
|
|
36
|
+
- [Không document chi tiết deployment — `architecture/07-deployment/`]
|
|
37
|
+
- [Không duplicate FLOW kỹ thuật — `architecture/03-business-process/`]
|
|
@@ -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`.
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# Data model
|
|
2
2
|
|
|
3
|
-
Shared domain notes (MD)
|
|
3
|
+
Shared domain notes (MD) — **bổ trợ** ERD; không thay `common/db-erd.md`.
|
|
4
|
+
|
|
5
|
+
| Artifact | Vai trò |
|
|
6
|
+
|----------|---------|
|
|
7
|
+
| [`../db-erd.md`](../db-erd.md) | **ERD tổng** (Phase 0, skill `/db-erd`) — Mermaid, entity, ownership |
|
|
8
|
+
| File này + topics | Policy prose (`#derived-data`, journey links) |
|
|
9
|
+
| Leaf `*.bundle.yaml` | **Chi tiết màn:** `spec.entities` + `design.sections[].db` → `ir/design.yaml` |
|
|
10
|
+
|
|
11
|
+
Workflow: [architecture-data.md](/docs/workflows/architecture-data.md) (path hub khi publish).
|
|
4
12
|
|
|
5
13
|
## Topics
|
|
6
14
|
|
|
@@ -9,7 +17,7 @@ Shared domain notes (MD). Entity detail for a feature still belongs in that feat
|
|
|
9
17
|
## Journeys vs ER
|
|
10
18
|
|
|
11
19
|
Runtime sequences live under [`architecture/06-runtime/journeys/`](/architecture/06-runtime/) (`FLOW-*`).
|
|
12
|
-
When a journey persists data, **link** the
|
|
20
|
+
When a journey persists data, **link** the entity in **`db-erd.md`** — **do not** paste ER diagrams into every sequence or every bundle.
|
|
13
21
|
|
|
14
22
|
| Journey | Data notes |
|
|
15
23
|
|---------|------------|
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://platform.local/schemas/flowgrid-docs/qa-item.schema.json",
|
|
4
|
+
"title": "FlowGrid QA inbox item",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schema", "id", "status", "target", "updates"],
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"const": "flowgrid-qa-item/v1"
|
|
12
|
+
},
|
|
13
|
+
"id": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"pattern": "^[A-Z0-9][A-Z0-9._-]*_\\d{4}$",
|
|
16
|
+
"description": "Same as filename without .yaml — SHORT_NNNN"
|
|
17
|
+
},
|
|
18
|
+
"screen": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "W-* or bundle page-id for humans and split matching"
|
|
21
|
+
},
|
|
22
|
+
"bundleId": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Legacy QA-<bundleId>-NNNN prefix; optional when screen/target.path enough"
|
|
25
|
+
},
|
|
26
|
+
"status": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"enum": ["open", "closed"]
|
|
29
|
+
},
|
|
30
|
+
"kind": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"enum": ["customer", "choice", "tech-debt", "integration", "coverage"]
|
|
33
|
+
},
|
|
34
|
+
"skill": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "Skill that opened the gap — spec, grill-dev, api-spec, …"
|
|
37
|
+
},
|
|
38
|
+
"tags": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"items": { "type": "string" }
|
|
41
|
+
},
|
|
42
|
+
"target": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"required": ["path", "at"],
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"properties": {
|
|
47
|
+
"path": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"description": "Repo-relative path to bundle or 01-backend-spec.yaml"
|
|
50
|
+
},
|
|
51
|
+
"at": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"description": "YAML pointer — field gets #missing_info <id> until resolve"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"options": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"description": "Optional AskQuestion options captured when opening (audit trail)",
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"required": ["label"],
|
|
63
|
+
"properties": {
|
|
64
|
+
"label": { "type": "string" },
|
|
65
|
+
"recommended": { "type": "boolean" }
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"updates": {
|
|
70
|
+
"type": "array",
|
|
71
|
+
"minItems": 1,
|
|
72
|
+
"items": { "$ref": "#/$defs/update" }
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"$defs": {
|
|
76
|
+
"update": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"required": ["at", "kind", "text"],
|
|
79
|
+
"additionalProperties": false,
|
|
80
|
+
"properties": {
|
|
81
|
+
"at": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"pattern": "^\\d{8} \\d{2}:\\d{2}$",
|
|
84
|
+
"description": "YYYYMMDD HH:mm (team TZ)"
|
|
85
|
+
},
|
|
86
|
+
"by": { "type": "string" },
|
|
87
|
+
"kind": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"enum": ["question", "answer", "review", "note"]
|
|
90
|
+
},
|
|
91
|
+
"text": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"minLength": 1
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Copy to api/<seq>/03-mock.yaml when prototype/wire needs samples (optional).
|
|
2
|
+
version: 1
|
|
3
|
+
feature: feature-slug
|
|
4
|
+
endpoints:
|
|
5
|
+
feature.search:
|
|
6
|
+
samples:
|
|
7
|
+
- status: 200
|
|
8
|
+
description: "List success — replace with realistic payload"
|
|
9
|
+
body:
|
|
10
|
+
data: []
|
|
11
|
+
meta:
|
|
12
|
+
page: 1
|
|
13
|
+
perPage: 20
|
|
14
|
+
total: 0
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
# LEGACY: portal-feature-bundle with nested spec.api — do NOT use for new 01 files.
|
|
2
|
+
# New API contract SSOT: api/<seq>/01-backend-spec.yaml from backend-api.yaml + tpl-api-contract.md
|
|
3
|
+
|
|
1
4
|
schema: portal-feature-bundle/v1
|
|
2
5
|
id: role-domain-function
|
|
3
6
|
title: Feature API
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
# SSOT shape for api/<seq>/01-backend-spec.yaml (NOT the screen bundle).
|
|
2
|
+
# Authoring guide: tpl-api-contract.md · Sample only — copy/adapt per leaf.
|
|
3
|
+
# Portal screen bundle: feature.bundle.yaml — do NOT embed spec.api here.
|
|
4
|
+
|
|
1
5
|
feature:
|
|
2
6
|
id: feature-slug
|
|
3
7
|
title: Feature Title
|