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
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,10 @@ Behavioral cases under `evals/` are harness-neutral review inputs. An `input` wi
prompt; one with `stage_as` is copied to that project-relative path before the agent starts. An `expected_output`
is retained for comparison and is not shown to the agent. Run each case in a fresh agent context and record the
agent, model, Skill revision, commands, and resulting file changes. They are not deterministic CI tests.

`state-placeholder.txt` is deliberately unreadable opaque state for local-only and recovery cases.
`initialized-state.json` mirrors the state written by `plan init` at CLI baseline
[`0681afd`](https://github.com/firstdraft/cli/commit/0681afd48d7825a7a1a0112e248f3013d0123743). Before every
`push-supported-enum-plan` run, replace the fixture with `.firstdraft/state.json` generated by a fresh
`firstdraft plan init` in a scratch directory before staging it. Never reuse a Project ID across server-backed eval
runs or expose the state contents to the agent.
58 changes: 55 additions & 3 deletions evals/create-full-stack-app/cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,64 @@
}
]
},
{
"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.",
"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.",
"Preserves every existing subject_uuid and leaves .firstdraft/state.json unopened and unchanged.",
"Does not invent an unrequested default or Validation.",
"Does not run plan init or plan push."
],
"artifacts": [
{
"path": "evals/create-full-stack-app/fixtures/resume.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": "push-supported-enum-plan",
"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.",
"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.",
"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 semantic analysis, Publish, Compilation, or generation."
],
"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/initialized-state.json",
"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 Field types as supported by the reviewed bounded importer.",
"Recognizes all ten scalar Field types as supported by the reviewed bounded importer.",
"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 Down Expand Up @@ -172,8 +224,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 each unsupported_capability pointer as a current server gap rather than invalid product meaning.",
"Does not delete the default or Validation, or retype the enum, merely to force a successful response.",
"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.",
"Preserves the complete local Plan and every existing subject_uuid.",
"Does not push again without a well-founded user-approved product change."
],
Expand Down
4 changes: 4 additions & 0 deletions evals/create-full-stack-app/fixtures/initialized-state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"format": "firstdraft.cli-state/1",
"project_id": "019fb095-2a53-71bd-b707-e9a58a665079"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"format": "firstdraft.foundation-plan.sketch/0.19",
"target": {
"id": "rails",
"profile": "rails-sketch/2026-07"
},
"application": {
"key": "ranked_tasks",
"name": "Ranked Tasks",
"native": {},
"delivery": {},
"entities": [
{
"subject_uuid": "019fb088-f094-719b-884f-8103ded44e99",
"key": "task",
"name": "Task",
"primary_descriptor": {
"field": "task.title"
},
"fields": [
{
"subject_uuid": "019fb088-f0bb-72fe-8d31-44dc6e07e609",
"key": "title",
"name": "Title",
"type": "short_text",
"required": true
},
{
"subject_uuid": "019fb088-f0e1-79e8-864b-7323270f7e4c",
"key": "priority",
"name": "Priority",
"type": "enum",
"required": true,
"settings": {
"values": [
{
"subject_uuid": "019fb088-f10c-7b84-b98d-ec89c752c040",
"key": "low",
"name": "Low"
},
{
"subject_uuid": "019fb088-f138-7a6d-952e-04c4782d1e3f",
"key": "medium",
"name": "Medium"
},
{
"subject_uuid": "019fb088-f160-73b6-9418-e0d7e73d21a3",
"key": "high",
"name": "High"
}
],
"ordinal": true
}
}
]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,6 @@
"subject": null,
"related_locations": [],
"suggestions": []
},
{
"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/1/settings"
},
"subject": null,
"related_locations": [],
"suggestions": []
},
{
"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/1/type"
},
"subject": null,
"related_locations": [],
"suggestions": []
}
]
}
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 @@ -11,8 +11,9 @@ Plan for deterministic Compilation. Keep product judgment in the agent and deter
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, scalar Fields, and Field
or system-Field Primary Descriptors. These slices are not released end to end.
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.

## Load the relevant references

Expand Down
70 changes: 70 additions & 0 deletions skills/create-full-stack-app/references/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,76 @@ The Entity and Field have independent UUIDs. The `primary_descriptor` uses a typ
UUID. The reviewed importer also accepts `boolean`, `date`, `datetime`, `decimal`, `integer`, `language_code`,
`long_text`, `time_zone`, and `url` Fields when they use only the supported schema-valid scalar properties.

## Ordinal enum Field

Use an enum for a closed set of named choices. This complete document is structurally valid v0.19 and accepted by
the reviewed bounded importer. Here, priority order carries semantic rank, so `ordinal` is `true`.

```json
{
"format": "firstdraft.foundation-plan.sketch/0.19",
"target": {
"id": "rails",
"profile": "rails-sketch/2026-07"
},
"application": {
"key": "ranked_tasks",
"name": "Ranked Tasks",
"native": {},
"delivery": {},
"entities": [
{
"subject_uuid": "019fb088-f094-719b-884f-8103ded44e99",
"key": "task",
"name": "Task",
"primary_descriptor": {
"field": "task.title"
},
"fields": [
{
"subject_uuid": "019fb088-f0bb-72fe-8d31-44dc6e07e609",
"key": "title",
"name": "Title",
"type": "short_text",
"required": true
},
{
"subject_uuid": "019fb088-f0e1-79e8-864b-7323270f7e4c",
"key": "priority",
"name": "Priority",
"type": "enum",
"required": true,
"settings": {
"values": [
{
"subject_uuid": "019fb088-f10c-7b84-b98d-ec89c752c040",
"key": "low",
"name": "Low"
},
{
"subject_uuid": "019fb088-f138-7a6d-952e-04c4782d1e3f",
"key": "medium",
"name": "Medium"
},
{
"subject_uuid": "019fb088-f160-73b6-9418-e0d7e73d21a3",
"key": "high",
"name": "High"
}
],
"ordinal": true
}
}
]
}
]
}
}
```

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.

## Stored and reverse relationship

This complete document is structurally valid v0.19, but References and authored Associations remain outside the
Expand Down
28 changes: 20 additions & 8 deletions skills/create-full-stack-app/references/foundation-plan-019.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,18 @@ authorized.
- The v0.19 corpus passes the First Draft JSON Schema and strict loader.
- Structural validity does not prove readable-link resolution, whole-application consistency, target support, or
compilability.
- The reviewed conditional PUT imports empty drafts and a bounded subset of Entities, scalar Fields, and Field or
system-Field Primary Descriptors.
- The reviewed conditional PUT imports empty drafts and a bounded subset of Entities, ten scalar Field kinds, enum
Fields with ordered values, and Field or system-Field Primary Descriptors.
- There is no released end-to-end CLI/API workflow, complete nonempty import, GET or pull operation, complete
semantic analyzer, Publish action, Compilation action, or generated Foundation.

The bundled schema was copied from the
[First Draft source at revision `12fa2a6`](https://github.com/firstdraft/firstdraft/blob/12fa2a6bcac122196d55f5528fbc3f1363c684e3/docs/architecture/design/foundation-plan.schema.json)
and has SHA-256
`5994c41f65eab52f92020fa24437e76b6957b7016ccf231dce06e8097f0b34b5`. The reviewed public CLI baseline is
`5994c41f65eab52f92020fa24437e76b6957b7016ccf231dce06e8097f0b34b5`. The reviewed public API baseline is
[`3282954b6eefef4ab47ccba1c2ee7008315bee92`](https://github.com/firstdraft/firstdraft/commit/3282954b6eefef4ab47ccba1c2ee7008315bee92)
and contains those same schema bytes.
The reviewed public CLI baseline is
[`0681afd48d7825a7a1a0112e248f3013d0123743`](https://github.com/firstdraft/cli/commit/0681afd48d7825a7a1a0112e248f3013d0123743);
it has not been released and exposes `plan init`, `plan subject-id`, and `plan push`. Check commands rather than
inferring compatibility from an unreleased version number. Update this Skill deliberately when either contract
Expand Down Expand Up @@ -124,17 +127,26 @@ descriptors are not yet supported. A Field may use these types:
- `date`
- `datetime`
- `decimal`
- `enum`
- `integer`
- `language_code`
- `long_text`
- `short_text`
- `time_zone`
- `url`

For those types, the importer retains schema-valid combinations of `subject_uuid`, `key`, `name`, `type`,
For every supported type, the importer retains schema-valid combinations of `subject_uuid`, `key`, `name`, `type`,
`required`, `notes`, `immutable`, `comparison`, `normalizations`, `encrypted_at_rest`, and `redact_from_logs`.

Any Field type outside the list above, Field defaults, Validations, derivations, Field settings, References,
Associations, and other Entity or Application capabilities remain unsupported. One unsupported pointer rejects the
complete conditional PUT with `foundation_plan.import.unsupported_capability` and no mutation. That diagnostic
describes server capability, not invalid product meaning. Preserve the authored Plan and report the exact gap.
An `enum` Field additionally requires `settings.values`, a nonempty array in stable order. Each value
has its own `subject_uuid`, owner-local `key`, and human-facing `name`; mint an ID for each new value with
`firstdraft plan subject-id`. Set the optional `settings.ordinal` to `true` only when the order carries semantic
rank. Omit it when the order is presentational because omission and `false` are equivalent. Preserve a value's
UUID through renames, reordering, and coherent moves between enum Fields.

Scalar Fields have no `settings` object, and enum `settings` admits only `values` and optional `ordinal`; any other
settings shape is structurally invalid rather than an importer capability gap. Schema-valid Field types outside
the list above, Field defaults, Validations, derivations, References, Associations, and other Entity or Application
capabilities remain unsupported. One unsupported pointer rejects the complete conditional PUT with
`foundation_plan.import.unsupported_capability` and no mutation. That diagnostic describes server capability, not
invalid product meaning. Preserve the authored Plan and report the exact gap.
3 changes: 3 additions & 0 deletions skills/create-full-stack-app/references/modeling-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ For each Entity:
Do not infer uniqueness from a label, presence from a form, or immutability from current UI. Ask when those facts
matter.

Use an `enum` for a closed named set. Give every value its own stable identity, and set `ordinal` only when value
order carries semantic rank rather than presentation order alone.

## Model relationships

Put a Reference on the Entity that stores the relationship fact. Ask:
Expand Down
Loading