kspec 1.0.10 → 1.0.11
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/package.json +1 -1
- package/src/index.js +50 -39
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -71,7 +71,7 @@ function detectCli() {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
function requireCli() {
|
|
74
|
-
const cli =
|
|
74
|
+
const cli = detectCli();
|
|
75
75
|
if (!cli) die("Neither 'kiro-cli' nor 'q' found. Install Kiro CLI first.");
|
|
76
76
|
return cli;
|
|
77
77
|
}
|
|
@@ -204,6 +204,13 @@ const agentTemplates = {
|
|
|
204
204
|
'kspec-analyse.json': {
|
|
205
205
|
name: 'kspec-analyse',
|
|
206
206
|
description: 'Analyse codebase and update steering docs',
|
|
207
|
+
model: 'claude-sonnet-4',
|
|
208
|
+
tools: ['read', 'write'],
|
|
209
|
+
allowedTools: ['read', 'write'],
|
|
210
|
+
resources: [
|
|
211
|
+
'file://.kiro/steering/**/*.md',
|
|
212
|
+
'file://.kspec/**/*.md'
|
|
213
|
+
],
|
|
207
214
|
prompt: `You are the kspec analyser. Your job:
|
|
208
215
|
1. Analyse the codebase structure, tech stack, patterns
|
|
209
216
|
2. Review .kiro/steering/ docs
|
|
@@ -211,18 +218,20 @@ const agentTemplates = {
|
|
|
211
218
|
4. Identify risks, tech debt, improvement areas
|
|
212
219
|
|
|
213
220
|
Output a clear analysis report. Propose specific steering doc updates.`,
|
|
214
|
-
allowedTools: ['read', 'write'],
|
|
215
221
|
keyboardShortcut: 'ctrl+a',
|
|
216
|
-
welcomeMessage: 'Analysing codebase...'
|
|
217
|
-
toolsSettings: {
|
|
218
|
-
read: { allowedPaths: ['./**'] },
|
|
219
|
-
write: { allowedPaths: ['.kiro/steering/**'] }
|
|
220
|
-
}
|
|
222
|
+
welcomeMessage: 'Analysing codebase...'
|
|
221
223
|
},
|
|
222
224
|
|
|
223
225
|
'kspec-spec.json': {
|
|
224
226
|
name: 'kspec-spec',
|
|
225
227
|
description: 'Create feature specifications',
|
|
228
|
+
model: 'claude-sonnet-4',
|
|
229
|
+
tools: ['read', 'write'],
|
|
230
|
+
allowedTools: ['read', 'write'],
|
|
231
|
+
resources: [
|
|
232
|
+
'file://.kiro/steering/**/*.md',
|
|
233
|
+
'file://.kspec/**/*.md'
|
|
234
|
+
],
|
|
226
235
|
prompt: `You are the kspec specification writer. Your job:
|
|
227
236
|
1. Read .kiro/steering/ for project context
|
|
228
237
|
2. Create a comprehensive spec.md with:
|
|
@@ -237,18 +246,20 @@ Output a clear analysis report. Propose specific steering doc updates.`,
|
|
|
237
246
|
- Used for context after compression
|
|
238
247
|
|
|
239
248
|
Always create both files. spec-lite.md is critical for context retention.`,
|
|
240
|
-
allowedTools: ['read', 'write'],
|
|
241
249
|
keyboardShortcut: 'ctrl+s',
|
|
242
|
-
welcomeMessage: 'Ready to create specification.'
|
|
243
|
-
toolsSettings: {
|
|
244
|
-
read: { allowedPaths: ['./**'] },
|
|
245
|
-
write: { allowedPaths: ['.kspec/specs/**'] }
|
|
246
|
-
}
|
|
250
|
+
welcomeMessage: 'Ready to create specification.'
|
|
247
251
|
},
|
|
248
252
|
|
|
249
253
|
'kspec-tasks.json': {
|
|
250
254
|
name: 'kspec-tasks',
|
|
251
255
|
description: 'Generate implementation tasks from spec',
|
|
256
|
+
model: 'claude-sonnet-4',
|
|
257
|
+
tools: ['read', 'write'],
|
|
258
|
+
allowedTools: ['read', 'write'],
|
|
259
|
+
resources: [
|
|
260
|
+
'file://.kiro/steering/**/*.md',
|
|
261
|
+
'file://.kspec/**/*.md'
|
|
262
|
+
],
|
|
252
263
|
prompt: `You are the kspec task generator. Your job:
|
|
253
264
|
1. Read spec.md and spec-lite.md from the spec folder
|
|
254
265
|
2. Generate tasks.md with:
|
|
@@ -259,18 +270,20 @@ Always create both files. spec-lite.md is critical for context retention.`,
|
|
|
259
270
|
- File paths where changes occur
|
|
260
271
|
|
|
261
272
|
Tasks must be atomic and independently verifiable.`,
|
|
262
|
-
allowedTools: ['read', 'write'],
|
|
263
273
|
keyboardShortcut: 'ctrl+t',
|
|
264
|
-
welcomeMessage: 'Generating tasks from spec...'
|
|
265
|
-
toolsSettings: {
|
|
266
|
-
read: { allowedPaths: ['./**'] },
|
|
267
|
-
write: { allowedPaths: ['.kspec/specs/**'] }
|
|
268
|
-
}
|
|
274
|
+
welcomeMessage: 'Generating tasks from spec...'
|
|
269
275
|
},
|
|
270
276
|
|
|
271
277
|
'kspec-build.json': {
|
|
272
278
|
name: 'kspec-build',
|
|
273
279
|
description: 'Execute tasks with TDD',
|
|
280
|
+
model: 'claude-sonnet-4',
|
|
281
|
+
tools: ['read', 'write', 'shell'],
|
|
282
|
+
allowedTools: ['read', 'write', 'shell'],
|
|
283
|
+
resources: [
|
|
284
|
+
'file://.kiro/steering/**/*.md',
|
|
285
|
+
'file://.kspec/**/*.md'
|
|
286
|
+
],
|
|
274
287
|
prompt: `You are the kspec builder. Your job:
|
|
275
288
|
1. Read tasks.md, find first uncompleted task (- [ ])
|
|
276
289
|
2. For each task:
|
|
@@ -284,19 +297,20 @@ Tasks must be atomic and independently verifiable.`,
|
|
|
284
297
|
CRITICAL: Always update tasks.md after completing each task.
|
|
285
298
|
NEVER delete .kiro or .kspec folders.
|
|
286
299
|
Use non-interactive flags for commands (--yes, -y).`,
|
|
287
|
-
allowedTools: ['read', 'write', 'shell'],
|
|
288
300
|
keyboardShortcut: 'ctrl+b',
|
|
289
|
-
welcomeMessage: 'Building from tasks...'
|
|
290
|
-
toolsSettings: {
|
|
291
|
-
read: { allowedPaths: ['./**'] },
|
|
292
|
-
write: { allowedPaths: ['./**'] },
|
|
293
|
-
shell: { autoAllowReadonly: true }
|
|
294
|
-
}
|
|
301
|
+
welcomeMessage: 'Building from tasks...'
|
|
295
302
|
},
|
|
296
303
|
|
|
297
304
|
'kspec-verify.json': {
|
|
298
305
|
name: 'kspec-verify',
|
|
299
306
|
description: 'Verify spec, tasks, or implementation',
|
|
307
|
+
model: 'claude-sonnet-4',
|
|
308
|
+
tools: ['read', 'shell'],
|
|
309
|
+
allowedTools: ['read', 'shell'],
|
|
310
|
+
resources: [
|
|
311
|
+
'file://.kiro/steering/**/*.md',
|
|
312
|
+
'file://.kspec/**/*.md'
|
|
313
|
+
],
|
|
300
314
|
prompt: `You are the kspec verifier. Based on what you're asked to verify:
|
|
301
315
|
|
|
302
316
|
VERIFY-SPEC:
|
|
@@ -318,18 +332,20 @@ VERIFY-IMPLEMENTATION:
|
|
|
318
332
|
- List any gaps between spec and implementation
|
|
319
333
|
|
|
320
334
|
Output a clear verification report with pass/fail status.`,
|
|
321
|
-
allowedTools: ['read', 'shell'],
|
|
322
335
|
keyboardShortcut: 'ctrl+v',
|
|
323
|
-
welcomeMessage: 'What should I verify?'
|
|
324
|
-
toolsSettings: {
|
|
325
|
-
read: { allowedPaths: ['./**'] },
|
|
326
|
-
shell: { autoAllowReadonly: true }
|
|
327
|
-
}
|
|
336
|
+
welcomeMessage: 'What should I verify?'
|
|
328
337
|
},
|
|
329
338
|
|
|
330
339
|
'kspec-review.json': {
|
|
331
340
|
name: 'kspec-review',
|
|
332
341
|
description: 'Code review',
|
|
342
|
+
model: 'claude-sonnet-4',
|
|
343
|
+
tools: ['read', 'shell'],
|
|
344
|
+
allowedTools: ['read', 'shell'],
|
|
345
|
+
resources: [
|
|
346
|
+
'file://.kiro/steering/**/*.md',
|
|
347
|
+
'file://.kspec/**/*.md'
|
|
348
|
+
],
|
|
333
349
|
prompt: `You are the kspec code reviewer. Your job:
|
|
334
350
|
1. Review code changes (git diff or specified files)
|
|
335
351
|
2. Check compliance with .kiro/steering/
|
|
@@ -341,13 +357,8 @@ Output a clear verification report with pass/fail status.`,
|
|
|
341
357
|
4. Provide actionable feedback
|
|
342
358
|
|
|
343
359
|
Output: APPROVE / REQUEST_CHANGES with specific issues.`,
|
|
344
|
-
allowedTools: ['read', 'shell'],
|
|
345
360
|
keyboardShortcut: 'ctrl+r',
|
|
346
|
-
welcomeMessage: 'Ready to review. What should I look at?'
|
|
347
|
-
toolsSettings: {
|
|
348
|
-
read: { allowedPaths: ['./**'] },
|
|
349
|
-
shell: { allowedCommands: ['git diff*', 'git log*', 'git status*', 'git show*'], autoAllowReadonly: true }
|
|
350
|
-
}
|
|
361
|
+
welcomeMessage: 'Ready to review. What should I look at?'
|
|
351
362
|
}
|
|
352
363
|
};
|
|
353
364
|
|
|
@@ -706,4 +717,4 @@ async function run(args) {
|
|
|
706
717
|
}
|
|
707
718
|
}
|
|
708
719
|
|
|
709
|
-
module.exports = { run, commands, loadConfig };
|
|
720
|
+
module.exports = { run, commands, loadConfig, detectCli, requireCli, agentTemplates };
|