协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
skill-007【开发与工程】Create feature specification from natural language description. Use when starting a new feature or creating a spec. Triggers on: create spec, specify feature, new feature spec.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Create structured feature specifications from natural language descriptions.
This skill is Step 1 of 6 in the Relentless workflow:
specify → plan → tasks → analyze → implement (task by task) or relentless run --feature [FEATURE NAME] --tui
What flows to next step:
The specification MUST include testable acceptance criteria:
All acceptance criteria must be written in Given/When/Then format to enable direct test implementation.
relentless/features/NNN-feature-name/spec.mdAsk the user these specific questions:
goodyesautoRecord the answer in spec.md metadata:
**Routing Preference**: auto: good | allow free: yes
<!-- Options: auto: free|cheap|good|genius | allow free: yes|no | OR specific: harness/model -->
Run the create-new-feature script to set up the branch and directory:
.claude/skills/specify/scripts/bash/create-new-feature.sh --json "FEATURE_DESCRIPTION"
This will output JSON with:
BRANCH_NAME: e.g., "003-user-auth"SPEC_FILE: Full path to spec.mdFEATURE_DIR: Full path to feature directoryFEATURE_NUM: e.g., "003"Important: Parse this JSON and use these paths for all subsequent operations.
relentless/constitution.md for project governanceUsing the template at templates/spec.md, create a specification with:
1. Feature Overview
2. User Scenarios & Testing
3. Functional Requirements
4. Test Strategy (MANDATORY)
5. Success Criteria
6. Key Entities (if applicable)
7. Dependencies & Assumptions
8. Out of Scope
If aspects are unclear:
[NEEDS CLARIFICATION: specific question] if:
If clarifications needed, present to user:
## Clarification Needed
**Q1: [Topic]**
Context: [Quote spec section]
Question: [Specific question]
Options:
A. [Option 1] - [Implications]
B. [Option 2] - [Implications]
C. Custom - [Your answer]
Your choice: _
Check the specification against:
[NEEDS CLARIFICATION] markersIf validation fails, revise and re-check (max 3 iterations).
Write complete specification to SPEC_FILE from JSON output
Create progress.txt if it doesn't exist:
---
feature: FEATURE_NAME
started: DATE
last_updated: DATE
stories_completed: 0
routing_preference: [auto: mode | allow free: yes/no]
---
# Progress Log: FEATURE_NAME
Report to user:
BRANCH_NAMESPEC_FILE/relentless.plan or /relentless.clarify# Feature: User Authentication
**Routing Preference**: auto: good | allow free: yes
## Overview
Enable users to create accounts and log in securely using email/password.
## User Scenarios
### User Story 1: New User Registration (Priority: P1)
User visits signup page, enters email and password, and creates an account.
**Why this priority**: Core functionality, blocks all other auth features.
**Independent Test**: Can be fully tested by registering a new account and verifying the account exists.
**Acceptance Scenarios**:
1. **Given** a visitor on the signup page, **When** they submit valid email and password, **Then** the account is created and confirmation email sent
2. **Given** an email already in use, **When** visitor tries to register, **Then** error message shown without revealing account exists
## Functional Requirements
**REQ-1:** System must validate email format
**REQ-2:** System must require passwords ≥ 8 characters
**REQ-3:** System must send confirmation email within 1 minute
**REQ-4:** System must hash passwords before storage
## Test Strategy (MANDATORY)
### Unit Test Approach
- Email validation logic
- Password strength validation
- Password hashing utility
### Integration Test Scenarios
- Full registration flow (submit form → create account → send email)
- Duplicate email rejection
### Edge Case Tests
- Invalid email formats (missing @, invalid domain)
- Password too short
- Unicode in email/password
### Test Data Requirements
- Valid test email addresses
- Various invalid email formats
- Password examples at boundary conditions
## Success Criteria
1. 95% of signups complete within 60 seconds
2. Zero plaintext passwords in database
3. Email confirmation rate > 80%
## Key Entities
**User**
- email: string (unique)
- password_hash: string
- confirmed: boolean
- created_at: timestamp
## Dependencies
- Email service provider (e.g., SendGrid, Mailgun)
- Session management system
## Out of Scope
- Social login (OAuth)
- Two-factor authentication
- Password reset (separate feature)