Framing: a solo developer's workflow (2026-11). The scaffold's Claude/Codex role defaults are just an example; override them in the project's AGENTS.md. If you use Claude: not supported in mainland China, Hong Kong or Macau since 2026-11-12 (checked 2026-11-23).
Situation
- Audience: you have several repos and want
dual-agent-write-review-loopinstalled once per repo instead of hand-copying rules. - When to use: onboarding a repo, or adding an isolated process directory for another feature.
- When not to use: repos with a mature custom flow you don't want appended to — read what the script changes first.
How to install
The orca-kit-init kit is open-sourced at tools/dual-agent-review-kit/ in a separate draft PR (#19), not merged yet — the link works only after it merges, and the license is still to be chosen by the owner. Once cloned: self-test with bash -n bin/orca-kit-init && python3 tests/test_init.py, then install with bin/orca-kit-init /path/to/repo <slug>. If you prefer no script, or the kit is not merged yet, use the manual route below (~5 minutes, same result).
Manual route (no script)
- Append the AGENTS.md snippet from
dual-agent-write-review-loopto the repo'sAGENTS.md, wrapped in<!-- BEGIN dual-agent-review -->/<!-- END dual-agent-review -->. mkdir -p .agents/work/<slug>and create emptyPLAN.md,TASKS.md,STATE.md,HANDOFF_REQUEST.md,HANDOFF_VERDICT.md,ESCALATION.md(use the STATE.md template from that recipe).grep -qx "/.agents/work/" .gitignore || echo "/.agents/work/" >> .gitignore- Write the real build/test/lint commands into AGENTS.md, then continue from step 4 below.
Steps
- Know what the script does: it appends, never overwrites. It creates
AGENTS.md/CLAUDE.mdif missing, otherwise appends aBEGIN/END-marked rule block; root-level docs such asCODEX_REVIEW.mdare skipped if present; yourREADME.mdis untouched. - Run:
orca-kit-init /path/to/repo <feature-slug>(slug: lowercase letters, digits, single hyphens). Re-running doesn't duplicate; parallel features use unique slugs. - Process files live in
.agents/work/<slug>/(move them outside.agentsif Codex is the implementer — see step 2 ofdual-agent-write-review-loop) (PLAN / TASKS / STATE / HANDOFF_REQUEST / HANDOFF_VERDICT / ESCALATION);/.agents/work/is added to.gitignoreonce. - Fill in the project's real build/test/lint commands in AGENTS.md. Without them a review "pass" means nothing.
- Role overrides: use
## Rolesoutside the marked block. Overrides never loosen "reviewer is read-only" or "a human merges". - Init makes no commits. Commit rule files per your convention, never process files;
git ls-files -- .agents/workmust be empty before merge (gitignore doesn't untrack tracked files). - Work in a feature worktree, then follow
dual-agent-write-review-loop.
Templates
Process-file shapes: see STATE.md and the reviewer prompt in dual-agent-write-review-loop. To make the flow reviewable as a spec, map each process file to a stage's I/O in pipeline.yaml and put pass criteria in gates; spot-check the reviewer prompt with the eval / golden-set checklist.
Cost (order of magnitude, estimate)
- The scaffold costs no tokens; onboarding is a few minutes of your time. The saving is consistent rules across repos. Review-call costs: see
dual-agent-write-review-loop.
Failure cases and guards
These are risks the scaffold guards against (from its docs and tests), not recorded incidents.
- Overwriting existing rules: why it appends, is marked and idempotent; a damaged or duplicated marker block makes it fail — fix by hand before re-running.
- No real build/test commands: every round is BLOCKED for lack of evidence.
- Process files committed: missing gitignore plus
git add -f; checkgit ls-files. - Old root-level process files: older installs kept six files at the root; they are not migrated, and tracked ones must be untracked by hand on the feature branch.
- Role override loosening read-only review: not allowed.
China alternatives
china_availability: yes: plain text plus a local script, no foreign service. Roles can be Kimi / GLM / Qwen / DeepSeek if your tool can enforce a read-only reviewer; without a read-only sandbox, read-only is by discipline only — see the safety notes indual-agent-write-review-loop.
Safety notes
- Read the script and the rule block before running; don't run it on untrusted repos.
- Leave the rule block's "no
.envcommits, no unapproved push/merge/publish" lines intact. - Process files may contain logs and paths: don't commit or upload them.
Test notes
- 2026-11-23: the scaffold's 5 automated tests pass (temp-dir test repos only); it has been adopted in one Flutter project of a solo developer (an adoption branch exists).
- Versions: Python 3.8.10 (local); the open-sourced kit ships in draft PR #19 with 6 passing tests (2026-11-23, including marker-order tests added after its review); the earlier private scaffold commit was
3818d63. - A full onboarding of a new repo was not re-run for this write-up; the steps come from the script's documentation and tests.
Verification
- In a scratch repo, run it twice: the second run changes nothing.
AGENTS.mdhas exactly oneBEGIN/ENDblock;/.agents/work/appears once in.gitignore.