sheriff.

Configuration

Configure Sheriff test scope, test runners, and failure behavior. Control how Claude Code and Codex discover gaps, run tests, and handle source defects.

Configure Sheriff

Claude Code
/sheriff:configure
Codex
$sheriff-configure

Change unit and E2E test types, runners, discovery scope, phase strategy, and failure handling.

Models and delegation

Codex executes the roles sequentially with your current model. Claude Code can delegate disjoint work when available and authorized, using model and parallelism preferences where supported.

Project state

Sheriff keeps configuration and working state under .sheriff/.

FilePurpose
TEST_MAP.mdSource files, existing tests, and known gaps
PHASES.mdThe execution plan
Summaries and audit reportsResults and findings alongside the map and plan

Claude Code and Codex share this project state. Run only one Sheriff session per project at a time, even when both integrations are installed.

Coverage and checkpoints

The map records source files, tests, and known gaps. Measured line or branch coverage requires your runner’s coverage report.

A Git checkpoint records HEAD; it does not save uncommitted files.

Failure handling

The default onTestFailure: flag policy reports source defects without changing source. The fix and fix+notify policies allow scoped fixes within your authorization. You can also explicitly authorize an individual fix.

Audit mode alone does not grant permission to edit source. Commits require your authorization and a reviewed file scope.

Runtime and state writes

The local runtime lives in the Sheriff dependency under node_modules; .sheriff/ holds project configuration, handoffs, results, and summaries. Restoring dependencies restores runtime code without replacing this state.

The runtime's write-config, write-handoff, write-result, and write-summary commands read stdin asynchronously until EOF. Delayed piped input and UTF-8 characters split across chunks are preserved. A read error stops the command before replacing existing state. This does not require any new user configuration.