plan-sdlc
Use for writing implementation plans from requirements, specs, or design docs. Designated skill for plan mode. Analyzes scope, maps file structure, decomposes tasks, and produces plans for execute-plan-sdlc.
- License 许可
- MIT
- 最近更新
- 2026-05-09
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- plan-sdlc
- description
- Use for writing implementation plans from requirements, specs, or design docs. Designated skill for plan mode. Analyzes scope, maps file structure, decomposes tasks, and produces plans for execute-plan-sdlc.
- argument-hint
- [--spec] [--from-openspec <change-name>] [spec-file-path]
- user-invocable
- true
02 资源文件 2
- 参考文档plan-format-reference.md6.1 KB
- 参考文档plan-reviewer-prompt.md3.9 KB
03 SKILL.md 正文
Plan (SDLC)
Write an implementation plan from requirements, a spec, or a user description. Produces a plan in the format consumed by execute-plan-sdlc — with per-task complexity/risk/dependency metadata embedded.
Announce at start: "I'm using plan-sdlc (sdlc v{sdlc_version})." — extract the version from the sdlc: line in the session-start system-reminder. If no version is in context, omit the parenthetical.
Step 0: Mode Detection, Routing, and Setup
Mode detection: Check whether a system-reminder contains "Plan mode is active". If yes, extract the designated plan file path from "You should create your plan at <path>". That path is the only writable file.
Gather requirements: If no spec or requirements document is in context, use ask_user:
What do you want to implement? (describe in free form, bullet points, or provide a file path)
OpenSpec integration (opt-in — requires --spec flag or explicit spec path):
Hook context fast-path: If the session-start system-reminder contains an OpenSpec active: line, use its data to skip the initial glob for openspec/config.yaml.
-
globforopenspec/config.yaml. If absent, skip this entire block — no OpenSpec in this project. -
Gate check: If
openspec/config.yamlexists but neither--specflag was passed NOR the user provided a path intoopenspec/changes/: a. Classify the request: Determine whether the user's task involves functional changes vs non-functional changes. b. Non-functional changes: Print:OpenSpec detected — pass
--specto include spec context in planning. Then skip the rest of this block. c. Functional changes: Check whether an active OpenSpec change already covers this work —globopenspec/changes/*/proposal.md. If a match is found, treat it as if the user passed--spec. If no match, useask_user: This looks like a functional change. This project uses OpenSpec for spec-driven development.Options:
- Start OpenSpec flow — run
/opsx:proposeto spec this out first - Continue planning directly — skip spec workflow
- Use existing spec — pass
--specif you already have an OpenSpec change for this
Select (1/2/3):
- On 1: Stop plan-sdlc. Tell user to run
/opsx:propose. - On 2: Continue with standard planning.
- On 3: Re-run the OpenSpec loading logic.
- Start OpenSpec flow — run
-
If the user provided a spec file path pointing into
openspec/changes/<name>/, extract<name>as the active change. -
Otherwise,
globopenspec/changes/*/proposal.md. If exactly one non-archived change exists, use it. If ambiguous, useask_user:Multiple active OpenSpec changes found. Which one are you working on?
-
Once the active change is identified,
read_filein parallel:openspec/changes/<name>/proposal.mdopenspec/changes/<name>/design.md- All files matching
openspec/changes/<name>/specs/*.md openspec/changes/<name>/tasks.md
-
Store these as
openspecContext. Update the plan file header.
Complexity routing:
- 1 file, clear change: Skip plan in normal mode, lightweight plan in plan mode.
- 2–3 files: Lightweight plan.
- 4+ files: Full pipeline (Steps 1–7).
Session recovery: If plan file has content, use ask_user:
Found existing plan draft. Resume from critique (Step 3), or restart?
Initialize plan file: Write the skeleton header immediately.
Context detection and guardrail loading (scripts/skill/plan.js):
VERBATIM — Run this bash block exactly as written.
SCRIPT="scripts/skill/plan.js"
[ ! -f "$SCRIPT" ] && { echo "{}"; exit 0; }
PLAN_OUTPUT_FILE=$(node "$SCRIPT" --output-file)
EXIT_CODE=$?
echo "PLAN_OUTPUT_FILE=$PLAN_OUTPUT_FILE"
echo "EXIT_CODE=$EXIT_CODE"
# Single canonical cleanup
trap 'rm -f "$PLAN_OUTPUT_FILE"' EXIT INT TERM
Normal mode path resolution: Resolve the output path before writing. Naming: YYYY-MM-DD-<feature-name>.md.
planFile marker: record the resolved plan path.
SCRIPT="scripts/skill/plan.js"
[ -f "$SCRIPT" ] && node "$SCRIPT" --mark plan-file --path "<resolved-plan-path>" 2>/dev/null || true
Step 1 (CONSUME): Requirements Discovery and Exploration
Structured discovery: When requirements are vague, use ask_user with 2–3 targeted questions.
Codebase exploration: Use read-only tools (glob, grep_search, read_file).
Write to plan file: Fill headers, append requirements checklist.
Step 2 (PLAN): Decompose Into Tasks
Scope check: If Requirements span independent subsystems, use ask_user to offer splitting.
Task decomposition rules:
- Unit units of work.
- 1–5 files per task.
- Order: foundations → features → polish.
Per-task metadata: complexity, risk, depends on, verify.
Verification strategy: Feature → tests, config → build, etc.
Step 3 (CRITIQUE): Self-Review Plan
Check quality gates (coverage, deps, context, guardrails).
Markers: Record guardrailsEvaluated and critiqueRan using scripts/skill/plan.js --mark.
Step 4 (IMPROVE): Revise Plan and Present for Approval
Fix issues. Append Guardrail Compliance section if applicable. Offer harden via /harden-sdlc if blocked.
Present to user via ask_user:
- Requirements-to-task mapping.
- Full task list summary.
- Options: approve / change / question.
Step 5 (CRITIQUE): Plan Review Loop
Skip for lightweight plans. Dispatch a plan reviewer subagent (using invoke_agent).
Review loop: Approved → Step 7. Issues → Step 6. Max 3 iterations → escalate to user. Offer harden if loop doesn't converge.
Step 6 (IMPROVE): Apply Review Fixes
Fix issues, rewrite plan file, re-dispatch reviewer.
Step 6.5 (LINK VERIFICATION): Validate URLs in plan content — HARD GATE
LINKS_LIB="scripts/lib/links.js"
[ ! -f "$LINKS_LIB" ] && { echo "ERROR: Could not locate $LINKS_LIB."; exit 2; }
node "$LINKS_LIB" --file "$plan_path" --json
LINK_EXIT=$?
On non-zero exit, stop and surface violations.
Step 7: Handoff
Plan mode: Announce path, call ExitPlanMode.
Normal mode: Announce path, present Workflow Continuation menu.
Workflow Continuation
Present next actions:
- ship (invoke
/ship-sdlc) - execute (invoke
/execute-plan-sdlc) - done
04 同仓库更多 Skills
pr-sdlc
Creates or updates GitHub pull requests with auto-generated 8-section descriptions.
example-skill
Fixture skill for validate-cost-tiers drift tests.
example-skill
Fixture skill for validate-cost-tiers tests.
sdlc-broken-skill
暂无简介
version-sdlc
Semantic versioning and release management. Handles version bumping (major, minor, patch), release tags, and automated changelog generation. Supports --pre labels and --auto for non-interactive releases.
verify-pipeline-sdlc
Analyze and fix failed CI runs on pull requests. Classifies root causes and either applies minimal fixes or emits proposals. Integrated with ship-sdlc.