@skitterbyte/skitterspec 23.6.0 → 23.8.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 +143 -8
- package/assets/hooks/main-guard.cjs +40 -6
- package/assets/hooks/review-gate.cjs +42 -7
- 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 +1188 -79
- package/src/env/base.js +104 -0
- package/src/env/bootstrap.js +22 -3
- package/src/env/classify.js +12 -4
- package/src/env/config.js +77 -5
- package/src/env/disposition.js +62 -0
- package/src/env/handoff.js +81 -0
- package/src/env/host.js +262 -0
- package/src/env/hotfix.js +237 -9
- package/src/env/hotfixland.js +105 -10
- package/src/env/inflight.js +98 -0
- package/src/env/integrate.js +136 -9
- package/src/env/live.js +8 -7
- package/src/env/mainguard.js +20 -5
- package/src/env/phases.js +28 -0
- package/src/env/project.js +223 -0
- package/src/env/provision.js +30 -8
- package/src/env/resolve.js +147 -25
- package/src/env/review.js +21 -7
- package/src/env/reviewers.js +7 -10
- package/src/env/serve.js +27 -11
- package/src/env/specstate.js +101 -0
- package/src/env/supervise.js +15 -2
- package/src/env/teardown.js +46 -3
- package/src/init.js +49 -9
|
@@ -38,7 +38,9 @@ not write the spec until this is resolved.
|
|
|
38
38
|
asking. Verify endpoints/models/files actually exist before relying on them.
|
|
39
39
|
- Cover, at minimum, the areas that apply:
|
|
40
40
|
1. **Problem & why** — what's broken/missing, who feels it, why now.
|
|
41
|
-
2. **Scope & non-goals** — explicit out-of-scope items
|
|
41
|
+
2. **Scope & non-goals** — explicit out-of-scope items, and the
|
|
42
|
+
**acceptance criteria**: what someone checks, without reading the code,
|
|
43
|
+
to call the work done (they become `## Acceptance criteria`).
|
|
42
44
|
3. **Affected areas** — concrete files/modules/packages this touches.
|
|
43
45
|
4. **Proposed solution shape** — the chosen approach and the alternatives
|
|
44
46
|
rejected, with the reason (this becomes "Decisions").
|
|
@@ -211,6 +213,8 @@ move to, **warn, don't refuse**, and say the trailer for that commit wants
|
|
|
211
213
|
a feature, `chore-` for a chore, `issue-` for an issue (the bug counterpart
|
|
212
214
|
uses `bug-`, the incident one `incident-`).
|
|
213
215
|
|
|
216
|
+
|
|
217
|
+
|
|
214
218
|
Use this template (keep it **as concise as possible** — no filler, no restating
|
|
215
219
|
the codebase, link rather than duplicate):
|
|
216
220
|
|
|
@@ -235,10 +239,20 @@ the codebase, link rather than duplicate):
|
|
|
235
239
|
> "none: not user-facing". An empty value or a bare
|
|
236
240
|
> "none" is not a valid outcome — see Phase A item 10>
|
|
237
241
|
|
|
242
|
+
## Summary
|
|
243
|
+
|
|
244
|
+
<1–3 sentences: what the work delivers, for someone who will never open the
|
|
245
|
+
spec — no phase breakdown, no implementation detail. With a ticketing provider
|
|
246
|
+
in summary mode this is what the ticket leads with.>
|
|
247
|
+
|
|
238
248
|
## Problem
|
|
239
249
|
|
|
240
250
|
<2–6 sentences: what's wrong/missing and why it matters. No fluff.>
|
|
241
251
|
|
|
252
|
+
## Acceptance criteria
|
|
253
|
+
|
|
254
|
+
- <an observable check, from Phase A item 2 — one per line>
|
|
255
|
+
|
|
242
256
|
## Decisions
|
|
243
257
|
|
|
244
258
|
<Numbered, confirmed decisions from Phase A. Each: the choice + one-line why,
|
|
@@ -348,6 +362,11 @@ Rules for the spec body:
|
|
|
348
362
|
- **Changelog** is mandatory and lives in the spec. Every later decision or
|
|
349
363
|
course-correction gets a dated one-line entry. Convert relative dates to
|
|
350
364
|
absolute.
|
|
365
|
+
- **`## Summary` and `## Acceptance criteria` are the ticket-facing pair.**
|
|
366
|
+
Write them for a reader on the board, not the one building it: the summary
|
|
367
|
+
says what the work delivers, each criterion is something a person can check.
|
|
368
|
+
A ticketing provider in summary mode projects exactly these (plus the
|
|
369
|
+
Impact table's surfaces, Gating and progress) and nothing else.
|
|
351
370
|
- Keep it tight. If a section adds no information, delete it.
|
|
352
371
|
|
|
353
372
|
## Phase C — finish up
|
|
@@ -431,6 +450,18 @@ on the branch you are standing on — so a spec left on its own branch would be
|
|
|
431
450
|
invisible to everyone, including the next `/spec` run. The commit goes on the
|
|
432
451
|
branch and then the branch goes onto the base:
|
|
433
452
|
|
|
453
|
+
**Unless the project set `land.specDocs: "branch"`** — the lane for a base
|
|
454
|
+
branch nobody may push, where the spec document rides the feature branch and
|
|
455
|
+
lands with the work's PR. There both verdicts commit on the branch and
|
|
456
|
+
**skip the integrate below entirely**; `commit-start` carries into
|
|
457
|
+
`/spec-start` over the same worktree exactly as ever, and plain `commit` keeps
|
|
458
|
+
the branch AND the worktree, because they are now the only copy of the
|
|
459
|
+
document. Say the trade out loud in the report's `Notes`: the backlog is found
|
|
460
|
+
through the tracker listing (or `git branch`), not `ls specs/backlog/` on base
|
|
461
|
+
— and a later `/spec-cancel` of a never-started branch-mode spec deletes the
|
|
462
|
+
branch and worktree with the spec document dying with them, no PR ever having
|
|
463
|
+
existed. Under the default `"trunk"` everything below applies unchanged.
|
|
464
|
+
|
|
434
465
|
```
|
|
435
466
|
skitterspec spec-env integrate <name>
|
|
436
467
|
```
|
|
@@ -172,6 +172,8 @@ split it into phase files (`01-<slug>.md`, `02-…`) with a phase index in
|
|
|
172
172
|
`00-overview.md`, exactly like a feature spec. It starts in `in-progress`
|
|
173
173
|
because work is already underway. Keep it lean:
|
|
174
174
|
|
|
175
|
+
|
|
176
|
+
|
|
175
177
|
```markdown
|
|
176
178
|
# Bug: <short title>
|
|
177
179
|
|
|
@@ -37,6 +37,8 @@ it verbatim/condensed for the header.
|
|
|
37
37
|
|
|
38
38
|
## 4. Stamp the spec
|
|
39
39
|
|
|
40
|
+
|
|
41
|
+
|
|
40
42
|
Update the **Status** header in the entry point so the reason is visible at the
|
|
41
43
|
top:
|
|
42
44
|
|
|
@@ -210,6 +212,15 @@ only ordering that survives.
|
|
|
210
212
|
copy of abandoned work. Seeing no such section here is the expected case, not
|
|
211
213
|
a fault — and if the user wants the remote branch gone anyway, that is their
|
|
212
214
|
call to make explicitly, not something to tidy away on their behalf.
|
|
215
|
+
|
|
216
|
+
**In PR mode the same confirm-first section may carry the PR abandon**
|
|
217
|
+
(`gh pr close` / `az repos pr update --status abandoned`): a cancelled spec
|
|
218
|
+
must not leave a live PR behind — it is noise with a merge button on it.
|
|
219
|
+
The teardown of an open-PR spec is refused unforced (the PR is named), so
|
|
220
|
+
this line appears on the forced run the refusal led to; ask before running
|
|
221
|
+
it like the delete above, and run the abandon **before** any remote branch
|
|
222
|
+
delete — closing the PR first is what stops the host complaining about a
|
|
223
|
+
deleted source branch.
|
|
213
224
|
4. `skitterspec spec-env prune` — reap orphaned test-DB volumes that belong to no
|
|
214
225
|
live spec (leftovers from declined/aborted teardowns or manual worktree
|
|
215
226
|
removal). Show the orphan list and, **only on the user's confirmation**, run
|
|
@@ -102,6 +102,9 @@ feature was designed not to disturb.
|
|
|
102
102
|
|
|
103
103
|
- Tick all completed tasks in the phase files; flip every finished phase-file
|
|
104
104
|
heading **and** every row in the `00-overview.md` phase index to `✅`.
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
105
108
|
- Set the **Status** header in the entry point:
|
|
106
109
|
`> **Status:** Complete (<YYYY-MM-DD>)`.
|
|
107
110
|
- Append a **State log** row:
|
|
@@ -246,6 +249,27 @@ in that order, and stops at the first step that fails:
|
|
|
246
249
|
**Then stop: the worktree is kept** (step 7). The branch is what the next
|
|
247
250
|
`-hotfix.N` is cut from if this deploy fails, so it waits for the deploy.
|
|
248
251
|
|
|
252
|
+
**A branch-based hotfix** (`> **Base version:** <branch>@<sha>`, from
|
|
253
|
+
`hotfix.releaseBranch`) runs the same command and the same consent ask — the
|
|
254
|
+
engine picks the path from the header. What differs is what it does:
|
|
255
|
+
|
|
256
|
+
- it **rebases** onto `<remote>/<branch>` and **lands on the release branch** by
|
|
257
|
+
`land.strategy`: under `ff` the push of the hotfix onto that branch *is* the
|
|
258
|
+
land (so the consent ask names the release branch, not only a tag); under `pr`
|
|
259
|
+
it pushes the hotfix branch and opens a **ready** PR, then holds with
|
|
260
|
+
`the PR into <branch> is open` — re-run the same command once it merges;
|
|
261
|
+
- the **tag** is optional (`hotfix.tag`): cut and pushed after the land, or not
|
|
262
|
+
at all;
|
|
263
|
+
- the **carry** goes to the resolved base — the current rc under
|
|
264
|
+
`baseBranchPattern` — directly under `ff`, through a `carry/<slug>` branch and
|
|
265
|
+
its own ready PR under `pr`.
|
|
266
|
+
|
|
267
|
+
`Landed` then names the release branch, how it landed (fast-forward, or the PR
|
|
268
|
+
and whether it merged), the tag if one was cut, and the carry. A PR still
|
|
269
|
+
waiting on its merge is a `⚠️` — the land is not done until the host says so.
|
|
270
|
+
`spec-env hotfix finish` tears it down once both the land and the carry are
|
|
271
|
+
confirmed, naming every check that is not.
|
|
272
|
+
|
|
249
273
|
### 6-feature/bug. `Type: Feature` / `Type: Bug` — rebase + fast-forward
|
|
250
274
|
|
|
251
275
|
Land the finished branch on the base branch so the work reaches `main` (or your
|
|
@@ -281,6 +305,19 @@ is finished — e.g. to run a later phase in CI or a shared test env? Use
|
|
|
281
305
|
`git -C <worktree> rebase --abort`, relay the conflict, and **stop** — leave it
|
|
282
306
|
to the user; do not tear anything down.
|
|
283
307
|
On a **no-op** ("already landed"), just say so and continue.
|
|
308
|
+
|
|
309
|
+
**Under a rolling base** (`baseBranchPattern` in `env.config.json`) the plan
|
|
310
|
+
can carry two more things, and both are the engine's to say:
|
|
311
|
+
- a `git -C <mainRepoPath> switch <base>` (or `switch -c … --track`) **first**,
|
|
312
|
+
when the primary checkout still has an older release candidate out — run it
|
|
313
|
+
in order with the rest;
|
|
314
|
+
- a `retarget: forked from <old> · landing onto <new>` line, when the rc
|
|
315
|
+
rolled while this spec was in flight. It is the land working, not a fault:
|
|
316
|
+
relay it verbatim in the `Landed` row so the reader sees where the work went.
|
|
317
|
+
|
|
318
|
+
A refusal naming `no branch matches <pattern>` means no release candidate is
|
|
319
|
+
visible — usually not fetched. Relay it, stop with `⏸`, and name
|
|
320
|
+
`skitterspec spec-env base` (it fetches and lists) as the next step.
|
|
284
321
|
3. **Run the after-land commands.** Where the plan ends with a
|
|
285
322
|
`then, in the primary checkout (<path>), run:` section — the project's
|
|
286
323
|
`afterLand`, such as a data migration — run those commands in that
|
|
@@ -300,6 +337,58 @@ is finished — e.g. to run a later phase in CI or a shared test env? Use
|
|
|
300
337
|
5. **Report** the landing (base branch, fast-forward result). It **never pushes** —
|
|
301
338
|
mention the user can `git push` the base branch themselves.
|
|
302
339
|
|
|
340
|
+
### 6-pr. PR mode (`land.strategy: "pr"`) — dispose, push, ready; finish after the merge
|
|
341
|
+
|
|
342
|
+
Completion is **two runs** here, the `hotfix land`/`finish` shape: the merge is
|
|
343
|
+
the host's act and may be days away, so the run that readies the PR cannot also
|
|
344
|
+
finalise. Which run this is, the engine says: `spec-env integrate <name>`
|
|
345
|
+
printing a `(pr)` plan is run 1; printing
|
|
346
|
+
`already landed … — finish what the merge deferred` is run 2.
|
|
347
|
+
|
|
348
|
+
**Run 1 — the last control point.** Once the PR is ready, anyone can merge from
|
|
349
|
+
the host UI and the tracker's automations act — so everything that needs a
|
|
350
|
+
person happens before the ready, in this order:
|
|
351
|
+
|
|
352
|
+
1. **Disposition pass — mandatory, before anything is pushed.** Run
|
|
353
|
+
`skitterspec spec-env disposition <name> --json`. For every unticked task,
|
|
354
|
+
non-✅ phase and surfaced follow-up it lists, the user disposes it:
|
|
355
|
+
**tick** (it was done — tick it, naming the evidence) · **spin off** (a
|
|
356
|
+
follow-on ticket minted now, linked to this one — offer `/spec` or the
|
|
357
|
+
provider's mint) · **drop** (a dated Changelog line with the reason, the
|
|
358
|
+
`none: <reason>` grammar). Batch the asking; never decide for them, and
|
|
359
|
+
never auto-create. **Refuse to ready the PR while anything is undisposed**
|
|
360
|
+
— you asked the enumeration, so it cannot also be fine. `clean` proceeds
|
|
361
|
+
with nothing asked.
|
|
362
|
+
2. **Consent, naming the target.** Ask once, plainly:
|
|
363
|
+
*"push `<branch>` and open the PR into `<base>` on `<remote>`, ready for
|
|
364
|
+
merge?"* — the base branch is named so a spec that outlived a release roll
|
|
365
|
+
is caught by the person reading a stale rc name. On a no, stop with the
|
|
366
|
+
held commands relayed.
|
|
367
|
+
3. **Run the plan.** `skitterspec spec-env integrate <name> --push` and run
|
|
368
|
+
what it prints: fetch, rebase onto `<remote>/<base>`, the push, and the PR
|
|
369
|
+
create — or, where a draft already exists, the flip-to-ready. A rebase
|
|
370
|
+
conflict aborts and stops exactly as 6-feature/bug step 2.
|
|
371
|
+
4. **Defer the finalise.** §4's bucket move follows the spec documents'
|
|
372
|
+
`land.specDocs` lane: under `trunk` leave the spec in `specs/in-progress/`
|
|
373
|
+
— run 2 moves it on base after the merge; under `branch` commit the move on
|
|
374
|
+
the branch *before* step 3 so it rides the PR. Either way
|
|
375
|
+
**the tracker's Done waits for run 2**: a ready PR is not a merged one.
|
|
376
|
+
5. **Stop, keeping the worktree.** Report
|
|
377
|
+
`Landed: PR #N opened — finish after merge` (or `ready`), spec
|
|
378
|
+
`In Progress`, worktree standing. No afterLand runs — the plan deferred it
|
|
379
|
+
— and no teardown. The merge is what un-blocks run 2; nothing here waits on
|
|
380
|
+
it.
|
|
381
|
+
|
|
382
|
+
**Run 2 — after the host merges.** `integrate` recognises the landed branch
|
|
383
|
+
(ancestry or the host's answer) and prints the finish: catch local base up and
|
|
384
|
+
the deferred `afterLand` with the land's own range. Run those, then do what run
|
|
385
|
+
1 deferred — the §4 move (trunk lane) with its State log row and commit, the
|
|
386
|
+
§5 report — then **§7 teardown runs as normal**:
|
|
387
|
+
a host-merged branch counts as landed (squash and rebase
|
|
388
|
+
merges included), and a host that auto-deleted the branch makes the remote
|
|
389
|
+
delete an already-gone no-op, never a failure. Re-test on base before calling
|
|
390
|
+
it done, exactly as 6-feature/bug step 4.
|
|
391
|
+
|
|
303
392
|
## 7. Tear down the environment (opt-in, only if configured)
|
|
304
393
|
|
|
305
394
|
**A hotfix is torn down later, by `hotfix finish`.**
|
|
@@ -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.8.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",
|