com um clique
bip-epic
EPIC cold-start dashboard — full scan of clones, GitHub, and EPIC issues
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
EPIC cold-start dashboard — full scan of clones, GitHub, and EPIC issues
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
Check remote server CPU, memory, and GPU availability via SSH
Cold-start into a worktree/clone from a fresh conversation — read the PR, issue, and any status files, figure out where things stand, then STOP and ask the user what to do next. Use for a fresh conversation dropped into a bip-spawn or bip-epic-spawn worktree/clone that already has history (a PR, an in-progress phase, or a stalled worker).
Quick poll of tracked EPICs and code repos for new manuscript-relevant results
Persist manuscript session state before context reset
Cold-start for a manuscript session — the paper is the source of truth and shared context; discuss results, orchestrate research through issues/PRs, and update the paper as threads complete
Spawn a Claude session in a clone for an EPIC issue
| name | bip-epic |
| description | EPIC cold-start dashboard — full scan of clones, GitHub, and EPIC issues |
Full cold-start dashboard for EPIC-based multi-clone orchestration. Run from the conductor clone inside tmux.
Use this at session start to establish context. For mid-session
updates, use /bip-epic-poll. To spawn work, use /bip-epic-spawn.
i281 = issue #281, p275 = PR #275. Never bare #N.NNN-YYY where NNN is the issue number and YYY is the clone/slot name281-cedar, 295-pine281-issue-281, 295-issue-295The conductor session stays on main and does NOT do feature work.
It orchestrates: scans, updates EPICs, spawns clones.
For a planned reboot, run /bip-epic-prepare-reboot first (host-wide, while
tmux is alive): it resolves each Claude window's exact session id, optionally
checkpoints workers, and writes a manifest so the workspace returns
deterministically. For an unplanned reboot (or if no manifest was written),
use /bip-epic-recover from a project's main clone to find the killed Claude
sessions and resume each into a tmux window (claude --resume). Recover replays
the manifest when one exists and otherwise reads each session's own jsonl, so
workers that returned to main and concurrent main-clone sessions are all
recoverable.
Numbered issues → spawn: If work is tied to a GitHub issue (iN),
always use /bip-epic-spawn to assign it to a clone — even if the fix
seems trivial. The conductor can do light triage (reading files, checking
CI output, running gh commands) but should not write code or create
branches for numbered issues.
The epic skill reads .epic-config.json from the repo root. This file
is gitignored and must exist before the skill can operate.
Clone mode (remote compute or pre-existing clones):
{
"clone_root": "~/re/myproject",
"clone_names": ["alpha", "beta", "gamma"],
"new_clone_names": ["delta", "epsilon", "zeta"],
"github_repo": "org/repo",
"conductor": "alpha",
"max_lead_iterations": 8
}
Worktree mode (local parallel work only):
{
"clone_root": "~/re/myproject-workers",
"local_worktrees": true,
"github_repo": "org/repo",
"max_lead_iterations": 8
}
Validation: If local_worktrees: true and clone_names are both present, stop and report an error — they are mutually exclusive. clone_names is meaningless in worktree mode because slots are created on demand and named after the issue.
Fields:
true, use git worktree for local slots named issue-Norg/repo for gh commandsneeds-human (default: 8)false) Set to true when the conductor and all compute nodes share an NFS filesystem; the conductor composes direct SSH execution commands instead of make remote-sync calls, and experiment results are immediately visible on local NFS paths. Each machine sets this flag for itself — no central list of NFS nodes is needed.cat .epic-config.json
Also read MEMORY.md from the auto-memory directory for orchestrator context from previous sessions (decisions, patterns, what's next).
If the file does not exist, stop and ask the user:
~/re/pz-workers for worktrees, or ~/re/pz for clones)org/repo)?shared_filesystem)Note (worktree mode): The skill is run from the main repo itself, which
acts as the conductor. There is no separate conductor clone — clone_root
is just where worktrees are placed, not the main checkout.
Then create .epic-config.json with their answers and proceed.
All subsequent steps use values from this config — never hardcode paths or clone names.
git pull --ff-only origin main
If this fails, report the problem and continue with stale state.
First the cheap structured listing the primary can do directly:
gh issue list --search "EPIC in:title" --json number,title
Then dispatch three groups of general-purpose subagents in parallel
— single message, multiple Agent tool calls. Follow the dispatch
pattern in SUBAGENT-SCAN.md (bipartite repo root).
Group A: one subagent per EPIC. Brief:
Read EPIC
i<N>and report its current state. Tasks:
gh issue view <N> --json title,body,updatedAt.- Parse the Status dashboard, Key findings, and active clone assignments table.
- For each open item with a clone assignment, run
gh issue view <child-N> --json state,stateReasonto confirm it is still open.Return under 400 words:
changes_since_baseline: completed items, new findings, items newly openedactive_items: open work with clone assignments and brief statusaction_candidates: items the EPIC marks ready but unassignedsurprises: contradictions, stale assignments,RECOMMEND DEEPER LOOKflags
Group B: one PR/issue triage subagent. Brief:
Triage the backlog for the conductor. Tasks:
gh issue list --search "sort:updated-desc" --limit 20 --json number,title,state,labels,body.gh pr list --json number,title,headRefName,state.gh pr list --search "is:pr is:merged sort:updated-desc" --limit 10 --json number,title,mergedAt.- For each open issue, check its
depends_onfield and any blocking context. An issue that depends on an unmerged PR or unfinished experiment is NOT ready — omit silently.- Verify state with
gh issue view <N> --json statefor any issue you plan to flag — never claim "open" without confirmation.Return under 400 words:
changes_since_baseline: PRs merged since last sessionactive_items: open PRs with state/CI statusaction_candidates: open issues ready to spawn (unblocked, unassigned, dependencies satisfied), ordered by prioritysurprises: closed/merged items the EPICs don't reflect yet, issues with unclear blocker state,RECOMMEND DEEPER LOOKflags
Group C: one slot-collector subagent. Brief:
Inventory clones/worktrees. Read
clone_rootandlocal_worktreesfrom.epic-config.json.Clone mode (
local_worktreesabsent or false): iterateclone_names; for each, capture branch, last commit, dirty files (max 5), and.epic-status.jsoncontents.Worktree mode (
local_worktrees: true):find $CLONE_ROOT -maxdepth 1 -name 'issue-*' -type d; for each, capture last commit, dirty files, and.epic-status.json.Also:
tmux list-windows -F "#W".Classify each slot:
occupied: has tmux window (regardless of agent status — user may be doing follow-up work)stale: no tmux window, but has.epic-status.jsonor is on non-main branchavailable: (clone mode) no tmux window, onmain, cleanReturn under 400 words:
active_items: per slot: name, phase, summary, scope, stop_reason, lead_guidance (from.epic-status.json), classificationaction_candidates: stale slots ready for cleanup (clean up ONLY if no tmux window — never kill tmux windows)surprises: phase migrations (blocked/pr-review), missing status files, contradictions
Never ask the user a question about an issue/PR status that you
could answer with a gh query — verify first, then present facts.
After the Step 3 fan-out, the primary holds three structured reports. Compose the reconciliation from them — do not paste subagent prose verbatim. The primary sees all three reports; cross-reference them yourself.
Reconcile across the three reports (Groups A, B, C):
surprises and zero
changes_since_baseline, send a follow-up to that subagent with a
narrower question before concluding "nothing changed there."The dashboard is issue-centric. The user cares about what work needs attention and what's ready to start — clones are parenthetical.
Recently merged (last 48h): p705, p704, p703, p702, p647, p710, p711
Section 1: Active issues — every open issue that has work in progress, sorted by status (active → awaiting → needs-human → stale):
| Issue | Status | Clone | Summary |
|---|---|---|---|
| i281 | active (tmux 281-cedar) | cedar | Implementing clamping |
| i295 | awaiting (~Tue) | pine | 436/1800 ML jobs on orca02 |
| i310 | needs-human | fir | Architectural decision needed |
| i589 | stale (4d) | cedar | Check if experiment finished |
Section 2: Ready to spawn — open issues not assigned to any clone,
not blocked, not dependent on in-flight work, ordered by priority.
Check each candidate's depends_on field and any blocking context
before listing. If an issue depends on an unmerged PR or unfinished
experiment, it is NOT ready — omit it silently.
i302 — Add retry logic to batch pipelinei315 — Refactor scoring module(N clones available)
This two-section layout is the primary loop: what's running, what's next. Keep it tight — the user should be able to scan in 10 seconds.
First, do housekeeping automatically (no need to ask):
git checkout main && git pull --ff-only, clear .epic-status.jsongit worktree remove --force $CLONE_ROOT/issue-N && git branch -d <branch>Then propose spawning work for ready issues:
"Ready to spawn:
i302(retry logic) andi315(scoring refactor). 2 clones available. Shall I spawn them?"
Wait for user confirmation, then run /bip-epic-spawn (do NOT improvise tmux/claude commands).
After the dashboard is built and any spawns are launched, offer to start
the persistent slot monitor — bip epic watch — which observes
every slot's .epic-status.json and writes phase-transition events to
.epic-notifications.log (JSONL) in the conductor cwd. The log is the
canonical record; transitions survive watcher restarts and conductor
compaction. This replaces /loop 10m /bip-epic-poll for the most
time-sensitive signals (phase transitions), while /bip-epic-poll
remains available for full GitHub + slot reconciliation sweeps.
Start the watcher in the background:
nohup bip epic watch >/dev/null 2>&1 &
The watcher runs forever, exits cleanly on SIGTERM, and emits one event
per real phase transition (default filter: needs-human, completed,
awaiting-results, quality-gate). To also receive events as Claude
Code notifications when that pipeline is reliable, additionally start a
Monitor with command: tail -F .epic-notifications.log and
persistent: true. The notifications log is the contract; Monitor is a
latency optimization, not a correctness requirement.
When a transition arrives showing needs-human or completed, the
conductor should react immediately — read the slot's status, check the
lead guidance, and either propose the next action or flag it for the user.
"Slot monitor started — phase transitions are streaming to
.epic-notifications.log. Use/bip-epic-pollfor a full reconciliation sweep when needed."
On NFS-mounted clone roots where inotify does not fire on remote writes,
pass --poll (defaults to a 2 s stat-loop) instead of fsnotify:
nohup bip epic watch --poll >/dev/null 2>&1 &
EPIC issue bodies are the source of truth for project status. Update them when findings come in, items complete, or new work starts.
Local file convention: Keep a persistent local copy as
ISSUE-EPIC-<N>.md in the repo root (e.g. ISSUE-EPIC-281.md,
ISSUE-EPIC-295.md). These files are gitignored via the ISSUE-*.md
pattern.
# Pull current body and record the timestamp
gh issue view <number> --json body,updatedAt > /tmp/epic-pull.json
jq -r .body /tmp/epic-pull.json > ISSUE-EPIC-<N>.md
PULLED_AT=$(jq -r .updatedAt /tmp/epic-pull.json)
rm -f /tmp/epic-pull.json
# Edit the file (add findings, check boxes, update clone table)
# ...
# Before pushing: check if someone else edited since our pull
CURRENT_AT=$(gh issue view <number> --json updatedAt -q .updatedAt)
if [ "$PULLED_AT" != "$CURRENT_AT" ]; then
echo "CONFLICT: Issue was updated since pull ($PULLED_AT → $CURRENT_AT)"
echo "Re-pull, merge changes, then try again."
# Stop here — do NOT push
else
gh issue edit <number> --body-file ISSUE-EPIC-<N>.md
fi
Conflict check: Record updatedAt when pulling. Before pushing,
re-fetch updatedAt — if it changed, someone else edited. Re-pull,
merge their changes, and retry. When in doubt, ask the user.
Key sections to maintain:
Always include the date in the clone assignments header.
{
"issue": 281,
"title": "Short title",
"phase": "exploring | coding | testing | awaiting-results | quality-gate | needs-human | completed",
"summary": "Human-readable one-liner",
"updated_at": "2026-03-03T14:30:00Z",
"blockers": [],
"remote_run": null,
"quality": null,
"scope": "One-line restatement of issue goal from lead",
"stop_reason": "phase-complete | needs-instrumentation | needs-deeper-investigation | awaiting-results | run-production | pr-ready | quality-gate | mechanical-blocker | scope-drift | needs-human | completed",
"lead_guidance": "What the worker should do next",
"lead_notes": [],
"completed_at": null,
"awaiting": null
}
.gitignored (along with .epic-worklog.md)remote_run optional — set when work dispatched to remote serverquality optional — set during quality-gate phase:
{"pr_check": "pass|fail", "pr_review": "pass|fail", "iterations": 2}
Workers loop /bip-pr-check and /bip-pr-review until both pass clean.
The orchestrator can monitor progress via this field during polling.scope — set by the issue lead each iteration (one-line restatement of the issue goal)stop_reason — categorized reason from the lead's decision frameworklead_guidance — actionable instruction for the worker's next iterationlead_notes — append-only log of lead evaluations (max 8 before escalation)completed_at — ISO 8601 timestamp set by the lead after it
finishes the terminal completed ceremony (files any legitimate
follow-ups, posts the final PR comment). Its presence is the
idempotency signal: subsequent lead invocations at completed skip
the ceremony.awaiting — set during awaiting-results phase:
{
"description": "What we're waiting for",
"check_cmd": "command that exits 0 when done",
"check_files": ["paths whose existence means done"],
"started_at": "ISO 8601",
"timeout_hours": 12
}
Legacy phases from older .epic-status.json files:
blocked → treat as needs-humanpr-review → treat as quality-gategh auth login.epic-config.json's clone_root / clone_names / local_worktrees
keep working untouched. The newer way to configure worktree mode (for
non-EPIC bip spawn use) is the layout: block in
~/.config/bip/config.yml — see docs/guides/layout.md. EPIC
orchestration still reads .epic-config.json for now.