AGENT SKILL

openspec-write-plan

Use when an OpenSpec change has proposal, design, and tasks artifacts ready and a Superpowers implementation plan needs to be created before execution.

License 许可
MIT
最近更新
2026-10-27
Stars
★ 0
Forks
0

01 前言 Front Matter

name
openspec-write-plan
license
MIT
metadata
{ "author": "dyx", "version": "1.0.1" }
description
Use when an OpenSpec change has proposal, design, and tasks artifacts ready and a Superpowers implementation plan needs to be created before execution.
compatibility
Requires openspec CLI and Superpowers writing-plans skill.

03 SKILL.md 正文

Generate a detailed Superpowers implementation plan from an OpenSpec change's artifacts.

Input: Optionally specify a change name. Supports --max-tasks N (default 10) to control plan splitting.

Steps

  1. Select the change

    If a name is provided, use it. Otherwise:

    • Infer from conversation context if the user mentioned a change
    • Auto-select if only one active change exists
    • If ambiguous, run openspec list --json to get available changes and prompt the user to select

    Always announce: "Using change: <name>" and how to override.

  2. Check status and load artifacts

    openspec status --change '<name>' --json
    

    Parse the JSON to understand schema and artifact status.

    openspec instructions apply --change '<name>' --json
    

    Read all contextFiles (proposal, design, tasks, etc.).

    If tasks artifact is missing or incomplete: stop and suggest running /opsx:propose first.

  3. Parse tasks.md to extract task labels

    Read the tasks file and extract all task entries with their labels (e.g., 1.1, 2.3). Each line matching - [ ] <label> <description> is a task. Record the label and description for each.

  4. Determine plan splitting

    If --max-tasks is less than 1, treat as default (10). Count total tasks. If total > --max-tasks:

    • Calculate groups: g = ceil(total / max-tasks)
    • Distribute tasks evenly across groups (group sizes differ by at most 1)
    • Try to keep tasks sharing the same top-level label number (e.g., all 1.x tasks) together (soft constraint)
    • Present the splitting plan to the user for confirmation:
      Total tasks: 21, max-tasks: 10 → 3 plans
      Plan 1: Tasks 1.1–2.3 (7 tasks)
      Plan 2: Tasks 2.4–4.1 (7 tasks)
      Plan 3: Tasks 4.2–5.3 (7 tasks)
      Proceed? [Y/n]
      
    • Wait for user confirmation before proceeding
  5. Call superpowers:writing-plans

    Invoke the superpowers:writing-plans skill with these additional constraints:

    • Provide all OpenSpec artifacts as context (proposal, design, tasks)
    • Skip the "Execution Handoff" section entirely — do NOT prompt the user to choose between Subagent-Driven or Inline Execution. Do NOT invoke superpowers:subagent-driven-development or superpowers:executing-plans after plan generation. Control returns to this command for the output summary step.
    • Require that each generated Task includes an <!-- openspec-task: LABEL --> comment on the line directly preceding the ### Task N: heading (no blank lines between), where LABEL matches the corresponding OpenSpec tasks.md label
    • Example:
      <!-- openspec-task: 1.1 -->
      ### Task 1: Create HTML skeleton
      
    • One Superpowers task may map to exactly one OpenSpec task label
    • Multiple Superpowers tasks may share the same OpenSpec task label (when a coarse OpenSpec task maps to multiple fine-grained steps)

    If the skill call fails (Superpowers not installed): stop and display:

    "Superpowers writing-plans skill not detected. Cannot create plan. Please install Superpowers first."

    Do not generate any plan files. Do not fall back to a different approach.

    File naming:

    • Single plan: docs/superpowers/plans/YYYY-MM-DD-<change-name>.md
    • Multiple plans: docs/superpowers/plans/YYYY-MM-DD-<change-name>-tasks-<first>-<last>.md
  6. Verify mapping coverage

    After plan generation, scan the plan file(s) for all <!-- openspec-task: LABEL --> annotations. Check:

    • Every OpenSpec task label has at least one corresponding plan task
    • Every plan task annotation references a label that exists in tasks.md (catch typos like 1.11 vs 1.1)
    • If any label is missing or invalid: warn the user and offer to regenerate the plan
  7. Output summary

    ## Plan Created
    
    **Change:** <change-name>
    **Plan file(s):**
    - docs/superpowers/plans/<filename>.md (N tasks)
    
    **Mapping coverage:** All OpenSpec tasks covered ✓
    
    Ready to execute! Run `/opsx:executing-plans <change-name>` to start implementation.
    This command will handle execution mode selection and sync progress back to OpenSpec tasks.
    

    IMPORTANT: Do NOT offer any other execution method. Do NOT suggest using superpowers:subagent-driven-development or superpowers:executing-plans directly. The only supported next step is /opsx:executing-plans.

Guardrails

  • Change names must match [A-Za-z0-9_-]+ — reject any name with spaces, quotes, or special characters before substituting into shell commands
  • Superpowers is a hard dependency — do not proceed without it
  • Always load OpenSpec artifacts before calling superpowers:writing-plans
  • Always verify mapping coverage after plan generation
  • Do not modify any existing OpenSpec files
  • Do not skip user confirmation for plan splitting
  • Follow Superpowers plan file conventions (header, task structure, TDD steps)
  • Never let superpowers:writing-plans perform its "Execution Handoff" — execution must go through /opsx:executing-plans to ensure OpenSpec task sync

04 同仓库更多 Skills

mambo-wang
mambo-wang/CodingHub-Plugins

humanizer-zh

编辑中文文章、评论和文档中的空话、重复及模板化表达,让文字更自然,同时保留事实、确定程度和作者声音。适用于润色已有文本,不用于判断作者身份或保证通过 AI 检测器。

★ 0
mambo-wang
mambo-wang/CodingHub-Plugins

diagram-design

Create branded architecture, architecture delta, IT current-state, flowchart, sequence, state machine, ER/data model, timeline, swimlane, quadrant, radar/spider, polar chart (polar/radial lollipop), loop/flywheel, nested, tree, org chart, layer stack, exploded axonometric, axonometric plan, Venn, pyramid/funnel, treemap and marimekko, heatmap, bar and dumbbell, waterfall, line (slopegraph, ridgeline, streamgraph, bump), Gantt and scatter charts (bubble, beeswarm), high-level, process, medallion, data flow, DP integration, DP security matrix, Sankey, fishbone, Wardley map, kanban, user journey, service blueprint, deployment, dependency graph, UML class, story map, or database schema diagrams as HTML/SVG/PNG, with .drawio, Mermaid, and .excalidraw import, plus lifecycle phase maps, block decomposition trees, and onboarding guidance.

★ 0
mambo-wang
mambo-wang/CodingHub-Plugins

ponytail

Forces the laziest solution that actually works, simplest, shortest, most minimal. Channels a senior dev who has seen everything: question whether the task needs to exist at all (YAGNI), reach for the standard library before custom code, native platform features before dependencies, one line before fifty. Supports intensity levels: lite, full (default), ultra. Use on ANY coding task: writing, adding, refactoring, fixing, reviewing, or designing code, and choosing libraries or dependencies. Also use whenever the user says "ponytail", "be lazy", "lazy mode", "simplest solution", "minimal solution", "yagni", "do less", or "shortest path", or complains about over-engineering, bloat, boilerplate, or unnecessary dependencies. Do NOT use for non-coding requests (general knowledge, prose, translation, summaries, recipes).

★ 0
mambo-wang
mambo-wang/CodingHub-Plugins

openspec-verify-change

Verify implementation matches OpenSpec change artifacts. Use when the user wants to validate that implementation is complete, correct, and coherent before archiving. Also use when the user says "openspec verify" or "opsx verify".

★ 0
mambo-wang
mambo-wang/CodingHub-Plugins

openspec-update-change

Update an OpenSpec change by revising its existing planning artifacts and keeping them coherent with one another. Use when the user wants to revise a change's plan, fold new decisions into it, or reconcile its artifacts after an edit. Also use when the user says "openspec update change" or "opsx update". If the user means the openspec update CLI command, which refreshes generated files, run that command instead. Never edits code.

★ 0
mambo-wang
mambo-wang/CodingHub-Plugins

openspec-sync-specs

Sync delta specs from an OpenSpec change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change. Also use when the user says "openspec sync" or "opsx sync".

★ 0