Crius is a long-running agent harness for software work.
This repo starts from a different assumption than the old project: autonomous work should not be injected into a live user session. Every run gets an explicit contract, isolated workspace metadata, persisted artifacts, and a planner -> implementation -> evaluator -> handoff lifecycle.
- Isolated runs, not shared chat state
- Explicit contracts before implementation
- External evaluation criteria, not self-grading only
- Durable artifacts for reset-safe continuation
- Runtime guardrails over prompt-only rules
The current codebase is the v2 foundation:
src/contracts/defines run contracts and validationsrc/store/persists contracts, state, and artifacts under.crius/runs/src/runner/drives the staged lifecyclesrc/improver/initializes isolated improve-project runs with git worktreessrc/providers/executes planning, implementation, and evaluation through local CLI agentssrc/cli.jsbootstraps generic runs and improve-project runs
The previous scheduler-first codebase has been split out into the separate repository agent-scheduler.
node src/cli.js fixtures/demo-run.jsonThis creates a new run under .crius/runs/<run-id>/ with:
contract.jsonstate.jsonspec.md
To initialize a real project-improver run against a git repository:
node src/cli.js improve-project /path/to/repo --goal "Ship one scoped improvement" --provider codex --evaluator claudeThis also creates:
repository.jsonproviders.jsonworktree.jsonplanner-brief.mdjournal.jsonl
To execute the run through planning, implementation, and evaluation:
node src/cli.js execute-run <run-id> --max-revisions 2Default execution model:
- planning: implementation provider in read-only mode
- implementation: implementation provider in isolated worktree
- evaluation: evaluator provider with structured JSON output
This is now a real staged runtime. It is still not the full finished system because lease recovery, parallel branches, and deep guardrails are still missing.
npm test