@shanyucoder/flowgrid 0.1.5 → 0.1.8

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.
Files changed (157) hide show
  1. package/README.md +1 -1
  2. package/adapters/laravel/registries/codegen.registry.json +9 -9
  3. package/bin/flowgrid.mjs +326 -115
  4. package/bin/lib/agent-mcp.mjs +4 -0
  5. package/bin/lib/agent-profiles.mjs +30 -6
  6. package/bin/lib/audit-run.mjs +1 -1
  7. package/bin/lib/cli-update.mjs +48 -8
  8. package/bin/lib/doctor.mjs +90 -3
  9. package/bin/lib/harness-overlay.mjs +12 -5
  10. package/bin/lib/harness-sync.mjs +17 -3
  11. package/bin/lib/init-adapters.mjs +75 -0
  12. package/bin/lib/init-scaffold.mjs +9 -0
  13. package/bin/lib/inject-consumer-scripts.mjs +115 -0
  14. package/bin/lib/merge-stack-config.mjs +89 -0
  15. package/bin/lib/project-gitignore.mjs +1 -0
  16. package/bin/lib/repo-maps-align.mjs +203 -0
  17. package/dist/graph/config/load-config.js +7 -2
  18. package/dist/graph/config/load-config.js.map +1 -1
  19. package/dist/graph/mcp/tools.js +1 -1
  20. package/dist/graph/mcp/tools.js.map +1 -1
  21. package/dist/graph/registry/load-registries.d.ts +1 -0
  22. package/dist/graph/registry/load-registries.js +14 -1
  23. package/dist/graph/registry/load-registries.js.map +1 -1
  24. package/engines/cases/render-cases.mjs +67 -5
  25. package/engines/docs/lib/render-api-summary-markdown.mjs +28 -0
  26. package/engines/docs/lib/render-bundle-markdown.mjs +77 -2
  27. package/engines/docs/lib/render-data-model-markdown.mjs +171 -0
  28. package/engines/docs/lib/render-design-tables.mjs +89 -7
  29. package/engines/docs/lib/render-template.mjs +6 -0
  30. package/engines/docs/render-docs.mjs +6 -2
  31. package/engines/docs/vitepress/config.ts +7 -7
  32. package/engines/docs/vitepress/surfaces-nav.mjs +45 -14
  33. package/engines/openapi/check-backend-spec.mjs +2 -2
  34. package/engines/openapi/lib/markdown-table.mjs +8 -0
  35. package/engines/openapi/lib/render-backend-spec-markdown.mjs +78 -0
  36. package/engines/registry-sync/be-capabilities-sync.mjs +118 -0
  37. package/engines/registry-sync/fe-design-sync.mjs +258 -0
  38. package/engines/registry-sync/run-registry-sync.mjs +107 -0
  39. package/engines/shared/e2e-output-layout.mjs +68 -0
  40. package/engines/shared/flowgrid-e2e-root.mjs +19 -0
  41. package/engines/shared/resolve-flowgrid-context.mjs +176 -0
  42. package/engines/spec/lib/audit-api-gaps.mjs +1 -1
  43. package/engines/spec/lib/audit-bundle-gaps.mjs +92 -3
  44. package/engines/spec/lib/audit-db-tables.mjs +529 -0
  45. package/engines/spec/lib/audit-e2e-coverage.mjs +88 -30
  46. package/engines/spec/lib/bundle-schema.mjs +4 -1
  47. package/engines/spec/split-bundle.mjs +11 -1
  48. package/engines/testcase/runners/generate-api.mjs +23 -23
  49. package/engines/testcase/runners/generate.mjs +19 -17
  50. package/engines/testcase/runners/lib/bootstrap-context.mjs +44 -0
  51. package/engines/testcase/runners/lib/write-files.mjs +37 -9
  52. package/harness/agents/antigravity/rules/antigravity-mcp.mdc +12 -0
  53. package/harness/agents/gemini/rules/gemini-mcp.mdc +11 -0
  54. package/harness/agents/gemini_antigravity/rules/antigravity-mcp.mdc +8 -6
  55. package/harness/be/skills/{grill-api → audit-api}/SKILL.md +8 -7
  56. package/harness/common/extracts/artifact-graph.md +2 -2
  57. package/harness/common/extracts/artifactgraph-phase-hooks.md +2 -2
  58. package/harness/common/extracts/docs-mark-detect.md +2 -2
  59. package/harness/common/extracts/entity-relationship.md +23 -0
  60. package/harness/common/rules/flowgrid-ux-common.mdc +3 -3
  61. package/harness/common/skills/configure-repo-maps/SKILL.md +4 -2
  62. package/harness/docs/extracts/agent-execution-protocol.md +1 -1
  63. package/harness/docs/extracts/api-codegen-readiness.md +34 -0
  64. package/harness/docs/extracts/api-codegen-tags.md +30 -0
  65. package/harness/docs/extracts/api-contract.md +43 -0
  66. package/harness/docs/extracts/api-spec-sync.md +35 -0
  67. package/harness/docs/extracts/artifactgraph-hooks-docs.md +1 -1
  68. package/harness/docs/extracts/call-external.md +16 -0
  69. package/harness/docs/extracts/common-scope.md +9 -10
  70. package/harness/docs/extracts/db-audit-wizard.md +45 -0
  71. package/harness/docs/extracts/derived-data.md +18 -0
  72. package/harness/docs/extracts/design-leaf-signoff.md +16 -0
  73. package/harness/docs/extracts/extract-registry.docs.json +9 -1
  74. package/harness/docs/extracts/spec-core.md +7 -3
  75. package/harness/docs/extracts/spec-evolution.md +21 -0
  76. package/harness/docs/extracts/spec-prd-lite.md +19 -0
  77. package/harness/docs/extracts/spec-requirement.md +6 -2
  78. package/harness/docs/extracts/spec-ssot-prep.md +25 -0
  79. package/harness/docs/extracts/tpl-module.md +12 -0
  80. package/harness/docs/extracts/verify-gate.md +33 -0
  81. package/harness/docs/extracts/wire-spec-feedback.md +31 -0
  82. package/harness/docs/rules/agent-compliance.mdc +1 -1
  83. package/harness/docs/rules/team-flow-spec.mdc +3 -4
  84. package/harness/docs/skills/adopt/SKILL.md +2 -0
  85. package/harness/docs/skills/api/SKILL.md +4 -5
  86. package/harness/docs/skills/api-spec/SKILL.md +19 -6
  87. package/harness/docs/skills/api-update/SKILL.md +3 -3
  88. package/harness/docs/skills/architecture/SKILL.md +1 -1
  89. package/harness/docs/skills/business-process/SKILL.md +2 -0
  90. package/harness/docs/skills/common/SKILL.md +2 -2
  91. package/harness/docs/skills/common-spec/SKILL.md +10 -47
  92. package/harness/docs/skills/db-erd/SKILL.md +26 -0
  93. package/harness/docs/skills/grill/SKILL.md +28 -22
  94. package/harness/docs/skills/grill-api/SKILL.md +4 -6
  95. package/harness/docs/skills/grill-api-spec/SKILL.md +44 -24
  96. package/harness/docs/skills/grill-bqa/SKILL.md +28 -13
  97. package/harness/docs/skills/grill-common-spec/SKILL.md +10 -35
  98. package/harness/docs/skills/grill-dev/SKILL.md +7 -6
  99. package/harness/docs/skills/grill-docs/SKILL.md +10 -3
  100. package/harness/docs/skills/module/SKILL.md +3 -1
  101. package/harness/docs/skills/openapi/SKILL.md +2 -1
  102. package/harness/docs/skills/overview/SKILL.md +7 -1
  103. package/harness/docs/skills/spec/SKILL.md +42 -9
  104. package/harness/docs/skills/update-spec/SKILL.md +4 -1
  105. package/harness/fe/extracts/wire-audit-loop.md +72 -0
  106. package/harness/fe/extracts/wire-phase.md +45 -0
  107. package/harness/fe/rules/platform-design-vocabulary.mdc +1 -1
  108. package/harness/fe/rules/team-flow-prototype.mdc +8 -4
  109. package/harness/fe/skills/gen-common/SKILL.md +11 -84
  110. package/harness/fe/skills/grill-prototype/SKILL.md +51 -25
  111. package/harness/fe/skills/grill-test/SKILL.md +78 -20
  112. package/harness/fe/skills/grill-wire/SKILL.md +81 -0
  113. package/harness/fe/skills/prototype/SKILL.md +3 -2
  114. package/harness/fe/skills/wire/SKILL.md +7 -2
  115. package/harness/shared/AGENTS.md +3 -3
  116. package/harness/shared/SSOT_AGENT_PROTOCOL.md +3 -3
  117. package/harness/tests/extracts/grill-api-hook.md +69 -0
  118. package/harness/tests/extracts/grill-scenario-flow.md +39 -0
  119. package/harness/tests/extracts/grill-screen-tc.md +40 -0
  120. package/harness/tests/extracts/testcase-gen-cli.md +57 -0
  121. package/harness/tests/extracts/testcase-plan.md +29 -0
  122. package/harness/tests/extracts/tests-verify-gate.md +29 -0
  123. package/harness/tests/extracts/wire-test-handoff.md +37 -0
  124. package/harness/tests/skills/grill-testcase/SKILL.md +1 -0
  125. package/harness/tests/skills/test-api/SKILL.md +14 -6
  126. package/harness/tests/skills/testcase/SKILL.md +3 -1
  127. package/harness/tests/templates/TC.example-api.yaml +7 -1
  128. package/harness/tests/templates/TC.example.yaml +4 -1
  129. package/harness/tests/templates/tpl-testcase-plan.md +75 -0
  130. package/package.json +1 -1
  131. package/stacks/fastapi.json +1 -0
  132. package/stacks/laravel.json +1 -0
  133. package/stacks/nestjs.json +72 -0
  134. package/stacks/nextjs-nest.json +1 -0
  135. package/stacks/nuxt4-nest.json +1 -0
  136. package/templates/project-skeleton/architecture/03-business-process/FLOW-template.md +2 -0
  137. package/templates/project-skeleton/overview/index.md +68 -2
  138. package/templates/project-skeleton/overview/operational-areas/_template.md +37 -0
  139. package/templates/project-skeleton/surfaces/common/data-model/index.md +10 -2
  140. package/templates/shared/api-03-mock.stub.yaml +14 -0
  141. package/templates/shared/backend-api.bundle.yaml +3 -0
  142. package/templates/shared/backend-api.yaml +4 -0
  143. package/templates/shared/be-capabilities.registry.base.json +8 -0
  144. package/templates/shared/bundle-authoring.md +39 -3
  145. package/templates/shared/default-layout.ejs +131 -18
  146. package/templates/shared/design-spec.yaml +2 -3
  147. package/templates/shared/design.registry.base.json +38 -0
  148. package/templates/shared/feature.bundle.yaml +16 -9
  149. package/templates/shared/ir/generated/spec.md +281 -0
  150. package/templates/shared/qa-item.yaml +1 -1
  151. package/templates/shared/tpl-api-contract.md +133 -0
  152. package/templates/shared/tpl-screen-data-model.md +76 -0
  153. package/templates/tests-skeleton/cases/README.md +4 -0
  154. package/templates/tests-skeleton/catalog/locale.yaml +9 -0
  155. package/templates/tests-skeleton/tpl-testcase-plan.md +9 -0
  156. package/harness/docs/skills/api-integration/SKILL.md +0 -110
  157. package/harness/docs/skills/grill-integration-spec/SKILL.md +0 -51
@@ -1,41 +1,67 @@
1
1
  ---
2
2
  name: grill-prototype
3
- description: /grill-prototype — FE grill gate before /prototype generation.
3
+ description: /grill-prototype — UI checklist grill AFTER /prototype (mock boundary, testIds, copy). gen:dry runs inside /prototype session, not here.
4
4
  disable-model-invocation: true
5
5
  ---
6
6
 
7
- # /grill-prototype
7
+ # /grill-prototype — UI checklist (post-prototype)
8
8
 
9
- **Owner:** bộ code · optional local ArtifactGraph allowlist check before dry-gen.
9
+ **Owner:** bộ code FE · **When:** After `/prototype` session has run `gen:dry` → `gen` and filled HANDOFF slots — **before** demo, `/test`, or `/wire`.
10
+
11
+ **Not this skill:** `flowgrid gen:dry` gate — that runs at the **start** of `/prototype` ([team-flow-prototype.mdc](../rules/team-flow-prototype.mdc)). This skill audits the **built** UI against docs IR.
12
+
13
+ ---
10
14
 
11
15
  ## Target / ID Resolution Rule
12
16
 
13
- - User prompt MAY specify a screen ID, function ID, or slug (e.g. `W-AD-AUTH-001`, `login`).
14
- - **Read the entire `ir/design.yaml`** on the screen leaf (`…/CMP-*/<NN…>/ir/design.yaml`) before dry-gen. Do not skim keys from a feature bundle. Do **not** use `01-backend-spec.yaml` as FE input.
15
- - Docs hub is **read-only**. Dry-gen failure (missing design / `codegen.profile`) → STOP; do not patch docs.
16
- - After dry-gen, HANDOFF `#needs-component` is filled in `/prototype` using the FE shadcn skill when `components.json` exists (primitives via `shadcn add`, `Mo*` composed — see `/prototype`). Surface/module commons must already exist via `/gen-common`.
17
- - Do NOT demand full surface/module filesystem paths from the user if an ID is given.
17
+ - User prompt MAY specify screen ID, function ID, or slug (e.g. `W-AD-AUTH-001`, `login`).
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
+ - Docs hub is **read-only**. Do not patch `*.bundle.yaml` or `ir/*`.
20
+ - Compare route + rendered UI to `ir/design.yaml` (actions, validation copy, states, testIds).
21
+ - Shared UI from **FE base** + `registries/design.registry.json` (`registry:sync`) — not `/gen-common` (deprecated).
22
+ - Do NOT demand full filesystem paths if an ID is given.
23
+
24
+ ---
25
+
26
+ ## Rule: Checklist (mandatory dimensions)
27
+
28
+ Work through in order; fix **only** in FE repo when issue is clear. Otherwise list open issues (Vietnamese) for `/test` or a new `/prototype` session.
29
+
30
+ 1. **Spec parity:** happy path, validation messages (VI), loading / empty / error states.
31
+ 2. **Mock boundary:** no real backend; mocks match `apiRef` / contract shape; pagination ≥2 pages when spec lists.
32
+ 3. **Registry / shell:** DataListPage or profile shell reuse where IR expects; composables (`#composable:`) used for shared list/filter logic when registered.
33
+ 4. **testIds:** `E2E-TESTIDS` / testcase `testIds.required` ⊆ DOM (`data-testid`).
34
+ 5. **Auth bypass:** documented for local prototype (if applicable).
35
+ 6. **Layout / copy:** Vietnamese UI copy; icons/labels vs common UX rules (`flowgrid-ux-common.mdc`).
18
36
 
19
- ```text
20
- if local ArtifactGraph available: check the FE repo's allowlist for genDry
21
- else: npm run codegen:dry -- --id …
22
- ```
37
+ **[STRICTLY FORBIDDEN]** Run Playwright/Vitest bulk suites — audit + spot-check only.
38
+
39
+ **Extracts (when present):** verify-gate, common-ui-spec, portal-test-readiness.
40
+
41
+ ---
23
42
 
24
43
  ## Docs Root Resolution
25
44
 
26
- 1. If `FLOWGRID_DOCS_ROOT` is set (non-empty), use it as the canonical
27
- pointer for locating `ir/design.yaml`.
28
- 2. If `FLOWGRID_DOCS_ROOT` is **not** set, fall back to Platform DNA
29
- configuration (`platform-dna`) to resolve the docs hub path.
30
- Platform DNA discovery is slower and more error-prone, so always prefer
31
- an explicit `FLOWGRID_DOCS_ROOT` when available.
45
+ 1. `FLOWGRID_DOCS_ROOT` (non-empty) → canonical pointer for `ir/design.yaml`.
46
+ 2. Else Platform DNA (`platform-dna`) — slower; prefer explicit env.
47
+
48
+ Architecture IDs → bộ docs; symbols in other repos → `codegraph-<key>` only.
49
+
50
+ Optional: local ArtifactGraph allowlist hint — never blocks checklist. Telemetry: `flowgrid-code-optional-integrations.mdc` once per run.
32
51
 
33
- Canonical IR/registries come from `FLOWGRID_DOCS_ROOT`; ArtifactGraph does
34
- not follow that pointer. Architecture IDs → bộ docs (`FLOWGRID_DOCS_ROOT`); symbols
35
- in other repos → `codegraph-<key>` only.
52
+ Do not execute flowgrid docs scripts (`split`, `render`) from the FE repo.
53
+
54
+ ---
55
+
56
+ ## Handoff
57
+
58
+ - **Pass:** route, spec + testcase paths, testIds status, `#wire-only` list → `/test` or team demo.
59
+ - **Fail / gaps:** open issues (VI) → fix in `/prototype` scope or `/update-spec` on docs hub if SSOT wrong.
60
+
61
+ ---
36
62
 
37
- Missing ArtifactGraph never blocks the grill. Complete the deterministic dry
38
- generation fallback first, then follow
39
- `.cursor/rules/flowgrid-code-optional-integrations.mdc` for once-per-run telemetry.
63
+ ## Verification Checklist
40
64
 
41
- Do not execute flowgrid docs scripts from the FE repo.
65
+ - [ ] `/prototype` already produced scaffold + mock boundary for this `W-*`.
66
+ - [ ] Full `ir/design.yaml` read; checklist dimensions addressed or deferred with reason.
67
+ - [ ] No docs-hub YAML edits; no Playwright/Vitest regression run.
@@ -1,32 +1,90 @@
1
1
  ---
2
2
  name: grill-test
3
- description: /grill-test — FE grill gate before Playwright generation.
3
+ description: /grill-test — E2E traceability audit after /test (TC YAML ↔ PO ↔ Playwright). No bulk regen.
4
4
  disable-model-invocation: true
5
5
  ---
6
6
 
7
- # /grill-test
7
+ > [!CRITICAL] MANDATORY PRE-FLIGHT
8
+ > **[MANDATORY]** Re-read this entire `SKILL.md` via file-read tool. STRICTLY FORBIDDEN to rely on memory.
9
+ > **[MANDATORY]** Run only after `/test` — Playwright specs exist and scoped `test:e2e` is green (or failures are documented with root cause).
8
10
 
9
- **Owner:** bộ test (`--type=fe`)
11
+ # /grill-test — E2E Traceability Audit (FE repo)
10
12
 
11
- After `/test`. Plan YAML remains on the tests hub (`/grill-testcase`).
13
+ **Owner:** bộ test (`--type=fe`). Plan SSOT stays on tests-docs hub — grill plans with `/grill-testcase`, not here.
12
14
 
13
- Route Functions/W-* evidence through bộ docs, plans/docs through
14
- `FLOWGRID_TESTS_DOC` / `FLOWGRID_DOCS_ROOT`, and repo-X symbols through its
15
- Platform DNA-wired `codegraph-<repo-key>` server. Never substitute the current
16
- repo index for another checkout or initialize a workspace-parent graph.
15
+ **Mindset:** Audit only — **no** fixing production code like `/test`, **no** bulk `testcase:gen` regen.
17
16
 
18
- ## Accelerators (optional)
17
+ ---
18
+
19
+ ## Rule: Load Policy
20
+
21
+ | Read | Do not |
22
+ | --- | --- |
23
+ | Matching `TC-*.yaml` on tests-docs hub (`FLOWGRID_TESTS_DOC`) | Invent scenarios missing from TC |
24
+ | Screen `*.bundle.yaml` + `ir/design.yaml` (`testIds`, actions) | Use generated `ir/generated/*.md` as SSOT |
25
+ | Page Objects + `*.spec.ts` under **e2e-root** | Backend / unit tests |
26
+
27
+ ---
28
+
29
+ ## Rule: Audit Interlock (gates)
30
+
31
+ From FE repo cwd (flags: `docs/references/audit-commands.md` on docs hub):
32
+
33
+ 1. **[MANDATORY]** `flowgrid audit e2e --id <TC-id> --tests-docs "$FLOWGRID_TESTS_DOC" --e2e-root <e2eRoot>`
34
+ (or `--screen W-*` / path to `TC-*.yaml` when batching).
35
+ 2. Consume JSON: orphan specs, missing TC rows, `testIds` gaps — **patch list only**, do not rewrite specs inline without member confirm.
36
+
37
+ Re-run `audit e2e` after `/test` fixes before sign-off.
38
+
39
+ ---
40
+
41
+ ## Rule: Traceability Matrix (4-way)
42
+
43
+ Build a gap table for the scoped TC(s):
44
+
45
+ | Column | Source |
46
+ | --- | --- |
47
+ | Requirement / AC | bundle `userStories` / `acceptanceCriteria` |
48
+ | Plan | `TC-*.yaml` `steps[]`, `testMatrix`, `refs` |
49
+ | Automation | PO methods + `*.spec.ts` |
50
+ | UI hooks | `testIds.required` in `ir/design.yaml` ↔ PO ↔ DOM |
51
+
52
+ - **[MANDATORY]** Every `testMatrix` facet claimed in TC must appear in spec or be deferred with `QA-*` on docs hub.
53
+ - **[MANDATORY]** Required `#e2e:*` semantic tags on bundle/TC must be exercised in spec (or flagged gap).
54
+ - **[STRICTLY FORBIDDEN]** Raw `getByTestId` / CSS / xpath in `*.spec.ts` — PO layer only.
55
+
56
+ ---
57
+
58
+ ## Rule: Branching (no scope creep)
59
+
60
+ | Gap type | Handoff |
61
+ | --- | --- |
62
+ | Missing `*.spec.ts`, PO, or `testId` on UI | `/test` |
63
+ | TC plan thin / wrong business logic vs bundle | tests-hub `/grill-testcase` or docs `/update-spec` (paste-ready prompt) |
64
+ | Post-wire real API vs plan (status, matrix facet) | tests-hub `/grill-testcase` · extract `wire-test-handoff.md` |
65
+ | Spec/design missing acceptance | docs `/update-spec` or `/grill-bqa` |
66
+ | Full convergence (e2e + fe-be + scenario) after wire | `/grill-wire` (audit chain; not a substitute for fixing specs here) |
67
+
68
+ - **[STRICTLY FORBIDDEN]** Do not run `/wire`, `/api`, or Vitest from this skill.
69
+
70
+ ---
71
+
72
+ ## Rule: Workload Threshold (Law 2)
73
+
74
+ - **≤5 gaps:** list in chat + optional AskQuestion (≥3 options) for defer vs fix now.
75
+ - **≥10 gaps:** **hard stop** — implementation plan by phase (3–5 items/phase); member runs `/test` per phase.
76
+
77
+ ---
78
+
79
+ ## Verification Checklist
19
80
 
20
- ```text
21
- if local ArtifactGraph available: recommend/check testcase gen (this repo)
22
- else: local deterministic search, then flowgrid testcase:gen:dry …
23
- ```
81
+ - [ ] Scoped `test:e2e` green or documented root cause.
82
+ - [ ] `flowgrid audit e2e` run with `--tests-docs` + `--e2e-root`; gaps addressed or handed off.
83
+ - [ ] Matrix TC ↔ bundle ↔ PO ↔ spec file complete for scope.
84
+ - [ ] `#e2e:*` and `testIds.required` checked.
85
+ - [ ] No bulk regen; no backend changes.
86
+ - [ ] Pass → recommend lifecycle promote (`test` → `wire` per team policy); after real API wire run `/grill-wire` for fe-be/scenario gates.
24
87
 
25
- ArtifactGraph never follows `FLOWGRID_DOCS_ROOT` / `FLOWGRID_TESTS_DOC`; plan
26
- YAML and docs evidence flow only through those bộ test pointers.
88
+ ## Related
27
89
 
28
- Use one stable `runId` per run. When ArtifactGraph is missing, finish the local
29
- fallback before emitting exactly one `flowgrid.missing-optional` event for that
30
- `runId` + `artifactgraph`; retries must not emit again. Conform to
31
- `.cursor/schemas/flowgrid-test/missing-optional-event.schema.json` and include only
32
- actual successful `fileReads` and exact raw `contextBytes`, never estimates.
90
+ - Before: `/test` · Plan grill: `/grill-testcase` · Workflow: `docs/workflows/test.md`
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: grill-wire
3
+ description: /grill-wire — post-wire convergence audits (e2e, fe-be, scenario) and handoff to update-spec / grill-testcase.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ > [!CRITICAL] MANDATORY PRE-FLIGHT
8
+ > **[MANDATORY]** Re-read this entire `SKILL.md` via file-read tool. STRICTLY FORBIDDEN to rely on memory.
9
+ > **[MANDATORY]** Read `.cursor/extracts/wire-audit-loop.md` and hub `docs/workflows/wire.md#wire-gates`.
10
+
11
+ # /grill-wire — Wire Convergence Audit (FE repo)
12
+
13
+ **Owner:** bộ code (`--type=fe`)
14
+
15
+ **Mindset:** Audit and gap routing only — **no** bulk `/wire` implementation, **no** `/test` fixes inline unless member explicitly runs `/test` in same session.
16
+
17
+ Use **after** `/wire` (or when validating wire scope before sign-off): real API connected, production mocks removed, auth restored.
18
+
19
+ ---
20
+
21
+ ## Rule: Load Policy
22
+
23
+ | Read | Do not |
24
+ | --- | --- |
25
+ | `FLOWGRID_DOCS_ROOT` → scoped `*.bundle.yaml`, `ir/design.yaml` | Edit bundle or `01` from FE repo |
26
+ | `FLOWGRID_TESTS_DOC` → `cases/**/TC-*.yaml` for `--screen W-*` | Invent TC steps |
27
+ | Playwright under **e2e-root** | Use `ir/generated/*.md` as SSOT |
28
+
29
+ ---
30
+
31
+ ## Rule: Audit Interlock (mandatory chain)
32
+
33
+ From FE repo (flags: `docs/references/audit-commands.md` on docs hub):
34
+
35
+ 1. **[MANDATORY]** `flowgrid audit e2e --e2e-root <e2eRoot> --tests-docs "$FLOWGRID_TESTS_DOC" --screen <W-*>`
36
+ (or `--id TC-*` / paths to `TC-*.yaml`).
37
+ 2. **[MANDATORY]** When bundle has `apiRef` / portal BE:
38
+ `flowgrid audit fe-be <bundle.yaml> [--backend-spec …/01-backend-spec.yaml]`.
39
+ 3. **[MANDATORY]** When any `SC-*` references this screen:
40
+ `flowgrid audit scenario <SC.yaml> --tests-docs "$FLOWGRID_TESTS_DOC"`.
41
+
42
+ Parse JSON; list every `critical` / `warning` with code and suggested handoff.
43
+
44
+ Re-run full chain after downstream lanes fix gaps.
45
+
46
+ ---
47
+
48
+ ## Rule: Branching (loop back)
49
+
50
+ | Gap type | Handoff |
51
+ | --- | --- |
52
+ | `missingInPlaywright`, PO, `testIds`, post-wire assertion | `/test` → `/grill-test` |
53
+ | Plan vs real API (status, validation, matrix facet) | tests-hub `/grill-testcase` — output paste-ready `/docs-hub` prompt if spec hole |
54
+ | UX/spec/AC wrong vs observed behaviour | docs-hub `/update-spec` (paste-ready prompt per `grill-testcase` rule) |
55
+ | `FEBE_*`, wrong endpoint/field on `01` | docs-hub `/api-update` → BE `/audit-api` → member re-runs `/wire` |
56
+ | `SC_SCREEN_NO_TC` | tests-hub `/testcase` or `/scenario` |
57
+ | Defer only | `qa/open` + team policy |
58
+
59
+ - **[STRICTLY FORBIDDEN]** Close `#update:*` / `#wire-only` here — only `/wire` after spec merge confirms.
60
+ - **[STRICTLY FORBIDDEN]** Run `/api` codegen or full product regression from this skill.
61
+
62
+ ---
63
+
64
+ ## Rule: Workload Threshold (Law 2)
65
+
66
+ - **≤5 gaps:** table in chat + AskQuestion (≥3 options) defer vs fix lane.
67
+ - **≥10 gaps:** hard stop — phased plan (spec batch → test batch → wire re-audit).
68
+
69
+ ---
70
+
71
+ ## Verification Checklist
72
+
73
+ - [ ] Scoped post-wire `test:e2e` green or documented root cause.
74
+ - [ ] `audit e2e` + `audit fe-be` (+ `audit scenario` if SC) run with correct env pointers.
75
+ - [ ] Every gap has owner lane or `QA-*` defer.
76
+ - [ ] No docs-hub writes from FE repo.
77
+ - [ ] Pass → wire sign-off line per `wire.md#wire-signoff`; recommend `/grill-test` if e2e audit was batch-only.
78
+
79
+ ## Related
80
+
81
+ - Implement: `/wire` · Matrix detail: `/grill-test` · Workflow: `docs/workflows/wire.md`
@@ -12,7 +12,8 @@ disable-model-invocation: true
12
12
 
13
13
  - User prompt MAY specify a screen ID, function ID, or slug (e.g. `W-AD-AUTH-001`, `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
- - Prerequisite: `/gen-common` when `surfaces/<surface>/common` (or `CMP-*/common`) exists — generate shared molecules/shells **before** this skill.
15
+ - Shared UI (list shell, chips, delete flow, …) is **already in the FE base** — do not run `/gen-common` (deprecated).
16
+ - `surfaces/…/common/` on the docs hub is **Markdown only** (`processes/FLOW-*.md`, `patterns/`) — read for context; never codegen from `common/yaml`.
16
17
  - Do NOT demand full filesystem paths from the user if an ID is given.
17
18
 
18
19
  ```text
@@ -60,7 +61,7 @@ flowgrid gen --adapter=dotnet-line -- --spec ir/design.yaml
60
61
  flowgrid registry --adapter=dotnet-line
61
62
  ```
62
63
 
63
- You MUST run `/gen-common` for this surface (then `--module=CMP-…` if the module has `common/yaml`) when those trees exist, then run the codegen script (`npm run codegen` or `flowgrid gen`) FIRST to generate the skeleton from **design IR**, before filling gaps **in the FE repo only**.
64
+ Run the codegen script (`npm run codegen` or `flowgrid gen`) FIRST to generate the skeleton from **design IR**, before filling gaps **in the FE repo only**. New domain `Mo*` → compose from base + shadcn; registry gaps → [custom-base](../../../docs/workflows/custom-base.md) (`build-template-code`), not docs-hub common YAML.
64
65
 
65
66
  ## Shadcn/ui skill (FE repo only)
66
67
 
@@ -8,6 +8,8 @@ disable-model-invocation: true
8
8
 
9
9
  **Owner:** bộ code (`--type=fe`)
10
10
 
11
+ > **[MANDATORY]** Read `.cursor/extracts/wire-phase.md`, `.cursor/extracts/wire-audit-loop.md`, and hub `docs/workflows/wire.md` (wire cycle) before wiring.
12
+
11
13
  Use after `/prototype` when tags/handoff mark `#wire-only` or real API integration is required.
12
14
  Keep generation through bộ code adapters; resolve canonical docs evidence
13
15
  through `FLOWGRID_DOCS_ROOT` and do not invent sibling layout.
@@ -55,6 +57,9 @@ Optional: pass explicit `cases/**/TC-*.yaml` paths instead of `--tests-docs`.
55
57
 
56
58
  - Parse JSON: `missingInPlaywright`, `matrixRowsUncovered`, `orphanTestCases`, `orphanSpecs`, `gaps[]`.
57
59
  - **[MANDATORY]** Fix or defer every `critical` / `warning` gap before marking wire done; log deferrals in `qa/open` if team policy allows.
58
- - **[RECOMMENDED]** `flowgrid audit fe-be <bundle.yaml>` when integration exposed contract drift.
60
+ - **[MANDATORY]** Portal leaf with `apiRef`: `flowgrid audit fe-be <bundle.yaml>`.
61
+ - **[MANDATORY]** When `SC-*` covers screen: `flowgrid audit scenario <SC.yaml> --tests-docs "$FLOWGRID_TESTS_DOC"`.
62
+
63
+ Gap routing (spec / plan / code): see `.cursor/extracts/wire-audit-loop.md`. Audit-only pass → `/grill-wire`.
59
64
 
60
- Ref: `docs/references/skills/wire.md` · engine `engines/spec/lib/audit-e2e-coverage.mjs`.
65
+ Ref: `docs/references/skills/wire.md` · `/grill-wire` · engine `engines/spec/lib/audit-e2e-coverage.mjs`.
@@ -119,7 +119,7 @@ The agent has **NO AUTHORITY** to unilaterally decide what constitutes "Common".
119
119
 
120
120
  The agent acts strictly as a clerk, permitted to register or update DSL/Common in only **3** passive cases:
121
121
 
122
- 1. User explicitly invokes `/common` or `/common-spec`.
122
+ 1. User explicitly invokes `/common` (Markdown patterns only — not `/common-spec`, deprecated).
123
123
  2. User explicitly invokes `/docs-mark` to record rules or tags.
124
124
  3. User explicitly confirms a `/grill` proposal.
125
125
 
@@ -147,7 +147,7 @@ In standard `/spec` runs, the sole duty is to **consume existing common definiti
147
147
  - **Remember:** Only use `artifactgraph_remember` AFTER member confirms options during Grill.
148
148
  - **Handoff:** Use `artifactgraph_allowlist_check` + `artifactgraph_recommend_command` to retrieve permitted commands; hand off to corresponding kit/script. Never run `artifactgraph_gen`.
149
149
  - **Cloud Prompt:** Send `cloudPromptSlice` only for unresolved work items.
150
- - **Setup:** If indices are missing, direct member to run `artifactgraph init` with the appropriate `--type=`.
150
+ - **Setup:** If indices are missing, direct member to run `flowgrid init` with the appropriate project type.
151
151
 
152
152
  ---
153
153
 
@@ -158,7 +158,7 @@ In standard `/spec` runs, the sole duty is to **consume existing common definiti
158
158
  → For every persistent result: {{FLOWGRID_WRITE_TOOL}} IMMEDIATELY (No RAM)
159
159
  → Data source: User | ArtifactGraph only; tag gaps with #missing_info
160
160
  → Grill: 4-step protocol + STOP for Confirmation before writing SSOT
161
- → Common/DSL: only via /common|/common-spec|/docs-mark|Confirm
161
+ → Common/DSL: only via /common|/docs-mark|Confirm|custom-base (no common/yaml)
162
162
  ```
163
163
 
164
164
  ## Isolation & Fake Reports Policy
@@ -121,7 +121,7 @@ The agent has **NO AUTHORITY** to unilaterally decide what constitutes "Common".
121
121
 
122
122
  The agent acts strictly as a clerk, permitted to register or update DSL/Common in only **3** passive cases:
123
123
 
124
- 1. User explicitly invokes `/common` or `/common-spec`.
124
+ 1. User explicitly invokes `/common` (Markdown patterns — `/common-spec` deprecated).
125
125
  2. User explicitly invokes `/docs-mark` to record rules or tags.
126
126
  3. User explicitly confirms a `/grill` proposal.
127
127
 
@@ -149,7 +149,7 @@ In standard `/spec` runs, the sole duty is to **consume existing common definiti
149
149
  - **Remember:** Only use `artifactgraph_remember` AFTER member confirms options during Grill.
150
150
  - **Handoff:** Use `artifactgraph_allowlist_check` + `artifactgraph_recommend_command` to retrieve permitted commands; hand off to corresponding kit/script. Never run `artifactgraph_gen`.
151
151
  - **Cloud Prompt:** Send `cloudPromptSlice` only for unresolved work items.
152
- - **Setup:** If indices are missing, direct member to run `artifactgraph init` with the appropriate `--type=`.
152
+ - **Setup:** If indices are missing, direct member to run `flowgrid init` with the appropriate project type.
153
153
 
154
154
  ---
155
155
 
@@ -161,7 +161,7 @@ In standard `/spec` runs, the sole duty is to **consume existing common definiti
161
161
  3) Write immediately upon producing durable results (No RAM) → Law 4
162
162
  4) Sourced exclusively from User | ArtifactGraph; tag gaps → Law 5
163
163
  5) Grill: 4-step protocol + STOP for Confirmation → Law 6
164
- 6) Common/DSL: only via /common|/common-spec|/docs-mark|Confirm → Law 7
164
+ 6) Common/DSL: only via /common|/docs-mark|Confirm|custom-base — no common/yaml → Law 7
165
165
  ```
166
166
 
167
167
  Host overlay Antigravity: see `AGENTS.md` (synchronized Laws 1–8).
@@ -0,0 +1,69 @@
1
+ # Grill — API hook (`genType: api-e2e`)
2
+
3
+ Hub SSOT: `docs/workflows/test.md#grill-api-hook` · artifact: `docs/artifacts/tests-docs.md#api-hook-tc`.
4
+
5
+ ## Prerequisites (docs hub)
6
+
7
+ - `api/<seq>/01-backend-spec.yaml` — `/api-spec`, `/grill-api-spec`, `approval` per policy
8
+ - Partner/webhook: `feature.source.base: none` — **no** portal bundle as contract SSOT
9
+ - Portal + hook: separate docs leaves — UI `W-*` + API `API-*`
10
+
11
+ ## Plan (tests-docs) — `/test-api`
12
+
13
+ - `schemaVersion: 2`, `genType: api-e2e`, `refs.screen: API-*`
14
+ - `api.baseUrlEnv` + `api.baseURL` fallback
15
+ - `apiSteps[]`: method, path, expectStatus, body/headers, expectJson
16
+ - Human `steps[]` + `testMatrix` (auth 401/403, 404, 422, 409 as applicable)
17
+ - Template: `TC.example-api.yaml`
18
+ - Mirror path aligned with API leaf on docs surface
19
+
20
+ ## Grill plan (same hub rules)
21
+
22
+ ```text
23
+ flowgrid audit testcase <TC-api.yaml> --bundle <bundle.yaml> # when portal-linked
24
+ flowgrid cases:check
25
+ /grill-testcase # include api-e2e TC in gate batch
26
+ cases:gate --strict --docs-root $FLOWGRID_DOCS_ROOT
27
+ cases:render
28
+ ```
29
+
30
+ Contract drift → docs `/api-update` — not patch `01` from tests hub.
31
+
32
+ ## Playwright `request` (FlowGrid gen)
33
+
34
+ ```text
35
+ flowgrid testcase:gen:api --testcase cases/…/TC-….yaml
36
+ # output: <e2eRoot>/tests/api-e2e/<module>/<TC-id>.api.spec.ts
37
+ ```
38
+
39
+ Env: `FLOWGRID_API_TEST_BASE_URL` or custom `api.baseUrlEnv`. Secrets via CI env only.
40
+
41
+ Run: Playwright project including `tests/api-e2e/**` (FE or BE repo per `e2eRoot`).
42
+
43
+ **After gen:** fix HMAC/signing in spec or TC headers — no committed secrets.
44
+
45
+ ## Newman / Postman (optional, outside gen)
46
+
47
+ Use when partner delivers collection, complex pre-request scripts, or contract sign-off via Postman.
48
+
49
+ | Item | Practice |
50
+ |------|----------|
51
+ | Location | `integrations/postman/` or team folder — **not** SSOT replacing `TC-*.yaml` |
52
+ | TC link | Tag `contract-postman` on YAML; note collection path in `description` |
53
+ | CI | `newman run collection.json -e env.json` — separate job from Playwright |
54
+ | SSOT | Still author `api-e2e` TC for gate/trace; Newman = execution mirror or partner replay |
55
+
56
+ Do **not** expect `testcase:gen:api` to emit Newman today.
57
+
58
+ ## Hybrid SC (UI + hook)
59
+
60
+ Two TC files, same `refs.scenario`:
61
+
62
+ 1. `genType: e2e` — creates data in UI (store `orderId` in env/fixture)
63
+ 2. `genType: api-e2e` — partner GET export with `${orderId}` in path
64
+
65
+ Grill: `audit scenario` + both TC types in gate.
66
+
67
+ ## BE unit/integration
68
+
69
+ Webhook signature, idempotency, DLQ → BE repo tests (pytest/Jest) — **supplement** not replace tests-docs plan.
@@ -0,0 +1,39 @@
1
+ # Grill — scenario flow dài (`SC-*` + nhiều màn)
2
+
3
+ Hub SSOT: `docs/workflows/test.md#grill-scenario-flow`.
4
+
5
+ ## Scope
6
+
7
+ - Docs **`FLOW-*.md`** exists (Phase 0 / business-process) — **no SC without FLOW**
8
+ - Tests: `scenarios/<mirror>/FLOW-<name>/SC-*.yaml` with `screens: [W-*, W-*, …]`
9
+ - **Per screen touched:** at least one `cases/…/TC-*.yaml` OR documented defer (`coverage_deferred` + `QA-*` on docs)
10
+
11
+ ## Author
12
+
13
+ 1. `/scenario` — rich `description`/`story`, all `screens[]` listed
14
+ 2. For **each** `W-*` in journey: `/testcase` under that leaf mirror path (`refs.scenario: SC-*`)
15
+ 3. Long flow ≠ one giant TC file — **one TC per screen** (or per major step) linked by same `refs.scenario`
16
+
17
+ ## Grill sequence
18
+
19
+ 1. `flowgrid audit scenario scenarios/…/SC-*.yaml --tests-docs $FLOWGRID_TESTS_DOC`
20
+ 2. Fix `SC_SCREEN_NO_TC` — add `TC-*.yaml` per screen OR defer with `QA-*` (docs hub)
21
+ 3. Per TC: `audit testcase --bundle` for that screen's bundle
22
+ 4. `/grill-testcase` scoped to **all TC under scenario** + `cases:gate --strict`
23
+ 5. `cases:render` — walkthrough SC folder + each `TC-*.md`
24
+
25
+ ## Cross-flow automation
26
+
27
+ | Pattern | Plan | Gen / run |
28
+ |---------|------|-----------|
29
+ | Sequential UI | Multiple `TC` same `SC`, `genType: e2e` | Separate specs; CI `dependsOn` or ordered job |
30
+ | UI then API hook | `TC` e2e + `TC` api-e2e same `SC` | `testcase:gen` + `testcase:gen:api`; pass `orderId` via env between jobs |
31
+ | API-only journey | `TC` api-e2e only | `testcase:gen:api` |
32
+
33
+ ## Sign-off
34
+
35
+ - [ ] `audit scenario` no unresolved `SC_SCREEN_NO_TC` (or accepted QA)
36
+ - [ ] Each screen's TC passed `cases:gate --strict` traceability
37
+ - [ ] SC `screens[]` matches docs FLOW touchpoints (spot vs `FLOW-*.md`)
38
+
39
+ Handoff thin FLOW → `/docs-hub /business-process` or `/update-spec` — not tests hub.
@@ -0,0 +1,40 @@
1
+ # Grill — một màn chức năng (`W-*`)
2
+
3
+ Hub SSOT: `docs/workflows/test.md#grill-single-screen`.
4
+
5
+ ## Scope
6
+
7
+ - **One** function leaf on docs: `surfaces/…/<slug>.bundle.yaml`
8
+ - **One** mirror folder: `cases/…/<slug>/TC-*.yaml` (`genType: e2e`)
9
+ - Optional: multiple `TC-*.yaml` per screen (smoke + regression) — **union** `testMatrix` facets per screen at gate
10
+
11
+ ## Grill sequence (tests-docs)
12
+
13
+ 1. Read **entire** `*.bundle.yaml` (not split IR).
14
+ 2. `/testcase` or patch existing `TC-*.yaml` — `traceability`, `testMatrix`, `testIds.required`.
15
+ 3. `flowgrid cases:check`
16
+ 4. `flowgrid audit testcase cases/…/TC-*.yaml --bundle surfaces/…/*.bundle.yaml`
17
+ 5. `flowgrid cases:render` — QA reads `TC-*.md` on VitePress **5174**
18
+ 6. `/grill-testcase` — consume `cases:gate --strict --docs-root $FLOWGRID_DOCS_ROOT`
19
+
20
+ ## Sign-off checklist (plan)
21
+
22
+ - [ ] Every `userStories.scenarios` slug in `traceability.bundleScenarios[]` (strict)
23
+ - [ ] Every material `AC-*` in `traceability.acceptanceRefs[]`
24
+ - [ ] Actions with outcomes in `traceability.actionRefs[]`
25
+ - [ ] Facet union on screen: boundary, negative, duplicate 409, double-submit, offline (per policy)
26
+ - [ ] `testIds.required` ⊆ bundle/design `ui.testIds` after split
27
+ - [ ] Gap business → paste `/docs-hub /update-spec` — do not invent AC on tests hub
28
+
29
+ ## Automation (e2e-root, after gate)
30
+
31
+ ```text
32
+ testcase:gen --id TC-* (or --testcase)
33
+ /test → scoped test:e2e green
34
+ /grill-test → audit e2e --tests-docs --e2e-root
35
+ /grill-wire → audit e2e + fe-be (+ scenario) on FE after wire
36
+ ```
37
+
38
+ Wire loop back to plan: `wire-test-handoff.md`.
39
+
40
+ **Forbidden:** `/grill-test` before plan gate; edit `TC-*.md` by hand.
@@ -0,0 +1,57 @@
1
+ # testcase:gen / cases:* — CLI (agent)
2
+
3
+ Run from **code repo** (e2e-root) unless noted. Tests plan lives on `FLOWGRID_TESTS_DOC`.
4
+
5
+ ## Hub-only (tests-docs cwd or any cwd)
6
+
7
+ | Command | Purpose |
8
+ |---------|---------|
9
+ | `flowgrid cases:check` | JSON Schema v2 on `cases/**/TC-*.yaml` |
10
+ | `flowgrid cases:render` | YAML → `TC-*.md` (QA user case) |
11
+ | `flowgrid cases:coverage` | Spec ↔ plan coverage report |
12
+ | `flowgrid cases:gate [--strict] [--docs-root …]` | Release gate + bundle trace |
13
+ | `flowgrid tests:publish` | Catalog publish (when enabled) |
14
+
15
+ ## UI E2E codegen (`genType: e2e`)
16
+
17
+ | Command | Notes |
18
+ |---------|--------|
19
+ | `flowgrid testcase:gen --id <W-*\|TC-*\|CMP-*\|SC-*\|smoke>` | Resolve hub index |
20
+ | `flowgrid testcase:gen --testcase cases/…/TC-*.yaml` | Explicit path on hub |
21
+ | `flowgrid testcase:gen --feature <W-*>` | All TC under screen folder |
22
+ | `flowgrid testcase:gen --all` | Every `e2e` TC on hub |
23
+ | `flowgrid testcase:gen:dry` | Adds `--dry-run` |
24
+ | Flags: `--force`, `--tests-docs <path>`, `--dry-run` | |
25
+
26
+ **Output (typical FE):** `<e2eRoot>/tests/e2e/...` — Page Object + `*.spec.ts`.
27
+
28
+ **Before gen:** `cases:gate --strict` (team policy) · `portal:gen` testIds on UI.
29
+
30
+ ## API hook codegen (`genType: api-e2e`)
31
+
32
+ | Command | Notes |
33
+ |---------|--------|
34
+ | `flowgrid testcase:gen:api --testcase cases/…/TC-*.yaml` | Requires `apiSteps[]` |
35
+ | `flowgrid testcase:gen:api --id TC-*` | |
36
+ | `flowgrid testcase:gen:api --all` | All `api-e2e` on hub |
37
+ | `flowgrid testcase:gen:api:dry` | Dry-run |
38
+
39
+ **Output:** `<e2eRoot>/tests/api-e2e/<module>/<TC-id>.api.spec.ts`
40
+
41
+ **Env:** `FLOWGRID_API_TEST_BASE_URL` or `api.baseUrlEnv` on TC.
42
+
43
+ ## Audit (cross-repo)
44
+
45
+ ```text
46
+ flowgrid audit testcase <TC.yaml> --bundle <docs/*.bundle.yaml>
47
+ flowgrid audit scenario <SC.yaml> --tests-docs $FLOWGRID_TESTS_DOC
48
+ flowgrid audit e2e --id TC-* --tests-docs … --e2e-root …
49
+ ```
50
+
51
+ ## Common mistakes
52
+
53
+ - `testcase:gen` on `api-e2e` TC → use `testcase:gen:api`
54
+ - SSOT path `testcases/*.yaml` next to code → wrong; hub is `cases/**`
55
+ - Gen before `cases:render` → QA reviews stale MD
56
+
57
+ Hub scripts after init often: `pnpm cases:render`, `pnpm testcase:gen` (aliases vary).
@@ -0,0 +1,29 @@
1
+ # Testcase plan — agent digest
2
+
3
+ Full guide: `harness/tests/templates/tpl-testcase-plan.md` · Hub SSOT: `docs/artifacts/tests-docs.md`.
4
+
5
+ ## Write / read
6
+
7
+ | Ghi | Đọc team |
8
+ |-----|----------|
9
+ | `cases/**/TC-*.yaml` | `flowgrid cases:render` → `TC-*.md` (VitePress **5174**) |
10
+ | Bundle on docs | `FLOWGRID_DOCS_ROOT` — **read entire** `*.bundle.yaml` for `/testcase` |
11
+
12
+ ## Required on TC (v2)
13
+
14
+ `schemaVersion: 2` · `testMatrix` facets · `steps` · `traceability` · `testIds.required` · `genType: e2e|api-e2e`
15
+
16
+ ## Gates
17
+
18
+ ```text
19
+ flowgrid cases:check
20
+ flowgrid audit testcase <TC> --bundle <bundle>
21
+ flowgrid cases:gate --strict --docs-root $FLOWGRID_DOCS_ROOT
22
+ flowgrid cases:render
23
+ ```
24
+
25
+ ## Forbidden
26
+
27
+ - Edit `TC-*.md` by hand
28
+ - Author TC when bundle stories/AC empty (handoff `/update-spec`)
29
+ - `cases/` path not mirroring `surfaces/…`
@@ -0,0 +1,29 @@
1
+ # Tests hub — verify gates
2
+
3
+ ## Plan release (`cases:gate --strict`)
4
+
5
+ Requires `FLOWGRID_DOCS_ROOT` + `FLOWGRID_TESTS_DOC`.
6
+
7
+ ```text
8
+ flowgrid cases:check
9
+ flowgrid cases:gate --strict --docs-root $FLOWGRID_DOCS_ROOT
10
+ ```
11
+
12
+ Checks: schema v2, audit testcase, bundle `traceability`, per-screen `testMatrix` facet union, optional scenario coverage.
13
+
14
+ ## Per-file spot
15
+
16
+ ```text
17
+ flowgrid audit testcase cases/.../TC-*.yaml --bundle surfaces/.../*.bundle.yaml
18
+ flowgrid audit scenario scenarios/.../SC-*.yaml --tests-docs $FLOWGRID_TESTS_DOC
19
+ ```
20
+
21
+ ## After YAML change
22
+
23
+ Always `flowgrid cases:render` before QA review on site.
24
+
25
+ ## E2E (e2e-root, separate)
26
+
27
+ `testcase:gen` → `/test` green → `/grill-test` → `flowgrid audit e2e` (policy).
28
+
29
+ Workflow: `docs/workflows/test.md` · close leaf: `docs/workflows/gates.md` step 3–4, 7–8.