Skip to content

Adding a Runtime

A Spawnfile-compatible runtime must:

  1. Run as a long-lived service or daemon
  2. Use a markdown workspace as a first-class agent surface
  3. Expose a declarative config surface the compiler can emit to

Add an entry to runtimes.yaml with status: exploratory:

myruntime:
remote: [email protected]:org/myruntime.git
ref: v1.0.0
default_branch: main
status: exploratory

Clone the runtime and study its config format:

Terminal window
./scripts/runtimes.sh myruntime
./scripts/blueprints.sh myruntime

Document findings in specs/research/RUNTIME-NOTES.md.

Create src/runtime/myruntime/adapter.ts implementing the RuntimeAdapter interface:

  • compileAgent(node) — emit runtime-native config and workspace files
  • compileTeam(node) — optional, for runtimes with native team support
  • validateRuntimeOptions(options) — optional, validate runtime-specific options

Add the adapter to src/runtime/registry.ts.

Write tests in src/runtime/myruntime/adapter.test.ts. Verify output matches the blueprint.

Once tests pass and the adapter produces valid output, change status to active in runtimes.yaml.