Zones

Name the paths that would hurt.

Everything else stays open. Most of a repository is safe for an agent to change; a few parts are not: the schema, the contracts, whatever your incident history says. A zone is how you say which is which, in a file you review like code.

Zones are governance mode. The default, memory mode, has no zones: an edit needs an active task. The hook enforces in Claude Code today, on macOS and Linux.

Four things, and one of them is a person

Path patterns say where. A risk level says how much care. A default policy says who may read it when nothing has been granted; writing always takes a grant. And an owner says who to ask, which is the attribute that turns a wall into a door.

  • Path patterns: the same glob shapes GitHub rulesets use, so nothing new to learn
  • Risk level: high, medium, low. High means the owner is asked before work that writes there starts
  • Default policy: deny closes reading too; read-only and open leave it readable. Either way, a write needs a grant
  • Owner: a real person, in a file, not in tribal memory
Read the reference
.zones/zones.yml
Paths: whereRisk: how much careDefault policy: who may readOwner: who to ask
# CommitCycle's own map, trimmed. Four zones in the# real file, not thirty, all readable since 2026-10-10;# writing any of them still takes a grant.zones:  - id: schema    risk: high    owner: paulo@commitcycle.com    paths:      - "apps/api/migrations/**"      - "apps/api/src/db/schema/**"    default_policy: open   - id: enforcement    risk: high    owner: paulo@commitcycle.com    paths:      - "packages/hook/**"      - "packages/action/**"    default_policy: open   - id: brand    risk: medium    default_policy: open # Everything not listed here is unprotected, on purpose.

Access arrives as a grant, and leaves on its own

Moving a task to In Progress is what mints it. Besides that gate, only an owner answering an access request opens a zone, and cycle renew only re-issues the same scope. There is no open-zone command, and nobody has to remember to close anything.

A denial that says why, so the agent asks

The agent is told why in the same response that denies it, so it asks for access instead of trying a different way in. A block that only says no gets routed around.

Bound to one task, one branch, eight hours at most

Just-in-time: the grant expires on its own. Nobody has to remember to close it, which is the step every access process actually fails at.

  • One task. It opens the zones that task declared, and nothing adjacent. The tempting neighbouring change is the one non-goals exist to name
  • One branch. The guarantee is per checkout: two agents in one directory share a branch, and so a task and a grant. This is the failure this product first hit itself (D-43, still proposed); the answer so far is one worktree per agent
  • Eight hours at most. The gate issues it for eight hours at most. An owner who approved a high-risk zone for one hour or four brings the whole grant's expiry forward to match (CC-1327)
The five-state board

The blocking is commodity. The model underneath is not.

Worth saying before you find it out yourself: denying a tool call in flight ships in Claude Code, Codex, Cursor, Augment, Factory and Devin CLI, and it is free in whichever of those you are already using. If that were the product, you would not need this page.

Everyone's rules

A path list. Set once, true forever, the same for every piece of work, with nobody attached to it. Their rules are per-machine and permanent: no owner to ask, no approval moment, no expiry, and no notion of a task that permission could be scoped to.

path list

A zone plus a grant

What none of them has is the model the denial consults: every one of these must match, and there is a record of who opened it and why.

path× owner× risk× this task× this branch× eight hours at most

Not CODEOWNERS

Against CODEOWNERS and branch rulesets the difference is when: same vocabulary, asked after the change exists, enforced on the host. A zone is checked at the write, on your laptop, offline, and the CI check that recomputes the diff afterwards runs only in CommitCycle's own repository.

What was measured, and what it does not prove

Every figure here carries its limit in the same breath.

Shell tricks do not get around it

25 Bash escape vectors contained. Shell writes run against a git snapshot, and changes to protected paths the task does not hold are reverted byte for byte. Containment closes when the call returns, so what a command leaves running (a background command, which the hook asks about first; a foreground one that hits its timeout; a cmd & inside one) escapes it until the close checks the diff against the zones (CC-1379).

25 of 25 contained

The catch: measured 2026-08-03 (CC-3). Gitignored paths are not seen, so a .env inside a zone gets no containment. The corpus was chosen by the author. The live false-positive eval has not run.

Everyday commands keep working

Twenty ordinary commands through that same guard. None was blocked by mistake.

0 of 20 false positives

The catch: same self-chosen corpus. Twenty commands is not twenty real tasks.

The stricter way would have cost us

The conservative allowlist is the approach we refused, and its false positives are the reason containment won instead.

8 of 20 false positives

The catch: same self-chosen corpus. What was measured is the 40% rate; that it would cost the install is our reading of it, not a measurement.

The decision is quick

At p95 for the decision, against a 100 ms budget, on the first hook build.

68–83 ms

The catch: measured 2026-08-03 on the first hook build, on an idle machine. p99 touched 102 ms in one case. CC-1377 re-timed it in October 2026 on two cloud VMs: on the slower one wrapper and core reached 211–228 ms at p95 (load 0.74–1.04), and the hook's cost over a shell-launched node process was 84–111 ms there against 44–48 ms on the faster one, for the same code. Two hosts, not a survey.

Where zones stop

Said before you find it out.

  • Referee between agentsThey confine each agent. Two agents that disagree still disagree: each checkout is simply held to its own task and branch
  • Protect what you did not declareUnprotected is the default, and should be. An over-eager gate costs more than a missing one
  • Gate by topicZones enforce paths; the disciplines a task declares only advise. The two never merge

The record outlives us. The map is a file in your repository and, by default, so are the task records and the audit record a close from the CLI writes; the board keeps a copy of each audit record, and the only copy of one a close from the console or a merge wrote. Grants are short-lived local state that expire with the work. Uninstall CommitCycle and you keep the files, and cycle export --audits prints the board's history, records included, as Markdown.

The mechanism is in the reference, and the hook that checks every write comes with the Claude Code plugin.

Questions this page answers

How do I stop an AI coding agent from editing certain files?

Declare those paths as a zone with an owner and a risk level. The agent gets access only to the zones its task declared, on the branch that task is bound to, and the access expires on its own. Everything you did not declare stays unprotected, which is the right default for most of a repo.

How is this different from CODEOWNERS?

CODEOWNERS is the same vocabulary applied after the fact, on the host: it asks for a review once the change already exists. A zone is checked when the write is attempted, on your machine, and it carries an expiry and a task scope that CODEOWNERS has no concept of.

Ask for an invite

Signup is closed while this is small, so everyone using it early gets answered personally.

Ask for an invite

Install the plugin

/plugin install commitcycle@commitcycle

The Claude Code plugin installs without an invite.