Skip to content

feat(mcp): agent-as-reviewer tools (review/scan prepare+finalize) and a cora-review skill #647

Closed

Description

@ajianaz

From the architecture audit. Part 6 of 6. Depends on 2/6, 3/6 (and 5/6 for the None path).

Goal

An AI agent (Claude Code subagent, etc.) can review and scan through cora with no LLM configured in cora: the agent is the judge. This is not the deterministic-only mode.

Proposal

Agent adapter at the judge seam, exposed as MCP tools (stateless):

  • cora.review_prepare{diff | staged | base} -> Packet (hardened prompt + fenced diff, response schema, valid_files, deterministic findings, context).
  • cora.review_finalize{diff, issues} -> recomputes the deterministic half from the same input, validates the agent's findings as untrusted (3/6), runs postprocess + gate + history, returns the verdict. No server-side state, no packet id.
  • cora.scan_prepare (paged by batch, reusing batch_files) / cora.scan_finalize. Agents may also read files themselves and use prepare only for the deterministic part.
  • cora install also installs a /cora-review skill/command that runs prepare -> judge -> finalize in a read-only subagent without secrets.
  • Optional for agents without MCP: cora review --agent prints the Packet to stdout and reads findings from stdin.
  • No result cache in agent mode.

Constraints

  • The agent can add findings, never remove deterministic ones. Agent-mode results are for developers, not the hard CI gate (that stays deterministic or HttpLlm), especially for fork PRs.
  • cora.review_diff keeps working; document when to use which.

Done when

  • A fresh machine with only cora install can run review and scan through an agent with no auth login/API key.
  • Tests for prepare/finalize round trip with a fake agent, incl. hostile findings.
  • Docs: usage + cli-reference + a security note on prompt injection.

Activity

  1. added
    enhancement
    scope:integration
    on Oct 15, 2026
  2. ajianaz commented on Oct 15, 2026

    @ajianaz
    CollaboratorAuthor

    Series map (sequential, one PR each): 1/6 finalize #648 → 2/6 prepare/judge/finalize #649 → 3/6 untrusted judge output + cache #644 → 4/6 scan deterministic family #645 (can parallel 3/6) → 5/6 select_judge #646 → 6/6 MCP agent tools + skill #647.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementscope:integration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions