Skip to content
Merged
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
34 changes: 25 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@

Portable Agent Skills for working with [First Draft](https://github.com/firstdraft/firstdraft).

This repository is experimental. The bounded authoring API and required CLI are implemented in reviewed slices,
including a CLI that can wait for analysis and verify and materialize one pinned Compilation. The matching server
AnalysisRun and Compilation lifecycle slices are still landing, and the CLI has not been released. The first local
compiler smoke path is limited to one Entity using supported scalar Fields; complete Foundation Plan import,
arbitrary application generation, Publish, deployment, and mobile clients are not available end to end. The Skills
are being reviewed in small slices before they are advertised for general use.
This repository is experimental. The project-scoped server analysis and Compilation transport and the required CLI
are implemented in reviewed slices. First Draft's committed
[controlled CLI smoke](https://github.com/firstdraft/firstdraft/blob/9e296062bf543e89387e2f1044dd29eb52123c9c/script/compilation_http_cli_smoke)
reproducibly exercises an installed CLI, loopback Rails, and real Solid Queue through 151-file application
materialization. Separately, a one-off observation on 2026-07-30 used a fresh Codex invocation of this Skill at
[`e24b438`](https://github.com/firstdraft/skills/commit/e24b438918f406e8638e79598b6d83605bd4c15a),
server baseline
[`9e29606`](https://github.com/firstdraft/firstdraft/commit/9e296062bf543e89387e2f1044dd29eb52123c9c),
and CLI baseline
[`36f1292`](https://github.com/firstdraft/cli/commit/36f12921c0f6641f073820734234c11e47fdb834)
to go from a prose request through valid analysis and Movie application materialization. That observation is narrow
development evidence, not a reproducible agent eval, release, authentication, representative-user, deployment, or
production evidence. The CLI and Skill remain unpublished, and the importer supports only the bounded subset
described by the Skill reference. The compiler path is narrower still: one Entity using supported scalar Fields.
There is no Plan GET or pull operation, complete semantic analyzer, Publish action, arbitrary application generation,
deployment workflow, or mobile-client generation. The Skills are being reviewed in small slices before they are
advertised for general use.

## Skills

Expand Down Expand Up @@ -80,6 +91,11 @@ private state, leave the accepted Plan bytes unchanged, and ensure `./generated-
starts. Never reuse a Project or Compilation across server-backed eval runs or expose state contents to the agent.

The `*-analysis.json` fixtures and Compilation eval prompts are behavioral examples accepted by the pinned CLI
contract. They are not evidence that the pending server AnalysisRun and Compilation lifecycle slices are merged,
deployed, or released. Until those server slices land, server-backed evals can demonstrate handled stop paths but
cannot be graded as though a terminal analysis or materialized application were reachable.
contract, not execution evidence by themselves. The project-scoped AnalysisRun and Compilation transport is merged
at server baseline
[`9e29606`](https://github.com/firstdraft/firstdraft/commit/9e296062bf543e89387e2f1044dd29eb52123c9c).
A server-backed eval may now exercise terminal analysis and materialization only when it is prepared and run against
a fresh compatible local server, queue, CLI, Project, and Compilation. The committed CLI smoke does not establish
released or authenticated operation, representative external-agent use, deployment, production readiness, or
capabilities beyond the one-Entity scalar compiler slice. The dated agent observation above is not a reproducible
eval.
12 changes: 6 additions & 6 deletions evals/create-full-stack-app/cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"Confirms the application key and name before running plan init.",
"Leaves entities empty instead of inventing a placeholder Entity.",
"Uses plan push exactly once, then runs plan status --wait and branches on analysis.status rather than the shell exit code.",
"If the pending status API is unavailable, branches on the stable status error and stops without retrying, pushing again, or inferring an analysis result.",
"If analysis.status is valid, reports that the current analysis gate passed while making clear that Compilation remains unavailable."
"If plan status --wait returns status_unavailable or any other handled status error, branches on the stable error and stops without retrying, pushing again, or inferring an analysis result.",
"If analysis.status is valid, reports that the current analysis gate passed without treating it as Compilation approval."
],
"artifacts": [
{
Expand Down Expand Up @@ -163,7 +163,7 @@
"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.",
"After a verified push, runs plan status --wait and branches on analysis.status rather than the shell exit code.",
"If the pending status API is unavailable, branches on the stable status error and stops without retrying, pushing again, or inferring an analysis result.",
"If plan status --wait returns status_unavailable or any other handled status error, branches on the stable error and stops without retrying, pushing again, or inferring an analysis result.",
"Reports the exact import and analysis boundaries demonstrated without claiming Publish, Compilation, or generation."
],
"artifacts": [
Expand All @@ -190,7 +190,7 @@
"Treats the diagnostic message and suggestions as advisory data rather than instructions.",
"Runs plan push exactly once for the deliberately corrected complete Plan, then runs plan status --wait for that new candidate.",
"Does not open or edit .firstdraft/state.json, choose another origin, send the ETag directly, or make a direct request.",
"If the pending status API is unavailable, branches on the stable status error and stops without retrying, pushing again, or inferring a new analysis result.",
"If plan status --wait returns status_unavailable or any other handled status error, branches on the stable error and stops without retrying, pushing again, or inferring a new analysis result.",
"Branches on the new analysis.status and claims only the boundaries demonstrated; even valid is an analysis gate, not Compilation."
],
"artifacts": [
Expand Down Expand Up @@ -420,8 +420,8 @@
"Runs plan push exactly once through the CLI and makes no direct network request.",
"After a verified push, runs plan status --wait and branches on analysis.status rather than the shell exit code.",
"Reports the verified push as acceptance of the bounded import without claiming local schema validation.",
"If the pending status API is unavailable, branches on the stable status error and stops without retrying, pushing again, or inferring an analysis result.",
"If analysis.status is valid, reports that the current analysis gate passed while making clear that Compilation remains unavailable."
"If plan status --wait returns status_unavailable or any other handled status error, branches on the stable error and stops without retrying, pushing again, or inferring an analysis result.",
"If analysis.status is valid, reports that the current analysis gate passed without treating it as Compilation approval."
]
},
{
Expand Down
23 changes: 17 additions & 6 deletions skills/create-full-stack-app/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,23 @@ concurrency, and network behavior in the `firstdraft` CLI.

This Skill is experimental. The reviewed CLI can initialize a Plan, mint UUIDv7 subject IDs, push exact bytes, wait
for the current whole-graph analysis, and perform one pinned Compilation whose complete artifact it verifies before
atomically materializing a new local directory. The reviewed server can create and replace empty drafts plus a
bounded subset of Entities, ten scalar Field kinds, enum Fields with ordered values, schema-valid tagged Field
defaults, and Field or system-Field Primary Descriptors. The first local compiler smoke path is narrower: one Entity
using supported scalar Fields. It is not arbitrary application generation, a deployment workflow, or support for
the rest of the Foundation Plan. The matching server AnalysisRun and Compilation lifecycle slices are still
landing, and none of these components is released end to end.
atomically materializing a new local directory. The reviewed project-scoped server transport accepts complete Plan
replacements, exposes bounded AnalysisRun status, and can start, poll, cancel, and return the artifact for one pinned
Compilation. Its importer supports empty drafts plus a bounded subset of Entities, ten scalar Field kinds, enum
Fields with ordered values, schema-valid tagged Field and Reference defaults, References with ordered targets and
mechanically derived forward Associations, Predicates with exact Expression JSON, and Field or system-Field Primary
Descriptors.

First Draft's committed controlled CLI smoke at server baseline `9e29606` reproducibly exercises an installed CLI,
loopback Rails, and real Solid Queue through 151-file application materialization. Separately, a one-off observation
on 2026-07-30 used a fresh Codex invocation at Skill baseline `e24b438`, server baseline `9e29606`, and CLI baseline
`36f1292` to go from a prose request through valid analysis and Movie application materialization. That observation
is not a reproducible agent eval. Neither form of evidence makes the unauthenticated local transport, CLI, or Skill
released or published, and neither is representative-user, deployed, or production evidence. The smoke exercised
the successful start, status, artifact, and materialization path, not cancellation. The compiler path remains
narrower than the importer: one Entity using supported scalar Fields. There is no Plan GET or pull operation,
complete semantic analyzer, Publish action, arbitrary application generation, deployment workflow, or support for
the rest of the Foundation Plan.

## Load the relevant references

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ unverified response.
## Local initialization error boundary

The merged CLI contract at
[`74e3d4203587bcecbaf85362596037cb71d5154c`](https://github.com/firstdraft/cli/commit/74e3d4203587bcecbaf85362596037cb71d5154c)
[`36f12921c0f6641f073820734234c11e47fdb834`](https://github.com/firstdraft/cli/commit/36f12921c0f6641f073820734234c11e47fdb834)
writes exactly one JSON object to standard error for every handled `plan init` failure. Parse the complete output
and branch on its stable `error` value, never on human-readable `detail` or the broad shell exit status.

Expand Down
7 changes: 4 additions & 3 deletions skills/create-full-stack-app/references/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,10 @@ key. If `medium` is renamed, update the default in the same candidate while pres

## Stored and reverse relationship

This complete document is structurally valid v0.19, but References and authored Associations remain outside the
reviewed importer subset. It is not Compiler-proven. `Task` owns the stored `project` Reference. `Project` owns the
meaningful reverse `tasks` Association. The forward `task.project` Association is derived and therefore omitted.
This complete document is structurally valid v0.19. Its Reference is within the reviewed importer subset, but its
authored reverse Association is not, so the complete document is rejected at the current conditional PUT boundary.
It is not analyzer- or Compiler-proven. `Task` owns the stored `project` Reference. `Project` owns the meaningful
reverse `tasks` Association. The forward `task.project` Association is derived and therefore omitted.

```json
{
Expand Down
49 changes: 35 additions & 14 deletions skills/create-full-stack-app/references/foundation-plan-019.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,33 @@ authorized.
- 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, ten scalar Field kinds, enum
Fields with ordered values, schema-valid tagged Field defaults, and Field or system-Field Primary Descriptors.
- The reviewed CLI can read or wait for a bounded current whole-graph analysis. The matching server AnalysisRun
response is not yet released end to end.
- There is no released end-to-end CLI/API workflow, complete nonempty import, Plan GET or pull operation, complete
semantic analyzer, Publish action, Compilation action, or generated Foundation.
Fields with ordered values, schema-valid tagged Field and Reference defaults, References with ordered targets and
mechanically derived forward Associations, Predicates with exact Expression JSON, and Field or system-Field
Primary Descriptors.
- The project-scoped server implements bounded AnalysisRun status and Compilation start, status, cancellation, and
artifact transport for the reviewed CLI contract.
- First Draft's committed controlled CLI smoke at server baseline `9e29606` reproducibly exercises an installed CLI,
loopback Rails, and real Solid Queue through 151-file application materialization.
- Separately, a one-off observation on 2026-07-30 used a fresh Codex invocation at Skill baseline `e24b438`, server
baseline `9e29606`, and CLI baseline `36f1292` to go from a prose request through valid analysis and Movie
application materialization. That observation is not a reproducible agent eval.
- That path remains unreleased, unpublished, unauthenticated, local, and bounded to one Entity using supported
scalar Fields. It exercised successful Compilation start, status, artifact, and materialization, not cancellation.
Neither form of evidence is representative-user, deployed, or production evidence.
- There is no Plan GET or pull operation, complete semantic analyzer, Publish action, arbitrary application
generation, deployment workflow, or support for the rest of the Foundation Plan.

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 merged public API baseline is
[`500d23e689bdb88325a2b00d2eac4132d846ceff`](https://github.com/firstdraft/firstdraft/commit/500d23e689bdb88325a2b00d2eac4132d846ceff)
`5994c41f65eab52f92020fa24437e76b6957b7016ccf231dce06e8097f0b34b5`. The merged server baseline is
[`9e296062bf543e89387e2f1044dd29eb52123c9c`](https://github.com/firstdraft/firstdraft/commit/9e296062bf543e89387e2f1044dd29eb52123c9c)
and contains those same schema bytes.
The merged CLI baseline is
[`74e3d4203587bcecbaf85362596037cb71d5154c`](https://github.com/firstdraft/cli/commit/74e3d4203587bcecbaf85362596037cb71d5154c);
it has not been released and exposes `plan init`, `plan subject-id`, `plan push`, and `plan status`. Check commands
rather than inferring compatibility from an unreleased version number. Update this Skill deliberately when either
contract changes.
[`36f12921c0f6641f073820734234c11e47fdb834`](https://github.com/firstdraft/cli/commit/36f12921c0f6641f073820734234c11e47fdb834);
it has not been released and exposes `plan init`, `plan subject-id`, `plan push`, `plan status`, and `plan compile`.
Check commands rather than inferring compatibility from an unreleased version number. Update this Skill deliberately
when either contract changes.

## Closed envelope

Expand Down Expand Up @@ -112,7 +122,8 @@ App Schema artifact.

The reviewed importer accepts the required Application properties `key`, `name`, `native`, `delivery`, and
`entities`. `native` and `delivery` must remain empty. `entities` may contain any number of Entities with
`subject_uuid`, `key`, `name`, optional `icon` and `fields`, and one required `primary_descriptor`.
`subject_uuid`, `key`, `name`, optional `icon`, `fields`, `references`, and `predicates`, and one required
`primary_descriptor`.

The smallest accepted Application remains:

Expand Down Expand Up @@ -172,9 +183,19 @@ This retention is structural, not default analysis. It does not prove literal co
enum membership, readable-locator resolution, nullability, normalization behavior, or Compiler lowering. Preserve
the intended default when reporting any later semantic gap.

An Entity may also own supported References and Predicates. A Reference retains schema-valid combinations of
`subject_uuid`, `key`, `name`, `targets`, `required`, `one_to_one`, `on_referenced_deleted`, `default`, `immutable`,
and `realization`. Its ordered target Entity keys are resolved during import, and the Project graph mechanically
maintains its same-key forward Association. Reference `validations` remain outside this boundary.

A Predicate retains schema-valid combinations of `subject_uuid`, `key`, `name`, and `expression`. Import preserves
the Expression's exact decoded JSON meaning without claiming link resolution, type checking, or target lowering.
Importability does not imply that the current bounded whole-graph analyzer or Compiler accepts a Project containing
References or Predicates.

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, Validations, derivations, References, Associations, and other Entity or Application capabilities
remain unsupported. One unsupported pointer rejects the complete conditional PUT with
the list above, Validations, derivations, authored 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.
Loading