kspec 1.0.0 → 1.0.10

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 (3) hide show
  1. package/README.md +119 -2
  2. package/package.json +1 -1
  3. package/src/index.js +33 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # kspec — Spec-Driven Development for Kiro CLI
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/kspec-cli.svg)](https://www.npmjs.com/package/kspec-cli)
3
+ [![npm version](https://img.shields.io/npm/v/kspec.svg)](https://www.npmjs.com/package/kspec)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
5
 
6
6
  Spec-driven development workflow for Kiro CLI with verification at every step.
@@ -8,7 +8,7 @@ Spec-driven development workflow for Kiro CLI with verification at every step.
8
8
  ## Installation
9
9
 
10
10
  ```bash
11
- npm install -g kspec-cli
11
+ npm install -g kspec
12
12
  ```
13
13
 
14
14
  ## Quick Start
@@ -47,6 +47,9 @@ init → analyse → spec → verify-spec → tasks → verify-tasks → build
47
47
  | `kspec review` | Code review |
48
48
  | `kspec list` | List all specs |
49
49
  | `kspec status` | Current status |
50
+ | `kspec help` | Show help |
51
+ | `kspec --help, -h` | Show help (standard flag) |
52
+ | `kspec --version, -v` | Show version (standard flag) |
50
53
 
51
54
  ## Agents & Shortcuts
52
55
 
@@ -83,10 +86,124 @@ Set during `kspec init`:
83
86
  - **Date format**: YYYY-MM-DD, DD-MM-YYYY, or MM-DD-YYYY
84
87
  - **Auto-execute**: ask (default), auto, or dry-run
85
88
 
89
+ ## Integration with Kiro IDE
90
+
91
+ kspec and Kiro IDE work seamlessly together, combining structured workflow automation with interactive development assistance.
92
+
93
+ ### Workflow Integration
94
+
95
+ **kspec provides:**
96
+ - Structured spec creation and task generation
97
+ - Automated analysis and verification steps
98
+ - TDD workflow enforcement
99
+ - Project memory harvesting
100
+
101
+ **Kiro IDE provides:**
102
+ - Interactive implementation assistance
103
+ - Real-time code help and debugging
104
+ - Native spec workflow support
105
+ - Advanced AI-powered development tools
106
+
107
+ ### Usage Patterns
108
+
109
+ #### Pattern 1: kspec-Driven Development
110
+ ```bash
111
+ # Use kspec for structure and planning
112
+ kspec init
113
+ kspec analyse
114
+ kspec spec "User Authentication API"
115
+ kspec tasks
116
+
117
+ # Switch to Kiro IDE for implementation
118
+ # Reference spec files: #File .kspec/specs/2026-01-22-user-auth/spec.md
119
+ # Implement tasks interactively with AI assistance
120
+
121
+ # Return to kspec for verification
122
+ kspec verify
123
+ kspec done
124
+ ```
125
+
126
+ #### Pattern 2: Kiro-Native with kspec Analysis
127
+ ```bash
128
+ # Use Kiro's built-in spec workflow
129
+ # Create specs using Kiro IDE's native tools
130
+
131
+ # Use kspec for analysis and verification
132
+ kspec analyse # Update steering docs
133
+ kspec review # Code review
134
+ kspec verify # Verify implementation
135
+ ```
136
+
137
+ #### Pattern 3: Hybrid Approach
138
+ ```bash
139
+ kspec spec "Feature" # Create initial spec
140
+ # Edit and refine spec in Kiro IDE
141
+ kspec tasks # Generate tasks
142
+ # Implement tasks in Kiro IDE with AI assistance
143
+ kspec verify # Final verification
144
+ ```
145
+
146
+ ### File System Integration
147
+
148
+ Both tools share the same file structure:
149
+
150
+ ```
151
+ .kiro/
152
+ ├── steering/ # Shared project context
153
+ │ ├── product.md # Used by both kspec and Kiro
154
+ │ ├── tech.md # Technology standards
155
+ │ └── testing.md # Testing approach
156
+ └── agents/ # kspec-generated agents (usable in Kiro)
157
+
158
+ .kspec/
159
+ └── specs/ # kspec-generated specs
160
+ └── feature/
161
+ ├── spec.md # Reference in Kiro: #File .kspec/specs/feature/spec.md
162
+ ├── spec-lite.md # Concise version for context
163
+ ├── tasks.md # Task list
164
+ └── memory.md # Learnings
165
+ ```
166
+
167
+ ### Kiro IDE Context Usage
168
+
169
+ Reference kspec files in Kiro IDE chat:
170
+
171
+ ```
172
+ #File .kspec/specs/user-auth/spec.md # Full specification
173
+ #File .kspec/specs/user-auth/tasks.md # Task list
174
+ #Folder .kspec/specs/user-auth # Entire spec folder
175
+ #Folder .kiro/steering # Project context
176
+ ```
177
+
178
+ ### Agent Integration
179
+
180
+ kspec creates specialized agents that work in Kiro IDE:
181
+
182
+ - **kspec-analyse** (Ctrl+A): Codebase analysis
183
+ - **kspec-spec** (Ctrl+S): Specification creation
184
+ - **kspec-tasks** (Ctrl+T): Task generation
185
+ - **kspec-build** (Ctrl+B): TDD implementation
186
+ - **kspec-verify** (Ctrl+V): Verification
187
+ - **kspec-review** (Ctrl+R): Code review
188
+
189
+ Switch agents in Kiro IDE: `/agent swap` or use keyboard shortcuts.
190
+
191
+ ### Best Practices
192
+
193
+ 1. **Start with kspec** for structured planning and analysis
194
+ 2. **Use Kiro IDE** for interactive implementation and debugging
195
+ 3. **Reference kspec files** in Kiro chat for context
196
+ 4. **Leverage steering docs** updated by kspec analysis
197
+ 5. **Use kspec agents** within Kiro for specialized workflows
198
+ 6. **Verify with kspec** to ensure completeness
199
+
200
+ This integration gives you the best of both worlds: structured workflow automation and intelligent development assistance.
201
+
86
202
  ## Requirements
87
203
 
88
204
  - Node.js >= 18
89
205
  - Kiro CLI or Amazon Q CLI
206
+ - Kiro IDE (optional, for enhanced integration)
90
207
 
91
208
  ## License
92
209
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kspec",
3
- "version": "1.0.0",
3
+ "version": "1.0.10",
4
4
  "description": "Spec-driven development workflow for Kiro CLI",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -42,7 +42,26 @@ function formatDate(format) {
42
42
  }
43
43
 
44
44
  function slugify(text) {
45
- return text.slice(0, 50).toLowerCase().replace(/\s+/g, '-').replace(/[^a-z0-9-]/g, '').replace(/^-+|-+$/g, '');
45
+ // Extract key words and create a meaningful short identifier
46
+ const words = text.toLowerCase()
47
+ .replace(/[^a-z0-9\s]/g, ' ') // Replace non-alphanumeric with spaces
48
+ .split(/\s+/)
49
+ .filter(word => word.length > 2) // Remove short words
50
+ .filter(word => !['the', 'and', 'for', 'with', 'app', 'web', 'api'].includes(word)); // Remove common words
51
+
52
+ // Take first 3-4 meaningful words and truncate to max 25 chars total
53
+ let slug = words.slice(0, 4).join('-');
54
+ if (slug.length > 25) {
55
+ slug = words.slice(0, 3).join('-');
56
+ }
57
+ if (slug.length > 25) {
58
+ slug = words.slice(0, 2).join('-');
59
+ }
60
+ if (slug.length > 25) {
61
+ slug = slug.slice(0, 25);
62
+ }
63
+
64
+ return slug.replace(/^-+|-+$/g, '') || 'feature';
46
65
  }
47
66
 
48
67
  function detectCli() {
@@ -651,6 +670,8 @@ Other:
651
670
  kspec status Current status
652
671
  kspec agents List agents
653
672
  kspec help Show this help
673
+ kspec --help, -h Show this help
674
+ kspec --version, -v Show version
654
675
 
655
676
  Examples:
656
677
  kspec init
@@ -664,6 +685,17 @@ Examples:
664
685
  };
665
686
 
666
687
  async function run(args) {
688
+ // Handle standard CLI flags first
689
+ if (args.includes('--help') || args.includes('-h')) {
690
+ return commands.help();
691
+ }
692
+
693
+ if (args.includes('--version') || args.includes('-v')) {
694
+ const pkg = require('../package.json');
695
+ console.log(pkg.version);
696
+ return;
697
+ }
698
+
667
699
  const cmd = (args[0] || 'help').replace(/^\//, '');
668
700
  const cmdArgs = args.slice(1);
669
701