@skitterbyte/skitterspec-linear 10.5.2 → 10.7.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 (34) hide show
  1. package/assets/claude-md-section.md +19 -9
  2. package/assets/commands/spec-connect.md +13 -0
  3. package/assets/commands/spec-live.md +14 -0
  4. package/assets/core/ci-stages.md +110 -0
  5. package/assets/core/env.config.md +18 -0
  6. package/assets/core/linear.config.json.example +3 -0
  7. package/assets/core/linear.config.md +46 -0
  8. package/assets/rules/commit-trailers.md +84 -0
  9. package/assets/rules/spec-planning.md +17 -3
  10. package/assets/skills/spec/SKILL.md +20 -0
  11. package/assets/skills/spec-bug/SKILL.md +40 -2
  12. package/assets/skills/spec-cancel/SKILL.md +9 -0
  13. package/assets/skills/spec-complete/SKILL.md +12 -1
  14. package/assets/skills/spec-go/SKILL.md +60 -28
  15. package/assets/skills/spec-hotfix/SKILL.md +41 -3
  16. package/assets/skills/spec-linear-setup/SKILL.md +38 -2
  17. package/assets/skills/spec-status/SKILL.md +1 -0
  18. package/assets/skills/spec-sync/SKILL.md +27 -2
  19. package/assets/skills/spec-to-main/SKILL.md +2 -1
  20. package/bin/skitterspec-linear.js +10 -0
  21. package/package.json +1 -1
  22. package/src/cli.js +176 -39
  23. package/src/env/config.js +19 -0
  24. package/src/env/teardown.js +62 -4
  25. package/src/init.js +120 -2
  26. package/src/vendor/linear/cli-sync.js +560 -12
  27. package/src/vendor/linear/config.js +91 -1
  28. package/src/vendor/linear/doctor.js +67 -1
  29. package/src/vendor/linear/released.js +164 -0
  30. package/src/vendor/sync-core/index.js +4 -1
  31. package/src/vendor/sync-core/src/compare.js +59 -3
  32. package/src/vendor/sync-core/src/normalize.js +65 -2
  33. package/assets/skills/spec-connect/SKILL.md +0 -59
  34. package/assets/skills/spec-live/SKILL.md +0 -73
@@ -1,59 +0,0 @@
1
- ---
2
- name: spec-connect
3
- description: Point your local canonical origin (localhost:3000/:8080) at a spec's running dev servers so you can test a worktree's UI/API changes at the normal URL — or `spec-connect main` to hand the ports back to your main checkout. Runs `skitterspec spec-env connect` (a small bundled reverse proxy). Opt-in — needs specs/.core/env.config.json with a `dev` block. Use when the user says "/spec-connect", "test <spec> locally", "point local at <spec>", or "connect to <spec>".
4
- ---
5
-
6
- # /spec-connect — expose one spec on the canonical ports
7
-
8
- Make `http://localhost:<frontPort>` serve a **spec's** warm dev servers instead of
9
- your main checkout's, so you can test a worktree's UI/API at the exact URL you
10
- always use — no bookmark, base-URL, or OAuth-callback changes. **Exclusive:** one
11
- spec is exposed at a time. `spec-connect main` stops the proxy and hands the ports
12
- back to your primary checkout.
13
-
14
- This skill is **opt-in**: it needs `specs/.core/env.config.json` with a `dev`
15
- block (host dev servers + their `frontPort`s). If isolation or `dev` is absent,
16
- say so and stop.
17
-
18
- **Lighter alternative for a code-only spec:** `/spec-live` reuses the dev server
19
- you already have running (it branch-switches the primary checkout) instead of
20
- starting a second stack — no proxy, one process. Prefer it for code-only specs;
21
- use `/spec-connect` when a spec has its own Docker stack, or to run several stacks
22
- in parallel.
23
-
24
- ## 1. Identify the target
25
-
26
- - Use the spec named as an argument. The literal `main` means **disconnect**
27
- (hand the ports back to the primary checkout). Else use the spec **currently in
28
- context**; if unclear, ask.
29
-
30
- ## 2. Make sure the spec's dev servers are running
31
-
32
- `connect` proxies to a spec's dev servers on its reserved port block — it does
33
- **not** start them. If they aren't up yet, start them first:
34
-
35
- ```
36
- skitterspec spec-env dev up <spec>
37
- ```
38
-
39
- (This is automatic under `/spec-go`; run it by hand only when connecting a spec
40
- whose servers you stopped.)
41
-
42
- ## 3. Connect (or disconnect)
43
-
44
- ```
45
- skitterspec spec-env connect <spec> # expose <spec> on the canonical ports
46
- skitterspec spec-env connect main # stop the proxy — main owns the ports
47
- ```
48
-
49
- The engine (re)starts a small bundled Node reverse proxy and **prints** the
50
- canonical URL → spec-port mapping. **If it reports a canonical port is in use**,
51
- your **main dev server still holds it** — stop main on that port, then re-run
52
- (the proxy can't share a port main is bound to). Relay the printed message.
53
-
54
- ## 4. Report
55
-
56
- Echo which spec is now on the canonical ports (and the URLs), or that the proxy
57
- was stopped and main owns them again. Switching to a different spec is just
58
- `spec-connect <other>` — the dev servers stay warm, so it's a near-instant
59
- re-point.
@@ -1,73 +0,0 @@
1
- ---
2
- name: spec-live
3
- description: Test a spec on your already-running dev server by checking its branch out in the primary checkout — no second stack, no proxy. `spec-live <spec>` takes the running instance for that spec; `spec-live main` releases it. Runs `skitterspec spec-env live`. Opt-in — needs specs/.core/env.config.json. Code-only specs; stateful (Docker/migration) specs use /spec-connect. Use when the user says "/spec-live", "go live with <spec>", "take the instance for <spec>", or "test <spec> on the running server".
4
- ---
5
-
6
- # /spec-live — put one spec live on the running instance
7
-
8
- Instead of running a second dev stack for a spec (that's `/spec-connect`), **reuse
9
- the one instance you already have**: rebase the spec's branch onto base, hand it
10
- from its worktree to the **primary checkout**, and let your running dev server
11
- hot-reload it. You test at your normal URL, with one process. The branch that's
12
- checked out in the primary checkout **is** the lock — exactly one spec is live at
13
- a time, and `/spec-live main` hands the instance back.
14
-
15
- This skill is **opt-in**: it needs `specs/.core/env.config.json`. If isolation is
16
- absent, say so and stop.
17
-
18
- **Code-only.** Live overlay refuses a **stateful** spec — one whose `> **Stack:**`
19
- is `worktree + docker`, or whose branch changes migrations (per
20
- `env.config.json` → `live.migrations`). Those keep their isolated stack; use
21
- `/spec-connect` for them. It also **always refuses a `Type: Hotfix` spec** — its
22
- branch is built on an old release tag, so hot-reloading it onto the running dev
23
- server could break the shared instance; test a hotfix with `/spec-connect`. The
24
- engine enforces all of this and prints why.
25
-
26
- ## 1. Identify the target
27
-
28
- - Use the spec named as an argument. The literal `main` means **release** (hand
29
- the instance back to base). Else use the spec **currently in context**; if
30
- unclear, ask.
31
-
32
- ## 2. Make sure a dev server is running
33
-
34
- `live take` **verifies** a dev server is up on your canonical ports and switches
35
- the branch under it — it does **not** start one. If nothing is listening it
36
- refuses; start your dev server first (however you normally run it, or
37
- `skitterspec spec-env dev up <spec>`). (Projects with no `dev` servers configured
38
- have nothing to hot-reload — the switch still happens, with a warning.)
39
-
40
- ## 3. Take (or release)
41
-
42
- ```
43
- skitterspec spec-env live take <spec> # rebase → detach worktree → checkout in primary
44
- skitterspec spec-env live release # hand the instance back to base, re-isolate the branch
45
- skitterspec spec-env live abort # crash recovery (see below)
46
- skitterspec spec-env live status # who's live (branch in the primary checkout + receipt)
47
- ```
48
-
49
- **Take** rebases the branch onto base, frees it from its worktree
50
- (`switch --detach`), checks it out in the primary checkout, then writes a receipt
51
- (`.spec-env/live.json`). Relay its output. **If it reports the rebase hit
52
- conflicts**, it left everything untouched — rebase the branch in its worktree,
53
- resolve, then retry. **If it says a spec already holds the instance**, release it
54
- first. If it warns dependencies changed, restart your dev server after the switch.
55
-
56
- **Release** (`/spec-live main`) is the graceful exit of an unfinished session:
57
- `skitterspec spec-env live release` reads the live spec from the receipt, checks
58
- base back out in the primary checkout, re-attaches the branch to its worktree, and
59
- clears the receipt. Commit any fixes to the branch first — it refuses on a dirty
60
- tree rather than discard them. (To *finish* a live spec instead of releasing it,
61
- use `/spec-complete`, which is live-aware.)
62
-
63
- **Abort** is crash recovery, for when a session died mid-take and left the primary
64
- checkout on a feature branch: `skitterspec spec-env live abort` restores base from
65
- the receipt and re-isolates. It refuses if the primary checkout has uncommitted
66
- changes (it won't discard them) — commit or stash first.
67
-
68
- ## 4. Report
69
-
70
- Echo which spec is now live on the primary checkout (and any warning), that it was
71
- released / recovered, or — for `status` — which branch the primary checkout is on
72
- and whether the instance is free. Fixes you make while live commit straight onto
73
- the spec's branch.