@skitterbyte/skitterspec 23.24.2 → 23.24.4
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/review/page.html +4 -0
- package/assets/skills/spec-next/SKILL.md +43 -22
- package/bin/skitterspec.js +21 -0
- package/package.json +1 -1
- package/src/cli.js +22 -9
- package/src/env/review.js +4 -1
- package/src/env/serve.js +3 -1
- package/src/provider.js +66 -8
- package/src/updateall.js +8 -8
package/assets/review/page.html
CHANGED
|
@@ -1997,6 +1997,10 @@ a.ticket:hover { border-color: var(--accent); }
|
|
|
1997
1997
|
// because `Commit & Continue` names a next phase a spec with no phase files
|
|
1998
1998
|
// does not have. Same three buttons as `refresh`, a different subject.
|
|
1999
1999
|
fix: ['commit', 'changes', 'discuss'],
|
|
2000
|
+
// A PHASE STOPPED AT ITS MANUAL STEPS: the code half commits so it can go
|
|
2001
|
+
// live and be tested; the steps come next, so there is nothing to Continue
|
|
2002
|
+
// into. `/spec-next` §3 renders it, and arms nothing.
|
|
2003
|
+
manual: ['commit', 'changes', 'discuss'],
|
|
2000
2004
|
// A KEPT PHASE of an autonomous run: the run committed it and carried on,
|
|
2001
2005
|
// so there is nothing to decide here — it is read, not answered.
|
|
2002
2006
|
snapshot: [],
|
|
@@ -309,28 +309,55 @@ Then build it, following the project rules in `.claude/rules/*.md` and `CLAUDE.m
|
|
|
309
309
|
- Never hardcode dates in tests; never run destructive commands against a real
|
|
310
310
|
database — use the project's test database only.
|
|
311
311
|
|
|
312
|
-
### Manual steps — list them,
|
|
312
|
+
### Manual steps — list them, end the turn, ask when they come back
|
|
313
313
|
|
|
314
314
|
Some tasks are a person's to do: every task in an **Issue** spec, and any task
|
|
315
315
|
you cannot perform yourself — operate a UI, check a device, confirm something
|
|
316
316
|
on a board, run a manual test pass. That is a **judgment**, not a marker: there
|
|
317
317
|
is no `(manual)` tag to look for, and a spec written before this rule has none.
|
|
318
318
|
|
|
319
|
-
Build the tasks before the first manual one as usual
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
**never only the phase file's path**. A pointer to the file
|
|
323
|
-
out of the terminal to find out what to do, which is the
|
|
324
|
-
fix; the steps themselves are what they act on.
|
|
319
|
+
Build the tasks before the first manual one as usual, to green.
|
|
320
|
+
Then **stop at it** and print
|
|
321
|
+
**every remaining manual step of this phase, verbatim and numbered** —
|
|
322
|
+
never fenced, and **never only the phase file's path**. A pointer to the file
|
|
323
|
+
sends the reader out of the terminal to find out what to do, which is the
|
|
324
|
+
failure this exists to fix; the steps themselves are what they act on.
|
|
325
325
|
|
|
326
326
|
**Steps you had to write are saved first.** When the phase file holds only a
|
|
327
327
|
vague manual task — "check it on the running host" — and you wrote the steps
|
|
328
328
|
yourself, add them under that task as numbered sub-checkboxes **before** you
|
|
329
|
-
|
|
330
|
-
up its own set lists different steps from the ones the reader was shown.
|
|
331
|
-
phase whose manual steps are already tasks is left as it is.
|
|
332
|
-
|
|
333
|
-
|
|
329
|
+
list them. The conversation does not survive a `/clear`, and a later run that
|
|
330
|
+
makes up its own set lists different steps from the ones the reader was shown.
|
|
331
|
+
A phase whose manual steps are already tasks is left as it is.
|
|
332
|
+
|
|
333
|
+
**The first listing ends the turn, and asks no question.** Asking in the same
|
|
334
|
+
turn fails twice over (ereqs, 2026-11-24): the harness's question dialog can
|
|
335
|
+
cover the text before it, so the reader sees "how did it go?" with no steps;
|
|
336
|
+
and the work is not reachable yet — uncommitted in this worktree, not live, not
|
|
337
|
+
on the base branch — so nothing could have been tested. The stop is a report:
|
|
338
|
+
|
|
339
|
+
1. **Render the page for the code built so far**, only where the project has
|
|
340
|
+
isolation: `skitterspec spec-env review <spec> --buttons manual`. The
|
|
341
|
+
`manual` set offers `Commit` and drops `Commit & Continue`: the code half
|
|
342
|
+
commits so `/spec-live` can take a clean tree, and what follows is a
|
|
343
|
+
person's testing, not a build. It **does not arm** the gate — the phase did
|
|
344
|
+
not end. Committing part of a phase is deliberate here, unlike a `midrun`
|
|
345
|
+
page: the manual steps test this code, and it cannot be reached until it is
|
|
346
|
+
committed. Wait for the verdict as §5 does, under its banner; a `Commit`
|
|
347
|
+
runs through `/spec-diff` §2a.
|
|
348
|
+
2. **End `⚠️`**, `Why` the phase stopped at its manual steps. `Next` first
|
|
349
|
+
names how to reach the work — `/commit`, then `/spec-live`; or
|
|
350
|
+
`/commit`, then `/spec-to-main` where live refuses the branch (it touches
|
|
351
|
+
migrations, which would change the shared database) or a step needs it on
|
|
352
|
+
the base branch — then the steps a row each, then a closing row: *tell me
|
|
353
|
+
how it went, or `/spec-next`*. The rows follow
|
|
354
|
+
`.claude/rules/spec-reports.md`, *Open manual steps are rows*.
|
|
355
|
+
|
|
356
|
+
**The operator's next message is the answer** — "all done", "step 5 failed:
|
|
357
|
+
…" — read as one of the three below. Or a later `/spec-next` finds the steps
|
|
358
|
+
still unticked: re-list them, and now that the operator has come back, ask.
|
|
359
|
+
A picker carries the steps **inside the question text**,
|
|
360
|
+
never only in the text before it. The three answers:
|
|
334
361
|
|
|
335
362
|
- **All done** — tick those steps and carry on to the end of the phase.
|
|
336
363
|
- **Some failed** — the picker cannot list the steps (it holds four options and
|
|
@@ -340,16 +367,10 @@ Then ask one question, with three answers:
|
|
|
340
367
|
never switch.
|
|
341
368
|
- **Not yet** — tick nothing.
|
|
342
369
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
**Some failed or Not yet leaves the phase `🔄`, and stops the run there.** Code
|
|
348
|
-
tasks after an unconfirmed step are not built past it, and the phase did not
|
|
349
|
-
end: **skip §4's done-marking and §5 entirely** — no page, no arm, no wait.
|
|
350
|
-
End `⚠️` and name `/spec-next` in `Next`; it re-lists the same unticked steps.
|
|
351
|
-
Its `Next` lists the open steps a row each, copied from the phase file —
|
|
352
|
-
`.claude/rules/spec-reports.md`, *Open manual steps are rows*.
|
|
370
|
+
**The stop, Some failed and Not yet leave the phase `🔄`, and stop the run there.** Code tasks after an unconfirmed step are not built past it, and the
|
|
371
|
+
phase did not end: **skip §4's done-marking and §5's committing render** — on
|
|
372
|
+
an answer, no page, no arm, no wait. End `⚠️` and name `/spec-next` in `Next`;
|
|
373
|
+
it re-lists the same unticked steps, a row each, copied from the phase file.
|
|
353
374
|
|
|
354
375
|
## 4. Record progress
|
|
355
376
|
|
package/bin/skitterspec.js
CHANGED
|
@@ -40,6 +40,27 @@ if (argv[0] === 'init' || (argv[0] === 'update' && !argv.includes('--all'))) {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
// An install verb in a provider project installs that provider's set, so it
|
|
44
|
+
// goes to the provider's own bin, or is refused when that is not installed —
|
|
45
|
+
// never the base set over the provider's files.
|
|
46
|
+
// A flag parse() rejects is left for run() to report as it always has.
|
|
47
|
+
if (require('../src/provider.js').INSTALL_VERBS.includes(argv[0])) {
|
|
48
|
+
let target = null
|
|
49
|
+
try {
|
|
50
|
+
const { opts, positional } = require('../src/cli.js').parse(argv.slice(1))
|
|
51
|
+
target = require('node:path').resolve(opts.dir || positional[0] || process.cwd())
|
|
52
|
+
} catch {}
|
|
53
|
+
const installed =
|
|
54
|
+
target &&
|
|
55
|
+
require('../src/provider.js').forwardInstallCommand({
|
|
56
|
+
cwd: process.cwd(),
|
|
57
|
+
argv,
|
|
58
|
+
target,
|
|
59
|
+
warn: (line) => console.error(line),
|
|
60
|
+
})
|
|
61
|
+
if (installed !== null) process.exit(installed)
|
|
62
|
+
}
|
|
63
|
+
|
|
43
64
|
// A verb this base does not ship (spec-sync) goes to the configured provider's
|
|
44
65
|
// own bin, which makes its own registrations — so this runs before ours.
|
|
45
66
|
const forwarded = require('../src/provider.js').forwardProviderCommand({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skitterbyte/skitterspec",
|
|
3
|
-
"version": "23.24.
|
|
3
|
+
"version": "23.24.4",
|
|
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",
|
package/src/cli.js
CHANGED
|
@@ -8143,6 +8143,17 @@ function liveRebaseTarget(dir, config, base) {
|
|
|
8143
8143
|
|
|
8144
8144
|
// Take the running instance: rebase the spec's branch onto base, free it from its
|
|
8145
8145
|
// worktree, and check it out in the primary checkout so the dev server reloads it.
|
|
8146
|
+
// A TAKE THAT DID NOT HAPPEN SAYS SO FIRST. Every outcome used to open
|
|
8147
|
+
// `spec-env live take: …`, so a one-line refusal read like the success line,
|
|
8148
|
+
// and an operator (ereqs, 2026-11-24) went to test a feature that was never
|
|
8149
|
+
// switched in. The marker leads, the consequence follows, the reason after.
|
|
8150
|
+
function notLive(folder, why) {
|
|
8151
|
+
return (
|
|
8152
|
+
`✖ NOT LIVE — spec-env live take refused ${folder}; nothing switched, ` +
|
|
8153
|
+
`the running instance is unchanged.\n\n ${why}\n`
|
|
8154
|
+
)
|
|
8155
|
+
}
|
|
8156
|
+
|
|
8146
8157
|
async function specEnvLiveTake(dir, config, specArg, flags = {}) {
|
|
8147
8158
|
const spec = resolveSpecWithWorktree(dir, config, specArg)
|
|
8148
8159
|
|
|
@@ -8230,7 +8241,7 @@ async function specEnvLiveTake(dir, config, specArg, flags = {}) {
|
|
|
8230
8241
|
// entitled to the same way out — so the refusal prints what it would have
|
|
8231
8242
|
// offered rather than making a harness the only route to it.
|
|
8232
8243
|
process.stdout.write(
|
|
8233
|
-
|
|
8244
|
+
notLive(spec.folder, `blocked — ${plan.reason}.`) +
|
|
8234
8245
|
(plan.offer ? ` ${plan.offer.label}: ${plan.offer.command}\n` : ''),
|
|
8235
8246
|
)
|
|
8236
8247
|
return
|
|
@@ -8247,17 +8258,20 @@ async function specEnvLiveTake(dir, config, specArg, flags = {}) {
|
|
|
8247
8258
|
const started = runGit(spec.worktreePath, ['rebase', '--show-current-patch']).ok
|
|
8248
8259
|
if (started) runGit(spec.worktreePath, ['rebase', '--abort'])
|
|
8249
8260
|
process.stdout.write(
|
|
8250
|
-
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8261
|
+
notLive(
|
|
8262
|
+
spec.folder,
|
|
8263
|
+
started
|
|
8264
|
+
? `rebase of ${spec.branch} onto ${onto} hit conflicts — ` +
|
|
8265
|
+
`resolve them in ${spec.worktreePath}, then retry.`
|
|
8266
|
+
: `rebase of ${spec.branch} onto ${onto} could not start — ` +
|
|
8267
|
+
`git said:\n ${reb.err.split('\n').join('\n ')}`,
|
|
8268
|
+
),
|
|
8255
8269
|
)
|
|
8256
8270
|
return
|
|
8257
8271
|
}
|
|
8258
8272
|
const det = runGit(spec.worktreePath, ['switch', '--detach'])
|
|
8259
8273
|
if (!det.ok) {
|
|
8260
|
-
process.stdout.write(
|
|
8274
|
+
process.stdout.write(notLive(spec.folder, `could not detach the worktree — ${det.err}`))
|
|
8261
8275
|
return
|
|
8262
8276
|
}
|
|
8263
8277
|
const co = runGit(dir, ['checkout', spec.branch])
|
|
@@ -8265,8 +8279,7 @@ async function specEnvLiveTake(dir, config, specArg, flags = {}) {
|
|
|
8265
8279
|
// Roll the detach back so the worktree keeps its branch.
|
|
8266
8280
|
runGit(spec.worktreePath, ['switch', spec.branch])
|
|
8267
8281
|
process.stdout.write(
|
|
8268
|
-
|
|
8269
|
-
`checkout — ${co.err}\n`,
|
|
8282
|
+
notLive(spec.folder, `could not check out ${spec.branch} in the primary checkout — ${co.err}`),
|
|
8270
8283
|
)
|
|
8271
8284
|
return
|
|
8272
8285
|
}
|
package/src/env/review.js
CHANGED
|
@@ -984,7 +984,10 @@ const COMMITTING = ['commit', 'commit-continue', 'commit-start', 'commit-land',
|
|
|
984
984
|
// at all, because the run committed that phase and carried on. `final` is the
|
|
985
985
|
// page an autonomous run ends on under `pause`: `complete`, `push`, `pr`, plus
|
|
986
986
|
// `changes` and `discuss`.
|
|
987
|
-
|
|
987
|
+
// `manual` is a phase stopped at its manual steps: its code half is green and
|
|
988
|
+
// must be committed before `/spec-live` will take it, and what follows is a
|
|
989
|
+
// person's testing, not a build — so `Commit`, never `Commit & Continue`.
|
|
990
|
+
const BUTTON_SETS = ['committing', 'midrun', 'authoring', 'refresh', 'nospec', 'fix', 'manual', 'snapshot', 'final']
|
|
988
991
|
const DEFAULT_BUTTON_SET = 'committing'
|
|
989
992
|
|
|
990
993
|
/**
|
package/src/env/serve.js
CHANGED
|
@@ -531,7 +531,9 @@ function receivePass(dir, config, spec, blob) {
|
|
|
531
531
|
*/
|
|
532
532
|
// `final` too: the run's last render declared it, and a served re-render
|
|
533
533
|
// must keep offering the ending rather than fall back to `Commit`.
|
|
534
|
-
|
|
534
|
+
// `manual` narrows the same way `fix` does: a served re-render of a phase
|
|
535
|
+
// stopped at its manual steps must not hand back `Commit & Continue`.
|
|
536
|
+
const NARROWING_SETS = ['midrun', 'refresh', 'fix', 'manual', 'final']
|
|
535
537
|
|
|
536
538
|
function buttonsForView(viewKind, spec, recorded) {
|
|
537
539
|
if (NARROWING_SETS.includes(recorded)) return recorded
|
package/src/provider.js
CHANGED
|
@@ -90,6 +90,67 @@ function registerConfiguredProvider({ cwd, envConfig, idea, resolve = resolvePac
|
|
|
90
90
|
return { provider: p.name, registered: 'config' }
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
// The configured provider's own bin, installed beside the base or in the
|
|
94
|
+
// project, or null when it is not installed. `candidates` narrows where to
|
|
95
|
+
// look: an install takes only the published superset, since the workspace
|
|
96
|
+
// source package's assets are uncomposed and its bin refuses to install them.
|
|
97
|
+
function providerBin(p, dir, resolve, candidates = p.candidates) {
|
|
98
|
+
const bin = join('bin', `skitterspec-${p.name}.js`)
|
|
99
|
+
for (const [pkg] of candidates) {
|
|
100
|
+
const root = resolve(pkg, [__dirname, dir])
|
|
101
|
+
if (root && existsSync(join(root, bin))) return join(root, bin)
|
|
102
|
+
}
|
|
103
|
+
return null
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Run `init`, `update`, `enable` or `uninstall` for a project with a provider
|
|
108
|
+
* configured through that provider's own bin. The install set is a
|
|
109
|
+
* distribution's own `assets/`, and the base's lacks the provider's skills,
|
|
110
|
+
* seams and docs — so the base installing it would prune and rewrite them
|
|
111
|
+
* (bug-base-update-clobbers-provider). `update --all` is not forwarded: it
|
|
112
|
+
* runs each project's own distribution itself.
|
|
113
|
+
*
|
|
114
|
+
* `target` is the folder the verb acts on (`--dir`, else its positional,
|
|
115
|
+
* else cwd). Returns the exit status, or `null` when the base installs as it
|
|
116
|
+
* always has: another verb, or no provider configured.
|
|
117
|
+
*
|
|
118
|
+
* WHAT WOULD FOOL THIS: a provider installed where Node's resolution cannot
|
|
119
|
+
* see it from the base or the project reads as not installed — and the verb is
|
|
120
|
+
* refused, naming the package, rather than falling back to the base set. Two
|
|
121
|
+
* provider configs is a project this cannot read, refused the same way.
|
|
122
|
+
*/
|
|
123
|
+
const INSTALL_VERBS = ['init', 'update', 'enable', 'uninstall']
|
|
124
|
+
|
|
125
|
+
function forwardInstallCommand({ cwd, argv, target = cwd, resolve = resolvePackage, warn = () => {}, spawn = spawnSync }) {
|
|
126
|
+
const [cmd, ...rest] = argv
|
|
127
|
+
if (!INSTALL_VERBS.includes(cmd)) return null
|
|
128
|
+
if (cmd === 'update' && rest.includes('--all')) return null
|
|
129
|
+
if (rest.includes('--help') || rest.includes('-h')) return null
|
|
130
|
+
const dir = projectDir(target)
|
|
131
|
+
if (!dir) return null
|
|
132
|
+
const configured = PROVIDERS.filter((p) => existsSync(join(dir, p.configFile)))
|
|
133
|
+
if (configured.length === 0) return null
|
|
134
|
+
if (configured.length > 1) {
|
|
135
|
+
warn(
|
|
136
|
+
`skitterspec: more than one ticketing provider is configured here (${configured.map((p) => p.configFile).join(', ')}) — ` +
|
|
137
|
+
`${cmd} refused: keep one, then run it again`,
|
|
138
|
+
)
|
|
139
|
+
return 1
|
|
140
|
+
}
|
|
141
|
+
const p = configured[0]
|
|
142
|
+
const bin = providerBin(p, dir, resolve, p.candidates.slice(0, 1))
|
|
143
|
+
if (bin) {
|
|
144
|
+
const r = spawn(process.execPath, [bin, ...argv], { cwd, stdio: 'inherit' })
|
|
145
|
+
return r.status ?? 1
|
|
146
|
+
}
|
|
147
|
+
warn(
|
|
148
|
+
`skitterspec: ${cmd} refused — ${p.configFile} is here but @skitterbyte/skitterspec-${p.name} is not installed beside this one, ` +
|
|
149
|
+
`and the base set would overwrite its skills. Install it alongside @skitterbyte/skitterspec, at the latest of each.`,
|
|
150
|
+
)
|
|
151
|
+
return 1
|
|
152
|
+
}
|
|
153
|
+
|
|
93
154
|
/**
|
|
94
155
|
* Run a verb the base does not ship (`commands`, e.g. `spec-sync`) on the
|
|
95
156
|
* provider configured in the project at or above `cwd`, through that
|
|
@@ -119,13 +180,10 @@ function forwardProviderCommand({
|
|
|
119
180
|
const configured = PROVIDERS.filter((p) => existsSync(join(dir, p.configFile)))
|
|
120
181
|
if (configured.length !== 1) return null
|
|
121
182
|
const p = configured[0]
|
|
122
|
-
const bin =
|
|
123
|
-
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
const r = spawn(process.execPath, [join(root, bin), ...argv], { cwd, stdio: 'inherit' })
|
|
127
|
-
return r.status ?? 1
|
|
128
|
-
}
|
|
183
|
+
const bin = providerBin(p, dir, resolve)
|
|
184
|
+
if (bin) {
|
|
185
|
+
const r = spawn(process.execPath, [bin, ...argv], { cwd, stdio: 'inherit' })
|
|
186
|
+
return r.status ?? 1
|
|
129
187
|
}
|
|
130
188
|
warn(
|
|
131
189
|
`skitterspec: ${cmd} needs @skitterbyte/skitterspec-${p.name} installed beside this one — ` +
|
|
@@ -134,4 +192,4 @@ function forwardProviderCommand({
|
|
|
134
192
|
return 1
|
|
135
193
|
}
|
|
136
194
|
|
|
137
|
-
module.exports = { registerConfiguredProvider, forwardProviderCommand, PROVIDERS }
|
|
195
|
+
module.exports = { registerConfiguredProvider, forwardProviderCommand, forwardInstallCommand, INSTALL_VERBS, PROVIDERS }
|
package/src/updateall.js
CHANGED
|
@@ -62,16 +62,16 @@ function inPrimary(dir, git) {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
|
-
* The distribution that owns a project:
|
|
66
|
-
*
|
|
67
|
-
*
|
|
65
|
+
* The distribution that owns a project: the one provider whose config is in
|
|
66
|
+
* `specs/.core/`, else what its manifest recorded, else the base. The config
|
|
67
|
+
* wins because a bare base `update` used to rewrite the manifest's field to
|
|
68
|
+
* the base (bug-base-update-clobbers-provider), so the field alone can name
|
|
69
|
+
* the wrong set; two configs is unreadable, and the manifest decides.
|
|
68
70
|
*/
|
|
69
71
|
function distributionOf(dir, manifest, exists) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
return BASE
|
|
72
|
+
const configured = PROVIDERS.filter((p) => exists(path.join(dir, 'specs', '.core', `${p}.config.json`)))
|
|
73
|
+
if (configured.length === 1) return `${BASE}-${configured[0]}`
|
|
74
|
+
return manifest.distribution || BASE
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
const binOf = (pkg) => pkg.replace(/^@skitterbyte\//, '')
|