@skitterbyte/skitterspec 23.21.1 → 23.23.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/MIGRATION.md +126 -0
- 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 -1013
- 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 +1 -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 +5 -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 +62 -8
- package/assets/skills/spec-review/SKILL.md +1 -1
- package/assets/skills/spec-start/isolation.md +90 -0
- package/bin/skitterspec.js +3 -1
- package/package.json +1 -1
- package/src/cli.js +72 -5
- package/src/conventions.js +43 -0
- package/src/env/resume.js +116 -3
- package/src/init.js +180 -30
- package/src/spec-planning-history.json +103 -0
- package/src/updateall.js +152 -0
package/MIGRATION.md
CHANGED
|
@@ -1,5 +1,131 @@
|
|
|
1
1
|
# Migration guide
|
|
2
2
|
|
|
3
|
+
## Providers drop the `skitterspec` bin: install the base alongside (action required)
|
|
4
|
+
|
|
5
|
+
Every provider used to answer to two names: its own (`skitterspec-github`)
|
|
6
|
+
and `skitterspec`. That alias kept a machine to **one** global provider, because
|
|
7
|
+
npm refuses a second package claiming a bin another already owns:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
npm error File exists: /usr/local/bin/skitterspec
|
|
11
|
+
npm error Remove the existing file and try again, or run npm
|
|
12
|
+
npm error with --force to overwrite files recklessly.
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Now `skitterspec` belongs to the base package, `@skitterbyte/skitterspec`, and
|
|
16
|
+
each provider exposes only its own name. The skills and commands still run
|
|
17
|
+
`skitterspec …`, so
|
|
18
|
+
**the base is installed alongside your provider, and the two are updated together**.
|
|
19
|
+
In exchange, every provider can be installed globally on one
|
|
20
|
+
machine, and `skitterspec update --all` updates every local install in one go.
|
|
21
|
+
|
|
22
|
+
`update` warns when it cannot find `skitterspec` beside a provider. The two
|
|
23
|
+
packages number their versions separately (the base is v23, GitHub v3), so
|
|
24
|
+
they never match by number. Install the latest of each at the same time.
|
|
25
|
+
|
|
26
|
+
Find your install below. You can check what you have with:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm ls -g --depth=0 | grep skitterbyte # global installs
|
|
30
|
+
grep skitterbyte package.json # a project dependency
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### A global provider (the usual setup for `init --local`)
|
|
34
|
+
|
|
35
|
+
Upgrade the provider and install the base **in the same command**. The upgrade
|
|
36
|
+
removes the old `skitterspec` link, so the base can take it. List every
|
|
37
|
+
provider you use:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm i -g @skitterbyte/skitterspec@latest @skitterbyte/skitterspec-github@latest @skitterbyte/skitterspec-azure-boards@latest
|
|
41
|
+
skitterspec update --all
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Then check that both names answer:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
skitterspec --version
|
|
48
|
+
skitterspec-github --version
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**If you installed the base on its own first** and got the `File exists` error
|
|
52
|
+
above, the old provider still owns the name. Upgrade the provider
|
|
53
|
+
(`npm i -g @skitterbyte/skitterspec-<provider>@latest`), then install the base
|
|
54
|
+
again. Don't use `--force`: it overwrites the link and leaves the old
|
|
55
|
+
provider's files in place.
|
|
56
|
+
|
|
57
|
+
### A solo project with a committed install or a `package.json` dependency
|
|
58
|
+
|
|
59
|
+
Move it to a local install with a global CLI, so that later releases never
|
|
60
|
+
touch a tracked file there:
|
|
61
|
+
|
|
62
|
+
1. Do the global install above on this machine.
|
|
63
|
+
2. In the project, start a branch (`/no-spec skitterspec-local`), because the
|
|
64
|
+
next steps change tracked files.
|
|
65
|
+
3. `skitterspec init --local`. This stages the managed files for removal from
|
|
66
|
+
git, moves the hooks into `.claude/settings.local.json`, and moves the
|
|
67
|
+
CLAUDE block into `CLAUDE.local.md`. The files stay on disk.
|
|
68
|
+
4. Remove the dependency, which updates `package.json` and the lockfile:
|
|
69
|
+
`npm uninstall @skitterbyte/skitterspec-<provider>` (or `pnpm remove …`).
|
|
70
|
+
5. `skitterspec update`. The commands are rewritten to call `skitterspec`
|
|
71
|
+
from your PATH.
|
|
72
|
+
6. Commit the staged removals together with `package.json` and the lockfile
|
|
73
|
+
(`/commit`), review the page and land.
|
|
74
|
+
|
|
75
|
+
From then on, `skitterspec update --all` covers this project.
|
|
76
|
+
|
|
77
|
+
### A team project with a `package.json` dependency
|
|
78
|
+
|
|
79
|
+
The dependency stays, because that is how everyone runs one version. Add the
|
|
80
|
+
base beside it, taking the latest of both together:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
pnpm add -D @skitterbyte/skitterspec@latest @skitterbyte/skitterspec-<provider>@latest
|
|
84
|
+
skitterspec update
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Do this on a `/no-spec` branch, since it changes tracked files. On every
|
|
88
|
+
later bump, move the two together:
|
|
89
|
+
`pnpm up @skitterbyte/skitterspec @skitterbyte/skitterspec-<provider>`.
|
|
90
|
+
`update --all` lists a team project and never writes to it.
|
|
91
|
+
|
|
92
|
+
### A Windows VM
|
|
93
|
+
|
|
94
|
+
Global installs belong to one machine, and the VM has its own. Inside the VM,
|
|
95
|
+
run the same `npm i -g …` line and then `skitterspec update --all`. That reads
|
|
96
|
+
the VM's own Claude Code project list. Where the Mac and the VM share one
|
|
97
|
+
checkout, update both machines at the same time. Otherwise each `update`
|
|
98
|
+
rewrites the other's files.
|
|
99
|
+
|
|
100
|
+
### After every release, from now on
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
npm i -g @skitterbyte/skitterspec@latest @skitterbyte/skitterspec-<provider>@latest # every provider you use
|
|
104
|
+
skitterspec update --all
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Repeat both lines inside the VM.
|
|
108
|
+
|
|
109
|
+
## `@skitterbyte/skitterspec-github` v2 → v3 (the `skitterspec` bin moves to the base)
|
|
110
|
+
|
|
111
|
+
Install `@skitterbyte/skitterspec` alongside. See
|
|
112
|
+
[Providers drop the `skitterspec` bin](#providers-drop-the-skitterspec-bin-install-the-base-alongside-action-required).
|
|
113
|
+
|
|
114
|
+
## `@skitterbyte/skitterspec-azure-boards` v2 → v3 (the `skitterspec` bin moves to the base)
|
|
115
|
+
|
|
116
|
+
Install `@skitterbyte/skitterspec` alongside. See
|
|
117
|
+
[Providers drop the `skitterspec` bin](#providers-drop-the-skitterspec-bin-install-the-base-alongside-action-required).
|
|
118
|
+
|
|
119
|
+
## `@skitterbyte/skitterspec-jira` v2 → v3 (the `skitterspec` bin moves to the base)
|
|
120
|
+
|
|
121
|
+
Install `@skitterbyte/skitterspec` alongside. See
|
|
122
|
+
[Providers drop the `skitterspec` bin](#providers-drop-the-skitterspec-bin-install-the-base-alongside-action-required).
|
|
123
|
+
|
|
124
|
+
## `@skitterbyte/skitterspec-linear` v19 → v20 (the `skitterspec` bin moves to the base)
|
|
125
|
+
|
|
126
|
+
Install `@skitterbyte/skitterspec` alongside. See
|
|
127
|
+
[Providers drop the `skitterspec` bin](#providers-drop-the-skitterspec-bin-install-the-base-alongside-action-required).
|
|
128
|
+
|
|
3
129
|
## A PR-mode finish runs the `afterLand` entries its land matched (nothing to edit)
|
|
4
130
|
|
|
5
131
|
After the host merged a PR, `spec-env integrate` used to print `nothing to
|
|
@@ -1,125 +1,25 @@
|
|
|
1
1
|
## Spec workflow
|
|
2
2
|
|
|
3
|
-
Spec-driven development runs through the lifecycle **skills
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
and
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
`/spec-init` asks for both. In the morning, **`/spec-todo`** answers the other
|
|
27
|
-
question: where each project was left on your last working day, what is
|
|
28
|
-
waiting on you, and what to pick up first. Both read across projects, and
|
|
29
|
-
neither acts on one: a session works on the project it was started in, and a
|
|
30
|
-
hook refuses its writes and lifecycle commands anywhere else until you type
|
|
31
|
-
`/allow-project <name>`.
|
|
32
|
-
|
|
33
|
-
**Coming back to a spec** that waited on a deploy, another project or a soak
|
|
34
|
-
is **`/spec-resume <name|#N> [message]`**. It finds the spec even if it exists
|
|
35
|
-
only on its branch, rebuilds its worktree if this machine has none, moves the
|
|
36
|
-
session there and shows what it was blocked on. Then it acts on the message:
|
|
37
|
-
feedback on the shipped work becomes tasks, "the deploy is out" clears the
|
|
38
|
-
blocker, and a question gets an answer from the spec. It never starts
|
|
39
|
-
anything. `/spec #N` on a ticket that already has a spec offers it instead.
|
|
40
|
-
**`/spec-park "<reason>"`** records the wait in the first place, as a
|
|
41
|
-
`Blocked on:` line. `/spec` writes the planned ones ("phase 4 waits until
|
|
42
|
-
phase 3 has run in prod a week"), and `/spec-next` stops before building
|
|
43
|
-
past either kind.
|
|
44
|
-
|
|
45
|
-
**Handing the review back.** The page takes marks: tick `✓ accept` per file as
|
|
46
|
-
you read, note anything against a line or a whole file, answer the questions a
|
|
47
|
-
written review asked — then **end it in a decision**. At the end of a phase the
|
|
48
|
-
buttons are `✓ Commit`, `✓ Commit & Continue` (commit, then build the next
|
|
49
|
-
phase), `↺ Request changes` and `… Discuss first`. A spec that has just been
|
|
50
|
-
written gets `✓ Commit & Start` instead — the `commit-start` verdict, which is
|
|
51
|
-
the `commit && /spec-start` you would otherwise type. A **served** page hands
|
|
52
|
-
the pass to the engine, which **holds** it and shows a six-digit code. Committing
|
|
53
|
-
is unavailable while a note is open — you asked for something, so it cannot also
|
|
54
|
-
be fine — and it hands off to your own commit skill (`review.commitWith`,
|
|
55
|
-
`/commit` by default) rather than a copy living here. Fixes come back as
|
|
56
|
-
resolutions, so the next render shows each note struck through with what changed.
|
|
57
|
-
An accept remembers the file's content, so it lapses by itself when that file
|
|
58
|
-
changes again. The marks are information — nothing gates on them; the verdict is
|
|
59
|
-
the one thing you choose, once.
|
|
60
|
-
|
|
61
|
-
**The phase waits for that press.** `/spec-next` ends a phase by rendering the
|
|
62
|
-
page and then watching for your verdict, so the button is what carries the work
|
|
63
|
-
on — no command to remember. What makes that safe is not that the page is
|
|
64
|
-
unreachable (it is reachable, deliberately): it is the **serve token** in the
|
|
65
|
-
URL, 48 random bits deciding who can POST at all, plus the **window** — only a
|
|
66
|
-
pass that arrives *while the session is waiting* is claimed for you, and two
|
|
67
|
-
arrivals refuse rather than pick. Outside that window nothing is claimed
|
|
68
|
-
unasked: type `/spec-reviewed`, or `/spec-reviewed 324199` to name one exactly,
|
|
69
|
-
which matters only when two are waiting. A `file://` page has no server to talk
|
|
70
|
-
to, so it copies and you paste, as before.
|
|
71
|
-
|
|
72
|
-
**And a phase that ended owes you an answer.** The gate is armed when the page
|
|
73
|
-
is rendered at the end of a phase, and cleared by a committing verdict or by
|
|
74
|
-
`skitterspec spec-env review skip "<reason>"` — while it is armed, `/spec-next`
|
|
75
|
-
refuses to build the next phase. Mid-phase renders arm nothing, every
|
|
76
|
-
cannot-tell exits 0 and says nothing, and `review.required: false` turns it off
|
|
77
|
-
for a project. The exit is always one command; one of them is *"I am moving
|
|
78
|
-
on"*, and that reason goes on the record.
|
|
79
|
-
|
|
80
|
-
**A second opinion, when you want one** (`review.reviewers`, empty by default).
|
|
81
|
-
Point it at a code reviewer that runs from your terminal — CodeRabbit's CLI has
|
|
82
|
-
a free tier and `{ "use": "coderabbit" }` is the whole setup; anything printing
|
|
83
|
-
[rdjsonl](https://github.com/reviewdog/reviewdog) works too — and its findings
|
|
84
|
-
land on the page beside your own notes, each badged with the tool that found it
|
|
85
|
-
and linked to the line it is about. `/spec-next` runs them once per phase;
|
|
86
|
-
`/spec-diff --reviewers` is the mid-phase ask. **They never block a commit** —
|
|
87
|
-
reply to one and your reply does, because then a person has asked for something.
|
|
88
|
-
A reviewer that could not run says `did not run — <why>` rather than passing as
|
|
89
|
-
clean, because on the page you commit from those two must not look alike.
|
|
90
|
-
Adding one sends your diff to whatever the command talks to, which is why the
|
|
91
|
-
list starts empty and `init` never writes one.
|
|
92
|
-
|
|
93
|
-
**Above the verdicts sits one line that is not a verdict.** `▶ Put it live`
|
|
94
|
-
commits the phase, checks the branch out where your dev server can see it, and
|
|
95
|
-
hands you back the same page with the same options — so you can judge the change
|
|
96
|
-
by *using* it, not only by reading it. It clears no gate: you have looked at it
|
|
97
|
-
running and concluded nothing, so the phase still owes an answer.
|
|
98
|
-
|
|
99
|
-
**Every render lists where the page can be read**, labelled, in a fixed order —
|
|
100
|
-
`local`, `network`, `remote` — each either a URL or the one command that turns it
|
|
101
|
-
on, plus a `live:` line saying whether the change is also running. They are
|
|
102
|
-
labelled by address: `local` is this machine, `network` your LAN, `remote` your
|
|
103
|
-
tailnet. All three are doors into one room — the same server and the same
|
|
104
|
-
waiting verdict — so one wait covers every one the stack shows.
|
|
105
|
-
|
|
106
|
-
**One ending.** Every spec skill finishes with the same block — a verdict
|
|
107
|
-
(`✅` · `⚠️` · `❌` · `⏸`), then a table of the fields that skill declares,
|
|
108
|
-
ending on the one thing to do next. A refusal emits it too, so "nothing
|
|
109
|
-
happened" is reported rather than absent, and `Follow-ups` is always there
|
|
110
|
-
because a recorded `none` is a decision. Skills stay quiet while they run. The
|
|
111
|
-
shape lives in **`.claude/rules/spec-reports.md`**.
|
|
112
|
-
|
|
113
|
-
The skill table, the spec type/folder conventions and the per-spec isolation
|
|
114
|
-
model all live in **`.claude/rules/spec-planning.md`**, the canonical reference
|
|
115
|
-
every spec skill points at. Tailor its per-phase test commands to this stack.
|
|
116
|
-
|
|
117
|
-
**Release gating** *(only when `specs/.core/gating.config.json` exists)* — each
|
|
118
|
-
spec records whether it ships behind a feature flag, as
|
|
119
|
-
`> **Gating:** <flag name>` or `> **Gating:** none: <one-line reason>`. `/spec`,
|
|
120
|
-
`/spec-bug` and `/spec-hotfix` ask; `/spec-review`, `/spec-start` and
|
|
121
|
-
`/spec-complete` report a spec that has no answer, and never block over it.
|
|
122
|
-
`skitterspec gating check` lists them and always exits 0. The point is that the
|
|
123
|
-
question is **on the record**: a missing line is an oversight, a reason is a
|
|
124
|
-
decision. Skitterspec never reads your flag system — it asks and cites the doc
|
|
125
|
-
you point it at. Without that config, none of this appears.
|
|
3
|
+
Spec-driven development runs through the lifecycle **skills**. The everyday
|
|
4
|
+
loop is **`spec → start → next → commit → complete`**. Use **`/spec-diff`** to
|
|
5
|
+
read what a phase changed, and `/spec-connect` or `/spec-live` to try it in a
|
|
6
|
+
browser. `/spec-resume` goes back into a spec that was waiting, and
|
|
7
|
+
`/spec-park` records what it is waiting on. `/spec-tada` and `/spec-todo` recap
|
|
8
|
+
the day and plan the next one across projects.
|
|
9
|
+
|
|
10
|
+
- **Each phase ends on a review page**, listed as `local`, `network` (LAN) and
|
|
11
|
+
`remote` (tailnet), with a `live:` line saying whether it is also running.
|
|
12
|
+
Mark it up and press a verdict. `/spec-next` waits for that press, and a phase
|
|
13
|
+
that ended owes one before the next is built. A newly written spec's page
|
|
14
|
+
offers `Commit & Start` (`commit-start`).
|
|
15
|
+
- **Every skill ends with the same report block**: a verdict, a table, and
|
|
16
|
+
`Next`.
|
|
17
|
+
- **Guards**: work never happens in the primary checkout on the base branch,
|
|
18
|
+
and a session works only on its own project. Only a person can lift either
|
|
19
|
+
guard (`/allow-main`, `/allow-project`).
|
|
20
|
+
|
|
21
|
+
The rules are in `.claude/rules/spec-planning.md` (lifecycle and guards),
|
|
22
|
+
`.claude/rules/spec-reports.md` (the report block) and
|
|
23
|
+
`.claude/rules/spec-format.md` (spec layout, which loads under `specs/`). This
|
|
24
|
+
project's typecheck and test commands are in
|
|
25
|
+
`.claude/rules/project-conventions.md`.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Project conventions
|
|
2
|
+
|
|
3
|
+
This file belongs to the project. skitterspec writes it once and never
|
|
4
|
+
overwrites it, so fill it in.
|
|
5
|
+
|
|
6
|
+
The spec skills tell you to run "your project's typecheck and test commands"
|
|
7
|
+
and to "honour project conventions". Spell those out here so specs stay
|
|
8
|
+
consistent with the codebase. skitterspec never runs these commands itself and
|
|
9
|
+
knows nothing about what this project is written in. Pick the example below
|
|
10
|
+
that fits, or write your own.
|
|
11
|
+
|
|
12
|
+
- **Typecheck command:** `<e.g. npm run typecheck · dotnet build · mypy . · go vet ./...>`
|
|
13
|
+
- **Test command:** `<e.g. npm test · dotnet test · pytest · go test ./...>`
|
|
14
|
+
(single file/dir: `<e.g. npx vitest run path · dotnet test --filter · pytest path>`)
|
|
15
|
+
- **Lint/format:** `<e.g. npm run lint · dotnet format · ruff check · golangci-lint run>`
|
|
16
|
+
- **Other rules specs must honour:** link the relevant `.claude/rules/*.md`
|
|
17
|
+
(architecture, code style, testing, database, etc.) rather than restating them.
|
|
@@ -1,69 +1,42 @@
|
|
|
1
1
|
# Checks That Accuse
|
|
2
2
|
|
|
3
3
|
A check **accuses** when being wrong costs something: it deletes, it exits
|
|
4
|
-
non-zero, or it tells the user their code is broken.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Almost every accusation begins as an **absence**: a name not in a list, a
|
|
9
|
-
directory not on disk, a version not in a response. An absence is evidence only
|
|
10
|
-
once you have established that the lookup could have seen the thing. Three
|
|
11
|
-
times in one day, in unrelated code, we established nothing and acted anyway:
|
|
12
|
-
|
|
13
|
-
| Absence observed | Concluded | What had blinded the lookup |
|
|
14
|
-
|------------------|-----------|-----------------------------|
|
|
15
|
-
| ref not in the issue list | "it does not exist" | the query excluded archived issues, and capped at 250 |
|
|
16
|
-
| version not in the registry's list | "the publish failed" | the registry is eventually consistent |
|
|
17
|
-
| lifecycle folder not on disk | "half-installed" | git does not store an empty directory |
|
|
18
|
-
|
|
19
|
-
The bills: 146 healthy refs accused, a valid release tag deleted, a non-zero
|
|
20
|
-
exit on a healthy repo. Each blind spot was knowable in advance.
|
|
4
|
+
non-zero, or it tells the user their code is broken. Most accusations start
|
|
5
|
+
from an **absence** (a name not in a list, a directory not on disk). An absence
|
|
6
|
+
is evidence only once you have established that the lookup could have seen the
|
|
7
|
+
thing.
|
|
21
8
|
|
|
22
9
|
## 1. Prefer a positive signal to an absence
|
|
23
10
|
|
|
24
11
|
Assert something that must be **present**, not something that must not be
|
|
25
|
-
missing.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
The scaffold check above stopped asking "is the lifecycle folder there?" — a
|
|
29
|
-
folder git drops as soon as it empties — and started asking whether the config
|
|
30
|
-
folder the installer always writes into is there. Same intent, and the new
|
|
31
|
-
question has an answer.
|
|
32
|
-
|
|
33
|
-
Where no positive signal exists, widen the lookup until absence means
|
|
34
|
-
something (include the archived rows, ask the API for the one id rather than
|
|
35
|
-
scanning a page) — or do not conclude.
|
|
12
|
+
missing. Where no positive signal exists, widen the lookup until an absence
|
|
13
|
+
means something (include archived rows, ask for the one id rather than scanning
|
|
14
|
+
a page), or draw no conclusion.
|
|
36
15
|
|
|
37
16
|
## 2. Name the blind spot beside the check
|
|
38
17
|
|
|
39
|
-
|
|
40
|
-
check
|
|
18
|
+
Write a comment saying what could make this lookup lie. Describe what would
|
|
19
|
+
fool the check, not what the code does:
|
|
41
20
|
|
|
42
21
|
```js
|
|
43
22
|
// A LIFECYCLE FOLDER IS NOT CHECKED, deliberately. git does not track empty
|
|
44
|
-
// directories, so it disappears whenever the bucket empties
|
|
45
|
-
// moment something lands in it.
|
|
23
|
+
// directories, so it disappears whenever the bucket empties.
|
|
46
24
|
```
|
|
47
25
|
|
|
48
|
-
Write it when you write the check, while you still know why it is safe.
|
|
49
|
-
|
|
50
26
|
## 3. Pair every accusation with a stays-silent test
|
|
51
27
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
proves the check can fire; only this one proves it does not fire at everyone
|
|
56
|
-
else. All three incidents would have been caught by it, and prose alone had
|
|
57
|
-
already failed to prevent them.
|
|
28
|
+
Give each accusing check a test that feeds it a **healthy but unusual** input
|
|
29
|
+
(an empty bucket, an archived record, a just-published version, a file edited on
|
|
30
|
+
purpose) and asserts that it says nothing.
|
|
58
31
|
|
|
59
32
|
## 4. Bias the unknown case toward inaction
|
|
60
33
|
|
|
61
|
-
|
|
62
|
-
harmless branch
|
|
34
|
+
There are three states: yes, no and *cannot tell*. Route *cannot tell* to the
|
|
35
|
+
harmless branch (skip, warn, keep, retry), never to the destructive one. For
|
|
36
|
+
example, a file whose hash the manifest does not recognise is treated as
|
|
37
|
+
`customized` and kept, never as stale.
|
|
38
|
+
|
|
39
|
+
---
|
|
63
40
|
|
|
64
|
-
The
|
|
65
|
-
|
|
66
|
-
`packages/common/src/init.js`). An unrecognised hash could mean a user's edit or
|
|
67
|
-
a lost manifest; only one of those readings is safe to act on, so it takes that
|
|
68
|
-
one. Being wrong there costs a redundant file on disk. The opposite default
|
|
69
|
-
costs the user their work.
|
|
41
|
+
The incidents behind these rules:
|
|
42
|
+
[docs/rationale/negative-checks.md](https://github.com/SkitterByte/skitterspec/blob/main/docs/rationale/negative-checks.md).
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
# Offered Unblocks
|
|
2
2
|
|
|
3
|
-
A refusal says what is wrong.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
This file is the whole contract. A skill's own text says only *that* it acts on
|
|
8
|
-
an offer, never how.
|
|
3
|
+
A refusal says what is wrong. Where the engine also declares what would fix it,
|
|
4
|
+
a skill may offer that fix instead of leaving the operator at a dead end. This
|
|
5
|
+
file is the whole contract.
|
|
9
6
|
|
|
10
7
|
## The engine declares; the skill relays
|
|
11
8
|
|
|
12
|
-
An offer is a field on a refusal
|
|
13
|
-
reason text:
|
|
9
|
+
An offer is a field on a refusal:
|
|
14
10
|
|
|
15
11
|
```json
|
|
16
12
|
{
|
|
@@ -20,15 +16,13 @@ reason text:
|
|
|
20
16
|
}
|
|
21
17
|
```
|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
correct, common answer. Where there is none, relay the refusal and stop.
|
|
19
|
+
Text output carries the same offer as an `offer:` line under the refusal.
|
|
25
20
|
|
|
26
|
-
**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
spec holds
|
|
31
|
-
helpful picker is exactly how that would creep back in.
|
|
21
|
+
**Absent stays absent.** Most refusals carry no offer. Then relay the refusal
|
|
22
|
+
and stop. **Never infer one.** If the engine did not declare an offer, there is
|
|
23
|
+
none, however obvious the fix looks.
|
|
24
|
+
Work that is not the operator's is never offered up: a live workbench another
|
|
25
|
+
spec holds declares nothing.
|
|
32
26
|
|
|
33
27
|
## Two kinds
|
|
34
28
|
|
|
@@ -39,27 +33,18 @@ helpful picker is exactly how that would creep back in.
|
|
|
39
33
|
|
|
40
34
|
## Relay first, then offer
|
|
41
35
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Then, only where `offer` is present, put **two** options to the operator: the
|
|
47
|
-
offer's `label`, and Cancel.
|
|
48
|
-
|
|
49
|
-
- **`satisfy`** — run the command, then retry the original operation.
|
|
50
|
-
- **`bypass`** — run the command, then carry on.
|
|
51
|
-
- **Cancel** — stop. Record nothing: declining to bypass is not a decision
|
|
52
|
-
anyone needs to audit.
|
|
36
|
+
Relay the refusal first, never instead of it. Then, only where `offer` is
|
|
37
|
+
present, put **two** options to the operator: the offer's `label`, shown
|
|
38
|
+
verbatim, and Cancel. Never reword it, never pre-select it,
|
|
39
|
+
and never add a third option.
|
|
53
40
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
41
|
+
- **`satisfy`**: run the command, then retry the original operation.
|
|
42
|
+
- **`bypass`**: run the command, then carry on.
|
|
43
|
+
- **Cancel**: stop, and record nothing.
|
|
57
44
|
|
|
58
45
|
### A worked `satisfy`: the gap between release branches
|
|
59
46
|
|
|
60
|
-
Under `baseBranchPattern`,
|
|
61
|
-
last release branch has merged and the next is not yet cut, that refusal is the
|
|
62
|
-
normal state of the repo for a while, not a mistake. So the engine declares:
|
|
47
|
+
Under `baseBranchPattern`, the gap between release branches refuses with:
|
|
63
48
|
|
|
64
49
|
```json
|
|
65
50
|
{
|
|
@@ -69,54 +54,34 @@ normal state of the repo for a while, not a mistake. So the engine declares:
|
|
|
69
54
|
}
|
|
70
55
|
```
|
|
71
56
|
|
|
72
|
-
|
|
73
|
-
the pick, run the command and retry the command that refused. It is `satisfy`
|
|
74
|
-
because it gives the guard what it asked for — a base — and the pick is kept as
|
|
75
|
-
a local pin that every command then honours, so it is asked once per gap rather
|
|
76
|
-
than once per command. The pin clears itself when a branch matches again, so
|
|
77
|
-
nothing about it needs recording. No fallback resolvable means no `offer`, and
|
|
78
|
-
the refusal stands alone.
|
|
57
|
+
Run the command, then retry the command that refused.
|
|
79
58
|
|
|
80
59
|
## A bypass is offered once per obligation
|
|
81
60
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
After that the gate declares no offer for the same arming, so the next refused
|
|
90
|
-
commit is a plain refusal with its exits named in the text. A new phase ending
|
|
91
|
-
arms the gate again and is asked in its own right.
|
|
92
|
-
|
|
93
|
-
**Spent by being made, not by being taken.** An operator who declines still saw
|
|
94
|
-
it, and re-offering on every attempt is how a deliberate step becomes the
|
|
95
|
-
default.
|
|
96
|
-
|
|
97
|
-
**Do not spend it by reading.** `review gate --json` is asked on every
|
|
98
|
-
`/spec-next` run; only raising the picker spends the offer.
|
|
61
|
+
Spend the offer by recording it **when you raise the picker**, for example
|
|
62
|
+
`skitterspec spec-env review gate <spec> --offered`. After that the engine
|
|
63
|
+
declares no offer for the same arming. It counts as spent once it is raised,
|
|
64
|
+
even if declined. **Do not spend it by reading**: `review gate --json` on every
|
|
65
|
+
`/spec-next` run spends nothing.
|
|
99
66
|
|
|
100
67
|
## What this is not
|
|
101
68
|
|
|
102
|
-
**Not a `--force`.**
|
|
103
|
-
indistinguishable from nobody having looked
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
69
|
+
- **Not a `--force`.** A reasonless lift was rejected, because it is
|
|
70
|
+
indistinguishable from nobody having looked.
|
|
71
|
+
- **Not a replacement for the refusal.** It is a
|
|
72
|
+
layer on top of a guard and never the guard itself. The engine and the hooks
|
|
73
|
+
keep refusing regardless.
|
|
107
74
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
top of a guard and never the guard itself.
|
|
75
|
+
A bypass survives the rule that Claude must not lift a guard aimed at Claude
|
|
76
|
+
only because three things hold together:
|
|
111
77
|
|
|
112
|
-
**
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
1. **The operator answers.** Claude may raise the question and cannot answer it.
|
|
117
|
-
2. **The choice is recorded** — a fixed reason, distinct from anything typed,
|
|
118
|
-
which shows on the next render as history.
|
|
119
|
-
3. **It is offered once**, held by the sidecar rather than by prose, so it
|
|
120
|
-
survives a `/clear`, a compaction and a fresh session.
|
|
78
|
+
1. **The operator answers.** Claude may raise the question but never answer it.
|
|
79
|
+
2. **The choice is recorded.**
|
|
80
|
+
3. **It is offered once.**
|
|
121
81
|
|
|
122
82
|
Remove any one of those and the objection returns.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
Rationale and the rejected alternatives:
|
|
87
|
+
[docs/rationale/offered-unblocks.md](https://github.com/SkitterByte/skitterspec/blob/main/docs/rationale/offered-unblocks.md).
|