Modifying the CLI Manifest Schema
Use this skill when changing the Golem application manifest JSON schema under
cli/schema.golem.cloud/app/golem/ or when adding/removing manifest fields in
cli/golem-cli that must be reflected in schema validation and generated
template references.
Do not use this skill for the structured command output schema under
cli/golem-cli/command-output-schema/command-output.schema.json. For
StructuredOutput types, structured-output serializers, or command-output schema generators, use
modifying-cli-output-schema instead.
Core Rules
- Change the current manifest contract directly and update every in-tree parser, model, template,
example, fixture, test, schema reference, and generated application that consumes it.
- Do not add or preserve compatibility parsing, fallback defaults, upgrade paths, aliases,
deprecated fields, migrations, backfills, or support for older manifest versions.
- Edit the schema directory named by
manifest_schema_version!() unless release or schema-hosting
work requires a new publication identifier. A new directory is a publication decision, not a
compatibility mechanism.
- When a new schema identifier is required, copy the current directory, update its
$id, make it
the sole current schema reference, and apply the contract change there. Do not backfill
historical schema directories.
- If the YAML document version changes, update the CLI to accept the new current version rather
than keeping the previous version supported.
Important Terminology
- Manifest version: the version of the YAML document itself, exposed as
sdk::MANIFEST in cli/golem-cli/src/versions.rs.
- Manifest schema version: the version of the JSON schema under
cli/schema.golem.cloud/app/golem/<version>/golem.schema.json, exposed via
manifest_schema_version!() in cli/golem-cli/src/versions.rs.
These are NOT the same concept and do not have to move together.
Schema hosting may use development identifiers such as 1.6.0-dev.8 while the manifest document
uses a release-line identifier such as 1.6.0. Follow explicit release direction when choosing a
new publication identifier; do not invent a version bump merely to retain the old schema.
Workflow
- Read
cli/golem-cli/src/versions.rs and identify the schema directory named by
manifest_schema_version!().
- Modify that current schema in place, or create a new publication directory only when the task's
release/schema-hosting requirements call for one.
- Update the Rust manifest model and serde behavior so the implementation and JSON Schema describe
the same contract.
- Update
cli/golem-cli/src/versions.rs:
- change
sdk::MANIFEST only when the YAML document version changes;
- change
manifest_schema_version!() only when using a new schema publication identifier.
- If
sdk::MANIFEST changes, replace old-version policy and upgrade behavior in
cli/golem-cli/src/app/manifest_version.rs and manifest_upgrade.rs with the new current
contract. Do not keep previous versions accepted or generate compatibility upgrades.
- Check every schema-version consumer, especially:
cli/golem-cli/src/lib.rs
cli/golem-cli/src/app/template/snippet.rs
cli/golem-cli/src/app/build/check/mod.rs
- tests containing embedded
$schema references
- Update all in-tree manifests, templates, examples, fixtures, tests, and generated artifacts that
use the changed field or version.
- Run focused validation, checks, and tests.
Things To Watch
- Do not assume
sdk::MANIFEST and manifest_schema_version!() should always match.
- When introducing a new field or enum value, ensure both serde parsing and JSON
schema validation agree.
- If the CLI emits manifest templates/snippets, make sure they reference the new
schema version.
- Historical schema directories are publication artifacts, not contracts that current CLI code
must continue accepting. Leave unrelated history untouched, but do not update it or route current
behavior through it.
Useful Files
cli/golem-cli/src/versions.rs
cli/golem-cli/src/lib.rs
cli/golem-cli/src/app/template/snippet.rs
cli/golem-cli/src/app/manifest_version.rs
cli/golem-cli/src/app/manifest_upgrade.rs
cli/golem-cli/src/app/build/check/mod.rs
cli/golem-cli/src/model/app_raw.rs
cli/schema.golem.cloud/app/golem/*/golem.schema.json
Verification Checklist
- The current schema validates the changed manifest shape and rejects removed shapes.
- Serde parsing and JSON Schema validation agree.
- CLI version constants and emitted
$schema references point to the sole current contract.
- No compatibility parser, alias, old-version support, upgrade path, migration, or backfill was
added or retained for the changed contract.
- All in-tree manifests and generated examples use the current shape.
cargo check -p golem-cli passes.
- Focused manifest schema/version tests pass with
--report-time.
1---2name: modifying-cli-manifest-schema3description: Changing the current application manifest JSON schema and aligning CLI schema references.4---56# Modifying the CLI Manifest Schema78Use this skill when changing the Golem application manifest JSON schema under9`cli/schema.golem.cloud/app/golem/` or when adding/removing manifest fields in10`cli/golem-cli` that must be reflected in schema validation and generated11template references.1213Do **not** use this skill for the structured command output schema under14`cli/golem-cli/command-output-schema/command-output.schema.json`. For15`StructuredOutput` types, structured-output serializers, or command-output schema generators, use16`modifying-cli-output-schema` instead.1718## Core Rules19201. Change the current manifest contract directly and update every in-tree parser, model, template,21 example, fixture, test, schema reference, and generated application that consumes it.222. Do not add or preserve compatibility parsing, fallback defaults, upgrade paths, aliases,23 deprecated fields, migrations, backfills, or support for older manifest versions.243. Edit the schema directory named by `manifest_schema_version!()` unless release or schema-hosting25 work requires a new publication identifier. A new directory is a publication decision, not a26 compatibility mechanism.274. When a new schema identifier is required, copy the current directory, update its `$id`, make it28 the sole current schema reference, and apply the contract change there. Do not backfill29 historical schema directories.305. If the YAML document version changes, update the CLI to accept the new current version rather31 than keeping the previous version supported.3233## Important Terminology3435- **Manifest version**: the version of the YAML document itself, exposed as36 `sdk::MANIFEST` in `cli/golem-cli/src/versions.rs`.37- **Manifest schema version**: the version of the JSON schema under38 `cli/schema.golem.cloud/app/golem/<version>/golem.schema.json`, exposed via39 `manifest_schema_version!()` in `cli/golem-cli/src/versions.rs`.4041These are NOT the same concept and do not have to move together.4243Schema hosting may use development identifiers such as `1.6.0-dev.8` while the manifest document44uses a release-line identifier such as `1.6.0`. Follow explicit release direction when choosing a45new publication identifier; do not invent a version bump merely to retain the old schema.4647## Workflow48491. Read `cli/golem-cli/src/versions.rs` and identify the schema directory named by50 `manifest_schema_version!()`.512. Modify that current schema in place, or create a new publication directory only when the task's52 release/schema-hosting requirements call for one.533. Update the Rust manifest model and serde behavior so the implementation and JSON Schema describe54 the same contract.554. Update `cli/golem-cli/src/versions.rs`:56 - change `sdk::MANIFEST` only when the YAML document version changes;57 - change `manifest_schema_version!()` only when using a new schema publication identifier.585. If `sdk::MANIFEST` changes, replace old-version policy and upgrade behavior in59 `cli/golem-cli/src/app/manifest_version.rs` and `manifest_upgrade.rs` with the new current60 contract. Do not keep previous versions accepted or generate compatibility upgrades.616. Check every schema-version consumer, especially:62 - `cli/golem-cli/src/lib.rs`63 - `cli/golem-cli/src/app/template/snippet.rs`64 - `cli/golem-cli/src/app/build/check/mod.rs`65 - tests containing embedded `$schema` references667. Update all in-tree manifests, templates, examples, fixtures, tests, and generated artifacts that67 use the changed field or version.688. Run focused validation, checks, and tests.6970## Things To Watch7172- Do not assume `sdk::MANIFEST` and `manifest_schema_version!()` should always match.73- When introducing a new field or enum value, ensure both serde parsing and JSON74 schema validation agree.75- If the CLI emits manifest templates/snippets, make sure they reference the new76 schema version.77- Historical schema directories are publication artifacts, not contracts that current CLI code78 must continue accepting. Leave unrelated history untouched, but do not update it or route current79 behavior through it.8081## Useful Files8283- `cli/golem-cli/src/versions.rs`84- `cli/golem-cli/src/lib.rs`85- `cli/golem-cli/src/app/template/snippet.rs`86- `cli/golem-cli/src/app/manifest_version.rs`87- `cli/golem-cli/src/app/manifest_upgrade.rs`88- `cli/golem-cli/src/app/build/check/mod.rs`89- `cli/golem-cli/src/model/app_raw.rs`90- `cli/schema.golem.cloud/app/golem/*/golem.schema.json`9192## Verification Checklist93941. The current schema validates the changed manifest shape and rejects removed shapes.952. Serde parsing and JSON Schema validation agree.963. CLI version constants and emitted `$schema` references point to the sole current contract.974. No compatibility parser, alias, old-version support, upgrade path, migration, or backfill was98 added or retained for the changed contract.995. All in-tree manifests and generated examples use the current shape.1006. `cargo check -p golem-cli` passes.1017. Focused manifest schema/version tests pass with `--report-time`.