Orbit: OpenSpec + Superpowers Unified Workflow Orchestrator
Activation Gate
Orbit MUST NOT auto-activate unless explicitly invoked. If loaded without an explicit trigger, stay dormant and let the user use other skills directly.
| Trigger Method | Example | Compatible Tools |
|---|---|---|
| Slash Command | /orbit I need to do OAuth login | Codex, Claude Code |
| Explicit Name Mention | "Use Orbit to help me fix this bug" | All |
| @ Mention | @orbit implement user authentication module | Cursor, Windsurf |
If no trigger is present → Orbit stays dormant. Do not suggest using Orbit unless the user asks for an end-to-end orchestrated workflow.
If the user wants to do a single task (brainstorm, write a spec, implement with TDD, review code), use the individual skill directly instead of Orbit.
Overview
Orbit connects OpenSpec (change artifact management) and Superpowers (development quality practices) into an end-to-end workflow. The user initiates once, and subsequent stages are chained automatically.
Design Philosophy:
- OpenSpec = WHAT (requirements definition + change tracking)
- Superpowers = HOW (design methods + implementation discipline + quality assurance)
- Orbit = Orchestration layer (glue between WHAT and HOW + state persistence)
Does not rewrite any existing skill. Orbit only does four things: decide stages, execute bridging, control transitions, and persist state.
State update rule: Every time .orbit-state is written, synchronously update the updated_at timestamp. Follow the "write state first, then execute bridge" principle — ensuring that even if bridging fails or the conversation is interrupted, the state file has recorded the latest progress.
Complete design document: docs/superpowers/specs/2026-07-16-orbit-workflow-design.md
Transition Authority
Orbit orchestrates the full workflow. When a sub-skill reaches its terminal state and instructs you to invoke another skill, you MUST NOT follow that instruction.
Instead, output the checkpoint marker:
[ORBIT_CHECKPOINT: Stage N complete]
Then return to Orbit's controller. Orbit decides what happens next.
This rule overrides any sub-skill's terminal transition instruction. Orbit carries the user's intent — the user chose a full orchestrated workflow — and that intent takes priority over sub-skill defaults.
Core Routing
Cold Start
When the user requests a change (e.g., "I want to do OAuth login", "fix payment validation bug", "update README"):
- Start at Stage 0 — Bootstrap
- Follow the stage sequence based on detected change type
Resume (Checkpoint Continuation)
If the user says "continue" without a new change request:
- Scan
openspec/changes/*/.orbit-statefor files withstage < 5(orstage == 5andsubstage != "complete") - If one found: auto-resume from that stage
- If multiple found: list and let user choose
- Integrity check: Before resuming, verify that artifacts referenced by
.orbit-statestill exist:- If
stage >= 3: check thatopenspec/changes/<id>/tasks.mdexists - If
stage == 4: check that.orbit-state.plan_docpath exists - If any check fails: output
[ORBIT_RESUME_WARNING] Status file references missing artifacts: {missing}and ask user:Please choose: 1. Continue — ignore missing warnings, resume from checkpoint 2. Abort — terminate recovery, keep current state
- If
- Output:
[ORBIT_RESUME] Resuming from Stage {stage}.{substage} - Jump to the corresponding stage's instructions below
Stage Sequence by Change Type
| change_type | Stages | Skills Used |
|---|---|---|
| feature | 0 → 1 → 2 → 3 → 4 → 5 | brainstorming, writing-plans, subagent-driven-development, tdd, finishing-a-development-branch |
| bugfix | 0 → 2 → 3 → 4 → 5 | writing-plans, subagent-driven-development, tdd, finishing-a-development-branch |
| docs | 0 → 2 → 5 | verification-before-completion, finishing-a-development-branch |
Stage 0: Bootstrap
Goal: Create change directory, detect environment, classify change type.
Steps:
-
Generate change-id: Parse user request →
<verb>-<noun>(e.g.,add-oauth-login). If ambiguous, usechange-YYYYMMDD-NNN. Validate kebab-case. Conflict check withls openspec/changes/. Createopenspec/changes/<change-id>/directory. -
Write initial .orbit-state: Set
change_id,schema_version: "1.0.0",preliminary: true,stage: 0,created_at,updated_at. Schema reference:references/state-schema.yaml. Whenpreliminary: true, the workflow is restricted to Stage 0 ↔ Stage 1 only. Stage 2 and beyond cannot proceed until Stage 1 completes andpreliminaryis set tofalse. -
Detect test command: Prefer headless (CI-compatible) test scripts. Check
package.jsonfortest:unitortest:cifirst. If not found, fall back toscripts.test. If the detected script starts a dev server (e.g.,vite), search for headless alternatives in sub-package scripts. Also checkpyproject.toml→pytest,Cargo.toml→cargo test,go.mod→go test ./...,Makefile→make test. If none match, ask user. Write to.orbit-state.test_cmd. -
Classify change type: Keywords → type mapping:
new/add/implement/refactor/develop/do→featurefix/repair/bug/fix→bugfixdocumentation/README/Dockerfile/configuration/comment→docs
Show classification with reasoning and require user confirmation:
"Identified as {type} change (matched keywords: {keywords}). Execution path: {route summary}. Please select change type:
- feature — New feature, follows full 0→1→2→3→4→5 process
- bugfix — Bug fix, skips Stage 1, follows 0→2→3→4→5
- docs — Documentation change, follows lightweight 0→2→5 process
- Custom type — Manually specify type (reason required)"
-
Write
change_typeto.orbit-state. Generatebranch_nameas<type>/<change-id>and write to.orbit-state.branch_name(e.g.,feature/add-oauth-login,bugfix/fix-payment,docs/update-readme).
Transition: If feature → Stage 1. If bugfix or docs → Stage 2.
Stage 1: Explore & Design
Applies to: change_type == feature
Skill: brainstorming
Instructions:
-
Update
.orbit-state:stage: 1, substage: exploring -
Execute brainstorming (load skill or use inline fallback — see Tool Compatibility):
"Follow brainstorming's full process (9 steps). When it tells you to invoke writing-plans, do NOT follow that. Instead, output [ORBIT_CHECKPOINT: Stage 1 complete] and return to Orbit's controller."
-
Run brainstorming through its full cycle: explore context → question rounds → design document → user review
-
At brainstorming's terminal state, output
[ORBIT_CHECKPOINT: Stage 1 complete] -
Orbit takes over:
- Update
.orbit-state:stage: 2, substage: id_confirmation - Ask user: "Change ID is
{id}, keep it? (Enter a new ID to rename)" - If renamed:
mv openspec/changes/<old>/ openspec/changes/<new>/, update.orbit-state.change_id, update.orbit-state.branch_nametofeature/<new-id> - Set
preliminary: false - Write
design_docpath (from brainstorming output) to.orbit-state.design_doc
- Update
Artifacts: docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md
Transition: Stage 2
Stage 2: Specify
Applies to: all change types
Skill: None. Orbit writes OpenSpec artifacts directly. Do NOT call openspec-new-change — the directory already exists from Stage 0.
Instructions:
-
Update
.orbit-state:stage: 2, substage: bridging -
Read design document (for features) or extract from user request (for bugfix/docs)
-
Approach Analysis (conditional):
Update
.orbit-state:substage: approach_analysisSelf-assess whether this change has meaningful alternative implementation approaches — this is about HOW (technical paths), not WHAT (requirements, which are already defined):
Trigger (present alternatives) when ANY of:
- Multiple viable technical paths exist (modify existing module vs. create new abstraction)
- Cross-module coordination required (composable + pages + components)
- Approach affects existing behavior in non-obvious ways
- Architectural decision with downstream consequences
Skip (go to Step 4) when ANY of:
- User request already specifies the approach explicitly
- Single-line fix, typo, or obvious mechanical change
- Pure docs/config change with no implementation choice
- Stage 1 design document already selected and documented the approach
When triggered, present 2-3 approaches. For each: brief description (what changes + where), pros/cons (technical trade-offs), effort (S/M/L), risk (Low/Med/High with what could go wrong). Mark one as Recommended with reasoning.
=== [ORBIT_APPROACH] Approach Analysis === Requirement Summary: <1-2 lines> ── Approach A (Recommended) ── Description: <what + where> Pros: <pros> Cons: <cons> Effort: S/M/L Risk: Low/Medium/High ── Approach B ── Description: <what + where> Pros / Cons / Effort / Risk ── Approach C ── Description: <what + where> Pros / Cons / Effort / Risk Reason for Recommendation: <why Approach A is recommended> Please choose: A / B / C (or describe a custom approach)- User selects A/B/C → write
selected_approachto.orbit-state, proceed to Step 4 - User describes custom approach → treat as selected, proceed to Step 4
-
Write OpenSpec artifacts using the bridge rules in
references/bridge-rules.md. Read change-id from.orbit-state.change_idand substitute into proposal.md title (# Proposal: <change-id>): If Step 3 was triggered, artifacts must reflect the selected approach:openspec/changes/<change-id>/proposal.md— Why / What Changes / Impactopenspec/changes/<change-id>/design.md— Architecture / Data Flowopenspec/changes/<change-id>/specs/<capability>/spec.md— EARS-format requirements
-
Validate: run
openspec status --change "<id>" --json -
Blocking Human Review Gate (CANNOT be skipped):
=== [ORBIT_GATE] Stage 2 Artifacts Generated, Please Review === 📄 proposal.md: Why: <1-2 line summary> What: <list of key points> Impact: <1 line> 📄 specs/<capability>/spec.md: Requirements: <numbered list, one per line> 📄 design.md: Architecture: <1-2 lines> Full files: openspec/changes/<change-id>/ Please choose: 1. Confirm — Review approved, continue to next stage 2. Modify files — Describe adjustments needed in natural language Example: "The Why in proposal is off, the actual problem is XXX" "The third requirement is inaccurate, should be YYY" Orbit will locate the corresponding OpenSpec artifact based on the description and modify it, then re-validate and show you the updated version for confirmation. 3. Rediscuss approach — Return to Step 3 approach analysis, re-select implementation path Applicable when: After reviewing artifacts, you find the technical approach needs adjustment Orbit will clear current artifacts and go back to the approach analysis step 4. Abort — Terminate workflow, keep files for manual processing- "1" → continue to step 7
- "2" → understand user's intent in natural language, locate the corresponding OpenSpec artifacts using bridge rules, modify them, re-run
openspec status --change "<id>" --jsonto validate, then show a change summary (which files were modified and what changed) before re-displaying the review gate - "3" → delete generated artifacts, set
substage: approach_analysis, return to Step 3. Previously presented approaches can be revised based on review insights. - "4" → terminate, keep files for manual handling
-
Update
.orbit-state:stage: 3, substage: ready_for_plan
Transition:
featureorbugfix→ Stage 3docs→ Stage 5
Stage 3: Plan
Applies to: change_type == feature || change_type == bugfix
Skill: writing-plans
Instructions:
-
Update
.orbit-state:substage: planning -
Execute writing-plans (load skill or use inline fallback — see Tool Compatibility):
"Read the OpenSpec artifacts in openspec/changes// as your spec input. When you complete the plan and would normally invoke subagent-driven-development, instead output [ORBIT_CHECKPOINT: Stage 3 complete]."
-
Writing-plans runs: Scope check → File structure → Bite-sized tasks → Self-review
-
Output
[ORBIT_CHECKPOINT: Stage 3 complete] -
Orbit takes over — Bridge to tasks.md:
- Parse the plan document for task sections
- Write
openspec/changes/<change-id>/tasks.mdwith reference links (NOT compressed summaries):- [ ] 1. Implement authentication module → Details: docs/superpowers/plans/2026-07-16-oauth.md#task-1 - [ ] 2. Implement authorization middleware → Details: docs/superpowers/plans/2026-07-16-oauth.md#task-2 - Read plan document path → write to
.orbit-state.plan_doc - Parse total task count → write to
.orbit-state.total_tasks
-
Update
.orbit-state:stage: 4, substage: implementing, current_task: 0
Artifacts: docs/superpowers/plans/YYYY-MM-DD-<name>.md, tasks.md
Transition: Stage 4
Stage 4: Implement
Applies to: change_type == feature || change_type == bugfix
Skill: subagent-driven-development, test-driven-development, systematic-debugging
Pre-flight: Worktree Cleanliness Check
Before commit mode selection, verify the git worktree is clean:
- Run
git status --porcelain - If there are uncommitted changes:
[ORBIT] Uncommitted changes detected in workspace: <list modified files> Please choose: 1. Commit and continue — Enter commit message, proceed after commit 2. Pause, I'll handle manually — Workflow pauses, type continue to resume after handling 3. Discard changes and continue — Warning: All uncommitted content will be lost (requires secondary confirmation)1→ user provides commit message →git add . && git commit -m "..."→ proceed2→ pause, wait for "continue" → re-check cleanliness3→ show secondary confirmation:
→ "1" →This will discard all uncommitted changes. This action is irreversible. Please choose: 1. Confirm discard — Execute git reset --hard + git clean -fd 2. Cancel — Return to previous selectiongit reset --hard+git clean -fd→ "2" → re-display worktree cleanliness options
- If clean: proceed to commit mode selection
Rationale: Stage 4 atomic rollback records git rev-parse HEAD before each task. Uncommitted changes make the rollback point meaningless — a reset would lose work that was never part of any task.
Pre-flight: Commit Mode Selection
Before the first task, require user to choose commit mode:
[ORBIT] Stage 4 starting. Select commit mode:
1. auto (recommended) — Auto-commit after each task, no intervention needed
2. review — Show change summary after each task, wait for confirmation before committing
Please choose (1/2):
Write choice to .orbit-state.commit_mode.
Per-Task Loop
For each task (1..total_tasks, sequential):
Step 1 — Record Rollback Point:
git rev-parse HEAD → append to .orbit-state.task_history
Step 2 — Dispatch Implementer Subagent: Execute subagent-driven-development (load skill or use inline fallback — see Tool Compatibility) with task instructions. The subagent receives:
- Task description from
tasks.mdentry - Full plan section from the plan document (read via reference link in tasks.md — DO NOT compress)
- TDD enforcement (loads
test-driven-developmentinternally)
Subagent internal flow: RED → VERIFY → GREEN → VERIFY → REFACTOR → SELF-REVIEW → COMMIT (always — this is the prerequisite for atomic rollback)
Subagent output handling:
- If subagent reaches terminal state → output
[ORBIT_CHECKPOINT: Stage 4 Task <N> complete] - If subagent fails → output
[ORBIT_CHECKPOINT: Stage 4 Task <N> failed]with failure details
Step 3 — Commit Mode Handling (if auto-commit mode selected, subagent already committed):
auto→ skip, subagent handled itreview→ show diff summary, ask:[ORBIT_REVIEW] Task <N> complete. Change summary: <diff --stat or key changes> Please choose: 1. Commit — Confirm and commit 2. Rework — Provide feedback logic, trigger re-implementation for this task only 3. Skip — Skip commit, keep changes unstaged, proceed to next task1→ git commit (auto-generate message)2→ user provides feedback → re-execute step 23→ keep changes, continue
Step 4 — Update progress:
.orbit-state.current_task = <N+1>
.orbit-state.substage = "implementing"
Transition: When current_task > total_tasks, update .orbit-state.stage: 5, substage: branch_push
Stage 5: Finish
Applies to: all change types
Skill: verification-before-completion, finishing-a-development-branch
Pre-flight: Test & Build Verification
Run the detected test command from .orbit-state.test_cmd:
[ORBIT] Running verification: <.orbit-state.test_cmd>
- If tests pass → proceed to Branch Finalization
- If tests fail and
change_type == bugfix→ output[ORBIT_FAILURE] Verification failed. Workflow terminated.and exit (bugfix must not end with failing tests) - If tests fail and
change_type != bugfix→ offer options:[ORBIT] Tests failed. Please choose: 1. Auto-fix — Orbit will analyze test failures, identify root cause, and execute systematic-debugging 2. Manual fix — Workflow pauses, fix manually, type continue to resume verification 3. Skip — Proceed to branch finalization despite test failures (requires reason)
Branch Finalization
Use skill: finishing-a-development-branch:
[TASK] Push branch `<branch_name>` to remote.
- If branch doesn't exist on remote: git push -u origin <branch_name>
- If branch exists: git push origin <branch_name>
[TASK] Create PR from `<branch_name>` to base (default base: main; if base is specified in .orbit-state, use that) with title: "[<change_type>] <change_id>"
- Read proposal.md Why as PR description
- If no remote: output instructions for user to create PR manually
Final Cleanup
Update .orbit-state:
stage: 5
substage: complete
completed_at: <timestamp>
Final output:
=== [ORBIT_FINISH] Workflow Complete ===
Branch: <branch_name>
Change: openspec/changes/<change-id>/
PR: <PR URL if created>
Summary:
- Type: <change_type>
- Total tasks: <.orbit-state.total_tasks>
- Status: Complete
Tool Compatibility
Skill Loading
| Tool | Skill Loading Method | Notes |
|---|---|---|
| Claude Code | /skill <skill-name> | Direct skill hooks |
| Cursor | Agent mode prompt injection | Inject skill instructions into system prompt |
| Windsurf | Cascade agent directives | Use skill as agent instruction |
| Codex CLI | @<skill-name> in CLI mode | Native skill support |
| Aider | Custom instructions file | Use skill-md-to-aider to convert |
Inline Path Loading (Fallback)
When using inline path loading (manually copy-paste into context or reference via file path), the expected behavior is:
- For skills with formal skill definitions, load the skill definition
- For skills defined as prompt files, load the prompt content
- For skills with Aider conversion files, load the
.aider_instructionscontent
The fallback path SHOULD be strictly referenced by the AI when primary skill loading is unavailable.
Common Inline Path Locations
| Tool | File Path |
|---|---|
| Claude Code | .claude/skills/<skill-name>.md |
| Cursor | .cursor/skills/<skill-name>.md |
| Windsurf | .windsurf/skills/<skill-name>.md |
| Codex CLI | .codex/skills/<skill-name>.md |
| Aider | .aider_instructions/<skill-name>.md |
Generic .md | skills/<skill-name>.md |
Reference Files
| File | Purpose |
|---|---|
references/state-schema.yaml | .orbit-state schema definition |
references/bridge-rules.md | OpenSpec → Superpowers bridge rules |
docs/superpowers/specs/2026-07-16-orbit-workflow-design.md | Full design document |