Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 09:06:46 +08:00
commit 867df4fed0
20 changed files with 4979 additions and 0 deletions

55
commands/spec/create.md Normal file
View File

@@ -0,0 +1,55 @@
---
description: Create new feature specification
---
Activate the `spec-driven-planning` skill to execute Phase 1 (Feature Creation).
**Instructions:**
1. Extract feature name from $ARGUMENTS
- If $ARGUMENTS provided: Use it as the feature name
- If $ARGUMENTS empty: Ask user "What feature would you like to create?"
2. Use the Skill tool to invoke: `dev-workflow:spec-driven-planning`
3. Tell the skill:
"Create a new feature called [feature-name]. Execute Phase 1 (Feature Creation):
- Check existing features in docx/features/
- Create directory structure: docx/features/[NN-feature-name]/
- Copy all templates (requirements.md, design.md, tasks.md)
- Initialize with feature name
After creating the feature structure, ask if I'm ready to proceed with Phase 2 (Requirements Definition)."
**What Gets Created:**
The following files will be created with comprehensive templates:
1. **requirements.md** (135 lines)
- EARS format structure (Event, State, Ubiquitous, Conditional, Optional)
- Non-functional requirements (Performance, Security, Usability)
- Constraints, acceptance criteria, out-of-scope items
- Dependencies, risks, and assumptions
2. **design.md** (434 lines)
- Architecture overview and system context
- Component structure with interfaces
- Data flow diagrams and API contracts
- Error handling, security, and performance strategies
- Testing strategy and deployment plan
3. **tasks.md** (427 lines)
- TDD task breakdown (Red-Green-Refactor cycles)
- Integration, error handling, and performance tasks
- Documentation and quality assurance tasks
- Progress tracking with checkboxes
**After creation, show the user:**
```
✅ Created: docx/features/[NN-feature-name]/
- requirements.md (ready to fill in)
- design.md (ready to fill in)
- tasks.md (ready to fill in)
📋 Next: Define requirements using /dev-workflow:spec:requirements
```

26
commands/spec/design.md Normal file
View File

@@ -0,0 +1,26 @@
---
description: Generate technical design
---
Activate the `spec-driven-planning` skill to execute Phase 3 (Technical Design).
**Instructions:**
1. Determine target feature:
- If $ARGUMENTS provided: Use it as feature name/number
- If $ARGUMENTS empty: Find most recent feature in docx/features/
2. Use the Skill tool to invoke: `dev-workflow:spec-driven-planning`
3. Tell the skill:
"Execute Phase 3 (Technical Design) for feature [feature-name]:
- Read requirements from docx/features/[NN-feature-name]/requirements.md
- Propose 2-3 architectural approaches with trade-offs
- Recommend best approach with reasoning
- Update docx/features/[NN-feature-name]/design.md with comprehensive design
After design is complete, ask if I'm ready to proceed with Phase 4 (Task Breakdown)."
**Expected Outcome:**
- design.md populated with architecture, components, data flow, and API contracts
- User prompted for next phase

29
commands/spec/execute.md Normal file
View File

@@ -0,0 +1,29 @@
---
description: Execute implementation with TDD
---
Activate the `spec-driven-implementation` skill to execute Phase 5 (Execution).
**Instructions:**
1. Determine target feature:
- If $ARGUMENTS provided: Use it as feature name/number
- If $ARGUMENTS empty: Find most recent feature in docx/features/
2. Use the Skill tool to invoke: `dev-workflow:spec-driven-implementation`
3. Tell the skill:
"Execute Phase 5 (Implementation) for feature [feature-name]:
- Read tasks from docx/features/[NN-feature-name]/tasks.md
- Execute tasks systematically following TDD (Red-Green-Refactor)
- Update checkboxes as tasks complete
- Integrate with code-quality and git-workflow skills
- Run quality gates before marking tasks complete
Work through all tasks until feature is complete."
**Expected Outcome:**
- All tasks executed with TDD discipline
- Checkboxes updated in tasks.md
- Code quality verified
- Feature implementation complete

14
commands/spec/list.md Normal file
View File

@@ -0,0 +1,14 @@
---
description: List all features with status
---
List all features in `docx/features/` directory with their current status:
1. Find all feature directories: `docx/features/[NN-feature-name]/`
2. For each feature, show:
- Feature number and name
- Completion status (✅ Complete, 🔄 In Progress, ⏳ Not Started)
- Files present: requirements.md, design.md, tasks.md
- Task progress if tasks.md exists: X/Y tasks complete
Format as table or bulleted list.

View File

@@ -0,0 +1,25 @@
---
description: Define requirements using EARS format
---
Activate the `spec-driven-planning` skill to execute Phase 2 (Requirements Definition).
**Instructions:**
1. Determine target feature:
- If $ARGUMENTS provided: Use it as feature name/number
- If $ARGUMENTS empty: Find most recent feature in docx/features/
2. Use the Skill tool to invoke: `dev-workflow:spec-driven-planning`
3. Tell the skill:
"Execute Phase 2 (Requirements Definition) for feature [feature-name]:
- Use EARS format for all requirements
- Ask systematic questions to elicit clear requirements
- Update docx/features/[NN-feature-name]/requirements.md
After requirements are complete, ask if I'm ready to proceed with Phase 3 (Design)."
**Expected Outcome:**
- requirements.md populated with EARS-formatted requirements
- User prompted for next phase

26
commands/spec/tasks.md Normal file
View File

@@ -0,0 +1,26 @@
---
description: Break down design into TDD tasks
---
Activate the `spec-driven-implementation` skill to execute Phase 4 (Task Breakdown).
**Instructions:**
1. Determine target feature:
- If $ARGUMENTS provided: Use it as feature name/number
- If $ARGUMENTS empty: Find most recent feature in docx/features/
2. Use the Skill tool to invoke: `dev-workflow:spec-driven-implementation`
3. Tell the skill:
"Execute Phase 4 (Task Breakdown) for feature [feature-name]:
- Read design from docx/features/[NN-feature-name]/design.md
- Break down into TDD tasks following Red-Green-Refactor cycle
- Create checkbox list for tracking progress
- Update docx/features/[NN-feature-name]/tasks.md
After tasks are defined, ask if I'm ready to proceed with Phase 5 (Execution)."
**Expected Outcome:**
- tasks.md populated with TDD task breakdown and checkboxes
- User prompted for execution phase