Skip to content

feat: publish the official catalog and StackConfig JSON Schema #272

Description

@lloydrichards

Publish the official catalog and the JSON Schema for stack.effect.json through the docs site. A compatible catalog update must reach users without a CLI release.

Parent: #275. Blocked by #271. Land the shared configuration declaration first so #273 and #274 can consume it while publication work continues.

Deliver the configuration schema

  • Add optional $schema editor metadata to the canonical StackConfig declaration. Old configurations without it must remain valid.
  • Define the canonical URL as https://stack-effect.lloydrichards.dev/schemas/v1/stack.effect.schema.json.
  • Generate JSON Schema draft 2020-12 from StackConfig. Use the existing Schema.toStandardJSONSchemaV1 pattern in apps/cli/src/commands/schema.ts.
  • Give the generated schema a $id for its hosted URL and a $schema for its JSON Schema dialect. These are separate from the optional $schema field in project configuration.
  • Keep independently evolving catalog IDs out of exhaustive schema enums. Validate selections against the loaded catalog.

The CLI continues to validate with its installed domain schema. A hosted schema update must not make it fetch arbitrary schema URLs or claim support for new runtime behavior.

This issue owns the domain declaration and schema generator. #273 owns CLI configuration output and round trips. #274 owns the builder's generated configuration.

Deliver the public assets

Generate both assets from local authoring definitions during development and a clean docs build:

Public URL Suggested source location
https://stack-effect.lloydrichards.dev/registry/v1/catalog.json apps/docs/public/registry/v1/catalog.json
https://stack-effect.lloydrichards.dev/schemas/v1/stack.effect.schema.json apps/docs/public/schemas/v1/stack.effect.schema.json

Build-emitted assets are also acceptable. Public URLs must not contain /public/. Asset generation must not fetch the production catalog.

Publish both files in one docs deployment. Return JSON content types and revalidation cache headers, not immutable. Support conditional requests. For cross-origin use, allow public GET requests and expose validators such as ETag. A missing registry path must return 404 rather than the app shell.

Reject exports outside #271's fixed v1 capability set. Keep an append-only fixture of published target and module IDs to catch removal or renaming. The fixture records identifiers, not historical catalog payloads. Template fixes may change generated bytes, but must pass representative generation tests.

The hosting provider is not identified in tracked config. Inspect the actual deployment setup, implement its header and route rules, and record a rollback procedure. Keep local and deployed evidence separate. Report missing deployment access if it prevents completion.

Done when

  • A clean build and local development server expose both generated JSON assets at the agreed paths.
  • Old configs decode, and example configs validate against the generated JSON Schema with and without $schema metadata.
  • Tests reject removed published IDs and unsupported interpreter capabilities.
  • Real deployed requests prove content types, conditional requests, CORS behavior, and a genuine 404.
  • A catalog content update reaches the deployed endpoint without publishing the CLI.
  • Deployment and rollback instructions identify the actual provider. Share this evidence with feat: deliver and qualify the official HTTP catalog registry #275.

Keep out of this issue

CLI and browser persistence adapters, configuration-source selection, immutable catalog archives, and content-version resolution. #275 owns the combined release decision.

Validate

Run bun format, bun lint, bun run type-check, affected scoped tests, and the docs build. Never use bun test. Use the catalog-workspace skill for template changes and bun run okf:check for knowledge changes. Do not claim deployed behavior from local tests alone.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions