sp2-verify-1770324218/.claude/commands/spec-feature.md
jordan 160675237a
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/manual/woodpecker Pipeline was successful
Initialize project from skeleton template
2026-02-05 20:43:39 +00:00

1.9 KiB

description argument-hint allowed-tools
Create a feature specification document <feature-slug> Bash, Read, Write, Edit, Glob, Grep

Create a specification for feature: $ARGUMENTS

Instructions

1. Load Feature Context

sdlc feature show $ARGUMENTS --json

Parse the output to understand the feature current phase, metadata, and any existing artifacts.

2. Check for Existing Spec

Read .sdlc/features/$ARGUMENTS/spec.md if it exists. If a draft already exists, build on it rather than starting from scratch.

3. Gather Codebase Context

Search the codebase for patterns, modules, and systems relevant to this feature. Understand what exists before specifying what should change.

4. Write the Specification

Write to .sdlc/features/$ARGUMENTS/spec.md with this structure:

# Feature: [Title]

## Problem Statement
[What problem does this solve? Who has this problem?]

## User Stories
- As a [role], I want [capability] so that [benefit]

## Acceptance Criteria
- [ ] [Criterion 1 - testable, specific]
- [ ] [Criterion 2]
- [ ] [Criterion N]

## Technical Constraints
[Platform limits, API compatibility, performance requirements]

## Dependencies
[What must exist or be true before this can be built]

## Out of Scope
[Explicitly excluded from this feature]

## Open Questions
[Unresolved decisions that need input]

5. Register the Artifact

sdlc artifact create $ARGUMENTS spec

The classifier will detect the spec exists and determine the next action (typically awaiting approval).

6. Report

Summarize what was specified, list acceptance criteria count, and note any open questions that need human input.

Critical Rules

  • NEVER skip loading feature context first
  • ALWAYS include acceptance criteria -- they drive QA later
  • NEVER approve your own spec -- it requires human approval
  • ALWAYS list open questions rather than making assumptions
  • ALWAYS search the codebase before writing constraints