5.1 KiB
Code Review Reference - API
[IMPLEMENTING AGENT — READ FIRST] Filling in this file is the mandatory final step of implementation. Complete the checklist and implementation-owned evidence, leave active files in place, and report ready for review. If blocked, record exact evidence and resume conditions only. Finalization, user-review classification, log renames,
complete.log, and archive moves are review-agent-only.
Overview
date=2026-07-29 task=m-iop-agent-cli-runtime/13_standalone_host_foundation, plan=0, tag=API
For the Review Agent
[REVIEW AGENT ONLY] The finalization steps below are review-agent only. Implementing agents must not execute this section.
Compare implementation of each item against source files and verify that output in Verification Results matches code.
- Append verdict and
review_rework_count/evidence_integrity_failurerouting signals. - Archive
CODE_REVIEW-cloud-G09.md→code_review_cloud_G09_0.logandPLAN-cloud-G09.md→plan_cloud_G09_0.log. - If PASS, write
complete.logand move this task directory to the dated archive. If WARN/FAIL, fully write the next filesystem state required by the code-review skill. - If PASS, report the milestone completion event metadata without modifying the roadmap.
- Check the
Review-Only Checklistat the final log location before reporting.
Implementation Item Completion
| Item | Status |
|---|---|
| API-1 Agent application domain | [ ] |
| API-2 Host lifecycle | [ ] |
| API-3 Bootstrap composition | [ ] |
Implementation Checklist
- Bootstrap the project-only
agentdomain rule and mapapps/agent/**before adding application code. - Implement and test the standalone host lifecycle and dependency ports without duplicating shared runtime behavior.
- Add and test bootstrap composition with deterministic startup rollback and reverse shutdown.
- Run fresh focused, race, vet, formatting, and diff 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 of
PASS,WARN, orFAILand verified routing signals. - Verify verdict, dimension assessment, and Required/Suggested/Nit classifications match.
- Archive
CODE_REVIEW-cloud-G09.mdtocode_review_cloud_G09_0.log. - Archive
PLAN-cloud-G09.mdtoplan_cloud_G09_0.log. - Verify the Agent-Ops managed block in
.gitignore. - If PASS, write
complete.logfrom the canonical template and leave no active Markdown files. - If PASS, move this task directory to the dated archive and update this checklist at the final location.
- If PASS, report milestone completion event metadata without editing the roadmap.
- If PASS, remove an empty active split parent or prove remaining siblings/files require it.
- If WARN/FAIL, write the next filesystem state and do not write
complete.log.
Deviations from Plan
Implementer: replace with actual deviations or None.
Key Design Decisions
Implementer: replace with actual decisions.
Reviewer Checkpoints
- The new domain rule exists and is mapped before application implementation.
- Host lifecycle is application-owned and does not duplicate shared runtime algorithms.
- Startup rollback and reverse shutdown retain all error identities and are race-free.
- Modified paths exactly match the plan.
Verification Results
Domain mapping
test -f agent-ops/rules/project/domain/agent/rules.md
test "$(rg -n 'apps/agent/\\*\\*' agent-ops/rules/project/rules.md | wc -l | tr -d ' ')" = 1
Paste actual stdout/stderr and exit status.
Focused and race tests
go test -count=1 ./apps/agent/internal/host ./apps/agent/internal/bootstrap
go test -count=1 -race ./apps/agent/internal/host ./apps/agent/internal/bootstrap
Paste actual stdout/stderr and exit status.
Static verification
go vet ./apps/agent/internal/host ./apps/agent/internal/bootstrap
git diff --check
Paste actual stdout/stderr and exit status.
[IMPLEMENTING AGENT — BEFORE SAVING] Fill every implementation-owned section, then leave review-agent-only sections unchanged.
Section Ownership
| Section | Owner | Note |
|---|---|---|
| Header, Overview, Review Agent Instructions | Fixed at stub creation | Implementer must not modify or execute these |
| Implementation Item Completion | Implementing agent | Check item status only |
| Implementation Checklist | Implementing agent | Check status only; do not change text/order |
| Review-Only Checklist | Review agent | Implementer must not modify |
| Deviations from Plan, Key Design Decisions | Implementing agent | Replace placeholders with actual evidence |
| Reviewer Checkpoints | Fixed at stub creation | Reviewer verifies them |
| Verification Results | Implementing agent | Paste actual output; command changes require a deviation |
| Code Review Result | Review agent appends | Not included in the stub |