specsmd 0.1.6 → 0.1.8
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/templates/construction/bolt-types/ddd-construction-bolt.md +1 -1
- package/flows/simple/README.md +190 -0
- package/flows/simple/agents/agent.md +404 -0
- package/flows/simple/commands/agent.md +60 -0
- package/flows/simple/context-config.yaml +34 -0
- package/flows/simple/memory-bank.yaml +66 -0
- package/flows/simple/quick-start.md +231 -0
- package/flows/simple/skills/design.md +96 -0
- package/flows/simple/skills/execute.md +190 -0
- package/flows/simple/skills/requirements.md +94 -0
- package/flows/simple/skills/tasks.md +136 -0
- package/flows/simple/templates/design-template.md +138 -0
- package/flows/simple/templates/requirements-template.md +85 -0
- package/flows/simple/templates/tasks-template.md +104 -0
- package/lib/constants.js +4 -6
- package/lib/installers/KiroInstaller.js +55 -0
- package/lib/installers/OpenCodeInstaller.js +9 -1
- package/lib/installers/ToolInstaller.js +4 -1
- package/package.json +1 -1
|
@@ -0,0 +1,136 @@
|
|
|
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
|
+
- `specs/{feature}/requirements.md`
|
|
24
|
+
- `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 `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 every 2-3 implementation tasks
|
|
58
|
+
|
|
59
|
+
4. **Checkpoint Tasks (REQUIRED)**
|
|
60
|
+
- Add checkpoint after every 2-3 implementation tasks
|
|
61
|
+
- Checkpoint MUST run the test suite
|
|
62
|
+
- If tests fail during checkpoint, fix before proceeding
|
|
63
|
+
- Checkpoints are BLOCKING (not optional) - do NOT mark with `*`
|
|
64
|
+
- Format: `- [ ] X. Checkpoint - Verify all tests pass`
|
|
65
|
+
|
|
66
|
+
5. **Task Format**
|
|
67
|
+
- `- [ ]` for pending, `- [x]` for done
|
|
68
|
+
- `- [ ]*` for optional tasks
|
|
69
|
+
|
|
70
|
+
6. **Numbering Rules**
|
|
71
|
+
- Top-level tasks: `1.`, `2.`, `3.`
|
|
72
|
+
- Sub-tasks: `2.1`, `2.2`, `2.3`
|
|
73
|
+
- Maximum 2 levels (no `2.1.1`)
|
|
74
|
+
- Parent tasks with sub-tasks are GROUP HEADERS (not directly executed)
|
|
75
|
+
- Mark parent complete only when ALL sub-tasks are done
|
|
76
|
+
- Tasks without sub-tasks are directly executable
|
|
77
|
+
- Use sub-tasks when a feature has 3+ related implementation steps
|
|
78
|
+
|
|
79
|
+
7. **Approval Gate**
|
|
80
|
+
- Workflow COMPLETE when tasks approved
|
|
81
|
+
- Inform user they can now execute tasks
|
|
82
|
+
|
|
83
|
+
## Output
|
|
84
|
+
|
|
85
|
+
- **File**: `specs/{feature-name}/tasks.md`
|
|
86
|
+
- **Approval Prompt**: "Do the tasks look good?"
|
|
87
|
+
|
|
88
|
+
## Task Types (Include)
|
|
89
|
+
|
|
90
|
+
- Set up project structure
|
|
91
|
+
- Create interfaces/types
|
|
92
|
+
- Implement classes/modules
|
|
93
|
+
- Write unit tests
|
|
94
|
+
- Write integration tests
|
|
95
|
+
- Wire components together
|
|
96
|
+
- Checkpoint tasks (verify tests pass)
|
|
97
|
+
|
|
98
|
+
## Task Types (Exclude)
|
|
99
|
+
|
|
100
|
+
- User acceptance testing
|
|
101
|
+
- Deployment to any environment
|
|
102
|
+
- Performance metrics gathering
|
|
103
|
+
- User training or documentation
|
|
104
|
+
- Business process changes
|
|
105
|
+
- Marketing activities
|
|
106
|
+
- Running the app manually
|
|
107
|
+
|
|
108
|
+
## Completion Message
|
|
109
|
+
|
|
110
|
+
When tasks are approved:
|
|
111
|
+
|
|
112
|
+
```text
|
|
113
|
+
The spec is complete. You now have:
|
|
114
|
+
- requirements.md - What to build
|
|
115
|
+
- design.md - How to build it
|
|
116
|
+
- tasks.md - Step-by-step implementation plan
|
|
117
|
+
|
|
118
|
+
You can start executing tasks by asking me to work on a specific task,
|
|
119
|
+
or I can recommend the next task to work on.
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Phase Transitions
|
|
123
|
+
|
|
124
|
+
**Backward**: If user identifies gaps:
|
|
125
|
+
|
|
126
|
+
- Design changes → Return to design skill
|
|
127
|
+
- Requirement changes → Return to requirements skill
|
|
128
|
+
|
|
129
|
+
**Forward**: On approval:
|
|
130
|
+
|
|
131
|
+
- Workflow complete
|
|
132
|
+
- User can now request task execution
|
|
133
|
+
|
|
134
|
+
## Template Reference
|
|
135
|
+
|
|
136
|
+
See `.specsmd/simple/templates/tasks-template.md` for full template structure.
|
|
@@ -0,0 +1,138 @@
|
|
|
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
|
+
|
|
32
|
+
- [Principle 1: e.g., "Single responsibility per module"]
|
|
33
|
+
- [Principle 2: e.g., "Event-driven for loose coupling"]
|
|
34
|
+
- [Principle 3: e.g., "Immediate persistence on state change"]
|
|
35
|
+
|
|
36
|
+
## Components and Interfaces
|
|
37
|
+
|
|
38
|
+
### [ComponentName] Class/Module
|
|
39
|
+
|
|
40
|
+
[Brief description of component responsibility]
|
|
41
|
+
|
|
42
|
+
**Key Methods:**
|
|
43
|
+
|
|
44
|
+
- `methodName(param1: Type, param2: Type): ReturnType` - [Description]
|
|
45
|
+
- `methodName2(): ReturnType` - [Description]
|
|
46
|
+
|
|
47
|
+
### [InterfaceName] Interface
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
interface InterfaceName {
|
|
51
|
+
field1: string;
|
|
52
|
+
field2: number;
|
|
53
|
+
field3: boolean;
|
|
54
|
+
method1(param: Type): ReturnType;
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### [Additional components...]
|
|
59
|
+
|
|
60
|
+
## Data Models
|
|
61
|
+
|
|
62
|
+
### [EntityName] Entity
|
|
63
|
+
|
|
64
|
+
[Description of the entity and its role in the system]
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
interface EntityName {
|
|
68
|
+
id: string; // Unique identifier - [generation strategy]
|
|
69
|
+
field1: string; // [Constraints: e.g., "non-empty, max 500 chars"]
|
|
70
|
+
field2: number; // [Constraints: e.g., "positive integer"]
|
|
71
|
+
field3: boolean; // [Default value and meaning]
|
|
72
|
+
createdAt: number; // [Timestamp format]
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Validation Rules:**
|
|
77
|
+
|
|
78
|
+
- `id`: [Validation rule]
|
|
79
|
+
- `field1`: [Validation rule]
|
|
80
|
+
- `field2`: [Validation rule]
|
|
81
|
+
|
|
82
|
+
### Storage Format
|
|
83
|
+
|
|
84
|
+
[Describe how data is persisted - database schema, localStorage format, API payloads, etc.]
|
|
85
|
+
|
|
86
|
+
## Error Handling
|
|
87
|
+
|
|
88
|
+
### [Error Category 1]
|
|
89
|
+
|
|
90
|
+
| Error Type | Condition | Recovery Strategy |
|
|
91
|
+
|------------|-----------|-------------------|
|
|
92
|
+
| [ErrorName] | [When it occurs] | [How to handle] |
|
|
93
|
+
| [ErrorName2] | [When it occurs] | [How to handle] |
|
|
94
|
+
|
|
95
|
+
### [Error Category 2]
|
|
96
|
+
|
|
97
|
+
[Continue for each error category: Storage, Validation, Network, etc.]
|
|
98
|
+
|
|
99
|
+
### Recovery Strategies
|
|
100
|
+
|
|
101
|
+
- **Automatic Retry**: [When and how to retry]
|
|
102
|
+
- **Fallback State**: [Default safe state]
|
|
103
|
+
- **User Notification**: [What to tell the user]
|
|
104
|
+
|
|
105
|
+
## Testing Strategy
|
|
106
|
+
|
|
107
|
+
### Unit Tests
|
|
108
|
+
|
|
109
|
+
[What to test at unit level]
|
|
110
|
+
|
|
111
|
+
- [Component 1]: [What to verify]
|
|
112
|
+
- [Component 2]: [What to verify]
|
|
113
|
+
|
|
114
|
+
### Integration Tests
|
|
115
|
+
|
|
116
|
+
[What to test at integration level]
|
|
117
|
+
|
|
118
|
+
- [Flow 1]: [End-to-end scenario]
|
|
119
|
+
- [Flow 2]: [End-to-end scenario]
|
|
120
|
+
|
|
121
|
+
### Test Organization
|
|
122
|
+
|
|
123
|
+
- Test file naming: `*.test.ts` or `*.spec.ts`
|
|
124
|
+
- Location: [Co-located with source / separate test directory]
|
|
125
|
+
- Framework: [Jest / Vitest / Mocha / etc.]
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Guidelines
|
|
132
|
+
|
|
133
|
+
1. **Reference requirements** - Design should address ALL requirements from Phase 1
|
|
134
|
+
2. **Use Mermaid diagrams** - Visual architecture aids understanding
|
|
135
|
+
3. **TypeScript-style interfaces** - Even for non-TS projects, the syntax is clear
|
|
136
|
+
4. **Include validation rules** - Be explicit about data constraints
|
|
137
|
+
5. **Error handling is mandatory** - Every design needs error recovery strategy
|
|
138
|
+
6. **Testing is part of design** - Define testing approach upfront
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
## INCOSE Quality Rules
|
|
67
|
+
|
|
68
|
+
Before finalizing requirements, verify each criterion passes these checks:
|
|
69
|
+
|
|
70
|
+
| Rule | Check | Bad Example | Good Example |
|
|
71
|
+
|------|-------|-------------|--------------|
|
|
72
|
+
| **Singular** | One capability per criterion (no "and") | "System SHALL log and notify" | "System SHALL log" + "System SHALL notify" |
|
|
73
|
+
| **Complete** | All conditions stated | "System SHALL respond quickly" | "System SHALL respond within 200ms" |
|
|
74
|
+
| **Verifiable** | Can be tested/measured | "System SHALL be user-friendly" | "System SHALL complete checkout in ≤3 clicks" |
|
|
75
|
+
| **Unambiguous** | Only one interpretation | "System SHALL handle large files" | "System SHALL handle files up to 100MB" |
|
|
76
|
+
| **Consistent** | No conflicts with other requirements | Req 1: "Always online" + Req 2: "Offline mode" | Reconcile or clarify conditions |
|
|
77
|
+
|
|
78
|
+
## Guidelines
|
|
79
|
+
|
|
80
|
+
1. **Use glossary terms consistently** - Every system/component mentioned should be defined in glossary
|
|
81
|
+
2. **2-5 acceptance criteria per requirement** - Not too few, not too many
|
|
82
|
+
3. **Active voice** - "System SHALL display" not "Message is displayed"
|
|
83
|
+
4. **No vague terms** - Avoid "quickly", "adequate", "user-friendly"
|
|
84
|
+
5. **Measurable criteria** - Include specific values where possible
|
|
85
|
+
6. **One thought per criterion** - Break complex behaviors into multiple criteria
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Tasks Template
|
|
2
|
+
|
|
3
|
+
Use this template when generating tasks.md for a feature spec.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# Implementation Plan
|
|
9
|
+
|
|
10
|
+
- [ ] 1. Set up project structure and core interfaces
|
|
11
|
+
- Create directory structure for [components]
|
|
12
|
+
- Define core interfaces and types
|
|
13
|
+
- Set up testing framework if not present
|
|
14
|
+
- _Requirements: [X.Y]_
|
|
15
|
+
|
|
16
|
+
- [ ] 2. Implement [Component Group Name]
|
|
17
|
+
- [ ] 2.1 Create [specific component/module]
|
|
18
|
+
- [Implementation detail 1]
|
|
19
|
+
- [Implementation detail 2]
|
|
20
|
+
- _Requirements: [X.Y, X.Z]_
|
|
21
|
+
|
|
22
|
+
- [ ]* 2.2 Write unit tests for [component]
|
|
23
|
+
- Create test file
|
|
24
|
+
- Test [specific behavior]
|
|
25
|
+
- _Requirements: [X.Y]_
|
|
26
|
+
|
|
27
|
+
- [ ] 2.3 Implement [next component]
|
|
28
|
+
- [Details]
|
|
29
|
+
- _Requirements: [X.Y]_
|
|
30
|
+
|
|
31
|
+
- [ ] 3. Implement [Next Component Group]
|
|
32
|
+
- [ ] 3.1 Create [component]
|
|
33
|
+
- [Details]
|
|
34
|
+
- _Requirements: [X.Y]_
|
|
35
|
+
|
|
36
|
+
- [ ] 3.2 Wire components together
|
|
37
|
+
- Connect [A] to [B]
|
|
38
|
+
- [Integration details]
|
|
39
|
+
- _Requirements: [X.Y, X.Z]_
|
|
40
|
+
|
|
41
|
+
- [ ] 4. Checkpoint - Verify all tests pass
|
|
42
|
+
- Run test suite
|
|
43
|
+
- Address any failures before continuing
|
|
44
|
+
|
|
45
|
+
- [ ] 5. [Continue with remaining components...]
|
|
46
|
+
|
|
47
|
+
- [ ] N. Final Checkpoint - Ensure all tests pass
|
|
48
|
+
- Run complete test suite
|
|
49
|
+
- Verify all requirements are covered
|
|
50
|
+
- Review implementation against design
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Task Format Rules
|
|
56
|
+
|
|
57
|
+
### Checkbox Format
|
|
58
|
+
|
|
59
|
+
- `- [ ]` - Pending task
|
|
60
|
+
- `- [x]` - Completed task
|
|
61
|
+
- `- [ ]*` - Optional task (nice-to-have, not blocking)
|
|
62
|
+
|
|
63
|
+
### Numbering Rules
|
|
64
|
+
|
|
65
|
+
- Top-level tasks: `1.`, `2.`, `3.`
|
|
66
|
+
- Sub-tasks: `2.1`, `2.2`, `2.3`
|
|
67
|
+
- Maximum 2 levels (no `2.1.1`)
|
|
68
|
+
- Parent tasks with sub-tasks are GROUP HEADERS (not directly executed)
|
|
69
|
+
- Mark parent complete only when ALL sub-tasks are done
|
|
70
|
+
- Tasks without sub-tasks are directly executable
|
|
71
|
+
- Use sub-tasks when a feature has 3+ related implementation steps
|
|
72
|
+
|
|
73
|
+
### Requirement References
|
|
74
|
+
|
|
75
|
+
- Always include: `_Requirements: X.Y, X.Z_`
|
|
76
|
+
- Reference specific acceptance criteria numbers
|
|
77
|
+
- Every requirement should be covered by at least one task
|
|
78
|
+
|
|
79
|
+
### Task Content
|
|
80
|
+
|
|
81
|
+
Each task should include:
|
|
82
|
+
|
|
83
|
+
1. **Clear objective** - What to implement
|
|
84
|
+
2. **Implementation details** - Sub-bullets with specifics
|
|
85
|
+
3. **Requirement reference** - Traceability
|
|
86
|
+
|
|
87
|
+
## Guidelines
|
|
88
|
+
|
|
89
|
+
1. **Coding tasks ONLY** - No deployment, user testing, documentation
|
|
90
|
+
2. **Incremental progress** - Each task builds on previous
|
|
91
|
+
3. **Test-driven where appropriate** - Mark test tasks with `*` if optional
|
|
92
|
+
4. **Include checkpoints** - Periodic verification that tests pass
|
|
93
|
+
5. **Reference requirements** - Every task traces to requirement(s)
|
|
94
|
+
6. **Actionable by AI** - Tasks should be specific enough for code generation
|
|
95
|
+
|
|
96
|
+
## Excluded Task Types (Do NOT include)
|
|
97
|
+
|
|
98
|
+
- User acceptance testing
|
|
99
|
+
- Deployment to environments
|
|
100
|
+
- Performance metrics gathering
|
|
101
|
+
- User training
|
|
102
|
+
- Documentation creation (unless code comments)
|
|
103
|
+
- Business process changes
|
|
104
|
+
- Marketing activities
|
package/lib/constants.js
CHANGED
|
@@ -17,12 +17,10 @@ const FLOWS = {
|
|
|
17
17
|
description: 'AI-Driven Development Life Cycle - Best for greenfield projects with AI-native development',
|
|
18
18
|
path: 'aidlc'
|
|
19
19
|
},
|
|
20
|
-
|
|
21
|
-
name: '
|
|
22
|
-
description: '
|
|
23
|
-
path: '
|
|
24
|
-
disabled: true, // Not implemented yet
|
|
25
|
-
message: '(Coming soon)'
|
|
20
|
+
simple: {
|
|
21
|
+
name: 'Simple',
|
|
22
|
+
description: 'Spec-driven development - Best for quick feature specs without full methodology overhead',
|
|
23
|
+
path: 'simple'
|
|
26
24
|
}
|
|
27
25
|
};
|
|
28
26
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
const ToolInstaller = require('./ToolInstaller');
|
|
2
2
|
const path = require('path');
|
|
3
|
+
const fs = require('fs-extra');
|
|
4
|
+
const CLIUtils = require('../cli-utils');
|
|
5
|
+
const { theme } = CLIUtils;
|
|
3
6
|
|
|
4
7
|
class KiroInstaller extends ToolInstaller {
|
|
5
8
|
get key() {
|
|
@@ -17,6 +20,58 @@ class KiroInstaller extends ToolInstaller {
|
|
|
17
20
|
get detectPath() {
|
|
18
21
|
return '.kiro';
|
|
19
22
|
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Override to install commands and create specs symlink for simple flow
|
|
26
|
+
*/
|
|
27
|
+
async installCommands(flowPath, config) {
|
|
28
|
+
// Install commands (default behavior)
|
|
29
|
+
const installedCommands = await super.installCommands(flowPath, config);
|
|
30
|
+
|
|
31
|
+
// For simple flow, create symlink to make specs visible in Kiro
|
|
32
|
+
if (flowPath.includes('simple')) {
|
|
33
|
+
await this.createSpecsSymlink();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return installedCommands;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Create symlink from .kiro/specs to specs/ for Kiro specifications compatibility
|
|
41
|
+
*/
|
|
42
|
+
async createSpecsSymlink() {
|
|
43
|
+
const kiroSpecsPath = path.join('.kiro', 'specs');
|
|
44
|
+
const specsPath = 'specs';
|
|
45
|
+
|
|
46
|
+
// Check if .kiro/specs already exists
|
|
47
|
+
if (await fs.pathExists(kiroSpecsPath)) {
|
|
48
|
+
const stats = await fs.lstat(kiroSpecsPath);
|
|
49
|
+
if (stats.isSymbolicLink()) {
|
|
50
|
+
console.log(theme.dim(` .kiro/specs symlink already exists, skipping`));
|
|
51
|
+
} else {
|
|
52
|
+
console.log(theme.dim(` .kiro/specs already exists as folder, skipping symlink`));
|
|
53
|
+
}
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Ensure specs folder exists
|
|
58
|
+
await fs.ensureDir(specsPath);
|
|
59
|
+
|
|
60
|
+
try {
|
|
61
|
+
// Create relative symlink from .kiro/specs -> ../specs
|
|
62
|
+
await fs.ensureSymlink(path.join('..', specsPath), kiroSpecsPath);
|
|
63
|
+
CLIUtils.displayStatus('', 'Created .kiro/specs symlink for Kiro compatibility', 'success');
|
|
64
|
+
} catch (err) {
|
|
65
|
+
// Handle specific error cases
|
|
66
|
+
if (err.code === 'EPERM' || err.code === 'EACCES') {
|
|
67
|
+
console.log(theme.warning(` Cannot create symlink (permission denied). On Windows, try running as Administrator.`));
|
|
68
|
+
} else if (err.code === 'EEXIST') {
|
|
69
|
+
console.log(theme.dim(` .kiro/specs already exists, skipping symlink`));
|
|
70
|
+
} else {
|
|
71
|
+
console.log(theme.warning(` Failed to create specs symlink: ${err.message}`));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
20
75
|
}
|
|
21
76
|
|
|
22
77
|
module.exports = KiroInstaller;
|
|
@@ -11,12 +11,20 @@ class OpenCodeInstaller extends ToolInstaller {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
get commandsDir() {
|
|
14
|
-
return path.join('.opencode', '
|
|
14
|
+
return path.join('.opencode', 'command');
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
get detectPath() {
|
|
18
18
|
return '.opencode';
|
|
19
19
|
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* OpenCode requires 'agent: build' in command frontmatter.
|
|
23
|
+
* This inserts the line before the closing '---' of existing frontmatter.
|
|
24
|
+
*/
|
|
25
|
+
transformContent(content) {
|
|
26
|
+
return content.replace(/^(---\n[\s\S]*?)(---)/, '$1agent: build\n$2');
|
|
27
|
+
}
|
|
20
28
|
}
|
|
21
29
|
|
|
22
30
|
module.exports = OpenCodeInstaller;
|
|
@@ -56,7 +56,10 @@ class ToolInstaller {
|
|
|
56
56
|
const targetFileName = `specsmd-${prefix}${cmdFile}`;
|
|
57
57
|
const targetPath = path.join(targetCommandsDir, targetFileName);
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
let content = await fs.readFile(sourcePath, 'utf8');
|
|
60
|
+
if (this.transformContent) {
|
|
61
|
+
content = this.transformContent(content);
|
|
62
|
+
}
|
|
60
63
|
await fs.outputFile(targetPath, content, 'utf8');
|
|
61
64
|
installedFiles.push(targetFileName);
|
|
62
65
|
} catch (err) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specsmd",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Multi-agent orchestration system for AI-native software development. Delivers AI-DLC, Agile, and custom SDLC flows as markdown-based agent systems.",
|
|
5
5
|
"main": "lib/installer.js",
|
|
6
6
|
"bin": {
|