specsmd 0.0.0-dev.3 → 0.0.0-dev.31

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 +356 -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,133 @@
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 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**: `memory-bank/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
+ The spec is complete. You now have:
113
+ - requirements.md - What to build
114
+ - design.md - How to build it
115
+ - tasks.md - Step-by-step implementation plan
116
+
117
+ You can start executing tasks by asking me to work on a specific task,
118
+ or I can recommend the next task to work on.
119
+ ```
120
+
121
+ ## Phase Transitions
122
+
123
+ **Backward**: If user identifies gaps:
124
+ - Design changes → Return to design skill
125
+ - Requirement changes → Return to requirements skill
126
+
127
+ **Forward**: On approval:
128
+ - Workflow complete
129
+ - User can now request task execution
130
+
131
+ ## Template Reference
132
+
133
+ 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,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,99 @@
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
+ - `- [ ]` - Pending task
59
+ - `- [x]` - Completed task
60
+ - `- [ ]*` - Optional task (nice-to-have, not blocking)
61
+
62
+ ### Numbering Rules
63
+ - Top-level tasks: `1.`, `2.`, `3.`
64
+ - Sub-tasks: `2.1`, `2.2`, `2.3`
65
+ - Maximum 2 levels (no `2.1.1`)
66
+ - Parent tasks with sub-tasks are GROUP HEADERS (not directly executed)
67
+ - Mark parent complete only when ALL sub-tasks are done
68
+ - Tasks without sub-tasks are directly executable
69
+ - Use sub-tasks when a feature has 3+ related implementation steps
70
+
71
+ ### Requirement References
72
+ - Always include: `_Requirements: X.Y, X.Z_`
73
+ - Reference specific acceptance criteria numbers
74
+ - Every requirement should be covered by at least one task
75
+
76
+ ### Task Content
77
+ Each task should include:
78
+ 1. **Clear objective** - What to implement
79
+ 2. **Implementation details** - Sub-bullets with specifics
80
+ 3. **Requirement reference** - Traceability
81
+
82
+ ## Guidelines
83
+
84
+ 1. **Coding tasks ONLY** - No deployment, user testing, documentation
85
+ 2. **Incremental progress** - Each task builds on previous
86
+ 3. **Test-driven where appropriate** - Mark test tasks with `*` if optional
87
+ 4. **Include checkpoints** - Periodic verification that tests pass
88
+ 5. **Reference requirements** - Every task traces to requirement(s)
89
+ 6. **Actionable by AI** - Tasks should be specific enough for code generation
90
+
91
+ ## Excluded Task Types (Do NOT include)
92
+
93
+ - User acceptance testing
94
+ - Deployment to environments
95
+ - Performance metrics gathering
96
+ - User training
97
+ - Documentation creation (unless code comments)
98
+ - Business process changes
99
+ - Marketing activities
@@ -57,7 +57,11 @@ class AnalyticsTracker {
57
57
  this.mixpanel = Mixpanel.init(MIXPANEL_TOKEN, {
58
58
  protocol: 'https',
59
59
  host: 'api-eu.mixpanel.com', // EU endpoint for GDPR compliance
60
- geolocate: true // Enable IP-based geolocation
60
+ // Note: geolocate: true enables IP-based geolocation for analytics.
61
+ // This data is used solely for aggregate usage insights (e.g., country-level
62
+ // adoption patterns). No personal identifiers are collected. Users can
63
+ // opt out via the --no-telemetry flag or SPECSMD_NO_TELEMETRY env var.
64
+ geolocate: true
61
65
  });
62
66
 
63
67
  // Generate IDs
@@ -118,7 +122,7 @@ class AnalyticsTracker {
118
122
  if (waitForDelivery) {
119
123
  return new Promise((resolve) => {
120
124
  try {
121
- this.mixpanel.track(eventName, eventData, (err) => {
125
+ this.mixpanel.track(eventName, eventData, () => {
122
126
  // Resolve regardless of error - silent failure
123
127
  resolve();
124
128
  });
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
- agile: {
21
- name: 'Agile',
22
- description: 'Sprint-based Agile development - Best for iterative development with changing requirements',
23
- path: 'agile',
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
 
package/lib/installer.js CHANGED
@@ -229,6 +229,9 @@ async function installFlow(flowKey, toolKeys) {
229
229
  if (await fs.pathExists(path.join(flowPath, 'shared'))) {
230
230
  await fs.copy(path.join(flowPath, 'shared'), path.join(targetFlowDir, 'shared'));
231
231
  }
232
+ if (await fs.pathExists(path.join(flowPath, 'scripts'))) {
233
+ await fs.copy(path.join(flowPath, 'scripts'), path.join(targetFlowDir, 'scripts'));
234
+ }
232
235
 
233
236
  // Copy config files
234
237
  if (await fs.pathExists(path.join(flowPath, 'memory-bank.yaml'))) {
@@ -250,20 +253,6 @@ async function installFlow(flowKey, toolKeys) {
250
253
 
251
254
  CLIUtils.displayStatus('', 'Installed flow resources', 'success');
252
255
 
253
- // Step 2.5: Install local scripts for deterministic operations
254
- // These scripts are version-matched to the installed specsmd version
255
- const scriptsDir = path.join(specsmdDir, 'scripts');
256
- await fs.ensureDir(scriptsDir);
257
-
258
- const sourceScriptsDir = path.join(__dirname, '..', 'scripts');
259
- if (await fs.pathExists(sourceScriptsDir)) {
260
- await fs.copy(sourceScriptsDir, scriptsDir);
261
- CLIUtils.displayStatus('', 'Installed local scripts', 'success');
262
- }
263
-
264
- // Note: Scripts are invoked directly via relative path (e.g., node .specsmd/scripts/bolt-complete.js)
265
- // No npm scripts added to package.json to avoid dependency on package.json for execution
266
-
267
256
  // NOTE: memory-bank/ is NOT created during installation
268
257
  // It will be created when user runs project-init
269
258
  // This allows us to detect if project is initialized by checking for memory-bank/standards/
@@ -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,46 @@ 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
+ // Only create if .kiro/specs doesn't exist
47
+ if (await fs.pathExists(kiroSpecsPath)) {
48
+ console.log(theme.dim(` .kiro/specs already exists, skipping symlink`));
49
+ return;
50
+ }
51
+
52
+ // Ensure specs folder exists
53
+ await fs.ensureDir(specsPath);
54
+
55
+ try {
56
+ // Create relative symlink from .kiro/specs -> ../specs
57
+ await fs.ensureSymlink(path.join('..', specsPath), kiroSpecsPath);
58
+ CLIUtils.displayStatus('', 'Created .kiro/specs symlink for Kiro compatibility', 'success');
59
+ } catch (err) {
60
+ console.log(theme.warning(` Failed to create specs symlink: ${err.message}`));
61
+ }
62
+ }
20
63
  }
21
64
 
22
65
  module.exports = KiroInstaller;
@@ -1,8 +1,5 @@
1
1
  const ToolInstaller = require('./ToolInstaller');
2
- const fs = require('fs-extra');
3
2
  const path = require('path');
4
- const CLIUtils = require('../cli-utils');
5
- const { theme } = CLIUtils;
6
3
 
7
4
  class WindsurfInstaller extends ToolInstaller {
8
5
  get key() {
@@ -20,57 +17,6 @@ class WindsurfInstaller extends ToolInstaller {
20
17
  get detectPath() {
21
18
  return '.windsurf';
22
19
  }
23
-
24
- /**
25
- * Override to add frontmatter for Windsurf workflows
26
- */
27
- async installCommands(flowPath, config) {
28
- const targetCommandsDir = this.commandsDir;
29
- console.log(theme.dim(` Installing workflows to ${targetCommandsDir}/...`));
30
- await fs.ensureDir(targetCommandsDir);
31
-
32
- const commandsSourceDir = path.join(flowPath, 'commands');
33
-
34
- if (!await fs.pathExists(commandsSourceDir)) {
35
- console.log(theme.warning(` No commands folder found at ${commandsSourceDir}`));
36
- return [];
37
- }
38
-
39
- const commandFiles = await fs.readdir(commandsSourceDir);
40
- const installedFiles = [];
41
-
42
- for (const cmdFile of commandFiles) {
43
- if (cmdFile.endsWith('.md')) {
44
- const sourcePath = path.join(commandsSourceDir, cmdFile);
45
- const prefix = (config && config.command && config.command.prefix) ? `${config.command.prefix}-` : '';
46
-
47
- const targetFileName = `specsmd-${prefix}${cmdFile}`;
48
- const targetPath = path.join(targetCommandsDir, targetFileName);
49
-
50
- // Extract agent name from target filename (e.g., "specsmd-master-agent.md" -> "specsmd-master-agent")
51
- const agentName = targetFileName.replace(/\.md$/, '');
52
-
53
- // Read source content and add Windsurf frontmatter
54
- let content = await fs.readFile(sourcePath, 'utf8');
55
-
56
- // Add Windsurf-specific frontmatter if not present
57
- if (!content.startsWith('---')) {
58
- const frontmatter = `---
59
- description: ${agentName}
60
- ---
61
-
62
- `;
63
- content = frontmatter + content;
64
- }
65
-
66
- await fs.writeFile(targetPath, content);
67
- installedFiles.push(targetFileName);
68
- }
69
- }
70
-
71
- CLIUtils.displayStatus('', `Installed ${installedFiles.length} workflows for ${this.name}`, 'success');
72
- return installedFiles;
73
- }
74
20
  }
75
21
 
76
22
  module.exports = WindsurfInstaller;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specsmd",
3
- "version": "0.0.0-dev.3",
3
+ "version": "0.0.0-dev.31",
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": {