Communitygithub.com

yaozoo/orbit

OpenSpec × Superpowers unified workflow orchestrator | One slash command, end-to-end AI coding pipeline

What is orbit?

Orbit is an AI agent skill designed for development workflows that require end-to-end orchestration across multiple specialized skills. It acts as a glue layer between OpenSpec (for change artifact management and requirement definition) and Superpowers (for development quality practices like TDD, design, and code review). The skill provides a unified workflow that automates the sequence of stages from bootstrapping a change, exploring and designing features, writing specifications, planning tasks, implementing code with subagents, and finishing with PR readiness checks. It supports prominent AI coding tools like Codex, Claude Code, Cursor, and Windsurf, and can be triggered via slash commands, explicit mentions, or @ mentions. Orbit handles cold starts and resume (checkpoint-based continuation), ensuring state persistence and integrity across interruptions. Its key value is reducing manual context switching and handoffs, allowing developers to focus on intent while Orbit manages the pipeline.

Works with✓Claude Code✓Codex CLI✓Cursor✓Windsurf
npx skills add yaozoo/orbit

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

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 MethodExampleCompatible Tools
Slash Command/orbit I need to do OAuth loginCodex, Claude Code
Explicit Name Mention"Use Orbit to help me fix this bug"All
@ Mention@orbit implement user authentication moduleCursor, 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"):

  1. Start at Stage 0 — Bootstrap
  2. Follow the stage sequence based on detected change type

Resume (Checkpoint Continuation)

If the user says "continue" without a new change request:

  1. Scan openspec/changes/*/.orbit-state for files with stage < 5 (or stage == 5 and substage != "complete")
  2. If one found: auto-resume from that stage
  3. If multiple found: list and let user choose
  4. Integrity check: Before resuming, verify that artifacts referenced by .orbit-state still exist:
    • If stage >= 3: check that openspec/changes/<id>/tasks.md exists
    • If stage == 4: check that .orbit-state.plan_doc path 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
      
  5. Output: [ORBIT_RESUME] Resuming from Stage {stage}.{substage}
  6. Jump to the corresponding stage's instructions below

Stage Sequence by Change Type

change_typeStagesSkills Used
feature0 → 1 → 2 → 3 → 4 → 5brainstorming, writing-plans, subagent-driven-development, tdd, finishing-a-development-branch
bugfix0 → 2 → 3 → 4 → 5writing-plans, subagent-driven-development, tdd, finishing-a-development-branch
docs0 → 2 → 5verification-before-completion, finishing-a-development-branch

Stage 0: Bootstrap

Goal: Create change directory, detect environment, classify change type.

Steps:

  1. Generate change-id: Parse user request → <verb>-<noun> (e.g., add-oauth-login). If ambiguous, use change-YYYYMMDD-NNN. Validate kebab-case. Conflict check with ls openspec/changes/. Create openspec/changes/<change-id>/ directory.

  2. 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. When preliminary: true, the workflow is restricted to Stage 0 ↔ Stage 1 only. Stage 2 and beyond cannot proceed until Stage 1 completes and preliminary is set to false.

  3. Detect test command: Prefer headless (CI-compatible) test scripts. Check package.json for test:unit or test:ci first. If not found, fall back to scripts.test. If the detected script starts a dev server (e.g., vite), search for headless alternatives in sub-package scripts. Also check pyproject.toml → pytest, Cargo.toml → cargo test, go.mod → go test ./..., Makefile → make test. If none match, ask user. Write to .orbit-state.test_cmd.

  4. Classify change type: Keywords → type mapping:

    • new/add/implement/refactor/develop/do → feature
    • fix/repair/bug/fix → bugfix
    • documentation/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:

    1. feature — New feature, follows full 0→1→2→3→4→5 process
    2. bugfix — Bug fix, skips Stage 1, follows 0→2→3→4→5
    3. docs — Documentation change, follows lightweight 0→2→5 process
    4. Custom type — Manually specify type (reason required)"
  5. Write change_type to .orbit-state. Generate branch_name as <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:

  1. Update .orbit-state: stage: 1, substage: exploring

  2. 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."

  3. Run brainstorming through its full cycle: explore context → question rounds → design document → user review

  4. At brainstorming's terminal state, output [ORBIT_CHECKPOINT: Stage 1 complete]

  5. 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_name to feature/<new-id>
    • Set preliminary: false
    • Write design_doc path (from brainstorming output) to .orbit-state.design_doc

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:

  1. Update .orbit-state: stage: 2, substage: bridging

  2. Read design document (for features) or extract from user request (for bugfix/docs)

  3. Approach Analysis (conditional):

    Update .orbit-state: substage: approach_analysis

    Self-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_approach to .orbit-state, proceed to Step 4
    • User describes custom approach → treat as selected, proceed to Step 4
  4. Write OpenSpec artifacts using the bridge rules in references/bridge-rules.md. Read change-id from .orbit-state.change_id and 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 / Impact
    • openspec/changes/<change-id>/design.md — Architecture / Data Flow
    • openspec/changes/<change-id>/specs/<capability>/spec.md — EARS-format requirements
  5. Validate: run openspec status --change "<id>" --json

  6. 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>" --json to 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
  7. Update .orbit-state: stage: 3, substage: ready_for_plan

Transition:

  • feature or bugfix → Stage 3
  • docs → Stage 5

Stage 3: Plan

Applies to: change_type == feature || change_type == bugfix

Skill: writing-plans

Instructions:

  1. Update .orbit-state: substage: planning

  2. 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]."

  3. Writing-plans runs: Scope check → File structure → Bite-sized tasks → Self-review

  4. Output [ORBIT_CHECKPOINT: Stage 3 complete]

  5. Orbit takes over — Bridge to tasks.md:

    • Parse the plan document for task sections
    • Write openspec/changes/<change-id>/tasks.md with 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
  6. 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:

  1. Run git status --porcelain
  2. 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 "..." → proceed
    • 2 → pause, wait for "continue" → re-check cleanliness
    • 3 → show secondary confirmation:
      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 selection
      
      → "1" → git reset --hard + git clean -fd → "2" → re-display worktree cleanliness options
  3. 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.md entry
  • Full plan section from the plan document (read via reference link in tasks.md — DO NOT compress)
  • TDD enforcement (loads test-driven-development internally)

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 it
  • review → 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 task
    
    • 1 → git commit (auto-generate message)
    • 2 → user provides feedback → re-execute step 2
    • 3 → 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

ToolSkill Loading MethodNotes
Claude Code/skill <skill-name>Direct skill hooks
CursorAgent mode prompt injectionInject skill instructions into system prompt
WindsurfCascade agent directivesUse skill as agent instruction
Codex CLI@<skill-name> in CLI modeNative skill support
AiderCustom instructions fileUse 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_instructions content

The fallback path SHOULD be strictly referenced by the AI when primary skill loading is unavailable.

Common Inline Path Locations

ToolFile 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 .mdskills/<skill-name>.md

Reference Files

FilePurpose
references/state-schema.yaml.orbit-state schema definition
references/bridge-rules.mdOpenSpec → Superpowers bridge rules
docs/superpowers/specs/2026-07-16-orbit-workflow-design.mdFull design document

Related Skills