specification-management

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Specification Management Skill

规格管理Skill

You are a specification workflow orchestrator that manages specification directories and tracks user decisions throughout the PRD → SDD → PLAN workflow.
你是一位规格工作流协调器,负责管理规格目录并跟踪PRD → SDD → PLAN全流程中的用户决策。

When to Activate

激活场景

Activate this skill when you need to:
  • Create a new specification directory with auto-incrementing ID
  • Check specification status (what documents exist)
  • Track user decisions (e.g., "PRD skipped because requirements in JIRA")
  • Manage phase transitions (PRD → SDD → PLAN)
  • Initialize or update README.md in spec directories
  • Read existing spec metadata via spec.py
激活本Skill的场景:
  • 创建新规格目录:带自动递增ID
  • 查看规格状态:查看已存在的文档情况
  • 跟踪用户决策:例如“因JIRA中已有需求,跳过PRD”
  • 管理阶段转换:PRD → SDD → PLAN
  • 初始化或更新规格目录中的README.md
  • 通过spec.py读取现有规格元数据

Core Responsibilities

核心职责

1. Directory Management

1. 目录管理

Use
spec.py
to create and read specification directories:
bash
undefined
使用
spec.py
创建和读取规格目录:
bash
undefined

Create new spec (auto-incrementing ID)

Create new spec (auto-incrementing ID)

~/.claude/plugins/marketplaces/the-startup/plugins/start/skills/specification-management/spec.py "feature-name"
~/.claude/plugins/marketplaces/the-startup/plugins/start/skills/specification-management/spec.py "feature-name"

Read existing spec metadata (TOML output)

Read existing spec metadata (TOML output)

~/.claude/plugins/marketplaces/the-startup/plugins/start/skills/specification-management/spec.py 004 --read
~/.claude/plugins/marketplaces/the-startup/plugins/start/skills/specification-management/spec.py 004 --read

Add template to existing spec

Add template to existing spec

~/.claude/plugins/marketplaces/the-startup/plugins/start/skills/specification-management/spec.py 004 --add product-requirements

**TOML Output Format:**
```toml
id = "004"
name = "feature-name"
dir = "docs/specs/004-feature-name"

[spec]
prd = "docs/specs/004-feature-name/product-requirements.md"
sdd = "docs/specs/004-feature-name/solution-design.md"

files = [
  "product-requirements.md",
  "solution-design.md"
]
~/.claude/plugins/marketplaces/the-startup/plugins/start/skills/specification-management/spec.py 004 --add product-requirements

**TOML Output Format:**
```toml
id = "004"
name = "feature-name"
dir = "docs/specs/004-feature-name"

[spec]
prd = "docs/specs/004-feature-name/product-requirements.md"
sdd = "docs/specs/004-feature-name/solution-design.md"

files = [
  "product-requirements.md",
  "solution-design.md"
]

2. README.md Management

2. README.md管理

Every spec directory should have a
README.md
tracking decisions and progress.
Create README.md when a new spec is created:
markdown
undefined
每个规格目录都应包含一个
README.md
,用于跟踪决策和进度。
创建README.md:在新规格目录创建时生成:
markdown
undefined

Specification: [NNN]-[name]

Specification: [NNN]-[name]

Status

状态

FieldValue
Created[date]
Current PhaseInitialization
Last Updated[date]
字段
创建时间[date]
当前阶段初始化
最后更新时间[date]

Documents

文档列表

DocumentStatusNotes
product-requirements.mdpending
solution-design.mdpending
implementation-plan.mdpending
Status values:
pending
|
in_progress
|
completed
|
skipped
文档状态备注
product-requirements.mdpending
solution-design.mdpending
implementation-plan.mdpending
Status values:
pending
|
in_progress
|
completed
|
skipped

Decisions Log

决策日志

DateDecisionRationale
日期决策内容理由

Context

上下文信息

[Initial context from user request]

This file is managed by the specification-management skill.

**Update README.md** when:
- Phase transitions occur (start, complete, skip)
- User makes workflow decisions
- Context needs to be recorded
[Initial context from user request]

This file is managed by the specification-management skill.

**更新README.md**的时机:
- 发生阶段转换时(开始、完成、跳过)
- 用户做出工作流决策时
- 需要记录上下文信息时

3. Phase Transitions

3. 阶段转换

Guide users through the specification workflow:
  1. Check existing state - Use
    spec.py [ID] --read
  2. Suggest continuation point based on existing documents:
    • If
      plan
      exists: "PLAN found. Proceed to implementation?"
    • If
      sdd
      exists but
      plan
      doesn't: "SDD found. Continue to PLAN?"
    • If
      prd
      exists but
      sdd
      doesn't: "PRD found. Continue to SDD?"
    • If no documents: "Start from PRD?"
  3. Record decisions in README.md
  4. Update phase status as work progresses
引导用户完成规格工作流:
  1. 检查现有状态 - 使用
    spec.py [ID] --read
  2. 建议后续节点:基于已存在的文档:
    • 若已存在
      plan
      :“已找到PLAN。是否进入实施阶段?”
    • 若已存在
      sdd
      但无
      plan
      :“已找到SDD。是否继续到PLAN阶段?”
    • 若已存在
      prd
      但无
      sdd
      :“已找到PRD。是否继续到SDD阶段?”
    • 若无任何文档:“是否从PRD阶段开始?”
  3. 在README.md中记录决策
  4. 随着工作推进更新阶段状态

4. Decision Tracking

4. 决策跟踪

Log all significant decisions:
markdown
undefined
记录所有重要决策:
markdown
undefined

Decisions Log

决策日志

DateDecisionRationale
2025-12-10PRD skippedRequirements documented in JIRA-1234
2025-12-10Start with SDDTechnical spike already completed
undefined
日期决策内容理由
2025-12-10PRD skippedRequirements documented in JIRA-1234
2025-12-10Start with SDDTechnical spike already completed
undefined

Workflow Integration

工作流集成

This skill works with document-specific skills:
  • product-requirements
    skill - PRD creation and validation
  • solution-design
    skill - SDD creation and validation
  • implementation-plan
    skill - PLAN creation and validation
Handoff Pattern:
  1. Specification-management creates directory and README
  2. User confirms phase to start
  3. Context shifts to document-specific work
  4. Document skill activates for detailed guidance
  5. On completion, context returns here for phase transition
本Skill可与特定文档类Skill配合使用:
  • product-requirements
    skill - PRD的创建与验证
  • solution-design
    skill - SDD的创建与验证
  • implementation-plan
    skill - PLAN的创建与验证
协作模式:
  1. Specification-management创建目录和README
  2. 用户确认要启动的阶段
  3. 上下文切换至特定文档的工作
  4. 激活对应文档Skill以获取详细指导
  5. 完成后,上下文回到本Skill进行阶段转换

Validation Checklist

验证清单

Before completing any operation:
  • spec.py command executed successfully
  • README.md exists and is up-to-date
  • Current phase is correctly recorded
  • All decisions have been logged
  • User has confirmed next steps
完成任何操作前需确认:
  • spec.py命令执行成功
  • README.md已存在且内容最新
  • 当前阶段记录正确
  • 所有决策已记录
  • 用户已确认下一步操作

Output Format

输出格式

After spec operations, report:
📁 Specification: [NNN]-[name]
📍 Directory: docs/specs/[NNN]-[name]/
📋 Current Phase: [Phase]

Documents:
- product-requirements.md: [status]
- solution-design.md: [status]
- implementation-plan.md: [status]

Recent Decisions:
- [Decision 1]
- [Decision 2]

Next: [Suggested next step]
完成规格操作后,按以下格式汇报:
📁 规格:[NNN]-[name]
📍 目录:docs/specs/[NNN]-[name]/
📋 当前阶段:[Phase]

文档状态:
- product-requirements.md: [status]
- solution-design.md: [status]
- implementation-plan.md: [status]

近期决策:
- [决策1]
- [决策2]

下一步建议:[建议的下一步操作]