A minimal runtime for managing run manifests in AI workflows.
- run manifest schema
- lifecycle state machine
- run generator
- safe manifest updates
This project was extracted from a larger experimental system called AI Factory, which explores the idea of an AI-powered engineering workflow runtime.
AI Factory itself is not open source. This package contains only the generic run lifecycle components.
schema/run.schema.jsonruntime/run-generator.jsruntime/run-state-machine.jstools/update-run-manifest.jsexamples/example-task.jsonexamples/example-run.json
Generate a run manifest from a task:
RUN_FILE=$(node runtime/run-generator.js --task examples/example-task.json --profile default --project demo)
echo "$RUN_FILE"
cat "$RUN_FILE"Update a run manifest safely:
node tools/update-run-manifest.js \
--run-file "$RUN_FILE" \
--patch '{"status":"in_progress","validation":{"run":"pending"}}'
cat "$RUN_FILE"Try an invalid state transition:
node tools/update-run-manifest.js \
--run-file "$RUN_FILE" \
--patch '{"status":"pending"}'Expected result:
Invalid run state transition: in_progress -> pending
Many agent systems can execute steps, but they lack a clear and portable run lifecycle.
run-contract-engine focuses on the generic contract layer:
- create run manifests
- validate them against schema
- enforce lifecycle transitions
- update manifests safely
Experimental, but already usable as a minimal building block for AI workflow runtimes.
- Node.js 18+
MIT
An experimental AI workflow runtime for building AI-powered development systems.