/agentloop:epic-conductorfrom agentloop
Orchestrates end-to-end epic implementation: decomposes into sub-issues, dispatches isolated workers, coordinates reviews, and drives PRs to merge. For attended multi-issue epics, not single tasks.
Ships in agentloop. 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.
Read when SKILL.md points to them; scripts run unread.
Read .claude/repo-profile.md first (repo_slug, default_branch, plugin_root,
package_manager, test_runner, agent_identity_script, change_set_record_entry).
You are the conductor: you decompose, dispatch, route reviews and merge. You do not write the
feature code, and you stay for the whole epic. Use it when a reachable human hands you an epic; not
for one issue (land / build-phases) or unattended batches (issue-sweep / pr-sweep).
Why independent review is the point: reference/background.md.
status=running (pid alive) make
it forbidden to end_turn / close the session until each hire has GitHub evidence (PR URL or
skip-comment) or was explicitly stopped. Exit 0 = none live:
bun "${AGENTLOOP_ROOT:-$HOME/.claude/plugins/marketplaces/arcblock-agent-skills/plugins/agentloop}/skills/epic-conductor/scripts/assert-no-live-children.ts" \
--runs-dir "$(arc service status --print home 2>/dev/null || printf '%s' "$HOME")/.afs/code-agents/runs" \
--ids <hired-id>,<hired-id>
Cockpit pid=-1 rows fail-closed (live, not ghost):
reference/live-children.md.ARC_CODE_AGENT_RUN_ID set): one turn; tests in the foreground; block-poll child
runs. The host merger merges (#8182): stop, report "ready to merge — host merger",
end the run; dispatch only members whose dependencies are already merged
(headless-factory-run.md).isolation: "worktree". Workers never merge. Model by weight: runtime /
security / data-model → opus; docs / mechanical → sonnet.arc --json afs exec /.actions/query --args '{"path":"/work","where":{"field":"meta.objectId","eq":"<DID>"},"limit":8}'0. UI design first (user-facing UI only) — see reference/loop-detail.md.
1. Decompose into dependency-ordered, PR-sized sub-issues, in waves; one GitHub issue each
(spec, accept-path acceptance criteria, constraints, file pointers, dependencies, "one PR; do not
merge"). If <lesson_ledger_dir>/absorbed.yaml exists, read matching absorbed / promoted entries
(id + rule_home) and pass them in worker briefs (candidates/pending/ is not grounding; code wins
on conflict → ledger stale: <id>). Human decisions not yet recorded → /agentloop:design-review <path> --max-rounds 2 first.
Pin a scope comment; safe-default ratchet ("proceeding with X, object if wrong"); ask only on a real fork.
2. Fence off. epic-managed + epic:<epic#> on the epic, every sub-issue and every PR;
agent:hold until merge (sweeps skip them). Detail: reference/loop-detail.md.
3. Dispatch one worker per ready sub-issue. Brief: the work DID as spec (gh issue view only
after a /work miss), the scope comment, strict TDD, the accept-path law, reuse named primitives,
run the changed package's tests (<package_manager> --filter <pkg> test) and report command +
counts, never --no-verify, stop and hand back before opening the PR. Template:
reference/dispatch.md.
4. One clean-context review per sub-issue, by an agent that is not the worker:
/agentloop:pr-review on merge-base..HEAD, read-only. Auth/authz, exec authorization,
secrets/vault, sandbox boundaries → a panel, correctness + security, the security reviewer
reproducing the exploit against the code; then one synthesis. A crashed reviewer is uncertain, never a pass.
5. One batched fix. Run the findings through compact-findings.ts against the current head:
bun "${AGENTLOOP_ROOT:-$HOME/.claude/plugins/marketplaces/arcblock-agent-skills/plugins/agentloop}/skills/epic-conductor/scripts/compact-findings.ts" <raw-findings.json>
The fixer (the worker, or a fixer on its worktree): every still-valid P0–P2 in one batch, the
package tests; once the PR exists, one push, then record-change-set.sh --work <member DID> for the
new head; P3 → noted, not filed (PR body, never an issue). Re-review only a substantive or
security fix delta. A member closes only when its outcome holds; never close it and file tails
(issue closure).
Detail: reference/fixer.md.
6. PR. Push; gh pr create with --label epic-managed --label "epic:<epic#>" --label agent:hold
in the same call; body = identity line, summary, tests run, review outcome, Closes #<n>. After the
create and every later push:
bash <plugin_root>/scripts/record-change-set.sh --entry "<change_set_record_entry>" --work <member work DID> --pr <PR URL>
--work is the member DID, never the epic. Non-zero = not recorded: stop (no || true). Bot
inline comments arriving later are review input: fix real ones in the next batch, reply in the
thread; never wait on a bot.
7. Merge (the conductor only; never inside a factory run; a hired factory child's PR only once
arc work shows it ready-to-merge; merge-verified-pr.sh then runs the factory merge check —
independent approve + producer path-compliant at the head — and its refusal is final): review clean (no open P0–P2), the
package tests green on the head, every actionable thread answered, mergeable=MERGEABLE (rebase
only on CONFLICTING; record-change-set.sh the new head after the push). Security-sensitive PRs get a short risk
summary (opens / why safe / residual / revert) first. Then drop agent:hold and
bash <plugin_root>/scripts/merge-verified-pr.sh <PR#>
delete the branch, dispatch the next wave.
8. Hazards — duplicate PR, lost transcript, main moved, out-of-scope finding, a red that is not this PR's, provider capacity (429): reference/hazards.md, reference/capacity-retry.md.
9. Closeout. Read the nightly result covering the last merge (green → record it; red → link its issue, not cohesive yet). Drive the epic's thesis end to end on real infrastructure; say user-reachable vs mechanism-level. UI → screenshots of every real surface in one walkthrough comment. Close the issues, clear the labels, report URLs. Detail: reference/closeout.md.
reference/background.md (opens in a new tab)reference/capacity-retry.md (opens in a new tab)reference/closeout.md (opens in a new tab)reference/dispatch.md (opens in a new tab)reference/fixer.md (opens in a new tab)reference/hazards.md (opens in a new tab)reference/live-children.md (opens in a new tab)reference/loop-detail.md (opens in a new tab)scripts/assert-no-live-children.test.ts (opens in a new tab)scripts/assert-no-live-children.ts (opens in a new tab)scripts/compact-findings.test.ts (opens in a new tab)scripts/compact-findings.ts (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub arcblock/agent-skills --plugin agentloop24 skills in this plugin
/build-phasesExecute a phased implementation plan (tasks.md) autonomously, one phase at a time: implement, then verify (static + dynamic + adversarial) before advancing. Use for a multi-phase build of one issue, attended or unattended./codex-review-backlogScan merged (optionally open) PRs for unhandled Codex / bot review comments, re-validate each against main, fix the easy ones, track the hard ones. Use for "codex backlog", "scan Codex reviews", late bot findings after a merge wave, or a daily routine./design-reviewIterative clean-context review of a design / plan document or issue: independent reviewers per round, scored and synthesized without prior-round bias. Use to review an implementation plan, architecture doc or design proposal before building.