AgentSkillsCN

spec-driven

采用“规格驱动开发”方法。当用户希望进行结构化的功能开发,提到“规格驱动”“先写规格”,或需要在需求与设计阶段统筹规划一项复杂功能时使用。

SKILL.md
--- frontmatter
name: spec-driven
description: Spec-Driven Development methodology. Use when user wants structured feature development, mentions "spec-driven", "write a spec first", or needs to plan a complex feature with requirements and design phases.

Spec-Driven Development

A structured approach that separates planning from coding through four sequential phases.

When to Use This

  • Complex features requiring design decisions
  • Features that need stakeholder review
  • Multi-day implementation efforts
  • When you want documentation as you go

The Process

code
1. Requirements → 2. Design → 3. Tasks → 4. Implementation
      ↓              ↓          ↓
   approve        approve    approve

Each phase must be approved before proceeding.

Quick Start

Tell the user to use the /spec command:

code
/spec new feature-name    # Create new spec
/spec                     # Show current status and next steps

File Structure

code
spec/
├── .current-spec           # Active spec name
├── 001-feature-name/
│   ├── requirements.md
│   ├── design.md
│   ├── tasks.md
│   ├── .requirements-approved
│   ├── .design-approved
│   └── .tasks-approved

Phase Guidelines

Requirements Phase

  • Define WHAT needs to be built
  • User stories with acceptance criteria
  • Functional requirements (P0/P1/P2)
  • Non-functional requirements
  • Out of scope items

Design Phase

  • Define HOW it will be built
  • Architecture overview
  • Technology decisions
  • Data models and APIs
  • Security considerations

Tasks Phase

  • Define WHEN and in what order
  • Break into phases (Foundation, Core, Testing)
  • Use checkboxes for tracking
  • Include dependencies

Implementation Phase

  • Execute the approved plan
  • Update task checkboxes as you go
  • Commit after completing phases