sparc-spec — скилл для Claude Code: что делает и как ставить
Прогоняет первую фазу SPARC: собирает требования, критерии приёмки и ограничения, затем складывает спеку в память ruflo. Пригодится, когда фичу надо описать до первой строки кода.
npx skills add ruvnet/ruflo --skill sparc-spec -a claude-codeЧто делает sparc-spec
Скилл ведёт фазу спецификации. Агент разбирает описание фичи вместе с кодовой базой, выписывает функциональные и нефункциональные требования, точки интеграции и данные, которые фича читает или меняет. Потом даёт минимум три критерия приёмки в формате Given/When/Then и минимум три краевых случая — про невалидный ввод, конкурентный доступ и падение внешних зависимостей.
Внутри не магия, а вызовы MCP-инструментов ruflo. Скилл запускает траекторию, ищет похожие прошлые спеки через neural_predict, проверяет наличие работы по ключу current-phase-{feature-slug} в неймспейсе sparc-state. Готовый документ уходит в неймспейс sparc-phases под ключом spec-{feature-slug}, поэтому спека переживает перезапуск сессии.
Работает это, пока подключён MCP-сервер ruflo: без его инструментов памяти и задач шаги сохранения выполнять нечем. В конце скилл печатает документ таблицей и предлагает пройти гейт командой /ruflo-sparc:ruflo-sparc advance — дальше начинается псевдокод. Перед большой фичей стоит убедиться, что сервер поднят.
Какие задачи решает
- собрать требования к фиче до того, как написан код
- зафиксировать критерии приёмки в формате Given/When/Then
- перечислить ограничения по производительности и безопасности
- найти краевые случаи и сценарии отказа внешних зависимостей
- сохранить спеку в память, чтобы вернуться к ней в новой сессии
Примеры запросов агенту
- Прогони фазу спецификации SPARC для фичи `<feature-description>` — экспорт отчёта в PDF
- sparc-spec: добавь вход через OAuth, собери требования, критерии приёмки и ограничения
- Сохрани спеку в `sparc-phases` под ключом `spec-export-report` и покажи её таблицей
Как установить sparc-spec
1Через Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill sparc-spec -a claude-code2Вручную: положить файлы
~/.claude/skills/sparc-spec/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/sparc-spec/
1Через Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill sparc-spec -a codex2Вручную: положить файлы
.agents/skills/sparc-spec/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill sparc-spec -a cursor2Вручную: положить файлы
.cursor/skills/sparc-spec/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install ruvnet/ruflo sparc-spec2Вручную: положить файлы
.github/skills/sparc-spec/SKILL.md1Через Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill sparc-spec -a gemini-cli2Командой платформы
gemini skills install https://github.com/ruvnet/ruflo --path plugins/ruflo-sparc/skills/sparc-specВручную: положить файлы
.devin/skills/sparc-spec/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill sparc-spec -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
Из того же набора104
Весь набор →Похожие
Вопросы о sparc-spec
Как установить sparc-spec в Claude Code?
Выполните npx skills add ruvnet/ruflo --skill sparc-spec -a claude-code. После этого файл скилла лежит по пути ~/.claude/skills/sparc-spec/SKILL.md.
Что делает sparc-spec?
Проводит первую фазу методологии SPARC: требования, критерии приёмки, ограничения, краевые случаи и точки интеграции, после чего сохраняет спеку в память ruflo.
Что нужно, чтобы скилл заработал?
Подключённый MCP-сервер ruflo с инструментами памяти, задач и траекторий. Без них скилл не сможет ни проверить прошлую работу, ни записать готовую спеку.
Исходный текст
SKILL.md · MIT
---
name: sparc-spec
description: Run the SPARC Specification phase — gather requirements, define acceptance criteria, identify constraints, and store the spec in memory
argument-hint: "<feature-description>"
allowed-tools: mcp__plugin_ruflo-core_ruflo__memory_store mcp__plugin_ruflo-core_ruflo__memory_search mcp__plugin_ruflo-core_ruflo__memory_retrieve mcp__plugin_ruflo-core_ruflo__task_create mcp__plugin_ruflo-core_ruflo__task_update mcp__plugin_ruflo-core_ruflo__task_complete mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-start mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-step mcp__plugin_ruflo-core_ruflo__neural_predict Bash Read Edit
---
# 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.
```
© ruvnet · MIT · ruvnet/ruflo