Specification Writing Skill
Purpose
This skill provides guidance for creating feature specifications in the Spec-Driven Development process.
Project Phases Structure
The project is organized into 5 distinct phases:
- Phase 01: Todo In-Memory Python Console App
- Phase 02: Todo Full-Stack Web Application
- Phase 03: Todo AI Chatbot
- Phase 04: Local Kubernetes Deployment
- Phase 05: Advanced Cloud Deployment
Specifications Folder Structure
specs/
āāā phase-01/
ā āāā 001-<feature-name>/
ā ā āāā spec.md
ā āāā 002-<feature-name>/
ā āāā spec.md
āāā phase-02/
ā āāā 001-<feature-name>/
ā āāā spec.md
āāā phase-03/
ā āāā 001-<feature-name>/
ā āāā spec.md
āāā phase-04/
ā āāā 001-<feature-name>/
ā āāā spec.md
āāā phase-05/
āāā 001-<feature-name>/
āāā spec.md
Feature Specification Format
Each feature specification includes:
- Feature title and metadata
- User scenarios & testing (with priorities P1-P4)
- Functional requirements (FR-001 to FR-nn)
- Key entities
- Success criteria
PHR Structure
Prompt History Records are stored in:
history/prompts/
āāā phase-01/
ā āāā 001-todo-app/
ā ā āāā <ID>-<slug>.<stage>.prompt.md
ā āāā 002-<feature-name>/
ā āāā <ID>-<slug>.<stage>.prompt.md
āāā phase-02/
ā āāā 001-<feature-name>/
ā ā āāā <ID>-<slug>.<stage>.prompt.md
ā āāā 002-<feature-name>/
ā āāā <ID>-<slug>.<stage>.prompt.md
āāā general/
āāā <ID>-<slug>.general.prompt.md
Naming Convention
- Feature branches:
{###}-{feature-name} (e.g., 001-todo-app)
- Spec directories:
phase-{nn}/{###}-{feature-name} (e.g., phase-01/001-todo-app)
- PHR files:
{ID}-{slug}.{stage}.prompt.md (e.g., 1-todo-app-created.spec.prompt.md)
Best Practices
- Prioritize user stories with clear P1-P4 priorities
- Define clear acceptance scenarios with Given/When/Then format
- Document functional requirements with specific capabilities
- Consider edge cases and error handling
- Define measurable success criteria