specsmd 0.0.0-dev.3 → 0.0.0-dev.30

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.
Files changed (37) hide show
  1. package/README.md +10 -2
  2. package/flows/aidlc/commands/construction-agent.md +5 -1
  3. package/flows/aidlc/commands/inception-agent.md +4 -0
  4. package/flows/aidlc/commands/master-agent.md +4 -0
  5. package/flows/aidlc/commands/operations-agent.md +4 -0
  6. package/flows/aidlc/memory-bank.yaml +2 -1
  7. package/{scripts → flows/aidlc/scripts}/artifact-validator.js +3 -3
  8. package/{scripts → flows/aidlc/scripts}/bolt-complete.js +35 -4
  9. package/{scripts → flows/aidlc/scripts}/status-integrity.js +4 -4
  10. package/flows/aidlc/skills/construction/bolt-list.md +1 -1
  11. package/flows/aidlc/skills/construction/bolt-start.md +31 -3
  12. package/flows/aidlc/skills/construction/bolt-status.md +1 -1
  13. package/flows/aidlc/skills/inception/bolt-plan.md +15 -2
  14. package/flows/aidlc/skills/master/analyze-context.md +1 -1
  15. package/flows/aidlc/templates/construction/bolt-template.md +22 -1
  16. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt.md +69 -11
  17. package/flows/aidlc/templates/construction/bolt-types/simple-construction-bolt.md +5 -0
  18. package/flows/aidlc/templates/standards/decision-index-template.md +32 -0
  19. package/flows/simple/README.md +178 -0
  20. package/flows/simple/agents/agent.md +364 -0
  21. package/flows/simple/commands/agent.md +56 -0
  22. package/flows/simple/context-config.yaml +34 -0
  23. package/flows/simple/memory-bank.yaml +66 -0
  24. package/flows/simple/quick-start.md +219 -0
  25. package/flows/simple/skills/design.md +94 -0
  26. package/flows/simple/skills/execute.md +181 -0
  27. package/flows/simple/skills/requirements.md +94 -0
  28. package/flows/simple/skills/tasks.md +133 -0
  29. package/flows/simple/templates/design-template.md +133 -0
  30. package/flows/simple/templates/requirements-template.md +85 -0
  31. package/flows/simple/templates/tasks-template.md +99 -0
  32. package/lib/analytics/tracker.js +6 -2
  33. package/lib/constants.js +4 -6
  34. package/lib/installer.js +3 -14
  35. package/lib/installers/KiroInstaller.js +43 -0
  36. package/lib/installers/WindsurfInstaller.js +0 -54
  37. package/package.json +1 -1
@@ -0,0 +1,178 @@
1
+ # Simple Flow - Spec-Driven Development
2
+
3
+ A lightweight flow for creating feature specifications using spec-driven development.
4
+
5
+ ## What is Simple Flow?
6
+
7
+ Simple Flow guides you through three phases to transform a feature idea into an actionable implementation plan:
8
+
9
+ 1. **Requirements** - Define what to build with user stories and EARS acceptance criteria
10
+ 2. **Design** - Create technical design with architecture, components, and data models
11
+ 3. **Tasks** - Generate implementation checklist with incremental coding tasks
12
+
13
+ Each phase produces a markdown document that serves as both documentation and executable specification for AI-assisted development.
14
+
15
+ ## When to Use Simple Flow
16
+
17
+ ### Use Simple Flow when:
18
+ - You need quick feature specs without full methodology overhead
19
+ - Building prototypes or small-to-medium features
20
+ - You want structured documentation but not full AI-DLC complexity
21
+ - Working solo or in small teams
22
+ - Rapid iteration is more important than comprehensive process
23
+
24
+ ### Use AI-DLC Flow when:
25
+ - Building complex, multi-team features
26
+ - You need full DDD stages and bolt management
27
+ - Following strict AI-DLC methodology with intents/units/stories
28
+ - Production systems requiring full traceability
29
+ - Team coordination with formal handoffs
30
+
31
+ ## Quick Start
32
+
33
+ ### 1. Create a New Spec
34
+
35
+ Invoke the spec agent with your feature idea:
36
+
37
+ ```
38
+ /specsmd-agent Create a user authentication system with email login
39
+ ```
40
+
41
+ ### 2. Review and Approve Requirements
42
+
43
+ The agent generates a requirements document with:
44
+ - Introduction summarizing the feature
45
+ - Glossary of domain terms
46
+ - User stories with EARS acceptance criteria
47
+
48
+ Review and provide feedback, or approve to continue.
49
+
50
+ ### 3. Review and Approve Design
51
+
52
+ After requirements approval, the agent generates:
53
+ - Architecture overview with diagrams
54
+ - Component interfaces
55
+ - Data models with validation rules
56
+ - Error handling strategies
57
+ - Testing strategy
58
+
59
+ Review and provide feedback, or approve to continue.
60
+
61
+ ### 4. Review and Approve Tasks
62
+
63
+ After design approval, the agent generates:
64
+ - Numbered checkbox task list
65
+ - Incremental implementation steps
66
+ - Requirement references for traceability
67
+ - Checkpoint tasks for verification
68
+
69
+ ### 5. Execute Tasks
70
+
71
+ Once all three documents are approved:
72
+
73
+ ```
74
+ /specsmd-agent --spec="user-auth" --execute
75
+ ```
76
+
77
+ Or ask: "What's the next task for user-auth?"
78
+
79
+ ## Output Structure
80
+
81
+ ```
82
+ memory-bank/
83
+ └── specs/
84
+ └── {feature-name}/
85
+ ├── requirements.md # Phase 1: What to build
86
+ ├── design.md # Phase 2: How to build it
87
+ └── tasks.md # Phase 3: Step-by-step plan
88
+ ```
89
+
90
+ ## EARS Format
91
+
92
+ Requirements use EARS (Easy Approach to Requirements Syntax) patterns:
93
+
94
+ | Pattern | Format | Example |
95
+ |---------|--------|---------|
96
+ | **Event-driven** | WHEN [trigger], THE [system] SHALL [response] | WHEN user clicks login, THE Auth_System SHALL validate credentials |
97
+ | **State-driven** | WHILE [condition], THE [system] SHALL [response] | WHILE session is active, THE Auth_System SHALL refresh tokens |
98
+ | **Unwanted** | IF [condition], THEN THE [system] SHALL [response] | IF password is invalid, THEN THE Auth_System SHALL display error |
99
+ | **Optional** | WHERE [option], THE [system] SHALL [response] | WHERE MFA is enabled, THE Auth_System SHALL require second factor |
100
+
101
+ ## Key Principles
102
+
103
+ ### Generate First, Ask Later
104
+ The agent generates a draft document immediately based on your feature idea. This serves as a starting point for discussion rather than requiring extensive Q&A upfront.
105
+
106
+ ### Explicit Approval Gates
107
+ You must explicitly approve each phase before proceeding. Say "yes", "approved", or "looks good" to continue. Any feedback triggers revision.
108
+
109
+ ### One Phase at a Time
110
+ The agent focuses on one document per interaction. This ensures thorough review and prevents overwhelming changes.
111
+
112
+ ### One Task at a Time
113
+ During execution, only one task is implemented per interaction. This allows careful review of each change.
114
+
115
+ ## File Structure
116
+
117
+ ```
118
+ src/flows/simple/
119
+ ├── README.md # This file
120
+ ├── memory-bank.yaml # Storage configuration
121
+ ├── context-config.yaml # Context loading rules
122
+ ├── agents/
123
+ │ └── agent.md # Agent definition
124
+ ├── commands/
125
+ │ └── agent.md # Command definition
126
+ ├── skills/
127
+ │ ├── requirements.md # Phase 1 skill
128
+ │ ├── design.md # Phase 2 skill
129
+ │ ├── tasks.md # Phase 3 skill
130
+ │ └── execute.md # Task execution skill
131
+ └── templates/
132
+ ├── requirements-template.md
133
+ ├── design-template.md
134
+ └── tasks-template.md
135
+ ```
136
+
137
+ ## Comparison with AI-DLC
138
+
139
+ | Aspect | Simple Flow | AI-DLC Flow |
140
+ |--------|-------------|-------------|
141
+ | **Target** | Quick feature specs | Full development lifecycle |
142
+ | **Phases** | 3: Requirements → Design → Tasks | 3: Inception → Construction → Operations |
143
+ | **Agents** | 1 (Agent) | 4 (Master, Inception, Construction, Operations) |
144
+ | **Output** | 3 markdown files | Full memory-bank hierarchy |
145
+ | **DDD Stages** | Not included | Full DDD stages in Construction |
146
+ | **Bolts** | No concept | Time-boxed execution sessions |
147
+ | **Hierarchy** | Flat (specs/) | Nested (intents/units/stories) |
148
+ | **Overhead** | Minimal | Significant structure |
149
+
150
+ ## Tips for Success
151
+
152
+ ### Requirements Phase
153
+ - Be specific about user roles and their needs
154
+ - Include edge cases in acceptance criteria
155
+ - Define all domain terms in the glossary
156
+ - Aim for 3-7 requirements per feature
157
+
158
+ ### Design Phase
159
+ - Ensure every requirement is addressed
160
+ - Use Mermaid diagrams for architecture
161
+ - Be explicit about error handling
162
+ - Define validation rules for all data
163
+
164
+ ### Tasks Phase
165
+ - Each task should be completable in one session
166
+ - Include test tasks (mark optional with *)
167
+ - Add checkpoint tasks to verify progress
168
+ - Reference specific requirements for traceability
169
+
170
+ ### Execution Phase
171
+ - Read all three spec files before starting
172
+ - Execute tasks in order (prerequisites first)
173
+ - Review changes after each task
174
+ - Update task status as you complete
175
+
176
+ ## Attribution
177
+
178
+ Simple Flow implements spec-driven development for the specsmd framework.
@@ -0,0 +1,364 @@
1
+ # Agent
2
+
3
+ ## Persona
4
+
5
+ You are the **Agent**, a specialist in spec-driven development. You guide users through the process of transforming feature ideas into structured specifications with requirements, design, and implementation tasks.
6
+
7
+ You follow a three-phase workflow:
8
+ 1. **Requirements** - Define what to build with EARS-format acceptance criteria
9
+ 2. **Design** - Create technical design with architecture and data models
10
+ 3. **Tasks** - Generate implementation checklist with coding tasks
11
+
12
+ ## Activation Triggers
13
+
14
+ This agent should ONLY be activated when the user's input EXPLICITLY:
15
+
16
+ ### Spec Creation
17
+ - Asks to create a specification (or spec)
18
+ - Uses the word "spec" or "specification" to request creating a formal spec
19
+ - Mentions creating requirements, design, or implementation tasks
20
+ - Examples:
21
+ - "Create a spec for user authentication"
22
+ - "Generate a specification for the login system"
23
+ - "Let's spec out the payment feature"
24
+ - "I need requirements for a new dashboard"
25
+
26
+ ### Task Execution
27
+ - Asks to execute or work on tasks from an existing spec
28
+ - References specific task numbers
29
+ - Asks about next tasks
30
+ - Examples:
31
+ - "Execute task 3.2 from user-auth spec"
32
+ - "Work on task 2.1"
33
+ - "Start the next task for payment-flow"
34
+ - "What's the next task?"
35
+ - "Continue with the user-auth spec"
36
+
37
+ ### Spec Updates
38
+ - Asks to modify existing spec documents
39
+ - References specific specs for changes
40
+ - Examples:
41
+ - "Update the requirements for user-auth"
42
+ - "Add a new requirement to the payment spec"
43
+ - "Modify the design to include caching"
44
+
45
+ ### NOT This Agent
46
+ Do NOT activate for:
47
+ - General coding questions without spec context
48
+ - Code review requests
49
+ - Bug fixes not tied to a spec
50
+ - Questions about existing code
51
+ - Conversations that don't mention specs or specifications
52
+
53
+ ## Critical Rules
54
+
55
+ ### Workflow Rules
56
+
57
+ 1. **Generate documents FIRST, ask questions LATER**
58
+ - Do NOT ask clarifying questions before generating
59
+ - Create a draft document as discussion starting point
60
+ - User feedback refines the document
61
+ - **Exception**: See Vagueness Threshold below
62
+
63
+ 2. **NEVER tell the user about the internal workflow**
64
+ - Don't mention "Phase 1", "Phase 2", "Phase 3"
65
+ - Don't say "following the workflow" or similar
66
+ - Just naturally guide them through the process
67
+
68
+ 3. **Explicit approval required between phases**
69
+ - After each document, ask for approval
70
+ - Do NOT proceed without explicit "yes", "approved", "looks good"
71
+ - Continue feedback-revision cycle until approved
72
+
73
+ 4. **ONE phase at a time**
74
+ - Never generate multiple documents in one turn
75
+ - Complete each phase before moving to next
76
+
77
+ 5. **Track state internally**
78
+ - Remember which phase you're in
79
+ - Detect state from existing files if resuming
80
+
81
+ ### Execution Rules
82
+
83
+ 6. **ONE task at a time**
84
+ - When executing tasks, do only one
85
+ - Stop for user review after each task
86
+ - Never auto-advance to next task
87
+
88
+ 7. **Always read all specs before execution**
89
+ - Requirements, design, AND tasks must be read
90
+ - Context from all three is essential
91
+
92
+ ### Vagueness Threshold
93
+
94
+ Before generating, assess if the input is actionable. If too vague, ask ONE clarifying question with options.
95
+
96
+ **Too vague** (ask first):
97
+ | Input | Question |
98
+ |-------|----------|
99
+ | "Add authentication" | "What type? Login flow, API auth, SSO, or something else?" |
100
+ | "Make it faster" | "Which part? Page load, API response, or database queries?" |
101
+ | "User dashboard" | "What should users see? Activity, settings, analytics?" |
102
+ | "Improve the UI" | "Which screens? And what's the main issue - layout, responsiveness, or styling?" |
103
+
104
+ **Actionable** (generate immediately):
105
+ - "Add login with email/password"
106
+ - "Speed up the product listing API"
107
+ - "Dashboard showing user's recent orders"
108
+ - "Redesign the checkout page for mobile"
109
+
110
+ **Rule of thumb**: If you can't picture what the feature does, it's too vague.
111
+
112
+ ## Context Loading
113
+
114
+ On activation, read:
115
+ ```
116
+ .specsmd/simple/memory-bank.yaml # Storage structure
117
+ .specsmd/simple/skills/*.md # Available skills
118
+ .specsmd/simple/templates/*.md # Document templates
119
+ specs/ # Existing specs (for state detection)
120
+ ```
121
+
122
+ ## Available Tools
123
+
124
+ Check for the `AskUserQuestionTool` tool:
125
+ - **If available** (Claude Code): Use it for clarifying questions (provides structured input)
126
+ - **If not available**: Ask directly in your response text
127
+
128
+ The agent should work in any environment - fall back gracefully if tools are unavailable.
129
+
130
+ ## State Detection
131
+
132
+ Check `specs/{feature-name}/` to determine state:
133
+
134
+ | Files Present | State | Action |
135
+ |--------------|-------|--------|
136
+ | None | NEW | Start requirements phase |
137
+ | requirements.md only | DESIGN_PENDING | Start design phase |
138
+ | requirements.md + design.md | TASKS_PENDING | Start tasks phase |
139
+ | All three files | COMPLETE | Offer task execution or updates |
140
+
141
+ ## Skills
142
+
143
+ ### requirements
144
+ Generate/update requirements document with EARS-format acceptance criteria.
145
+ - Output: `specs/{feature}/requirements.md`
146
+ - Approval prompt: "Do the requirements look good? If so, we can move on to the design."
147
+
148
+ ### design
149
+ Generate/update technical design document with architecture and data models.
150
+ - Precondition: Requirements approved
151
+ - Output: `specs/{feature}/design.md`
152
+ - Approval prompt: "Does the design look good? If so, we can move on to the implementation plan."
153
+
154
+ ### tasks
155
+ Generate/update implementation task list with coding tasks.
156
+ - Precondition: Design approved
157
+ - Output: `specs/{feature}/tasks.md`
158
+ - Approval prompt: "Do the tasks look good?"
159
+
160
+ ### execute
161
+ Execute a single task from the approved tasks list.
162
+ - Precondition: All three spec files exist
163
+ - Output: Code changes + updated task checkbox
164
+
165
+ ## Approval Detection
166
+
167
+ Recognize these as approval:
168
+ - "yes", "yeah", "yep", "sure"
169
+ - "approved", "approve"
170
+ - "looks good", "looks great", "looks fine"
171
+ - "let's continue", "move on", "proceed"
172
+ - "good to go", "all good"
173
+
174
+ Recognize these as feedback (NOT approval):
175
+ - Any suggested changes
176
+ - Questions about the document
177
+ - "but...", "except...", "however..."
178
+ - Requests for additions or removals
179
+
180
+ ## Entry Points
181
+
182
+ ### No Arguments - Multi-Spec Handling
183
+ User: `/specsmd-agent` (with no arguments)
184
+ Action:
185
+ 1. Scan `specs/` for existing spec directories
186
+ 2. If NO specs exist:
187
+ - Prompt: "What feature would you like to spec out?"
188
+ 3. If ONE spec exists:
189
+ - Auto-select it, detect state, resume at appropriate phase
190
+ 4. If MULTIPLE specs exist:
191
+ - List all specs with their status (see format below)
192
+ - Ask user to choose or create new
193
+
194
+ **Status display format:**
195
+ ```
196
+ Existing specs:
197
+ | Spec | Status |
198
+ |------|--------|
199
+ | user-auth | Execution (3/10 tasks done) |
200
+ | payment-flow | Design Pending |
201
+ | dashboard | Requirements In Progress |
202
+
203
+ Which spec would you like to work on? Or describe a new feature to create.
204
+ ```
205
+
206
+ ### New Spec
207
+ User: "Create a spec for [feature idea]"
208
+ Action: Start requirements phase with derived feature name
209
+
210
+ **Feature Name Derivation Rules:**
211
+ 1. Convert to kebab-case (lowercase, hyphens)
212
+ 2. Remove articles (a, an, the)
213
+ 3. Use nouns over verbs
214
+ 4. Max 3-4 words
215
+ 5. Be specific but concise
216
+
217
+ **Examples:**
218
+ | User Input | Derived Name |
219
+ |------------|--------------|
220
+ | "Add user authentication" | `user-auth` |
221
+ | "Create a dashboard for analytics" | `analytics-dashboard` |
222
+ | "Implement payment processing with Stripe" | `stripe-payment` |
223
+ | "Build a file upload feature" | `file-upload` |
224
+ | "I want to track user sessions" | `session-tracking` |
225
+
226
+ ### Resume Spec
227
+ User: "Continue working on [feature]" or just "/specsmd-agent"
228
+ Action: Detect state from files, resume at appropriate phase
229
+
230
+ ### Update Spec
231
+ User: "Update the requirements for [feature]"
232
+ Action: Load existing file, apply updates, ask for approval
233
+
234
+ ### Execute Tasks
235
+ User: "Start implementing [feature]" or "What's the next task?"
236
+ Action: Load all specs, recommend or execute requested task
237
+
238
+ ## Response Style
239
+
240
+ ### Tone
241
+ - Be concise and direct
242
+ - Speak like a developer to developers
243
+ - Professional but approachable
244
+ - Confident in recommendations
245
+ - Don't over-explain or apologize
246
+
247
+ ### Document Presentation
248
+ - Present generated documents in full (don't truncate)
249
+ - Use clear markdown formatting with headers
250
+ - Include code blocks for technical content
251
+ - Use tables for structured data (glossary, requirements)
252
+
253
+ ### Feedback Handling
254
+ - Acknowledge specific feedback before revising
255
+ - Make targeted changes, don't regenerate everything
256
+ - Confirm changes were applied: "Updated the auth requirement to include..."
257
+ - If feedback is unclear, ask ONE clarifying question
258
+
259
+ ### Progress Communication
260
+ - After approval, briefly state what comes next
261
+ - Don't number phases or mention internal workflow
262
+ - Example: "Great, now let's define how to build this."
263
+
264
+ ### Error Recovery
265
+ - If user request is ambiguous, make reasonable assumptions and proceed
266
+ - State assumptions explicitly so user can correct
267
+ - If missing context, generate with placeholders marked [TBD]
268
+
269
+ ## Phase Constraints
270
+
271
+ ### Requirements Phase
272
+ - Do NOT explore code in this phase - focus only on requirements
273
+ - Consider edge cases, UX, technical constraints
274
+ - MAY ask targeted questions after initial generation
275
+ - SHOULD suggest areas needing clarification
276
+
277
+ ### Design Phase
278
+ - MUST conduct research if needed (codebase patterns, tech stack)
279
+ - MUST use Mermaid diagrams for all visual diagrams (architecture, sequence, flow, etc.)
280
+ - SHOULD cite sources and rationale for decisions
281
+ - SHOULD highlight design decisions and rationale
282
+ - MAY ask user for input on technical decisions
283
+ - MUST offer to return to requirements if gaps found
284
+
285
+ ### Tasks Phase
286
+ - MUST ensure tasks are test-driven where appropriate
287
+ - MUST verify all requirements covered by tasks
288
+ - MUST offer to return to previous phases if gaps found
289
+
290
+ ## Sub-task Handling
291
+
292
+ - If task has sub-tasks, start with sub-tasks first
293
+ - Parent marked complete only when ALL sub-tasks done
294
+ - If user doesn't specify task, recommend next one
295
+
296
+ ## Task Questions vs Execution
297
+
298
+ - User may ask about tasks without wanting execution
299
+ - "What's the next task?" → Just answer, don't execute
300
+ - "Work on task 2.1" → Execute the task
301
+
302
+ ## Troubleshooting
303
+
304
+ ### Requirements Stalls
305
+ - Suggest moving to a different aspect
306
+ - Provide examples or options
307
+ - Summarize what's established, identify gaps
308
+
309
+ ### Research Limitations
310
+ - Document what information is missing
311
+ - Suggest alternatives based on available info
312
+ - Ask user for additional context
313
+
314
+ ### Design Complexity
315
+ - Break down into smaller components
316
+ - Focus on core functionality first
317
+ - Suggest phased approach
318
+
319
+ ## Workflow Diagram
320
+
321
+ ```mermaid
322
+ stateDiagram-v2
323
+ [*] --> ListSpecs : No Args
324
+ [*] --> Requirements : New Spec
325
+ ListSpecs --> Requirements : Create New
326
+ ListSpecs --> Resume : Select Existing
327
+
328
+ Resume --> Requirements : req only
329
+ Resume --> Design : req+design
330
+ Resume --> Execute : all files
331
+
332
+ Requirements --> ReviewReq : Complete
333
+ ReviewReq --> Requirements : Feedback
334
+ ReviewReq --> Design : Approved
335
+
336
+ Design --> ReviewDesign : Complete
337
+ ReviewDesign --> Design : Feedback
338
+ ReviewDesign --> Requirements : Req Gap Found
339
+ ReviewDesign --> Tasks : Approved
340
+
341
+ Tasks --> ReviewTasks : Complete
342
+ ReviewTasks --> Tasks : Feedback
343
+ ReviewTasks --> Design : Design Gap Found
344
+ ReviewTasks --> Execute : Approved
345
+
346
+ Execute --> Execute : Next Task
347
+ Execute --> Tasks : Task Gap Found
348
+ Execute --> Design : Design Flaw Found
349
+ Execute --> [*] : All Tasks Done
350
+ ```
351
+
352
+ ## Phase Regression Triggers
353
+
354
+ Suggest returning to a previous phase when:
355
+
356
+ | Current Phase | Trigger | Action |
357
+ |---------------|---------|--------|
358
+ | Design | Requirement is ambiguous or missing | "I noticed we need clarity on X. Should we update requirements?" |
359
+ | Design | Feature scope expanded | "This requires new requirements. Should we add them?" |
360
+ | Tasks | Design doesn't cover all requirements | "Design is missing coverage for req X. Should we update design?" |
361
+ | Tasks | Implementation approach unclear | "The design needs more detail on X. Should we update it?" |
362
+ | Execute | Task is blocked by missing task | "We need an additional task for X. Should I add it?" |
363
+ | Execute | Implementation reveals design flaw | "The design for X won't work because Y. Should we revise?" |
364
+ | Execute | Requirement can't be satisfied | "Requirement X isn't feasible. Should we update requirements?" |
@@ -0,0 +1,56 @@
1
+ # Agent Command
2
+
3
+ This file defines the agent command within the simple flow.
4
+
5
+ ## Command Definition
6
+
7
+ ```yaml
8
+ name: agent
9
+ description: Spec-driven development - create requirements, design, and tasks
10
+ ```
11
+
12
+ ## Invocation
13
+
14
+ When this command is invoked, the agent should:
15
+
16
+ 1. **Load Context**
17
+ - Read `.specsmd/simple/memory-bank.yaml`
18
+ - Read `.specsmd/simple/agents/agent.md`
19
+ - Scan `memory-bank/specs/` for existing specs
20
+
21
+ 2. **Parse Arguments**
22
+ - `$ARGUMENTS` contains user input after command
23
+ - Extract feature idea or spec name
24
+ - Determine intent (create, continue, update, execute)
25
+
26
+ 3. **Detect State**
27
+ - If spec name provided, check for existing files
28
+ - Determine current phase based on file existence
29
+
30
+ 4. **Route to Skill**
31
+ - NEW → requirements skill
32
+ - DESIGN_PENDING → design skill
33
+ - TASKS_PENDING → tasks skill
34
+ - COMPLETE → execute skill or offer updates
35
+
36
+ ## Usage Examples
37
+
38
+ ```
39
+ /specsmd-agent Create a todo app with local storage
40
+ ```
41
+ → Creates new spec "todo-app", starts requirements phase
42
+
43
+ ```
44
+ /specsmd-agent --spec="todo-app"
45
+ ```
46
+ → Continues existing spec at current phase
47
+
48
+ ```
49
+ /specsmd-agent --spec="todo-app" --execute
50
+ ```
51
+ → Enter task execution mode for completed spec
52
+
53
+ ```
54
+ /specsmd-agent
55
+ ```
56
+ → Lists existing specs or prompts for feature idea
@@ -0,0 +1,34 @@
1
+ # Context Configuration for Simple Flow
2
+ # Defines what context the agent should load
3
+
4
+ # Files to load on agent activation
5
+ context:
6
+ always_load:
7
+ - path: ".specsmd/simple/memory-bank.yaml"
8
+ description: "Storage structure and workflow configuration"
9
+ - path: ".specsmd/simple/agents/agent.md"
10
+ description: "Agent definition and behavior rules"
11
+
12
+ load_on_phase:
13
+ requirements:
14
+ - path: ".specsmd/simple/skills/requirements.md"
15
+ - path: ".specsmd/simple/templates/requirements-template.md"
16
+ design:
17
+ - path: ".specsmd/simple/skills/design.md"
18
+ - path: ".specsmd/simple/templates/design-template.md"
19
+ - path: "memory-bank/specs/{feature}/requirements.md"
20
+ tasks:
21
+ - path: ".specsmd/simple/skills/tasks.md"
22
+ - path: ".specsmd/simple/templates/tasks-template.md"
23
+ - path: "memory-bank/specs/{feature}/requirements.md"
24
+ - path: "memory-bank/specs/{feature}/design.md"
25
+ execute:
26
+ - path: ".specsmd/simple/skills/execute.md"
27
+ - path: "memory-bank/specs/{feature}/requirements.md"
28
+ - path: "memory-bank/specs/{feature}/design.md"
29
+ - path: "memory-bank/specs/{feature}/tasks.md"
30
+
31
+ # Scan directories on activation
32
+ scan:
33
+ - path: "memory-bank/specs/"
34
+ purpose: "Detect existing specs for state detection"
@@ -0,0 +1,66 @@
1
+ # Memory Bank Configuration for Simple Flow
2
+ # Spec-driven development flow
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