Card Pipeline

Every Trello card on the board, from To-Do to production. Agents plan, build, check and fix; plain code decides every move; you approve what ships.

To-Do→Planning→Building→Verifying⇄Fixing→Deploying→Awaiting approval→Approved→Done

A simulation that runs the pipeline's own decision rules (rules.js, ported line for line); the agents and GitHub are stand-ins with scripted outcomes. Click a card to read its progress file. Cards marked you wait for a person.

Progress file

pick a card

    

Board comments

newest first

    How it's builtOne state machine, four agents, one approval

    A local Node service (packages/agent-pipeline) polls the board every two minutes. It claims cards from Bug, then To-Do, and moves each one a step at a time. Every agent is a separate headless run with one job, its own tool allowlist, a turn cap, a timeout and a spend cap. Agents return structured data (a plan, a verdict); the orchestrator alone decides, from that data, where the card goes next. Production deploys only when you move a card to Approved.

    ListWho worksOutcome → next list
    To-Do / BugOrchestratorClaimed under a lock, bugs first, up to the parallel cap → Planning
    PlanningPlanner (read-only)Valid plan → Building, once no card in progress shares its files and, for risk high or migrations, the approved label is on. Questions → Blocked. Over 8 files or 6 steps → split into new cards.
    BuildingImplementerBuilt within the plan's files → Verifying. Needs other files → re-plan once. Fails → one retry, then Blocked.
    VerifyingVerifier (read-only)Re-runs the tests, lint and typecheck itself, rejects skipped or deleted tests, then reviews the diff with fresh eyes. Pass → PR. Fail → Fixing.
    FixingFixerFixed → back to a new verifier. Two fixes used, or the same issue twice → Blocked.
    DeployingGitHub (CI)Opens the PR, waits for green CI on an up-to-date branch, squash-merges one card at a time → Awaiting approval. Red CI → Fixing.
    ApprovedYou, then CIProduction deploy: checks, smoke test, ten-minute watch → Done. Failure → rolled back, deploys frozen, card → Fixing.

    Guard rails

    • Planner and verifier only read; implementer and fixer may edit files and run the repo's checks. No git writes, installs or network for any agent.
    • One card, one branch, one git worktree per run, and a test database named after the card.
    • Card text is fenced as data; a planted instruction in a comment was ignored and flagged in testing.
    • Per-card locks with a timeout in SQLite; one orchestrator per machine.
    • Pauses on a STOP card, PIPELINE_PAUSED=1, three failed cards in a row, or the daily spend cap.
    • DRY_RUN=1 runs the agents but writes nothing outside the laptop.

    Production

    • Merging to main ships nothing. Production deploys only by dispatch, and only a commit on main.
    • The deploy re-runs typecheck, lint and the db tests, then sst deploy, a smoke test and ten minutes of health checks.
    • A release that survives is tagged production-last-good; one that fails is redeployed from that tag.
    • A failure sets DEPLOY_FREEZE: nothing else ships until the card's fix does.
    • One deploy of a commit ships every card merged before it, so they all move to Done together.

    Running it

    • Start: pnpm --filter @app/agent-pipeline start
    • Approve: drag the card to Approved.
    • Unblock: answer in a comment, move it back to To-Do.
    • Pause: add a card named STOP to To-Do; remove it to go on.
    • After the circuit breaker: pnpm --filter @app/agent-pipeline resume
    • Ship by hand: gh workflow run deploy.yml -f stage=production -f sha=…
    • Each card's history: ~/.local/share/card-pipeline/progress/IEL-n.md

    Proven so far

    45unit tests: every transition, locks, overlap, the merge queue against a scripted gh, webhooks
    3 cardsdry run on the real board: two built side by side, the third waited for shared files ($2.79)
    PR #27first real card (IEL-4): planned, built, verified, merged as 7c56a27 for $0.56 in 10 minutes
    In productionyou approved IEL-4; checks, sst deploy and the smoke test passed, then the ten-minute watch

    Still open: the rollback path has run only in tests, never against production; Trello events arrive by polling, since the Pipedream forward is skipped; the service setup and runbook come next.