Skip to content

feat(schemas): add sdd-plus-superpowers — integrate Superpowers skills via custom schema (ref #780)#970

Open
JiangWay wants to merge 3 commits intoFission-AI:mainfrom
JiangWay:main
Open

feat(schemas): add sdd-plus-superpowers — integrate Superpowers skills via custom schema (ref #780)#970
JiangWay wants to merge 3 commits intoFission-AI:mainfrom
JiangWay:main

Conversation

@JiangWay
Copy link
Copy Markdown

@JiangWay JiangWay commented Apr 14, 2026

Context

This PR addresses #780 — the request to distribute OpenSpec as a Superpowers skill pack so that both frameworks can coexist without manual coordination.

In my comment on that issue I suggested that the cleanest path forward is not packaging one inside the other, but using OpenSpec's own project-level schema mechanism to wire Superpowers skills into the artifact lifecycle. I shared an early fork-based draft at that time:

https://github.com/JiangWay/OpenSpec/tree/6449135b7ca301bf7d19a6c9cb3c331c051205f3/schemas/sdd-plus-superpowers

This PR contributes the refined, upstream-ready version of that schema, with several corrections and additions made after real-world use.

Why a custom schema (instead of a skill pack)

Distributing OpenSpec as a Superpowers skill pack would require maintaining /opsx:* commands in two places, and would blur the line between OpenSpec's CLI (which enforces artifact structure) and Superpowers' skill system (which is prompt-only). A custom schema is strictly better because:

  • It uses existing OpenSpec machinery (schemas/, --schema <name> at change creation, native validation).
  • It does not modify the OpenSpec CLI or any Superpowers skill file — integration is purely at the instruction: prompt layer.
  • It is opt-in per change, so projects that don't use Superpowers are unaffected.
  • It is discoverable via openspec schemas, which is exactly the discovery mechanism [Feature Request] Distribute OpenSpec as a Superpowers (obra/superpowers) skill pack #780 asks for.

What this schema does

sdd-plus-superpowers extends spec-driven with:

  • A brainstorming entry point — the first artifact invokes superpowers:brainstorming, with output redirected into the change directory so both systems share a single source of truth instead of writing to docs/superpowers/....
  • A micro-task plan step — after tasks.md (coarse checkboxes), a plan.md artifact invokes superpowers:writing-plans to decompose work into 2-5 minute TDD steps.
  • An apply phase wired to Superpowers executionusing-git-worktreessubagent-driven-development (with transitive TDD + code-review) → openspec-verify-changefinishing-a-development-branch.
  • A post-implementation verify artifact — runs 5 checks (structural validation, task completion, delta-spec sync state, design/spec coherence, implementation signal) and records results.

Artifact DAG

brainstorm ──► proposal ──► specs ──► tasks ──► plan ──► [apply phase] ──► verify
     │                                                                        ▲
     └──► design (optional leaf)                                               │
                                                                               │
                               apply reads tasks.md, produces code ────────────┘

Two things worth flagging:

  • design is an optional leaf. Brainstorming may pre-fill design.md, but tasks.requires: [specs] only — matching OpenSpec conventions that design docs exist only for non-trivial technical decisions.
  • verify.requires: [plan] is structural. The instruction explicitly states verify MUST run on a completed implementation. The DAG edge exists so openspec status can surface verification progress; the timing is intentional.

Apply-phase integration

apply:
  requires: [plan]
  tracks: tasks.md
  instruction: |
    1. Workspace     → superpowers:using-git-worktrees
    2a. Executor     → superpowers:subagent-driven-development   (default, Claude Code)
        └ transitive    superpowers:test-driven-development
        └ transitive    superpowers:requesting-code-review
    2b. Executor     → superpowers:executing-plans               (fallback — no subagent support)
    3. Verification  → openspec-verify-change                    (produces verify.md)
    4. Completion    → superpowers:finishing-a-development-branch

The 2a/2b split follows Superpowers' own guidance — executing-plans/SKILL.md states "If subagents are available, use superpowers:subagent-driven-development instead of this skill." On Claude Code, 2a is always the right path; 2b is documented only for constrained runtimes, with an explicit note that transitive TDD and code-review do not carry over under 2b (the author must invoke them manually).

Changes since the draft linked in #780 (commit 6449135)

Reviewers who saw the original fork version will notice the following refinements:

  • New verify artifact + templates/verify.md — the original draft relied on a separate slash command; this version formalizes verification as an artifact so openspec status can track it and openspec validate can check its structure.
  • design demoted to optional — originally tasks.requires: [specs, design]. Experience showed design.md was frequently empty for small changes, causing false incomplete-state signals. Now tasks.requires: [specs] only.
  • Apply step 2 split into 2a/2b — earlier version always invoked subagent-driven-development. This version documents the fallback and explicitly lists transitive skill activation for readability.
  • Expanded templates with format hints derived from OpenSpec's own zod validators:
    • proposal.md — Why-section character limits (50-1000), From/To format for behavioral changes.
    • spec.md — MODIFIED / REMOVED / RENAMED delta sections with archive-time apply order notes.
    • brainstorm.md — Alternatives Considered section (the original had only "Agreed Approach").
  • New INTEGRATION.md — onboarding reference covering integration nature, skill touchpoints, artifact DAG, full change lifecycle, CLI cheat sheet, and the five design decisions behind the schema. Intended for teams adopting this schema in their own repos.

Compatibility

  • Strictly additive. No existing schemas, validators, or CLI behaviors change.
  • Per-change opt-in via --schema sdd-plus-superpowers at /opsx:new time.
  • Graceful fallback. Every Superpowers skill invocation carries a "fall back to manual" clause, so changes authored under this schema remain usable even if Superpowers is uninstalled later.

Testing

  • openspec validate --all --json passes for sample changes authored under this schema.
  • Round-trip tested: /opsx:new --schema sdd-plus-superpowers/opsx:continue through all 6 planning artifacts → /opsx:apply/opsx:verify/opsx:archive, producing a clean archived change with synced delta specs.
  • Templates validated by running OpenSpec's internal zod schemas against example output.

Notes for reviewers

  • Zero changes to core/, CLI commands, or the spec-driven schema.
  • INTEGRATION.md §7 is deliberately a snapshot template (placeholders), not project-specific content — each adopting repo fills in its own capability list, CLI versions, and plugin versions.
  • If preferred, INTEGRATION.md can be moved to docs/ instead of sitting alongside the schema — happy to relocate based on reviewer preference.

Related

Summary by CodeRabbit

  • New Features

    • Introduced sdd-plus-superpowers workflow schema enabling integrated change lifecycle management across brainstorming, proposals, design, specifications, tasks, planning, and verification stages.
  • Documentation

    • Added comprehensive integration guide and README documenting workflow stages, artifact dependencies, and command-line examples.
    • Added structured templates for all workflow artifacts to standardize change documentation.

…d INTEGRATION doc

新增 verify artifact + templates/verify.md
新增 INTEGRATION.md(七節 onboarding 文件)
schema.yaml:apply executor 拆 2a/2b、design 變可選、顯式化 TDD/code-review 傳遞
templates/brainstorm.md:加 Alternatives Considered
templates/proposal.md:加 Why 字數限制 + From/To 格式
templates/spec.md:展開 MODIFIED/REMOVED/RENAMED delta + archive 套用順序
@JiangWay JiangWay requested a review from TabishB as a code owner April 14, 2026 02:14
@1code-async
Copy link
Copy Markdown
Contributor

1code-async bot commented Apr 14, 2026

Task completed.

I'll start by reviewing the PR diff and understanding the codebase context.


View full conversation

Powered by 1Code

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 14, 2026

📝 Walkthrough

Walkthrough

Introduces a new sdd-plus-superpowers schema integrating OpenSpec artifact governance with Superpowers execution skills. Includes workflow schema definition, comprehensive integration and design documentation, and Markdown templates for brainstorming, proposals, specifications, tasks, plans, and verification artifacts.

Changes

Cohort / File(s) Summary
Schema Core
schemas/sdd-plus-superpowers/schema.yaml, schemas/sdd-plus-superpowers/README.md
Defines a new project-level schema orchestrating artifact flow from brainstormproposaldesign/specs/tasksplanapplyverify, with Superpowers skill injection points and explicit artifact dependencies.
Integration Documentation
schemas/sdd-plus-superpowers/INTEGRATION.md
Details integration touchpoints, artifact DAG relationships, execution flow with fallback strategies, CLI cheat sheet, design considerations, and snapshot requirements for lifecycle management.
Artifact Templates
schemas/sdd-plus-superpowers/templates/brainstorm.md, templates/design.md, templates/proposal.md, templates/spec.md, templates/tasks.md, templates/plan.md, templates/verify.md
Markdown templates with structured sections, validation rules, formatting requirements, and guidance for authoring brainstorming, design, proposal, specification delta, task lists, execution plans, and verification reports.

Possibly related PRs

  • PR #411: Introduces directory-based schema layout and resolver behavior that the new sdd-plus-superpowers schema directory structure depends upon.
  • PR #497/feat(skills): implement /opsx:verify skill for validating change implementations #501: Proposes the verification workflow and /opsx:verify skill that is invoked and documented in the new schema's verify artifact phase.
  • PR #445: Adds schema-listing and schema-aware workflow APIs/commands that would discover and surface the new schema to users.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Brainstorm dreams to shiny specs,
Plans take shape with superpowers flex,
Hopping through artifacts, one by one,
Till verify declares the work is done! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change—adding a new sdd-plus-superpowers schema that integrates Superpowers skills into OpenSpec workflows via custom schema configuration, which is the core focus of all files added in this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@schemas/sdd-plus-superpowers/INTEGRATION.md`:
- Around line 40-81: The fenced ASCII DAG in INTEGRATION.md opens with an
unlabeled code fence which triggers markdownlint MD040; update the opening fence
for the DAG block (the triple backticks immediately before the ASCII diagram) to
include a language tag such as "text" (i.e. change ``` to ```text) so the block
is explicitly labeled and the linter warning is resolved; ensure the closing
fence remains ``` unchanged.

In `@schemas/sdd-plus-superpowers/README.md`:
- Around line 83-88: The README flow lists /opsx:continue entries and currently
implies that "design" is mandatory; update the sequence text to indicate that
the "design" step is optional (e.g., add "(optional)" or "— optional" after the
`design` entry) so operators know it need not always be performed; modify the
lines containing the `/opsx:continue` entries (specifically the entry
referencing `design`) to include the optional marker and keep formatting
consistent with the surrounding entries.
- Around line 30-34: The fenced diagram block currently has no language tag;
update the code fence around the ASCII workflow (the triple-backtick block
containing "brainstorm ──→ proposal ──→ specs ──→ tasks ──→ plan ...") to
include a language identifier (e.g., change ``` to ```text) so the README.md
passes MD040 linting and renders consistently.

In `@schemas/sdd-plus-superpowers/schema.yaml`:
- Line 1: Normalize the schema file's line endings to LF by converting the file
that contains "name: sdd-plus-superpowers" to use Unix line endings (LF) instead
of CRLF; update the file's line endings (or add a .gitattributes entry for YAML
files to enforce eol=lf) and re-save/commit the file so yamllint no longer
reports "new-lines" errors.

In `@schemas/sdd-plus-superpowers/templates/verify.md`:
- Around line 19-21: The fenced code block in verify.md that contains "<貼上
openspec validate --all 的輸出摘要>" is missing a language identifier (causing
MD040); update the opening fence from ``` to ```text so the block reads as a
text/code block and tools render/lint it consistently, leaving the contained
output unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d8537d19-e0ee-4ea1-b062-787422688d55

📥 Commits

Reviewing files that changed from the base of the PR and between c0f2904 and af76c0b.

📒 Files selected for processing (10)
  • schemas/sdd-plus-superpowers/INTEGRATION.md
  • schemas/sdd-plus-superpowers/README.md
  • schemas/sdd-plus-superpowers/schema.yaml
  • schemas/sdd-plus-superpowers/templates/brainstorm.md
  • schemas/sdd-plus-superpowers/templates/design.md
  • schemas/sdd-plus-superpowers/templates/plan.md
  • schemas/sdd-plus-superpowers/templates/proposal.md
  • schemas/sdd-plus-superpowers/templates/spec.md
  • schemas/sdd-plus-superpowers/templates/tasks.md
  • schemas/sdd-plus-superpowers/templates/verify.md

Comment on lines +40 to +81
```
┌──────────────┐
│ brainstorm │ ◄── superpowers:brainstorming
│ (root) │ (2-3 方案 + Alternatives Considered)
└──────┬───────┘
├──► ┌──────────┐
│ │ proposal │ Why (50-1000 字元) / What Changes / Capabilities
│ └────┬─────┘
│ │
│ ▼
│ ┌──────────────────┐
│ │ specs/**/*.md │ ADDED / MODIFIED / REMOVED / RENAMED
│ │ (delta specs) │ 每 requirement 含 SHALL/MUST + scenario
│ └────┬─────────────┘
│ │
│ ▼
│ ┌──────────┐
│ │ tasks │ 粗粒度 checkbox(apply 的追蹤載體)
│ └────┬─────┘
│ │
│ ▼
│ ┌──────────┐
│ │ plan │ ◄── superpowers:writing-plans
│ └────┬─────┘ (2-5 分鐘 micro-step)
│ │
│ │ ─────────┐
│ │ │
│ │ ┌────▼──────┐
│ │ │ apply │ ◄── superpowers:using-git-worktrees
│ │ │ (phase) │ ◄── superpowers:subagent-driven-development
│ │ │ │ ├── superpowers:test-driven-development (transitive)
│ │ │ │ └── superpowers:requesting-code-review (transitive)
│ │ │ │ ◄── superpowers:finishing-a-development-branch
│ │ └────┬──────┘
│ │ │
▼ ▼ ▼
┌──────────┐ ┌──────────┐
│ design │ │ verify │ ◄── openspec-verify-change (5 checks)
│ (optional)│ └──────────┘
└──────────┘
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add a language tag to the DAG code fence.

Line 40 opens a fenced block without a language, which trips markdownlint MD040.

Suggested fix
-```
+```text
 ┌──────────────┐
 │  brainstorm  │ ◄── superpowers:brainstorming
 ...
-```
+```
🧰 Tools
🪛 markdownlint-cli2 (0.22.0)

[warning] 40-40: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@schemas/sdd-plus-superpowers/INTEGRATION.md` around lines 40 - 81, The fenced
ASCII DAG in INTEGRATION.md opens with an unlabeled code fence which triggers
markdownlint MD040; update the opening fence for the DAG block (the triple
backticks immediately before the ASCII diagram) to include a language tag such
as "text" (i.e. change ``` to ```text) so the block is explicitly labeled and
the linter warning is resolved; ensure the closing fence remains ``` unchanged.

Comment on lines +30 to +34
```
brainstorm ──→ proposal ──→ specs ──→ tasks ──→ plan
│ ↑
└──→ design ──────────┘
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Specify a language for the workflow code fence.

Line 30 uses a fenced block without language (MD040). Please tag it for consistent linting/rendering.

Suggested patch
-```
+```text
 brainstorm ──→ proposal ──→ specs ──→ tasks ──→ plan
                   │                     ↑
                   └──→ design ──────────┘
</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion

🧰 Tools
🪛 markdownlint-cli2 (0.22.0)

[warning] 30-30: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@schemas/sdd-plus-superpowers/README.md` around lines 30 - 34, The fenced
diagram block currently has no language tag; update the code fence around the
ASCII workflow (the triple-backtick block containing "brainstorm ──→ proposal
──→ specs ──→ tasks ──→ plan ...") to include a language identifier (e.g.,
change ``` to ```text) so the README.md passes MD040 linting and renders
consistently.

Comment on lines +83 to +88
/opsx:continue # → brainstorm(互動式對話)
/opsx:continue # → proposal
/opsx:continue # → design
/opsx:continue # → specs
/opsx:continue # → tasks
/opsx:continue # → plan
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Clarify that design is optional in the step-by-step flow.

Lines 85-86 currently read like design is always required. If this schema keeps design optional, this sequence should explicitly mark that step as optional to avoid operator confusion.

Suggested patch
 /opsx:continue         # → proposal
-/opsx:continue         # → design
+/opsx:continue         # → design(optional)
 /opsx:continue         # → specs
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@schemas/sdd-plus-superpowers/README.md` around lines 83 - 88, The README flow
lists /opsx:continue entries and currently implies that "design" is mandatory;
update the sequence text to indicate that the "design" step is optional (e.g.,
add "(optional)" or "— optional" after the `design` entry) so operators know it
need not always be performed; modify the lines containing the `/opsx:continue`
entries (specifically the entry referencing `design`) to include the optional
marker and keep formatting consistent with the surrounding entries.

@@ -0,0 +1,282 @@
name: sdd-plus-superpowers
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Normalize file line endings to LF (\n).

Line 1 indicates CRLF/newline mismatch (yamllint: new-lines), which can fail lint checks.

🧰 Tools
🪛 YAMLlint (1.38.0)

[error] 1-1: wrong new line character: expected \n

(new-lines)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@schemas/sdd-plus-superpowers/schema.yaml` at line 1, Normalize the schema
file's line endings to LF by converting the file that contains "name:
sdd-plus-superpowers" to use Unix line endings (LF) instead of CRLF; update the
file's line endings (or add a .gitattributes entry for YAML files to enforce
eol=lf) and re-save/commit the file so yamllint no longer reports "new-lines"
errors.

Comment on lines +19 to +21
```
<貼上 openspec validate --all 的輸出摘要>
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add a language identifier to the fenced code block.

Line 19 opens a fenced block without language, which triggers MD040 and weakens markdown tooling/rendering consistency.

Suggested patch
-```
+```text
 <貼上 openspec validate --all 的輸出摘要>
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @schemas/sdd-plus-superpowers/templates/verify.md around lines 19 - 21, The
fenced code block in verify.md that contains "<貼上 openspec validate --all
的輸出摘要>" is missing a language identifier (causing MD040); update the opening
fence from totext so the block reads as a text/code block and tools
render/lint it consistently, leaving the contained output unchanged.


</details>

<!-- fingerprinting:phantom:triton:hawk:01f04040-7abb-42d5-acec-c15926dfdd97 -->

<!-- This is an auto-generated comment by CodeRabbit -->

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant