/corgi:factoryfrom corgi
Helps teams decide their automation level on a 5-rung autonomy ladder, from manual work to lights-out merging. Use when planning how much to automate, setting unattended runs, or choosing the next step toward a software factory.
Ships in corgi. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Read ../_shared/conventions.md first (finish what you start, attribution, unattended runs).
Done when: corgi agent level was read, the one next step and its brake are in place, and the
report says what to watch for a week before the step after it.
corgi works anywhere from a skill called by hand to agents that merge what passes. It is a ladder, not a switch. Most repos should not be at the top, and a repo with no tests cannot be. Find the rung, then take one step.
corgi agent level # where this workspace stands, which brakes are on, the next step
corgi agent level --all # every workspace; each has its own rung
corgi agent level 4 --done-when "go test ./..." # move this workspace, and only this one
Pick the rung per workspace by what a mistake costs there. Docs can sit high while payments stay at 2.
| Level | What the person does | corgi parts |
|---|---|---|
| 1 You drive | starts each session | skills, corgi run, corgi agent claude |
| 2 It tells you | gets rung, starts the work | watch enable, the board, the phone |
| 3 It drafts, you review | reads every diff | watch --action fix, stories, review |
| 4 It works a shift | writes specs and checks, reads PRs | --isolate, --done-when, plan, routine, autopilot |
| 5 Lights out | writes specs and scenarios; reads only what is held for them | --merge-unread, scenario, scorecard |
At level 5 a pull request merges with nobody reading it only if a run opened it, the checks are green, the run ended clean, the diff is small and stays away from auth, payments, data, CI, dependencies and native code, its risk card is 2 or below, and that exact commit satisfies the scenarios. Anything else waits for a person, who hears once why. A pull request a person opened never merges this way.
Start from a problem, not from the factory. Untriaged tickets, PRs that wait for a first review, a flaky suite, bugs nobody reads. Name it, and pick the smallest thing that solves it.
Every trigger is an accelerator. Fit the brake first. There are three: checks a machine runs, a review by something that reads the diff cold, a person. A trigger with no brake makes a slop cannon.
One trigger at a time, throttled. One kind of event, a daily clock, --max-per-day 5. Read every PR
it opens. Open the throttle when corgi agent scorecard has earned it: runs that end green, not runs
that ended.
Cap every loop. Retries, review rounds, fix attempts: a few, then a person. An uncapped loop spends the whole window on one mistake.
What a person catches becomes a check. Each comment a reviewer repeats is a lint rule or a scenario not yet written. That is how the human gets out of the loop without quality falling.
| Slot | In corgi |
|---|---|
| Where work arrives | the tracker, watch, task add, idea tickets |
| What starts a run | watch events, routine clocks, plan, another run's result |
| Where a run happens | a worktree (--isolate), agent container, another laptop (peers) |
| A run's memory | the tracker, git, handoff, lesson. Nothing else survives a run |
| What stops a run | --done-when, scope, guard, cap, the breaker, quiet hours |
| What you see | the board (live line, who worked, features), history, scorecard, cost, selfcheck, digest |
| What forgets | kanban reconcile, hourly: finished and quiet cards leave the board, into history |
Work out what the workspace lacks before adding a trigger. A run must leave everything the next one needs in those memories, written down, never in a session's head.
corgi agent task add "Fix the export" --workspace api --run # the dashboard has "Start now, without me"
corgi agent task comment TASK-3 "the total is still wrong" # or the box on its card; a new run reads the thread
Level 3 and up. Teammates review on the pull request (--prs wakes the run), and need no corgi. Errors from Sentry
and Coralogix land in the inbox to be picked (--sentry-org, /hooks/coralogix); --auto-for errors runs them
without you, and only belongs where the service is quiet.
Tasks move between peers: one that has not started goes to a peer after its machine is silent for 10 minutes, and
task send TASK-3 --to <peer> moves one by hand. A run in progress stays. task add --on <peer> adds one there.
An agent that can read its tests can pass them without doing the work. Keep the proof where it does not look.
corgi agent scenario add refund --text "A customer who paid yesterday asks for a refund and sees it on their statement."
corgi agent scenario run --dir <worktree> --times 3 --min 90
corgi agent routine add scenarios
complexity, quality and ratchet running.corgi agent plan turns a goal into tasks that wait for each other; the daemon runs what is ready, in worktrees.
corgi agent plan "add rate limits to the public API" --retries 1 --slots 2
corgi agent plan graph P-3 # who waits for whom, where each stands; --dot for Graphviz
stories, not a graph.TASK-1 → TASK-2 + TASK-3: two side by side after the first). That line is the plan's status for a
person; plan graph is the detail.Third-party services block a factory: rate limits, costs, failure modes you dare not trigger. Put a fake behind
the same API as a service in corgi-compose.yml, built from the public docs and checked against the vendor's
own client. It pays for itself only for a service you hit constantly, and a fake drifts: test it against the
real one on a clock. Start with the one service that blocks the most runs.
align), unattended only when specs, tests or an
existing app pin it down. Most bad runs started from a sentence.<file>" beats a description.corgi agent cost per ticket. Heavy token use is a cost to weigh, not a goal.corgi agent routine add retro # this workspace's runs and sessions; each top cause filed as a task
corgi agent routine add ratchet # tighten one check a week, never loosen
corgi agent routine add lessons # reviews become rules
corgi agent selfcheck # what keeps failing in unattended runs
sessions ──▶ retro ──▶ one change ──▶ a person says yes ──▶ measure next week
▲ │
└──────────────────────────────────────────────────────────────┘
corgi agent history --json is the ledger behind both: every run with
its outcome, cost, model and agent per ticket, so a week can be compared with the one before.Step down as readily as up. Report the level, what changed, the brake, and what to watch.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub andriiklymiuk/corgi --plugin corgi33 skills in this plugin
/agentUse for corgi agent mode: Remote Control from a phone, the session board ("who is waiting on me"), watching trackers and PRs ("tell me when someone comments"), why a watch fired, and handoffs ("leave a handoff for ABC-7"). NOT compose authoring (corgi), starting a stack (run), debugging (debug)./alignUse when the user says "align", "let's agree first", or a request can be read two ways before any code. Reaches a shared understanding cheaply, then codes. NOT a plan gate or a long interview./autopilotUse for a SUPERVISED loop that drains the ticket queue into draft PRs: "autopilot", "keep shipping the queue", "drain the backlog overnight". One spec gate per batch, never merges. NOT a single batch (/corgi-queue)./before-afterUse to prove a visual change against what it replaced: "before and after", "screenshot comparison", "attach screenshots to the PR". Captures the same screen on the base branch and yours. NOT a design match (design-parity) or store shots (mobile-screenshots)./budgetUse for "how much budget do I have", "can I start another task", "when does the limit reset". Reads `corgi agent usage --json`, answers in numbers, suggests `corgi agent carry` near a limit./ciUse to put a corgi stack in CI or run e2e across repos: "set up CI for this workspace", "wire this to GitHub Actions/GitLab CI", "full-stack e2e on the PR". NOT compose authoring, local runs, broken stacks or PR review.Other plugins' skills for the same job