specs-explore

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

specs-explore Skill

specs-explore Skill

Investigate the codebase, think through problems, compare approaches, and return a structured analysis. Only create
exploration.md
when
--spec
is provided.
调研代码库,梳理问题,对比不同方案,并返回结构化分析结果。仅当提供
--spec
参数时才创建
exploration.md
文件。

What You Receive

你将收到的内容

The orchestrator will give you:
  • A topic or feature to explore
  • --spec
    path (optional)
  • --lang
    framework (optional)
编排器会提供给你:
  • 待探索的主题或功能
  • --spec
    路径(可选)
  • --lang
    框架(可选)

Execution Steps

执行步骤

Step 1: Understand the Request

步骤1:理解需求

Parse what the user wants to explore:
  • Is this a new feature? A bug fix? A refactor?
  • What domain does it touch?
解析用户的探索需求:
  • 这是新功能开发?Bug修复?还是代码重构?
  • 涉及哪些业务领域?

Step 2: Investigate the Codebase

步骤2:调研代码库

Read relevant code to understand:
  • Current architecture and patterns
  • Files and modules that would be affected
  • Existing behavior that relates to the request
  • Potential constraints or risks
INVESTIGATE:
├── Read entry points and key files
├── Search for related functionality (Grep)
├── Check existing tests (Glob)
├── Look for patterns already in use
└── Identify dependencies and coupling
阅读相关代码以理解:
  • 当前的架构和模式
  • 会受到影响的文件和模块
  • 与需求相关的现有功能逻辑
  • 潜在的限制或风险
INVESTIGATE:
├── Read entry points and key files
├── Search for related functionality (Grep)
├── Check existing tests (Glob)
├── Look for patterns already in use
└── Identify dependencies and coupling

Step 3: Analyze Options

步骤3:分析可选方案

If there are multiple approaches, compare them:
ApproachProsConsComplexity
Option A......Low/Med/High
Option B......Low/Med/High
如果有多种实现方案,对它们进行对比:
方案优势劣势复杂度
方案A......低/中/高
方案B......低/中/高

Step 4: Persist Artifact (if
--spec
is provided)

步骤4:保存成果(若提供
--spec
参数)

If
--spec=docs/specs/001-add-jwt-auth
is specified, write to
docs/specs/001-add-jwt-auth/exploration.md
:
markdown
undefined
如果指定了
--spec=docs/specs/001-add-jwt-auth
,则将内容写入
docs/specs/001-add-jwt-auth/exploration.md
markdown
undefined

Exploration: {topic}

Exploration: {topic}

Current State

Current State

{How the system works today relevant to this topic}
{How the system works today relevant to this topic}

Affected Areas

Affected Areas

  • path/to/file.ext
    — {why it's affected}
  • path/to/other.ext
    — {why it's affected}
  • path/to/file.ext
    — {why it's affected}
  • path/to/other.ext
    — {why it's affected}

Approaches

Approaches

  1. {Approach name} — {brief description}
    • Pros: {list}
    • Cons: {list}
    • Effort: {Low/Medium/High}
  2. {Approach name} — {brief description}
    • Pros: {list}
    • Cons: {list}
    • Effort: {Low/Medium/High}
  1. {Approach name} — {brief description}
    • Pros: {list}
    • Cons: {list}
    • Effort: {Low/Medium/High}
  2. {Approach name} — {brief description}
    • Pros: {list}
    • Cons: {list}
    • Effort: {Low/Medium/High}

Recommendation

Recommendation

{Your recommended approach and why}
{Your recommended approach and why}

Risks

Risks

  • {Risk 1}
  • {Risk 2}
  • {Risk 1}
  • {Risk 2}

Ready for Proposal

Ready for Proposal

{Yes/No — and what the user should know}
undefined
{Yes/No — and what the user should know}
undefined

Step 5: Return Result

步骤5:返回结果

Return the same structured analysis (inline), plus:
Status Report:
  • status:
    done
    |
    blocked
    |
    partial
  • executive_summary: 1-sentence description of what was explored and key recommendation
  • artifact:
    {spec}/exploration.md
    (if
    --spec
    provided) or "none"
  • next_recommended:
    specs.brainstorm
    (if spec provided) or
    none
    (if standalone)
  • risks: risks discovered, or "None"

返回相同的结构化分析内容(内嵌形式),并附加:
状态报告:
  • status:
    done
    |
    blocked
    |
    partial
  • executive_summary:一句话描述探索内容及核心建议
  • artifact:
    {spec}/exploration.md
    (若提供spec参数)或"none"
  • next_recommended:
    specs.brainstorm
    (若提供spec参数)或
    none
    (若为独立探索)
  • risks: 发现的风险,或"无"

Rules

规则

  • The ONLY file you MAY create is
    exploration.md
    inside the spec folder (if
    --spec
    provided)
  • DO NOT modify any existing code or files
  • ALWAYS read real code, never guess about the codebase
  • Keep your analysis CONCISE — summary, not a novel
  • If you can't find enough information, say so clearly
  • If the request is too vague, ask for clarification
  • 仅允许在spec文件夹内创建
    exploration.md
    文件(若提供
    --spec
    参数)
  • 不得修改任何现有代码或文件
  • 务必阅读真实代码,切勿猜测代码库内容
  • 分析内容需简洁——仅做总结,勿长篇大论
  • 若无法获取足够信息,请明确说明
  • 若需求过于模糊,请请求用户澄清