@skitterbyte/skitterspec 23.1.0 → 23.1.2
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 +37 -0
- package/assets/core/env.config.md +5 -2
- package/assets/hooks/main-guard.cjs +1 -1
- package/assets/hooks/review-gate.cjs +1 -1
- package/package.json +1 -1
- package/src/cli.js +10 -4
- package/src/env/hotfix.js +29 -3
- package/src/env/proxy.js +33 -0
- package/src/init.js +3 -3
package/MIGRATION.md
CHANGED
|
@@ -100,6 +100,43 @@ Nothing in `env.config.json` changes.
|
|
|
100
100
|
**If you added a secrets-hook exception for the printed seed commands**, you
|
|
101
101
|
can remove it now. Nothing shipped prints them any more.
|
|
102
102
|
|
|
103
|
+
## `@skitterbyte/skitterspec-azure-boards` v0 → v1 (first release)
|
|
104
|
+
|
|
105
|
+
Nothing to migrate: this is the distribution's first release. It is a superset
|
|
106
|
+
of `@skitterbyte/skitterspec` — install exactly one of the base or one
|
|
107
|
+
superset. Coming from the base, run `npx @skitterbyte/skitterspec-azure-boards
|
|
108
|
+
update` and run `/spec-azure-setup`
|
|
109
|
+
(or `skitterspec-azure-boards spec-sync init-config --org-url … --project …`).
|
|
110
|
+
|
|
111
|
+
**Coming from `@skitterbyte/skitterspec-linear` or `-jira`** — a repo moving
|
|
112
|
+
trackers: swap the distribution, configure Azure as above, set
|
|
113
|
+
`refs.foreignPatterns` to the old team key (e.g. `"ERQ-\\d+"`), then push each
|
|
114
|
+
backlog and in-progress spec (`/spec-push`, or `spec-sync apply --all
|
|
115
|
+
in-progress` and `--all backlog`) to link it to a new work item. Finished specs
|
|
116
|
+
keep their old stamps (`linear_identifier`, …) as history; nothing rewrites
|
|
117
|
+
them. Old `Refs: ERQ-12` trailers stay in the log, and `spec-sync released`
|
|
118
|
+
counts them as `historical` rather than as missing a ref. New commits carry
|
|
119
|
+
`Refs: AB#n`. Delete the old `linear.config.json` / `jira.config.json` once the
|
|
120
|
+
open specs are linked.
|
|
121
|
+
|
|
122
|
+
## `@skitterbyte/skitterspec-github` v0 → v1 (first release)
|
|
123
|
+
|
|
124
|
+
Nothing to migrate: this is the distribution's first release. It is a superset
|
|
125
|
+
of `@skitterbyte/skitterspec` — install exactly one of the base or one
|
|
126
|
+
superset. Coming from the base, run `npx @skitterbyte/skitterspec-github
|
|
127
|
+
update`, make a Projects v2 board for the repo, and run `/spec-github-setup`
|
|
128
|
+
(or `skitterspec-github spec-sync init-config --owner … --repo … --project N`).
|
|
129
|
+
|
|
130
|
+
**Coming from `@skitterbyte/skitterspec-linear` or `-jira`** — a repo moving
|
|
131
|
+
trackers: swap the distribution, configure GitHub as above, then push each
|
|
132
|
+
backlog and in-progress spec (`/spec-push`, or `spec-sync apply --all
|
|
133
|
+
in-progress` and `--all backlog`) to link it to a new issue. Finished specs keep
|
|
134
|
+
their old stamps (`linear_identifier`, …) as history; nothing rewrites them.
|
|
135
|
+
Old `Refs: SKS-12` trailers stay in the log, and `spec-sync released` counts
|
|
136
|
+
them as `historical` rather than as missing a ref. New commits carry
|
|
137
|
+
`Refs: #N`. Delete the old `linear.config.json` / `jira.config.json` once the
|
|
138
|
+
open specs are linked.
|
|
139
|
+
|
|
103
140
|
## `@skitterbyte/skitterspec-jira` v0 → v1 (first release)
|
|
104
141
|
|
|
105
142
|
Nothing to migrate: this is the distribution's first release. It is a superset
|
|
@@ -283,8 +283,11 @@ through to a documented conservative default; see the field notes below.
|
|
|
283
283
|
// one. Empty (the default) = the built-in tagger.
|
|
284
284
|
//
|
|
285
285
|
// `bump` is the built-in tagger's strategy: "patch" (v33.16.4 -> v33.16.5) or
|
|
286
|
-
// "hotfix-suffix" (v33.16.4 -> v33.16.4-hotfix.1, then -hotfix.2,
|
|
287
|
-
// that is already a hotfix tag continues its line
|
|
286
|
+
// "hotfix-suffix" (v33.16.4 -> v33.16.4-hotfix.1, then -hotfix.2, ...). Under
|
|
287
|
+
// either, a base that is already a hotfix tag continues its line
|
|
288
|
+
// (v36.2.3-hotfix.4 -> v36.2.3-hotfix.5), so "patch" never takes a number the
|
|
289
|
+
// mainline owns. When the patch tag already exists, the refusal names the
|
|
290
|
+
// free hotfix tag that "hotfix-suffix" would cut. Any other value is refused
|
|
288
291
|
// when `hotfix land` runs. Tags order X.Y.Z-rc.N < X.Y.Z < X.Y.Z-hotfix.N <
|
|
289
292
|
// X.Y.(Z+1), the same as skittership.
|
|
290
293
|
//
|
|
@@ -85,7 +85,7 @@ function findEngine(projectDir) {
|
|
|
85
85
|
if (process.env.SKITTERSPEC_BIN) return process.env.SKITTERSPEC_BIN
|
|
86
86
|
let at = projectDir
|
|
87
87
|
for (let i = 0; i < 6 && at; i++) {
|
|
88
|
-
for (const name of ['skitterspec', 'skitterspec-linear', 'skitterspec-jira']) {
|
|
88
|
+
for (const name of ['skitterspec', 'skitterspec-linear', 'skitterspec-jira', 'skitterspec-github', 'skitterspec-azure-boards']) {
|
|
89
89
|
const candidate = path.join(at, 'node_modules', '.bin', name)
|
|
90
90
|
if (fs.existsSync(candidate)) return candidate
|
|
91
91
|
}
|
|
@@ -82,7 +82,7 @@ function findEngine(projectDir) {
|
|
|
82
82
|
if (process.env.SKITTERSPEC_BIN) return process.env.SKITTERSPEC_BIN
|
|
83
83
|
let at = projectDir
|
|
84
84
|
for (let i = 0; i < 6 && at; i++) {
|
|
85
|
-
for (const name of ['skitterspec', 'skitterspec-linear', 'skitterspec-jira']) {
|
|
85
|
+
for (const name of ['skitterspec', 'skitterspec-linear', 'skitterspec-jira', 'skitterspec-github', 'skitterspec-azure-boards']) {
|
|
86
86
|
const candidate = path.join(at, 'node_modules', '.bin', name)
|
|
87
87
|
if (fs.existsSync(candidate)) return candidate
|
|
88
88
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skitterbyte/skitterspec",
|
|
3
|
-
"version": "23.1.
|
|
3
|
+
"version": "23.1.2",
|
|
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
|
@@ -165,7 +165,13 @@ const { planHotfixLand, planHotfixFinish } = require('./env/hotfix.js')
|
|
|
165
165
|
const { runHotfixLand, describeStep: describeHotfixStep } = require('./env/hotfixland.js')
|
|
166
166
|
const { planDev } = require('./env/dev.js')
|
|
167
167
|
const { startProcess, stopProcess, waitHealthy, readPid, isAlive } = require('./env/supervise.js')
|
|
168
|
-
const {
|
|
168
|
+
const {
|
|
169
|
+
renderRoutes,
|
|
170
|
+
portsHeld,
|
|
171
|
+
portsAnswering,
|
|
172
|
+
portsInUseOn,
|
|
173
|
+
waitListening,
|
|
174
|
+
} = require('./env/proxy.js')
|
|
169
175
|
const {
|
|
170
176
|
mintToken,
|
|
171
177
|
servableSpecs,
|
|
@@ -185,7 +191,7 @@ const pkg = require('../package.json')
|
|
|
185
191
|
// supersets the hand-off names both where both ship the command, and the one
|
|
186
192
|
// that does where only one does.
|
|
187
193
|
const PROVIDER_COMMANDS = {
|
|
188
|
-
'spec-sync': '@skitterbyte/skitterspec-linear or @skitterbyte/skitterspec-
|
|
194
|
+
'spec-sync': '@skitterbyte/skitterspec-linear, @skitterbyte/skitterspec-jira, @skitterbyte/skitterspec-github or @skitterbyte/skitterspec-azure-boards',
|
|
189
195
|
'spec-sanitise': '@skitterbyte/skitterspec-linear',
|
|
190
196
|
}
|
|
191
197
|
|
|
@@ -4988,7 +4994,7 @@ async function specEnvConnect(dir, config, specArg) {
|
|
|
4988
4994
|
// Stop any proxy we already run (a previous connect), freeing the canonical
|
|
4989
4995
|
// ports, then refuse if the primary checkout still holds one of them.
|
|
4990
4996
|
await stopProcess(proxyProc, { rootDir: dir })
|
|
4991
|
-
const busy = await
|
|
4997
|
+
const busy = await portsHeld(routes.map((r) => r.frontPort), config.proxy.host)
|
|
4992
4998
|
if (busy.length) {
|
|
4993
4999
|
process.stdout.write(
|
|
4994
5000
|
`spec-connect: canonical port(s) ${busy.join(', ')} are in use (your main dev server?).\n` +
|
|
@@ -5199,7 +5205,7 @@ async function specEnvLiveTake(dir, config, specArg, flags = {}) {
|
|
|
5199
5205
|
const canonicalPorts = config.dev.map((d) => d.frontPort).filter((p) => typeof p === 'number')
|
|
5200
5206
|
let serverUp = null
|
|
5201
5207
|
if (canonicalPorts.length) {
|
|
5202
|
-
const up = await
|
|
5208
|
+
const up = await portsAnswering(canonicalPorts, config.proxy.host)
|
|
5203
5209
|
serverUp = up.length === canonicalPorts.length
|
|
5204
5210
|
}
|
|
5205
5211
|
|
package/src/env/hotfix.js
CHANGED
|
@@ -114,12 +114,38 @@ const BUMPS = ['patch', 'hotfix-suffix']
|
|
|
114
114
|
// The tag `hotfix.bump` asks for. An unknown strategy throws rather than
|
|
115
115
|
// falling back to `patch`: a typo there would otherwise cut the wrong release
|
|
116
116
|
// line and say nothing.
|
|
117
|
+
//
|
|
118
|
+
// Under `patch`, a base that is ITSELF a `-hotfix.N` tag continues that line.
|
|
119
|
+
// Bumping its patch takes X.Y.(Z+1), a number the mainline owns: refused when
|
|
120
|
+
// the mainline already cut it, and minted silently when it had not. Only a
|
|
121
|
+
// parsed hotfix suffix routes here; an rc or any other suffix keeps the patch
|
|
122
|
+
// bump, so a base we cannot read as a hotfix line is never treated as one.
|
|
117
123
|
function nextTag(baseTag, existingTags, bump = 'patch') {
|
|
118
|
-
if (bump === 'patch')
|
|
124
|
+
if (bump === 'patch') {
|
|
125
|
+
const base = parseTag(baseTag)
|
|
126
|
+
if (base && base.hotfix !== null) return nextHotfixTag(baseTag, existingTags)
|
|
127
|
+
return bumpPatch(baseTag)
|
|
128
|
+
}
|
|
119
129
|
if (bump === 'hotfix-suffix') return nextHotfixTag(baseTag, existingTags)
|
|
120
130
|
throw new Error(`unknown hotfix.bump "${bump}" — use one of: ${BUMPS.join(', ')}`)
|
|
121
131
|
}
|
|
122
132
|
|
|
133
|
+
// What a collision refusal offers: the free tag on the same base's hotfix
|
|
134
|
+
// line, which is never taken by a mainline release. Never a deletion and never
|
|
135
|
+
// another base — the first destroys a released tag, the second forks from a
|
|
136
|
+
// version prod is not running. Empty where the suffix line cannot be derived
|
|
137
|
+
// (an rc base) or is already the strategy, so the refusal just names the tag.
|
|
138
|
+
function freeTagHint(baseTag, existingTags, bump) {
|
|
139
|
+
if (bump !== 'patch') return ''
|
|
140
|
+
let free
|
|
141
|
+
try {
|
|
142
|
+
free = nextHotfixTag(baseTag, existingTags)
|
|
143
|
+
} catch {
|
|
144
|
+
return ''
|
|
145
|
+
}
|
|
146
|
+
return ` — set hotfix.bump "hotfix-suffix" in env.config.json to cut ${free} instead`
|
|
147
|
+
}
|
|
148
|
+
|
|
123
149
|
// A filesystem/branch-safe slug derived from a tag (`v30.2.1` → `v30-2-1`).
|
|
124
150
|
function tagSlug(tag) {
|
|
125
151
|
return String(tag)
|
|
@@ -206,7 +232,7 @@ function planHotfixLand(spec, config, ctx) {
|
|
|
206
232
|
} else {
|
|
207
233
|
prodTag = nextTag(baseRef, c.existingTags, bump)
|
|
208
234
|
if (taken.has(prodTag)) {
|
|
209
|
-
return block(`tag ${prodTag} already exists
|
|
235
|
+
return block(`tag ${prodTag} already exists${freeTagHint(baseRef, c.existingTags, bump)}`)
|
|
210
236
|
}
|
|
211
237
|
taken.add(prodTag)
|
|
212
238
|
commands.push(`git -C ${spec.worktreePath} tag ${prodTag}`)
|
|
@@ -248,7 +274,7 @@ function planHotfixLand(spec, config, ctx) {
|
|
|
248
274
|
// hotfix numbers rather than colliding on the same one.
|
|
249
275
|
const tag = nextTag(t, [...taken], bump)
|
|
250
276
|
if (taken.has(tag)) {
|
|
251
|
-
return block(`tag ${tag} (for target ${t}) already exists
|
|
277
|
+
return block(`tag ${tag} (for target ${t}) already exists${freeTagHint(t, [...taken], bump)}`)
|
|
252
278
|
}
|
|
253
279
|
taken.add(tag)
|
|
254
280
|
const slug = `${spec.slug}-onto-${tagSlug(t)}`
|
package/src/env/proxy.js
CHANGED
|
@@ -167,12 +167,45 @@ async function portsInUseOn(port, hosts, probe = portsInUse) {
|
|
|
167
167
|
return [...new Set(busy)]
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
+
/**
|
|
171
|
+
* Which of `ports` accept a connection on `host` — "is a dev server running?".
|
|
172
|
+
*
|
|
173
|
+
* CONNECTS, never binds. A bind probe on 127.0.0.1 SUCCEEDS on macOS beside a
|
|
174
|
+
* server listening on every address (Vite `host: true`, Fastify `0.0.0.0`),
|
|
175
|
+
* because BSD lets the two coexist, so it read a running phone-on-wifi dev
|
|
176
|
+
* server as absent. Linux refuses the second bind, which is why CI never saw
|
|
177
|
+
* it. A server that answers is running on any OS. What could still fool it: a
|
|
178
|
+
* server bound only to a non-loopback address, which `host` does not reach.
|
|
179
|
+
*/
|
|
180
|
+
async function portsAnswering(ports, host = '127.0.0.1') {
|
|
181
|
+
const results = await Promise.all(ports.map((p) => checkListening(p, host)))
|
|
182
|
+
return ports.filter((_, i) => results[i])
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Which of `ports` are taken for a new listener on `host` — "may the proxy
|
|
187
|
+
* have these?". Busy when the bind fails OR something already answers.
|
|
188
|
+
*
|
|
189
|
+
* The bind alone is not enough on macOS: beside a wildcard listener it
|
|
190
|
+
* succeeds, and the proxy would then own `localhost` while LAN clients still
|
|
191
|
+
* reach the old server — two apps behind one port number. The connect catches
|
|
192
|
+
* that. SEQUENTIAL, bind first: the bind probe's own listener is closed before
|
|
193
|
+
* the connect runs, so the connect can never find the probe itself.
|
|
194
|
+
*/
|
|
195
|
+
async function portsHeld(ports, host = '127.0.0.1') {
|
|
196
|
+
const bound = await portsInUse(ports, host)
|
|
197
|
+
const answering = await portsAnswering(ports, host)
|
|
198
|
+
return ports.filter((p) => bound.includes(p) || answering.includes(p))
|
|
199
|
+
}
|
|
200
|
+
|
|
170
201
|
module.exports = {
|
|
171
202
|
renderRoutes,
|
|
172
203
|
createRouteServer,
|
|
173
204
|
startProxy,
|
|
174
205
|
portsInUse,
|
|
175
206
|
portsInUseOn,
|
|
207
|
+
portsAnswering,
|
|
208
|
+
portsHeld,
|
|
176
209
|
waitListening,
|
|
177
210
|
}
|
|
178
211
|
|
package/src/init.js
CHANGED
|
@@ -125,7 +125,7 @@ function detectPackageManager(dir) {
|
|
|
125
125
|
|
|
126
126
|
// The bin names a distribution may expose. A provider superset ships its own
|
|
127
127
|
// name alongside `skitterspec`, and either proves the engine is reachable.
|
|
128
|
-
const ENGINE_BINS = ['skitterspec', 'skitterspec-linear', 'skitterspec-jira']
|
|
128
|
+
const ENGINE_BINS = ['skitterspec', 'skitterspec-linear', 'skitterspec-jira', 'skitterspec-github', 'skitterspec-azure-boards']
|
|
129
129
|
|
|
130
130
|
function binNames() {
|
|
131
131
|
return process.platform === 'win32'
|
|
@@ -914,8 +914,8 @@ function resync(dir, { force = false, claudeMd = true, diff = false } = {}) {
|
|
|
914
914
|
// never delete spec content or active config (defense-in-depth — the manifest
|
|
915
915
|
// never lists these, but a tampered/foreign entry must still be refused).
|
|
916
916
|
const PROTECTED_SPEC_BUCKETS = ['backlog', 'in-progress', 'complete', 'cancelled']
|
|
917
|
-
const PROTECTED_CONFIG = ['env.config.json', 'linear.config.json', 'jira.config.json']
|
|
918
|
-
const PROTECTED_DIRS = ['linear-base', 'linear-backups', 'jira-base', 'jira-backups']
|
|
917
|
+
const PROTECTED_CONFIG = ['env.config.json', 'linear.config.json', 'jira.config.json', 'github.config.json', 'azure-boards.config.json']
|
|
918
|
+
const PROTECTED_DIRS = ['linear-base', 'linear-backups', 'jira-base', 'jira-backups', 'github-base', 'github-backups', 'azure-base', 'azure-backups']
|
|
919
919
|
|
|
920
920
|
function assertSafeToDelete(relPath, managedSet) {
|
|
921
921
|
const norm = relPath.split(path.sep).join('/')
|