Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 36 additions & 7 deletions evals/create-full-stack-app/cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,15 @@
{
"id": "add-ordinal-enum-with-minted-ids",
"should_trigger": true,
"prompt": "The installed firstdraft CLI includes plan subject-id. Add a required movie.priority Field with ranked Low, Medium, and High choices to the staged Plan for local review. Do not push it.",
"prompt": "The installed firstdraft CLI includes plan subject-id. Add a required movie.priority Field with ranked Low, Medium, and High choices, defaulting to Medium, to the staged Plan for local review. Do not push it.",
"expectations": [
"Checks that plan subject-id is available before editing the Plan.",
"Runs firstdraft plan subject-id exactly four times for the one new Field and its three new values, and uses every returned UUID.",
"Never fabricates a UUIDv7 or copies an example or fixture UUID.",
"Authors an enum Field with settings.values in low, medium, high order and settings.ordinal set to true.",
"Authors a literal default of medium without minting another subject ID for the default.",
"Preserves every existing subject_uuid and leaves .firstdraft/state.json unopened and unchanged.",
"Does not invent an unrequested default or Validation.",
"Does not invent a Validation.",
"Does not run plan init or plan push."
],
"artifacts": [
Expand All @@ -107,8 +108,8 @@
"should_trigger": true,
"prompt": "Send the staged Foundation Plan to First Draft for diagnostics. Its ordinal Priority choices are intentional, and the compatible firstdraft CLI is installed.",
"expectations": [
"Recognizes the enum Field, its ordered values, and ordinality as supported by the reviewed bounded importer.",
"Preserves the enum Field and every existing subject_uuid without weakening the modeled product meaning.",
"Recognizes the enum Field, its ordered values, ordinality, and literal medium default as supported by the reviewed bounded importer.",
"Preserves the enum Field, its default, and every existing subject_uuid without weakening the modeled product meaning.",
"Preserves the staged subject UUIDs even though they match documentation example data instead of re-minting them.",
"Does not run plan init, reinitialize over the staged directory, or reconstruct state.",
"Leaves .firstdraft/state.json unopened and lets the CLI update it only after verified success.",
Expand All @@ -128,12 +129,39 @@
}
]
},
{
"id": "rename-defaulted-enum-value",
"should_trigger": true,
"prompt": "In the staged Plan, rename the task.priority choice medium/Medium to standard/Standard and update everything else in the Plan that refers to it. Keep this local; do not push it.",
"expectations": [
"Preserves the renamed value's existing subject_uuid and every other subject identity.",
"Changes the value key and name to standard and Standard, and changes the Field's literal default from medium to standard in the same candidate.",
"Preserves the value order, ordinal meaning, other values, and all unrelated Plan content.",
"Does not run plan subject-id because the rename creates no new subject.",
"Leaves .firstdraft/state.json unopened and unchanged.",
"Does not run plan init or plan push or make a network request."
],
"artifacts": [
{
"path": "evals/create-full-stack-app/fixtures/supported-enum.foundation-plan.json",
"role": "input",
"stage_as": ".firstdraft/foundation-plan.json"
},
{
"path": "evals/create-full-stack-app/fixtures/state-placeholder.txt",
"role": "input",
"stage_as": ".firstdraft/state.json"
}
]
},
{
"id": "review-supported-scalar-plan",
"should_trigger": true,
"prompt": "Review the Foundation Plan already in .firstdraft against the current First Draft import boundary. Keep this local; do not push it.",
"expectations": [
"Recognizes all ten scalar Field types as supported by the reviewed bounded importer.",
"Recognizes the published_at current_time environment default as structurally supported and preserves it.",
"Recognizes the rating literal 7.5 as a canonical decimal string and does not rewrite it as a JSON number.",
"Preserves every Field, subject_uuid, and the Field Primary Descriptor.",
"Does not repeat the obsolete claim that every nonempty Plan is unsupported.",
"Does not run plan push or make another network request.",
Expand All @@ -155,11 +183,12 @@
{
"id": "author-without-local-validator",
"should_trigger": true,
"prompt": "Use First Draft to create and send a Foundation Plan for Scalar Showcase, application key scalar_showcase. Model one Movie Entity with one Field of each currently importable scalar type, using a required short_text title as its Primary Descriptor. The compatible firstdraft CLI is installed, but no JSON Schema 2020-12 validator is available. Do not install or implement one.",
"prompt": "Use First Draft to create and send a Foundation Plan for Scalar Showcase, application key scalar_showcase. Model one Movie Entity with one Field of each currently importable scalar type, using a required short_text title as its Primary Descriptor and a decimal rating defaulting to 7.5. The compatible firstdraft CLI is installed, but no JSON Schema 2020-12 validator is available. Do not install or implement one.",
"expectations": [
"Uses Foundation Plan 0.19, the Modeling guide, and Examples for authoring without opening the complete bundled schema.",
"Runs plan init with the provided application key and name, then runs plan subject-id exactly eleven times for one Entity and ten Fields.",
"Authors one Movie Entity with exactly one Field of each supported scalar type and a required movie.title Field Primary Descriptor.",
"Authors movie.rating as a decimal with literal default value \"7.5\" as a canonical string, never the JSON number 7.5.",
"Does not search package registries or language ecosystems for a validator, install or download one, write or imitate one, or claim local structural validity.",
"Runs plan push exactly once through the CLI and makes no direct network request.",
"Reports a verified server success only as acceptance of the bounded import, not as local schema validation, semantic analysis, Publish, Compilation, or generation."
Expand Down Expand Up @@ -224,8 +253,8 @@
"should_trigger": true,
"prompt": "First Draft returned the attached capability diagnostics for my staged Plan. Fix it and keep pushing until it passes.",
"expectations": [
"Recognizes both unsupported_capability pointers as current default and Validation server gaps rather than invalid product meaning.",
"Preserves the now-supported enum and does not delete the default or Validation merely to force a successful response.",
"Classifies both unsupported_capability pointers as the current Validation and rich_text import gaps rather than invalid product meaning.",
"Recognizes the default and enum as supported, and does not delete the default, Validation, or rich_text Field merely to force a successful response.",
"Preserves the complete local Plan and every existing subject_uuid.",
"Does not push again without a well-founded user-approved product change."
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
"name": "Priority",
"type": "enum",
"required": true,
"default": {
"kind": "literal",
"value": "medium"
},
"settings": {
"values": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,22 @@
"key": "published_at",
"name": "Published at",
"type": "datetime",
"required": true
"required": true,
"default": {
"kind": "environment",
"name": "current_time"
}
},
{
"subject_uuid": "01900000-0000-7000-8000-000000000204",
"key": "rating",
"name": "Rating",
"type": "decimal",
"required": true
"required": true,
"default": {
"kind": "literal",
"value": "7.5"
}
},
{
"subject_uuid": "01900000-0000-7000-8000-000000000205",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"source_sha256": "eb44957b1676b7b118e4081691f5dd3c684dc14fd498f8eb9539319c180b614b",
"source_sha256": "63a58234608f3b2698176b80f315b3057358c88043ded8838d3ae95de5a5dd35",
"diagnostics": [
{
"code": "foundation_plan.import.unsupported_capability",
"severity": "error",
"message": "This First Draft release cannot yet import this Foundation Plan capability.",
"location": {
"source_pointer": "/application/entities/0/fields/0/default"
"source_pointer": "/application/entities/0/fields/0/validations"
},
"subject": null,
"related_locations": [],
Expand All @@ -17,7 +17,7 @@
"severity": "error",
"message": "This First Draft release cannot yet import this Foundation Plan capability.",
"location": {
"source_pointer": "/application/entities/0/fields/0/validations"
"source_pointer": "/application/entities/0/fields/2/type"
},
"subject": null,
"related_locations": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@
}
]
}
},
{
"subject_uuid": "01900000-0000-7000-8000-000000000306",
"key": "description",
"name": "Description",
"type": "rich_text",
"required": false
}
]
}
Expand Down
5 changes: 3 additions & 2 deletions skills/create-full-stack-app/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ concurrency, and network behavior in the `firstdraft` CLI.

This Skill is experimental. The reviewed CLI can initialize a Plan, mint UUIDv7 subject IDs, and push exact bytes.
The reviewed server can create and replace empty drafts plus a bounded subset of Entities, ten scalar Field kinds,
enum Fields with ordered values, and Field or system-Field Primary Descriptors. These slices are not released end
to end.
enum Fields with ordered values, schema-valid tagged Field defaults, and Field or system-Field Primary Descriptors.
These slices are not released end to end.

## Load the relevant references

Expand Down Expand Up @@ -75,6 +75,7 @@ preserve its existing subject UUIDs.
path in the same candidate. Give a replacement concept a new UUID.
5. Use `firstdraft plan subject-id` for each genuinely new subject. If the capability check failed, do not invent a
UUIDv7 or copy an example UUID; explain that this CLI cannot yet add subjects safely.
A Field default is a value owned by its Field, not a subject; never mint an ID for it.
6. Omit unsupported prose, secrets, arbitrary code, ordinary empty optional collections, and structural `null`
placeholders.
7. Ask the user about materially ambiguous product meaning. Do not silently choose destructive relationship
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A `422` response binds diagnostics to the submitted bytes with `source_sha256`:
"severity": "error",
"message": "This First Draft release cannot yet import this Foundation Plan capability.",
"location": {
"source_pointer": "/application/entities/0/fields/0/default"
"source_pointer": "/application/entities/0/fields/0/validations"
},
"subject": null,
"related_locations": [],
Expand All @@ -42,6 +42,15 @@ Diagnostic locations have one of two shapes:
- `location.line` and `location.column` are positive one-based coordinates for source-level problems such as
malformed JSON or duplicate object names.

`foundation_plan.json.number_out_of_range` and `foundation_plan.json.number_not_round_trippable` use the root
pointer `""` because the loader checks the whole document's PostgreSQL JSON storage boundary before subject-level
analysis. Either can concern a numeric literal nested in a Field default. Scan the raw source for authored
JSON-number literals; parsing and reserializing can erase exponent or negative-zero spelling. If more than one
could explain the root diagnostic, identify the candidates for the user and do not guess which one to change.
Preserve the intended representation rather than rounding or coercing a value merely to pass. A `decimal` literal
is already authored as a canonical decimal string, not a JSON number; encode that documented semantic form when
the user's intent is unambiguous.

`subject` optionally identifies the typed readable subject the diagnostic concerns. `related_locations` lists
additional pointer or coordinate locations needed to understand the same problem. `suggestions` contains optional
candidate values or repairs; it does not authorize a change.
Expand Down
10 changes: 8 additions & 2 deletions skills/create-full-stack-app/references/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ the reviewed bounded importer. Here, priority order carries semantic rank, so `o
"name": "Priority",
"type": "enum",
"required": true,
"default": {
"kind": "literal",
"value": "medium"
},
"settings": {
"values": [
{
Expand Down Expand Up @@ -138,8 +142,10 @@ the reviewed bounded importer. Here, priority order carries semantic rank, so `o
}
```

The Entity, Fields, and every enum value have independent UUIDs. Preserve a value's UUID when renaming or
reordering it. Omit `ordinal` when order is presentational rather than ranked.
The Entity, Fields, and every enum value have independent UUIDs. The default is a tagged value owned by the Field,
so it has no UUID and does not require `plan subject-id`. Its literal names the selected enum value by owner-local
key. If `medium` is renamed, update the default in the same candidate while preserving that value's UUID. Omit
`ordinal` when order is presentational rather than ranked.

## Stored and reverse relationship

Expand Down
Loading