@skitterbyte/skitterspec 23.1.1 → 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/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/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
|
|
@@ -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/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('/')
|