@skitterbyte/skitterspec 23.24.1 → 23.24.3

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.
@@ -1997,6 +1997,10 @@ a.ticket:hover { border-color: var(--accent); }
1997
1997
  // because `Commit & Continue` names a next phase a spec with no phase files
1998
1998
  // does not have. Same three buttons as `refresh`, a different subject.
1999
1999
  fix: ['commit', 'changes', 'discuss'],
2000
+ // A PHASE STOPPED AT ITS MANUAL STEPS: the code half commits so it can go
2001
+ // live and be tested; the steps come next, so there is nothing to Continue
2002
+ // into. `/spec-next` §3 renders it, and arms nothing.
2003
+ manual: ['commit', 'changes', 'discuss'],
2000
2004
  // A KEPT PHASE of an autonomous run: the run committed it and carried on,
2001
2005
  // so there is nothing to decide here — it is read, not answered.
2002
2006
  snapshot: [],
@@ -309,28 +309,55 @@ Then build it, following the project rules in `.claude/rules/*.md` and `CLAUDE.m
309
309
  - Never hardcode dates in tests; never run destructive commands against a real
310
310
  database — use the project's test database only.
311
311
 
312
- ### Manual steps — list them, then ask
312
+ ### Manual steps — list them, end the turn, ask when they come back
313
313
 
314
314
  Some tasks are a person's to do: every task in an **Issue** spec, and any task
315
315
  you cannot perform yourself — operate a UI, check a device, confirm something
316
316
  on a board, run a manual test pass. That is a **judgment**, not a marker: there
317
317
  is no `(manual)` tag to look for, and a spec written before this rule has none.
318
318
 
319
- Build the tasks before the first manual one as usual. Then **stop at it** and
320
- print **every remaining manual step of this phase, verbatim and numbered**, as a
321
- plain markdown list in the conversation — never fenced, and
322
- **never only the phase file's path**. A pointer to the file sends the reader
323
- out of the terminal to find out what to do, which is the failure this exists to
324
- fix; the steps themselves are what they act on.
319
+ Build the tasks before the first manual one as usual, to green.
320
+ Then **stop at it** and print
321
+ **every remaining manual step of this phase, verbatim and numbered** —
322
+ never fenced, and **never only the phase file's path**. A pointer to the file
323
+ sends the reader out of the terminal to find out what to do, which is the
324
+ failure this exists to fix; the steps themselves are what they act on.
325
325
 
326
326
  **Steps you had to write are saved first.** When the phase file holds only a
327
327
  vague manual task — "check it on the running host" — and you wrote the steps
328
328
  yourself, add them under that task as numbered sub-checkboxes **before** you
329
- ask. The conversation does not survive a `/clear`, and a later run that makes
330
- up its own set lists different steps from the ones the reader was shown. A
331
- phase whose manual steps are already tasks is left as it is.
332
-
333
- Then ask one question, with three answers:
329
+ list them. The conversation does not survive a `/clear`, and a later run that
330
+ makes up its own set lists different steps from the ones the reader was shown.
331
+ A phase whose manual steps are already tasks is left as it is.
332
+
333
+ **The first listing ends the turn, and asks no question.** Asking in the same
334
+ turn fails twice over (ereqs, 2026-11-24): the harness's question dialog can
335
+ cover the text before it, so the reader sees "how did it go?" with no steps;
336
+ and the work is not reachable yet — uncommitted in this worktree, not live, not
337
+ on the base branch — so nothing could have been tested. The stop is a report:
338
+
339
+ 1. **Render the page for the code built so far**, only where the project has
340
+ isolation: `skitterspec spec-env review <spec> --buttons manual`. The
341
+ `manual` set offers `Commit` and drops `Commit & Continue`: the code half
342
+ commits so `/spec-live` can take a clean tree, and what follows is a
343
+ person's testing, not a build. It **does not arm** the gate — the phase did
344
+ not end. Committing part of a phase is deliberate here, unlike a `midrun`
345
+ page: the manual steps test this code, and it cannot be reached until it is
346
+ committed. Wait for the verdict as §5 does, under its banner; a `Commit`
347
+ runs through `/spec-diff` §2a.
348
+ 2. **End `⚠️`**, `Why` the phase stopped at its manual steps. `Next` first
349
+ names how to reach the work — `/commit`, then `/spec-live`; or
350
+ `/commit`, then `/spec-to-main` where live refuses the branch (it touches
351
+ migrations, which would change the shared database) or a step needs it on
352
+ the base branch — then the steps a row each, then a closing row: *tell me
353
+ how it went, or `/spec-next`*. The rows follow
354
+ `.claude/rules/spec-reports.md`, *Open manual steps are rows*.
355
+
356
+ **The operator's next message is the answer** — "all done", "step 5 failed:
357
+ …" — read as one of the three below. Or a later `/spec-next` finds the steps
358
+ still unticked: re-list them, and now that the operator has come back, ask.
359
+ A picker carries the steps **inside the question text**,
360
+ never only in the text before it. The three answers:
334
361
 
335
362
  - **All done** — tick those steps and carry on to the end of the phase.
336
363
  - **Some failed** — the picker cannot list the steps (it holds four options and
@@ -340,16 +367,10 @@ Then ask one question, with three answers:
340
367
  never switch.
341
368
  - **Not yet** — tick nothing.
342
369
 
343
- This is the mid-run question `.claude/rules/spec-reports.md` already allows —
344
- whether a person did something is a question you cannot answer yourself — so it
345
- needs no new shape in the report.
346
-
347
- **Some failed or Not yet leaves the phase `🔄`, and stops the run there.** Code
348
- tasks after an unconfirmed step are not built past it, and the phase did not
349
- end: **skip §4's done-marking and §5 entirely** — no page, no arm, no wait.
350
- End `⚠️` and name `/spec-next` in `Next`; it re-lists the same unticked steps.
351
- Its `Next` lists the open steps a row each, copied from the phase file —
352
- `.claude/rules/spec-reports.md`, *Open manual steps are rows*.
370
+ **The stop, Some failed and Not yet leave the phase `🔄`, and stop the run there.** Code tasks after an unconfirmed step are not built past it, and the
371
+ phase did not end: **skip §4's done-marking and §5's committing render** — on
372
+ an answer, no page, no arm, no wait. End `⚠️` and name `/spec-next` in `Next`;
373
+ it re-lists the same unticked steps, a row each, copied from the phase file.
353
374
 
354
375
  ## 4. Record progress
355
376
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skitterbyte/skitterspec",
3
- "version": "23.24.1",
3
+ "version": "23.24.3",
4
4
  "description": "Spec-driven development for Claude Code \u2014 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
@@ -344,6 +344,7 @@ Usage:
344
344
  prune reap orphaned test-DB volumes (--older-than <days>)
345
345
  dev up <spec> start host dev servers on the spec's ports
346
346
  dev down <spec> stop the spec's host dev servers
347
+ (--plan on either: describe, touch nothing)
347
348
  connect <spec> expose a spec on the canonical ports (main = off)
348
349
  integrate <spec> plan the land: rebase + fast-forward, or in PR
349
350
  mode push + PR (--push, --draft, --strategy);
@@ -7119,12 +7120,17 @@ async function specEnvReview(dir, config, specArg, flags, invokedFrom = dir) {
7119
7120
  // servers (e.g. `pnpm dev`) need a block even on a worktree-only spec, so `up`
7120
7121
  // allocates a slot if the spec has none (idempotent). The planner is pure
7121
7122
  // (dev.js); the spawning/killing lives in supervise.js.
7122
- async function specEnvDev(dir, config, positional) {
7123
+ //
7124
+ // `--plan` describes and touches nothing — no slot reserved, nothing spawned or
7125
+ // killed — as it does on `up`, `bootstrap` and `hotfix land`. This verb once
7126
+ // never received the flags, so `dev up --plan` started the very servers it was
7127
+ // asked to describe (bug-dev-up-plan-starts-servers).
7128
+ async function specEnvDev(dir, config, positional, flags = {}) {
7123
7129
  const action = positional[0]
7124
7130
  const specArg = positional[1]
7125
7131
  // The action must be named; the spec may be omitted (resolved from the registry).
7126
7132
  if (action !== 'up' && action !== 'down') {
7127
- process.stdout.write('Usage: skitterspec spec-env dev <up|down> [spec]\n')
7133
+ process.stdout.write('Usage: skitterspec spec-env dev <up|down> [spec] [--plan]\n')
7128
7134
  return
7129
7135
  }
7130
7136
  const spec = resolveSpecWithWorktree(dir, config, specArg)
@@ -7139,9 +7145,10 @@ async function specEnvDev(dir, config, positional) {
7139
7145
  let slot
7140
7146
  if (action === 'up') {
7141
7147
  // Ensure a slot (idempotent) so the port block is reserved even worktree-only.
7148
+ // A plan computes the same slot and writes nothing.
7142
7149
  const alloc = allocateSlot(registry, spec.folder)
7143
7150
  slot = alloc.slot
7144
- writeRegistry(dir, config, alloc.registry)
7151
+ if (!flags.plan) writeRegistry(dir, config, alloc.registry)
7145
7152
  } else {
7146
7153
  // Teardown only needs the pid-file paths (keyed by folder, not slot), so the
7147
7154
  // slot value is immaterial — use the existing one, or 0 as a placeholder.
@@ -7152,6 +7159,32 @@ async function specEnvDev(dir, config, positional) {
7152
7159
 
7153
7160
  const plan = planDev(spec, slot, config)
7154
7161
 
7162
+ if (flags.plan) {
7163
+ // A live pid is the positive signal for "already running"; a missing or
7164
+ // stale pid file reads as would-start, which is what `up` would then do.
7165
+ const running = (proc) => {
7166
+ const pid = readPid(path.resolve(dir, proc.pidFile))
7167
+ return pid && isAlive(pid) ? pid : null
7168
+ }
7169
+ const out = [
7170
+ `spec-env dev ${action}: ${spec.folder} slot ${slot} (plan — nothing ${action === 'up' ? 'started' : 'stopped'})`,
7171
+ ]
7172
+ for (const proc of plan.procs) {
7173
+ const pid = running(proc)
7174
+ if (action === 'up') {
7175
+ out.push(
7176
+ pid
7177
+ ? ` ${proc.name}: port ${proc.port} already running (pid ${pid})`
7178
+ : ` ${proc.name}: port ${proc.port} would start: ${proc.command}`,
7179
+ )
7180
+ } else {
7181
+ out.push(` ${proc.name}: ${pid ? `would stop pid ${pid}` : 'not running'}`)
7182
+ }
7183
+ }
7184
+ process.stdout.write(out.join('\n') + '\n')
7185
+ return
7186
+ }
7187
+
7155
7188
  if (action === 'up') {
7156
7189
  const out = [`spec-env dev up: ${spec.folder} slot ${slot} (ports from ${plan.portOffset})`]
7157
7190
  for (const proc of plan.procs) {
@@ -8110,6 +8143,17 @@ function liveRebaseTarget(dir, config, base) {
8110
8143
 
8111
8144
  // Take the running instance: rebase the spec's branch onto base, free it from its
8112
8145
  // worktree, and check it out in the primary checkout so the dev server reloads it.
8146
+ // A TAKE THAT DID NOT HAPPEN SAYS SO FIRST. Every outcome used to open
8147
+ // `spec-env live take: …`, so a one-line refusal read like the success line,
8148
+ // and an operator (ereqs, 2026-11-24) went to test a feature that was never
8149
+ // switched in. The marker leads, the consequence follows, the reason after.
8150
+ function notLive(folder, why) {
8151
+ return (
8152
+ `✖ NOT LIVE — spec-env live take refused ${folder}; nothing switched, ` +
8153
+ `the running instance is unchanged.\n\n ${why}\n`
8154
+ )
8155
+ }
8156
+
8113
8157
  async function specEnvLiveTake(dir, config, specArg, flags = {}) {
8114
8158
  const spec = resolveSpecWithWorktree(dir, config, specArg)
8115
8159
 
@@ -8197,7 +8241,7 @@ async function specEnvLiveTake(dir, config, specArg, flags = {}) {
8197
8241
  // entitled to the same way out — so the refusal prints what it would have
8198
8242
  // offered rather than making a harness the only route to it.
8199
8243
  process.stdout.write(
8200
- `spec-env live take: blocked — ${plan.reason}.\n` +
8244
+ notLive(spec.folder, `blocked — ${plan.reason}.`) +
8201
8245
  (plan.offer ? ` ${plan.offer.label}: ${plan.offer.command}\n` : ''),
8202
8246
  )
8203
8247
  return
@@ -8214,17 +8258,20 @@ async function specEnvLiveTake(dir, config, specArg, flags = {}) {
8214
8258
  const started = runGit(spec.worktreePath, ['rebase', '--show-current-patch']).ok
8215
8259
  if (started) runGit(spec.worktreePath, ['rebase', '--abort'])
8216
8260
  process.stdout.write(
8217
- started
8218
- ? `spec-env live take: rebase of ${spec.branch} onto ${onto} hit conflicts — ` +
8219
- `resolve them in ${spec.worktreePath}, then retry.\n`
8220
- : `spec-env live take: rebase of ${spec.branch} onto ${onto} could not start — ` +
8221
- `git said:\n ${reb.err.split('\n').join('\n ')}\n`,
8261
+ notLive(
8262
+ spec.folder,
8263
+ started
8264
+ ? `rebase of ${spec.branch} onto ${onto} hit conflicts — ` +
8265
+ `resolve them in ${spec.worktreePath}, then retry.`
8266
+ : `rebase of ${spec.branch} onto ${onto} could not start — ` +
8267
+ `git said:\n ${reb.err.split('\n').join('\n ')}`,
8268
+ ),
8222
8269
  )
8223
8270
  return
8224
8271
  }
8225
8272
  const det = runGit(spec.worktreePath, ['switch', '--detach'])
8226
8273
  if (!det.ok) {
8227
- process.stdout.write(`spec-env live take: could not detach the worktree — ${det.err}\n`)
8274
+ process.stdout.write(notLive(spec.folder, `could not detach the worktree — ${det.err}`))
8228
8275
  return
8229
8276
  }
8230
8277
  const co = runGit(dir, ['checkout', spec.branch])
@@ -8232,8 +8279,7 @@ async function specEnvLiveTake(dir, config, specArg, flags = {}) {
8232
8279
  // Roll the detach back so the worktree keeps its branch.
8233
8280
  runGit(spec.worktreePath, ['switch', spec.branch])
8234
8281
  process.stdout.write(
8235
- `spec-env live take: could not check out ${spec.branch} in the primary ` +
8236
- `checkout — ${co.err}\n`,
8282
+ notLive(spec.folder, `could not check out ${spec.branch} in the primary checkout — ${co.err}`),
8237
8283
  )
8238
8284
  return
8239
8285
  }
@@ -8719,7 +8765,7 @@ async function specEnvDispatch(sub, dir, config, positional, flags, present, inv
8719
8765
  specEnvPrune(dir, config, flags)
8720
8766
  break
8721
8767
  case 'dev':
8722
- await specEnvDev(dir, config, positional)
8768
+ await specEnvDev(dir, config, positional, flags)
8723
8769
  break
8724
8770
  case 'connect':
8725
8771
  await specEnvConnect(dir, config, positional[0])
package/src/env/review.js CHANGED
@@ -984,7 +984,10 @@ const COMMITTING = ['commit', 'commit-continue', 'commit-start', 'commit-land',
984
984
  // at all, because the run committed that phase and carried on. `final` is the
985
985
  // page an autonomous run ends on under `pause`: `complete`, `push`, `pr`, plus
986
986
  // `changes` and `discuss`.
987
- const BUTTON_SETS = ['committing', 'midrun', 'authoring', 'refresh', 'nospec', 'fix', 'snapshot', 'final']
987
+ // `manual` is a phase stopped at its manual steps: its code half is green and
988
+ // must be committed before `/spec-live` will take it, and what follows is a
989
+ // person's testing, not a build — so `Commit`, never `Commit & Continue`.
990
+ const BUTTON_SETS = ['committing', 'midrun', 'authoring', 'refresh', 'nospec', 'fix', 'manual', 'snapshot', 'final']
988
991
  const DEFAULT_BUTTON_SET = 'committing'
989
992
 
990
993
  /**
package/src/env/serve.js CHANGED
@@ -531,7 +531,9 @@ function receivePass(dir, config, spec, blob) {
531
531
  */
532
532
  // `final` too: the run's last render declared it, and a served re-render
533
533
  // must keep offering the ending rather than fall back to `Commit`.
534
- const NARROWING_SETS = ['midrun', 'refresh', 'fix', 'final']
534
+ // `manual` narrows the same way `fix` does: a served re-render of a phase
535
+ // stopped at its manual steps must not hand back `Commit & Continue`.
536
+ const NARROWING_SETS = ['midrun', 'refresh', 'fix', 'manual', 'final']
535
537
 
536
538
  function buttonsForView(viewKind, spec, recorded) {
537
539
  if (NARROWING_SETS.includes(recorded)) return recorded