Moonspec orchestrate

From MoonLadderStudios/MoonMind · View interactive version

Moonspec orchestrate is an AI agent skill from the GitHub repository MoonLadderStudios/MoonMind. Orchestrate the full MoonSpec lifecycle from a preselected single-story feature request or active feature directory through specification, planning, TDD task generation, artifact alignment, implementation, and final verification. Use when the user asks for an end-to-end MoonSpec run and the input ha

How to use this skill

Skill file

MoonSpec Orchestrate

Use this skill to coordinate the MoonSpec workflow end to end.

Scope

Orchestrate downstream MoonSpec skills instead of reimplementing their detailed workflows:

MoonSpec skill IDs and command IDs use moonspec-* and /moonspec.*.

Inputs

Default intent is runtime: satisfy requested behavior, reusing existing implementation where appropriate. Use docs intent only when the user explicitly asks for documentation-only work.

Core Rules

Resume Model

Before running a stage, inspect the active feature state:

Resume from the first incomplete stage. If artifacts are inconsistent, use moonspec-align when spec.md, plan.md, and tasks.md exist; otherwise stop and report the missing artifact that prevents safe alignment.

Do not overwrite later-stage artifacts unless:

Artifact Gates

Use these gates before advancing:

If a gate fails, stop or run the appropriate upstream skill. Do not continue on a claimed success without artifacts or evidence.

Workflow

1. Create Or Select Spec

Use the provided input as a preselected single-story request or active feature directory:

  1. Validate the single-story precondition before running moonspec-specify.
  2. Stop immediately if the input still needs story splitting or upstream story selection.
  3. Run moonspec-specify if spec.md does not already exist.
  4. Verify the specify gate.
  5. Do not run moonspec-breakdown or create more than one spec from this workflow.

2. Assess Matching Source Acceptance

Run moonspec-assess before planning when artifacts/moonspec/source-acceptance.json

exists and its featureId matches the active feature. Preserve the assessment's

bounded backlog, Unverified disclosures, and actual authority handoffs for planning.

If no matching source matrix exists, skip assessment without blocking planning.

A new or changed assessment makes existing plan and tasks stale when source,

statuses, backlog, disclosures, or authority handoffs change. Refresh the plan

before regenerating tasks, even if their artifact gates previously passed.

An unchanged assessment or timestamp-only rewrite does not require regeneration.

3. Plan

For the selected spec:

  1. Run moonspec-plan if the plan gate is incomplete or its assessment changed.
  2. Verify generated artifacts.
  3. Stop if planning requires unresolved user input.

4. Generate Tasks

  1. Run moonspec-tasks if the tasks gate is incomplete or upstream artifacts changed.
  2. Verify task format and source traceability, applying TDD and unit/integration coverage only to executable rows; preserve disclosures, authority handoffs, and final /moonspec.verify.

5. Align Artifacts

  1. Run moonspec-align after task generation.
  2. Let moonspec-align make conservative artifact edits without asking for follow-up responses.
  3. If moonspec-align changes spec.md, plan.md, design artifacts, or tasks.md, re-check downstream gates.
  4. Regenerate only the downstream artifact that is now stale; do not restart the full pipeline automatically.

This replaces the old manual analyze remediation flow. Do not provide scripted "yes", "continue", or other user responses to get through analyze limitations.

6. Implement

  1. Run moonspec-implement for authorized executable work; skip implementation when no executable work remains. Preserve actual authority handoffs without attempting their actions.
  2. Require applicable tests and red-first confirmation before new production code, never for disclosure-only rows.
  3. Require completed work to be marked [X] in tasks.md.
  4. Preserve story scope; do not add hidden scope to make verification easier.

7. Verify

  1. Run moonspec-verify as the final gate unless an up-to-date verification report already covers the current code and artifacts.
  2. If verdict is FULLY_IMPLEMENTED, report success.
  3. If verdict is ADDITIONAL_WORK_NEEDED, follow the verifier's recommendedNextAction. Run automatic remediation only for reattempt_current_step; needs_human and blocked stop with the report's concrete authority, decision, or environment reason. When reattempting, use the report as the remaining-work list:
  1. Run at most two verification-remediation cycles unless the user explicitly asks to keep going.
  2. If verdict is NO_DETERMINATION, stop and report the exact missing evidence, commands, or context.
  3. If verdict is BLOCKED, stop and report the environment diagnostic and minimum repair; do not count it as a remediation cycle.

Multi-Spec Designs

Multi-spec orchestration is out of scope for this skill. A higher-level workflow must split, order, and select stories before invoking MoonSpec Orchestrate for each individual story.

Commit And PR Behavior

Do not create commits or pull requests unless the user explicitly asks or the current orchestration environment requires that output.

If commit or PR creation is requested but cannot complete because of missing authentication, remote configuration, branch state, or permissions, report the exact blocker and the minimum manual command needed.

Final Report

Return a concise report:

## MoonSpec Orchestration

Feature:
- [active spec path]

Stages:
- Specify: PASS/FAIL/SKIPPED
- Plan: PASS/FAIL/SKIPPED
- Tasks: PASS/FAIL/SKIPPED
- Align: PASS/FAIL/SKIPPED
- Implement: PASS/FAIL/SKIPPED
- Verify: FULLY_IMPLEMENTED/ADDITIONAL_WORK_NEEDED/NO_DETERMINATION/BLOCKED/SKIPPED

Changed files:
- [paths]

Tests:
- [command]: [PASS/FAIL/NOT RUN]

Remaining risks:
- [risk or "None"]

Next action:
- [only if work remains]

Mention source design coverage and DOC-REQ-*/DESIGN-REQ-* status when present.

Key Rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.