@shanyucoder/flowgrid 0.1.12 → 0.1.13

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 (65) hide show
  1. package/engines/spec/lib/audit-interaction-cases.mjs +2 -1
  2. package/harness/be/adapters/dotnet-integration/skills/framework-rules-be/SKILL.md +2 -2
  3. package/harness/be/adapters/fastapi/skills/framework-rules-be/SKILL.md +3 -3
  4. package/harness/be/adapters/laravel/skills/framework-rules-be/SKILL.md +3 -3
  5. package/harness/be/skills/api/SKILL.md +4 -4
  6. package/harness/be/skills/api-unit/SKILL.md +4 -4
  7. package/harness/be/skills/audit-api/SKILL.md +3 -3
  8. package/harness/be/skills/grill-api-unit/SKILL.md +2 -2
  9. package/harness/common/rules/artifactgraph.mdc +2 -2
  10. package/harness/common/rules/cross-repo-index.mdc +2 -2
  11. package/harness/common/rules/platform-code-size.mdc +5 -5
  12. package/harness/common/rules/team-flow-harness-state.mdc +4 -4
  13. package/harness/common/skills/business-impact-review/SKILL.md +1 -1
  14. package/harness/common/skills/configure-repo-maps/SKILL.md +1 -1
  15. package/harness/common/skills/docs-mark/SKILL.md +4 -4
  16. package/harness/docs/extracts/agent-design-context.md +17 -5
  17. package/harness/docs/extracts/extract-registry.docs.json +5 -2
  18. package/harness/docs/extracts/ir-read-only.md +42 -0
  19. package/harness/docs/rules/agent-compliance.mdc +5 -1
  20. package/harness/docs/rules/docs-hub.mdc +6 -6
  21. package/harness/docs/rules/flowgrid-process.mdc +5 -5
  22. package/harness/docs/rules/team-flow-grill.mdc +1 -1
  23. package/harness/docs/rules/team-flow-spec.mdc +5 -5
  24. package/harness/docs/skills/adopt/SKILL.md +1 -1
  25. package/harness/docs/skills/api/SKILL.md +2 -2
  26. package/harness/docs/skills/build-templates/SKILL.md +1 -1
  27. package/harness/docs/skills/call-external/SKILL.md +1 -1
  28. package/harness/docs/skills/cross-entity-service/SKILL.md +1 -1
  29. package/harness/docs/skills/db-erd/SKILL.md +2 -2
  30. package/harness/docs/skills/grill/SKILL.md +1 -1
  31. package/harness/docs/skills/grill-api-spec/SKILL.md +3 -3
  32. package/harness/docs/skills/grill-bqa/SKILL.md +2 -2
  33. package/harness/docs/skills/grill-dev/SKILL.md +9 -4
  34. package/harness/docs/skills/grill-docs/SKILL.md +2 -2
  35. package/harness/docs/skills/grill-hub-prd/SKILL.md +1 -1
  36. package/harness/docs/skills/openapi/SKILL.md +3 -3
  37. package/harness/docs/skills/risk-register/SKILL.md +8 -8
  38. package/harness/docs/skills/spec/SKILL.md +13 -8
  39. package/harness/docs/skills/update-spec/SKILL.md +17 -7
  40. package/harness/fe/adapters/dotnet-line/skills/framework-rules/SKILL.md +2 -2
  41. package/harness/fe/adapters/nextjs/skills/framework-rules/SKILL.md +2 -2
  42. package/harness/fe/adapters/nuxt4/skills/framework-rules/SKILL.md +2 -2
  43. package/harness/fe/rules/cross-repo-index-routing.mdc +1 -1
  44. package/harness/fe/rules/flowgrid-test-optional-accelerators.mdc +3 -3
  45. package/harness/fe/rules/team-flow-prototype.mdc +13 -13
  46. package/harness/fe/rules/team-flow-unit.mdc +6 -6
  47. package/harness/fe/skills/grill-prototype/SKILL.md +2 -2
  48. package/harness/fe/skills/grill-test/SKILL.md +1 -1
  49. package/harness/fe/skills/grill-unit/SKILL.md +2 -2
  50. package/harness/fe/skills/grill-wire/SKILL.md +1 -1
  51. package/harness/fe/skills/model/SKILL.md +4 -4
  52. package/harness/fe/skills/prototype/SKILL.md +1 -1
  53. package/harness/fe/skills/test/SKILL.md +3 -3
  54. package/harness/fe/skills/unit/SKILL.md +4 -4
  55. package/harness/fe/skills/wire/SKILL.md +5 -5
  56. package/harness/shared/rules/flowgrid-code-optional-integrations.mdc +7 -7
  57. package/harness/tests/rules/cross-repo-index-routing.mdc +1 -1
  58. package/harness/tests/rules/flowgrid-test-optional-accelerators.mdc +3 -3
  59. package/harness/tests/rules/plans-docs-first.mdc +5 -5
  60. package/harness/tests/skills/grill-testcase/SKILL.md +4 -4
  61. package/harness/tests/skills/scenario/SKILL.md +3 -3
  62. package/harness/tests/skills/testcase/SKILL.md +2 -2
  63. package/package.json +1 -1
  64. package/templates/shared/bundle-authoring.md +11 -5
  65. package/templates/shared/tpl-runtime-sequence.md +0 -56
@@ -1,15 +1,15 @@
1
1
  ---
2
- description: bộ code-owned fallback and telemetry for optional integrations
2
+ description: code repo-owned fallback and telemetry for optional integrations
3
3
  alwaysApply: true
4
4
  ---
5
5
 
6
- # bộ code optional integrations
6
+ # code repo optional integrations
7
7
 
8
8
  ArtifactGraph and CodeGraph are optional accelerators. Their absence or
9
- unavailability must never abort a bộ code-owned generation, dry-run,
9
+ unavailability must never abort a code repo-owned generation, dry-run,
10
10
  validation, or review.
11
11
 
12
- Full cross-repo routing (architecture → bộ docs, IR → pointer roots, symbols →
12
+ Full cross-repo routing (architecture → docs hub, IR → pointer roots, symbols →
13
13
  per-repo `codegraph-<key>`) lives in `cross-repo-index-routing.mdc`.
14
14
 
15
15
  ## Docs registry hub
@@ -20,11 +20,11 @@ per-repo `codegraph-<key>`) lives in `cross-repo-index-routing.mdc`.
20
20
  - ArtifactGraph in an FE/BE repo indexes that repo only; it does **not** follow
21
21
  `FLOWGRID_DOCS_ROOT` and must not be used as the bridge to docs.
22
22
  - Use ArtifactGraph only for local allowlist/tag hints. Missing local
23
- ArtifactGraph never changes where bộ code reads canonical docs input.
24
- - bộ docs, when installed as a consumer, uses its separate `FLOWGRID_DOCS_ROOT`
23
+ ArtifactGraph never changes where code repo reads canonical docs input.
24
+ - docs hub, when installed as a consumer, uses its separate `FLOWGRID_DOCS_ROOT`
25
25
  pointer for architecture ID/path queries — never CodeGraph for C4.
26
26
  - CodeGraph, when used, must be the Platform DNA-wired `codegraph-<repo-key>`
27
- for that checkout. bộ code never writes those MCP entries itself. Missing
27
+ for that checkout. code repo never writes those MCP entries itself. Missing
28
28
  or unindexed checkouts fall back and emit telemetry; never invent a graph or
29
29
  `codegraph init` a workspace parent.
30
30
 
@@ -5,7 +5,7 @@ alwaysApply: true
5
5
 
6
6
  # Cross-repo index routing
7
7
 
8
- - Architecture IDs and Functions/W-* paths belong to bộ docs through `FLOWGRID_DOCS_ROOT`.
8
+ - Architecture IDs and Functions/W-* paths belong to docs hub through `FLOWGRID_DOCS_ROOT`.
9
9
  Never use CodeGraph as the architecture index.
10
10
  - Test plans use `FLOWGRID_TESTS_DOC`; docs evidence uses
11
11
  `FLOWGRID_DOCS_ROOT`; IR/registry/generation follows its owning pointer such as
@@ -1,9 +1,9 @@
1
1
  ---
2
- description: bộ test optional accelerator fallback and event contract
2
+ description: tests hub optional accelerator fallback and event contract
3
3
  alwaysApply: true
4
4
  ---
5
5
 
6
- # bộ test optional accelerators
6
+ # tests hub optional accelerators
7
7
 
8
8
  ArtifactGraph accelerates coverage and search but is never required. When it is
9
9
  missing or fails, continue with deterministic local coverage/search. Assign one
@@ -13,7 +13,7 @@ stable `runId` per run and emit exactly one `flowgrid.missing-optional` event pe
13
13
  ArtifactGraph is local-only: in this repo it indexes this repo's own data
14
14
  (taxonomy/coverage hints) and never follows `FLOWGRID_DOCS_ROOT` or
15
15
  `FLOWGRID_TESTS_DOC`. Canonical docs/tests-hub evidence always flows through
16
- those bộ test pointers, never through ArtifactGraph.
16
+ those tests hub pointers, never through ArtifactGraph.
17
17
 
18
18
  Events must conform to
19
19
  `.cursor/schemas/flowgrid-test/missing-optional-event.schema.json`. Metrics count only
@@ -6,8 +6,8 @@ alwaysApply: false
6
6
 
7
7
  # Plans — docs-first
8
8
 
9
- - **Rule / acceptance SSOT = docs hub.** Tests hub chỉ `refs.rule` (id + link). Không copy nội dung rule vào YAML để “sửa cho tiện”.
10
- - Grill thấy **scope hở / rule mơ hồ** → handoff docs (`/update-spec`, grill-docs). **Không** vá bằng testcase.
11
- - Chỉ thêm/sửa `TC-*` khi docs đã rõ và thiếu **bao phủ** (`coverage`).
12
- - YAML = máy (gen Playwright). MD = member đọc đối chiếu docs.
13
- - Chi tiết: `landscape/NOTE-testing-architecture.md`.
9
+ - **Rule / acceptance SSOT = docs hub.** Tests hub only `refs.rule` (id + link). Do not copy rule content into YAML for convenience edits.
10
+ - When grill finds **open scope / vague rules** → hand off to docs (`/update-spec`, grill-docs). Do **not** patch via testcase.
11
+ - Add or edit `TC-*` only when docs are clear and **coverage** is missing.
12
+ - YAML = machine (Playwright gen). MD = member reads against docs.
13
+ - Details: `landscape/NOTE-testing-architecture.md`.
@@ -10,11 +10,11 @@ disable-model-invocation: true
10
10
 
11
11
  # /grill-testcase
12
12
 
13
- **Owner:** bộ test (`--type=tests`)
13
+ **Owner:** tests hub (`--type=tests`)
14
14
 
15
- Audit plans only. Spec holes hand off to docs-hub `/update-spec` or `/grill-bqa` (bộ docs), never invent acceptance. **[MANDATORY]** When handing off, you MUST output a comprehensive gap report in the Chat Thread formatted as a complete, ready-to-use prompt starting with `/docs-hub` (e.g., `/docs-hub /update-spec [details...]`). This prompt must detail exactly what business rules or coverage are missing, enabling the user to copy-paste it directly to run the docs-hub skill.
15
+ Audit plans only. Spec holes hand off to docs-hub `/update-spec` or `/grill-bqa` (docs hub), never invent acceptance. **[MANDATORY]** When handing off, you MUST output a comprehensive gap report in the Chat Thread formatted as a complete, ready-to-use prompt starting with `/docs-hub` (e.g., `/docs-hub /update-spec [details...]`). This prompt must detail exactly what business rules or coverage are missing, enabling the user to copy-paste it directly to run the docs-hub skill.
16
16
 
17
- Route Functions/W-* evidence through bộ docs and symbol/call-graph evidence
17
+ Route Functions/W-* evidence through docs hub and symbol/call-graph evidence
18
18
  for repo X through its Platform DNA-wired `codegraph-<repo-key>` server. Use
19
19
  `FLOWGRID_DOCS_ROOT` / `FLOWGRID_TESTS_DOC` for pointer evidence; never build or
20
20
  query a workspace-parent graph.
@@ -47,7 +47,7 @@ else: local deterministic coverage/search over targeted plan/docs evidence
47
47
  ```
48
48
 
49
49
  ArtifactGraph indexes this tests hub only; spec-hole handoffs go to docs-hub
50
- `/update-spec` (bộ docs), not through ArtifactGraph.
50
+ `/update-spec` (docs hub), not through ArtifactGraph.
51
51
 
52
52
  Use one stable `runId` per run. When ArtifactGraph is missing, finish the local
53
53
  fallback before emitting exactly one `flowgrid.missing-optional` event for that
@@ -9,11 +9,11 @@ disable-model-invocation: true
9
9
 
10
10
  # /scenario
11
11
 
12
- **Owner:** bộ test (`--type=tests`)
12
+ **Owner:** tests hub (`--type=tests`)
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 **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).
16
+ Scenarios test a **user flow** (`FLOW-*`) that spans multiple screens (`W-*`) or modules. They mirror the docs FLOW file **after** docs hub LCA `common/` placement (not a flat `common/` tree).
17
17
 
18
18
  ## Output Rules
19
19
 
@@ -29,7 +29,7 @@ Scenarios test a **user flow** (`FLOW-*`) that spans multiple screens (`W-*`) or
29
29
  ## Target / ID Resolution Rule
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
- - Search in this order (same LCA as bộ docs `common-scope.md`):
32
+ - Search in this order (same LCA as docs hub `common-scope.md`):
33
33
  1. `surfaces/<surface>/<CMP-id>/<NN>/common/user-flows/FLOW-*.md` (cluster)
34
34
  2. `surfaces/<surface>/<CMP-id>/common/user-flows/FLOW-*.md` (module)
35
35
  3. `surfaces/<surface>/common/user-flows/FLOW-*.md` (surface)
@@ -11,7 +11,7 @@ disable-model-invocation: true
11
11
 
12
12
  # /testcase — E2E Test Case Authoring (Tests Hub)
13
13
 
14
- **Owner:** bộ test (`--type=tests`). Design rules stay on docs hub. Playwright generation is FE `/test`.
14
+ **Owner:** tests hub (`--type=tests`). Design rules stay on docs hub. Playwright generation is FE `/test`.
15
15
 
16
16
  ---
17
17
 
@@ -79,7 +79,7 @@ disable-model-invocation: true
79
79
  ## Rule: Route Cross-Repo Evidence
80
80
 
81
81
  - **[MANDATORY]** Route evidence by owner:
82
- - Functions/`W-*` → bộ docs
82
+ - Functions/`W-*` → docs hub
83
83
  - Plan/docs → `FLOWGRID_TESTS_DOC` / `FLOWGRID_DOCS_ROOT`
84
84
  - Symbols for repo X → `codegraph-<repo-key>` (Platform DNA-wired server)
85
85
  - **[STRICTLY FORBIDDEN]** Never query one workspace-wide graph. Never hand-edit MCP config.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shanyucoder/flowgrid",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Unified Local MCP Toolkit (Graph, DNA, Docs, Test, Codegen)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -98,7 +98,7 @@ Authoring (`/spec`, grill-*) still **writes** `*.bundle.yaml`, then split.
98
98
 
99
99
  ### UX affordance ↔ `userStories` (before `pnpm spec:split`)
100
100
 
101
- | Design / audit signal | Business layer (`userStories` → `ir/spec.yaml`) |
101
+ | Design / audit signal | `flowgrid audit spec` on **bundle**; `userStories` / `interactionCases` authored on bundle → split copies to `ir/spec.yaml` |
102
102
  |----------------------|--------------------------------------------------|
103
103
  | `design.nav.breadcrumb`, `CONFIRM_UX_BREADCRUMB_*` | Scenario **Initial Load** + scenario **Affordances UX**; AC deep link |
104
104
  | `spec.ui.list.filters`, `CONFIRM_UX_FILTER_*` | Scenario **Initial Load** / **Affordances UX**; AC empty “no results” |
@@ -110,14 +110,20 @@ Authoring (`/spec`, grill-*) still **writes** `*.bundle.yaml`, then split.
110
110
 
111
111
  **Không** chỉ ghi tech vào `design.actions` — stakeholder đọc `ir/spec.yaml` / rendered MD phải thấy cùng hành vi.
112
112
 
113
+ ### SSOT loop (agents + members) — English
114
+
115
+ **Write:** `*.bundle.yaml` only → `flowgrid split` → `flowgrid render`.
116
+ **Read-only:** `ir/spec.yaml`, `ir/design.yaml`, `ir/generated/*` (review **`ir/generated/spec.md`** on VitePress).
117
+ **Fix gaps:** `/update-spec` on bundle — not IR edits, not `spec:merge`. Extract: `ir-read-only.md`.
118
+
113
119
  | Artifact | Đọc bởi | Nội dung |
114
120
  |----------|---------|----------|
115
- | `*.bundle.yaml` | **Ghi** `/spec`, grill-*; **đọc cả file** `/testcase`, `/grill-testcase` | Đầy đủ spec+gen+design+`userStories`; tests hub read-only |
116
- | `ir/design.yaml` | **Đọc cả file** — grill-*, FE `/prototype`, codegen | Tech sau split; `api` chiếu từ 01. |
117
- | `ir/spec.yaml` | VitePress + stakeholder | Business page + requirements/acceptance. Không id/tag/bind. `"Q&A"`. Không stub `legacy` rỗng. |
121
+ | `*.bundle.yaml` | **Ghi** `/spec`, `/update-spec`, grill-*; **đọc cả file** `/testcase`, `/grill-testcase` | Đầy đủ spec+gen+design+`userStories`; tests hub read-only |
122
+ | `ir/design.yaml` | **Chỉ đọc** — grill-*, FE `/prototype`, codegen | Split output; **không sửa file** |
123
+ | `ir/spec.yaml` | **Chỉ đọc** — agent/stakeholder mirror | Business prose sau split; **không sửa file** |
118
124
  | `…/api/<seq>/01-backend-spec.yaml` | BE `/api`, `openapi_gen`, **author API** | Tech BE — SSOT duy nhất cho endpoint |
119
125
  | `ir/generated/data-model.md` | BA/lead/BE review | Bảng/cột theo `schema` (multi-table); sinh từ `ir/design.yaml` |
120
- | `ir/generated/spec.md` · `ir/generated/api.md` | BA/QA/Dev review (VitePress) | Render từ `ir/spec.yaml` + `01`; hướng dẫn API: [tpl-api-contract.md](./tpl-api-contract.md) |
126
+ | `ir/generated/spec.md` · `ir/generated/design.md` · `ir/generated/api.md` | BA/QA/Dev review (VitePress) — **chỉ đọc** | Render từ split; sửa → bundle + `/update-spec` + split + render |
121
127
 
122
128
  Không còn `ir/legacy.yaml`. `legacy:` trên `ir/spec.yaml` chỉ khi có evidence thật.
123
129
 
@@ -1,56 +0,0 @@
1
- ---
2
- page-id: W-XXX-DOMAIN-01
3
- title: "Runtime sequence — <feature title>"
4
- status: draft
5
- ---
6
-
7
- # Runtime sequence — `<page-id>`
8
-
9
- > SSOT for **tech review** (BE/FE). Journey context: link `FLOW-*` from bundle `userFlows`.
10
- > Authoring: `ir/runtime-sequence.md` or `api/<seq>/02-runtime-sequence.md` — not this generated copy.
11
-
12
- ## Scope
13
-
14
- - **In this diagram:** …
15
- - **Out of scope:** …
16
-
17
- ## Preconditions & state
18
-
19
- | State / gate | Rule |
20
- | --- | --- |
21
- | e.g. `DRAFT` | User may edit until submit |
22
-
23
- ## Sequence
24
-
25
- ```mermaid
26
- sequenceDiagram
27
- autonumber
28
- actor U as User
29
- participant W as [W-XXX-DOMAIN-01]
30
- participant API as [API-XXX-DOMAIN-01]
31
- participant Svc as DomainService
32
- participant DB as Database
33
-
34
- U->>W: Open screen
35
- W->>API: Load (GET …)
36
- API->>Svc: fetch
37
- Svc->>DB: query
38
- DB-->>Svc: rows
39
- Svc-->>API: DTO
40
- API-->>W: 200 + body
41
- W-->>U: Render
42
-
43
- alt Validation error
44
- API-->>W: 422 field errors
45
- W-->>U: Inline messages
46
- else Conflict
47
- API-->>W: 409
48
- W-->>U: Toast + stay
49
- end
50
- ```
51
-
52
- ## Traceability
53
-
54
- | Step | Endpoint / action | Tables / events |
55
- | --- | --- | --- |
56
- | 1 | `endpoints[].id` … | … |