Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ Use cc-orchestrator for issue 123. Stop at READY_FOR_MANUAL_MERGE.
| [`cc-orca-orchestrator`](docs/workflows.md#cc-orca-orchestrator) | one prompt | supervised workers, paired-review calibration | Orca |
| [`run_cycle.py`](docs/workflows.md#runtime-driver-run_cyclepy) | a shell command | recorded, routed cycles across executors | runtime, Codex and/or Claude CLIs |

Read-only roles can use Codex, whose sandbox enforces read-only, or Claude,
which reviews in a disposable clone where writes are detected but not
prevented. See [workspace policy](docs/role-workspace-policy.md) for what
that does and does not guarantee.

## Skills

Thirteen skills in two layers. **Cycle skills** own the workflow: the change request, the finding IDs, the published comments, and the merge boundary. **Supporting skills** are focused passes that cycle skills delegate to. Each one also works on its own.
Expand Down
20 changes: 4 additions & 16 deletions docs/instrumentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -735,22 +735,10 @@ nothing had ever asked for anything else. A dispatched Claude, by contrast,
edited a file with no flag at all. So the flag on a writing Claude stage
declares what is already happening rather than granting something new.

For a **reading** Claude stage there is no honest flag, and this does not
pretend otherwise. `--permission-mode plan` refuses the edit but turns the task
into planning it, which is not a review. Disallowing `Edit`, `Write` and
`NotebookEdit` does not stop a write: a live probe created the file anyway.
Review and rereview therefore route to Codex, whose explicit `-s read-only`
sandbox enforces non-mutation. Orca may be used only when its explicit review
workspace contract is present; it does not claim an OS-level read-only flag and
fails closed for a missing, mismatched or overlapping workspace. A configured
adapter that cannot establish a non-mutating boundary is blocked before it
starts rather than sharing the writable tree.

The default review profiles intentionally have no fallback. If Codex is
unavailable, a review blocks instead of silently falling back to Claude or Orca
without the required boundary. A direct or future Orca fallback must provide
an immutable or otherwise disposable non-mutating workspace before it starts.
This favors review integrity over availability.
For a **reading** Claude stage, the harness creates an independent detached clone with its own Git object store at the exact reviewed HEAD, outside the implementer's tree, and removes the clone's remotes. A dirty implementer checkout blocks preparation. It records the implementer's HEAD, a fingerprint of `git status --porcelain`, and advertised refs for configured remotes before dispatch, then checks them again afterwards. A detected change makes the stage a `contract_violation`. Writes within Claude's disposable clone produce a warning and are discarded with that clone. The stage prompt prohibits file edits, commits, and pushes and explains why. Claude runs with its full tooling and its ordinary `gh` and `git` access, so it can publish its own comment. With Claude, read-only is watched, not enforced. The harness detects a write it can observe, but it cannot prevent or undo a remote write: a push, a merge, or a change to the change request. A push that is later restored before the stage ends also goes unseen. The maintainer has accepted this risk. Anyone who needs a full guarantee should review with Codex or give the reviewer read-only credentials. Read-only Claude dispatches record `read_only_mode = detected`, and only when the clone was prepared and removed and no change was detected. A clone left on disk fails the stage without a `read_only_mode`.

Codex retains `-s read-only` and records `read_only_mode = enforced`, meaning its sandbox prevents workspace writes. Orca still requires its explicit review-workspace contract. Reviews may use any configured eligible executor; a profile may still choose no fallback. Publication access remains behavioural: the prompt states which operations the role may perform.


## Running a cycle

Expand Down
10 changes: 5 additions & 5 deletions docs/role-workspace-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ repository. The default auxiliary profile uses Codex because its sandbox can
confine writes to the disposable cwd; an adapter without that boundary is not
eligible for `disposable`, even when its process cwd is isolated.

An adapter is eligible only when it can enforce the requested policy. Codex
can enforce strict read-only execution directly and can confine writes to a
disposable cwd. Claude cannot enforce either boundary, so it is not a valid
target for `read_only` or `disposable` roles. Orca follows the same fail-closed
rule and requires its own explicit orchestration context where applicable.
An adapter is eligible only when the harness can establish the requested policy. Codex enforces read-only execution directly with its sandbox and records `read_only_mode = enforced`: the sandbox imposes read-only.

Claude cannot enforce read-only inside its process, so the harness runs it in an independent detached clone with its own Git object store at the exact reviewed HEAD, outside the implementer's tree, with the clone's remotes removed. A dirty implementer checkout blocks preparation. Before and after the stage, the harness compares the implementer's HEAD, `git status --porcelain`, and every configured remote's advertised refs; a detected change is a `contract_violation`. Edits inside the disposable clone produce a warning and are discarded. If the clone cannot be removed afterwards, the stage fails. Claude records `read_only_mode = detected` only when those checks pass. The prompt prohibits edits, commits, and pushes and explains why. Claude runs with its full tooling and its ordinary `gh` and `git` access, so it can publish its own comment. With Claude, read-only is watched, not enforced. The harness detects a write it can observe, but it cannot prevent or undo a remote write: a push, a merge, or a change to the change request. A push that is later restored before the stage ends also goes unseen. The maintainer has accepted this risk. Anyone who needs a full guarantee should review with Codex or give the reviewer read-only credentials.

Claude remains ineligible for `disposable` roles because it cannot confine writes to their workspace. Orca follows its explicit review-workspace contract and requires its own orchestration context where applicable.

This deliberately separates useful generated output from unauthorized source
tree changes: verification reports, caches, build output, and runtime state
Expand Down
6 changes: 3 additions & 3 deletions docs/routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ A profile names a *kind* of work. It never appears in a skill as a model name.
| `auxiliary_tool` | verify, run, bootstrap | `codex:openai/gpt-6-luna medium` | — |
| `cheap_tool` | compatibility for direct/custom callers; no built-in role selects it | `claude:anthropic/claude-haiku-4-5-20251001 low` | — |

¹ Kept in the registry for compatibility only. The security stage is read-only and Claude can't enforce read-only, so this fallback is never selected.
¹ The security profile retains this configured fallback. Claude runs read-only stages in a disposable clone that the harness watches for changes, as described below.

The source of truth is `DEFAULT_PROFILES` in [`scripts/router.py`](../scripts/router.py). Override only what you want to change, and the rest keep their defaults:

Expand Down Expand Up @@ -94,10 +94,10 @@ Each role has a fixed write permission. Only an executor that can **enforce** it
| Role | Policy | Eligible executors |
|---|---|---|
| `implement`, `resolve` | `workspace_write` | Codex (`-s workspace-write`), Claude (`acceptEdits`), Orca |
| `review`, `rereview`, `security`, `bootstrap`, `coordinate` | `read_only` | Codex (`-s read-only`); Orca only with an explicit isolated review workspace |
| `review`, `rereview`, `security`, `bootstrap`, `coordinate` | `read_only` | Codex (`-s read-only`), Claude (disposable clone, writes detected, not prevented), Orca (explicit review workspace) |
| `verify`, `run` | `disposable` | Codex, confined to a disposable workspace |

Claude can't enforce read-only, so it is never used for review roles. That is why review profiles have **no fallback**: when Codex is unavailable, a review blocks instead of running without a proven non-mutating boundary. Details are in [Role workspace policy](role-workspace-policy.md).
Codex records `read_only_mode = enforced`: its sandbox prevents workspace writes. Claude records `read_only_mode = detected`: the harness creates an independent detached clone with its own Git object store at the reviewed HEAD, removes its remotes, and discards local edits. The harness requires a clean implementer checkout and checks its HEAD, working-tree fingerprint, and configured remote refs before and after review; a detected change fails the stage as a contract violation. Claude runs with its full tooling and its ordinary `gh` and `git` access, so it can publish its own comment. With Claude, read-only is watched, not enforced. The harness detects a write it can observe, but it cannot prevent or undo a remote write: a push, a merge, or a change to the change request. A push that is later restored before the stage ends also goes unseen. The maintainer has accepted this risk. Anyone who needs a full guarantee should review with Codex or give the reviewer read-only credentials. Publication access remains role-specific, and a reviewer may publish only the comment its role permits. Details are in [Role workspace policy](role-workspace-policy.md).

## Publication boundary

Expand Down
Loading
Loading