cmd-speckit-plan

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

/speckit.plan

/speckit.plan

Agent skill wrapper for the Claude command
/speckit.plan
.
When the original command text references
{{INPUT}}
,
$1
, or named arguments, map them from the user's current request.
Claude命令
/speckit.plan
的Agent技能封装。
当原始命令文本引用
{{INPUT}}
$1
或命名参数时,从用户当前请求中映射对应内容。

Command Instructions

命令说明

Produce a complete technical implementation plan from a feature specification.
根据功能规格文档生成完整的技术实施方案。

Steps

步骤

  1. Locate the spec:
    • If input names a feature or file path, use it.
    • Otherwise check
      .specify/specs/*/spec.md
      ; if multiple, ask which to plan.
    • Fall back to
      spec.md
      in the project root.
    • Set
      FEATURE_DIR
      to the spec's parent directory.
  2. Load context: Read
    spec.md
    and
    .specify/memory/constitution.md
    . Detect tech stack from
    package.json
    ,
    mix.exs
    ,
    Cargo.toml
    ,
    pyproject.toml
    ,
    go.mod
    , etc.
  3. Phase 0 — Research: For each
    [NEEDS CLARIFICATION]
    marker and technical unknown:
    • Search the codebase for existing patterns and abstractions.
    • Identify required external dependencies.
    • Write findings to
      FEATURE_DIR/research.md
      :
      markdown
      # Research: <Feature Name>
      ## Unknowns Investigated
      ## Existing Patterns Found
      ## External Dependencies
    • Resolve all open questions before proceeding.
  4. Phase 1 — Design artifacts:
    Write
    FEATURE_DIR/plan.md
    :
    markdown
    # Technical Plan: <Feature Name>
    ## Architecture Overview
    ## Technology Choices (with rationale)
    ## Component Design
    ## Implementation Phases
    ## Risk Assessment
    ## Open Technical Questions
    Write
    FEATURE_DIR/data-model.md
    (only if the feature involves persistent data):
    markdown
    # Data Model: <Feature Name>
    ## Entities (fields, types, constraints, relationships)
    ## Migrations (in dependency order)
    ## Indexes (with justification)
    Create
    FEATURE_DIR/contracts/<interface-name>.md
    for each external interface:
    markdown
    # Contract: <Interface Name>
    ## Signature / Endpoint
    ## Request / Input Schema
    ## Response / Output Schema
    ## Error Conditions
    ## Constraints
  5. Constitution check: Verify the plan does not violate any MUST or SHOULD NOT principle. If violations found, flag
    [CONSTITUTION CONFLICT]
    and pause for user review before continuing.
  6. Report: List all files created with paths and one-line summaries.
Next step: Run
/speckit.analyze
to validate consistency, or
/speckit.tasks
to generate the task breakdown.
{{INPUT}}
  1. 定位规格文档:
    • 如果输入指定了功能名称或文件路径,则使用该路径。
    • 否则检查
      .specify/specs/*/spec.md
      ;如果存在多个,询问用户要为哪个生成方案。
    • 若以上都不存在,则使用项目根目录下的
      spec.md
    • FEATURE_DIR
      设置为规格文档的父目录。
  2. 加载上下文:读取
    spec.md
    .specify/memory/constitution.md
    。从
    package.json
    mix.exs
    Cargo.toml
    pyproject.toml
    go.mod
    等文件中检测技术栈。
  3. 阶段0 — 调研:针对每个
    [NEEDS CLARIFICATION]
    标记和技术疑点:
    • 在代码库中搜索现有模式和抽象实现。
    • 确定所需的外部依赖。
    • 将调研结果写入
      FEATURE_DIR/research.md
      :
      markdown
      # Research: <Feature Name>
      ## Unknowns Investigated
      ## Existing Patterns Found
      ## External Dependencies
    • 在进入下一阶段前解决所有未明确的问题。
  4. 阶段1 — 设计产出物:
    编写
    FEATURE_DIR/plan.md
    :
    markdown
    # Technical Plan: <Feature Name>
    ## Architecture Overview
    ## Technology Choices (with rationale)
    ## Component Design
    ## Implementation Phases
    ## Risk Assessment
    ## Open Technical Questions
    编写
    FEATURE_DIR/data-model.md
    (仅当功能涉及持久化数据时):
    markdown
    # Data Model: <Feature Name>
    ## Entities (fields, types, constraints, relationships)
    ## Migrations (in dependency order)
    ## Indexes (with justification)
    为每个外部接口创建
    FEATURE_DIR/contracts/<interface-name>.md
    :
    markdown
    # Contract: <Interface Name>
    ## Signature / Endpoint
    ## Request / Input Schema
    ## Response / Output Schema
    ## Error Conditions
    ## Constraints
  5. 合规性检查:验证方案是否违反任何MUST或SHOULD NOT原则。若发现违规,标记
    [CONSTITUTION CONFLICT]
    并暂停流程,等待用户审核后再继续。
  6. 生成报告:列出所有创建的文件,包含路径和单行摘要。
下一步:运行
/speckit.analyze
验证一致性,或运行
/speckit.tasks
生成任务分解。
{{INPUT}}