MakerChecker

secondmate is a Claude Code plugin that makes your AI coding agent check its own work with a second opinion.

View on GitHub →

The SOP

Maker is not checker

When an agent writes code, the same agent usually reviews it, so it misses its own mistakes. secondmate splits the job in two: one agent writes the change (the maker), a different AI model reviews it (the checker), and nothing gets merged until the checker passes it, the change clears an automated safety gate, and you give the final OK.

Because the checker is a different model than the maker, it catches bugs the maker is blind to. secondmate also keeps long runs from going off the rails, remembers your decisions across restarts, and can hand hard analysis to a reasoning model on the side. Works with any coding-agent CLI.

  1. 01

    Captain

    you (human)

    state intent, approve risky actions

    the only merge authority

  2. 02

    Top-level supervisor

    Claude Code (Sonnet), human-facing

    recognize the trigger, dispatch a fresh sub-agent-supervisor, watch for progress/staleness, relay stuck/hold situations verbatim, stay free for the next input

    never runs the maker/checker/gate/hold/merge loop itself once the trigger fires

  3. 03

    Sub-agent-supervisor

    Claude Code (Sonnet), dispatched

    plan, triage, orchestrate, adjudicate, integrate — the loop's stages 0-10 all run here

    never writes project code itself

  4. 04

    Planners

    6 open-weight models via pi

    each covers one dimension of the task in parallel

    headless, edit-locked (Read/Grep/Bash, no edit/write)

  5. 05

    Maker

    Claude or pi + GLM-5.3

    implement the change in an isolated worktree

    works only in its own worktree

  6. 06

    Checker

    a different model (GPT-5.6-Terra)

    review the diff adversarially

    physically read-only, edit-locked

The loop

Stage by stage

  1. 00

    Plan Committee

    Six AI models look at your task from different angles, and one merges it all into a single plan.

  2. 01

    Triage

    The task gets sorted: code to ship or a question to answer -- and how careful we need to be.

  3. 02

    Spawn

    The maker gets its own isolated workspace. Your main project is never touched.

  4. 03

    Implement (guarded)

    The maker writes the code, with automatic guards watching every edit.

  5. 04

    Check

    A different AI model -- one that didn't write the code -- tries its best to break it.

  6. 05

    Gate

    An automated gate re-checks the facts: clean workspace, real tests, actually passing.

  7. 06

    Hold

    Anything risky -- merging, deploying, deleting -- stops here and waits for your explicit yes.

  8. 07

    Integrate

    Only a passing review, a green gate, and your approval let the change land.

  9. 08

    Teardown

    The temporary workspace is closed and cleaned up, with proof nothing was left behind.

  10. 09

    Audit trail

    Every decision, verdict, and approval is written to a permanent log you can replay.

  11. 10

    Lesson feedback

    What this run learned is fed back, so the next task starts smarter.

Full detail in the architecture doc.

Quick start

Run your first loop

claude plugin marketplace add eshwarvijay/secondmate
claude plugin install secondmate@secondmate
# restart Claude Code, then let it set itself up — you just approve each step:
/secondmate-doctor

Then run any change through the loop:

/loop-task add a rate limiter to the API and prove it works

secondmate spawns the maker in an isolated worktree, runs a different model as an edit-locked checker, gates on its {verdict} plus a clean verify-gate, and asks you before anything merges. Need a quick read-only analysis? /secondmate-reason why does this test flake only in CI?

Requirements

What you need

git, gh, python3, and (recommended) a checker harness CLI (defaults to pi). Just run /secondmate-doctor: it detects and installs everything, asking only for your approval, and never hands you a manual checklist.

No harness? You still get a cross-model check. secondmate falls back to a second Claude model as the checker, in-session, so the maker is still not the checker. An external harness like pi gives a stronger cross-vendor check (a different vendor, not just a different Claude model). Either way, the models need credentials only you can supply.