v0.2 — recipe slate landed

Block AI coding agents on the same quality gates your humans hit.

klasp turns fmt, lint, type-check and test into hard agent boundaries. Drift, infinite loops, and broken PRs stop at the gate — not in human review.

$npx klasp@latest init View on GitHub →

Ship while you sleep. Wake up to PRs, not panic.

Autonomous agents need a deterministic done signal. Without one, an overnight run drifts: retry loops, exhausted context, force-pushed-broken commits. klasp is that signal — every iteration ends in a clean pass / fail with structured findings.

Without klasp overnight-run · pid 4471
23:42agent: implement checkout flow
00:15tests fail · agent guesses, retries with different approach
01:33lint errors · agent rewrites unrelated module
02:50stuck in test/lint loop · context window exhausted
04:12agent gives up → force-pushes broken code

07:00main is red. 47 failed CI runs. 6h of compute burned.
With klasp overnight-run · pid 4472
23:42agent: implement checkout flow
23:58klasp:format ✗ → 3 lines · agent fixes
00:14format · lint · agent advances
00:47klasp:test ✗ → test_total::charges_tax · agent investigates
01:22all gates · commit · open PR #142
01:25agent: implement refund handler

07:004 clean PRs in your queue. All green CI. Ready to review.

01 — deterministic done

Exit codes are unambiguous. Agents stop guessing whether they're finished — the gate said zero, the gate said one. No drift, no panic loops.

02 — structured findings

When a gate fails, klasp surfaces line-numbered diagnostics from cargo, pytest, your linter — so the agent fixes the actual error, not a hallucinated symptom.

03 — bounded context

Tight pass / fail loops mean each iteration burns a few hundred tokens, not tens of thousands. Overnight runs stay inside their context window.

One config. Same gates. Both audiences.

01 Stop bad PRs at the source

Agents can't merge what they can't pass. klasp wires your existing fmt / lint / test commands into deterministic exit-code gates the agent has to clear before it commits.

02 One config, both audiences

klasp.toml is the single source of truth. The same gate that guards your pre-commit hook guards the agent loop — no second config to drift out of sync.

03 Plug-in agent support

First-class for Claude Code and Codex CLI today. Managed CLAUDE.md / AGENTS.md blocks installed idempotently, with conflict detection and clean uninstall.

Typed recipes for the gates you already run.

klasp.toml
# fmt — wraps an existing pre-commit hook
[[checks]]
name    = "format"
type    = "pre_commit"
hook_id = "rustfmt"

# lint — fallow groups multiple checks under one verdict
[[checks]]
name = "lint"
type = "fallow"

# test — pytest with JUnit-XML diagnostics surfaced to the agent
[[checks]]
name      = "test"
type      = "pytest"
junit_xml = true

# build — cargo with structured compiler diagnostics
[[checks]]
name       = "build"
type       = "cargo"
subcommand = "check"

First-class support for the agents you ship with.

Capability Claude Code Codex CLI
Pre-commit gate hooks
Managed config block CLAUDE.md AGENTS.md
Idempotent install / uninstall
Conflict detection
Cursor / Aider — roadmap — roadmap

Pick your package manager.

npm / pnpm / bun

$ npx klasp@latest init

pipx (python)

$ pipx install klasp
$ klasp init

cargo (rust)

$ cargo install klasp
$ klasp init