@skitterbyte/skitterspec 23.6.0 → 23.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.
- package/assets/claude-md-section.md +20 -1
- package/assets/core/env.config.json.example +1 -0
- package/assets/core/env.config.md +90 -6
- package/assets/hooks/main-guard.cjs +18 -2
- package/assets/hooks/review-gate.cjs +19 -2
- package/assets/rules/spec-planning.md +81 -18
- package/assets/rules/spec-reports.md +1 -1
- package/assets/skills/spec/SKILL.md +32 -1
- package/assets/skills/spec-bug/SKILL.md +2 -0
- package/assets/skills/spec-cancel/SKILL.md +11 -0
- package/assets/skills/spec-complete/SKILL.md +89 -0
- package/assets/skills/spec-hotfix/SKILL.md +17 -1
- package/assets/skills/spec-incident/SKILL.md +2 -0
- package/assets/skills/spec-review/SKILL.md +8 -0
- package/assets/skills/spec-start/SKILL.md +13 -1
- package/assets/skills/spec-to-main/SKILL.md +47 -1
- package/package.json +1 -1
- package/src/cli.js +1091 -39
- package/src/env/base.js +104 -0
- package/src/env/config.js +75 -3
- package/src/env/disposition.js +62 -0
- package/src/env/handoff.js +80 -0
- package/src/env/host.js +262 -0
- package/src/env/hotfix.js +225 -0
- package/src/env/hotfixland.js +103 -9
- package/src/env/inflight.js +95 -0
- package/src/env/integrate.js +130 -4
- package/src/env/mainguard.js +6 -0
- package/src/env/phases.js +28 -0
- package/src/env/provision.js +18 -6
- package/src/env/resolve.js +108 -9
- package/src/env/serve.js +6 -1
- package/src/env/specstate.js +101 -0
- package/src/env/teardown.js +42 -0
|
@@ -29,6 +29,16 @@ If isolation is absent, say so and stop; there is no in-place path.
|
|
|
29
29
|
|
|
30
30
|
## 1. Establish the base version (the tag)
|
|
31
31
|
|
|
32
|
+
**A release BRANCH instead of a tag.** Where `env.config.json` sets
|
|
33
|
+
`hotfix.releaseBranch` (e.g. `"master"` — a team whose prod is whatever that
|
|
34
|
+
branch holds), there is **no tag to ask for**: skip the questions below and run
|
|
35
|
+
§3's `up` **without `--from`**. The engine fetches, forks from the remote's head
|
|
36
|
+
of that branch, and prints two lines — `fork:` naming the commit, and
|
|
37
|
+
`record: > **Base version:** <branch>@<sha>` — and §5 copies that `record:`
|
|
38
|
+
value into the header **verbatim**. Say which commit it forked from in one line;
|
|
39
|
+
that is the version the fix is built on. The rest of this section is the tag
|
|
40
|
+
flow, unchanged.
|
|
41
|
+
|
|
32
42
|
- **Read the arguments.** `/spec-hotfix <tag> <name>` (e.g.
|
|
33
43
|
`/spec-hotfix v33.16.4 login-crash`). An argument shaped like an issue
|
|
34
44
|
reference — letters, a hyphen, digits (`SKI-123`) —
|
|
@@ -146,6 +156,10 @@ installs `.claude/hooks/main-guard.cjs` that first write is refused outright,
|
|
|
146
156
|
and a step whose documented opening the repo will not perform is not a step. The
|
|
147
157
|
spec is written in the worktree at §5, on the branch it belongs to.
|
|
148
158
|
|
|
159
|
+
**Branch-based (`hotfix.releaseBranch`):** run the same command **without**
|
|
160
|
+
`--from` — the engine picks the release branch's head and prints the
|
|
161
|
+
`record:` line §5 copies. An explicit `--from` still wins over it.
|
|
162
|
+
|
|
149
163
|
**§5 records the same tag you passed to `--from`**, on the spec's
|
|
150
164
|
`> **Base version:**` header. That is not bookkeeping: `/spec-complete` cuts the
|
|
151
165
|
release and carries the fix off the header, so a worktree forked from one ref and
|
|
@@ -184,6 +198,8 @@ you there, so create the folder and write it here. A hotfix
|
|
|
184
198
|
is usually a single-pass fix, so the `## Fix` block can live directly in
|
|
185
199
|
`00-overview.md`. Keep it lean:
|
|
186
200
|
|
|
201
|
+
|
|
202
|
+
|
|
187
203
|
```markdown
|
|
188
204
|
# Hotfix: <short title>
|
|
189
205
|
|
|
@@ -192,7 +208,7 @@ is usually a single-pass fix, so the `## Fix` block can live directly in
|
|
|
192
208
|
> **Status:** In Progress — fixing (red test added)
|
|
193
209
|
> **Author:** <git user.name — who reported/captured it>
|
|
194
210
|
> **Developer:** <git user.name — you, since you're fixing it now>
|
|
195
|
-
> **Base version:** <tag prod is running, e.g. v33.16.4>
|
|
211
|
+
> **Base version:** <tag prod is running, e.g. v33.16.4 — or, branch-based, the `record:` value `up` printed, e.g. master@1a2b3c4d5e6f>
|
|
196
212
|
> **Raised:** <YYYY-MM-DD (today)>
|
|
197
213
|
> **Area:** <files/modules>
|
|
198
214
|
> **Severity:** <Azure's literal values, "1 - Critical" … "4 - Low" — optional;
|
|
@@ -43,6 +43,11 @@ trust the spec's own wording — verify:
|
|
|
43
43
|
- **Decisions still valid.** Re-check each `## Decisions` entry against the
|
|
44
44
|
current architecture and `.claude/rules/*.md`. Flag any that now conflict with
|
|
45
45
|
how the codebase actually works (a changed convention, a superseded approach).
|
|
46
|
+
- **The ticket-facing pair.** A spec with no `## Summary` or no
|
|
47
|
+
`## Acceptance criteria` is not broken — older specs predate both — but where
|
|
48
|
+
a ticketing provider pushes summaries the ticket falls back to the Problem's
|
|
49
|
+
first paragraph and shows no definition of done. Offer to write the missing
|
|
50
|
+
one(s) in step 3, with a draft; never add them unasked.
|
|
46
51
|
- **New constraints.** Note rules/patterns introduced since the spec was written
|
|
47
52
|
that it must now honour (e.g. a new required field, a new error type, a new
|
|
48
53
|
pattern the rest of the code now follows).
|
|
@@ -96,6 +101,9 @@ resolve it by reading the code, do that instead of asking.
|
|
|
96
101
|
- Add a dated **Changelog** entry summarising the review (e.g. `- <date> —
|
|
97
102
|
Reviewed vs codebase: retargeted Phase 2 onto X, dropped Y (removed), ticked Z
|
|
98
103
|
(already done)`).
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
99
107
|
- **Status:** if drift is minor, leave status as-is. If a `Ready` spec needs real
|
|
100
108
|
re-grooming, knock it back to `Draft` (set `> **Status:** Draft` and append a
|
|
101
109
|
**State log** row).
|
|
@@ -152,6 +152,14 @@ render says so. On **`--plan`** this step does not run at all.
|
|
|
152
152
|
1. **Provision.** Run `skitterspec spec-env up <name>` — a planner, so run the
|
|
153
153
|
`to provision, run:` commands it prints and confirm they succeeded.
|
|
154
154
|
|
|
155
|
+
**Under a rolling base** (`baseBranchPattern`) `up` fetches first, and where
|
|
156
|
+
the primary checkout is not on the newest release candidate the plan says
|
|
157
|
+
`fork: <base> (the base — the primary checkout is on <old>)` and forks from
|
|
158
|
+
it. Relay that line in the `Branch` row. A refusal naming
|
|
159
|
+
`no branch matches <pattern>` means no release candidate is visible —
|
|
160
|
+
usually not fetched: relay it, stop with `⏸`, and name
|
|
161
|
+
`skitterspec spec-env base` (it fetches and lists) as the next step.
|
|
162
|
+
|
|
155
163
|
2. **Trust the worktree.** `spec-env up` wrote the printed `trusted:` root into
|
|
156
164
|
`.claude/settings.local.json`, but that file does not hot-reload in this
|
|
157
165
|
session — run **`/add-dir <trusted root>`** before editing into the worktree,
|
|
@@ -255,6 +263,9 @@ branch is already here.
|
|
|
255
263
|
|
|
256
264
|
- `git mv "specs/backlog/<name>" "specs/in-progress/<name>"` if it isn't there
|
|
257
265
|
already (`mkdir -p specs/in-progress` first). Use `git mv` to keep history.
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
258
269
|
- Set the **Status** header: `> **Status:** In Progress — Phase 1 (started <YYYY-MM-DD>)`.
|
|
259
270
|
- Set **Developer** if it is still `—` (`git config user.name`).
|
|
260
271
|
|
|
@@ -291,7 +302,8 @@ destroyed: that skill relays the refusal and offers both ways out. Nothing to do
|
|
|
291
302
|
here beyond knowing it is no longer dead code.
|
|
292
303
|
|
|
293
304
|
A spec ideally arrives `Ready` from `/spec`; a `Draft` works too — sanity-check
|
|
294
|
-
it is well-formed first.
|
|
305
|
+
it is well-formed first. Where the spec keeps no `Status:` header (the tracker
|
|
306
|
+
owns its status), a non-empty **Open questions** section is what marks a Draft.
|
|
295
307
|
|
|
296
308
|
- **Report anything left waiting, and claim none of it.** Ask the engine once:
|
|
297
309
|
|
|
@@ -28,6 +28,11 @@ fast-forward leaves `base == branch`, the operation is
|
|
|
28
28
|
**idempotent and repeatable**: new commits put the branch ahead of base again,
|
|
29
29
|
and you can run `/spec-to-main` as many times as you like.
|
|
30
30
|
|
|
31
|
+
**In PR mode** (`land.strategy: "pr"` in `env.config.json`) the destination is
|
|
32
|
+
the host, not the local base: this skill becomes *push the branch and open or
|
|
33
|
+
update the DRAFT pull request* — same intent (get the work into CI / the shared
|
|
34
|
+
env), new transport. §4b replaces §4 there; everything else holds unchanged.
|
|
35
|
+
|
|
31
36
|
## 0. Preconditions — when this applies
|
|
32
37
|
|
|
33
38
|
- **Isolation must be on** (`specs/.core/env.config.json` exists **and** the spec
|
|
@@ -87,6 +92,19 @@ nothing else.
|
|
|
87
92
|
On a **no-op** ("already landed on `<base>` — nothing to integrate"), just say so
|
|
88
93
|
and continue — the branch has no commits base doesn't already have.
|
|
89
94
|
|
|
95
|
+
**Under a rolling base** (`baseBranchPattern` in `env.config.json`) the plan
|
|
96
|
+
can carry two more things, and both are the engine's to say:
|
|
97
|
+
- a `git -C <mainRepoPath> switch <base>` (or `switch -c … --track`) **first**,
|
|
98
|
+
when the primary checkout still has an older release candidate out — run it
|
|
99
|
+
in order with the rest;
|
|
100
|
+
- a `retarget: forked from <old> · landing onto <new>` line, when the rc
|
|
101
|
+
rolled while this spec was in flight. It is the land working, not a fault:
|
|
102
|
+
relay it verbatim in the `Landed` row so the reader sees where the work went.
|
|
103
|
+
|
|
104
|
+
A refusal naming `no branch matches <pattern>` means no release candidate is
|
|
105
|
+
visible — usually not fetched. Relay it, stop with `⏸`, and name
|
|
106
|
+
`skitterspec spec-env base` (it fetches and lists) as the next step.
|
|
107
|
+
|
|
90
108
|
**Then run the after-land commands.** Where the plan ends with a
|
|
91
109
|
`then, in the primary checkout (<path>), run:` section — the project's
|
|
92
110
|
`afterLand`, such as a data migration — run those commands in that directory,
|
|
@@ -99,6 +117,28 @@ land made elsewhere leaves them pending here.
|
|
|
99
117
|
that failed and the ones that did not run, and it **never undoes the land**.
|
|
100
118
|
No section, nothing to run, and nothing to say about it.
|
|
101
119
|
|
|
120
|
+
## 4b. PR mode — push the branch, keep the PR a draft
|
|
121
|
+
|
|
122
|
+
When the plan's heading reads `(pr)`, run
|
|
123
|
+
`skitterspec spec-env integrate <name> --draft` instead and run what it prints:
|
|
124
|
+
a fetch, a rebase onto `<remote>/<base>`, and — this is the consent gate — the
|
|
125
|
+
push and PR-create under its own `with your consent` section.
|
|
126
|
+
**Ask before pushing**: ask once, plainly, naming the remote and that the PR
|
|
127
|
+
opens as a draft. On a yes, re-run with `--push` added and run the single printed list; on
|
|
128
|
+
a no, relay the held commands and stop — the work is rebased and ready, and the
|
|
129
|
+
user can push it themselves.
|
|
130
|
+
|
|
131
|
+
- **The draft is the point.** A draft cannot be merged and the tracker's
|
|
132
|
+
automations read it as in-progress, so nothing downstream can close the
|
|
133
|
+
ticket early. `/spec-complete` is what flips it to ready.
|
|
134
|
+
- A `pr:` line saying the PR is already open means the push updates it —
|
|
135
|
+
nothing more to create, and that is the repeatable case.
|
|
136
|
+
- **No after-land commands run here.** The plan defers them ("after-land
|
|
137
|
+
commands are deferred: base moves when the host merges") — the completion run
|
|
138
|
+
that follows the merge owns them. §5's re-test on base does not apply either:
|
|
139
|
+
base has not moved; CI on the PR is the check this land exists for.
|
|
140
|
+
- A **rebase conflict** aborts and stops exactly as §4.
|
|
141
|
+
|
|
102
142
|
## 5. Re-test on base, then report
|
|
103
143
|
|
|
104
144
|
- Run the project's test command **from the primary checkout** — base must be
|
|
@@ -111,7 +151,9 @@ No section, nothing to run, and nothing to say about it.
|
|
|
111
151
|
to Complete, `git mv` the spec, or tear down the worktree/stack.
|
|
112
152
|
**The spec stays `In Progress` and the worktree stays put.**
|
|
113
153
|
- It **never pushes** — say the user can `git push` the base branch themselves to
|
|
114
|
-
trigger CI / the shared env.
|
|
154
|
+
trigger CI / the shared env. (PR mode is not an exception to the stance but to
|
|
155
|
+
the mechanics: there the push *is* the land, and it runs only behind §4b's
|
|
156
|
+
explicit consent — never silently.)
|
|
115
157
|
- `Next` points the way forward: `/spec-next` to continue the remaining phases
|
|
116
158
|
(you'll keep committing on the same branch and can `/spec-to-main` again), and
|
|
117
159
|
`/spec-complete` when every phase is genuinely done — it will land the final
|
|
@@ -135,6 +177,10 @@ the shape; this section carries only what is specific here.
|
|
|
135
177
|
skipped because the land matched no `when` — or the one that failed and the ones that did not run. Nothing about it when none are
|
|
136
178
|
configured.
|
|
137
179
|
|
|
180
|
+
`Landed` in PR mode names the host, not the base: `PR #14 (draft) opened` or
|
|
181
|
+
`PR #14 (draft) updated` — and `held — not pushed` when §4b's consent was
|
|
182
|
+
declined, because an unpushed rebase is a true outcome, not a failure.
|
|
183
|
+
|
|
138
184
|
**No `Spec` field, deliberately.** This skill changes no status and moves no
|
|
139
185
|
folder, and a `Spec` line here would read as though it had. The spec stays
|
|
140
186
|
`In Progress` and the worktree stays standing — if that needs saying, the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skitterbyte/skitterspec",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.7.0",
|
|
4
4
|
"description": "Spec-driven development for Claude Code \u2014 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",
|