Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

A two-person rule for AI coding agents

Описание и применение

Внедрение локального журнала утверждений, привязанного к SHA, обеспечивает, что код, генерируемый AI-агентами, может быть опубликован только после проверки. Это предотвращает устаревшие утверждения и несанкционированные пуши, даже если агенты работают без наблюдения.

Задача

Ensuring that AI coding agents only ship code after a proper review, preventing stale approvals and unauthorized pushes in unattended multi-agent workflows.

Результат

The twoperson workflow enforces commit-bound reviews, preventing stale approvals and unauthorized pushes, even when agents run unattended.

Рабочий процесс

  • Run twoperson install-hook to add a Claude Code Stop hook for the reviewer.
  • Configure each agent to run in its own git worktree so inboxes resolve to the main tree.
  • Builder writes a JSON review packet (goal, head SHA, files, tests) and publishes it.
  • Reviewer claims the packet, records a verdict in the ledger.
  • Twoperson enforces rules: rejects verdicts for unpublished packets, mismatched commit SHAs, or pushes without a matching approval.
  • When a commit is rebased or amended, the approval becomes stale and is automatically refused.
  • The builder cannot ship code until a valid, current review is present.
  • The system logs all actions locally, providing an offline gate before any remote PR or branch protection.

Доказательства

It records that a review happened, pins the verdict to one commit, and refuses to let the builder call anything "shipped" without one.

Источник

The Stop hook. twoperson install-hook adds a Claude Code Stop hook so the reviewer wakes when the builder's session ends, instead of polling on a timer.

Источник

  • Дата записи: 2026-09-07T09:01:54.387Z