@skitterbyte/skitterspec-linear 19.5.0 → 19.5.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skitterbyte/skitterspec-linear",
3
- "version": "19.5.0",
3
+ "version": "19.5.1",
4
4
  "description": "Spec-driven development for Claude Code, with one-way Linear sync — a superset of @skitterbyte/skitterspec: the base filesystem workflow plus /spec-status · /spec-push and the spec-sync CLI. The repo is canonical; Linear is a generated mirror. Install this OR the base, not both.",
5
5
  "keywords": [
6
6
  "claude",
package/src/cli.js CHANGED
@@ -250,6 +250,8 @@ Usage:
250
250
  Docker stack (prints commands; creates nothing)
251
251
  --docs: a tree to write documents in — no
252
252
  setup commands, no Docker
253
+ --plan: write nothing, not even the trust
254
+ entry or the registry record
253
255
  bootstrap [spec] run the worktree's seeds, env file, setup
254
256
  and stack itself, in the worktree — after
255
257
  \`up\`'s worktree add (--docs: seeds only;
@@ -1038,11 +1040,13 @@ function specEnvUp(dir, config, specArg, flags = {}) {
1038
1040
  }
1039
1041
  const beforeAuth = readRegistry(dir, config)
1040
1042
  const resolved = resolveSpecless(specArg, dir, config, { spec: true })
1041
- writeRegistry(
1042
- dir,
1043
- config,
1044
- recordSpecless(beforeAuth, specArg, { branch: resolved.branch, spec: true }),
1045
- )
1043
+ if (!flags.plan) {
1044
+ writeRegistry(
1045
+ dir,
1046
+ config,
1047
+ recordSpecless(beforeAuth, specArg, { branch: resolved.branch, spec: true }),
1048
+ )
1049
+ }
1046
1050
  spec = resolved
1047
1051
  const fork = fromVersion || releaseFork
1048
1052
  if (fork) {
@@ -1172,8 +1176,12 @@ function specEnvUp(dir, config, specArg, flags = {}) {
1172
1176
  // Trust the shared worktree root so edits into the freshly-provisioned worktree
1173
1177
  // don't prompt. One absolute entry (the root) covers every spec; self-heals on
1174
1178
  // every provision for teammates who only cloned and ran /spec-start.
1179
+ //
1180
+ // `--plan` is the dry run: every write below is asked and not made, and the
1181
+ // report says "would". It was parsed and ignored once, so a plan headed
1182
+ // "nothing created yet" still wrote this entry into the operator's settings.
1175
1183
  const worktreeRootAbs = path.dirname(spec.worktreePath)
1176
- const trust = ensureWorktreeDirTrusted(dir, worktreeRootAbs)
1184
+ const trust = ensureWorktreeDirTrusted(dir, worktreeRootAbs, { dryRun: !!flags.plan })
1177
1185
 
1178
1186
  // Documents mode brings no stack up, so a Docker spec provisioned this way is
1179
1187
  // a worktree-only run. Asked through `resolveStack`, which `planUp` also
@@ -1204,7 +1212,7 @@ function specEnvUp(dir, config, specArg, flags = {}) {
1204
1212
  Object.prototype.hasOwnProperty.call(before.slots, spec.folder) || worktreeOnDisk
1205
1213
  const alloc = allocateSlot(before, spec.folder)
1206
1214
  slot = alloc.slot
1207
- writeRegistry(dir, config, alloc.registry) // the engine's only write (Docker path)
1215
+ if (!flags.plan) writeRegistry(dir, config, alloc.registry) // the engine's only write (Docker path)
1208
1216
  } else {
1209
1217
  attached = worktreeOnDisk
1210
1218
  }
@@ -1291,7 +1299,7 @@ function specEnvUp(dir, config, specArg, flags = {}) {
1291
1299
  // the lane working rather than something the engine failed to find.
1292
1300
  if (authoring) {
1293
1301
  out.push(' authoring: no spec document yet — the skill writes it in the worktree')
1294
- out.push(` recorded: added to ${config.registry} until the spec is written`)
1302
+ out.push(` recorded: ${flags.plan ? 'would add to' : 'added to'} ${config.registry} until the spec is written`)
1295
1303
  }
1296
1304
  // Only where one was NAMED. The fork point is otherwise base HEAD, which is
1297
1305
  // the unremarkable case, and a line asserting it on every provision would
@@ -1323,10 +1331,8 @@ function specEnvUp(dir, config, specArg, flags = {}) {
1323
1331
  `\n add ${worktreeRootAbs} to permissions.additionalDirectories yourself`,
1324
1332
  )
1325
1333
  } else {
1326
- out.push(
1327
- ` trusted: ${worktreeRootAbs} ` +
1328
- `(${trust.changed ? 'added to' : 'already in'} .claude/settings.local.json)`,
1329
- )
1334
+ const verb = !trust.changed ? 'already in' : flags.plan ? 'would add to' : 'added to'
1335
+ out.push(` trusted: ${worktreeRootAbs} (${verb} .claude/settings.local.json)`)
1330
1336
  }
1331
1337
  out.push(...specCommitLines(plan, spec.folder))
1332
1338
  out.push(...untouchedLines(plan))
package/src/env/trust.js CHANGED
@@ -41,8 +41,11 @@ function writeSettings(file, settings) {
41
41
  * - `added` — the root was merged into an existing file
42
42
  * - `present` — the root was already listed (no write)
43
43
  * - `malformed` — the file exists but isn't parseable JSON (left untouched)
44
+ *
45
+ * `{ dryRun: true }` answers the same question and writes nothing — `changed`
46
+ * then means "would change", which is what `spec-env up --plan` reports.
44
47
  */
45
- function ensureWorktreeDirTrusted(dir, rootAbs) {
48
+ function ensureWorktreeDirTrusted(dir, rootAbs, { dryRun = false } = {}) {
46
49
  const file = settingsPath(dir)
47
50
 
48
51
  let raw
@@ -50,7 +53,7 @@ function ensureWorktreeDirTrusted(dir, rootAbs) {
50
53
  raw = fs.readFileSync(file, 'utf-8')
51
54
  } catch (error) {
52
55
  if (error.code === 'ENOENT') {
53
- writeSettings(file, { permissions: { additionalDirectories: [rootAbs] } })
56
+ if (!dryRun) writeSettings(file, { permissions: { additionalDirectories: [rootAbs] } })
54
57
  return { changed: true, reason: 'created' }
55
58
  }
56
59
  throw error
@@ -70,6 +73,7 @@ function ensureWorktreeDirTrusted(dir, rootAbs) {
70
73
  : []
71
74
 
72
75
  if (dirs.includes(rootAbs)) return { changed: false, reason: 'present' }
76
+ if (dryRun) return { changed: true, reason: 'added' }
73
77
 
74
78
  writeSettings(file, {
75
79
  ...parsed,