From epic
Runs a state-persisted autonomous pipeline from spec to PR in one command. Auto-detects mode, crash-recovers via PIPELINE-*.json, and operates hands-off until pull request.
How this skill is triggered — by the user, by Claude, or both
Slash command
/epic:orbitThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**CRITICAL**: Run `HARNESS_DIR=$(epic path)` first. NEVER use `.harness/` in the project directory.
CRITICAL: Run HARNESS_DIR=$(epic path) first. NEVER use .harness/ in the project directory.
You are entering Orbit mode — the full autonomous pipeline from spec to PR in one shot.
At the start of every response during an active orbit:
ls $HARNESS_DIR/orbit/PIPELINE-*.json 2>/dev/null"status": "running"phase matches where you left offphase is ahead of where you think you are, trust the file — you may have compactedphase_history contains an entry for the current phase with a completed timestamp, treat that phase as done and advance to the next phase — phase_history wins over the phase field when they disagree.worktree_name is set in pipeline state:
git worktree list | grep "{worktree_name}"cd into the worktree path to continue work"status": "aborted"If no file with "status": "running" exists, orbit was not started or has completed. Do not invent one.
Crash recovery: If updated_at is older than 45 minutes and the pipeline is in status: running, assume a crash occurred. Read the state, determine the last completed phase from phase_history (rule 5 above applies), and resume from there. Report the recovery to the user.
Initialize pipeline state at $HARNESS_DIR/orbit/PIPELINE-{timestamp}.json:
{
"id": "{timestamp}",
"mode": null,
"phase": "auto_detect",
"status": "running",
"spec_file": null,
"goal_slug": null,
"branch": null,
"worktree_name": null,
"original_cwd": null,
"audit_fail_count": 0,
"max_retries": 3,
"audit_report": null,
"deadline": "{ISO-8601, now + 30 minutes}",
"started_at": "{ISO-8601}",
"updated_at": "{ISO-8601}",
"phase_history": []
}
DO NOT ask the user for mode selection. Auto-detect the best path:
| Signal | Mode | Reason |
|---|---|---|
| PRD / detailed requirements doc exists in project | council | Rich input → council synthesizes best approach |
| User request is specific and actionable (clear goal, defined scope) | direct | No need for discovery — spec directly |
| User request is vague, unfocused, or "I want to..." without specifics | council | Council frames the problem better than guessing |
| User explicitly says "interactive" or "let me discover first" | interactive | Respect explicit preference |
ls {project}/PRD*.md {project}/docs/PRD*.md {project}/requirements*.md 2>/dev/nulldirectcouncil"mode": "direct|council|interactive")"Orbit mode: {mode} (auto-detected)"Use when: Request is specific and actionable.
$HARNESS_DIR/specs/SPEC-{timestamp}.md with status: approvedepic mem add --title "Orbit: {mode} mode decision" --type decision --importance 0.9 --body "CONTEXT"Use when: PRD exists or request needs framing.
$HARNESS_DIR/specs/SPEC-{timestamp}.md with status: approvedepic mem add --title "Orbit: council decision" --type decision --importance 0.9 --body "CONTEXT"Use when: User explicitly requested interactive mode.
/discover → /spec, then say "orbit go". STOP and wait.SPEC-*.md with status: approved. Proceed to Step 3.This mode is never auto-selected. It requires explicit user opt-in.
goal_slug[ -z "$(git status --porcelain)" ] || (echo "ERROR: Dirty working tree or untracked files. Commit or stash first." && exit 1)
git symbolic-ref -q HEAD || (echo "ERROR: Detached HEAD. Checkout a branch first." && exit 1)
git worktree add .claude/worktrees/orbit-{goal_slug} -b orbit-{goal_slug} origin/{default-branch}
cd .claude/worktrees/orbit-{goal_slug}
worktree_name and original_cwd in pipeline stategit diff --stataudit_report fieldaudit_fail_count:
< 3: plan fixes from action items, execute, return to Step 4≥ 3: PAUSE — ask user "continue or abort?"$HARNESS_DIR/eval/eval.yamlbenchmarks/baselines/latest.json in CWD (in-repo baseline)benchmarks/eval_runner.py in CWD (auto-detected benchmark)epic eval --json via the eval skillaudit_fail_count:
< 3: plan fixes, execute, return to Step 4≥ 3: PAUSE — ask user "continue or abort?"cargo clean / npm run clean / equivalentgh pr create with spec + audit report in bodygh pr checks --watch, auto-fix failuresRun the evolution engine to analyze this session and generate/improve skills.
Always run — regardless of CI outcome:
epic-harness reflect
This triggers the Ring 3 loop: observe → analyze → seed evolved skills → update metrics.
If CI green (all checks passed): additionally run
epic-harness reflect --context --days 1
and record the successful orbit pattern into memory:
epic mem add --title "Orbit: {goal_slug} succeeded" \
--type pattern --importance 0.7 \
--body "Orbit completed. Mode: {mode}. AC: all verified. PR: {url}. Stack: {stack}."
Report the evolution outcome in the final summary (evolved skills generated, score trend).
Update pipeline state: "phase": "evolve", "status": "complete".
## Orbit Complete
- Pipeline: PIPELINE-{id}
- Mode: {direct|council|interactive} (auto-detected)
- Spec: SPEC-{timestamp} ({goal_slug})
- Branch: orbit-{goal_slug}
- Worktree: orbit-{goal_slug} (preserved for PR)
- PR: {URL}
- Audit retries: {count}
### Phase Summary
| Phase | Status | Retries |
|-------|--------|---------|
| Spec | approved | 0 |
| Go | complete | 0 |
| Audit | PASS | {count} |
| Eval | {PASS|SKIPPED} | 0 |
| Ship | complete | 0 |
| Evolve | complete | 0 |
### Evolution
- Skills evolved: {count}
- Score trend: {improving|stable|declining}
npx claudepluginhub epicsagas/epic-harness --plugin epic-harnessGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.