Run the SPARC Specification phase — gather requirements, define acceptance criteria, identify constraints, and store the spec in memory
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-sparc-spec-cf1ff350f683 ,按照其中的说明把「sparc-spec」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Run Phase 1 of the SPARC methodology: define what must be built and how success is measured.
When starting a new feature or project that needs structured requirements gathering before any code is written. This phase produces the foundational specification that all subsequent phases (Pseudocode, Architecture, Refinement, Completion) build upon.
Initialize phase tracking — call mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-start with metadata { "phase": "specification", "feature": "$ARGUMENTS" }
Check for prior work — call mcp__plugin_ruflo-core_ruflo__memory_search with namespace sparc-state and query for the feature to see if a SPARC workflow already exists. If it does, retrieve existing artifacts. If not, initialize state with phase 1.
Search for similar patterns — call mcp__plugin_ruflo-core_ruflo__neural_predict with the feature description to find relevant past specifications and learned patterns
Gather requirements — analyze the feature description and the codebase to identify:
Define acceptance criteria — write at least 3 concrete, testable acceptance criteria in Given/When/Then format:
AC-1: Given [precondition], when [action], then [expected result]
AC-2: Given [precondition], when [action], then [expected result]
AC-3: Given [precondition], when [action], then [expected result]
Identify constraints — document:
Map edge cases — list at least 3 edge cases or failure scenarios:
Store specification — call mcp__plugin_ruflo-core_ruflo__memory_store with:
sparc-phasesspec-{feature-slug}{ status: "complete", requirements, acceptanceCriteria, constraints, edgeCases, integrationPoints }Update phase state — call mcp__plugin_ruflo-core_ruflo__memory_store with:
sparc-statecurrent-phase-{feature-slug}Record trajectory step — call mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-step with the specification summary
Present specification — display the full specification document to the user with a summary table and suggest running /sparc advance to pass the gate and move to the Pseudocode phase
# Specification: {Feature Name}
## Requirements
### Functional
- FR-1: ...
- FR-2: ...
### Non-Functional
- NFR-1: ...
## Acceptance Criteria
- AC-1: Given ..., when ..., then ...
- AC-2: Given ..., when ..., then ...
- AC-3: Given ..., when ..., then ...
## Constraints
- Performance: ...
- Security: ...
- Compatibility: ...
## Edge Cases
- EC-1: ...
- EC-2: ...
- EC-3: ...
## Integration Points
- IP-1: ...
---
Phase 1 complete. Run `/sparc advance` to pass the gate check.