The Maagal icon

For engineers who run coding agents

One goal.
A recipe of agents.

Maagal takes one coding goal through a recipe of steps. Each step runs Claude Code in its own terminal, git worktree and branch, and a check decides when it is done, by its exit code. You approve the plan and the checks. It ends in a pull request, and it never merges.

Install

curl -fsSL https://maagal.theamarium.com/install.sh | sh

Needs macOS on Apple silicon, Claude Code, the GitHub CLI and Bun.

MAAGALtasks

add a health endpoint that returns the version

tdd · approve the checks

needs you
  1. Write failing checksyou approve
  2. Build until the check passes
  3. Review the changereviewer
  4. Fix review findings
  5. Pull request with a proof report
a approveg go to the agent's terminalp proof report

01 · How it works

From one goal to a pull request.

Here is a task on the tdd recipe, start to finish. You decide three times: the plan, the checks and the merge. Agents and exit codes do the rest.

  • You decide
  • Maagal sets up
  • An agent works
  • Done
  1. You

    Pick a goal and a recipe

    Maagal draws the recipe as a diagram: which agents, which steps, where you approve. Nothing runs until you say yes.

  2. Maagal

    A clean lane

    A new git worktree on its own branch, your .env copied, dependencies installed, and the first agent started in its own terminal.

  3. Agent

    Failing checks first

    The builder writes checks and commits them. The step only ends when the check command fails on an assertion, not on a broken setup.

  4. You

    Approve the checks

    You read the check titles and approve. From here those check files are frozen: the agent cannot edit them.

  5. Agent

    Build until it passes

    The builder works until the check command exits 0. If it tries to stop early, Maagal runs the check and sends it back with the output.

  6. Agents

    Review, then fix

    A second agent reads the diff and may write only REVIEW.md. The builder fixes the findings, and the check must still pass.

  7. Done

    A pull request with proof

    Maagal pushes the branch and opens a pull request whose body is the proof report: the steps, the check output, the frozen files and the diff.

  8. You

    You merge

    The merge is yours, on GitHub. Maagal never merges.

02 · Recipes

Eight recipes. Pick the one that fits the job.

A recipe is a fixed list of steps, with an agent on each step and the points where you approve. Not sure which one? Start from what you want.

  • An agent makes something
  • A second agent checks it
  • You approve: go or no-go
  • What you get
  • Loops until the check exits 0

Change code · each one ends in a pull request

  • tdd

    pull request

    Checks first, then a loop until they pass. A second agent reviews before the pull request.

    Use it for new behaviour you can describe as checks.

    1. builderWrite checksuntil they fail
    2. go/no-goYou approvechecks frozen
    3. builderBuilduntil exit 0
    4. reviewerReviewREVIEW.md
    5. builderFix findingsuntil exit 0
    6. donePull requestwith proof report
  • bugfix

    pull request

    Reproduce the bug as a failing check, then fix it. The check you approved is the proof the bug is gone.

    Use it for a bug you can show with a failing check.

    1. builderReproduceuntil it fails
    2. go/no-goYou approvecheck frozen
    3. builderFixuntil exit 0
    4. donePull requestwith proof report
  • e2e

    pull request

    A feature proven from the outside: end-to-end checks first, build until they pass, then a review.

    Use it for a feature you want proven the way a user would use it.

    1. builderEnd-to-end checksuntil they fail
    2. go/no-goYou approvechecks frozen
    3. builderBuilduntil exit 0
    4. reviewerReviewREVIEW.md
    5. builderFix findingsuntil exit 0
    6. donePull requestwith proof report
  • app

    pull request

    A whole app or a large feature from a short brief. You approve a plan, then the end-to-end checks, and it is built slice by slice.

    Use it for work too big for one set of checks.

    1. builderPlanPLAN.md
    2. go/no-goYou approvethe plan
    3. builderEnd-to-end checksuntil they fail
    4. go/no-goYou approvechecks frozen
    5. builderBuild, slice by sliceuntil exit 0
    6. reviewerReviewREVIEW.md
    7. builderFix findingsuntil exit 0
    8. donePull requestwith proof report
  • refactor

    pull request

    Change the structure, not the behaviour. Every check already in the repo is frozen and has to stay green.

    Use it for cleanups where nothing a user sees should change.

    1. builderRefactorevery check frozen, until exit 0
    2. donePull requestwith proof report

Answer a question · no pull request, you get a document

  • spike

    NOTES.md

    Explore a question. No check and no pull request: it ends in notes on its own branch.

    Use it for "can we even do this?" before you pick a real recipe.

    1. builderExploreNOTES.md
    2. doneNoteson its own branch
  • research

    a report page

    Deep research on a subject: a scope you approve, sourced notes, a readable report with diagrams, a fact check.

    Use it for a subject you need to understand, with sources.

    1. researcherScopeRESEARCH-PLAN.md
    2. go/no-goYou approvethe scope
    3. researcherCollect sourcesSOURCES.md
    4. writerWrite reportREPORT.md
    5. criticFact checkREVIEW.md
    6. writerPublishREPORT.html
    7. doneA reporta page you open
  • market

    a verdict

    An honest market review of a feature, an idea or a whole app: who else does it, what real people say, a hands-on look, then a verdict.

    Use it for deciding whether to build it at all.

    1. analystBriefMARKET-PLAN.md
    2. go/no-goYou approvewhat is judged
    3. analystResearch marketMARKET-SOURCES.md
    4. testerHands onPRODUCT-NOTES.md
    5. writerWrite reviewMARKET-REVIEW.md
    6. skepticChallengeREVIEW.md
    7. writerPublishMARKET-REVIEW.html
    8. doneA verdictyou can act on

Each agent may write only the files its step allows: a reviewer writes REVIEW.md and nothing else. Need another way of working? A recipe is one JSON file in ~/.maagal/recipes/, with no engine change.

03 · Use it

Three steps to your first task.

Run it from the Maagal app, or from a terminal. Both drive the same engine.

  1. Install

    Run the one-line installer. It adds the Maagal app, the maagal command, and Herdr's terminal engine if you don't have it yet.

  2. Start a task

    Open Maagal, press ⇧⌘P, choose Maagal: tasks and press n. Pick a repo and a recipe, then type the goal.

    Give the check command too, such as your test run, or leave it empty to use npm test. The last screen shows the full diagram; press enter to start.

  3. Step in when it asks

    Tasks that need you are listed first. Press a to approve a gate, g to jump to the agent's terminal, p for the proof report and o to open the pull request.

Or from a terminal

# list the recipes, then draw one
maagal recipes
maagal plan tdd

# start a task; it shows the diagram and asks first
maagal start my-api "add a health endpoint that returns the version" --recipe tdd --check "npm test"

# follow it, approve the gate, read the proof
maagal status
maagal gate <id>
maagal approve <id>
maagal report <id>

Add --json for machine-readable output. maagal drop <id> stops a task and keeps its branch.

04 · The rules it keeps

Proof over promises.

An agent saying "done" is not proof. These rules are why the pull request you get is worth reading.

  • Exit codes decide

    A step is finished when its check command exits 0. The agent's word never counts.

  • Approved checks are frozen

    After the gate, check files and test config (package.json, vitest, jest and playwright config, snapshots) are locked. Edits are refused before they happen.

  • No empty wins

    A green step is refused when the output shows no tests ran. A red step is refused when the check fails on a broken setup instead of an assertion.

  • Stuck means it stops

    The same refusal three times in a row, or eight refusals in one step, and the task stops and waits for you.

  • One lane per step

    Every step gets its own terminal, git worktree and branch, and every agent writes only the files its step allows.

  • It never merges

    Every coding recipe ends in a pull request with a proof report. The merge button stays yours.

05 · Install

Run your first recipe today.

curl -fsSL https://maagal.theamarium.com/install.sh | sh

Needs macOS on Apple silicon, Claude Code, the GitHub CLI and Bun.

It runs on your Mac with the Claude Code subscription you already pay for. Nothing leaves your machine through Maagal; your agents reach their own services as they always do. The app sends no reports and never checks for updates. Codex support is planned.