kspec 1.0.17 → 1.0.18

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 (2) hide show
  1. package/README.md +128 -108
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
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
- Spec-driven development workflow for Kiro CLI with verification at every step.
6
+ Spec-driven development workflow for Kiro CLI with context management, verification at every step, and Jira integration.
7
7
 
8
8
  ## Installation
9
9
 
@@ -17,14 +17,45 @@ npm install -g kspec
17
17
  kspec init # Interactive setup
18
18
  kspec analyse # Analyse codebase
19
19
  kspec spec "User Auth API" # Create specification
20
- kspec verify-spec # Verify spec is complete
21
20
  kspec tasks # Generate tasks
22
- kspec verify-tasks # Verify tasks cover spec
23
21
  kspec build # Execute with TDD
24
22
  kspec verify # Verify implementation
25
23
  kspec done # Complete & harvest memory
26
24
  ```
27
25
 
26
+ ## Two Ways to Use kspec
27
+
28
+ ### 1. CLI Mode (Outside kiro-cli)
29
+
30
+ Run kspec commands from your terminal:
31
+
32
+ ```bash
33
+ kspec init
34
+ kspec spec "User Authentication"
35
+ kspec tasks
36
+ kspec build
37
+ ```
38
+
39
+ ### 2. Agent Mode (Inside kiro-cli) — Recommended
40
+
41
+ Stay inside your kiro-cli session and switch between specialized agents:
42
+
43
+ ```
44
+ $ kiro-cli
45
+
46
+ > /agent swap kspec-spec
47
+ > Build a todo app with categories
48
+ (agent creates spec.md, spec-lite.md, updates context)
49
+
50
+ > /agent swap kspec-tasks
51
+ (reads CONTEXT.md → knows current spec → generates tasks)
52
+
53
+ > /agent swap kspec-build
54
+ (reads CONTEXT.md → continues from current task)
55
+ ```
56
+
57
+ This approach solves the **context loss problem** — agents read `.kspec/CONTEXT.md` automatically to restore state after context compression.
58
+
28
59
  ## Workflow
29
60
 
30
61
  ```
@@ -44,166 +75,155 @@ init → analyse → spec → verify-spec → tasks → verify-tasks → build
44
75
  | `kspec build` | Execute tasks with TDD |
45
76
  | `kspec verify` | Verify implementation matches spec |
46
77
  | `kspec done` | Complete spec, harvest memory |
78
+ | `kspec context` | View/refresh context file |
47
79
  | `kspec review` | Code review |
48
80
  | `kspec list` | List all specs |
49
81
  | `kspec status` | Current status |
82
+ | `kspec agents` | List available agents |
83
+ | `kspec update` | Check for updates |
50
84
  | `kspec help` | Show help |
51
- | `kspec --help, -h` | Show help (standard flag) |
52
- | `kspec --version, -v` | Show version (standard flag) |
85
+
86
+ ### Jira Integration (requires Atlassian MCP)
87
+
88
+ | Command | Description |
89
+ |---------|-------------|
90
+ | `kspec spec --jira PROJ-123,PROJ-456 "Feature"` | Create spec from Jira issues |
91
+ | `kspec sync-jira` | Create Jira issue from spec |
92
+ | `kspec sync-jira --update PROJ-123` | Update existing Jira issue |
93
+ | `kspec jira-subtasks` | Create Jira subtasks from tasks.md |
94
+ | `kspec jira-subtasks PROJ-123` | Create subtasks under specific issue |
95
+
96
+ ## Context Management
97
+
98
+ kspec maintains context that survives AI context compression:
99
+
100
+ ```
101
+ .kspec/CONTEXT.md (auto-generated)
102
+ ├── Current Spec: 2026-01-24-user-auth
103
+ ├── Task: 3/12 - Implement JWT validation
104
+ ├── Requirements Summary (from spec-lite)
105
+ ├── Decisions & Learnings
106
+ └── Jira Links (if integrated)
107
+ ```
108
+
109
+ Agents read CONTEXT.md first, automatically restoring state after context compression.
110
+
111
+ ```bash
112
+ kspec context # View and refresh context manually
113
+ ```
53
114
 
54
115
  ## Agents & Shortcuts
55
116
 
56
117
  | Agent | Shortcut | Purpose |
57
118
  |-------|----------|---------|
58
- | kspec-analyse | Ctrl+A | Analyse codebase |
59
- | kspec-spec | Ctrl+S | Create specifications |
60
- | kspec-tasks | Ctrl+T | Generate tasks |
61
- | kspec-build | Ctrl+B | Execute with TDD |
62
- | kspec-verify | Ctrl+V | Verify spec/tasks/impl |
63
- | kspec-review | Ctrl+R | Code review |
119
+ | kspec-analyse | Ctrl+Shift+A | Analyse codebase |
120
+ | kspec-spec | Ctrl+Shift+S | Create specifications |
121
+ | kspec-tasks | Ctrl+Shift+T | Generate tasks |
122
+ | kspec-build | Ctrl+Shift+B | Execute with TDD |
123
+ | kspec-verify | Ctrl+Shift+V | Verify spec/tasks/impl |
124
+ | kspec-review | Ctrl+Shift+R | Code review |
125
+ | kspec-jira | Ctrl+Shift+J | Jira integration |
126
+
127
+ Switch agents in kiro-cli: `/agent swap kspec-build` or use keyboard shortcuts.
64
128
 
65
129
  ## Structure
66
130
 
67
131
  ```
68
132
  .kspec/
69
133
  ├── config.json # User preferences
134
+ ├── .current # Current active spec path
135
+ ├── CONTEXT.md # Auto-generated context for agents
70
136
  ├── memory.md # Project learnings
71
137
  └── specs/
72
138
  └── 2026-01-22-feature/
73
139
  ├── spec.md # Full specification
74
140
  ├── spec-lite.md # Concise (for context compression)
75
141
  ├── tasks.md # Implementation tasks
76
- └── memory.md # Feature learnings
142
+ ├── memory.md # Feature learnings
143
+ └── jira-links.json # Jira issue links (if integrated)
77
144
 
78
145
  .kiro/
79
- └── steering/ # Project rules (Kiro native)
146
+ ├── steering/ # Project rules (Kiro native)
147
+ └── agents/ # kspec-generated agents
80
148
  ```
81
149
 
82
- ## Configuration
83
-
84
- Set during `kspec init`:
85
-
86
- - **Date format**: YYYY-MM-DD, DD-MM-YYYY, or MM-DD-YYYY
87
- - **Auto-execute**: ask (default), auto, or dry-run
88
-
89
- ## Integration with Kiro IDE
90
-
91
- kspec and Kiro IDE work seamlessly together, combining structured workflow automation with interactive development assistance.
150
+ ## Jira Integration
92
151
 
93
- ### Workflow Integration
152
+ Bridge the gap between BAs/PMs and developers by integrating with Jira via Atlassian MCP.
94
153
 
95
- **kspec provides:**
96
- - Structured spec creation and task generation
97
- - Automated analysis and verification steps
98
- - TDD workflow enforcement
99
- - Project memory harvesting
154
+ ### Pull Requirements from Jira
100
155
 
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
156
  ```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
157
+ kspec spec --jira PROJ-123,PROJ-456 "User Authentication"
124
158
  ```
125
159
 
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
160
+ This fetches issue details, extracts acceptance criteria, and creates a unified spec with source attribution.
130
161
 
131
- # Use kspec for analysis and verification
132
- kspec analyse # Update steering docs
133
- kspec review # Code review
134
- kspec verify # Verify implementation
135
- ```
162
+ ### Push Specs to Jira
136
163
 
137
- #### Pattern 3: Hybrid Approach
138
164
  ```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
165
+ kspec sync-jira # Create new issue
166
+ kspec sync-jira --update PROJ-789 # Update existing issue
144
167
  ```
145
168
 
146
- ### File System Integration
169
+ Create or update Jira issues with spec content for BA/PM review.
147
170
 
148
- Both tools share the same file structure:
171
+ ### Create Subtasks
149
172
 
173
+ ```bash
174
+ kspec jira-subtasks PROJ-789
150
175
  ```
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
176
 
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
177
+ Generate Jira subtasks from tasks.md for progress tracking.
178
+
179
+ ### Prerequisites
180
+
181
+ Configure Atlassian MCP in `~/.kiro/mcp.json`:
182
+
183
+ ```json
184
+ {
185
+ "mcpServers": {
186
+ "atlassian": {
187
+ "command": "npx",
188
+ "args": ["-y", "@anthropic/mcp-atlassian"],
189
+ "env": {
190
+ "ATLASSIAN_HOST": "https://your-domain.atlassian.net",
191
+ "ATLASSIAN_EMAIL": "your-email@example.com",
192
+ "ATLASSIAN_API_TOKEN": "your-api-token"
193
+ }
194
+ }
195
+ }
196
+ }
165
197
  ```
166
198
 
167
- ### Kiro IDE Context Usage
199
+ Get your API token: https://id.atlassian.com/manage-profile/security/api-tokens
168
200
 
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
- ```
201
+ ## Configuration
177
202
 
178
- ### Agent Integration
203
+ Set during `kspec init`:
179
204
 
180
- kspec creates specialized agents that work in Kiro IDE:
205
+ - **Date format**: YYYY-MM-DD, DD-MM-YYYY, or MM-DD-YYYY
206
+ - **Auto-execute**: ask (default), auto, or dry-run
181
207
 
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
208
+ ## Auto-Updates
188
209
 
189
- Switch agents in Kiro IDE: `/agent swap` or use keyboard shortcuts.
210
+ kspec checks for updates automatically (cached for 24 hours). Check manually:
190
211
 
191
- ### Best Practices
212
+ ```bash
213
+ kspec update
214
+ ```
192
215
 
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
216
+ Or check when viewing version:
199
217
 
200
- This integration gives you the best of both worlds: structured workflow automation and intelligent development assistance.
218
+ ```bash
219
+ kspec --version
220
+ ```
201
221
 
202
222
  ## Requirements
203
223
 
204
224
  - Node.js >= 18
205
225
  - Kiro CLI or Amazon Q CLI
206
- - Kiro IDE (optional, for enhanced integration)
226
+ - Atlassian MCP (optional, for Jira integration)
207
227
 
208
228
  ## License
209
229
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kspec",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "description": "Spec-driven development workflow for Kiro CLI",
5
5
  "main": "src/index.js",
6
6
  "bin": {