| name | lane-contract |
| description | File-based task contracts under .agents/runs/ with owns_paths, verification tiers L0/L1/L2, and solo merge rules. Use when authoring or reviewing task YAML, owns_paths, acceptance, or verification commands. |
Lane contract (files only)
Canonical: FILE-CONTRACT.md, SOLO-ORCHESTRATION.md,
docs/decisions/ADR-codex-effort.md, skill orchestrator-lanes (decomposition).
Orchestrator must
run-init → fill PLAN/SPEC/tasks → run-validate --phase pre-dispatch before dispatch.
- Set
owns_paths, never_touch, behavioral acceptance.
- Paste real interfaces into
interfaces; declare read_first, invariants, out_of_scope, expected_outputs.
- One
run-supervisor per run; lane-supervisor only for typed one-shots.
- Parallel only with disjoint owns_paths.
- Controller: owns → L1 verify → accept progressively.
- Task YAML immutable after first start.
- Pre-merge validate → merge main (PM only).
- Writers via durable controller (kimi/…); Codex write = recovery only.
- Separate provider vs verification pools.
- Decompose per orchestrator-lanes (one outcome per task; unlock ≠ feature).
- SPEC.md is real content when score ≥ 7 or ≥ 2 tasks (not the template stub).
Authoring checklist (before pre-dispatch)
Decomposition
Owns completeness
Verification (L1)
Acceptance
Lane must (writer)
- Read TASK_FILE completely.
- Work only in
PROJECT_CWD.
- Edit only
owns_paths. Honor never_touch.
- Do not write
.agents.
- L0 focused checks only; report in English.
- No git merge/push main.
- Outside-owns build break → report Gaps, do not “fix the world”.
- No monorepo full suite as Worker checks on multi-task runs.
Required schema-v2 task fields
schema_version, id, title, risk, lane, project_cwd, read_first,
interfaces, invariants, out_of_scope, expected_outputs, owns_paths,
never_touch, depends_on, objective, acceptance, verify, structured
verification (command, absolute cwd; timeout_sec optional — default 900).
No mutable status / free-form verify strings on new runs.
Verification tiers
| Tier | Who | What |
|---|
| L0 | Writer | Focused tests while coding |
| L1 | lane-ctl verify | Task verification[] only |
| L2 | PM / CI | One full or affected suite per run |
Worktree + pre-authored checkers
verification.cwd must equal the task worktree/project_cwd. Relative scripts
resolve inside that tree. Main checkout .agents/runs/<slug>/artifacts/001/check.py
is not the same file as
worktree/.agents/runs/<slug>/artifacts/001/check.py.
Before run-validate --phase pre-dispatch / controller start:
- Pre-author the checker (recovery/PM — not the writer).
- Place it under the worktree at the path the command uses.
- Or use in_place workspace so one
.agents tree is enough.
run-validate fails closed if the script file is missing.
verify levels
| Level | Meaning |
|---|
| none | Trivial / visual |
| smoke | Single cheap command |
| tests | Focused automated tests (not monorepo green) |
Owns / dirt / caches
| Class | Policy |
|---|
| Pre-existing dirt outside owns | Foreign ignored (baseline / no-baseline policy) |
| New product files outside owns | Fail (writer leak or missing owns entry) |
.npm-cache, node_modules, pnpm/yarn/turbo caches | Ignored by gate — never put in owns |
never_touch hits (new) | Fail |
If owns fails with only cache paths: treat as control-plane noise, not “expand owns”.
SPEC.md contract (run level)
When required (score ≥ 7 or ≥ 2 tasks), SPEC must state goal, interfaces,
invariants, out of scope, definition of done — in English, not the run-init stub.
run-validate --phase pre-dispatch rejects stubs.