@skitterbyte/skitterspec 16.8.0 → 16.10.0

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.
@@ -1,6 +1,6 @@
1
1
  ---
2
- description: Put one spec live on the already-running dev server (take | release | abort | status)
3
- argument-hint: "[take <spec> | release | abort | status]"
2
+ description: Put one spec live on the already-running dev server — `<spec>` takes it, a bare `take` takes the spec you are on, `main` hands the instance back
3
+ argument-hint: "[<spec> | main | take | release | abort | status]"
4
4
  allowed-tools: Bash({{exec}} skitterspec spec-env live:*)
5
5
  disable-model-invocation: true
6
6
  ---
@@ -55,7 +55,8 @@ your canonical `localhost` ports so you can test it at the normal URL
55
55
  move, header edits, the code) happens on the spec's branch in the worktree; `main`
56
56
  changes only when it merges. Teardown is folded into `/spec-complete` ·
57
57
  `/spec-cancel`. Beneath the skills, `skitterspec spec-env
58
- <up|down|prune|dev|connect|integrate|hotfix>` is the CLI engine. Teardown drops
58
+ <up|down|prune|dev|connect|integrate|hotfix|live|status|resolve>` is the CLI
59
+ engine (omit the spec name and it uses the worktree you are standing in). Teardown drops
59
60
  the finished spec's own test-DB volume; `spec-env prune` additionally reaps
60
61
  **orphaned** volumes left by declined/aborted teardowns, so `/spec-complete` and
61
62
  `/spec-cancel` also sweep orphans (confirm-first). A **hotfix** is the one
@@ -174,6 +174,8 @@ fix narrative and decisions — keep them separate.
174
174
 
175
175
 
176
176
 
177
+
178
+
177
179
  ## 5. Drive to GREEN
178
180
 
179
181
  - Implement the **minimal, root-cause** fix. Match surrounding code; honour all
@@ -185,6 +185,8 @@ narrative and decisions).
185
185
 
186
186
 
187
187
 
188
+
189
+
188
190
  ## 6. Drive to GREEN
189
191
 
190
192
  - Implement the **minimal, root-cause** fix on the branch. Match surrounding code;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skitterbyte/skitterspec",
3
- "version": "16.8.0",
3
+ "version": "16.10.0",
4
4
  "description": "Spec-driven development for Claude Code — a tracker-free filesystem workflow: lifecycle skills and per-spec isolation. For Linear sync, install @skitterbyte/skitterspec-linear instead.",
5
5
  "keywords": [
6
6
  "claude",
package/src/cli.js CHANGED
@@ -1151,25 +1151,53 @@ const DEPS_RE = /(^|\/)(package\.json|pnpm-lock\.yaml|package-lock\.json|yarn\.l
1151
1151
  // receipt is advisory metadata. `status` is read-only; `take` performs the switch
1152
1152
  // (release/abort land in a later phase).
1153
1153
  async function specEnvLive(dir, config, positional) {
1154
- const action = positional[0] || 'status'
1154
+ const { action, specArg } = liveGrammar(dir, config, positional)
1155
1155
  switch (action) {
1156
1156
  case 'status':
1157
- specEnvLiveStatus(dir, config, positional[1])
1157
+ specEnvLiveStatus(dir, config, specArg)
1158
1158
  break
1159
1159
  case 'take':
1160
- await specEnvLiveTake(dir, config, positional[1])
1160
+ await specEnvLiveTake(dir, config, specArg)
1161
1161
  break
1162
1162
  case 'release':
1163
- await specEnvLiveRelease(dir, config, positional[1])
1163
+ await specEnvLiveRelease(dir, config, specArg)
1164
1164
  break
1165
1165
  case 'abort':
1166
1166
  await specEnvLiveAbort(dir, config)
1167
1167
  break
1168
1168
  default:
1169
- process.stdout.write('Usage: skitterspec spec-env live <take|release|abort|status> [spec]\n')
1169
+ process.stdout.write(
1170
+ 'Usage: skitterspec spec-env live <spec>|<base branch>|<take|release|abort|status> [spec]\n',
1171
+ )
1170
1172
  }
1171
1173
  }
1172
1174
 
1175
+ const LIVE_VERBS = new Set(['status', 'take', 'release', 'abort'])
1176
+
1177
+ // The two front doors every doc names — `/spec-live <spec>` and `/spec-live main`
1178
+ // — translated to verbs. They live here rather than in the command because
1179
+ // `.claude/commands/spec-live.md` relays `$ARGUMENTS` untranslated (it is a
1180
+ // pre-executed script, with no model turn to rewrite them); the skill this
1181
+ // replaced did the translation itself, which is how these forms came to be
1182
+ // documented but unimplemented. `connect` needs no equivalent — its argument was
1183
+ // always spec-shaped (`specArg || 'main'`).
1184
+ //
1185
+ // VERB PRECEDENCE IS DELIBERATE, and so is the order below: the four verbs and
1186
+ // the base branch are matched BEFORE the spec-name fallback, so a spec folder
1187
+ // that happens to be called `status` cannot silently branch-switch the primary
1188
+ // checkout. Such a spec is still reachable — as `live take status`. The literal
1189
+ // `main` is honoured even where the base branch is named something else,
1190
+ // matching `connect main`, so the muscle memory works in either repo.
1191
+ function liveGrammar(dir, config, positional) {
1192
+ const [first, second] = positional
1193
+ if (!first) return { action: 'status', specArg: undefined }
1194
+ if (LIVE_VERBS.has(first)) return { action: first, specArg: second }
1195
+ if (first === 'main' || first === resolveBaseBranch(config, gitReader(dir))) {
1196
+ return { action: 'release', specArg: undefined }
1197
+ }
1198
+ return { action: 'take', specArg: first }
1199
+ }
1200
+
1173
1201
  // Take the running instance: rebase the spec's branch onto base, free it from its
1174
1202
  // worktree, and check it out in the primary checkout so the dev server reloads it.
1175
1203
  async function specEnvLiveTake(dir, config, specArg) {
@@ -1466,7 +1494,9 @@ async function specEnv(rest) {
1466
1494
  ' [spec] is optional for up/down/dev/integrate/hotfix/resolve and live take:\n' +
1467
1495
  ' omit it and the sole provisioned spec is used (several -> it lists them).\n' +
1468
1496
  ' NOTE connect and live status keep their own meaning for a missing spec:\n' +
1469
- ' connect disconnects (= main), live status reports on the whole repo.\n',
1497
+ ' connect disconnects (= main), live status reports on the whole repo.\n' +
1498
+ ' connect and live also take a bare spec name: `live <spec>` takes the\n' +
1499
+ ' instance, `live main` (or your base branch) hands it back.\n',
1470
1500
  )
1471
1501
  }
1472
1502
  }