跳到正文
Skillpedia
通用编程81k · #1697

sparc-spec

它能做什么

这项技能执行 SPARC 方法的第一阶段,即收集功能的需求、验收标准和约束条件。适用于希望在开发开始前有清晰需求的团队。

适用场景

  • ✓当你开始一个新功能,需要先写下其需求的时候。
  • ✓当你希望在编写任何代码之前有清晰的验收标准的时候。
  • ✓当你想记录功能必须遵守的约束条件的时候。

技能链接

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-sparc/skills/sparc-spec/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-sparc/skills/sparc-spec/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“在我们开始编码之前,请为密码重置功能写出需求和验收标准。”

每周 5 个新技能,1 分钟读完。

工作原理

这项技能会检查该功能之前的工作,查看类似的过往规格和代码库,然后列出功能性和非功能性需求。它会把规格说明保存到记忆中,供后续阶段使用。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

SPARC Specification Phase

Run Phase 1 of the SPARC methodology: define what must be built and how success is measured.

When to use

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.

Steps

  1. Initialize phase tracking — call mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-start with metadata { "phase": "specification", "feature": "$ARGUMENTS" }

  2. Check for prior work — call mcp__plugin_ruflo-core_ruflo__memory_retrieve with namespace sparc-state and exact key current-phase-{feature-slug} to see if this workflow exists. If it does, retrieve existing artifacts. If not, initialize state at that exact key with phase 1, status: "active", and startedAt and updatedAt set to the current ISO timestamp.

  3. Search for similar patterns — call mcp__plugin_ruflo-core_ruflo__neural_predict with the feature description to find relevant past specifications and learned patterns

  4. Gather requirements — analyze the feature description and the codebase to identify:

    • Functional requirements: what the feature must do (user-facing behaviors)
    • Non-functional requirements: performance targets, security constraints, scalability needs
    • Integration points: what existing systems or APIs are affected
    • Data requirements: what data is created, read, updated, or deleted
  5. 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]
    
  6. Identify constraints — document:

    • Performance constraints (latency, throughput, resource limits)
    • Security constraints (authentication, authorization, data sensitivity)
    • Compatibility constraints (browser support, API versions, backward compatibility)
    • Infrastructure constraints (deployment environment, dependencies)
  7. Map edge cases — list at least 3 edge cases or failure scenarios:

    • What happens with invalid input?
    • What happens under concurrent access?
    • What happens when external dependencies fail?
  8. Store specification — call mcp__plugin_ruflo-core_ruflo__memory_store with:

    • Namespace: sparc-phases
    • Key: spec-{feature-slug}
    • Value: JSON with { status: "complete", requirements, acceptanceCriteria, constraints, edgeCases, integrationPoints }
  9. Update phase state — call mcp__plugin_ruflo-core_ruflo__memory_store with:

    • Namespace: sparc-state
    • Key: current-phase-{feature-slug}
    • Value: preserve existing state fields, update artifacts list to include the spec key, and set updatedAt to the current ISO timestamp
  10. Record trajectory step — call mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-step with the specification summary

  11. Present specification — display the full specification document to the user with a summary table and suggest running /ruflo-sparc:ruflo-sparc advance to pass the gate and move to the Pseudocode phase

Output format

# 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 `/ruflo-sparc:ruflo-sparc advance` to pass the gate check.
常见问题

它会编写代码吗?

不会。这一阶段只定义需要构建什么,以及如何衡量成功。

规格说明保存在哪里?

保存在 sparc-phases 记忆命名空间中。

我能继续之前的规格吗?

可以。如果该功能已存在工作流,这项技能会检索其已保存的成果。

详情

作者的原始描述

Run the SPARC Specification phase — gather requirements, define acceptance criteria, identify constraints, and store the spec in memory

repo: ruvnet/ruflo

热度

GitHub 星标
81k
排名
#1697
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能