<!-- task=m-iop-agent-cli-runtime/26+19,21,22,23,25_parity_cutover plan=0 tag=REFACTOR -->

# Code Review Reference - REFACTOR

> **[IMPLEMENTING AGENT — READ FIRST] Filling this file is mandatory.**
> Fill every implementation field and paste actual outputs. Leave active files in place. Unclassified rows or non-zero dependency searches are blockers, not waiver candidates.

## Overview

date=2026-07-29
task=m-iop-agent-cli-runtime/26+19,21,22,23,25_parity_cutover, plan=0, tag=REFACTOR

## Roadmap Targets

- Milestone: `agent-roadmap/phase/automation-runtime-bridge/milestones/iop-agent-cli-runtime.md`
- Milestone link: [Milestone document](agent-roadmap/phase/automation-runtime-bridge/milestones/iop-agent-cli-runtime.md)
- Task ids:
  - `parity-cutover`: classify Python/Node behavior and cut production task-loop ownership to Go with zero unclassified/runtime dependency/duplicate
- Completion mode: check-on-pass

## For the Review Agent

> **[REVIEW AGENT ONLY]** Implementing agents must not execute finalization.

Require zero unclassified behavior and zero production Python/static/duplicate match. Append verdict/signals; archive the pair to `code_review_cloud_G10_0.log` and `plan_cloud_G10_0.log`; on PASS write `complete.log`, archive the task, and report completion metadata without editing the roadmap. Verify disposal remains reserved for the Milestone completion transition.

## Implementation Item Completion

| Item | Status |
|------|--------|
| REFACTOR-1 Disposition matrix | [ ] |
| REFACTOR-2 Go adapters | [ ] |
| REFACTOR-3 Go command | [ ] |
| REFACTOR-4 Skill cutover | [ ] |
| REFACTOR-5 Guards | [ ] |
| REFACTOR-6 Disposal evidence | [ ] |
| REFACTOR-7 Contract/regression | [ ] |

## Implementation Checklist

- [ ] Create a machine-validated disposition matrix covering every Python dispatcher/selector/observation and Node reference behavior as absorb, replace, or not-applicable.
- [ ] Implement standalone workflow, selection, provider, recovery, evidence, review, integration, and event adapters strictly over existing common Go contracts.
- [ ] Compose and test the production Go task-loop command, including dry-run, task-group filtering, retry-blocked, dependency-ready concurrency, lifecycle recovery, and terminal exit states.
- [ ] Redirect the project orchestration skill and testing rules to `iop-agent task-loop` and remove static model/route/capacity ownership from those surfaces.
- [ ] Add deterministic guards for zero unclassified rows, zero Python production callers/fallbacks, zero stale route/cap text, and zero Node duplicate implementation.
- [ ] Record exact Python reference-fixture disposal paths/checksums and the Milestone-completion deletion/verification procedure without deleting them before parity evidence closes.
- [ ] Update the standalone contract with actual S13 sources and run fresh package/full/race/vet/dry-run/cutover verification.
- [ ] Fill implementation-owned sections in CODE_REVIEW-*-G??.md with actual implementation notes and verification output.

## Review-Only Checklist

> **[REVIEW AGENT ONLY]** Implementing agents must not modify this checklist.

- [ ] Append one verdict and verified routing signals.
- [ ] Verify dimensions, findings, and every zero-match claim.
- [ ] Archive review as `code_review_cloud_G10_0.log`.
- [ ] Archive plan as `plan_cloud_G10_0.log`.
- [ ] Verify the Agent-Ops managed `.gitignore` block.
- [ ] If PASS, write canonical `complete.log` and leave no active Markdown files.
- [ ] If PASS, move the task to the dated archive and update this checklist there.
- [ ] If PASS, report `parity-cutover` completion metadata without editing the roadmap.
- [ ] If PASS, remove an empty split parent or prove siblings/files remain.
- [ ] If WARN/FAIL, materialize the exact next state without `complete.log`.

## Deviations from Plan

_Implementer: actual deviations/blockers or `None`._

## Key Design Decisions

_Implementer: actual decisions._

## Reviewer Checkpoints

- Every behavior row has one disposition and concrete Go evidence.
- Application adapters translate only; common packages retain lifecycle/policy/integration ownership.
- Skill production entry is Go and has no static provider/model/capacity table.
- Full tests do not invoke real providers.
- Python reference files have zero production callers and exact checksum disposal inventory.
- Node remains a consumer of common provider/runtime packages, not a duplicate owner.

## Verification Results

### Focused and race

```bash
go test -count=1 ./apps/agent/internal/taskloop ./apps/agent/internal/command ./apps/agent/cmd/agent
go test -count=1 -race ./apps/agent/internal/taskloop ./packages/go/agenttask ./packages/go/agentstate
```

_Paste actual stdout/stderr._

### Full regression and static analysis

```bash
go test -count=1 ./packages/go/... ./apps/agent/...
go vet ./packages/go/... ./apps/agent/...
make test-iop-agent-parity
```

_Paste actual stdout/stderr._

### Production cutover

```bash
make build-agent
build/bin/iop-agent task-loop --help
build/bin/iop-agent task-loop --dry-run --task-group m-iop-agent-cli-runtime
build/bin/iop-agent task-loop parity --disposal-manifest
```

_Paste actual stdout/stderr._

### Zero-match and diff evidence

```bash
rg -n --sort path 'dispatch\\.py|python3 .*orchestrate-agent-task-loop|gpt-5\\.6|claude-opus|Gemini|ornith|laguna' agent-ops/skills/project/orchestrate-agent-task-loop/SKILL.md agent-ops/rules/project/domain/testing/rules.md agent-ops/rules/project/rules.md
git diff --check
```

_Paste actual stdout/stderr; `rg` must exit 1 with no matches._

---

> **[IMPLEMENTING AGENT — BEFORE SAVING]** Fill every implementation-owned section and leave review-only content unchanged.

## Section Ownership

| Section | Owner | Note |
|---------|-------|------|
| Header, Overview, Roadmap Targets, Review Instructions | Fixed | Implementer must not modify |
| Implementation Item Completion, Implementation Checklist | Implementing agent | Check status only |
| Review-Only Checklist | Review agent | Implementer must not modify |
| Deviations, Decisions, Verification Results | Implementing agent | Record actual evidence |
| Reviewer Checkpoints | Fixed | Reviewer verifies them |
| Code Review Result and finalization | Review agent | Append/execute only after review |
