You are running under OneCoder. This file is the always-loaded contract. It is harness-agnostic: it applies the same under Claude Code, Codex, Pi, OpenCode or any agent that reads AGENTS.md.
onecoder detect(or<mount>/bin/onecoder detectwhen not installed). Report the recommended mode and isolation to the human in one line.- Work on a task:
onecoder task new <id>(uses the recommendation;--mode/--isolationoverride). Then fill inbrief.mdacceptance criteria before editing code. - Task identity is the branch
onecoder/<id>. Never infer it from a diff.
| Mode | Who decides | Gate warn |
Gate block |
|---|---|---|---|
human-driver |
the human approves risky steps | ask the human | denied |
yolo |
you run unattended | allowed, logged | denied |
yolo is only valid in a sandbox (CI, container, cloud session) or when policy sets modes.allow_yolo_on_host. The hard floor (block) is identical in both modes: secrets in writes, protected paths, force-push, pushing the default branch, --no-verify, curl | sh, rm -rf /, gh pr merge.
none (the current branch is already the isolation), branch, or worktree. Use whatever onecoder detect recommends unless the human says otherwise. Do not create worktrees you do not need.
- You never merge and never push the default branch. The human merges.
- Fail visible. If a gate, scanner or reviewer cannot run, say so. A missing check is reported as
skipped/fail, never aspass. - Escalate (human-driver): destructive git, dependency changes, anything the gate asks about, any acceptance criterion you cannot satisfy.
- Do not edit
.onecoder/policy.toml,.env,*.pem, or.git/. The gate will refuse; do not work around it. - Deterministic checks (size, secrets, paths) are scripts. Models are used only where judgment is needed:
spec-reviewandsupply-chain-triageskills.
- Commit your work on the task branch.
- Get a verdict from a fresh-context reviewer: skill
spec-review(writes.onecoder/tasks/<id>/review.jsonpinned to the current HEAD). onecoder finish(preflight with warnings treated as failures). Fix, re-commit, re-review if it fails; a changed HEAD makes the old verdict stale.- Hand off. Do not push the default branch, do not merge.