specsmd 0.0.0-dev.21 → 0.0.0-dev.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/flows/aidlc/commands/construction-agent.md +1 -1
- package/flows/aidlc/memory-bank.yaml +2 -1
- package/flows/aidlc/skills/construction/bolt-list.md +1 -1
- package/flows/aidlc/skills/construction/bolt-status.md +1 -1
- package/flows/aidlc/skills/master/analyze-context.md +1 -1
- package/flows/aidlc/templates/construction/bolt-template.md +2 -2
- package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt.md +69 -11
- package/flows/aidlc/templates/standards/decision-index-template.md +32 -0
- package/flows/simple/README.md +178 -0
- package/flows/simple/agents/agent.md +134 -0
- package/flows/simple/commands/agent.md +56 -0
- package/flows/simple/context-config.yaml +34 -0
- package/flows/simple/memory-bank.yaml +66 -0
- package/flows/simple/skills/design.md +94 -0
- package/flows/simple/skills/execute.md +130 -0
- package/flows/simple/skills/requirements.md +94 -0
- package/flows/simple/skills/tasks.md +118 -0
- package/flows/simple/templates/design-template.md +133 -0
- package/flows/simple/templates/requirements-template.md +73 -0
- package/flows/simple/templates/tasks-template.md +95 -0
- package/package.json +1 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Memory Bank Configuration for Simple Flow
|
|
2
|
+
# Spec-driven development inspired by Amazon Kiro
|
|
3
|
+
# Defines the directory structure for spec artifacts
|
|
4
|
+
|
|
5
|
+
# Structure created at project initialization
|
|
6
|
+
structure:
|
|
7
|
+
- path: specs/
|
|
8
|
+
description: "Feature specifications (requirements, design, tasks)"
|
|
9
|
+
|
|
10
|
+
# Dynamic structure (created per feature)
|
|
11
|
+
# - specs/{feature-name}/requirements.md → Phase 1: Requirements
|
|
12
|
+
# - specs/{feature-name}/design.md → Phase 2: Design
|
|
13
|
+
# - specs/{feature-name}/tasks.md → Phase 3: Tasks
|
|
14
|
+
|
|
15
|
+
# Naming Conventions
|
|
16
|
+
naming:
|
|
17
|
+
features:
|
|
18
|
+
format: "{feature-name}"
|
|
19
|
+
example: "todo-app"
|
|
20
|
+
note: "kebab-case derived from feature idea"
|
|
21
|
+
rules:
|
|
22
|
+
- "Lowercase only"
|
|
23
|
+
- "Spaces become hyphens"
|
|
24
|
+
- "Remove special characters except hyphens"
|
|
25
|
+
- "No consecutive hyphens"
|
|
26
|
+
- "2-4 words maximum"
|
|
27
|
+
|
|
28
|
+
# Schema Definition (Source of Truth for Agent)
|
|
29
|
+
schema:
|
|
30
|
+
specs: "memory-bank/specs/{feature-name}/"
|
|
31
|
+
requirements: "memory-bank/specs/{feature-name}/requirements.md"
|
|
32
|
+
design: "memory-bank/specs/{feature-name}/design.md"
|
|
33
|
+
tasks: "memory-bank/specs/{feature-name}/tasks.md"
|
|
34
|
+
|
|
35
|
+
# Workflow Configuration
|
|
36
|
+
workflow:
|
|
37
|
+
phases:
|
|
38
|
+
- name: requirements
|
|
39
|
+
file: requirements.md
|
|
40
|
+
next: design
|
|
41
|
+
approval_prompt: "Do the requirements look good? If so, we can move on to the design."
|
|
42
|
+
- name: design
|
|
43
|
+
file: design.md
|
|
44
|
+
next: tasks
|
|
45
|
+
approval_prompt: "Does the design look good? If so, we can move on to the implementation plan."
|
|
46
|
+
- name: tasks
|
|
47
|
+
file: tasks.md
|
|
48
|
+
next: null
|
|
49
|
+
approval_prompt: "Do the tasks look good?"
|
|
50
|
+
|
|
51
|
+
# State detection rules
|
|
52
|
+
state_detection:
|
|
53
|
+
NEW: "No spec directory exists"
|
|
54
|
+
REQUIREMENTS_PENDING: "Directory exists but no requirements.md"
|
|
55
|
+
DESIGN_PENDING: "requirements.md exists but no design.md"
|
|
56
|
+
TASKS_PENDING: "design.md exists but no tasks.md"
|
|
57
|
+
COMPLETE: "All three files exist"
|
|
58
|
+
EXECUTE: "All files exist and user requests task execution"
|
|
59
|
+
|
|
60
|
+
# Agent Ownership
|
|
61
|
+
ownership:
|
|
62
|
+
spec-agent:
|
|
63
|
+
- specs
|
|
64
|
+
- requirements
|
|
65
|
+
- design
|
|
66
|
+
- tasks
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Skill: Generate Design
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Generate a technical design document based on approved requirements. This is Phase 2 of the spec-driven development workflow.
|
|
6
|
+
|
|
7
|
+
## Preconditions
|
|
8
|
+
|
|
9
|
+
- `requirements.md` exists for this feature
|
|
10
|
+
- User has explicitly approved the requirements
|
|
11
|
+
|
|
12
|
+
## Trigger Conditions
|
|
13
|
+
|
|
14
|
+
- Requirements phase completed and approved
|
|
15
|
+
- User requests updates to existing design
|
|
16
|
+
- User provides feedback on design document
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
### Initial Generation
|
|
21
|
+
|
|
22
|
+
1. **Read requirements** from `memory-bank/specs/{feature}/requirements.md`
|
|
23
|
+
2. **Research codebase** if needed:
|
|
24
|
+
- Identify existing patterns and conventions
|
|
25
|
+
- Check tech stack from `memory-bank/standards/` if available
|
|
26
|
+
- Look for similar implementations to reference
|
|
27
|
+
3. **Generate design.md** following the template:
|
|
28
|
+
- Overview (solution approach, tech decisions)
|
|
29
|
+
- Architecture (Mermaid diagram)
|
|
30
|
+
- Components and Interfaces
|
|
31
|
+
- Data Models (with validation rules)
|
|
32
|
+
- Error Handling (recovery strategies)
|
|
33
|
+
- Testing Strategy
|
|
34
|
+
4. **Write file** to `memory-bank/specs/{feature}/design.md`
|
|
35
|
+
5. **Ask for approval**: "Does the design look good? If so, we can move on to the implementation plan."
|
|
36
|
+
|
|
37
|
+
### Update Flow
|
|
38
|
+
|
|
39
|
+
1. **Read existing** `design.md` and `requirements.md`
|
|
40
|
+
2. **Apply user feedback** - modify specific sections
|
|
41
|
+
3. **Write updated file**
|
|
42
|
+
4. **Ask for approval again**
|
|
43
|
+
|
|
44
|
+
## Critical Rules
|
|
45
|
+
|
|
46
|
+
1. **Design MUST address ALL requirements**
|
|
47
|
+
- Every requirement from Phase 1 should be covered
|
|
48
|
+
- Trace design decisions back to requirements
|
|
49
|
+
|
|
50
|
+
2. **Include Architecture Diagram**
|
|
51
|
+
- Use Mermaid syntax for diagrams
|
|
52
|
+
- Show component relationships and data flow
|
|
53
|
+
|
|
54
|
+
3. **Define Clear Interfaces**
|
|
55
|
+
- Use TypeScript-like syntax for interface definitions
|
|
56
|
+
- Include method signatures with types
|
|
57
|
+
|
|
58
|
+
4. **Error Handling is Mandatory**
|
|
59
|
+
- Define error types and conditions
|
|
60
|
+
- Specify recovery strategies
|
|
61
|
+
|
|
62
|
+
5. **Approval Gate**
|
|
63
|
+
- Do NOT proceed to Tasks phase without explicit approval
|
|
64
|
+
- If gaps found, may return to Requirements phase
|
|
65
|
+
|
|
66
|
+
## Output
|
|
67
|
+
|
|
68
|
+
- **File**: `memory-bank/specs/{feature-name}/design.md`
|
|
69
|
+
- **Approval Prompt**: "Does the design look good? If so, we can move on to the implementation plan."
|
|
70
|
+
|
|
71
|
+
## Design Sections Checklist
|
|
72
|
+
|
|
73
|
+
- [ ] Overview (3-5 sentences)
|
|
74
|
+
- [ ] Architecture diagram (Mermaid)
|
|
75
|
+
- [ ] Architectural principles (2-4 bullet points)
|
|
76
|
+
- [ ] Components and interfaces (all major classes/modules)
|
|
77
|
+
- [ ] Data models (with TypeScript interfaces)
|
|
78
|
+
- [ ] Validation rules (per field)
|
|
79
|
+
- [ ] Error handling (by category)
|
|
80
|
+
- [ ] Recovery strategies
|
|
81
|
+
- [ ] Testing strategy (unit + integration)
|
|
82
|
+
|
|
83
|
+
## Phase Transitions
|
|
84
|
+
|
|
85
|
+
**Backward**: If user identifies missing requirements:
|
|
86
|
+
- "Let's go back to requirements to add [X]"
|
|
87
|
+
- Return to requirements skill, update, get approval, then return here
|
|
88
|
+
|
|
89
|
+
**Forward**: On explicit approval:
|
|
90
|
+
- Proceed to tasks skill to generate implementation plan
|
|
91
|
+
|
|
92
|
+
## Template Reference
|
|
93
|
+
|
|
94
|
+
See `.specsmd/simple/templates/design-template.md` for full template structure.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Skill: Execute Tasks
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Execute implementation tasks from an approved tasks.md file. This is the post-spec execution phase.
|
|
6
|
+
|
|
7
|
+
## Preconditions
|
|
8
|
+
|
|
9
|
+
- All three spec files exist:
|
|
10
|
+
- `memory-bank/specs/{feature}/requirements.md`
|
|
11
|
+
- `memory-bank/specs/{feature}/design.md`
|
|
12
|
+
- `memory-bank/specs/{feature}/tasks.md`
|
|
13
|
+
- Tasks have been approved by user
|
|
14
|
+
|
|
15
|
+
## Trigger Conditions
|
|
16
|
+
|
|
17
|
+
- User requests to execute a specific task
|
|
18
|
+
- User asks "what's next" or to continue implementation
|
|
19
|
+
- User references the spec and asks to implement
|
|
20
|
+
|
|
21
|
+
## Workflow
|
|
22
|
+
|
|
23
|
+
### Before ANY Task Execution
|
|
24
|
+
|
|
25
|
+
1. **ALWAYS read ALL three spec files**:
|
|
26
|
+
- requirements.md - Understand what to build
|
|
27
|
+
- design.md - Understand how to build it
|
|
28
|
+
- tasks.md - Understand current progress
|
|
29
|
+
2. **Parse tasks.md** to identify:
|
|
30
|
+
- Completed tasks `- [x]`
|
|
31
|
+
- Pending tasks `- [ ]`
|
|
32
|
+
- Next logical task to execute
|
|
33
|
+
|
|
34
|
+
### Task Selection
|
|
35
|
+
|
|
36
|
+
If user specifies a task:
|
|
37
|
+
- Execute that specific task
|
|
38
|
+
|
|
39
|
+
If user asks for recommendation:
|
|
40
|
+
- Find first unchecked task that has all prerequisites completed
|
|
41
|
+
- Recommend it to user for confirmation
|
|
42
|
+
|
|
43
|
+
### Task Execution
|
|
44
|
+
|
|
45
|
+
1. **Read task details**:
|
|
46
|
+
- Task description and sub-bullets
|
|
47
|
+
- Requirement references
|
|
48
|
+
2. **Review relevant design sections**:
|
|
49
|
+
- Components mentioned
|
|
50
|
+
- Interfaces to implement
|
|
51
|
+
- Data models involved
|
|
52
|
+
3. **Implement the task**:
|
|
53
|
+
- Write/modify code as needed
|
|
54
|
+
- Follow design specifications
|
|
55
|
+
- Match coding standards if defined
|
|
56
|
+
4. **Mark task complete**:
|
|
57
|
+
- Update tasks.md: `- [ ]` → `- [x]`
|
|
58
|
+
5. **STOP and wait for user review**
|
|
59
|
+
|
|
60
|
+
## Critical Rules
|
|
61
|
+
|
|
62
|
+
1. **ONE TASK AT A TIME**
|
|
63
|
+
- Execute only the single requested task
|
|
64
|
+
- Never automatically proceed to next task
|
|
65
|
+
- Always stop for user review
|
|
66
|
+
|
|
67
|
+
2. **READ ALL SPECS FIRST**
|
|
68
|
+
- Never execute without reading requirements + design + tasks
|
|
69
|
+
- Context from all three files is essential
|
|
70
|
+
|
|
71
|
+
3. **VERIFY AGAINST REQUIREMENTS**
|
|
72
|
+
- Implementation must satisfy referenced requirements
|
|
73
|
+
- Check acceptance criteria are met
|
|
74
|
+
|
|
75
|
+
4. **UPDATE TASK STATUS**
|
|
76
|
+
- Mark task `[x]` only when truly complete
|
|
77
|
+
- If blocked, leave unchecked and explain
|
|
78
|
+
|
|
79
|
+
5. **WAIT FOR USER**
|
|
80
|
+
- After completing task, pause
|
|
81
|
+
- User decides when to continue
|
|
82
|
+
- Do NOT auto-advance
|
|
83
|
+
|
|
84
|
+
## Output
|
|
85
|
+
|
|
86
|
+
After task completion:
|
|
87
|
+
```
|
|
88
|
+
Task [X.Y] complete: [Task description]
|
|
89
|
+
|
|
90
|
+
Changes made:
|
|
91
|
+
- [File 1]: [What was done]
|
|
92
|
+
- [File 2]: [What was done]
|
|
93
|
+
|
|
94
|
+
The task satisfies requirements: [X.Y, X.Z]
|
|
95
|
+
|
|
96
|
+
Ready for the next task? Or would you like to review the changes first?
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Task Execution Checklist
|
|
100
|
+
|
|
101
|
+
Before executing:
|
|
102
|
+
- [ ] Read requirements.md
|
|
103
|
+
- [ ] Read design.md
|
|
104
|
+
- [ ] Read tasks.md
|
|
105
|
+
- [ ] Identify specific task to execute
|
|
106
|
+
- [ ] Review requirement references
|
|
107
|
+
- [ ] Review relevant design sections
|
|
108
|
+
|
|
109
|
+
After executing:
|
|
110
|
+
- [ ] Code changes complete
|
|
111
|
+
- [ ] Task marked `[x]` in tasks.md
|
|
112
|
+
- [ ] Summary provided to user
|
|
113
|
+
- [ ] STOPPED - waiting for user
|
|
114
|
+
|
|
115
|
+
## Handling Blocked Tasks
|
|
116
|
+
|
|
117
|
+
If task cannot be completed:
|
|
118
|
+
1. Do NOT mark as complete
|
|
119
|
+
2. Explain the blocker
|
|
120
|
+
3. Suggest resolution:
|
|
121
|
+
- Missing dependency → Execute prerequisite first
|
|
122
|
+
- Design gap → Return to design phase
|
|
123
|
+
- Requirement unclear → Return to requirements phase
|
|
124
|
+
|
|
125
|
+
## Sub-task Handling
|
|
126
|
+
|
|
127
|
+
For tasks with sub-tasks (e.g., 2.1, 2.2, 2.3):
|
|
128
|
+
- Execute sub-tasks in order
|
|
129
|
+
- Each sub-task is ONE execution
|
|
130
|
+
- Parent task (e.g., 2.) marked complete only when all sub-tasks done
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Skill: Generate Requirements
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Generate a requirements document for a feature using EARS (Easy Approach to Requirements Syntax) format. This is Phase 1 of the spec-driven development workflow.
|
|
6
|
+
|
|
7
|
+
## Trigger Conditions
|
|
8
|
+
|
|
9
|
+
- User provides a new feature idea
|
|
10
|
+
- User requests updates to existing requirements
|
|
11
|
+
- User provides feedback on requirements document
|
|
12
|
+
|
|
13
|
+
## Workflow
|
|
14
|
+
|
|
15
|
+
### Initial Generation (New Spec)
|
|
16
|
+
|
|
17
|
+
1. **Parse feature idea** from user input
|
|
18
|
+
2. **Derive feature name** in kebab-case (e.g., "user-authentication")
|
|
19
|
+
3. **Create directory** at `memory-bank/specs/{feature-name}/`
|
|
20
|
+
4. **Generate requirements.md** following the template:
|
|
21
|
+
- Introduction (2-3 sentences)
|
|
22
|
+
- Glossary (3-10 domain terms)
|
|
23
|
+
- Requirements (3-7 user stories with EARS acceptance criteria)
|
|
24
|
+
5. **Write file** to `memory-bank/specs/{feature-name}/requirements.md`
|
|
25
|
+
6. **Ask for approval**: "Do the requirements look good? If so, we can move on to the design."
|
|
26
|
+
|
|
27
|
+
### Update Flow (Existing Spec)
|
|
28
|
+
|
|
29
|
+
1. **Read existing** `requirements.md`
|
|
30
|
+
2. **Apply user feedback** - modify specific sections as requested
|
|
31
|
+
3. **Write updated file**
|
|
32
|
+
4. **Ask for approval again**
|
|
33
|
+
|
|
34
|
+
## Critical Rules
|
|
35
|
+
|
|
36
|
+
1. **Generate FIRST, ask questions LATER**
|
|
37
|
+
- Do NOT ask clarifying questions before generating
|
|
38
|
+
- Create a draft document as starting point for discussion
|
|
39
|
+
- User feedback refines the document iteratively
|
|
40
|
+
|
|
41
|
+
2. **EARS Format is Mandatory**
|
|
42
|
+
- Every acceptance criterion MUST use an EARS pattern
|
|
43
|
+
- Patterns: WHEN/THE SHALL, WHILE/THE SHALL, IF/THEN THE SHALL, WHERE/THE SHALL
|
|
44
|
+
|
|
45
|
+
3. **Approval Gate**
|
|
46
|
+
- Do NOT proceed to Design phase without explicit approval
|
|
47
|
+
- Approval keywords: "yes", "approved", "looks good", "let's continue", "move on"
|
|
48
|
+
- Any feedback = revise and ask again
|
|
49
|
+
|
|
50
|
+
4. **Glossary Consistency**
|
|
51
|
+
- Define system names and domain terms in glossary
|
|
52
|
+
- Use glossary terms consistently in acceptance criteria
|
|
53
|
+
|
|
54
|
+
## Output
|
|
55
|
+
|
|
56
|
+
- **File**: `memory-bank/specs/{feature-name}/requirements.md`
|
|
57
|
+
- **Approval Prompt**: "Do the requirements look good? If so, we can move on to the design."
|
|
58
|
+
|
|
59
|
+
## Example Generation
|
|
60
|
+
|
|
61
|
+
For input: "Create a todo app with local storage"
|
|
62
|
+
|
|
63
|
+
```markdown
|
|
64
|
+
# Requirements Document
|
|
65
|
+
|
|
66
|
+
## Introduction
|
|
67
|
+
|
|
68
|
+
A simple todo application that allows users to manage their daily tasks through a clean interface. The system enables users to add, view, complete, and remove tasks while maintaining data persistence across sessions using browser local storage.
|
|
69
|
+
|
|
70
|
+
## Glossary
|
|
71
|
+
|
|
72
|
+
- **Todo_System**: The complete todo application including user interface and data management
|
|
73
|
+
- **Task**: A single todo item with a description and completion status
|
|
74
|
+
- **Task_List**: The collection of all tasks managed by the system
|
|
75
|
+
- **Local_Storage**: Browser-based persistent storage mechanism
|
|
76
|
+
|
|
77
|
+
## Requirements
|
|
78
|
+
|
|
79
|
+
### Requirement 1
|
|
80
|
+
|
|
81
|
+
**User Story:** As a user, I want to add new tasks to my todo list, so that I can capture things I need to accomplish.
|
|
82
|
+
|
|
83
|
+
#### Acceptance Criteria
|
|
84
|
+
|
|
85
|
+
1. WHEN a user types a task description and presses Enter, THE Todo_System SHALL create a new task and add it to the Task_List
|
|
86
|
+
2. WHEN a user attempts to add an empty task, THE Todo_System SHALL prevent the addition and maintain the current state
|
|
87
|
+
3. WHEN a new task is added, THE Todo_System SHALL persist the task to Local_Storage immediately
|
|
88
|
+
|
|
89
|
+
[... continue with more requirements ...]
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Template Reference
|
|
93
|
+
|
|
94
|
+
See `.specsmd/simple/templates/requirements-template.md` for full template structure.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Skill: Generate Tasks
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Generate an implementation plan with coding tasks based on the approved design. This is Phase 3 of the spec-driven development workflow.
|
|
6
|
+
|
|
7
|
+
## Preconditions
|
|
8
|
+
|
|
9
|
+
- `requirements.md` exists and is approved
|
|
10
|
+
- `design.md` exists and is approved
|
|
11
|
+
|
|
12
|
+
## Trigger Conditions
|
|
13
|
+
|
|
14
|
+
- Design phase completed and approved
|
|
15
|
+
- User requests updates to existing tasks
|
|
16
|
+
- User provides feedback on tasks document
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
### Initial Generation
|
|
21
|
+
|
|
22
|
+
1. **Read both documents**:
|
|
23
|
+
- `memory-bank/specs/{feature}/requirements.md`
|
|
24
|
+
- `memory-bank/specs/{feature}/design.md`
|
|
25
|
+
2. **Convert design into tasks**:
|
|
26
|
+
- Create incremental coding steps
|
|
27
|
+
- Each task builds on previous
|
|
28
|
+
- Reference specific requirements
|
|
29
|
+
- Include test tasks (mark optional with *)
|
|
30
|
+
3. **Generate tasks.md** following the template:
|
|
31
|
+
- Numbered checkbox list
|
|
32
|
+
- Max 2 levels of hierarchy
|
|
33
|
+
- Requirement references for traceability
|
|
34
|
+
4. **Write file** to `memory-bank/specs/{feature}/tasks.md`
|
|
35
|
+
5. **Ask for approval**: "Do the tasks look good?"
|
|
36
|
+
|
|
37
|
+
### Update Flow
|
|
38
|
+
|
|
39
|
+
1. **Read all three** spec documents
|
|
40
|
+
2. **Apply user feedback** - add, remove, or modify tasks
|
|
41
|
+
3. **Write updated file**
|
|
42
|
+
4. **Ask for approval again**
|
|
43
|
+
|
|
44
|
+
## Critical Rules
|
|
45
|
+
|
|
46
|
+
1. **CODING TASKS ONLY**
|
|
47
|
+
- Write, modify, or test code
|
|
48
|
+
- NO deployment, user testing, documentation, performance gathering
|
|
49
|
+
|
|
50
|
+
2. **Requirement Traceability**
|
|
51
|
+
- Every task references requirement(s): `_Requirements: X.Y, X.Z_`
|
|
52
|
+
- Every requirement covered by at least one task
|
|
53
|
+
|
|
54
|
+
3. **Incremental Progress**
|
|
55
|
+
- Tasks build on previous tasks
|
|
56
|
+
- No orphaned code that isn't integrated
|
|
57
|
+
- Include "Checkpoint" tasks to verify tests pass
|
|
58
|
+
|
|
59
|
+
4. **Task Format**
|
|
60
|
+
- `- [ ]` for pending, `- [x]` for done
|
|
61
|
+
- `- [ ]*` for optional tasks
|
|
62
|
+
- Numbering: `1.`, `2.`, with sub-tasks `2.1`, `2.2`
|
|
63
|
+
|
|
64
|
+
5. **Approval Gate**
|
|
65
|
+
- Workflow COMPLETE when tasks approved
|
|
66
|
+
- Inform user they can now execute tasks
|
|
67
|
+
|
|
68
|
+
## Output
|
|
69
|
+
|
|
70
|
+
- **File**: `memory-bank/specs/{feature-name}/tasks.md`
|
|
71
|
+
- **Approval Prompt**: "Do the tasks look good?"
|
|
72
|
+
|
|
73
|
+
## Task Types (Include)
|
|
74
|
+
|
|
75
|
+
- Set up project structure
|
|
76
|
+
- Create interfaces/types
|
|
77
|
+
- Implement classes/modules
|
|
78
|
+
- Write unit tests
|
|
79
|
+
- Write integration tests
|
|
80
|
+
- Wire components together
|
|
81
|
+
- Checkpoint tasks (verify tests pass)
|
|
82
|
+
|
|
83
|
+
## Task Types (Exclude)
|
|
84
|
+
|
|
85
|
+
- User acceptance testing
|
|
86
|
+
- Deployment to any environment
|
|
87
|
+
- Performance metrics gathering
|
|
88
|
+
- User training or documentation
|
|
89
|
+
- Business process changes
|
|
90
|
+
- Marketing activities
|
|
91
|
+
- Running the app manually
|
|
92
|
+
|
|
93
|
+
## Completion Message
|
|
94
|
+
|
|
95
|
+
When tasks are approved:
|
|
96
|
+
```
|
|
97
|
+
The spec is complete. You now have:
|
|
98
|
+
- requirements.md - What to build
|
|
99
|
+
- design.md - How to build it
|
|
100
|
+
- tasks.md - Step-by-step implementation plan
|
|
101
|
+
|
|
102
|
+
You can start executing tasks by asking me to work on a specific task,
|
|
103
|
+
or I can recommend the next task to work on.
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Phase Transitions
|
|
107
|
+
|
|
108
|
+
**Backward**: If user identifies gaps:
|
|
109
|
+
- Design changes → Return to design skill
|
|
110
|
+
- Requirement changes → Return to requirements skill
|
|
111
|
+
|
|
112
|
+
**Forward**: On approval:
|
|
113
|
+
- Workflow complete
|
|
114
|
+
- User can now request task execution
|
|
115
|
+
|
|
116
|
+
## Template Reference
|
|
117
|
+
|
|
118
|
+
See `.specsmd/simple/templates/tasks-template.md` for full template structure.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Design Template
|
|
2
|
+
|
|
3
|
+
Use this template when generating design.md for a feature spec.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# [Feature Name] Design Document
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
[3-5 sentences describing the solution approach. Include:
|
|
13
|
+
- What technology stack will be used?
|
|
14
|
+
- What architectural style/pattern?
|
|
15
|
+
- Key design decisions and rationale
|
|
16
|
+
- How does this integrate with existing systems?]
|
|
17
|
+
|
|
18
|
+
## Architecture
|
|
19
|
+
|
|
20
|
+
[Include a diagram showing system components and their relationships]
|
|
21
|
+
|
|
22
|
+
```mermaid
|
|
23
|
+
graph TD
|
|
24
|
+
A[Component A] --> B[Component B]
|
|
25
|
+
A --> C[Component C]
|
|
26
|
+
B --> D[Data Store]
|
|
27
|
+
C --> D
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Key Architectural Principles:**
|
|
31
|
+
- [Principle 1: e.g., "Single responsibility per module"]
|
|
32
|
+
- [Principle 2: e.g., "Event-driven for loose coupling"]
|
|
33
|
+
- [Principle 3: e.g., "Immediate persistence on state change"]
|
|
34
|
+
|
|
35
|
+
## Components and Interfaces
|
|
36
|
+
|
|
37
|
+
### [ComponentName] Class/Module
|
|
38
|
+
|
|
39
|
+
[Brief description of component responsibility]
|
|
40
|
+
|
|
41
|
+
**Key Methods:**
|
|
42
|
+
- `methodName(param1: Type, param2: Type): ReturnType` - [Description]
|
|
43
|
+
- `methodName2(): ReturnType` - [Description]
|
|
44
|
+
|
|
45
|
+
### [InterfaceName] Interface
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
interface InterfaceName {
|
|
49
|
+
field1: string;
|
|
50
|
+
field2: number;
|
|
51
|
+
field3: boolean;
|
|
52
|
+
method1(param: Type): ReturnType;
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### [Additional components...]
|
|
57
|
+
|
|
58
|
+
## Data Models
|
|
59
|
+
|
|
60
|
+
### [EntityName] Entity
|
|
61
|
+
|
|
62
|
+
[Description of the entity and its role in the system]
|
|
63
|
+
|
|
64
|
+
```typescript
|
|
65
|
+
interface EntityName {
|
|
66
|
+
id: string; // Unique identifier - [generation strategy]
|
|
67
|
+
field1: string; // [Constraints: e.g., "non-empty, max 500 chars"]
|
|
68
|
+
field2: number; // [Constraints: e.g., "positive integer"]
|
|
69
|
+
field3: boolean; // [Default value and meaning]
|
|
70
|
+
createdAt: number; // [Timestamp format]
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Validation Rules:**
|
|
75
|
+
- `id`: [Validation rule]
|
|
76
|
+
- `field1`: [Validation rule]
|
|
77
|
+
- `field2`: [Validation rule]
|
|
78
|
+
|
|
79
|
+
### Storage Format
|
|
80
|
+
|
|
81
|
+
[Describe how data is persisted - database schema, localStorage format, API payloads, etc.]
|
|
82
|
+
|
|
83
|
+
## Error Handling
|
|
84
|
+
|
|
85
|
+
### [Error Category 1]
|
|
86
|
+
|
|
87
|
+
| Error Type | Condition | Recovery Strategy |
|
|
88
|
+
|------------|-----------|-------------------|
|
|
89
|
+
| [ErrorName] | [When it occurs] | [How to handle] |
|
|
90
|
+
| [ErrorName2] | [When it occurs] | [How to handle] |
|
|
91
|
+
|
|
92
|
+
### [Error Category 2]
|
|
93
|
+
|
|
94
|
+
[Continue for each error category: Storage, Validation, Network, etc.]
|
|
95
|
+
|
|
96
|
+
### Recovery Strategies
|
|
97
|
+
|
|
98
|
+
- **Automatic Retry**: [When and how to retry]
|
|
99
|
+
- **Fallback State**: [Default safe state]
|
|
100
|
+
- **User Notification**: [What to tell the user]
|
|
101
|
+
|
|
102
|
+
## Testing Strategy
|
|
103
|
+
|
|
104
|
+
### Unit Tests
|
|
105
|
+
|
|
106
|
+
[What to test at unit level]
|
|
107
|
+
- [Component 1]: [What to verify]
|
|
108
|
+
- [Component 2]: [What to verify]
|
|
109
|
+
|
|
110
|
+
### Integration Tests
|
|
111
|
+
|
|
112
|
+
[What to test at integration level]
|
|
113
|
+
- [Flow 1]: [End-to-end scenario]
|
|
114
|
+
- [Flow 2]: [End-to-end scenario]
|
|
115
|
+
|
|
116
|
+
### Test Organization
|
|
117
|
+
|
|
118
|
+
- Test file naming: `*.test.ts` or `*.spec.ts`
|
|
119
|
+
- Location: [Co-located with source / separate test directory]
|
|
120
|
+
- Framework: [Jest / Vitest / Mocha / etc.]
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Guidelines
|
|
127
|
+
|
|
128
|
+
1. **Reference requirements** - Design should address ALL requirements from Phase 1
|
|
129
|
+
2. **Use Mermaid diagrams** - Visual architecture aids understanding
|
|
130
|
+
3. **TypeScript-style interfaces** - Even for non-TS projects, the syntax is clear
|
|
131
|
+
4. **Include validation rules** - Be explicit about data constraints
|
|
132
|
+
5. **Error handling is mandatory** - Every design needs error recovery strategy
|
|
133
|
+
6. **Testing is part of design** - Define testing approach upfront
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Requirements Template
|
|
2
|
+
|
|
3
|
+
Use this template when generating requirements.md for a feature spec.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# Requirements Document
|
|
9
|
+
|
|
10
|
+
## Introduction
|
|
11
|
+
|
|
12
|
+
[2-3 sentences summarizing the feature and its purpose. What problem does it solve? Who benefits from this feature?]
|
|
13
|
+
|
|
14
|
+
## Glossary
|
|
15
|
+
|
|
16
|
+
- **[System_Name]**: [Definition of the main system/component being built]
|
|
17
|
+
- **[Term_1]**: [Domain-specific term definition]
|
|
18
|
+
- **[Term_2]**: [Domain-specific term definition]
|
|
19
|
+
- **[Term_3]**: [Domain-specific term definition]
|
|
20
|
+
|
|
21
|
+
[Include 3-10 domain-specific terms that will be used consistently in acceptance criteria]
|
|
22
|
+
|
|
23
|
+
## Requirements
|
|
24
|
+
|
|
25
|
+
### Requirement 1
|
|
26
|
+
|
|
27
|
+
**User Story:** As a [role], I want [feature/capability], so that [benefit/value]
|
|
28
|
+
|
|
29
|
+
#### Acceptance Criteria
|
|
30
|
+
|
|
31
|
+
1. WHEN [trigger event occurs], THE [System_Name] SHALL [expected response/action]
|
|
32
|
+
2. WHILE [condition is true], THE [System_Name] SHALL [continuous behavior]
|
|
33
|
+
3. IF [error/unwanted condition], THEN THE [System_Name] SHALL [recovery/handling action]
|
|
34
|
+
4. WHERE [optional feature is enabled], THE [System_Name] SHALL [conditional behavior]
|
|
35
|
+
|
|
36
|
+
### Requirement 2
|
|
37
|
+
|
|
38
|
+
**User Story:** As a [role], I want [feature/capability], so that [benefit/value]
|
|
39
|
+
|
|
40
|
+
#### Acceptance Criteria
|
|
41
|
+
|
|
42
|
+
1. WHEN [trigger], THE [System_Name] SHALL [response]
|
|
43
|
+
2. [Additional EARS-format criteria...]
|
|
44
|
+
|
|
45
|
+
### Requirement 3
|
|
46
|
+
|
|
47
|
+
[Continue pattern for 3-7 total requirements]
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## EARS Format Reference
|
|
54
|
+
|
|
55
|
+
EARS (Easy Approach to Requirements Syntax) patterns:
|
|
56
|
+
|
|
57
|
+
| Pattern | Format | Use When |
|
|
58
|
+
|---------|--------|----------|
|
|
59
|
+
| **Ubiquitous** | THE [system] SHALL [response] | Always true behavior |
|
|
60
|
+
| **Event-driven** | WHEN [trigger], THE [system] SHALL [response] | Response to events |
|
|
61
|
+
| **State-driven** | WHILE [condition], THE [system] SHALL [response] | Behavior during state |
|
|
62
|
+
| **Unwanted** | IF [condition], THEN THE [system] SHALL [response] | Error handling |
|
|
63
|
+
| **Optional** | WHERE [option], THE [system] SHALL [response] | Feature flags |
|
|
64
|
+
| **Complex** | [WHERE] [WHILE] [WHEN/IF] THE [system] SHALL [response] | Combined conditions |
|
|
65
|
+
|
|
66
|
+
## Guidelines
|
|
67
|
+
|
|
68
|
+
1. **Use glossary terms consistently** - Every system/component mentioned should be defined in glossary
|
|
69
|
+
2. **2-5 acceptance criteria per requirement** - Not too few, not too many
|
|
70
|
+
3. **Active voice** - "System SHALL display" not "Message is displayed"
|
|
71
|
+
4. **No vague terms** - Avoid "quickly", "adequate", "user-friendly"
|
|
72
|
+
5. **Measurable criteria** - Include specific values where possible
|
|
73
|
+
6. **One thought per criterion** - Break complex behaviors into multiple criteria
|