--- name: review-change description: "Review a repository diff, implementation, or proposed merge for actionable defects and Phase 1 contract violations. Review-only by default; use when review is requested, not to implement features or write tests." --- # Review a Phase 1 change Read applicable AGENTS.md instructions and the [shared reference map](../../../docs/agent-reference-map.md). Follow its review-change reading route, including Phase 1 exclusions and the distinction between the prototype and planned design. ## Workflow 1. Resolve the requested scope and base. Inspect Git status and the actual diff, including relevant untracked files when in scope. For a merge review, establish the intended target and merge base; do not silently assume a branch. If the base cannot be determined, ask a focused question and continue independent inspection. 2. Read affected surrounding code, callers, tests, and governing document sections. For an implementation review without a diff, state the inspected paths. Distinguish pre-existing gaps from defects introduced by the change. 3. Check correctness, authorization, API/schema contract alignment, data integrity, failure behavior, and relevant concurrency/retry semantics. Inspect consumers when contracts intentionally change. 4. For changed retrieval or lifecycle code, trace a concrete failure path for inactive/deleted document exposure, forged scope, stale context, invalid citations, or duplicate provider work. Check document/chunk identity and provider/application boundaries. 5. For changed jobs or persistence, check claim/lease fencing, atomic publication, lock order, replay uniqueness, and interruption recovery against database contracts. Do not infer constraint correctness from mocks. 6. For changed conversations or Live code, check owner authorization, turn/source mapping, epoch rechecks, shared retrieval, duplicate tool events, and close/failure states. Treat live signaling as provisional until the documented provider proof exists. 7. Validate suspected findings using targeted read-only inspection or checks safe for the requested scope. Do not execute production writes. Ordinary app imports can initialize embeddings/storage; inspect command side effects first. If a check needs repository mutation or unavailable services, report the limitation. 8. Prioritize actionable defects over style. Require a reproducible trigger or concrete failure path and material impact. Do not invent findings to populate the report. 9. Report findings before the summary, ordered by severity. State review scope, checks performed, and untested risks even when no defects are found. ## Scope and stopping conditions Default to review-only: do not modify files or fix defects unless the user requests fixes. Do not recursively invoke implementation or testing skills. Missing references or unresolved contract decisions limit only dependent conclusions; disclose the exact gap and continue unrelated review. Do not report deferred roadmap features as bugs. Use the Phase 1 plan to distinguish missing scoped functionality from intentional exclusions, and the current task to distinguish introduced defects from unrelated prototype limitations. Existing code is not authority for conflicting contracts; documentation changes cannot excuse an unintended bug. ## Findings format For each finding include: - Severity: critical, high, medium, or low, proportionate to impact and likelihood. - Actual file and line/location, with the smallest useful affected location. - Concrete trigger and failure path. - User/data/security impact. - Recommended correction direction and supporting contract or observed check. Close with scope/base, checks and their outcomes, and residual risks. If no actionable defects are found, say so explicitly without implying comprehensive correctness or execution of unavailable tests.