agentleFS
gregoryfostergregoryfoster/skills/skills/coordinating-epics/SKILL.md

coordinating-epics

Skill1 starsChanged 4 months agoMITView on GitHub

Coordinates an epic burned down one child at a time, where the operator implements each child in a separate agent thread and returns to report. Each check-in verifies the child from evidence (merged, CI green by job on the final SHA, live on the host), edits the epic only through a guarded editor, harvests contract changes and notes for later children, re-scans by number watermark, updated-since and commit range, re-checks blockers and gates, and hands off the next issue with a brief posted on it. Also creates the epic (from a design doc, a backlog plus a rule, or an audit) and closes or parks it. The coordinator never writes code. Serial and operator-paced; for a parallel agent team use orchestrating-issue-backlog. Use when the user says "coordinate the epic", "burn down", "check-in", "I finished #N", "next issue", or "what's next on the epic".

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read the state: Run bash "<scan.sh>" --repo OWNER/REPO --epic N > "${SCRATCH:?}/scan.json" for what arrived (--also owner/repo per other …

    line 86
  2. Distinctive:

    follow-ups the PR mentions but never filed.

    line 94
  3. Very specific:

    When something is missing, say what, and don't tick.

    line 96
  4. Very specific:

    Write them back as comments, through comment.sh, which lints them as the editor lints the body and reads them back.

    line 105
  5. Distinctive:

    Every kickoff prompt carries these, or points to the brief that does:

    line 114
  6. Distinctive:

    Write the post-merge host steps on the issue.

    line 119
  7. Distinctive:

    Run the code review and fix its findings, or record each declined one with its reason, before reporting.

    line 121
  8. Distinctive:

    If the thread goes on coordinating follow-ups, the closing summary restates the role, so a later "proceed" reads as coordination, not …

    line 140

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Coordinating Epics

One coordinator thread holds one epic. The operator implements each child in its own thread and comes back to report. The coordinator confirms the work from evidence, carries what it changed to the children it affects, finds what arrived since the last check-in, and names the next child with a brief. Built from eleven burn-downs whose findings were posted on #348, 2026-09-27 to 10-14, and the runs journaled since.

Activation triggers: "coordinate the epic", "burn down", "check-in", "I finished #N", "next issue", "what's next on the epic".

The Iron Law

<!-- skill:required id=iron-law -->
NO CODE IN THE COORDINATOR THREAD
NO TICK WITHOUT EVIDENCE READ IN THIS CHECK-IN
NO EDIT TO THE EPIC'S BODY EXCEPT THROUGH epic-edit.sh

What the coordinator may write:

  • the tracker: the epic, comments, issues it files, closures the operator approved;
  • a docs PR that amends the design;
  • an extra-small, non-code operational change the operator approves, read before and after;
  • a documented mechanical procedure, with consent.

It writes no code and cuts no release. On any "proceed" or "fix it" it asks "here, or in a separate thread?", and defaults to a separate thread. Prerequisite work for a child is coordinator work: filing a cross-repo ask, operator setup, a key handover. Its results go on the child as a pre-flight comment.

Rationalization prevention

ThoughtReality
"The issue is closed, so it's done"Closed means merged, or not even that. Verify live, with the recipe the epic records. A migration means its head; a route means the served spec; a timer means its journal.
"The closing comment says CI is green"Read the check-runs yourself, by job, on the final SHA and on main's tip. Review rounds land after the close.
"Nothing mentions the epic, so nothing's new"Implementers file follow-ups that never link it. scan.sh reads the number watermark, updates since, and the commit range.
"It's one line; I'll fix it here"The role holds only while it holds. Ask, and default to handing off.
"I'll sed the box"Every hand edit of the body broke something in some run. epic-edit.sh, and a box ticked elsewhere is a claim to verify.
"The issue says X"Bodies decay as children merge. Re-check against origin/main and the live system, and label the claim [stated] until you have.
"The operator will want the next one"Say how it was picked. Ask when the order rule doesn't decide it.

Script path resolution

The skill's scripts/ directory ships inside the skill, not at the project root. Resolve each script once, and substitute the printed path wherever <name.sh> appears below (#63, #301):

<!-- skill:required id=skill-scripts -->
N=coordinating-epics
for S in epic-edit.sh scan.sh comment.sh create-from-plan.sh verify-ci.sh; do SD=
  for d in scripts ".claude/skills/$N/scripts" "$HOME/.claude/skills/$N/scripts"; do
    [ -f "$d/$S" ] && { SD="$d"; break; }
  done
  [ -n "$SD" ] || echo "$S not found in scripts/, .claude/skills/$N/scripts/, or ~/.claude/skills/$N/scripts/" >&2
  echo "<$S>=${SD:?}/$S"
done

$SCRATCH is a directory outside the repo that lasts across calls: the harness's scratchpad, or one mktemp -d made once. Each Bash call is a fresh shell, so set SCRATCH=<that path> in every command that uses it; ${SCRATCH:?} stops one that doesn't.

Starting

Adopt an epic that exists. Read it in full, with its comments. Take it as the baseline and bring it onto the template in the same call, never by hand: header ops add the missing cursor lines (only the five cursor fields) and turn a paragraph header into the template's list, add-section the order rule, the tiers and the log, and set-line or add-line the checklist. --lint-all lints the whole body, not just the lines you change, so legacy short refs and placeholders are fixed now. Dry-run it first, and read the diff, not the exit code:

bash "<epic-edit.sh>" --repo OWNER/REPO --epic N --adopt-live --lint-all --ops "${SCRATCH:?}/adopt.json" --dry-run

Create one. There are six ways in: a design doc's Steps table, a backlog plus the operator's one-line rule, a number range, children that need scoping first, an upstream adoption checklist, and a whole-backlog audit. creation.md has each; <create-from-plan.sh> creates the children, then the epic, from a plan. All of them produce the same things:

  • a disposition per issue: keep, rework, close, park, move or split;
  • the order rule, its tiebreaks and the boundary decisions, written once;
  • an exit criterion;
  • the host's verify recipe, and its gate run (a red gate is the first child);
  • a test baseline;
  • the first cursors.

Show the operator the drafted body and the proposed closures before anything is written. For a whole-backlog or number-range epic, write it with --account (or --account N for a range from #N), so no open issue goes missing.

The check-in

On "I finished #N", "next", or a report between threads:

  1. Read the state. Run bash "<scan.sh>" --repo OWNER/REPO --epic N > "${SCRATCH:?}/scan.json" for what arrived (--also owner/repo per other repo of a cross-repo parent), and epic-edit.sh … --dry-run for whether the body moved. A box the implementer ticked is a claim. An operator request to unblock someone outside waits on nothing: do it first.
  2. Verify from evidence (check-in.md §1):

    • the whole commit range since the hand-off;
    • CI by job on the final SHA and on main's tip, read with <verify-ci.sh>;
    • the epic's verify recipe for each kind of deliverable;
    • wire-visible changes the host's changelog rule can't see;
    • the main checkout on main and clean;
    • "Done when" ticked on evidence;
    • follow-ups the PR mentions but never filed.

    When something is missing, say what, and don't tick. End in a verification comment on the child, posted with comment.sh, first line **Coordinator record, OWNER/REPO#<epic>**, holding the evidence: the tick links it.

  3. Harvest (§2):

    • contract diffs later children depend on;
    • For #N: notes, moved to the issue they name;
    • new states, codes or messages;
    • verification debt;
    • accepted limitations;
    • corrections to any claim, searched everywhere it was made.

    Write them back as comments, through comment.sh, which lints them as the editor lints the body and reads them back. A comment only appends, so it can't race.

  4. Re-scan and slot (§3), reading the epic's own new comments too. Each new item is a child, closed-in-fact, a split, out of epic, a duplicate, or parked. Measure before you slot.
  5. Re-check blockers and gates (§4). Probe each one's observable condition; don't wait to be told. Read the latest comment on each cross-repo ref, and the trigger of each parked item.
  6. Choose the next child (§5): the order rule, then the tiebreaks written on the epic. Say when the next child is the last unblocked one. When nothing is unblocked, the hand-off is the blockers instead: each with its owner, its evidence, and the options.
  7. Hand off (hand-off.md). Post the brief on the issue with comment.sh, after a pre-flight against origin/main: what it renames or removes, and who uses that today. Reply with the next ID and a kickoff prompt of 2–6 lines that points to the brief.
  8. Write the epic in one call. The ticks, each compacted to its title and a link to that comment; notes on open lines; the header; and a log-comment, the check-in's log entry as a comment on the epic, posted even when nothing changed. Watch the summary's body size (#653); to bring an older epic onto this form, see compaction.md. With --scan "${SCRATCH:?}/scan.json" (the report you read: step 0's, or a later re-scan you've acted on), Last check-in takes {checked}, the scan's own time, and Last issue seen takes {last_seen}. The next window then starts where that scan looked. Never type either value, and never pass a report you haven't read. The editor refuses one whose new issues the body doesn't mention.

The implementer contract

Every kickoff prompt carries these, or points to the brief that does:

  • Work in a worktree. Never change the branch of the checkout the repo deploys from.
  • Review the brief against origin/main first, and post corrections before building.
  • Notes for later issues go under a **For #N:** lead, as shipping-work Step 5 spells it.
  • List the verification you skipped, and why, and accepted limitations, under **Known limits:**.
  • Write the post-merge host steps on the issue.
  • Post an approval the operator gives in your session on the issue, quoted and timestamped, with its scope.
  • Run the code review and fix its findings, or record each declined one with its reason, before reporting. The report names the final SHA.
  • Pause for the operator before shipping.

Talking to the operator

  • One structured question per check-in, with a recommendation and the measured facts behind it. Ask it one check-in before the child that needs the answer.
  • State a decision once, and write it on the line with its date ("Decided 2026-10-14: one PR"). Don't reopen it at the next check-in.
  • Label claims [measured], [traced] or [stated]. Frame hazards as things to weigh, not rules.
  • A wrong claim, once posted, is corrected in place, visibly. Then search for everywhere else it was made.
  • A declined recommendation is fine. Record it and go on.

Ending

close-out.md covers four endings:

  • the closing checks, run only after an empty re-scan;
  • the runbook for a final child the operator runs;
  • an epic that runs out of children before its exit criterion;
  • parking-lot mode.

If the thread goes on coordinating follow-ups, the closing summary restates the role, so a later "proceed" reads as coordination, not implementation.

Sibling repos

siblings.md covers:

  • cross-repo waits and their unblock conditions;
  • external replies, each posted only with the operator's consent;
  • checking a sibling's claim before relaying it;
  • sibling epics;
  • a private host writing to a public repo.

Detail Docs

  • creation.md: the six ways in, dispositions, ordering, the verify recipe and baseline, creation mechanics
  • check-in.md: verify, harvest, re-scan, blockers and gates, choosing the next child, writing the epic
  • hand-off.md: the brief, the kickoff prompt, pre-flight, special briefs
  • compaction.md: moving an older epic's log into comments and cutting its ticked lines to a title and a link, once
  • close-out.md: closing checks, the final-child runbook, an exhausted epic, parking-lot mode
  • siblings.md: cross-repo blockers, waits, replies and sibling epics
  • assets/epic-template.md: the epic body, which is the run's whole state

Process Logs

references/process-log.md holds one entry per run, the rules promoted into the skill with the runs they came from, and how to add an entry. Journal every run at close-out, or when it parks. A finding goes into the skill when it recurs in two runs, or when it prevented damage once.

Self-budget: held to a 6,000-token ratchet (estimate and exact) by tests/structural/test_skill_self_budget.py; both readings must clear it. Each references/ doc is held to the 10,000-token per-doc budget.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.