@skitterbyte/skitterspec-linear 12.0.0 → 13.0.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.
Files changed (55) hide show
  1. package/MIGRATION.md +208 -10
  2. package/README.md +32 -2
  3. package/assets/claude-md-section.md +38 -2
  4. package/assets/commands/spec-connect.md +2 -2
  5. package/assets/commands/spec-live.md +2 -2
  6. package/assets/core/SETUP.md +21 -3
  7. package/assets/core/env.config.json.example +6 -3
  8. package/assets/core/env.config.md +77 -30
  9. package/assets/core/linear.config.md +58 -0
  10. package/assets/review/page.html +1501 -0
  11. package/assets/rules/spec-planning.md +198 -10
  12. package/assets/rules/spec-reports.md +269 -0
  13. package/assets/skills/spec/SKILL.md +33 -5
  14. package/assets/skills/spec-bug/SKILL.md +172 -9
  15. package/assets/skills/spec-cancel/SKILL.md +98 -21
  16. package/assets/skills/spec-claim/SKILL.md +114 -0
  17. package/assets/skills/spec-complete/SKILL.md +94 -25
  18. package/assets/skills/spec-diff/SKILL.md +564 -0
  19. package/assets/skills/spec-hotfix/SKILL.md +172 -11
  20. package/assets/skills/spec-init/SKILL.md +34 -7
  21. package/assets/skills/spec-linear-setup/SKILL.md +55 -1
  22. package/assets/skills/spec-list/SKILL.md +218 -0
  23. package/assets/skills/spec-next/SKILL.md +299 -6
  24. package/assets/skills/spec-push/SKILL.md +32 -8
  25. package/assets/skills/spec-review/SKILL.md +40 -5
  26. package/assets/skills/spec-reviewed/SKILL.md +241 -0
  27. package/assets/skills/spec-start/SKILL.md +386 -106
  28. package/assets/skills/spec-status/SKILL.md +24 -2
  29. package/assets/skills/spec-sync/SKILL.md +40 -4
  30. package/assets/skills/spec-to-main/SKILL.md +28 -6
  31. package/package.json +11 -7
  32. package/src/cli.js +1513 -89
  33. package/src/env/building.js +143 -0
  34. package/src/env/config.js +42 -9
  35. package/src/env/provision.js +54 -15
  36. package/src/env/proxy.js +34 -1
  37. package/src/env/render.js +3 -12
  38. package/src/env/resolve.js +295 -9
  39. package/src/env/review.js +1329 -0
  40. package/src/env/serve.js +549 -0
  41. package/src/env/teardown.js +13 -6
  42. package/src/init.js +96 -1
  43. package/src/vendor/linear/api.js +104 -1
  44. package/src/vendor/linear/cli-sync.js +854 -17
  45. package/src/vendor/linear/config.js +8 -0
  46. package/src/vendor/linear/credentials.js +94 -0
  47. package/src/vendor/linear/doctor.js +35 -0
  48. package/src/vendor/linear/identity.js +105 -0
  49. package/src/vendor/linear/mcp.js +26 -0
  50. package/src/vendor/sync-core/index.js +6 -2
  51. package/src/vendor/sync-core/src/compare.js +49 -3
  52. package/src/vendor/sync-core/src/normalize.js +30 -0
  53. package/src/vendor/sync-core/src/push.js +11 -1
  54. package/src/vendor/sync-core/src/write.js +38 -0
  55. package/LICENSE +0 -21
@@ -1,10 +1,15 @@
1
1
  ---
2
2
  name: spec-next
3
- description: Build the next unfinished phase of the spec in flight for this session — pre-flight, implement with tests, record progress and refresh the tracker. Refuses when no spec is in flight rather than guessing one, and never builds a spec it is not standing in. Use when the user says "/spec-next", "build the next phase", "continue the spec", or "carry on with this spec".
3
+ description: Build the next unfinished phase of the spec in flight for this session — pre-flight, implement with tests, record progress and refresh the tracker. Refuses when no spec is in flight rather than guessing one, and builds wherever that spec resolves rather than wherever the session happens to stand. Use when the user says "/spec-next", "build the next phase", "continue the spec", or "carry on with this spec".
4
4
  ---
5
5
 
6
6
  # /spec-next — build the next phase of the spec in flight
7
7
 
8
+ > Stay silent while this runs — speak only to ask something you cannot answer
9
+ > yourself, or to report a failure at the moment it happens. Read
10
+ > `.claude/rules/spec-reports.md` before reporting; it defines the block this
11
+ > skill ends with.
12
+
8
13
  It assumes the workbench is already set up: a spec is **in flight** on this
9
14
  checkout, and this skill implements its next unfinished phase. Putting a spec in
10
15
  flight — provisioning, moving it to `in-progress`, getting its branch here — is
@@ -13,7 +18,36 @@ flight — provisioning, moving it to `in-progress`, getting its branch here —
13
18
 
14
19
  ## 1. Identify the spec in flight
15
20
 
16
- Resolve **in this order**, and stop at the first that answers:
21
+ **`--worktree <path>` answers before anything else.** When the invocation names a
22
+ worktree, that is the spec to build and that is where it is built — cwd is not
23
+ consulted. It is how `/spec-start` carries on into phase 1 without moving your
24
+ session, and you can type it yourself.
25
+
26
+ **This is not a loosening of the refusal below.** That refusal exists against
27
+ *guessing* which spec to build, and a path someone typed is not a guess. A bare
28
+ `/spec-next` still refuses exactly as it does today.
29
+
30
+ **Validate the path before writing a line into it.** Run the resolver *from* the
31
+ path, so the answer comes from where you are about to write:
32
+
33
+ ```
34
+ cd "<path>" && skitterspec spec-env resolve
35
+ ```
36
+
37
+ Check the `worktree:` line it prints is that same path. If it is not — or the
38
+ command reports that isolation is not enabled — refuse and stop, naming what you
39
+ were given. A path that is not a provisioned worktree must never become a place
40
+ to write code.
41
+ **Read the output, not the exit status** — it exits 0 even when it
42
+ cannot resolve anything.
43
+
44
+ **Not `--dir <path>`.** That flag sets the **repo root**, not the worktree to
45
+ resolve from, so it answers a different question: on a repo with two or more
46
+ worktrees it refuses with *"no spec given, and N specs have worktrees"* and
47
+ validates nothing at all. The `cd` form is what makes the path itself the
48
+ evidence.
49
+
50
+ Otherwise resolve **in this order**, and stop at the first that answers:
17
51
 
18
52
  1. **The live spec of this checkout** — run
19
53
  `skitterspec spec-env live status` and read its `live:` line. `live: yes`
@@ -24,15 +58,60 @@ Resolve **in this order**, and stop at the first that answers:
24
58
  opened in one is its own workbench.
25
59
  3. **The current branch, in `checkout` mode** — no worktrees exist, so the
26
60
  branch the checkout is on names the spec.
61
+ 4. **The only spec provisioned in this repo** — ask the engine, with no spec
62
+ named, from wherever you happen to be standing:
63
+
64
+ ```
65
+ skitterspec spec-env resolve
66
+ ```
67
+
68
+ Take its `spec:` line **only when it names exactly one spec**.
69
+
70
+ This is the **durable** rung, and that is the whole reason it exists. Rungs 1
71
+ to 3 all read *session* state, and session state does not survive a `/clear`,
72
+ a new terminal tab, or coming back tomorrow — while the provisioned worktree
73
+ they are each a proxy for is **on disk** and survives all three. `/spec-start`
74
+ does leave the session standing in the worktree and that `cd` is real; what it
75
+ is not is durable. Without this rung, a repo holding exactly one answer sends
76
+ the operator away to re-supply something it already knew.
77
+
78
+ It is also the resolution every other bare command in this workflow already
79
+ uses — the worktree you are standing in, else the sole provisioned spec — so
80
+ this rung is what stops `/spec-next` being a silent exception to a rule
81
+ `.claude/rules/spec-planning.md` states has none left.
82
+
83
+ **Say which spec you resolved and how**, before writing a line of it:
84
+ *"not standing in a worktree — `<spec>` is the only spec provisioned"*. Rungs
85
+ 1 to 3 are self-evident to whoever typed the command; this one is not, and
86
+ the operator cannot see from where they sit what you picked.
87
+
88
+ **Several worktrees stay a refusal.** The engine names them and resolves
89
+ nothing — exactly the ambiguity the refusal below exists for. Relay its list
90
+ unchanged and stop; never pick from it.
91
+
92
+ WHAT WOULD FOOL THIS: a worktree left behind by a declined teardown is still
93
+ a worktree, so a finished spec can go on counting as provisioned. That widens
94
+ the candidate set, so the failure it produces is an extra candidate — an
95
+ ambiguity the engine refuses on — and never a wrong spec built. It cannot
96
+ manufacture an *absence*, which is why the absence below is still worth
97
+ refusing on.
27
98
 
28
99
  **If none answers, refuse and stop:**
29
100
  `no spec in flight — run /spec-start <name> to start one`.
30
101
 
102
+ That now answers a real absence — no worktree anywhere, the engine included —
103
+ rather than a session that merely lost track of where it was standing.
104
+
31
105
  **Never fall back to the spec "in context".** A spec discussed in conversation
32
106
  is not a spec in flight, and this skill writes real code: building the wrong
33
107
  spec's phase produces commits on a branch nobody asked for. The refusal is
34
108
  cheap; the mistake is not.
35
109
 
110
+ **Rung 4 is not that fallback wearing a hat.** A provisioned worktree is a
111
+ record that someone ran `/spec-start`: it is on disk, the engine reads it, and it
112
+ either names one spec or refuses. A spec named in conversation is a guess about
113
+ intent with nothing underneath it, and no number of them ever resolves to one.
114
+
36
115
  A **name argument** is accepted, but it must *match* the spec in flight — it
37
116
  narrows a re-run, it does not select a different spec. A mismatch refuses,
38
117
  naming both.
@@ -79,6 +158,17 @@ once it is over. Without a provider this is a no-op and nothing below changes.
79
158
  them. Skip it and a started spec stays mirrored as a phase-less issue.
80
159
  - **Never mint the spec issue.** An unlinked spec is skipped, not created —
81
160
  `/spec-push` is how someone opts in.
161
+ - **Backfill a missing assignee silently; never ask.** Only when
162
+ `sync.fieldOwnership` includes `assignee`. If the spec records nobody and
163
+ `skitterspec spec-sync whoami --json` answers, stamp it with
164
+ `skitterspec spec-sync assign <spec> --to <id> --name "<name>"` and let the
165
+ push above carry it. If identity is unknown, skip it in silence.
166
+ **Do not prompt**: an assignment question in the middle of a build is an
167
+ interruption with no deadline, and `/spec-claim` answers it whenever the
168
+ operator likes.
169
+ - **A spec assigned to someone else is left alone.** Say so once
170
+ (`assigned to <name> — /spec-claim to take it`) and change nothing. Picking up
171
+ a colleague's spec is a decision, not a side effect of running the next phase.
82
172
  - **Never fatal.** If the push fails — offline, no key, a Linear error — say so
83
173
  and **carry on with the build**. The repo is correct regardless; the mirror is
84
174
  disposable and the next push repairs it.
@@ -89,6 +179,33 @@ once it is over. Without a provider this is a no-op and nothing below changes.
89
179
  branch/PR you pushed in step 2; that's expected and the repo still wins on the
90
180
  next `/spec-push`.
91
181
 
182
+ **Before building, compare the worktree against where you are standing.** Take
183
+ the `worktree:` line from `skitterspec spec-env resolve <spec>` and compare it
184
+ with this session's cwd, resolving both paths first so a symlinked or
185
+ trailing-slash spelling of one tree does not read as two.
186
+
187
+ Same tree — the ordinary case, since `/spec-start` leaves the session standing
188
+ in it — and the rest of this step is inert.
189
+ **Different trees, and the discipline below applies however the spec was resolved.**
190
+ `--worktree <path>` is one way to get here and §1's rung 4 is another: a bare
191
+ `/spec-next` typed from the primary checkout resolves the sole provisioned spec
192
+ and builds it somewhere this session is not. What makes the discipline necessary
193
+ is the two trees, so that is what it is conditioned on — not the shape of the
194
+ invocation, which cannot see rung 4 at all.
195
+
196
+ Record the baseline before you write anything:
197
+
198
+ ```
199
+ skitterspec spec-env resolve <spec> --record-primary
200
+ ```
201
+
202
+ Then build as below, with one discipline on top.
203
+ **The session is not standing in the worktree**, so every write takes an
204
+ absolute path under it and every command
205
+ is prefixed `cd "<worktreePath>" &&` — typecheck and tests included. A single
206
+ relative path lands the work in the primary checkout, on the base branch, and
207
+ nothing about it looks wrong at the time. Step 4b is what catches it.
208
+
92
209
  Then build it, following the project rules in `.claude/rules/*.md` and `CLAUDE.md`:
93
210
 
94
211
  - Work task by task through the phase file. Make focused edits that match
@@ -134,8 +251,184 @@ sub-issue jump from Backlog straight to Done, with nothing visible in between.
134
251
  - **Say what happened** in the skill's report: mirror updated, skipped as
135
252
  unlinked, or failed with the reason.
136
253
 
137
- ## 5. Report
254
+ ## 4b. Prove nothing leaked into the primary checkout
255
+
256
+ **Only when the resolved worktree is not this session's cwd** — the same
257
+ comparison step 3 made, and it holds however the spec was resolved. Standing in
258
+ the worktree there is no second tree to have written into, so this step does not
259
+ apply and there is nothing to check.
260
+
261
+ WHAT WOULD FOOL THIS CHECK: it watches the **primary checkout** and nothing
262
+ else, so a build run from inside *another* spec's worktree would leak there
263
+ unseen. That is left unhandled deliberately rather than overlooked — reaching it
264
+ takes an explicit `--worktree` typed from a second worktree — and the cost of the
265
+ gap is a missed leak, never a false accusation.
266
+
267
+ The phase is built and its progress recorded — all of it written into a tree this
268
+ session is not standing in. Before reporting any of it as done:
269
+
270
+ ```
271
+ skitterspec spec-env resolve <spec> --assert-primary-clean
272
+ ```
273
+
274
+ - **Exit 0, "primary checkout clean"** — carry on.
275
+ - **Non-zero** — stop and relay the engine's message unchanged. It names the
276
+ paths and both readings: this build wrote them and they belong in the worktree,
277
+ or something else did and the baseline wants re-recording.
278
+ **Do not guess which, and do not delete anything.**
279
+ A path that appeared is not proof of who put it there.
280
+ - **"cannot tell"** — no baseline, or one from another spec. It exits 0 and
281
+ claims nothing; say so in one line and carry on. An absence is not evidence.
282
+
283
+ ## 5. Render the page — then offer the review, never write it
284
+
285
+ **Only when the project has per-spec isolation** (`specs/.core/env.config.json`
286
+ present). Without it there is no worktree to read and this step does not exist.
287
+
288
+ The phase is built, its tests are green, and nothing is committed yet. That is
289
+ the moment the page is about, so render it now — **after** the tests pass and
290
+ **before** the commit:
291
+
292
+ ```
293
+ skitterspec spec-env review <spec>
294
+ ```
295
+
296
+ **This is free.** It is the engine reading git and splicing text into a template;
297
+ the diff never passes through you, so a 266KB patch costs nothing. Report the
298
+ path it prints and move on.
299
+
300
+ **Then offer `/spec-diff`. Do not run it.** The written review is the part that
301
+ costs — roughly **700 output tokens**, because writing it means reading the diff
302
+ — and that spend is the operator's call, not a default.
303
+
304
+ **The offer is the `Review` row of step 6's block** — the counts, the page link
305
+ and a question, in one row:
306
+
307
+ | **Review** | <N> files, +<a> −<d> · [open the page](<the `open:` URL>) — want a written review before you commit? |
308
+
309
+ **It ends in a question, addressed to someone.** It was once a fenced block of
310
+ engine output, and it fired on every phase and was never once taken: two quoted
311
+ lines under the test counts, addressed to nobody, with the report then closing
312
+ on *"commit this first"* — the last instruction the reader got was to move on,
313
+ so they did. A row in a labelled table is findable; a question in it is
314
+ answerable. Both halves are load-bearing.
315
+
316
+ **Never bury it and never split it.** It sits above `Follow-ups` and `Next`, and
317
+ the page and the question stay in the same row: two adjacent rows about one page
318
+ make the reader resolve a distinction before acting on either. A later edit that
319
+ moves it out of the block, or separates the link from the question, undoes this
320
+ and should be read as a regression rather than tidying.
321
+
322
+ **Non-blocking, deliberately.** Do not end your turn waiting on the answer.
323
+ Phases get chained — `/commit && /spec-next` typed as one line — and a question
324
+ that stops the run taxes every phase to fix a problem the row already fixes.
325
+
326
+ Relay the **`open:`** line the engine prints, not the bare path: a path is not
327
+ clickable in any terminal, and a page nobody can open is a page nobody reads.
328
+
329
+ - **Never write the review unasked**, and **never publish**. Publishing leaves
330
+ something behind that this tooling cannot remove, so it is always something
331
+ someone asks for. A `file://` link is no use on a phone, and saying so **is**
332
+ the ask — publishing is the answer to it, and `/spec-diff` §6 owns how.
333
+ **Follow the `reader:` line the engine printed — do not sniff for it.** It
334
+ answers where the person reading this is sitting, and the offer changes with it:
335
+
336
+ - **absent** (`unknown`) — the `file://` URL, exactly as always. **Do not warn:**
337
+ unknown is the ordinary state of a local machine, and a warning there is an
338
+ accusation against a healthy session.
339
+ - **`local`** — the `file://` URL.
340
+ - **`remote`** — the engine has already stood its local server up and put a URL
341
+ the reader can open on `open:`. So there is **nothing special to say**: relay
342
+ that line like any other. Any `also:` lines under it are the other addresses
343
+ this machine has, offered because the best-guess one can be wrong — pass them
344
+ on rather than editing them out.
345
+
346
+ **Never read an environment variable to decide this** — not `SSH_CONNECTION`,
347
+ not `CLAUDE_CODE_*`, not a tty check. The engine did it, reports it on that line
348
+ and in `--json`, and a second implementation here could not be tested and would
349
+ drift.
350
+
351
+ **Serving is the engine's to do; publishing is never.** A `remote` reader
352
+ authorises a local server — one process, ended by one flag, leaving nothing
353
+ behind — and authorises nothing else. Publishing leaves a page this tooling
354
+ cannot remove, so it stays an ask in every case, always. If the engine could not
355
+ serve (a busy port, a machine with no network address) it falls back to the
356
+ `file://` URL with its marker, and that is when publishing is worth naming.
357
+
358
+ - **Never fatal.** A failed render — no worktree, a git error — is one line and
359
+ the phase is still done. The page is a convenience; the repo is the record.
360
+ - If the project has no isolation config, skip the whole step in silence rather
361
+ than explaining an absence.
362
+
363
+ ## 6. Report
364
+
365
+ Do **not** `git commit` unless the user asks — finish, verify, and wait.
366
+
367
+ End with the block defined in `.claude/rules/spec-reports.md`. That file carries
368
+ the shape; this section carries only what is specific here.
369
+
370
+ **Verdicts**
371
+
372
+ - `✅` — the phase is built and its tests are green.
373
+ - `⚠️` — built and green, with something worth knowing (a mirror that did not
374
+ refresh, a deviation from the plan).
375
+ - `❌` — the phase's tests are red, or it stopped part-way. Quote the failure.
376
+ - `⏸` — no spec in flight, or the name given does not match the one that is.
377
+
378
+ **Fields:** `Tracker` · `Branch` · `Built` · `Tests` · `Snags` · `Review` ·
379
+ `Follow-ups` · `Next`
380
+
381
+ ## 6a. End in a picker
382
+
383
+ The block says what happened; this is what to do about it. Offer the same four
384
+ endings the review page carries, so a review finishes the same way wherever the
385
+ reader is standing — the page, a pasted code, or here.
386
+
387
+ | Option | Does |
388
+ |--------|------|
389
+ | `Reviewed` | Claims the waiting pass and routes on its verdict |
390
+ | `Commit` | Runs the project's commit skill, and stops |
391
+ | `Commit & Continue` | Commits, then `/spec-next` — and **stops there** |
392
+ | `Discuss` | Asks what is up; changes nothing |
393
+
394
+ **`Reviewed` only when a pass is actually waiting.** The render's `pending:`
395
+ block already says. Offering a pickup with nothing to pick up is the empty
396
+ gesture this exists against — the other three stand on their own.
397
+
398
+ **Do not restate the routing.** `/spec-diff` §2, §2a and §4 own it, including
399
+ the commit hand-off through `review.commitWith` and what `commit-continue` does
400
+ after. Two copies of a routing rule is how the two come to disagree.
401
+
402
+ **It does not break a chained run.** `/commit && /spec-next` is typed as one
403
+ line and the picker appears at the **end**, by which point the chain has already
404
+ finished. The cost that was feared here — a question stopping a run mid-way — is
405
+ not a cost this placement has.
406
+
407
+ **Nothing may claim a pass without a pick.** `/spec-reviewed` is user-only by
408
+ *harness enforcement*, because prose alone once failed to stop an agent claiming
409
+ a pass nobody asked it to. A pick keeps the **property** that makes that safe —
410
+ a person in the conversation chose, and a device that reaches the page cannot —
411
+ while routing around the **mechanism**, since the claim runs downstream of the
412
+ pick. That trade is deliberate and it has exactly one condition: a run that
413
+ shows no picker claims nothing, and a picker nobody answered claims nothing.
414
+
415
+ WHAT WOULD FOOL THIS: a picker shown reflexively at the end of every run trains
416
+ the reader to dismiss it, and a dismissed picker is indistinguishable from a
417
+ considered decline. So offer it where there is a real choice, and let the `Next`
418
+ row carry the rest.
419
+
420
+ `Next` names the commit and then the phase, as
421
+ `/commit, then /spec-next → phase 3 (Auth)`, so the block says what to do and
422
+ which phase is next without a line of prose for either.
423
+
424
+ **The commit is not optional politeness.** Step 6 above deliberately leaves the
425
+ phase uncommitted, and §2 of this very skill refuses to build the next phase on
426
+ top of an uncommitted one — so a `Next` that names only `/spec-next` sends the
427
+ reader straight into that refusal. The two halves are four hundred lines apart,
428
+ which is exactly how they drifted.
138
429
 
139
- Summarise what was implemented, the test result (quote failures if any), and
140
- which phase is next. Do **not** `git commit` unless the user asks finish,
141
- verify, and wait.
430
+ **Step 5's offer is the `Review` row.** It is not a paragraph after the block,
431
+ because nothing is after the block: the counts, the page link and the question
432
+ go in one row, above `Follow-ups` and `Next`. Step 5 renders before the commit
433
+ and this step is where its offer lands, so the two must not disagree about where
434
+ it goes.
@@ -5,6 +5,11 @@ description: Push a spec up to its linked Linear issue (repo → Linear, one-way
5
5
 
6
6
  # /spec-push — send a spec up to Linear (one-way)
7
7
 
8
+ > Stay silent while this runs — speak only to ask something you cannot answer
9
+ > yourself, or to report a failure at the moment it happens. Read
10
+ > `.claude/rules/spec-reports.md` before reporting; it defines the block this
11
+ > skill ends with.
12
+
8
13
  Repo → Linear. The repo is the **source of truth**; Linear is a
9
14
  **generated mirror**. A spec is a Linear **issue**; each phase is a
10
15
  **sub-issue** (a child issue), and the phase file is mirrored into that
@@ -67,7 +72,7 @@ get past a failing check.
67
72
  ## 3. Get the plan from the engine
68
73
 
69
74
  ```
70
- skitterspec spec-sync push <spec> --workspace-states <file> --json
75
+ skitterspec spec-sync plan <spec> --workspace-states <file> --json
71
76
  ```
72
77
 
73
78
  The engine prints a JSON **plan** (no network, no remote read):
@@ -230,14 +235,33 @@ branch so the mirror-link rides in the PR.
230
235
 
231
236
  ## 6. Report
232
237
 
233
- Summarise what was created/updated in Linear (the spec issue and its
234
- sub-issues), **say which transport was used**, and confirm the snapshot was
235
- recorded. There is no pull — Linear is a generated mirror.
238
+ End with the block defined in `.claude/rules/spec-reports.md`. That file carries
239
+ the shape; this section carries only what is specific here.
240
+
241
+ **Verdicts**
242
+
243
+ - `✅` — the mirror matches the repo and the snapshot is recorded.
244
+ - `⚠️` — pushed, with something worth knowing: Linear stored different text, a
245
+ project picker that could not be offered, `phasesDeferred` phases not yet
246
+ minted.
247
+ - `❌` — it wrote some objects and failed on another. Name what exists in Linear
248
+ now; `apply` stamps each id as it goes, so the re-run is an update, never a
249
+ duplicate.
250
+ - `⏸` — no config, no `linear_identifier`, an unvalidated state list, or a
251
+ pre-9.0 mirror. Nothing was written.
252
+
253
+ **Fields:** `Tracker` · `Follow-ups` · `Next`
254
+
255
+ `Tracker` carries what was created and updated — the spec issue and its
256
+ sub-issues — **the transport that did it**, and that the snapshot was recorded.
257
+
258
+ **Say the transport, every time.** On the API path you never saw the
259
+ descriptions, so "pushed 12 sub-issues" is the engine's report rather than your
260
+ observation, and that distinction is the difference between a fact and a
261
+ paraphrase. If it warned that Linear stored different text, relay it: the repo
262
+ is still correct and a re-push overwrites the mirror.
236
263
 
237
- Saying the transport matters: on the API path you never saw the descriptions, so
238
- "pushed 12 sub-issues" is the engine's report, not your observation. If it warned
239
- that Linear stored different text, relay that — the repo is still correct, and a
240
- re-push overwrites the mirror.
264
+ There is no pull Linear is a generated mirror.
241
265
 
242
266
  ### Picking the Linear Project
243
267
 
@@ -5,6 +5,11 @@ description: Re-validate an existing spec against the current codebase — detec
5
5
 
6
6
  # /spec-review — bring a spec back in sync with the codebase
7
7
 
8
+ > Stay silent while this runs — speak only to ask something you cannot answer
9
+ > yourself, or to report a failure at the moment it happens. Read
10
+ > `.claude/rules/spec-reports.md` before reporting; it defines the block this
11
+ > skill ends with.
12
+
8
13
  Specs rot: the code moves on while a spec sits in the backlog or pauses
9
14
  mid-build. This skill re-validates a spec against the **current** code and
10
15
  rewrites the stale parts so it's safe to act on. It plans only — it does not
@@ -115,6 +120,12 @@ Linear API key is set (see `apply.transport` in `linear.config.md`).
115
120
  Do not roll anything back, and do not stop to ask.
116
121
  - **Say what happened** in the skill's report: mirror updated, skipped as
117
122
  unlinked, or failed with the reason.
123
+ - **There is no unassign step, and that is not an omission.** With `assignee` in
124
+ `sync.fieldOwnership`, the projection derives it from the spec's lifecycle
125
+ bucket — so moving the folder to `complete`/`cancelled` is *itself* what
126
+ releases the issue, and the push above carries it like any other field. The
127
+ `linear_assignee_id` stamp and the `> **Developer:**` header both stay put:
128
+ they record who actioned the work, which outlives who is holding it.
118
129
 
119
130
  ### Why it sits here
120
131
 
@@ -125,12 +136,36 @@ In `/spec-complete` and `/spec-cancel` this step is deliberately pinned
125
136
  its folder bucket. Push while the folder is still in `in-progress/` and the
126
137
  issue is set to the state the spec is *leaving*.
127
138
  - **Before the commit**, because the push stamps ids into the spec and writes a
128
- snapshot under `specs/.core/`. The `git add specs/` that follows sweeps both up
129
- with the status change; push after it instead and those files are left
139
+ snapshot under `specs/.core/`. Push after the commit instead and both are left
130
140
  uncommitted, which makes `spec-env integrate` refuse to land the branch.
131
141
 
142
+ The snapshot is reached **by name**, not by breadth. It is a declared
143
+ `spec.companionPaths` entry (`specs/.core/linear-base/{identifier}.base.json`),
144
+ so `spec-env stage` returns it among this spec's owned paths and the commit below
145
+ names it. This is why the commit no longer stages `specs/` wholesale: the one
146
+ file outside the spec's folder that had to be swept up is addressable, so the
147
+ breadth bought nothing and cost another session's work.
148
+
132
149
  ## 5. Report
133
150
 
134
- Summarise the drift found, what you changed, any questions still open, and
135
- whether the spec is now safe to `/spec-start` (or should drop back to `Draft` until
136
- the open questions are resolved). Do **not** `git commit` unless the user asks.
151
+ Do **not** `git commit` unless the user asks.
152
+
153
+ End with the block defined in `.claude/rules/spec-reports.md`. That file carries
154
+ the shape; this section carries only what is specific here.
155
+
156
+ **Verdicts**
157
+
158
+ - `✅` — checked against the code and brought up to date; safe to `/spec-start`.
159
+ - `⚠️` — updated, but dropped back to `Draft`: questions are open that only the
160
+ operator can answer. Name them.
161
+ - `⏸` — no such spec, or nothing to review. Nothing changed.
162
+
163
+ **Fields:** `Tracker` · `Spec` · `Built` · `Follow-ups` · `Next`
164
+
165
+ `Built` is the drift found and what you changed about it — a renamed file, an
166
+ API that moved, a task the code already does. `Spec` carries the status the
167
+ review leaves it in, which is the answer to "can I start this?".
168
+
169
+ **Drift found and not fixed is a `Follow-up`, not a silence.** A spec this skill
170
+ declared reviewed is one nobody will re-read; something it noticed and left
171
+ undone has to leave the session in writing or it did not happen.