afd-spec

JSON Schemas

The AFD JSON Schema files are generated from the Zod definitions in @appstrate/core and included in this repository for self-contained reference.

Files

File Package Type Description
flow.schema.json flow Flow manifest with requires, schemas, execution
skill.schema.json skill Skill manifest (minimal, pairs with SKILL.md)
extension.schema.json extension Extension manifest (pairs with .ts source)
provider.schema.json provider Provider manifest with auth definition

Each schema locks the type field to a single value via const.

Canonical Source

These files are generated from @appstrate/core/src/validation.ts using zod-to-json-schema. The canonical source is the npm package:

npm: @appstrate/core/schema/skill.schema.json
npm: @appstrate/core/schema/extension.schema.json
npm: @appstrate/core/schema/flow.schema.json
npm: @appstrate/core/schema/provider.schema.json

If a discrepancy is found between this repository and the npm package, the npm package takes precedence. Please open a spec change issue if you notice a drift.

Usage

Editors supporting JSON Schema (VS Code, JetBrains) can use these files for validation and auto-completion. Reference a schema from a manifest using $schema:

{
  "$schema": "https://afd.appstrate.dev/schema/flow.schema.json",
  "name": "@scope/my-flow",
  "version": "1.0.0",
  "type": "flow"
}