For agents
Code Review agent handoff
Ownership, change routes, checks, and security boundaries for the Code Review repository.
Code Review CLI handoff
Purpose
Provider-neutral, low-noise AI code review for local Git diffs, files/stdin, and GitHub pull requests. Bounded diff-first context packs run one multidimensional analysis; adversarial votes remove weak findings; reporters emit Markdown, GitHub reviews, and SARIF.
Ownership map
src/cli.ts: public flags, source selection, provider selection, exit policy.src/campaign-reducer.tsandsrc/campaign-store.ts: deterministic lifecycle, atomic checkpoints, leases, replay, and resume.src/campaign-preflight.ts: provider-free campaign discovery, eligibility, source planning, budget checks, and worktree gating.src/batch-mode.ts: shared measured batching, including single-file context-pack partitioning (ADR-0006); preserve pack identity in artifacts, cache keys, and consolidation.src/budget.ts: provider-free hierarchical budget compilation, reservations, and dimension-aware usage accounting.src/review-stores.ts: separate self-hosted feedback and approved-knowledge stores with bounded schemas, atomic writes, retention, concurrent-write serialization, and the scoped AgentsKitRetriever.src/review-feedback.ts: deterministic feedback reconciliation, resumable checkpoints, metrics, and inactive candidate-rule evidence.src/campaign-runner.tsandscripts/review-campaign.mjs: bounded multi-PR execution, leased atomic checkpoints, resume, per-PR isolation, and deterministic terminal reporting.src/quality-matrix.ts: run and campaign quality scoring, evidence separation, cost/time accounting, and baseline regression gates.evaluateCampaignQuality()must be used when aggregating campaign outcomes.src/<provider>-adapter.ts: logged-in local CLI adapters.src/provider-registry.ts: validated provider capabilities and conservative execution policy around AgentsKit adapters.src/provider-execution.ts: typed provider failures, bounded retry delay, adaptive concurrency, and cancellation-aware queueing.src/scm-contract.ts: provider-neutral change-request, publication, readiness, and merge contracts plus explicit capability checks.src/github-scm-adapter.ts: GitHub REST/CLI binding for the common SCM contract; the only migrated path allowed to contain GitHub payloads or merge commands.agents/code-review/: review pipeline, lenses, input normalization, reporters.agents/code-review/risk.ts: provider-free context-pack risk signals and specialized-depth selection.action.yml: composite GitHub Action contract..github/workflows/release.yml: Changesets version-pull-request workflow..github/workflows/publish.yml: version-PR-gated npm Trusted Publishing and GitHub Release workflow.examples/: copy-ready Action workflows.README.mdanddocs/OPERATIONS.md: public adoption and operations guidance.ecosystem.json,llms.txt, andllms-full.txt: canonical product graph and machine-readable discovery/full-corpus surfaces.test/: credential-free CLI, Action, and documentation contract proofs.
Boundaries
- Depend on AgentsKit adapter/runtime/tool contracts; do not create a second model abstraction.
- Preserve provider neutrality and advisory-by-default Action behavior.
- Never expose provider keys in arguments, docs fixtures, logs, or PR output.
- The Fumadocs site provides curated documentation only; the product runtime remains the CLI and GitHub Action. Do not add an embedded AgentsKit Chat runtime here.
- The vendored review agent tracks the AgentsKit Registry source; keep divergences explicit.
Change routes
- CLI flag/provider behavior: start at
src/cli.ts, then update README, operations docs, and tests. - Cycle entry-point changes must pass the npm-style symlink subprocess test; an import must remain side-effect free.
- Fatal batch/provider errors must abort peers and drain active work before writing a terminal result. CLI SIGTERM must reach the provider subprocess, not just terminate its parent.
- Local CLI subprocess behavior: start at the matching
src/<provider>-adapter.tsand add an offline fixture. - Review logic or noise reduction: start at
agents/code-review/agent.ts,agents/code-review/sources.ts, and the relevant dimension prompt; preserve bounded diff-first packs, exact changed-line anchoring, pre-provider AgentsKit token checks, and one structured analysis per normal pack. Prove both survival and rejection behavior. - Campaign lifecycle or resume behavior: update the reducer/store together and run their focused crash/replay tests.
- GitHub comments/SARIF: start at
agents/code-review/reporters.tsand verify permissions/failure docs. - Action input: update
action.yml,examples/pull-request.yml, README, and contract tests together. - Release automation: update
.github/workflows/release.yml,.github/workflows/publish.yml, Changesets configuration, and the automated publishing section indocs/OPERATIONS.mdtogether.
Verification
npm ci
npm run check
npm pack --dry-runnpm run check includes typecheck, build, an end-to-end offline stdin review, Action/documentation tests, Doc Bridge gates, and CLI help.
Ecosystem routes
- AgentsKit — runtime, adapters, and custom review agents: https://www.agentskit.io/docs
- Registry — ready-made agent source: https://registry.agentskit.io/docs
- AgentsKit Chat — conversational delivery; do not embed a chat runtime here: https://chat.agentskit.io/docs
- Playbook — engineering discipline before verification: https://playbook.agentskit.io/docs
- Doc Bridge — documentation ownership, freshness, and handoff generation: https://doc-bridge.agentskit.io
- Code Review — configurable, evidence-based review: https://code-review.agentskit.io
- AgentsKit Harness — configurable issue-to-release SDLC: https://harness.agentskit.io
Use llms.txt for discovery and llms-full.txt only when the complete public, operational, and agent-handoff context is required.
Human guide
- README: https://raw.githubusercontent.com/AgentsKit-io/code-review/main/README.md
- Operations guide: https://raw.githubusercontent.com/AgentsKit-io/code-review/main/docs/OPERATIONS.md
- Contributing: https://raw.githubusercontent.com/AgentsKit-io/code-review/main/CONTRIBUTING.md
- Security: https://raw.githubusercontent.com/AgentsKit-io/code-review/main/SECURITY.md