@skitterbyte/skitterspec 23.22.0 → 23.23.1
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 +23 -123
- package/assets/project-conventions.md +17 -0
- package/assets/rules/negative-checks.md +21 -48
- package/assets/rules/offered-unblocks.md +39 -74
- package/assets/rules/spec-format.md +117 -0
- package/assets/rules/spec-planning.md +128 -1016
- package/assets/rules/spec-reports.md +70 -607
- package/assets/skills/no-spec/SKILL.md +4 -4
- package/assets/skills/spec/SKILL.md +7 -7
- package/assets/skills/spec/kind-routing.md +35 -0
- package/assets/skills/spec-bug/SKILL.md +6 -6
- package/assets/skills/spec-cancel/SKILL.md +1 -1
- package/assets/skills/spec-complete/SKILL.md +11 -1
- package/assets/skills/spec-diff/SKILL.md +6 -2
- package/assets/skills/spec-diff/review-page.md +89 -0
- package/assets/skills/spec-diff/review-wait.md +133 -0
- package/assets/skills/spec-epic-next/SKILL.md +2 -1
- package/assets/skills/spec-epic-next/epics.md +44 -0
- package/assets/skills/spec-hotfix/SKILL.md +11 -5
- package/assets/skills/spec-incident/SKILL.md +1 -1
- package/assets/skills/spec-next/SKILL.md +5 -5
- package/assets/skills/spec-resume/SKILL.md +1 -1
- package/assets/skills/spec-review/SKILL.md +1 -1
- package/assets/skills/spec-start/isolation.md +90 -0
- package/package.json +1 -1
- package/src/cli.js +74 -5
- package/src/conventions.js +43 -0
- package/src/env/hotfix.js +60 -7
- package/src/env/hotfixland.js +2 -1
- package/src/init.js +133 -9
- package/src/spec-planning-history.json +103 -0
|
@@ -120,7 +120,7 @@ skitterspec spec-env review arm <name>
|
|
|
120
120
|
```
|
|
121
121
|
|
|
122
122
|
**This skill arms, and `/spec` does not.** That asymmetry is the rule in
|
|
123
|
-
`.claude/
|
|
123
|
+
`.claude/skills/spec-diff/review-page.md` rather than a choice made here: the gate asserts
|
|
124
124
|
that *finished work* owes an answer, and this is finished work. A written spec
|
|
125
125
|
owes no phase, so authoring arms nothing.
|
|
126
126
|
|
|
@@ -135,7 +135,7 @@ because writing it means reading the diff, and that spend is the user's call.
|
|
|
135
135
|
the whole scope of what you may claim.
|
|
136
136
|
2. **Run the engine's wait, and end your turn** — under the harness's
|
|
137
137
|
persistent watch primitive where one exists, else in the background
|
|
138
|
-
(`.claude/
|
|
138
|
+
(`.claude/skills/spec-diff/review-wait.md` carries the preference):
|
|
139
139
|
|
|
140
140
|
```
|
|
141
141
|
skitterspec spec-env review wait <name> --since <the timestamp>
|
|
@@ -146,7 +146,7 @@ because writing it means reading the diff, and that spend is the user's call.
|
|
|
146
146
|
3. **On waking, let the engine pick:**
|
|
147
147
|
|
|
148
148
|
**A watch that dies is re-armed on the same window**, silently and bounded by
|
|
149
|
-
the age of that window — `.claude/
|
|
149
|
+
the age of that window — `.claude/skills/spec-diff/review-wait.md` carries the contract,
|
|
150
150
|
including when to stop, what the banner says instead, and when the
|
|
151
151
|
engine's `re-show:` brings the banner back. Do not restate it here.
|
|
152
152
|
|
|
@@ -159,7 +159,7 @@ engine's `re-show:` brings the banner back. Do not restate it here.
|
|
|
159
159
|
|
|
160
160
|
Relay the engine's **stack** — the `local:`, `network:` and `remote:` lines, all
|
|
161
161
|
three, in that order — never the bare `page:` path.
|
|
162
|
-
`.claude/
|
|
162
|
+
`.claude/skills/spec-diff/review-wait.md` carries the shape and why every tier is named.
|
|
163
163
|
|
|
164
164
|
### Route on the verdict
|
|
165
165
|
|
|
@@ -140,7 +140,7 @@ far — so it grills only what it still needs ("seed, don't skip, the grill",
|
|
|
140
140
|
exactly as issue adoption does). Do not stop and tell the user to retype: that
|
|
141
141
|
shape belongs to Phase 0's label routing, which fires before any grilling has
|
|
142
142
|
happened and so has nothing to lose. The full routing matrix lives in
|
|
143
|
-
`.claude/
|
|
143
|
+
`.claude/skills/spec/kind-routing.md`.
|
|
144
144
|
|
|
145
145
|
### Propose the kind — feature, chore or issue (or an epic of them)
|
|
146
146
|
|
|
@@ -161,7 +161,7 @@ The kind is recorded twice, and both follow from the answer: the folder prefix
|
|
|
161
161
|
also defaults its `Gating:` to `none: not user-facing` (only when gating is
|
|
162
162
|
configured — offer the default, let the user override it like any other
|
|
163
163
|
answer), and its commits default to `chore`/`refactor`/`ci` types with no
|
|
164
|
-
`Release-Note:` (see `.claude/rules/spec-
|
|
164
|
+
`Release-Note:` (see `.claude/rules/spec-format.md`). An issue defaults its
|
|
165
165
|
`Gating:` to `none: no code`, and its commits to `docs` with no
|
|
166
166
|
`Release-Note:` — its phases are manual steps, not code, though `/spec-start`
|
|
167
167
|
still gives it a worktree, because the document needs one and the history is
|
|
@@ -601,7 +601,7 @@ the verdict — and the reader's conclusion is about what the page showed them.
|
|
|
601
601
|
the whole scope of what you may claim.
|
|
602
602
|
2. **Run the engine's wait, and end your turn** — under the harness's
|
|
603
603
|
persistent watch primitive where one exists, else in the background
|
|
604
|
-
(`.claude/
|
|
604
|
+
(`.claude/skills/spec-diff/review-wait.md` carries the preference):
|
|
605
605
|
|
|
606
606
|
```
|
|
607
607
|
skitterspec spec-env review wait <spec> --since <the timestamp>
|
|
@@ -613,7 +613,7 @@ the verdict — and the reader's conclusion is about what the page showed them.
|
|
|
613
613
|
3. **On waking, let the engine pick:**
|
|
614
614
|
|
|
615
615
|
**A watch that dies is re-armed on the same window**, silently and bounded by
|
|
616
|
-
the age of that window — `.claude/
|
|
616
|
+
the age of that window — `.claude/skills/spec-diff/review-wait.md` carries the contract,
|
|
617
617
|
including when to stop, what the banner says instead, and when the
|
|
618
618
|
engine's `re-show:` brings the banner back. Do not restate it here.
|
|
619
619
|
|
|
@@ -629,11 +629,11 @@ engine's `re-show:` brings the banner back. Do not restate it here.
|
|
|
629
629
|
to POST to, so the pass is copied and pasted and the reader's next message is
|
|
630
630
|
what carries it. **Do not start a watch that cannot fire**: a wait on the pending
|
|
631
631
|
store would spin forever while the report underneath it claimed to be holding,
|
|
632
|
-
which is the exact failure `.claude/
|
|
632
|
+
which is the exact failure `.claude/skills/spec-diff/review-wait.md` guards against. The wait is
|
|
633
633
|
the turn ending, and the banner says so.
|
|
634
634
|
|
|
635
635
|
Relay the engine's **stack** — the `local:`, `network:` and `remote:` lines, all
|
|
636
|
-
three, in that order — never the bare `page:` path. `.claude/
|
|
636
|
+
three, in that order — never the bare `page:` path. `.claude/skills/spec-diff/review-wait.md`
|
|
637
637
|
carries the shape and why every tier is named rather than one being chosen.
|
|
638
638
|
|
|
639
639
|
## Phase D — record the isolation stack (only if configured)
|
|
@@ -701,7 +701,7 @@ appears where isolation is off: nothing was provisioned and nothing was landed.
|
|
|
701
701
|
|
|
702
702
|
**`Next` depends on whether Phase C2 rendered a page.** Where it did, the run is
|
|
703
703
|
waiting on a verdict, so the block **omits the `Review` row** and ends on the
|
|
704
|
-
banner defined in `.claude/
|
|
704
|
+
banner defined in `.claude/skills/spec-diff/review-wait.md` — counts, the tier stack, and
|
|
705
705
|
this page's two exits:
|
|
706
706
|
|
|
707
707
|
---
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Kind routing — any door, the right spec
|
|
2
|
+
|
|
3
|
+
Every entry skill watches its grill for signals of another kind, and proposes a
|
|
4
|
+
hand-off **the moment one appears**, not at the end of the grill.
|
|
5
|
+
|
|
6
|
+
| In | Watches for | Hands to |
|
|
7
|
+
|----|-------------|----------|
|
|
8
|
+
| `/spec` | defect · defect on a released version · live outage | `/spec-bug` · `/spec-hotfix` · `/spec-incident` |
|
|
9
|
+
| `/spec-bug` | on a released version · live outage · not a defect | `/spec-hotfix` · `/spec-incident` · `/spec` |
|
|
10
|
+
| `/spec-hotfix` | live outage · not on a released version · not a defect | `/spec-incident` · `/spec-bug` · `/spec` |
|
|
11
|
+
| `/spec-incident` | no live outage to record | defect → `/spec-bug` (on a released version → `/spec-hotfix`), else `/spec` |
|
|
12
|
+
|
|
13
|
+
Feature, chore and issue all go to `/spec`, whose kind proposal picks between
|
|
14
|
+
them. Weigh signals in context; do not match keywords:
|
|
15
|
+
|
|
16
|
+
- A **defect** is behaviour that differs from what was intended.
|
|
17
|
+
- **On a released version** means the defect is in what is deployed ("in prod",
|
|
18
|
+
"since v2.1").
|
|
19
|
+
- A **live outage** is a service down or degraded right now.
|
|
20
|
+
- **Not a defect** is a request for new behaviour.
|
|
21
|
+
|
|
22
|
+
The same three rules apply in every skill:
|
|
23
|
+
|
|
24
|
+
- **Always confirm; never switch silently.** Name the signal in the user's own
|
|
25
|
+
words and propose the destination with a one-line reason. A decline ends it:
|
|
26
|
+
the grill carries on and the signal is not raised again. A signal is a
|
|
27
|
+
question, never a verdict.
|
|
28
|
+
- **Precedence: incident > hotfix > bug.** Propose the most specific
|
|
29
|
+
destination.
|
|
30
|
+
- **Hand off in the same session and carry the context.** Invoke the
|
|
31
|
+
destination skill with everything the grill has established, so it grills
|
|
32
|
+
only what is still missing.
|
|
33
|
+
|
|
34
|
+
This is judgment, not configuration. A provider's intake label routing is a
|
|
35
|
+
separate, earlier check.
|
|
@@ -14,7 +14,7 @@ This is the **bug** counterpart to `/spec` (which is for **features**, plan-only
|
|
|
14
14
|
Unlike `/spec`, this skill is hands-on and test-first: it reproduces the bug as a
|
|
15
15
|
**failing test (RED)**, captures a lean Bug spec, then works the test to **GREEN**.
|
|
16
16
|
|
|
17
|
-
Spec type convention (see `.claude/rules/spec-
|
|
17
|
+
Spec type convention (see `.claude/rules/spec-format.md`):
|
|
18
18
|
- Bug specs are named `bug-<kebab-name>`; feature specs `feat-<kebab-name>`.
|
|
19
19
|
- Every spec header carries `> **Type:** Bug` (or `Feature`).
|
|
20
20
|
|
|
@@ -36,7 +36,7 @@ Bugs are concrete — confirm, don't over-grill. Establish:
|
|
|
36
36
|
The investigation above is where mis-entry shows, so watch it for the signals
|
|
37
37
|
that mark the other kinds and raise the hand-off the moment one appears —
|
|
38
38
|
before the failing test is written, while nothing is on disk
|
|
39
|
-
(`.claude/
|
|
39
|
+
(`.claude/skills/spec/kind-routing.md` carries the full routing matrix):
|
|
40
40
|
|
|
41
41
|
- **On a released version** — the defect is on what is deployed ("in prod",
|
|
42
42
|
"since v2.1") → propose **`/spec-hotfix`**. This is the escalation that must
|
|
@@ -332,7 +332,7 @@ The banner it describes is what this skill emits in place of a `Review` row,
|
|
|
332
332
|
and the routing on the verdict is `/spec-diff` §2 and §4, as it is everywhere.
|
|
333
333
|
|
|
334
334
|
**A watch that dies is re-armed on the same window**, silently and bounded by
|
|
335
|
-
the age of that window — `.claude/
|
|
335
|
+
the age of that window — `.claude/skills/spec-diff/review-wait.md` carries the contract,
|
|
336
336
|
including when to stop, what the banner says instead, and when the
|
|
337
337
|
engine's `re-show:` brings the banner back. Do not restate it here.
|
|
338
338
|
|
|
@@ -359,7 +359,7 @@ Relay the engine's **stack** — the `local:`, `network:` and `remote:` lines, a
|
|
|
359
359
|
three — rather than the bare `page:` path: a path is not clickable in any
|
|
360
360
|
terminal, and a page nobody can open is a page nobody reads. Relay the `live:`
|
|
361
361
|
line with it where the engine printed one, and nothing where it did not.
|
|
362
|
-
`.claude/
|
|
362
|
+
`.claude/skills/spec-diff/review-wait.md` carries the shape, including why a rigid
|
|
363
363
|
contract took that line.
|
|
364
364
|
|
|
365
365
|
- **Never write the review unasked**, and **never publish** — there is no
|
|
@@ -376,7 +376,7 @@ underneath a reader when detection flipped mid-session.
|
|
|
376
376
|
So: **relay all three tier lines, every time.** Any `also:` lines sit under
|
|
377
377
|
their tier — the other addresses this machine has of that kind — so pass them
|
|
378
378
|
on rather than editing them out: in the banner they are indented sub-bullets
|
|
379
|
-
under that tier, labels included, exactly as `.claude/
|
|
379
|
+
under that tier, labels included, exactly as `.claude/skills/spec-diff/review-wait.md`
|
|
380
380
|
shows.
|
|
381
381
|
|
|
382
382
|
**Never read an environment variable to decide anything about the offer** — not
|
|
@@ -419,7 +419,7 @@ the shape; this section carries only what is specific here.
|
|
|
419
419
|
|
|
420
420
|
**`Review` is emitted only where step 5b did not run** — a project with no
|
|
421
421
|
isolation, or a render that failed. Where the run is waiting, the banner carries
|
|
422
|
-
the whole subject and the row is dropped, per `.claude/
|
|
422
|
+
the whole subject and the row is dropped, per `.claude/skills/spec-diff/review-wait.md`.
|
|
423
423
|
|
|
424
424
|
`Cause` is the root cause in one clause and `Built` is the fix — the
|
|
425
425
|
failing→passing test belongs in `Tests`, named, so the evidence is a test name
|
|
@@ -75,7 +75,7 @@ session is part-way through writing lands in this commit under this spec's
|
|
|
75
75
|
ticket. The `--` on the **commit** is the other half: a checkout has one
|
|
76
76
|
`.git/index`, shared by every session standing in it, so a bare `git commit`
|
|
77
77
|
takes whatever else is staged there however carefully you staged your own.
|
|
78
|
-
`.claude/
|
|
78
|
+
`.claude/skills/spec-start/isolation.md` carries the full account.
|
|
79
79
|
|
|
80
80
|
**This matters more here than anywhere else.** Teardown (step 7) refuses a dirty
|
|
81
81
|
worktree and offers `--force` as the way through — and forcing would destroy the
|
|
@@ -177,7 +177,7 @@ session is part-way through writing lands in this commit under this spec's
|
|
|
177
177
|
ticket. The `--` on the **commit** is the other half: a checkout has one
|
|
178
178
|
`.git/index`, shared by every session standing in it, so a bare `git commit`
|
|
179
179
|
takes whatever else is staged there however carefully you staged your own.
|
|
180
|
-
`.claude/
|
|
180
|
+
`.claude/skills/spec-start/isolation.md` carries the full account.
|
|
181
181
|
|
|
182
182
|
So this commits exactly the status flip and the move, and nothing of yours — or
|
|
183
183
|
of anyone else's — rides along.
|
|
@@ -296,6 +296,14 @@ in that order, and stops at the first step that fails:
|
|
|
296
296
|
**Then stop: the worktree is kept** (step 7). The branch is what the next
|
|
297
297
|
`-hotfix.N` is cut from if this deploy fails, so it waits for the deploy.
|
|
298
298
|
|
|
299
|
+
**Two hotfixes shipped in one release.** Two hotfixes forked from the same tag
|
|
300
|
+
ship together by rebasing one onto the other and completing the **top** one
|
|
301
|
+
first: its land cuts the release holding both fixes. Then complete the other as
|
|
302
|
+
usual. Its land finds every fix commit already in that release, prints
|
|
303
|
+
`release: already shipped in <tag>`, cuts nothing, and carries only its
|
|
304
|
+
completion. `hotfix finish` takes that release, once it is on `origin`, in
|
|
305
|
+
place of a tag at HEAD.
|
|
306
|
+
|
|
299
307
|
**A branch-based hotfix** (`> **Base version:** <branch>@<sha>`, from
|
|
300
308
|
`hotfix.releaseBranch`) runs the same command and the same consent ask — the
|
|
301
309
|
engine picks the path from the header. What differs is what it does:
|
|
@@ -474,6 +482,8 @@ skitterspec spec-env hotfix finish <name>
|
|
|
474
482
|
|
|
475
483
|
It tears down only when the tree is clean, a release tag is at HEAD and the branch
|
|
476
484
|
is on `origin` at HEAD, naming every check that fails; there is no `--force`.
|
|
485
|
+
A hotfix whose fix shipped in another hotfix's release passes instead when that
|
|
486
|
+
release is on `origin` and the base has every commit of its branch.
|
|
477
487
|
Relay a refusal and stop. Report what it removed in `Worktree`.
|
|
478
488
|
|
|
479
489
|
|
|
@@ -22,6 +22,10 @@ and a 289KB page costs the same to serve as a 5KB one. Do not "simplify" this
|
|
|
22
22
|
by reading the diff and emitting HTML — that is the one change that would undo
|
|
23
23
|
the whole design.
|
|
24
24
|
|
|
25
|
+
The page's verdicts, claiming, the gate and reviewers are in `review-page.md`
|
|
26
|
+
beside this file; the banner and the wait are in `review-wait.md`. Read them
|
|
27
|
+
when a step below relies on them.
|
|
28
|
+
|
|
25
29
|
## 1. Resolve the spec — three rules, in order
|
|
26
30
|
|
|
27
31
|
1. **The name argument**, when given. An unknown name **refuses** and says so:
|
|
@@ -491,7 +495,7 @@ could not run is that strip's business rather than yours.
|
|
|
491
495
|
one line per tier, `local`, `network`, `remote`, each either a URL or the one
|
|
492
496
|
command that turns it on. All of it is free, and all of it is one server.
|
|
493
497
|
You are not choosing between them; you are relaying every line it printed.
|
|
494
|
-
`.claude/
|
|
498
|
+
`.claude/skills/spec-diff/review-wait.md` carries the shape and why.
|
|
495
499
|
|
|
496
500
|
The operator who does not want a LAN listener sets `review.allowNetwork: false`
|
|
497
501
|
in `env.config.json` — `network` then reads `off` with the command that turns it
|
|
@@ -625,7 +629,7 @@ already arrived. Those get the `Review` row, no question, and nothing is owed.
|
|
|
625
629
|
the entire scope of what may be claimed without a person naming it.
|
|
626
630
|
2. **Run the engine's wait, and end your turn** — under the harness's
|
|
627
631
|
persistent watch primitive where one exists, else in the background
|
|
628
|
-
(`.claude/
|
|
632
|
+
(`.claude/skills/spec-diff/review-wait.md` carries the preference):
|
|
629
633
|
|
|
630
634
|
```
|
|
631
635
|
skitterspec spec-env review wait <spec> --since <timestamp>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# The review page, verdicts and the gate
|
|
2
|
+
|
|
3
|
+
Applies only where isolation is configured. The banner and the wait are in
|
|
4
|
+
`review-wait.md`, beside this file.
|
|
5
|
+
|
|
6
|
+
## The page
|
|
7
|
+
|
|
8
|
+
`skitterspec spec-env review <spec> [--branch]` collects the worktree's changes
|
|
9
|
+
with `git -C` and writes a self-contained HTML page to
|
|
10
|
+
`.spec-env/reviews/<spec>.html` (gitignored). It has a file tree, whole-file
|
|
11
|
+
context that folds away, and new files included.
|
|
12
|
+
**The diff never passes through the model**, so rendering costs nothing. The written review (a short
|
|
13
|
+
read plus `flag`/`confirm`/`good` notes) is the part that costs tokens. It is
|
|
14
|
+
offered, never assumed. `/spec-diff` is gated on nothing: half a phase, a hand
|
|
15
|
+
edit or a colleague's branch are all fine.
|
|
16
|
+
|
|
17
|
+
## Taking a pass back
|
|
18
|
+
|
|
19
|
+
The reader ticks `✓ accept` per file, writes notes against a line or a file,
|
|
20
|
+
answers a written review's questions, and then **ends with a verdict**.
|
|
21
|
+
`/spec-diff` stores the pass (`--notes`) and routes on the verdict:
|
|
22
|
+
|
|
23
|
+
- `commit` / `commit-continue` (`Commit & Continue` commits, runs `/spec-next`,
|
|
24
|
+
and **stops there**)
|
|
25
|
+
- `commit-start` (authoring pages only)
|
|
26
|
+
- `changes` means **work them now**.
|
|
27
|
+
- `discuss` means report and talk, changing nothing.
|
|
28
|
+
- `continue` appears on mid-run pages only.
|
|
29
|
+
|
|
30
|
+
**Two transports.** A **served** page POSTs to its own URL. The engine holds the
|
|
31
|
+
pass in a gitignored `.pending.json` and shows a **six-digit code**. A `file://`
|
|
32
|
+
page copies the pass to the clipboard and the reader pastes it. The code is an
|
|
33
|
+
address, never a password.
|
|
34
|
+
|
|
35
|
+
**Claiming.** Inside a wait the run started, `--claim-since` claims the one pass
|
|
36
|
+
that arrived in the window. It acts on none, and refuses when there are two.
|
|
37
|
+
Outside a wait, only `/spec-reviewed` (bare, or with a code) claims one.
|
|
38
|
+
**Claude never claims a pass it was not asked to.** A code that matches nothing
|
|
39
|
+
refuses, names nothing and never falls back to "the only one". Claiming
|
|
40
|
+
consumes the pass. A second pass from the same render supersedes the first.
|
|
41
|
+
`--drop <code>` disowns one. A claimed pass never enters the model's context:
|
|
42
|
+
the engine merges it and reports the counts.
|
|
43
|
+
|
|
44
|
+
**Resolutions.** Report what you did about each note with `--resolve`, and the
|
|
45
|
+
next render shows the note struck through with a one-line account. An accept is
|
|
46
|
+
keyed to the file's content hash, so it lapses on its own when the file changes
|
|
47
|
+
(shown as `accepted earlier — changed since`).
|
|
48
|
+
**The marks are information, never a gate**: nothing counts them.
|
|
49
|
+
|
|
50
|
+
## The verdict is chosen, never derived
|
|
51
|
+
|
|
52
|
+
The one refusal on the page:
|
|
53
|
+
**committing is unavailable while any comment is unresolved**. Unticked files block nothing. Both committing verdicts hand off to
|
|
54
|
+
the project's own commit skill (`review.commitWith`, `/commit` by default).
|
|
55
|
+
Skitterspec never vendors one. A verdict is **consumed**: a commit verdict by
|
|
56
|
+
the commit, a `changes` verdict by the work. Only a one-line outcome log
|
|
57
|
+
survives.
|
|
58
|
+
|
|
59
|
+
## The gate
|
|
60
|
+
|
|
61
|
+
A phase that ended owes an answer. `/spec-next` **arms** the gate when it
|
|
62
|
+
renders the end-of-phase page. Exactly two things clear it: a
|
|
63
|
+
**committing verdict**, or `skitterspec spec-env review skip "<reason>"` (typed as
|
|
64
|
+
`/spec-skip`). A bare skip with no reason is refused. While the gate is armed,
|
|
65
|
+
`/spec-next` refuses, and `.claude/hooks/review-gate.cjs` refuses `git commit`
|
|
66
|
+
**inside that spec's own worktree**. It hands the command line to
|
|
67
|
+
`spec-env review gate --check --for-command`. `skitterspec spec-env review gate
|
|
68
|
+
[--check] [--json]` is what both ask.
|
|
69
|
+
|
|
70
|
+
The gate fails **open** on every cannot-tell: no engine, an unreadable payload,
|
|
71
|
+
a crash, a timeout, `review.required: false`, or an unresolved spec. It is armed
|
|
72
|
+
**only when a phase ends**, never mid-phase, and it is on by default wherever
|
|
73
|
+
isolation is configured.
|
|
74
|
+
|
|
75
|
+
## A second opinion (`review.reviewers`)
|
|
76
|
+
|
|
77
|
+
CLI code reviewers (CodeRabbit's CLI, or anything printing rdjsonl) run once per
|
|
78
|
+
phase from `/spec-next` (`--run-reviewers`). `/spec-diff --reviewers` asks for a
|
|
79
|
+
run mid-phase, and a bare `/spec-diff` never spends one. Results are cached
|
|
80
|
+
against the diff's hash. Findings arrive as **checks**, badged with their tool.
|
|
81
|
+
**They never gate.** A reply to one is a comment, and comments do gate. A
|
|
82
|
+
reviewer that could not run shows `did not run — <why>` and never refuses
|
|
83
|
+
anything. The list is empty by default, because adding one sends the diff to a
|
|
84
|
+
third party. Never pass `--run-reviewers` on a `--docs` render.
|
|
85
|
+
|
|
86
|
+
## Put it live
|
|
87
|
+
|
|
88
|
+
`▶ Put it live` on the page commits the phase, checks the branch out where the
|
|
89
|
+
dev server can see it, and returns the same page. **It clears no gate.**
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# The review banner and the wait
|
|
2
|
+
|
|
3
|
+
Read this before rendering a review banner or waiting for a verdict, from any
|
|
4
|
+
skill. The report block itself is in `.claude/rules/spec-reports.md`.
|
|
5
|
+
|
|
6
|
+
## The banner
|
|
7
|
+
|
|
8
|
+
Use it only where the run is **waiting** on a verdict. It follows the block, and
|
|
9
|
+
the block then has no `Review` row:
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## ⏸ Review ready — 7 files, +212 −18
|
|
14
|
+
|
|
15
|
+
- **local** — [http://127.0.0.1:7760/7e9e123e7540/feat-orders](http://127.0.0.1:7760/7e9e123e7540/feat-orders)
|
|
16
|
+
- **network** — [http://192.168.0.136:7760/7e9e123e7540/feat-orders](http://192.168.0.136:7760/7e9e123e7540/feat-orders)
|
|
17
|
+
- **remote** — [http://100.126.111.34:7760/7e9e123e7540/feat-orders](http://100.126.111.34:7760/7e9e123e7540/feat-orders) (tailnet)
|
|
18
|
+
|
|
19
|
+
live: off — /spec-live to put it live
|
|
20
|
+
|
|
21
|
+
I'm holding here until you send a verdict — the wait covers local, network and remote.
|
|
22
|
+
|
|
23
|
+
`/spec-reviewed` picks it up · `spec-env review skip "<reason>"` moves on
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
It has a rule above and below, a heading with the state and the size, the
|
|
28
|
+
stack, the `live:` line, one holding line, and the exits. Nothing else, and no
|
|
29
|
+
explanatory paragraph. A skill may name different exits (`/spec`'s page offers
|
|
30
|
+
`Commit & Start` · `Commit`).
|
|
31
|
+
|
|
32
|
+
## The stack: copy it, never compose it
|
|
33
|
+
|
|
34
|
+
`spec-env review` prints one line per tier, and `--json` carries the same lines
|
|
35
|
+
as `tiers`. **Three tiers, always all three, in this order**, named by address,
|
|
36
|
+
never by where the reader is:
|
|
37
|
+
|
|
38
|
+
| Tier | Is | Off when |
|
|
39
|
+
|------|----|----------|
|
|
40
|
+
| `local` | the loopback URL on this machine | never. With nothing served it is the `file://` page, which cannot send a verdict |
|
|
41
|
+
| `network` | the LAN URL, for a phone on the same wifi | `review.allowNetwork` is false, or the machine has no network address |
|
|
42
|
+
| `remote` | the tailnet URL, labelled `(tailnet)` | whenever `network` is off; or the machine has no tailnet address |
|
|
43
|
+
|
|
44
|
+
A tier that is off **keeps its line**, naming the one command that turns it on,
|
|
45
|
+
or why nothing can. **One link per door, each labelled, all into one store**:
|
|
46
|
+
the page POSTs to its own URL, so every tier reaches the same server and the
|
|
47
|
+
same pending store. **Still forbidden**: links into **different** stores
|
|
48
|
+
without saying which one the wait is watching, and two unlabelled links.
|
|
49
|
+
|
|
50
|
+
**The one exception is the engine's, not yours.** It hides `local` when the
|
|
51
|
+
reader is on another machine (`SKITTERSPEC_READER=remote`, `review.reader`,
|
|
52
|
+
ssh, or a Windows session with no `SESSIONNAME`), and only when `network` has a
|
|
53
|
+
URL to take its place. A tier marked `hidden` in `--json` is absent from the
|
|
54
|
+
printed stack, so leave it out too.
|
|
55
|
+
|
|
56
|
+
An `also:` line under a tier is an alternate address. Relay it as an indented
|
|
57
|
+
sub-bullet under that tier, with its label. Never pick one link for the reader,
|
|
58
|
+
and never relay the bare `page:` path.
|
|
59
|
+
|
|
60
|
+
The same applies whenever you relay engine output that carries a stack, inside
|
|
61
|
+
a skill or not (`epic status`, `resolve`).
|
|
62
|
+
|
|
63
|
+
**`live:`** is the engine's line, copied as printed: `on` (with a URL where
|
|
64
|
+
configured), `off` or `held` (naming the holder). When the engine prints none,
|
|
65
|
+
leave it out.
|
|
66
|
+
|
|
67
|
+
**The holding line** names the tiers the engine's `covers` lists. All tiers
|
|
68
|
+
reach one server and one pending store, so one wait covers them all.
|
|
69
|
+
|
|
70
|
+
**The findings count**, where a reviewer reported findings, joins the heading's
|
|
71
|
+
counts (`7 files, +212 −18, 3 flagged by coderabbit`). Nothing else about
|
|
72
|
+
reviewers goes in the banner.
|
|
73
|
+
|
|
74
|
+
## The wait
|
|
75
|
+
|
|
76
|
+
**The wait is the engine's command. Do not write one.**
|
|
77
|
+
|
|
78
|
+
1. Note the moment you start waiting, as an ISO timestamp.
|
|
79
|
+
2. Run `skitterspec spec-env review wait <spec> --since <timestamp>` under the
|
|
80
|
+
harness's persistent watch primitive where it has one (Claude Code:
|
|
81
|
+
`Monitor` with `persistent: true`, stopped by `TaskStop`), otherwise in the
|
|
82
|
+
background. **Pass no timeout.** Then end the turn.
|
|
83
|
+
3. On waking, run
|
|
84
|
+
`skitterspec spec-env review <spec> --claim-since <timestamp> --json`. It
|
|
85
|
+
claims the one pass that arrived in the window, acts on nothing when none
|
|
86
|
+
did, and refuses to choose when two did.
|
|
87
|
+
4. Route on the verdict as the skill describes.
|
|
88
|
+
|
|
89
|
+
**Only promise a wait the transport can deliver:**
|
|
90
|
+
|
|
91
|
+
- **A served page**: *"I'm holding here until you send a verdict."* It is
|
|
92
|
+
only true for as long as the wait is actually running.
|
|
93
|
+
- **A `file://` page**: there is no server, so start no watch. The turn ending
|
|
94
|
+
is the wait: *"I'm holding here — paste the pass when you have it."*
|
|
95
|
+
- **A harness with no background watch**: the turn ending is the wait. You still
|
|
96
|
+
wait.
|
|
97
|
+
|
|
98
|
+
## A watch that dies
|
|
99
|
+
|
|
100
|
+
If the wait ends **without a verdict** and the operator did not stop it,
|
|
101
|
+
re-arm it on the **same** `--since`. A pass that arrived during the gap is still
|
|
102
|
+
in the window. A deliberate stop has positive evidence: this session called
|
|
103
|
+
TaskStop, or the operator said to stop. A bare killed-task notification is a
|
|
104
|
+
death, not a stop.
|
|
105
|
+
|
|
106
|
+
- **Say as little as possible.** Where the harness requires visible text, write
|
|
107
|
+
only `Still waiting for the verdict.`. Answer the wait's own start line the
|
|
108
|
+
same way.
|
|
109
|
+
- **Every fifth re-arm**, the wait prints `re-show: banner (re-arm N)` and the
|
|
110
|
+
stack. Relay the run's verdict line (copied if still in context, dropped if
|
|
111
|
+
not) and then the banner in its current state, with the stack from the
|
|
112
|
+
`re-show:` lines. Do not repeat the table.
|
|
113
|
+
- **Stop re-arming once the window is 12 hours old.** From then on the holding
|
|
114
|
+
line becomes: *press a verdict, then type `/spec-reviewed` — I cannot see it
|
|
115
|
+
until you do.*
|
|
116
|
+
|
|
117
|
+
## Mid-run renders: `Continue`
|
|
118
|
+
|
|
119
|
+
A page rendered part-way through a run (`--buttons midrun`) offers `Continue`
|
|
120
|
+
in place of the committing verdicts. Its banner keeps the same heading and
|
|
121
|
+
stack, and these exits:
|
|
122
|
+
|
|
123
|
+
`Continue` carries on · `Request changes` works them now
|
|
124
|
+
|
|
125
|
+
`Continue` resumes the run and never commits. It never clears a gate that a
|
|
126
|
+
finished phase armed: only a committing verdict or a recorded skip clears one.
|
|
127
|
+
A mid-run render waits without arming anything.
|
|
128
|
+
|
|
129
|
+
## The `Review` row, when not waiting
|
|
130
|
+
|
|
131
|
+
A render the run is not held on (a mid-phase `/spec-diff`, a page produced
|
|
132
|
+
alongside other work) gets the `Review` row instead: the counts and every tier,
|
|
133
|
+
and no question. Never use both the row and the banner.
|
|
@@ -14,7 +14,8 @@ An epic's members are built in tabs of their own, and the tab this runs in
|
|
|
14
14
|
stays whatever it was — the epic's coordinator, or a member that just finished.
|
|
15
15
|
So this skill **picks and prints**: its answer is `/spec-start <member>` to
|
|
16
16
|
type **in a new tab**. It writes nothing, provisions nothing, and moves no
|
|
17
|
-
session. Starting the member is `/spec-start`'s job, in that tab.
|
|
17
|
+
session. Starting the member is `/spec-start`'s job, in that tab. How epics,
|
|
18
|
+
`Waits on:` and lanes work is in `epics.md` beside this file.
|
|
18
19
|
|
|
19
20
|
## 1. Ask the engine
|
|
20
21
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Epics
|
|
2
|
+
|
|
3
|
+
An **epic** is a spec of specs: `epic-<name>/00-overview.md` and
|
|
4
|
+
**no phase files**. It records why a group belongs together and, optionally,
|
|
5
|
+
`> **Lanes:** N`, how many members may be in flight at once. `/spec` proposes
|
|
6
|
+
one when the grill describes several specs and their order.
|
|
7
|
+
|
|
8
|
+
**The order lives on the members, never on the epic.** Each member carries
|
|
9
|
+
`> **Epic:** epic-<name>` and `> **Waits on:**`, and any phase file may carry its
|
|
10
|
+
own `Waits on:`. `skitterspec epic status <epic>` turns those headers into what
|
|
11
|
+
can start now, what is blocked and on what, the waves, the phase-level sync
|
|
12
|
+
points, and pairs whose `Area:` overlaps (never run together). A wait is met
|
|
13
|
+
only on the base branch: the spec in `complete/`, or that phase file marked
|
|
14
|
+
done. Anything the engine cannot see counts as cannot-tell, never as met.
|
|
15
|
+
|
|
16
|
+
**Checked where the work happens.** `/spec-start` and `/spec-next` on a member
|
|
17
|
+
ask `skitterspec epic check` before building. An unmet wait warns and offers a
|
|
18
|
+
recorded bypass (`.claude/rules/offered-unblocks.md`). It never refuses, and a
|
|
19
|
+
build never passes a wait silently. An epic gets a documents-only worktree,
|
|
20
|
+
`/spec-next` refuses it, and `/spec-complete` refuses while a member is still
|
|
21
|
+
open, offering to complete with those members listed.
|
|
22
|
+
|
|
23
|
+
## Migrating an `issue-` plan spec to an epic
|
|
24
|
+
|
|
25
|
+
Move the plan's order onto its members:
|
|
26
|
+
|
|
27
|
+
1. `git mv` the folder to `epic-<name>` and set `> **Type:** Epic`.
|
|
28
|
+
2. Add `> **Epic:**` and `> **Waits on:**` to each member, plus a phase file's
|
|
29
|
+
own `Waits on:` for a phase-level sync point.
|
|
30
|
+
3. Delete the wave phase files; `epic status` derives them.
|
|
31
|
+
4. Keep the plan's Decisions. They hold the reasons the headers cannot.
|
|
32
|
+
|
|
33
|
+
**A phase that is not a wave becomes a member**, usually an **Issue** (manual
|
|
34
|
+
steps, no code), with `> **Epic:**` and its own `> **Waits on:**`. Anything that
|
|
35
|
+
waited on that phase now waits on the member.
|
|
36
|
+
|
|
37
|
+
**Do it off the base branch** on a `/no-spec` branch. Before landing, run
|
|
38
|
+
`skitterspec epic status <epic> --here` from that worktree. It reads the
|
|
39
|
+
branch's members and headers, uncommitted edits included, while still counting
|
|
40
|
+
a wait as met only on the base branch.
|
|
41
|
+
|
|
42
|
+
**The epic's first push retires the wave sub-issues.** Each phase sub-issue
|
|
43
|
+
still in the snapshot is closed as not planned and unlinked. A tracker that
|
|
44
|
+
cannot retire one names it, so it can be closed by hand.
|
|
@@ -16,7 +16,7 @@ a **release tag**, not `main`: prod is running a tagged version, so the fix must
|
|
|
16
16
|
be built on **that** commit line, shipped as a **new patch tag** (your CI/CD
|
|
17
17
|
deploys tags), and only then cherry-picked onto `main` for the next release.
|
|
18
18
|
|
|
19
|
-
Spec type convention (see `.claude/rules/spec-
|
|
19
|
+
Spec type convention (see `.claude/rules/spec-format.md`):
|
|
20
20
|
- Hotfix specs are named `hotfix-<kebab-name>`; every header carries
|
|
21
21
|
`> **Type:** Hotfix` and `> **Base version:** <tag>`.
|
|
22
22
|
- Branch is `hotfix/<slug>`, forked from the base tag.
|
|
@@ -71,7 +71,7 @@ Hotfixes are concrete — confirm, don't over-grill. Establish:
|
|
|
71
71
|
### Watch for the other doors — incident, bug, or not a defect
|
|
72
72
|
|
|
73
73
|
This is the most specific defect door, so most mis-entries route *down*
|
|
74
|
-
(`.claude/
|
|
74
|
+
(`.claude/skills/spec/kind-routing.md` carries the full routing matrix):
|
|
75
75
|
|
|
76
76
|
- **Live outage** — the released version is not just wrong but down or
|
|
77
77
|
degraded **right now** → propose **`/spec-incident`**; the record comes
|
|
@@ -312,6 +312,12 @@ config is absent.
|
|
|
312
312
|
- Commit the fix to the `hotfix/<slug>` branch (this commit is what gets tagged
|
|
313
313
|
and cherry-picked). Tick the Fix tasks; add a Changelog line.
|
|
314
314
|
|
|
315
|
+
**Shipping two hotfixes in one release.** When two hotfixes forked from the
|
|
316
|
+
same tag need to deploy together, rebase one onto the other and land the top
|
|
317
|
+
one: its release holds both fixes. Then `/spec-complete` the other. Its land
|
|
318
|
+
sees its fix already in that release (`release: already shipped in <tag>`),
|
|
319
|
+
cuts nothing, and carries only its completion to `main`.
|
|
320
|
+
|
|
315
321
|
**Then refresh the mirror (only if a provider is installed).** The Fix tasks are
|
|
316
322
|
ticked, so the repo is now the truth about this fix — and this skill can take a
|
|
317
323
|
bug all the way to green without `/spec-next` ever running. Without a provider this
|
|
@@ -373,7 +379,7 @@ Relay the engine's **stack** — the `local:`, `network:` and `remote:` lines, a
|
|
|
373
379
|
three — rather than the bare `page:` path: a path is not clickable in any
|
|
374
380
|
terminal, and a page nobody can open is a page nobody reads. Relay the `live:`
|
|
375
381
|
line with it where the engine printed one, and nothing where it did not.
|
|
376
|
-
`.claude/
|
|
382
|
+
`.claude/skills/spec-diff/review-wait.md` carries the shape, including why a rigid
|
|
377
383
|
contract took that line.
|
|
378
384
|
|
|
379
385
|
- **Never write the review unasked**, and **never publish** — there is no
|
|
@@ -390,7 +396,7 @@ underneath a reader when detection flipped mid-session.
|
|
|
390
396
|
So: **relay all three tier lines, every time.** Any `also:` lines sit under
|
|
391
397
|
their tier — the other addresses this machine has of that kind — so pass them
|
|
392
398
|
on rather than editing them out: in the banner they are indented sub-bullets
|
|
393
|
-
under that tier, labels included, exactly as `.claude/
|
|
399
|
+
under that tier, labels included, exactly as `.claude/skills/spec-diff/review-wait.md`
|
|
394
400
|
shows.
|
|
395
401
|
|
|
396
402
|
**Never read an environment variable to decide anything about the offer** — not
|
|
@@ -443,7 +449,7 @@ the shape; this section carries only what is specific here.
|
|
|
443
449
|
|
|
444
450
|
**`Review` is emitted only where step 6b did not run** — a project with no
|
|
445
451
|
isolation, or a render that failed. Where the run is waiting, the banner carries
|
|
446
|
-
the whole subject and the row is dropped, per `.claude/
|
|
452
|
+
the whole subject and the row is dropped, per `.claude/skills/spec-diff/review-wait.md`.
|
|
447
453
|
|
|
448
454
|
**The base tag goes in the verdict clause** — `✅ /spec-hotfix · hotfix-foo ·
|
|
449
455
|
green on v2.3.1`. Which released version this was fixed against is the first
|
|
@@ -44,7 +44,7 @@ straight into `specs/in-progress/` — so the grill's own answers are also its
|
|
|
44
44
|
exit. When items 1 and 2 establish there is **no outage to record** — nothing
|
|
45
45
|
is down or degraded, it never was live, or it is a risk rather than an event —
|
|
46
46
|
propose the right door instead of writing an incident
|
|
47
|
-
(`.claude/
|
|
47
|
+
(`.claude/skills/spec/kind-routing.md` carries the full routing matrix):
|
|
48
48
|
|
|
49
49
|
- a **defect** → **`/spec-bug`**, or **`/spec-hotfix`** when it is on a
|
|
50
50
|
released version;
|
|
@@ -450,7 +450,7 @@ costs — roughly **700 output tokens**, because writing it means reading the di
|
|
|
450
450
|
— and that spend is the operator's call, not a default.
|
|
451
451
|
|
|
452
452
|
**Where you are going to wait, the offer is the banner after the block** —
|
|
453
|
-
defined in `.claude/
|
|
453
|
+
defined in `.claude/skills/spec-diff/review-wait.md`, and **the `Review` row is dropped**
|
|
454
454
|
so one subject lives in one place:
|
|
455
455
|
|
|
456
456
|
---
|
|
@@ -487,7 +487,7 @@ the command that turns them on: a reader who has left the house cannot ask for a
|
|
|
487
487
|
remote door they were never shown.
|
|
488
488
|
|
|
489
489
|
**Do not pick one for them.** The engine used to, and the guess failed three
|
|
490
|
-
separate ways in one day. `.claude/
|
|
490
|
+
separate ways in one day. `.claude/skills/spec-diff/review-wait.md` carries the shape and
|
|
491
491
|
why the *one link, never two* rule now reads
|
|
492
492
|
**one link per door, each labelled, all into one store** —
|
|
493
493
|
local, network and remote are three doors into one room, so the wait
|
|
@@ -543,7 +543,7 @@ reading — and that is the gap the whole gate exists to close.
|
|
|
543
543
|
the whole scope of what you may claim.
|
|
544
544
|
2. **Run the engine's wait, and end your turn** — under the harness's
|
|
545
545
|
persistent watch primitive where one exists, else in the background
|
|
546
|
-
(`.claude/
|
|
546
|
+
(`.claude/skills/spec-diff/review-wait.md` carries the preference):
|
|
547
547
|
|
|
548
548
|
```
|
|
549
549
|
skitterspec spec-env review wait <spec> --since <the timestamp>
|
|
@@ -556,7 +556,7 @@ reading — and that is the gap the whole gate exists to close.
|
|
|
556
556
|
of your own.
|
|
557
557
|
|
|
558
558
|
**A watch that dies is re-armed on the same window**, silently and bounded by
|
|
559
|
-
the age of that window — `.claude/
|
|
559
|
+
the age of that window — `.claude/skills/spec-diff/review-wait.md` carries the contract,
|
|
560
560
|
including when to stop, what the banner says instead, and when the
|
|
561
561
|
engine's `re-show:` brings the banner back. Do not restate it here.
|
|
562
562
|
|
|
@@ -634,7 +634,7 @@ underneath a reader when detection flipped mid-session.
|
|
|
634
634
|
So: **relay all three tier lines, every time.** Any `also:` lines sit under
|
|
635
635
|
their tier — the other addresses this machine has of that kind — so pass them
|
|
636
636
|
on rather than editing them out: in the banner they are indented sub-bullets
|
|
637
|
-
under that tier, labels included, exactly as `.claude/
|
|
637
|
+
under that tier, labels included, exactly as `.claude/skills/spec-diff/review-wait.md`
|
|
638
638
|
shows.
|
|
639
639
|
|
|
640
640
|
**Never read an environment variable to decide anything about the offer** — not
|