-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
- Python 3.11+ and uv.
-
gitand the GitHub CLI (gh) authenticated, if you want factory runs to open and merge PRs. - At least one AI coding agent CLI:
- Claude Code (recommended)
- OpenAI Codex
- Or the optional SDK adapter:
uv tool install "kstrl[sdk]"and setagent.type = "claude-sdk"(opt-in only; never auto-selected).
- POSIX (macOS or Linux). Windows is unsupported for concurrent worktrees.
uv tool install kstrl # installs `ks` and `kstrl`
# development install:
# git clone https://github.com/0xfauzi/kstrl.git && cd kstrl && uv tool install -e .cd your-project
ks init .This writes kstrl.toml (config), scripts/kstrl/prompt.md (the engineer
prompt), and scripts/kstrl/prd.json (what to build: user stories with
acceptance criteria). Edit the PRD first - it is the contract every
adversarial role reviews against.
ks run 25 # up to 25 engineer iterations, with mechanical verificationks decompose --spec spec.md # architect red-teams the spec -> manifest + PRDs
ks factory --spec spec.md # decompose + build every component through the gauntlet
ks factory --manifest .kstrl/manifest.json # resume an existing runThe spec can be a single markdown file or a SpecKit artifact directory
(spec.md required; plan.md and tasks.md used when present). If the
architect finds blocker-severity spec issues it halts with exit code 2 -
fix the spec; there is no override flag.
Other verbs: ks understand (read-only codebase mapping), ks feature
(understand-then-implement for one feature), ks retry <component-id>,
ks evolve (propose harness improvements from run history),
ks config show.
- Bare
ksopens the home shell: a run browser and command launcher. - Long-running commands open their live dashboard automatically on a
terminal (
--no-tuiorKSTRL_NO_TUI=1opts out). -
ks dashattaches a read-only dashboard to any run - live or finished - from another terminal. -
ks statusprints machine-stable state for scripts and CI.
Everything shown is a projection of .kstrl/runs/<run_id>/events.jsonl;
the files are the record.
uv run pytest tests/ -v
uv run mypy kstrl/ --strict
uv run ruff check kstrl/ tests/
# opt-in, uses real LLMs:
KSTRL_RUN_CALIBRATION=1 uv run pytest tests/test_calibration.py -vPrecedence: CLI flag > KSTRL_* env > kstrl.toml > defaults. The keys
you will touch first:
[agent]
type = "" # auto: prefers claude-code, falls back to codex
[factory]
max_parallel = 4 # parallel component builds (worktree-isolated)
max_retries = 2
create_prs = true
pause_before_pr_merge = false # the optional human checkpoint (E6)
max_adversarial_calls = 0 # 0 = unbounded; shared review/security/distill budget
max_total_tokens = 0 # run-level token budget
[security]
mode = "advisory" # skip | advisory | hardFull reference: kstrl.toml.example, docs/env-vars.md, and the operator recovery guide in docs/runbook.md.
The wiki orients; the repo governs. Canonical references: README - ARCHITECTURE - docs/