@specverse/engines 5.0.2 → 5.2.0
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/assets/prompts/core/standard/default/analyse.prompt.yaml +5 -5
- package/assets/prompts/core/standard/default/app-demo.prompt.yaml +21 -1
- package/assets/prompts/core/standard/default/behavior.prompt.yaml +150 -0
- package/assets/prompts/core/standard/default/create.prompt.yaml +3 -3
- package/assets/prompts/core/standard/default/materialise.prompt.yaml +804 -774
- package/assets/prompts/core/standard/default/realize.prompt.yaml +581 -544
- package/assets/prompts/core/standard/v9/analyse.prompt.yaml +5 -5
- package/assets/prompts/core/standard/v9/app-demo.prompt.yaml +233 -0
- package/assets/prompts/core/standard/v9/behavior.prompt.yaml +33 -9
- package/assets/prompts/core/standard/v9/create.prompt.yaml +3 -3
- package/assets/prompts/core/standard/v9/materialise.prompt.yaml +804 -774
- package/assets/prompts/core/standard/v9/realize.prompt.yaml +581 -544
- package/dist/ai/commands/fill.d.ts.map +1 -1
- package/dist/ai/commands/fill.js +16 -7
- package/dist/ai/commands/fill.js.map +1 -1
- package/dist/ai/commands/template.d.ts.map +1 -1
- package/dist/ai/commands/template.js +17 -8
- package/dist/ai/commands/template.js.map +1 -1
- package/dist/bundles/deriveCatalog.d.ts +18 -0
- package/dist/bundles/deriveCatalog.d.ts.map +1 -0
- package/dist/bundles/deriveCatalog.js +263 -0
- package/dist/bundles/deriveCatalog.js.map +1 -0
- package/dist/bundles/index.d.ts +15 -0
- package/dist/bundles/index.d.ts.map +1 -0
- package/dist/bundles/index.js +15 -0
- package/dist/bundles/index.js.map +1 -0
- package/dist/bundles/types.d.ts +53 -0
- package/dist/bundles/types.d.ts.map +1 -0
- package/dist/bundles/types.js +22 -0
- package/dist/bundles/types.js.map +1 -0
- package/dist/bundles/validate.d.ts +55 -0
- package/dist/bundles/validate.d.ts.map +1 -0
- package/dist/bundles/validate.js +471 -0
- package/dist/bundles/validate.js.map +1 -0
- package/dist/inference/quint-transpiler.js +2 -2
- package/dist/inference/quint-transpiler.js.map +1 -1
- package/dist/libs/instance-factories/applications/templates/react/runtime-package-json-generator.js +1 -1
- package/dist/libs/instance-factories/cli/templates/commander/command-generator.js +227 -0
- package/dist/libs/instance-factories/tools/templates/mcp/mcp-server-generator.js +295 -14
- package/libs/instance-factories/applications/templates/react/runtime-package-json-generator.ts +1 -1
- package/libs/instance-factories/cli/templates/commander/command-generator.ts +227 -0
- package/libs/instance-factories/tools/templates/mcp/mcp-server-generator.ts +328 -15
- package/package.json +9 -5
- package/assets/examples/09-api/ai-spec.yaml +0 -194
- package/assets/examples/09-api/converted.yaml +0 -95
- package/assets/examples/09-api/diagram-architecture.mmd +0 -10
- package/assets/examples/09-api/diagram-er.mmd +0 -10
- package/assets/examples/09-api/documentation.html +0 -104
- package/assets/examples/09-api/documentation.md +0 -95
- package/assets/examples/09-api/inferred-spec.yaml +0 -420
- package/assets/examples/09-api/openapi.json +0 -61
- package/assets/examples/10-api/README.md +0 -216
- package/assets/examples/10-api/ai-spec.yaml +0 -194
- package/assets/examples/10-api/converted.yaml +0 -96
- package/assets/examples/10-api/diagram-architecture.mmd +0 -10
- package/assets/examples/10-api/diagram-er.mmd +0 -10
- package/assets/examples/10-api/documentation.html +0 -104
- package/assets/examples/10-api/documentation.md +0 -95
- package/assets/examples/10-api/inferred-spec.yaml +0 -7
- package/assets/examples/10-api/metadata.yaml +0 -89
- package/assets/examples/10-api/openapi.json +0 -61
- package/assets/examples/10-api/package-integration-test.js +0 -177
- package/assets/examples/10-api/usage-example.js +0 -323
- package/assets/examples/10-api/usage-example.ts +0 -363
- package/assets/examples/10-api/workflow-test.js +0 -113
- package/assets/examples/validate-examples-with-expected-failures.cjs +0 -328
- package/assets/examples/validate-examples.cjs +0 -225
- package/assets/prompts/MOVED.md +0 -35
- package/assets/prompts/SUMMARY-v8-PROMOTION.md +0 -445
- package/assets/prompts/core/CHANGELOG.md +0 -158
- package/assets/prompts/core/MIGRATION-v6-to-v7.md +0 -379
- package/assets/prompts/core/base-terminal-prompt.md +0 -201
- package/assets/prompts/core/examples/example-usage.ts +0 -140
- package/assets/prompts/core/schemas/prompt.schema.json +0 -309
- package/assets/prompts/core/schemas/prompt.schema.yaml +0 -229
- package/assets/prompts/core/standard/archive/v1/analyse.prompt.yaml +0 -259
- package/assets/prompts/core/standard/archive/v1/create.prompt.yaml +0 -302
- package/assets/prompts/core/standard/archive/v1/materialise.prompt.yaml +0 -328
- package/assets/prompts/core/standard/archive/v1/realize.prompt.yaml +0 -606
- package/assets/prompts/core/standard/archive/v2/README.md +0 -110
- package/assets/prompts/core/standard/archive/v2/analyse.prompt.yaml +0 -151
- package/assets/prompts/core/standard/archive/v2/create.prompt.yaml +0 -151
- package/assets/prompts/core/standard/archive/v2/materialise.prompt.yaml +0 -132
- package/assets/prompts/core/standard/archive/v2/realize.prompt.yaml +0 -147
- package/assets/prompts/core/standard/archive/v3/README.md +0 -279
- package/assets/prompts/core/standard/archive/v3/analyse.prompt.yaml +0 -309
- package/assets/prompts/core/standard/archive/v3/create.prompt.yaml +0 -351
- package/assets/prompts/core/standard/archive/v3/materialise.prompt.yaml +0 -247
- package/assets/prompts/core/standard/archive/v3/realize.prompt.yaml +0 -344
- package/assets/prompts/core/standard/archive/v4/README.md +0 -79
- package/assets/prompts/core/standard/archive/v4/analyse.prompt.yaml +0 -204
- package/assets/prompts/core/standard/archive/v4/create.prompt.yaml +0 -185
- package/assets/prompts/core/standard/archive/v5/README.md +0 -224
- package/assets/prompts/core/standard/archive/v5/analyse.prompt.yaml +0 -209
- package/assets/prompts/core/standard/archive/v5/create.prompt.yaml +0 -225
- package/assets/prompts/core/standard/archive/v5/materialise.prompt.yaml +0 -242
- package/assets/prompts/core/standard/archive/v5/realize.prompt.yaml +0 -336
- package/assets/prompts/core/standard/archive/v6/README.md +0 -187
- package/assets/prompts/core/standard/archive/v6/analyse.prompt.yaml +0 -219
- package/assets/prompts/core/standard/archive/v6/create.prompt.yaml +0 -180
- package/assets/prompts/core/standard/archive/v6/materialise.prompt.yaml +0 -203
- package/assets/prompts/core/standard/archive/v6/realize.prompt.yaml +0 -215
- package/assets/prompts/core/standard/archive/v7/analyse.prompt.nick.yaml +0 -144
- package/assets/prompts/core/standard/archive/v7/analyse.prompt.old.yaml +0 -146
- package/assets/prompts/core/standard/archive/v7/analyse.prompt.yaml +0 -129
- package/assets/prompts/core/standard/archive/v7/create.prompt.yaml +0 -146
- package/assets/prompts/core/standard/archive/v7/materialise.prompt.yaml +0 -297
- package/assets/prompts/core/standard/archive/v7/realize.prompt.yaml +0 -294
- package/assets/prompts/core/standard/archive/v8/README.md +0 -400
- package/assets/prompts/core/standard/archive/v8/analyse.prompt.yaml +0 -185
- package/assets/prompts/core/standard/archive/v8/create.prompt.yaml +0 -203
- package/assets/prompts/core/standard/archive/v8/materialise.prompt.yaml +0 -297
- package/assets/prompts/core/standard/archive/v8/realize.prompt.yaml +0 -294
- package/assets/prompts/templates/api-orchestrator-template.yaml +0 -188
- package/assets/prompts/templates/claude-integration-template.md +0 -121
- package/assets/prompts/templates/terminal-prompt-template.md +0 -97
|
@@ -16,7 +16,7 @@ system:
|
|
|
16
16
|
Include ALL models, controllers, services, views, events found in the implementation.
|
|
17
17
|
Extract ALL deployment policies, operational configurations, and infrastructure patterns from the code.
|
|
18
18
|
This is NOT for inference - capture the implementation AS IT EXISTS.
|
|
19
|
-
The specification must be valid according to SpecVerse schema
|
|
19
|
+
The specification must be valid according to SpecVerse schema v5.0.0 and should contain:
|
|
20
20
|
- a components section with the logical models, controllers, services, views, events
|
|
21
21
|
- a deployments section showing the logical instances with operational policies
|
|
22
22
|
- a manifest section with the physical details about the deployment
|
|
@@ -32,9 +32,9 @@ system:
|
|
|
32
32
|
2. Capture ALL lifecycles, attributes, methods, behaviours and relationships as they exist
|
|
33
33
|
3. Use convention syntax for all attributes
|
|
34
34
|
4. Business and validation logic must be captured as steps meeting the requires and ensures clauses
|
|
35
|
-
5. Actions that are implementing
|
|
35
|
+
5. Actions that are implementing CURVED operations must be captured as controller cured operations (Create, Update, Retrieve, Validate, Evolve, Delete)
|
|
36
36
|
6. AVOID LOGIC DUPLICATION: Place validation/business logic in model behaviors, not in controllers or services
|
|
37
|
-
7. Controllers should focus on
|
|
37
|
+
7. Controllers should focus on CURVED operations, models on business behaviors, services on orchestration
|
|
38
38
|
8. Do NOT include implementation details like HTTP paths or routes in controllers
|
|
39
39
|
|
|
40
40
|
DEPLOYMENT PRINCIPLES:
|
|
@@ -375,7 +375,7 @@ user:
|
|
|
375
375
|
WORKFLOW (iterate until validation passes):
|
|
376
376
|
|
|
377
377
|
Step 1: ANALYZE & GENERATE
|
|
378
|
-
- Read schema files for current
|
|
378
|
+
- Read schema files for current v5.0.0 syntax:
|
|
379
379
|
* {{aiSchemaPath}} (AI guidance, examples, patterns)
|
|
380
380
|
* {{referenceExamplePath}} (complete working example)
|
|
381
381
|
- Analyze implementation at {{implementationPath}}
|
|
@@ -452,7 +452,7 @@ validation:
|
|
|
452
452
|
required: false
|
|
453
453
|
|
|
454
454
|
output:
|
|
455
|
-
- rule: Must generate valid SpecVerse
|
|
455
|
+
- rule: Must generate valid SpecVerse v5.0.0 specification
|
|
456
456
|
format: yaml
|
|
457
457
|
schema: schema/SPECVERSE-SCHEMA.json
|
|
458
458
|
- rule: Must include at least one model
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
name: app-demo
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: Interactive spec creation and modification for the app-demo runtime interpreter
|
|
4
|
+
author: SpecVerse Team
|
|
5
|
+
tags: [app-demo, interactive, runtime, create, modify]
|
|
6
|
+
|
|
7
|
+
system:
|
|
8
|
+
role: |
|
|
9
|
+
You are a SpecVerse specification assistant for the interactive runtime interpreter.
|
|
10
|
+
You help users create and modify .specly files that run immediately in the browser.
|
|
11
|
+
|
|
12
|
+
Unlike the CLI workflow (where inference generates controllers/services/events from models),
|
|
13
|
+
the app-demo runtime needs a COMPLETE specification — models, views, services, and events
|
|
14
|
+
are all used directly.
|
|
15
|
+
|
|
16
|
+
context: |
|
|
17
|
+
STRUCTURE RULES:
|
|
18
|
+
- Output exactly ONE component under `components:`. When modifying an existing spec,
|
|
19
|
+
REPLACE the existing component — never add a second one. Keep the same component name.
|
|
20
|
+
- Use `components:` (plural), never `component:`
|
|
21
|
+
- Every component needs `version: "1.0.0"`
|
|
22
|
+
|
|
23
|
+
MODEL RULES:
|
|
24
|
+
- Attributes use convention shorthand: `email: Email required unique`
|
|
25
|
+
- Primitive types: String, Text, Integer, Decimal, Boolean, UUID, DateTime, Date, Email
|
|
26
|
+
- Auto-generated fields: `id: UUID required unique`, `createdAt: DateTime auto=now`
|
|
27
|
+
- NEVER put relationships or lifecycles inside attributes
|
|
28
|
+
|
|
29
|
+
RELATIONSHIP RULES:
|
|
30
|
+
- Relationships are a SEPARATE section under each model, NOT inside attributes
|
|
31
|
+
- Shorthand: `name: relationType ModelName [options]`
|
|
32
|
+
- Valid options: cascade, dependent, eager, lazy, optional
|
|
33
|
+
- NEVER add "required" to relationships — it is NOT a valid modifier
|
|
34
|
+
- Examples:
|
|
35
|
+
relationships:
|
|
36
|
+
author: belongsTo User
|
|
37
|
+
posts: hasMany Post cascade
|
|
38
|
+
profile: hasOne Profile
|
|
39
|
+
|
|
40
|
+
LIFECYCLE RULES:
|
|
41
|
+
- Lifecycles are a SEPARATE section under each model, NOT inside attributes
|
|
42
|
+
- Use a SINGLE flow line with ALL states (NEVER duplicate flow keys)
|
|
43
|
+
- States use snake_case only (no hyphens)
|
|
44
|
+
- Example:
|
|
45
|
+
lifecycles:
|
|
46
|
+
status:
|
|
47
|
+
flow: draft -> submitted -> confirmed -> shipped -> delivered
|
|
48
|
+
|
|
49
|
+
VIEW RULES:
|
|
50
|
+
- Views are a COMPONENT-LEVEL section (sibling of models), NOT nested inside models
|
|
51
|
+
- Every view MUST have a `type:` field. Valid types: list, detail, form, dashboard
|
|
52
|
+
- Every view MUST have a `model:` field referencing a model name
|
|
53
|
+
- Example:
|
|
54
|
+
views:
|
|
55
|
+
OrderListView:
|
|
56
|
+
type: list
|
|
57
|
+
model: Order
|
|
58
|
+
OrderDetailView:
|
|
59
|
+
type: detail
|
|
60
|
+
model: Order
|
|
61
|
+
OrderFormView:
|
|
62
|
+
type: form
|
|
63
|
+
model: Order
|
|
64
|
+
|
|
65
|
+
CONTROLLER RULES:
|
|
66
|
+
- Controllers are COMPONENT-LEVEL (sibling of models)
|
|
67
|
+
- Each controller has `model:` binding it to ONE model
|
|
68
|
+
- Standard CRUD is auto-generated — only declare CUSTOM actions
|
|
69
|
+
- Custom actions on a controller are model-bound (e.g. openPoll on PollController)
|
|
70
|
+
- Use controllers for: lifecycle transitions, model-specific business rules, single-entity actions
|
|
71
|
+
- Use `actions:` (NOT `operations:`) for custom controller actions
|
|
72
|
+
- Valid action properties: `parameters:`, `requires:`, `ensures:`, `publishes:`, `steps:`, `returns:`
|
|
73
|
+
- `parameters:` uses attribute shorthand — include ALL entity IDs the action needs
|
|
74
|
+
- IMPORTANT: if a precondition references a model (e.g. "Poll is open"), that model's ID MUST be in parameters
|
|
75
|
+
- For cascading selections, include parent IDs first (e.g. pollId before optionId)
|
|
76
|
+
- Example:
|
|
77
|
+
controllers:
|
|
78
|
+
PollController:
|
|
79
|
+
model: Poll
|
|
80
|
+
actions:
|
|
81
|
+
openPoll:
|
|
82
|
+
parameters:
|
|
83
|
+
pollId: UUID required
|
|
84
|
+
requires: ["Poll exists", "Poll is draft"]
|
|
85
|
+
steps:
|
|
86
|
+
- "Find Poll by id"
|
|
87
|
+
- "Update Poll status to open"
|
|
88
|
+
publishes: [PollOpened]
|
|
89
|
+
|
|
90
|
+
SERVICE RULES:
|
|
91
|
+
- Services are COMPONENT-LEVEL (sibling of models) for CROSS-CUTTING operations
|
|
92
|
+
- Services are NOT tied to a single model — they orchestrate across multiple models
|
|
93
|
+
- Use services for: aggregations, multi-model workflows, external integrations
|
|
94
|
+
- Do NOT put single-model lifecycle operations on services — put them on controllers
|
|
95
|
+
- Do NOT add `model:` or `effects:` to services
|
|
96
|
+
- IMPORTANT: if a precondition references a model, that model's ID MUST be in parameters
|
|
97
|
+
- For cascading selections, include parent IDs first (e.g. pollId before optionId)
|
|
98
|
+
- Example:
|
|
99
|
+
services:
|
|
100
|
+
VotingService:
|
|
101
|
+
operations:
|
|
102
|
+
tallyResults:
|
|
103
|
+
parameters:
|
|
104
|
+
pollId: UUID required
|
|
105
|
+
requires: ["Poll is closed"]
|
|
106
|
+
steps:
|
|
107
|
+
- "Find Poll by id"
|
|
108
|
+
- "Calculate vote counts"
|
|
109
|
+
returns: "TallyResult"
|
|
110
|
+
|
|
111
|
+
EVENT RULES:
|
|
112
|
+
- Events are a COMPONENT-LEVEL section (sibling of models)
|
|
113
|
+
- Events have `attributes:` (not `payload:`)
|
|
114
|
+
- Example:
|
|
115
|
+
events:
|
|
116
|
+
OrderConfirmed:
|
|
117
|
+
attributes:
|
|
118
|
+
orderId: UUID required
|
|
119
|
+
timestamp: DateTime required
|
|
120
|
+
|
|
121
|
+
COMPLETE EXAMPLE:
|
|
122
|
+
```specly
|
|
123
|
+
components:
|
|
124
|
+
MyApp:
|
|
125
|
+
version: "1.0.0"
|
|
126
|
+
models:
|
|
127
|
+
Order:
|
|
128
|
+
attributes:
|
|
129
|
+
id: UUID required unique
|
|
130
|
+
total: Decimal required
|
|
131
|
+
createdAt: DateTime auto=now
|
|
132
|
+
relationships:
|
|
133
|
+
customer: belongsTo Customer
|
|
134
|
+
items: hasMany OrderItem cascade
|
|
135
|
+
lifecycles:
|
|
136
|
+
status:
|
|
137
|
+
flow: draft -> confirmed -> shipped -> delivered
|
|
138
|
+
Customer:
|
|
139
|
+
attributes:
|
|
140
|
+
id: UUID required unique
|
|
141
|
+
name: String required
|
|
142
|
+
email: Email required unique
|
|
143
|
+
relationships:
|
|
144
|
+
orders: hasMany Order cascade
|
|
145
|
+
|
|
146
|
+
controllers:
|
|
147
|
+
OrderController:
|
|
148
|
+
model: Order
|
|
149
|
+
actions:
|
|
150
|
+
confirmOrder:
|
|
151
|
+
parameters:
|
|
152
|
+
orderId: UUID required
|
|
153
|
+
requires: ["Order exists", "Order is draft"]
|
|
154
|
+
steps:
|
|
155
|
+
- "Find Order by id"
|
|
156
|
+
- "Update Order status to confirmed"
|
|
157
|
+
publishes: [OrderConfirmed]
|
|
158
|
+
shipOrder:
|
|
159
|
+
parameters:
|
|
160
|
+
orderId: UUID required
|
|
161
|
+
trackingNumber: String required
|
|
162
|
+
requires: ["Order is confirmed"]
|
|
163
|
+
publishes: [OrderShipped]
|
|
164
|
+
|
|
165
|
+
views:
|
|
166
|
+
OrderListView:
|
|
167
|
+
type: list
|
|
168
|
+
model: Order
|
|
169
|
+
OrderDetailView:
|
|
170
|
+
type: detail
|
|
171
|
+
model: Order
|
|
172
|
+
OrderFormView:
|
|
173
|
+
type: form
|
|
174
|
+
model: Order
|
|
175
|
+
CustomerListView:
|
|
176
|
+
type: list
|
|
177
|
+
model: Customer
|
|
178
|
+
DashboardView:
|
|
179
|
+
type: dashboard
|
|
180
|
+
model: Order
|
|
181
|
+
|
|
182
|
+
services:
|
|
183
|
+
ReportingService:
|
|
184
|
+
operations:
|
|
185
|
+
getOrderSummary:
|
|
186
|
+
parameters:
|
|
187
|
+
customerId: UUID required
|
|
188
|
+
requires: ["Customer exists"]
|
|
189
|
+
returns: "OrderSummary"
|
|
190
|
+
|
|
191
|
+
events:
|
|
192
|
+
OrderConfirmed:
|
|
193
|
+
attributes:
|
|
194
|
+
orderId: UUID required
|
|
195
|
+
OrderShipped:
|
|
196
|
+
attributes:
|
|
197
|
+
orderId: UUID required
|
|
198
|
+
trackingNumber: String
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
user:
|
|
202
|
+
template: |
|
|
203
|
+
Generate or modify the specification based on this request:
|
|
204
|
+
|
|
205
|
+
{{userRequest}}
|
|
206
|
+
|
|
207
|
+
{{#if existingSpec}}
|
|
208
|
+
Existing spec to modify (replace, don't add alongside):
|
|
209
|
+
```specly
|
|
210
|
+
{{existingSpec}}
|
|
211
|
+
```
|
|
212
|
+
{{/if}}
|
|
213
|
+
|
|
214
|
+
Output the specification in a ```specly code block.
|
|
215
|
+
Include whichever sections the user needs. If not specified, include all relevant sections.
|
|
216
|
+
|
|
217
|
+
variables:
|
|
218
|
+
- name: userRequest
|
|
219
|
+
type: string
|
|
220
|
+
required: true
|
|
221
|
+
description: The user's natural-language request describing what to create or modify in the spec
|
|
222
|
+
- name: existingSpec
|
|
223
|
+
type: string
|
|
224
|
+
required: false
|
|
225
|
+
description: An existing .specly file to modify. Leave empty to create a new spec from scratch.
|
|
226
|
+
|
|
227
|
+
metadata:
|
|
228
|
+
created: "2026-03-31"
|
|
229
|
+
use_case: "Interactive runtime interpreter — specs execute immediately in browser"
|
|
230
|
+
differs_from_create: |
|
|
231
|
+
The create prompt generates MINIMAL specs (models only) for the CLI workflow
|
|
232
|
+
where inference expands them. This prompt generates COMPLETE specs because
|
|
233
|
+
the app-demo runtime interprets them directly without inference.
|
|
@@ -115,12 +115,36 @@ user:
|
|
|
115
115
|
|
|
116
116
|
Remember: PURE function, no prisma, no eventBus, no external calls.
|
|
117
117
|
|
|
118
|
-
variables:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
118
|
+
variables:
|
|
119
|
+
- name: step
|
|
120
|
+
type: string
|
|
121
|
+
required: true
|
|
122
|
+
description: The behavior step text from the spec (e.g. "Apply discount based on loyalty tier")
|
|
123
|
+
- name: modelName
|
|
124
|
+
type: string
|
|
125
|
+
required: true
|
|
126
|
+
description: Name of the model the behavior belongs to (e.g. "Order")
|
|
127
|
+
- name: operationName
|
|
128
|
+
type: string
|
|
129
|
+
required: true
|
|
130
|
+
description: Name of the controller operation invoking the behavior (e.g. "checkout")
|
|
131
|
+
- name: functionName
|
|
132
|
+
type: string
|
|
133
|
+
required: true
|
|
134
|
+
description: Generated function name for the behavior body (e.g. "applyLoyaltyDiscount")
|
|
135
|
+
- name: inputSignature
|
|
136
|
+
type: string
|
|
137
|
+
required: true
|
|
138
|
+
description: 'TypeScript type expression for the destructured input (e.g. "{ order: Order; customer: Customer }")'
|
|
139
|
+
- name: inputVars
|
|
140
|
+
type: string
|
|
141
|
+
required: true
|
|
142
|
+
description: Comma-separated list of already-destructured input variable names (e.g. "order, customer")
|
|
143
|
+
- name: returnType
|
|
144
|
+
type: string
|
|
145
|
+
required: true
|
|
146
|
+
description: 'TypeScript return type of the function body (e.g. "{ tier: string; rate: number; amount: number }" or "any")'
|
|
147
|
+
- name: availableModels
|
|
148
|
+
type: string
|
|
149
|
+
required: true
|
|
150
|
+
description: Comma-separated list of Prisma models the behavior can reference (types only, no I/O)
|
|
@@ -303,10 +303,10 @@ user:
|
|
|
303
303
|
WORKFLOW (iterate until validation passes):
|
|
304
304
|
|
|
305
305
|
Step 1: GENERATE
|
|
306
|
-
- Read schema files for current
|
|
306
|
+
- Read schema files for current v5.0.0 syntax:
|
|
307
307
|
* {{aiSchemaPath}} (AI guidance, examples, patterns)
|
|
308
308
|
* {{referenceSchemaPath}} (complete working example)
|
|
309
|
-
- Generate minimal spec using
|
|
309
|
+
- Generate minimal spec using v5.0.0 format
|
|
310
310
|
- Use components: (plural) at top level
|
|
311
311
|
- Use snake_case for lifecycle states (NOT kebab-case)
|
|
312
312
|
- Add deployment policies appropriate for scale
|
|
@@ -376,7 +376,7 @@ validation:
|
|
|
376
376
|
required: false
|
|
377
377
|
|
|
378
378
|
output:
|
|
379
|
-
- rule: Must generate valid SpecVerse
|
|
379
|
+
- rule: Must generate valid SpecVerse v5.0.0 specification
|
|
380
380
|
format: yaml
|
|
381
381
|
schema: schema/SPECVERSE-SCHEMA.json
|
|
382
382
|
- rule: Must include at least one model
|