spec-writing
npx machina-cli add skill athola/claude-night-market/spec-writing --openclawSpec Writing
Overview
Create clear, complete, and testable specifications from natural language feature descriptions. Specifications focus on user value and business needs, avoiding implementation details.
When To Use
- Creating new feature specifications
- Refining existing specifications
- Writing user stories and acceptance criteria
- Defining success criteria
When NOT To Use
- Generating implementation tasks - use task-planning
Core Principles
Focus on user value and business needs rather than implementation details. Avoid specifying technology choices in requirement definitions unless strictly necessary. Ensure every requirement is testable and verifiable with measurable criteria. Limit clarification markers; make informed assumptions based on industry standards and document them explicitly.
Specification Structure
Mandatory Sections
- Overview/Context: What problem does this solve?
- User Scenarios: Who uses it and how?
- Functional Requirements: What must it do?
- Success Criteria: How do we know it works?
Optional Sections
- Non-Functional Requirements (when performance/security critical)
- Edge Cases (when special handling needed)
- Dependencies (when external systems involved)
- Assumptions (when decisions made with incomplete info)
See: modules/specification-structure.md for detailed templates and guidelines
Quality Checklist
- No implementation details present
- Requirements are testable and unambiguous
- Success criteria are measurable
- User scenarios cover primary flows
- Edge cases identified
- Scope clearly bounded
Success Criteria Quick Reference
Good (User-focused, Measurable, Technology-agnostic)
- "Users complete checkout in under 3 minutes"
- "System supports 10,000 concurrent users"
- "95% of searches return results in under 1 second"
Bad (Implementation-focused, Internal metrics)
- "API response time under 200ms" -> Use: "Pages load in under 2 seconds"
- "Redis cache hit rate above 80%" -> Use: "Frequently accessed data loads with no noticeable delay"
- "React components render efficiently" -> Use: "UI updates appear with no visible frame drops"
See: modules/success-criteria-patterns.md for detailed examples and conversion process
Related Skills
speckit-orchestrator: Workflow coordinationtask-planning: Converting specs to tasks
Troubleshooting
Common Issues
If specifications are too vague, use the success-criteria-patterns module to enforce measurable outcomes. If implementation details leak into specs, review against the "Core Principles" and refactor to focus on user behavior.
Source
git clone https://github.com/athola/claude-night-market/blob/master/plugins/spec-kit/skills/spec-writing/SKILL.mdView on GitHub Overview
Spec-writing converts natural-language feature descriptions into clear, testable specifications. It centers on user value and business needs while avoiding implementation details. It defines measurable success criteria, user scenarios, acceptance criteria, and optional non-functional, edge-case, and dependency considerations.
How This Skill Works
Start with an Overview/Context and User Scenarios, then define Functional Requirements and Success Criteria that are testable. Requirements should be technology-agnostic and free of unnecessary implementation details; document assumptions and dependencies as needed. Use the structured approach from the Specification Structure module and align with measurable criteria.
When to Use It
- Creating new feature specifications
- Refining and updating existing specifications
- Writing user stories and acceptance criteria
- Defining success criteria with measurable outcomes
- Documenting edge cases, dependencies, and assumptions when needed
Quick Start
- Step 1: Gather the natural-language feature description and identify user value
- Step 2: Draft Overview, User Scenarios, Functional Requirements, and Success Criteria that are testable
- Step 3: Review for core principles, add non-functional/edge-case sections if needed, and finalize
Best Practices
- No implementation details present
- Requirements are testable and unambiguous
- Success criteria are measurable
- User scenarios cover primary flows
- Edge cases and scope boundaries are clearly documented
Example Use Cases
- Checkout flow where users complete checkout in under 3 minutes with 95% success rate
- Search results return within 1 second for 90% of queries
- System supports 10,000 concurrent users with <2s page loads on critical paths
- Feature works across desktop and mobile with consistent UX
- Failure paths documented when external dependencies are unavailable