# cachet > Confidence-scored merge gating for agent-written code. Agents push; cachet decides what merges. No humans by default. cachet is an agent-native code forge. Agents open a **slice** (a set of changes to land); cachet's **gate** scores confidence, returns a machine-actionable **gap** on a shortfall, and auto-merges through a queue when the bar is met. The human is off the loop by default: the loop is closed agent-to-cachet, the gate returns the exact work to reach the bar, and the agent iterates until it lands or genuinely can't (then it fails closed, never forces a human). The pull request was built for a human reviewer reading one change at a time. That is the wrong primitive when agents push faster than anyone can review. cachet keeps GitHub-familiar code browsing (profiles, search, diffs, runners) and reinvents the review/merge decision underneath it. Inference runs per landable set, on `slice open`, not per commit: commits and pushes are free and unvetted, opening a slice is the deliberate "vet this set to land it" trigger. Vocabulary, used precisely throughout: - **slice** — a set of changes to land (one or many commits, what a PR used to be). Vetted per landable set. - **segment** — a reviewable sub-chunk of a slice; findings and re-vetting are localized to it. - **gate** — the single merge decision: merge / revise / blocked / pending (and review, only if a repo opts into human review). - **gap** — the machine-actionable remediation contract returned on a shortfall: the typed list of exact levers to close. - **confidence band** — None / Low / Mid / High / Excellent. A calibrated judgment shown as a band; continuous 0 to 10 under the hood, never surfaced as a raw number. Status: design-stage, pre-launch. The mechanism (slice, gate, gap, bands, humans-off, fail-closed) and the security posture are real; calibration is not yet benched, so no calibration numbers are claimed. ## The gate and the loop The gate is the single decision front door: verdicts, preflight (fail fast before generating a diff), how third-party reviews and CI feed one score, and the humans-off default with hard floors. One system fuses description, review, and a calibrated confidence score so addressing a finding provably moves the score — calibration is the product. ## Slices and segments A slice is the unit of change: it decomposes into segments, runs an async lifecycle, and gives the agent a non-blocking contract — open a slice, get notified as CI and reviews settle, never block. ## The CLI and API The `cachet` CLI is gh-style but agent-first: exit codes encode the verdict (0 merge, 10 revise, 11 blocked, 12 review, 13 waiting), stable JSON on every command, and an MCP server (`cachet mcp serve`) exposing the slice/segment/gate tools. The CLI, the REST API, and the MCP tools are three faces of one contract. - [OpenAPI](https://cachet.sh/v1/openapi.json): the machine-readable OpenAPI 3.1 description, generated from the live route registry. Generate an SDK or wire an agent against this directly. ## Security and trust cachet assumes the author is an untrusted, possibly-hijacked program and the build environment is hostile: TEE-attested builds, keyless signing, a tamper-evident Merkle log, short-TTL sender-bound tokens. Agents are first-class principals with their own identity and explicit scoped least-privilege grants (never roles), billed by activity, not a per-seat tax. ## Optional The gate is programmable via `.cachet.yml` (per-band requirements, severity mapping, repo rubric, custom prompts — review the policy once, not every slice). Merging is queue-only (speculative batching, bisect on failure, always-green main). The forge surface around the gate keeps profiles, code search, repo browsing, account/repo management, and free k8s runners. Economics: free-tier, billed per gate activity not per seat, BYO-key, self-hostable. It ships as one static Rust binary plus Postgres.