create-flowdular 0.6.2 → 0.6.4
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/agent-template/.agents/skills/auto-review/SKILL.md +5 -2
- package/agent-template/.agents/skills/module-new/SKILL.md +1 -1
- package/agent-template/.ai/agents/README.md +2 -2
- package/agent-template/.ai/agents/sandbox/frontend-engineer.md +3 -1
- package/agent-template/.ai/agents/sandbox/ux-designer.md +2 -1
- package/agent-template/.ai/policies/path-ownership.yaml +2 -1
- package/agent-template/.ai/policies/task-budgets.yaml +1 -1
- package/agent-template/.ai/skills/auto-review/SKILL.md +5 -2
- package/agent-template/.ai/skills/module-new/SKILL.md +1 -1
- package/agent-template/.claude/skills/auto-review/SKILL.md +5 -2
- package/agent-template/.claude/skills/module-new/SKILL.md +1 -1
- package/agent-template/docs/modules.md +3 -2
- package/package.json +1 -1
- package/template/default/modules/example/package.json +1 -1
- package/template/default/package.json +2 -2
- package/template/default/platform/package.json +1 -1
|
@@ -69,7 +69,10 @@ implementation turn after a passing review. Use the provided
|
|
|
69
69
|
reference code and recorded gate output. The orchestrator runs schema, dependency,
|
|
70
70
|
typecheck, tests and format gates; never claim you ran a command it ran later.
|
|
71
71
|
Report verification still pending when needed. Deterministic checks are independent
|
|
72
|
-
of your assessment and must all pass before eject.
|
|
72
|
+
of your assessment and must all pass before eject. Nobody in the sandbox can render
|
|
73
|
+
the screen: the operator inspects it in the preview. For the UI check, cite the
|
|
74
|
+
component code, its states and the tests as evidence; a missing rendered inspection
|
|
75
|
+
is not a finding.
|
|
73
76
|
|
|
74
77
|
Return exactly one fenced `auto-review` JSON object in the closing response,
|
|
75
78
|
followed by the normal handoff line. Each check is a string of 20 to 4000 characters
|
|
@@ -85,7 +88,7 @@ under 32000 characters. The structure is:
|
|
|
85
88
|
"compatibility": "Public consumers and migration or manifest evidence.",
|
|
86
89
|
"lifecycle": "Resource ownership and failure-path evidence.",
|
|
87
90
|
"tests": "Test paths, assertions, actual gate results or pending checks.",
|
|
88
|
-
"ui": "
|
|
91
|
+
"ui": "Component code, states and tests, or a specific reason not applicable."
|
|
89
92
|
},
|
|
90
93
|
"findings": ["Severity; file:line; input/state; wrong outcome; required fix."]
|
|
91
94
|
}
|
|
@@ -72,7 +72,7 @@ migrations, releases it, then acquires the runtime lease requiring
|
|
|
72
72
|
stays async and database-agnostic, and persistence stays on
|
|
73
73
|
`@flowdular/sdk/database`.
|
|
74
74
|
|
|
75
|
-
The first entity is the middle segment of the first permission id (`inventory.locations.read` gives `locations`, table `inventory_locations`, type `InventoryLocation`); it gets the list endpoint (`.read`), the create endpoint (`.manage`), the table, the view and the tests. Every other permission becomes a constant in `X_PERMISSIONS` only; its entity is `module-update` work. A directory that already holds `spec/module.yaml` and `translations/**` (the business manager's files) is extended, and
|
|
75
|
+
The first entity is the middle segment of the first permission id (`inventory.locations.read` gives `locations`, table `inventory_locations`, type `InventoryLocation`); it gets the list endpoint (`.read`), the create endpoint (`.manage`), the table, the view and the tests. Every other permission becomes a constant in `X_PERMISSIONS` only; its entity is `module-update` work. A directory that already holds `spec/module.yaml` and `translations/**` (the business manager's files) is extended: the specification stays, and each translation bundle keeps its keys and gains the skeleton's, the author's wording winning on a shared key; a directory with sources is refused. In the sandbox the orchestrator runs the scaffold once the spec is approved.
|
|
76
76
|
|
|
77
77
|
What is still yours after the scaffold: the real fields of the entity beyond `name`, validation bounds and stable error codes, uniqueness rules and their indexes, further endpoints and entities, screen columns and the drawer form, tests beyond identity and isolation. A business agent is a separate phase using `business-agent-design`; the scaffold does not invent one.
|
|
78
78
|
|
|
@@ -8,9 +8,9 @@ Two families of role prompts live here. They share one front matter schema (`id`
|
|
|
8
8
|
|
|
9
9
|
What the front matter does at run time:
|
|
10
10
|
|
|
11
|
-
- `gates`: enforced. After a turn that changed files, the sandbox runs `dependencies` plus these gates (`packages/sandbox/src/server/turns.ts`, `runSessionGates`), workspace gates once and module gates per draft module. Ids must come from `packages/sandbox/src/server/gates.ts`: `spec-schema`, `module-schema`, `dependencies`, `typecheck`, `tests`, `format`. An unknown id is dropped silently. A gate whose last result did not pass also runs after every turn until it passes. A failure is repaired by a role whose `allowedPaths` cover the file the fix goes in (`packages/sandbox/src/server/gate-repair.ts`), with the reported errors in the fix prompt.
|
|
11
|
+
- `gates`: enforced. After a turn that changed files, the sandbox runs `dependencies` plus these gates (`packages/sandbox/src/server/turns.ts`, `runSessionGates`), workspace gates once and module gates per draft module. Ids must come from `packages/sandbox/src/server/gates.ts`: `spec-schema`, `module-schema`, `dependencies`, `typecheck`, `tests`, `format`. An unknown id is dropped silently. A gate whose last result did not pass also runs after every turn until it passes, and every gate but `auto-review` runs after a turn that wrote a file it checks (`reads` in `gates.ts`) once the module has its `module.json`. A failure is repaired by a role whose `allowedPaths` cover the file the fix goes in (`packages/sandbox/src/server/gate-repair.ts`), with the reported errors in the fix prompt.
|
|
12
12
|
- `allowedPaths`: enforced after every turn. Globs relative to the active draft module are shown to the agent as "Paths you may write" and captured before the driver starts. A write outside that allowlist fails the turn, is quarantined as evidence and is restored before formatting, gates, checkpoints, preview or delivery can observe it (`packages/sandbox/src/server/path-guard.ts`, `turns.ts`).
|
|
13
|
-
- `handoff`: enforced. A `HANDOFF:` line is honoured only when it names a role in this list and not the role itself (`packages/sandbox/src/server/planning.ts`); otherwise the state routing decides and the transcript says why. The team list in the instruction is built from this list.
|
|
13
|
+
- `handoff`: enforced. A `HANDOFF:` line is honoured only when it names a role in this list and not the role itself (`packages/sandbox/src/server/planning.ts`); otherwise the state routing decides and the transcript says why. When the line names module files the finishing role may not write, the next turn goes to a role whose `allowedPaths` cover one of them, or the chain stops when no role's do. The team list in the instruction is built from this list.
|
|
14
14
|
- `id`, `name`, `purpose`: composed into the instruction after `SANDBOX_AGENT_CONTRACT`, before the session facts.
|
|
15
15
|
|
|
16
16
|
The five roles and who takes the first turn: `business-manager` for both a new module and a change to an existing module. For a change, it updates the copied specification first and leaves it as `draft` or `in-review`. The operator approval route changes the current text to `approved` and records its exact hash. Any later edit makes the hash stale and routes back to approval before `backend-engineer`, `ux-designer`, `frontend-engineer` or `agentic-engineer` may implement (`planSpecGateHandoff` in `planning.ts`, `isSpecApproved` in `spec.ts`).
|
|
@@ -4,6 +4,7 @@ name: 'Frontend engineer'
|
|
|
4
4
|
purpose: 'Implement the client: contribution, views, forms, state, and API calls.'
|
|
5
5
|
allowedPaths:
|
|
6
6
|
- 'src/client/**'
|
|
7
|
+
- 'translations/**'
|
|
7
8
|
- 'tests/**'
|
|
8
9
|
- 'package.json'
|
|
9
10
|
gates:
|
|
@@ -15,6 +16,7 @@ gates:
|
|
|
15
16
|
handoff:
|
|
16
17
|
- backend-engineer
|
|
17
18
|
- ux-designer
|
|
19
|
+
- business-manager
|
|
18
20
|
---
|
|
19
21
|
|
|
20
22
|
You own src/client: contributions, screens, forms, state and API calls. Use only the Task skill selected under Session and consult reference/design-system.md for visual changes. Extend the scaffold and copy reference/example-module/src/client where needed.
|
|
@@ -23,6 +25,6 @@ Keep fetch calls in api.ts, pass the contribution's CSRF token into mutations, u
|
|
|
23
25
|
|
|
24
26
|
Use the canonical createClientContribution entry. Navigation must point at an existing view; widgets use registered shell slots. Missing scopes hide actions, but server authorization remains authoritative. Keep server dependencies out of client imports.
|
|
25
27
|
|
|
26
|
-
Records own the page, with create/edit in a Drawer. Reuse TableCard and Table, including widths, loading and empty states. Use translated copy, all five states, and no hardcoded design values. Inspect the rendered screen before handoff.
|
|
28
|
+
Records own the page, with create/edit in a Drawer. Reuse TableCard and Table, including widths, loading and empty states. Use translated copy, all five states, and no hardcoded design values. Add every key your screens read to each locale's translations/<locale>.json, without the module prefix (t('<module>.page.title') reads page.title) and with that locale's plural forms; the business manager may reword domain terms. Inspect the rendered screen before handoff.
|
|
27
29
|
|
|
28
30
|
For TSRX, loop keys can read only the loop item: precompute a key on each item if it needs props or local state. Test pure mapping/filtering logic in .ts helpers. Ask the backend engineer for an endpoint or field the spec defines but the server lacks, or UX for an unresolved screen decision. Never invent a business decision the approved spec does not make (a field, state, permission or behaviour): ask for it with a questions block (Session).
|
|
@@ -4,6 +4,7 @@ name: 'UX designer'
|
|
|
4
4
|
purpose: 'Design the screens, their states, and their copy on the shared design system.'
|
|
5
5
|
allowedPaths:
|
|
6
6
|
- 'src/client/**'
|
|
7
|
+
- 'design/**'
|
|
7
8
|
gates:
|
|
8
9
|
- typecheck
|
|
9
10
|
- format
|
|
@@ -12,7 +13,7 @@ handoff:
|
|
|
12
13
|
- business-manager
|
|
13
14
|
---
|
|
14
15
|
|
|
15
|
-
You own screen structure, states and copy in src/client
|
|
16
|
+
You own screen structure, states and copy in src/client, and screen designs in design/. Use only the Task skill selected under Session, reference/design-system.md and the relevant shared component source. reference/example-module/src/client/CatalogView.tsrx is the screen example.
|
|
16
17
|
|
|
17
18
|
Reshape the existing scaffold into a typechecking view and Drawer form. Leave fetch, api.ts and data wiring to the frontend engineer. Use readonly typed props and real domain types, not fabricated records presented as working behavior.
|
|
18
19
|
|
|
@@ -38,7 +38,7 @@ owners:
|
|
|
38
38
|
# .ai/agents/sandbox/*.md says who writes what. Advisory at run time.
|
|
39
39
|
moduleRoles:
|
|
40
40
|
modules/{module}/spec/**: [business-manager, agentic-engineer]
|
|
41
|
-
modules/{module}/translations/**: [business-manager]
|
|
41
|
+
modules/{module}/translations/**: [business-manager, frontend-engineer]
|
|
42
42
|
modules/{module}/src/acl/**: [backend-engineer]
|
|
43
43
|
modules/{module}/src/api/**: [backend-engineer]
|
|
44
44
|
modules/{module}/src/server/**: [backend-engineer]
|
|
@@ -48,6 +48,7 @@ moduleRoles:
|
|
|
48
48
|
modules/{module}/src/index.ts: [backend-engineer]
|
|
49
49
|
modules/{module}/migrations/**: [backend-engineer]
|
|
50
50
|
modules/{module}/src/client/**: [ux-designer, frontend-engineer]
|
|
51
|
+
modules/{module}/design/**: [ux-designer]
|
|
51
52
|
modules/{module}/src/agent/**: [agentic-engineer]
|
|
52
53
|
modules/{module}/tests/**:
|
|
53
54
|
[backend-engineer, frontend-engineer, agentic-engineer]
|
|
@@ -33,7 +33,7 @@ sandbox:
|
|
|
33
33
|
messageLength: 1 to 20000 characters (packages/sandbox/src/server/turns.ts)
|
|
34
34
|
briefLength: at least 8 characters (planning.ts assertBrief)
|
|
35
35
|
gateTimeout: 5 minutes per gate, output capped at 12000 characters (gates.ts)
|
|
36
|
-
gateFailure: a role whose write paths cover the failing file repairs, a repair that changed nothing is not repeated by the same role, and a gate that failed runs after every turn until it passes; at most maxRepairLoops consecutive repair turns per chain, then the chain returns to the operator
|
|
36
|
+
gateFailure: a role whose write paths cover the failing file repairs, a repair that changed nothing is not repeated by the same role, and a gate that failed runs after every turn until it passes; at most maxRepairLoops consecutive repair turns per chain, then the chain returns to the operator; a review turn neither counts toward nor resets that count
|
|
37
37
|
byokReads: 400 listed files, 128 KB per read (packages/coding-agent/src/drivers/byok.ts)
|
|
38
38
|
review:
|
|
39
39
|
chainedTurns: stop and read the transcript after four automatic handoffs on one brief
|
|
@@ -78,7 +78,10 @@ implementation turn after a passing review. Use the provided
|
|
|
78
78
|
reference code and recorded gate output. The orchestrator runs schema, dependency,
|
|
79
79
|
typecheck, tests and format gates; never claim you ran a command it ran later.
|
|
80
80
|
Report verification still pending when needed. Deterministic checks are independent
|
|
81
|
-
of your assessment and must all pass before eject.
|
|
81
|
+
of your assessment and must all pass before eject. Nobody in the sandbox can render
|
|
82
|
+
the screen: the operator inspects it in the preview. For the UI check, cite the
|
|
83
|
+
component code, its states and the tests as evidence; a missing rendered inspection
|
|
84
|
+
is not a finding.
|
|
82
85
|
|
|
83
86
|
Return exactly one fenced `auto-review` JSON object in the closing response,
|
|
84
87
|
followed by the normal handoff line. Each check is a string of 20 to 4000 characters
|
|
@@ -94,7 +97,7 @@ under 32000 characters. The structure is:
|
|
|
94
97
|
"compatibility": "Public consumers and migration or manifest evidence.",
|
|
95
98
|
"lifecycle": "Resource ownership and failure-path evidence.",
|
|
96
99
|
"tests": "Test paths, assertions, actual gate results or pending checks.",
|
|
97
|
-
"ui": "
|
|
100
|
+
"ui": "Component code, states and tests, or a specific reason not applicable."
|
|
98
101
|
},
|
|
99
102
|
"findings": ["Severity; file:line; input/state; wrong outcome; required fix."]
|
|
100
103
|
}
|
|
@@ -78,7 +78,7 @@ migrations, releases it, then acquires the runtime lease requiring
|
|
|
78
78
|
stays async and database-agnostic, and persistence stays on
|
|
79
79
|
`@flowdular/sdk/database`.
|
|
80
80
|
|
|
81
|
-
The first entity is the middle segment of the first permission id (`inventory.locations.read` gives `locations`, table `inventory_locations`, type `InventoryLocation`); it gets the list endpoint (`.read`), the create endpoint (`.manage`), the table, the view and the tests. Every other permission becomes a constant in `X_PERMISSIONS` only; its entity is `module-update` work. A directory that already holds `spec/module.yaml` and `translations/**` (the business manager's files) is extended, and
|
|
81
|
+
The first entity is the middle segment of the first permission id (`inventory.locations.read` gives `locations`, table `inventory_locations`, type `InventoryLocation`); it gets the list endpoint (`.read`), the create endpoint (`.manage`), the table, the view and the tests. Every other permission becomes a constant in `X_PERMISSIONS` only; its entity is `module-update` work. A directory that already holds `spec/module.yaml` and `translations/**` (the business manager's files) is extended: the specification stays, and each translation bundle keeps its keys and gains the skeleton's, the author's wording winning on a shared key; a directory with sources is refused. In the sandbox the orchestrator runs the scaffold once the spec is approved.
|
|
82
82
|
|
|
83
83
|
What is still yours after the scaffold: the real fields of the entity beyond `name`, validation bounds and stable error codes, uniqueness rules and their indexes, further endpoints and entities, screen columns and the drawer form, tests beyond identity and isolation. A business agent is a separate phase using `business-agent-design`; the scaffold does not invent one.
|
|
84
84
|
|
|
@@ -69,7 +69,10 @@ implementation turn after a passing review. Use the provided
|
|
|
69
69
|
reference code and recorded gate output. The orchestrator runs schema, dependency,
|
|
70
70
|
typecheck, tests and format gates; never claim you ran a command it ran later.
|
|
71
71
|
Report verification still pending when needed. Deterministic checks are independent
|
|
72
|
-
of your assessment and must all pass before eject.
|
|
72
|
+
of your assessment and must all pass before eject. Nobody in the sandbox can render
|
|
73
|
+
the screen: the operator inspects it in the preview. For the UI check, cite the
|
|
74
|
+
component code, its states and the tests as evidence; a missing rendered inspection
|
|
75
|
+
is not a finding.
|
|
73
76
|
|
|
74
77
|
Return exactly one fenced `auto-review` JSON object in the closing response,
|
|
75
78
|
followed by the normal handoff line. Each check is a string of 20 to 4000 characters
|
|
@@ -85,7 +88,7 @@ under 32000 characters. The structure is:
|
|
|
85
88
|
"compatibility": "Public consumers and migration or manifest evidence.",
|
|
86
89
|
"lifecycle": "Resource ownership and failure-path evidence.",
|
|
87
90
|
"tests": "Test paths, assertions, actual gate results or pending checks.",
|
|
88
|
-
"ui": "
|
|
91
|
+
"ui": "Component code, states and tests, or a specific reason not applicable."
|
|
89
92
|
},
|
|
90
93
|
"findings": ["Severity; file:line; input/state; wrong outcome; required fix."]
|
|
91
94
|
}
|
|
@@ -72,7 +72,7 @@ migrations, releases it, then acquires the runtime lease requiring
|
|
|
72
72
|
stays async and database-agnostic, and persistence stays on
|
|
73
73
|
`@flowdular/sdk/database`.
|
|
74
74
|
|
|
75
|
-
The first entity is the middle segment of the first permission id (`inventory.locations.read` gives `locations`, table `inventory_locations`, type `InventoryLocation`); it gets the list endpoint (`.read`), the create endpoint (`.manage`), the table, the view and the tests. Every other permission becomes a constant in `X_PERMISSIONS` only; its entity is `module-update` work. A directory that already holds `spec/module.yaml` and `translations/**` (the business manager's files) is extended, and
|
|
75
|
+
The first entity is the middle segment of the first permission id (`inventory.locations.read` gives `locations`, table `inventory_locations`, type `InventoryLocation`); it gets the list endpoint (`.read`), the create endpoint (`.manage`), the table, the view and the tests. Every other permission becomes a constant in `X_PERMISSIONS` only; its entity is `module-update` work. A directory that already holds `spec/module.yaml` and `translations/**` (the business manager's files) is extended: the specification stays, and each translation bundle keeps its keys and gains the skeleton's, the author's wording winning on a shared key; a directory with sources is refused. In the sandbox the orchestrator runs the scaffold once the spec is approved.
|
|
76
76
|
|
|
77
77
|
What is still yours after the scaffold: the real fields of the entity beyond `name`, validation bounds and stable error codes, uniqueness rules and their indexes, further endpoints and entities, screen columns and the drawer form, tests beyond identity and isolation. A business agent is a separate phase using `business-agent-design`; the scaffold does not invent one.
|
|
78
78
|
|
|
@@ -124,8 +124,9 @@ skills.
|
|
|
124
124
|
|
|
125
125
|
Files are written through the workspace Prettier, so the format gate passes
|
|
126
126
|
without a rewrite. A directory that already holds `spec/module.yaml` or
|
|
127
|
-
`translations/**` is extended, not rejected
|
|
128
|
-
|
|
127
|
+
`translations/**` is extended, not rejected: a translation bundle keeps its
|
|
128
|
+
keys and gains the skeleton's, the author's wording winning on a shared key. A
|
|
129
|
+
failed run leaves nothing behind.
|
|
129
130
|
|
|
130
131
|
### 3. Implement
|
|
131
132
|
|
package/package.json
CHANGED
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"build": "flowdular module sync --apply && pnpm --filter @app/platform build"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@flowdular/sandbox": "0.6.
|
|
25
|
+
"@flowdular/sandbox": "0.6.4",
|
|
26
26
|
"@tsrx/prettier-plugin": "0.3.120",
|
|
27
27
|
"prettier": "3.6.2",
|
|
28
|
-
"flowdular": "0.6.
|
|
28
|
+
"flowdular": "0.6.4",
|
|
29
29
|
"rulesync": "16.21.0"
|
|
30
30
|
}
|
|
31
31
|
}
|