计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
orbit【效率与协作】State-persisted autonomous pipeline: spec → go → audit → eval → ship → evolve in one command. Auto-detects direct/council/interactive mode. Crash-recoverable via PIPELINE-*.json. Hands-off until PR.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
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.
Concurrent-orbit guard — before starting, run:
epic orbit lock # exit 1 + "another orbit is running" if one is active → STOP
On success you own the guard; run epic orbit unlock when the pipeline reaches
a terminal state (complete/aborted). If a crashed orbit left the lock behind,
lock reclaims it automatically once no PIPELINE-*.json is running.
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,
"pr_url": 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 .harness/worktrees/orbit-{goal_slug} -b orbit-{goal_slug} origin/{default-branch}
cd .harness/worktrees/orbit-{goal_slug}
.harness/worktrees/ is host-neutral. Do NOT use .claude/worktrees/ —
it is meaningless on Codex and Antigravity.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 body
pr_url. epic orbit unlock warns
when a pipeline reaches complete without it.gh pr checks <PR_NUMBER> --json name,state
gh pr checks <PR_NUMBER> --watch, auto-fix failures.phase_history entry
recording "ci_watch": "skipped", and proceed to Step 7 (evolve runs
regardless of CI outcome, so the pipeline must never wait on checks
that will never appear).Run 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 $HARNESS_DIR/projects/{slug}/pending_synth.jsonl has records with status: "pending",
synthesize each — launch one subagent per manifest (use your host's subagent
mechanism; do NOT name a model or CLI), then apply the body it produced:
epic-harness evolve accept-synth --skill <name> --file <body.md>
Unconsumed manifests leave the template skill body in place.
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", then run epic orbit unlock.
## 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}