@skitterbyte/skitterspec-github 3.2.1 → 3.2.2

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/cli.js +37 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skitterbyte/skitterspec-github",
3
- "version": "3.2.1",
3
+ "version": "3.2.2",
4
4
  "description": "Spec-driven development for Claude Code, with one-way GitHub sync — a superset of @skitterbyte/skitterspec: the base filesystem workflow plus /spec-status · /spec-push · /spec-claim and the spec-sync CLI, mirroring specs to GitHub Issues, sub-issues and a Projects v2 board, with GitHub Releases. The repo is canonical; GitHub is a generated mirror. Install this OR the base OR one other superset — exactly one.",
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) {
@@ -8719,7 +8752,7 @@ async function specEnvDispatch(sub, dir, config, positional, flags, present, inv
8719
8752
  specEnvPrune(dir, config, flags)
8720
8753
  break
8721
8754
  case 'dev':
8722
- await specEnvDev(dir, config, positional)
8755
+ await specEnvDev(dir, config, positional, flags)
8723
8756
  break
8724
8757
  case 'connect':
8725
8758
  await specEnvConnect(dir, config, positional[0])