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
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@ carry no release status. The `v<version>` tag and npm show whether a version is
Entries start with the first version prepared after this file was added, and earlier versions have none. The
repository's [tags](https://github.com/firstdraft/cli/tags) identify the source of each published version.

## 0.9.0

Moves the Rails target to profile `rails-sketch/2026-10`. First Draft adopts Rails 8.1.4 under that new profile ID and
API contract `0.8.0`, because Rails 8.1.4 changes the generated schema's column order and an inflection rule.

- `plan init` writes Plans that target `rails-sketch/2026-10`. The Plan format stays
`firstdraft.foundation-plan.sketch/0.23`.
- `plan compile` and `compilation download` accept only artifacts for `rails-sketch/2026-10`. An artifact for
`rails-sketch/2026-09-bookmark-assets` reports `invalid_artifact`.
- The accepted API-contract range is `>= 0.8.0` and `< 0.9.0`.

Use CLI 0.9.0 with a Service that serves API `0.8.x`; CLI 0.8.2 writes and accepts only the retired profile. Projects
and Plans on the retired profile are not migrated. First Draft refuses them, and its refusal names the fix: start a
new Project from the Plan.

## 0.8.2

Adds `firstdraft compilation cancel <compilation-id>`, so an agent can recover a Compilation that will not finish
Expand Down
10 changes: 5 additions & 5 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
This page owns the detailed public semantics of the current command surface. Run `firstdraft --help` or a command
group's `--help` for concise executable syntax. See [Errors and recovery](errors.md) before retrying a failed mutation.

The current `0.8.x` source line contains the auditable command shell, browser and device login, local Foundation Plan initialization, local
The current `0.9.x` source line contains the auditable command shell, browser and device login, local Foundation Plan initialization, local
application-key and UUID generation, conditional whole-document push, whole-graph analysis status polling, direct
Compile-and-materialize and private publish orchestration, and retained-Compilation inspection and cancellation.
CLI `0.8.x` requires the service's `0.7.x` API contract. The
CLI `0.9.x` requires the service's `0.8.x` API contract. The
[changelog](https://github.com/firstdraft/cli/blob/main/CHANGELOG.md) describes each version.

## Command map
Expand Down Expand Up @@ -139,7 +139,7 @@ From the project that the Plan describes:
firstdraft plan init --name "Oscar Party"
```

This creates an empty `firstdraft.foundation-plan.sketch/0.23` Plan targeting `rails-sketch/2026-09-bookmark-assets` and a
This creates an empty `firstdraft.foundation-plan.sketch/0.23` Plan targeting `rails-sketch/2026-10` and a
client-generated Project ID under `.firstdraft/`. A nested ignore file keeps that local scratch area out of Git
without changing the project's own `.gitignore`. Initialization makes no network request and refuses to replace an
existing `.firstdraft` path.
Expand Down Expand Up @@ -390,7 +390,7 @@ local paths, or environment values. Success writes exactly the validated private
newline to stdout. If the command fails after progress has begun, its structured JSON error envelope is the final
stderr document after the progress lines.

The closed API `0.7.x` progress-reason allowlist is `github.configuration_missing`, `github.oauth_unavailable`,
The closed API `0.8.x` progress-reason allowlist is `github.configuration_missing`, `github.oauth_unavailable`,
`github.api_unavailable`, `github.reauthorization_required`, `github.account_mismatch`,
`github.installation_unavailable`, `github.installation_not_ready`, `github.preflight_unavailable`, the legacy-only
`github.preflight_unclassified`, and these stage-specific fallbacks: `github.preflight_unavailable.configuration`,
Expand Down Expand Up @@ -440,7 +440,7 @@ never starts replacement work. An incomplete rollback leaves `.firstdraft-root-o
reconciliation before this command can run again.

Artifact validation accepts only Plan format `firstdraft.foundation-plan.sketch/0.23` and target profile
`rails-sketch/2026-09-bookmark-assets`, in addition to matching the retained Compilation's provenance and verifying file integrity.
`rails-sketch/2026-10`, in addition to matching the retained Compilation's provenance and verifying file integrity.
An earlier format or profile is rejected before materialization, even when the retained status names that profile.

Successful root adoption is intentionally one-way. The original `.firstdraft` authoring state moves under
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@firstdraft.com/cli",
"version": "0.8.2",
"version": "0.9.0",
"description": "Command-line interface for First Draft",
"license": "MIT",
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions release/compatibility.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"format": "firstdraft.release-compatibility/1",
"component": "cli",
"version": "0.8.2",
"version": "0.9.0",
"requires": {
"api_contract": [">= 0.7.0", "< 0.8.0"],
"api_contract": [">= 0.8.0", "< 0.9.0"],
"foundation_plan_formats": ["firstdraft.foundation-plan.sketch/0.23"]
}
}
2 changes: 1 addition & 1 deletion src/compilation-artifact.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const ARTIFACT_MEDIA_TYPE =
"application/vnd.firstdraft.compilation-artifact+json";
export const ARTIFACT_FORMAT = "firstdraft.compilation-artifact/1";
export const FOUNDATION_PLAN_FORMAT = "firstdraft.foundation-plan.sketch/0.23";
export const RAILS_TARGET_PROFILE = "rails-sketch/2026-09-bookmark-assets";
export const RAILS_TARGET_PROFILE = "rails-sketch/2026-10";
export const MAX_ARTIFACT_BYTES = 128 * 1024 * 1024;

const ARTIFACT_KEYS = ["format", "provenance", "manifest_sha256", "files"];
Expand Down
5 changes: 4 additions & 1 deletion test/compilation-artifact.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,10 @@ test("pins external provenance identities and validates nested metadata", () =>
});

test("rejects an older target profile even when retained status agrees", () => {
const target = { id: "rails", profile: "rails-sketch/2026-09" };
const target = {
id: "rails",
profile: "rails-sketch/2026-09-bookmark-assets",
};
const fixture = artifactFixture({ provenance: { target } });

assert.throws(
Expand Down
4 changes: 2 additions & 2 deletions test/plan-status.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const ANALYZER_RELEASE =
"foundation-plan-rails/application-2026-09-27-bookmark-assets";
const COMPILER_RELEASE =
"foundation-plan-rails/compiler-application-2026-09-27-bookmark-assets";
const TARGET = { id: "rails", profile: "rails-sketch/2026-09-bookmark-assets" };
const TARGET = { id: "rails", profile: "rails-sketch/2026-10" };
const PLAN_STATUS_HELP = `First Draft CLI

Usage:
Expand Down Expand Up @@ -250,7 +250,7 @@ test("plan status accepts the pinned Service zero-gap canonical digest", async (
const body = analysisBody("valid");
body.analysis.gap_set.gaps = [];
body.analysis.gap_set_sha256 =
"acf87b117814f28e52a85e6c13fb77e58166a38038bb36a6e0b6177995262618";
"c38373ec9f208fb4abb6eeec29c447142dc4f6dd706c8a48286abee4d55d66a8";
const result = await invoke(["plan", "status"], {
cwd,
fetchFunction: recordingFetch([jsonResponse(body)], []),
Expand Down
Loading