Modifying cli manifest schema

From golemcloud/golem · View interactive version

Modifying cli manifest schema is an AI agent skill from the GitHub repository golemcloud/golem. Changing the current application manifest JSON schema and aligning CLI schema references.

How to use this skill

Skill file

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

  1. 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.

  1. Do not add or preserve compatibility parsing, fallback defaults, upgrade paths, aliases,

deprecated fields, migrations, backfills, or support for older manifest versions.

  1. 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.

  1. 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.

  1. If the YAML document version changes, update the CLI to accept the new current version rather

than keeping the previous version supported.

Important Terminology

sdk::MANIFEST in cli/golem-cli/src/versions.rs.

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

  1. Read cli/golem-cli/src/versions.rs and identify the schema directory named by

manifest_schema_version!().

  1. Modify that current schema in place, or create a new publication directory only when the task's

release/schema-hosting requirements call for one.

  1. Update the Rust manifest model and serde behavior so the implementation and JSON Schema describe

the same contract.

  1. Update cli/golem-cli/src/versions.rs:
  1. If sdk::MANIFEST changes, replace the old-version policy in

cli/golem-cli/src/app/manifest_version.rs with the new current contract. Do not keep previous

versions accepted or generate compatibility upgrades.

  1. Check every schema-version consumer, especially:
  1. Update all in-tree manifests, templates, examples, fixtures, tests, and generated artifacts that

use the changed field or version.

  1. Run focused validation, checks, and tests.

Things To Watch

schema validation agree.

schema version.

must continue accepting. Leave unrelated history untouched, but do not update it or route current

behavior through it.

Useful Files

Verification Checklist

  1. The current schema validates the changed manifest shape and rejects removed shapes.
  2. Serde parsing and JSON Schema validation agree.
  3. CLI version constants and emitted $schema references point to the sole current contract.
  4. No compatibility parser, alias, old-version support, upgrade path, migration, or backfill was

added or retained for the changed contract.

  1. All in-tree manifests and generated examples use the current shape.
  2. cargo check -p golem-cli passes.
  3. Focused manifest schema/version tests pass with --report-time.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.