@skitterbyte/skitterspec 11.0.0 → 12.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.
- package/assets/core/env.config.json.example +3 -0
- package/assets/core/env.config.md +9 -0
- package/assets/rules/spec-planning.md +14 -0
- package/assets/skills/spec-complete/SKILL.md +6 -0
- package/assets/skills/spec-connect/SKILL.md +6 -0
- package/assets/skills/spec-go/SKILL.md +3 -1
- package/assets/skills/spec-init/SKILL.md +8 -0
- package/assets/skills/spec-live/SKILL.md +70 -0
- package/package.json +1 -1
- package/src/cli.js +377 -29
- package/src/env/config.js +12 -1
- package/src/env/live.js +348 -0
- package/src/env/resolve.js +25 -0
- package/src/init.js +241 -6
- package/src/prompts.js +37 -1
|
@@ -146,6 +146,15 @@ no live `env.config.json` was found.
|
|
|
146
146
|
"guards": {
|
|
147
147
|
"refuseTeardownIfDirty": true,
|
|
148
148
|
"refuseTeardownIfUnpushed": true
|
|
149
|
+
},
|
|
150
|
+
|
|
151
|
+
// Live overlay (`spec-env live` / `/spec-live`): test a spec on the already-
|
|
152
|
+
// running dev server by checking its branch out in the primary checkout.
|
|
153
|
+
// `migrations` is a list of globs (`**`, `*`, `?`) marking migration files; a
|
|
154
|
+
// branch that changes any of them is treated as STATEFUL and `live take`
|
|
155
|
+
// refuses it (code-only v1 — use `/spec-connect` for those). Default: none.
|
|
156
|
+
"live": {
|
|
157
|
+
"migrations": []
|
|
149
158
|
}
|
|
150
159
|
}
|
|
151
160
|
```
|
|
@@ -39,6 +39,20 @@ changes only when it merges. Teardown is folded into `/spec-complete` ·
|
|
|
39
39
|
lifecycle status** and inactive when `env.config.json` is absent — every skill
|
|
40
40
|
then behaves as it does today.
|
|
41
41
|
|
|
42
|
+
**Live overlay (`/spec-live`) — the light way to test a spec.** `/spec-connect`
|
|
43
|
+
runs a spec's *own* dev stack and proxies the canonical ports to it (one stack per
|
|
44
|
+
spec). **Live overlay** instead reuses the one dev server you already have running:
|
|
45
|
+
`/spec-live <spec>` rebases the branch onto base, frees it from its worktree, and
|
|
46
|
+
checks it out **in the primary checkout**, so your running server hot-reloads the
|
|
47
|
+
feature at the normal URL — no second stack, no proxy. The branch checked out in
|
|
48
|
+
the primary checkout **is** the lock: exactly one spec is live at a time, and
|
|
49
|
+
`/spec-live main` hands the instance back (fixes you make while live commit
|
|
50
|
+
straight onto the branch; `/spec-complete` is live-aware and lands them). Rule of
|
|
51
|
+
thumb: **live overlay is the light default for code-only specs**; it *refuses*
|
|
52
|
+
stateful ones (`Stack: worktree + docker`, or a branch touching migrations) — keep
|
|
53
|
+
`/spec-connect` + a Docker stack for those, and for genuinely parallel testing.
|
|
54
|
+
Beneath it, `skitterspec spec-env live <take|release|abort|status>` is the engine.
|
|
55
|
+
|
|
42
56
|
**Ticketing-provider sync (opt-in, a separate package).** The base is
|
|
43
57
|
tracker-free: it knows nothing about any specific ticketing system. A
|
|
44
58
|
ticketing provider is installed as its own distribution that plugs into two named
|
|
@@ -62,6 +62,12 @@ applies, offer to land the finished branch on the base branch so the work reache
|
|
|
62
62
|
1. **Require a clean worktree.** The completion edits (status flip, the
|
|
63
63
|
`git mv` to `complete/`) must be committed first — integrate refuses a dirty
|
|
64
64
|
tree. If it's dirty, offer `/commit` and **stop**; don't auto-commit.
|
|
65
|
+
**If the spec is live** (you took the running instance with `/spec-live`):
|
|
66
|
+
`integrate` is live-aware — it ends the live session first (releases the branch
|
|
67
|
+
back to base, re-isolates it into its worktree, clears the receipt), then prints
|
|
68
|
+
the normal landing plan. Commit any live fixes to the branch first; it refuses
|
|
69
|
+
if the primary checkout is dirty, or if a *different* spec holds it (release that
|
|
70
|
+
one with `/spec-live main`). Teardown (step 7) is unchanged.
|
|
65
71
|
2. **Plan + execute.** Run `skitterspec spec-env integrate <name>` and run the
|
|
66
72
|
printed commands **in order**:
|
|
67
73
|
- `git -C <worktree> rebase <base>` — replay the branch onto base.
|
|
@@ -15,6 +15,12 @@ This skill is **opt-in**: it needs `specs/.core/env.config.json` with a `dev`
|
|
|
15
15
|
block (host dev servers + their `frontPort`s). If isolation or `dev` is absent,
|
|
16
16
|
say so and stop.
|
|
17
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
|
+
|
|
18
24
|
## 1. Identify the target
|
|
19
25
|
|
|
20
26
|
- Use the spec named as an argument. The literal `main` means **disconnect**
|
|
@@ -98,7 +98,9 @@ runnable — its UI/API on the spec's reserved port block, isolated from `main`.
|
|
|
98
98
|
- **Diverting your browser is a separate step.** To test the spec at your normal
|
|
99
99
|
`localhost` URL, run **`/spec-connect <name>`** (exclusive — it exposes this
|
|
100
100
|
spec on the canonical ports; `/spec-connect main` hands them back). `/spec-go`
|
|
101
|
-
never seizes the canonical ports on its own.
|
|
101
|
+
never seizes the canonical ports on its own. For a **code-only** spec, the
|
|
102
|
+
lighter **`/spec-live <name>`** reuses your already-running dev server (a
|
|
103
|
+
branch-switch, no second stack) — `/spec-live main` hands it back.
|
|
102
104
|
|
|
103
105
|
## 3. Pre-flight — commit prior work
|
|
104
106
|
|
|
@@ -13,6 +13,14 @@ clobber customised content. Finish with a summary of created vs already-present.
|
|
|
13
13
|
> all of the below mechanically. This skill is the manual/repair path and is
|
|
14
14
|
> useful when the package isn't available or you only need to fix part of the
|
|
15
15
|
> setup.
|
|
16
|
+
>
|
|
17
|
+
> **Re-running on an already-set-up repo is safe.** `init` detects the existing
|
|
18
|
+
> setup (via the committed `specs/.core/.skitterspec-manifest.json` of installed
|
|
19
|
+
> file hashes) and, interactively, offers three paths — **Resync** (update managed
|
|
20
|
+
> skills/rules to the latest but keep files you've edited), **Start again** (reset
|
|
21
|
+
> the managed scaffolding fresh — never your specs or config, with a confirm), or
|
|
22
|
+
> **Leave alone**. Non-interactively it only adds what's missing; `--resync` /
|
|
23
|
+
> `--reset` (reset needs `--yes`) drive the stronger actions.
|
|
16
24
|
|
|
17
25
|
The system is **eight skills**: `spec` (feature), `spec-bug` (bug), `spec-ready`,
|
|
18
26
|
`spec-review`, `spec-go`, `spec-complete`, `spec-cancel`, and this `spec-init`. The lifecycle is
|
|
@@ -0,0 +1,70 @@
|
|
|
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. The engine enforces this and prints why.
|
|
22
|
+
|
|
23
|
+
## 1. Identify the target
|
|
24
|
+
|
|
25
|
+
- Use the spec named as an argument. The literal `main` means **release** (hand
|
|
26
|
+
the instance back to base). Else use the spec **currently in context**; if
|
|
27
|
+
unclear, ask.
|
|
28
|
+
|
|
29
|
+
## 2. Make sure a dev server is running
|
|
30
|
+
|
|
31
|
+
`live take` **verifies** a dev server is up on your canonical ports and switches
|
|
32
|
+
the branch under it — it does **not** start one. If nothing is listening it
|
|
33
|
+
refuses; start your dev server first (however you normally run it, or
|
|
34
|
+
`skitterspec spec-env dev up <spec>`). (Projects with no `dev` servers configured
|
|
35
|
+
have nothing to hot-reload — the switch still happens, with a warning.)
|
|
36
|
+
|
|
37
|
+
## 3. Take (or release)
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
skitterspec spec-env live take <spec> # rebase → detach worktree → checkout in primary
|
|
41
|
+
skitterspec spec-env live release # hand the instance back to base, re-isolate the branch
|
|
42
|
+
skitterspec spec-env live abort # crash recovery (see below)
|
|
43
|
+
skitterspec spec-env live status # who's live (branch in the primary checkout + receipt)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Take** rebases the branch onto base, frees it from its worktree
|
|
47
|
+
(`switch --detach`), checks it out in the primary checkout, then writes a receipt
|
|
48
|
+
(`.spec-env/live.json`). Relay its output. **If it reports the rebase hit
|
|
49
|
+
conflicts**, it left everything untouched — rebase the branch in its worktree,
|
|
50
|
+
resolve, then retry. **If it says a spec already holds the instance**, release it
|
|
51
|
+
first. If it warns dependencies changed, restart your dev server after the switch.
|
|
52
|
+
|
|
53
|
+
**Release** (`/spec-live main`) is the graceful exit of an unfinished session:
|
|
54
|
+
`skitterspec spec-env live release` reads the live spec from the receipt, checks
|
|
55
|
+
base back out in the primary checkout, re-attaches the branch to its worktree, and
|
|
56
|
+
clears the receipt. Commit any fixes to the branch first — it refuses on a dirty
|
|
57
|
+
tree rather than discard them. (To *finish* a live spec instead of releasing it,
|
|
58
|
+
use `/spec-complete`, which is live-aware.)
|
|
59
|
+
|
|
60
|
+
**Abort** is crash recovery, for when a session died mid-take and left the primary
|
|
61
|
+
checkout on a feature branch: `skitterspec spec-env live abort` restores base from
|
|
62
|
+
the receipt and re-isolates. It refuses if the primary checkout has uncommitted
|
|
63
|
+
changes (it won't discard them) — commit or stash first.
|
|
64
|
+
|
|
65
|
+
## 4. Report
|
|
66
|
+
|
|
67
|
+
Echo which spec is now live on the primary checkout (and any warning), that it was
|
|
68
|
+
released / recovered, or — for `status` — which branch the primary checkout is on
|
|
69
|
+
and whether the instance is free. Fixes you make while live commit straight onto
|
|
70
|
+
the spec's branch.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skitterbyte/skitterspec",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0",
|
|
4
4
|
"description": "Spec-driven development for Claude Code — 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",
|