Skill

implement

Drives filed issues to a reviewed, draft-PR-ready branch, running build, verify, and review for each issue on its own and working independent issues in…

Install

npx skills

npx skills add JoshuaOliphant/compost --skill implement

Works for Codex, Cursor and other harnesses. Use -a <agent> to target one, e.g. -a codex.

Claude Code

/plugin marketplace add JoshuaOliphant/compost
/plugin install compost@compost

Issues are a task graph, not a to-do list. At any moment some of them are unblocked; that set is the frontier, and this skill's job is to keep it moving until every issue under the parent is built, verified, and reviewed on one feature branch. You pick the flow from here without being led: each issue goes through compost:build, compost:verify, and compost:review, and you decide everything a reasonable colleague would decide, writing each ruling down on the issue instead of stopping to ask.

Keep the orchestration light. A plain agent working an issue lands it; ceremony around that agent (ledgers, status files, pilot runs, verifier agents that rerun one command) costs more than it buys. The tracker and git are the only records. Order the work so each step can be checked before the next builds on it (sequence verifiable units).

Steps

  1. Orient. Read docs/agents/issue-tracker.md for the tracker and its commands; if it is absent, run compost:setup now, then continue. A GitHub one without the fork check takes it from setup's GitHub reference. Inside a run, setup's questions take its recommended answer, ruled on the parent; its irreversible step (uninstalling orphaned plugins) waits for the user. If docs/agents/observability.md is absent, run compost:setup's observability step on this branch before any worker branches from it. When docs/agents/testing.md names no verify command, build it likewise, by compost:verify's step 1, so lanes don't each write their own. Read the parent issue, every sub-issue, and every comment on them: an architectural parent (**Class:** architectural) with no approval comment stops for approval, unless the ask that started this run said to build it; earlier rulings bind you, and a compost:pause status comment means you are resuming from its next action. Read references/run-contract.md now: before anything that can stop the run, print the contract's Stops block and check its prerequisites. Read CONTEXT.md and the ADRs in docs/adr/ for the issues' areas; git log and git worktree list show what already landed.

  2. Compute the frontier. Run uv run ${CLAUDE_PLUGIN_ROOT}/scripts/frontier.py issues <parent> --tracker <tracker> (docs/agents/issue-tracker.md names it; local takes the spec.md path, linear --snapshot <file>) and act on the state it prints for each sub-issue. Its definitions are the only ones; compost:build and compost:pause use them too.

    • Session id: frontier.py session, kept in the clone's git dir so it survives compaction; a second session in the clone prefixes each frontier.py call with COMPOST_SESSION=<new id> (an export dies with its Bash call) and tags with it. End every comment the run posts, yours and workers', with compost-session: <id> (a local tracker adds the time from date -u +%Y-%m-%dT%H:%M:%SZ), since every session posts as the same user.
    • Done: closed, or ticked on the parent's checklist. A remote tracker closes an issue only when its PR merges, so in a run done means ticked: reviewed and landed (step 7).
    • Blocked: an issue on its "Blocked by" lines is not done; ignore the forge's dependency count.
    • Taken: a remote branch <issue>-* exists and another live session holds it. The holder is the session on the earliest Started <branch> comment (step 4), unless it had been silent a day when a later one was posted; a session is live while some comment it tagged, on the parent or any sub-issue, is under a day old. Take over an expired or unclaimed branch from its head and post your own Started. Your sessions are your id plus those on Resumes: <id> lines you tagged (compost:pause step 5). A run that tags nothing for a day loses its claims, so a long lane posts progress.
    • Frontier: open and not done, blocked, or taken, and not labelled ready-for-human (work only a person can do; list those under Risk in the close-out recap).

    Compare the Files blocks of the frontier issues: issues whose file sets don't overlap can run at once; issues that share a file go into one lane and run in order. How many issues to take on at once is your call; there is no size rule.

  3. Set up the feature branch. Work in a worktree on a feature branch named for the parent issue; if you are already in one, use it. A new one starts from a fresh default branch: run git fetch origin; when the local default has commits origin lacks (git rev-list --count origin/<default>..<default> is not 0), branch from origin/<default>, keep the local commits, and rule on it. Otherwise fast-forward it, with git merge --ff-only origin/<default> in the checkout that has it or git fetch origin <default>:<default> when none does, and branch from it; when uncommitted changes block that merge, branch from origin/<default> and rule on it too. A resumed run fetches and merges a moved origin/<default> into the feature branch before any lane starts. Open a draft PR only when the tracker closes work through PRs (its reference in docs/agents/issue-tracker.md says an issue closes when its PR merges) or the user asks, once the first issue lands (step 5): the forge rejects a PR with no commits. Committing, pushing this branch, and the draft PR need no one's OK; merging the PR does.

  4. Work the frontier.

    • One issue, or one lane, outside a lane-routing run: do it yourself in this session. Load compost:build, then compost:verify; a subagent would only add a handoff.
    • Several independent issues or lanes: a lane earns a subagent when its work outweighs the handoff: a brief, a worktree, a merge, and a report to read. Lanes that are each a short edit (a doc fix, a config value) don't; work them yourself, in order. Spawn the rest in parallel, one subagent per lane in one message, each with isolation: "worktree" and in the background, without asking. A worker works its lane's issues in order. In a lane-routing run every lane spawns, whatever its size. With agent teams enabled (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1), spawn named teammates; one can't take isolation, so its brief makes the worktree.
    • Before starting an issue, in a lane or yourself, push its branch name at the feature SHA (git push origin <feature SHA>:refs/heads/<issue>-<slug>) and comment Started <issue>-<slug> on the issue, tagged with the session id, so other sessions see it taken. Then rerun frontier.py issues; if it now reads taken, another session got there first: pick the next.
    • An isolated worktree starts from the default branch, not the feature branch. Every brief names the feature branch's head SHA, and the worker switches to it before any work.
    • Write each brief from references/task-brief.md: the issue, its acceptance criteria, its Interfaces block, the CONTEXT.md terms it uses, and pointers to any rulings that touch it. Size the brief to the issue; a one-file change gets a paragraph.
    • Leave model and effort unset on every spawn, so each lane inherits yours, except in a lane-routing run: its ask tiers the lanes or runs their untiered control, or the parent's latest "Lane routing:" comment is not "ended". Then references/lane-routing.md decides how every lane spawns and whether a leftover marker still applies.
    • Keep a rolling window, not batches: when an issue is ticked (step 7), spawn whatever that unblocked at once. A merge alone doesn't unblock, so a dependant never builds on work review may send back.
  5. Land each finished issue. A completion is an event to handle, not a review to do inline. Read the worker's report (concerns first on DONE_WITH_CONCERNS), then its diff: the report is a claim. Judge workers by commits, not words; stalls, retries, and late returns follow references/task-brief.md. Once its branch is merged, apply any AC-table row retirements it reports (compost:verify step 5), and refresh the committed AC-table cache if the verify command keeps one. Merge its branch into the feature branch with --no-ff, then run the suite on the feature branch, as after any change. A red suite after a merge goes to compost:diagnose. When the repo's instructions want a version bump for a changed package, commit it right after the first landing, before the first push, so the PR's checks are green from its first run, and again after any later landing that first changes another package; lanes leave versions alone. Push the branch after every landing. After the first, when step 3 calls for a PR, open a draft PR whose body closes the parent and every sub-issue ("Closes #12, closes #13"), leaving out ready-for-human sub-issues and any another session holds (frontier.py reads it taken), and the parent while any of those is open. After each push, read the head's checks and settle a red one before the next lane starts, by references/push-checks.md.

  6. Review every issue. Load compost:review for the issue's commits. It runs the /compost:review-changes workflow; you never wait to be asked. Scope it to the one issue: for an issue landed by a merge, pass base as <merge>^1, head as <merge>^2, and issue as its number; for one built in this session, pass base as the parent of its first commit and head as its last. No issue skips review for being small; a small diff gets the workflow's light path. Take its findings through the reception protocol there: check each against the code, fix what holds, and rule on what doesn't.

    • Fix findings where the work was done: resume the worker that built the issue with the findings verbatim, or fix them yourself when you built it. Each fix is seen failing before it passes, then compost:verify runs again. A worker's fixes land on its own branch, so land it again (step 5) before the re-review.
    • If three rounds of fixes still leave findings open, stop the loop. Count rounds from the issue's compost:review comments, each headed Review round <n>, not from memory, so the cap holds across a pause or a compacted context. Rule on each remaining finding (park it, or make the smallest change that unblocks dependent issues) and post the ruling. A loop that won't converge is a design problem, not an effort problem. A failing gate gets three rounds too (task brief).
  7. Record progress. When an issue passes review, tick it on the parent's checklist (only this skill ticks the parent; workers tick their own issue's AC boxes) and comment on the issue with its commits and the verification you ran. With no PR to close it, close the issue the way the tracker says; with a local tracker that is Status: closed and a closing note in the issue file. Then recompute the frontier and go back to step 4.

  8. Step sideways when the work calls for it. A defect you can't fix on sight goes to compost:diagnose; a question about a module's shape or an interface goes to compost:deepen. Both hand back here. An issue that turns out bigger than its acceptance criteria goes to compost:slice for a follow-up issue rather than growing in place.

  9. Decide, log, proceed. Every judgment call you make on the user's behalf (an ambiguous criterion, a spec conflict, a library choice, a finding you decline) is posted as a comment on the issue it concerns, then you keep going:

    **Ruling:** what you decided
    **Why:** the reason, citing the doc or line when it rests on an external fact
    **Cost if wrong:** what it takes to undo
    

    Then ask Jev whether the ruling deserves an ADR: run adr-worthy with the ruling's fields and write one in docs/adr/ only on offer_adr (jev). Exit 3 means Jev is unavailable: apply the three tests in domain docs yourself.

    A wrong ruling costs a review comment; a stalled run costs the user's day. Stop only for the run contract's Stops (step 1), which always hold:

    • merging to the repository's default branch;
    • a force-push or a history rewrite on a shared branch;
    • a deploy or release, including one flagged for the user's approval;
    • deleting data;
    • a message that reaches people beyond the run's own issues: an email, a chat post, or a comment, mention, or review request on someone else's issue or pull request;
    • approval of an architectural spec: one never approved (step 1), or one the work shows has to change;
    • starting a Claude Code workflow the agent wrote itself, since one can spawn dozens of agents (the plugin's own /compost:review-changes needs no ask). When a job fits codify the orchestration, propose it in a ruling comment and carry on without it;
    • a prerequisite only a person can supply that is missing or unconfirmed.

    compost's Stop hook only nudges; references/stop-guard.md says how.

    When the run repeats a mistake, record it with compound-knowledge:compound-capture if installed, else on the parent issue. A note is the lowest level of fix: when a check could catch the mistake, file an issue for that check (make mistakes impossible).

  10. Close out. When the frontier is empty and every sub-issue is ticked, except those labelled ready-for-human, review the whole feature branch with compost:review (base the merge-base with the default branch, head the feature head): step 6 read each issue alone. Fix what holds in one pass, with no re-review, and post the rest as rulings. Then run compost:verify on the whole feature branch, push, and load compost:finish now, whose recap is Goal, Decisions, Changes, Validation, Risk. The Decisions section lists every ruling comment, each with its cost if wrong. A lane-routing run lists its per-lane records in Validation. Leave the parent open: compost:finish posts the PR body (on the issue file for a local tracker) and closes it once the branch merges. Clean up worker worktrees whose branches are merged into the feature branch, and delete from the remote the issue branches step 4 pushed.

For a run that outlives the session, compost:pause writes the checkpoint and resuming starts at step 1.

Next moves

  • compost:finish when every issue but the ready-for-human ones is reviewed and the feature branch passes verify.
  • compost:diagnose when a test, merge, or behavior breaks and the cause isn't obvious.
  • compost:deepen when an issue raises a design question about a module or interface.
  • compost:fan-out when a ruling has two or more defensible designs worth building side by side.
  • compost:pause when the session has to stop before the frontier is empty.

← All compost skills