kspec 1.0.23 → 1.0.25

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/package.json +1 -1
  2. package/src/index.js +51 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kspec",
3
- "version": "1.0.23",
3
+ "version": "1.0.25",
4
4
  "description": "Spec-driven development workflow for Kiro CLI",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -661,7 +661,7 @@ WORKFLOW (do this autonomously):
661
661
  5. Update .kspec/.current with the spec folder path
662
662
  6. Update .kspec/CONTEXT.md with current state
663
663
 
664
- After completion, suggest: "Switch to kspec-tasks agent to generate implementation tasks"`,
664
+ Next step: Run \`/agent swap kspec-tasks\` or \`kspec tasks\` to generate implementation tasks.`,
665
665
  keyboardShortcut: 'ctrl+shift+s',
666
666
  welcomeMessage: 'Ready to create specification. Describe your feature.'
667
667
  },
@@ -693,7 +693,7 @@ WORKFLOW:
693
693
 
694
694
  Tasks must be atomic and independently verifiable.
695
695
 
696
- After completion, suggest: "Switch to kspec-build agent to start implementing tasks"`,
696
+ Next step: Run \`/agent swap kspec-build\` or \`kspec build\` to start implementing tasks.`,
697
697
  keyboardShortcut: 'ctrl+shift+t',
698
698
  welcomeMessage: 'Reading current spec and generating tasks...'
699
699
  },
@@ -730,7 +730,7 @@ CRITICAL:
730
730
  - NEVER delete .kiro or .kspec folders
731
731
  - Use non-interactive flags for commands (--yes, -y)
732
732
 
733
- When all tasks complete, suggest: "Switch to kspec-verify agent to verify implementation"`,
733
+ When all tasks complete: Run \`/agent swap kspec-verify\` or \`kspec verify\` to verify implementation.`,
734
734
  keyboardShortcut: 'ctrl+shift+b',
735
735
  welcomeMessage: 'Reading current task and building...'
736
736
  },
@@ -909,7 +909,9 @@ const commands = {
909
909
  }
910
910
 
911
911
  console.log('\n✅ kspec initialized!\n');
912
- console.log('Next: kspec analyse');
912
+ console.log('Next step:');
913
+ console.log(' kspec analyse');
914
+ console.log(' or inside kiro-cli: /agent swap kspec-analyse\n');
913
915
  },
914
916
 
915
917
  async analyse() {
@@ -992,6 +994,10 @@ Folder: ${folder}
992
994
 
993
995
  spec-lite.md is critical - it's loaded after context compression.`, 'kspec-spec');
994
996
  }
997
+
998
+ console.log('\nNext step:');
999
+ console.log(' kspec tasks');
1000
+ console.log(' or inside kiro-cli: /agent swap kspec-tasks\n');
995
1001
  },
996
1002
 
997
1003
  async 'verify-spec'(args) {
@@ -1140,6 +1146,10 @@ Create ${folder}/tasks.md with:
1140
1146
  - TDD approach (test first)
1141
1147
  - Logical order
1142
1148
  - File paths for each task`, 'kspec-tasks');
1149
+
1150
+ console.log('\nNext step:');
1151
+ console.log(' kspec build');
1152
+ console.log(' or inside kiro-cli: /agent swap kspec-build\n');
1143
1153
  },
1144
1154
 
1145
1155
  async 'verify-tasks'(args) {
@@ -1172,7 +1182,10 @@ Report: X/Y tasks done, gaps found, coverage assessment.`, 'kspec-verify');
1172
1182
  log(`Building: ${folder}`);
1173
1183
  if (stats) {
1174
1184
  if (stats.remaining === 0) {
1175
- log('All tasks completed! Run: kspec verify');
1185
+ log('All tasks completed!');
1186
+ console.log('\nNext step:');
1187
+ console.log(' kspec verify');
1188
+ console.log(' or inside kiro-cli: /agent swap kspec-verify\n');
1176
1189
  return;
1177
1190
  }
1178
1191
  log(`Progress: ${stats.done}/${stats.total} (${stats.remaining} remaining)`);
@@ -1197,6 +1210,18 @@ ${execNote}
1197
1210
 
1198
1211
  CRITICAL: Update tasks.md after each task completion.
1199
1212
  NEVER delete .kiro or .kspec folders.`, 'kspec-build');
1213
+
1214
+ // Show next step based on remaining tasks
1215
+ const updatedStats = getTaskStats(folder);
1216
+ if (updatedStats && updatedStats.remaining === 0) {
1217
+ console.log('\nAll tasks completed!');
1218
+ console.log('Next step:');
1219
+ console.log(' kspec verify');
1220
+ console.log(' or inside kiro-cli: /agent swap kspec-verify\n');
1221
+ } else if (updatedStats && updatedStats.remaining > 0) {
1222
+ console.log(`\n${updatedStats.remaining} tasks remaining.`);
1223
+ console.log('Continue: kspec build\n');
1224
+ }
1200
1225
  },
1201
1226
 
1202
1227
  async verify(args) {
@@ -1222,9 +1247,17 @@ Report:
1222
1247
  - Tasks: X/Y completed
1223
1248
  - Tests: PASS/FAIL
1224
1249
  - Gaps: [list any]`, 'kspec-verify');
1250
+
1251
+ console.log('\nIf verification passed:');
1252
+ console.log(' kspec done (to complete spec and harvest learnings)\n');
1225
1253
  },
1226
1254
 
1227
1255
  async refresh(args) {
1256
+ // Parse --force flag
1257
+ const forceIndex = args.indexOf('--force');
1258
+ const force = forceIndex !== -1;
1259
+ if (force) args.splice(forceIndex, 1);
1260
+
1228
1261
  const folder = getOrSelectSpec(args.join(' '));
1229
1262
  const specFile = path.join(folder, 'spec.md');
1230
1263
  const specLiteFile = path.join(folder, 'spec-lite.md');
@@ -1234,7 +1267,7 @@ Report:
1234
1267
  }
1235
1268
 
1236
1269
  const stale = isSpecStale(folder);
1237
- if (!stale && !args.includes('--force')) {
1270
+ if (!stale && !force) {
1238
1271
  log('spec-lite.md is up to date with spec.md');
1239
1272
  log('Use --force to regenerate anyway');
1240
1273
  return;
@@ -1363,15 +1396,23 @@ Output: APPROVE or REQUEST_CHANGES with specifics.`, 'kspec-review');
1363
1396
  if (stats) {
1364
1397
  console.log(`Tasks: ${stats.done}/${stats.total} completed`);
1365
1398
  if (stats.remaining > 0) {
1366
- console.log(`\nNext: kspec build`);
1399
+ console.log(`\nNext step:`);
1400
+ console.log(` kspec build`);
1401
+ console.log(` or inside kiro-cli: /agent swap kspec-build`);
1367
1402
  } else {
1368
- console.log(`\nNext: kspec verify`);
1403
+ console.log(`\nNext step:`);
1404
+ console.log(` kspec verify`);
1405
+ console.log(` or inside kiro-cli: /agent swap kspec-verify`);
1369
1406
  }
1370
1407
  } else {
1371
- console.log(`\nNext: kspec tasks`);
1408
+ console.log(`\nNext step:`);
1409
+ console.log(` kspec tasks`);
1410
+ console.log(` or inside kiro-cli: /agent swap kspec-tasks`);
1372
1411
  }
1373
1412
  } else {
1374
- console.log(`\nNo current spec. Run: kspec spec "Feature Name"`);
1413
+ console.log(`\nNo current spec.`);
1414
+ console.log(` kspec spec "Feature Name"`);
1415
+ console.log(` or inside kiro-cli: /agent swap kspec-spec`);
1375
1416
  }
1376
1417
  console.log('');
1377
1418
  },