@skitterbyte/skitterspec-github 2.3.0 → 2.4.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/assets/claude-md-section.md +20 -1
- package/assets/core/env.config.json.example +1 -0
- package/assets/core/env.config.md +90 -6
- package/assets/core/github.config.json.example +2 -1
- package/assets/core/github.config.md +5 -1
- package/assets/hooks/main-guard.cjs +18 -2
- package/assets/hooks/review-gate.cjs +19 -2
- package/assets/rules/commit-trailers.md +24 -1
- package/assets/rules/spec-planning.md +81 -18
- package/assets/rules/spec-reports.md +1 -1
- package/assets/skills/spec/SKILL.md +55 -2
- package/assets/skills/spec-bug/SKILL.md +36 -3
- package/assets/skills/spec-cancel/SKILL.md +37 -0
- package/assets/skills/spec-claim/SKILL.md +41 -2
- package/assets/skills/spec-complete/SKILL.md +115 -0
- package/assets/skills/spec-github-setup/SKILL.md +31 -4
- package/assets/skills/spec-hotfix/SKILL.md +51 -4
- package/assets/skills/spec-incident/SKILL.md +22 -0
- package/assets/skills/spec-next/SKILL.md +12 -5
- package/assets/skills/spec-push/SKILL.md +22 -0
- package/assets/skills/spec-review/SKILL.md +34 -0
- package/assets/skills/spec-start/SKILL.md +50 -3
- package/assets/skills/spec-status/SKILL.md +18 -3
- package/assets/skills/spec-sync/SKILL.md +1 -0
- package/assets/skills/spec-to-main/SKILL.md +47 -1
- package/package.json +1 -1
- package/src/cli.js +1091 -39
- package/src/env/base.js +104 -0
- package/src/env/config.js +75 -3
- package/src/env/disposition.js +62 -0
- package/src/env/handoff.js +80 -0
- package/src/env/host.js +262 -0
- package/src/env/hotfix.js +225 -0
- package/src/env/hotfixland.js +103 -9
- package/src/env/inflight.js +95 -0
- package/src/env/integrate.js +130 -4
- package/src/env/mainguard.js +6 -0
- package/src/env/phases.js +28 -0
- package/src/env/provision.js +18 -6
- package/src/env/resolve.js +108 -9
- package/src/env/serve.js +6 -1
- package/src/env/specstate.js +101 -0
- package/src/env/teardown.js +42 -0
- package/src/vendor/github/api.js +33 -2
- package/src/vendor/github/cli-sync.js +62 -3
- package/src/vendor/github/config.js +19 -5
- package/src/vendor/provider-kit/index.js +4 -0
- package/src/vendor/provider-kit/src/apply.js +49 -4
- package/src/vendor/provider-kit/src/assignment.js +78 -1
- package/src/vendor/provider-kit/src/config.js +34 -1
- package/src/vendor/provider-kit/src/list-rows.js +35 -11
- package/src/vendor/provider-kit/src/released.js +14 -1
- package/src/vendor/provider-kit/src/specs.js +4 -2
- package/src/vendor/provider-kit/src/splice.js +64 -0
- package/src/vendor/provider-kit/src/status.js +137 -0
- package/src/vendor/sync-core/index.js +14 -1
- package/src/vendor/sync-core/src/compare.js +17 -5
- package/src/vendor/sync-core/src/normalize.js +50 -7
- package/src/vendor/sync-core/src/push.js +26 -2
- package/src/vendor/sync-core/src/summary.js +257 -0
|
@@ -294,6 +294,28 @@ split it into phase files (`01-<slug>.md`, `02-…`) with a phase index in
|
|
|
294
294
|
`00-overview.md`, exactly like a feature spec. It starts in `in-progress`
|
|
295
295
|
because work is already underway. Keep it lean:
|
|
296
296
|
|
|
297
|
+
**Who owns this spec's status.** Only when `specs/.core/github.config.json` exists.
|
|
298
|
+
Run `skitterspec spec-sync ownership --json` once and read both values:
|
|
299
|
+
|
|
300
|
+
- **`workflowState: "pull"`** — GitHub is the record of this spec's status, so
|
|
301
|
+
this skill **writes no `> **Status:**` header and appends no State log row**,
|
|
302
|
+
wherever its steps below say to. A spec this skill creates gets neither: its
|
|
303
|
+
header carries `> **Tracker:** <issue url>` instead, filled in once linking
|
|
304
|
+
has stamped the url, and its body has no `## State log` section. Readiness is
|
|
305
|
+
the spec's own content — a `Draft` is a spec whose **Open questions** is not
|
|
306
|
+
empty — so nothing is lost with the header.
|
|
307
|
+
- **`assignee: "pull"`** — GitHub holds who is building it, so this skill
|
|
308
|
+
**writes no `> **Developer:**` line** either.
|
|
309
|
+
- **Anything else** — `push`, `none`, sync reported off, or the command failing
|
|
310
|
+
— is cannot-tell, and the steps below run exactly as written.
|
|
311
|
+
|
|
312
|
+
What `pull` leaves alone: the folder move (a bucket records what the repo did to
|
|
313
|
+
the code, not a planning status), the phase files and index, and the Changelog.
|
|
314
|
+
A reason a `Status:` header would have carried — a cancellation's, a knock-back
|
|
315
|
+
to Draft — goes in a dated Changelog line instead. A spec that already carries
|
|
316
|
+
any of these lines keeps them untouched: they are history, and nothing rewrites
|
|
317
|
+
them.
|
|
318
|
+
|
|
297
319
|
```markdown
|
|
298
320
|
# Bug: <short title>
|
|
299
321
|
|
|
@@ -372,7 +394,9 @@ If it's absent, skip this entirely — the spec stays local-only and the skill
|
|
|
372
394
|
behaves exactly as above. When present, link the spec you just wrote so status
|
|
373
395
|
and discussion live in GitHub while the repo stays the source of truth. A spec is
|
|
374
396
|
a GitHub **issue**; each phase is a **sub-issue**, carrying that phase's tasks in
|
|
375
|
-
its description as a read-only checklist.
|
|
397
|
+
its description as a read-only checklist. That is the `spec` description mode;
|
|
398
|
+
under `summary` (a new config's default) the issue and each sub-issue carry
|
|
399
|
+
a short block instead, and the phase's tasks stay in git.
|
|
376
400
|
|
|
377
401
|
**Linking is just the first push**, so it runs the same engine path `/spec-push`
|
|
378
402
|
does — you never create the issue by hand:
|
|
@@ -454,6 +478,12 @@ is a cosmetic gap that `/spec-claim` closes later.
|
|
|
454
478
|
skitterspec spec-sync assign <spec> --to <login> --name "<display name>"
|
|
455
479
|
```
|
|
456
480
|
|
|
481
|
+
**Where `spec-sync ownership` reports `assignee: pull`**, the issue is the
|
|
482
|
+
record and the spec file is not: add `--if-unassigned`. It writes GitHub
|
|
483
|
+
directly, claims the issue only when nobody holds it, and stamps nothing —
|
|
484
|
+
so step 4 has no header to leave alone, since under `pull` no `Developer:`
|
|
485
|
+
line was written.
|
|
486
|
+
|
|
457
487
|
4. **Leave `> **Developer:**` as `git config user.name`** — the step above this
|
|
458
488
|
seam already set it, and this seam must not overwrite it with the tracker's
|
|
459
489
|
display name.
|
|
@@ -475,12 +505,15 @@ is a cosmetic gap that `/spec-claim` closes later.
|
|
|
475
505
|
|
|
476
506
|
**Nothing is pushed here.** `assign` writes the repo only, and the refresh these
|
|
477
507
|
skills already run sends it. Assignment is an ordinary field of the projection,
|
|
478
|
-
not a side errand with its own network call.
|
|
508
|
+
not a side errand with its own network call. Under `pull` the
|
|
509
|
+
`assign` call is itself the write, so there is nothing for a push to carry.
|
|
479
510
|
|
|
480
511
|
**There is no unassign step anywhere.** The projection derives the assignee from
|
|
481
512
|
the spec's lifecycle bucket, so `/spec-complete` and `/spec-cancel` release the
|
|
482
513
|
issue through the push they already make. The stamp deliberately stays in the
|
|
483
|
-
file: who actioned the work outlives who is currently holding it.
|
|
514
|
+
file: who actioned the work outlives who is currently holding it. Under `pull`
|
|
515
|
+
the projection carries no assignee at all, so finishing a spec leaves it on
|
|
516
|
+
the issue: the board keeps who did the work.
|
|
484
517
|
|
|
485
518
|
GitHub has no project picker: a minted issue lands in the configured
|
|
486
519
|
`github.owner`/`github.repo`, on the one board `github.project` names — both
|
|
@@ -37,6 +37,28 @@ it verbatim/condensed for the header.
|
|
|
37
37
|
|
|
38
38
|
## 4. Stamp the spec
|
|
39
39
|
|
|
40
|
+
**Who owns this spec's status.** Only when `specs/.core/github.config.json` exists.
|
|
41
|
+
Run `skitterspec spec-sync ownership --json` once and read both values:
|
|
42
|
+
|
|
43
|
+
- **`workflowState: "pull"`** — GitHub is the record of this spec's status, so
|
|
44
|
+
this skill **writes no `> **Status:**` header and appends no State log row**,
|
|
45
|
+
wherever its steps below say to. A spec this skill creates gets neither: its
|
|
46
|
+
header carries `> **Tracker:** <issue url>` instead, filled in once linking
|
|
47
|
+
has stamped the url, and its body has no `## State log` section. Readiness is
|
|
48
|
+
the spec's own content — a `Draft` is a spec whose **Open questions** is not
|
|
49
|
+
empty — so nothing is lost with the header.
|
|
50
|
+
- **`assignee: "pull"`** — GitHub holds who is building it, so this skill
|
|
51
|
+
**writes no `> **Developer:**` line** either.
|
|
52
|
+
- **Anything else** — `push`, `none`, sync reported off, or the command failing
|
|
53
|
+
— is cannot-tell, and the steps below run exactly as written.
|
|
54
|
+
|
|
55
|
+
What `pull` leaves alone: the folder move (a bucket records what the repo did to
|
|
56
|
+
the code, not a planning status), the phase files and index, and the Changelog.
|
|
57
|
+
A reason a `Status:` header would have carried — a cancellation's, a knock-back
|
|
58
|
+
to Draft — goes in a dated Changelog line instead. A spec that already carries
|
|
59
|
+
any of these lines keeps them untouched: they are history, and nothing rewrites
|
|
60
|
+
them.
|
|
61
|
+
|
|
40
62
|
Update the **Status** header in the entry point so the reason is visible at the
|
|
41
63
|
top:
|
|
42
64
|
|
|
@@ -74,6 +96,10 @@ GitHub token is set (see `apply.transport` in `github.config.md`).
|
|
|
74
96
|
and **finish the operation anyway**. The spec is complete/cancelled/reviewed in
|
|
75
97
|
the repo regardless; the mirror is disposable and the next push repairs it.
|
|
76
98
|
Do not roll anything back, and do not stop to ask.
|
|
99
|
+
- **In `/spec-complete`'s PR mode this push belongs to run 2.** Run 1 readies
|
|
100
|
+
a PR, and a ready PR is not a merged one — so skip it on run 1, even where
|
|
101
|
+
the `branch` lane committed the move to ride the PR, and run it on run 2 once
|
|
102
|
+
the host has merged. The tracker's Done lands when the work does.
|
|
77
103
|
- **Say what happened** in the skill's report: mirror updated, skipped as
|
|
78
104
|
unlinked, or failed with the reason.
|
|
79
105
|
- **There is no unassign step, and that is not an omission.** Where the repo owns
|
|
@@ -82,6 +108,8 @@ GitHub token is set (see `apply.transport` in `github.config.md`).
|
|
|
82
108
|
releases the issue, and the push above carries it like any other field. The
|
|
83
109
|
`github_assignee_id` stamp and the `> **Developer:**` header both stay put:
|
|
84
110
|
they record who actioned the work, which outlives who is holding it.
|
|
111
|
+
Under `assignee: pull` the projection carries no assignee at all, so the
|
|
112
|
+
issue keeps it: the board records who did the work.
|
|
85
113
|
|
|
86
114
|
### Why it sits here
|
|
87
115
|
|
|
@@ -254,6 +282,15 @@ only ordering that survives.
|
|
|
254
282
|
copy of abandoned work. Seeing no such section here is the expected case, not
|
|
255
283
|
a fault — and if the user wants the remote branch gone anyway, that is their
|
|
256
284
|
call to make explicitly, not something to tidy away on their behalf.
|
|
285
|
+
|
|
286
|
+
**In PR mode the same confirm-first section may carry the PR abandon**
|
|
287
|
+
(`gh pr close` / `az repos pr update --status abandoned`): a cancelled spec
|
|
288
|
+
must not leave a live PR behind — it is noise with a merge button on it.
|
|
289
|
+
The teardown of an open-PR spec is refused unforced (the PR is named), so
|
|
290
|
+
this line appears on the forced run the refusal led to; ask before running
|
|
291
|
+
it like the delete above, and run the abandon **before** any remote branch
|
|
292
|
+
delete — closing the PR first is what stops the host complaining about a
|
|
293
|
+
deleted source branch.
|
|
257
294
|
4. `skitterspec spec-env prune` — reap orphaned test-DB volumes that belong to no
|
|
258
295
|
live spec (leftovers from declined/aborted teardowns or manual worktree
|
|
259
296
|
removal). Show the orphan list and, **only on the user's confirmation**, run
|
|
@@ -28,6 +28,27 @@ thing enforcing it for long enough that the engine's own success line —
|
|
|
28
28
|
`next: push it, so GitHub agrees` — was printed over a push that would drop the
|
|
29
29
|
field. Prose in one skill is not a guard; it is a guard's documentation.
|
|
30
30
|
|
|
31
|
+
## Under `pull`, the issue is the record
|
|
32
|
+
|
|
33
|
+
Ask once: `skitterspec spec-sync ownership --json`. Where `assignee` is
|
|
34
|
+
**`pull`**, GitHub owns who is building the spec, and the repo keeps no copy — so
|
|
35
|
+
the steps below change in four places, and only these:
|
|
36
|
+
|
|
37
|
+
- **`assign` writes GitHub directly and stamps nothing.** There is no repo record
|
|
38
|
+
to change and no push to follow: §4 does not run, because the `assign` call
|
|
39
|
+
*was* the write.
|
|
40
|
+
- **Take checks GitHub, not the file.** Run `assign <spec> --to <id> --if-unassigned`
|
|
41
|
+
first. If it reports the issue is already assigned to someone else, that is
|
|
42
|
+
step 2's colleague: name them, confirm, then run it again without the flag.
|
|
43
|
+
- **No `> **Developer:**` line is written**, by any mode. The tracker names the
|
|
44
|
+
person; a header would be the copy `pull` exists to remove.
|
|
45
|
+
- **§3 is skipped.** The issue's own history records the move, and a
|
|
46
|
+
Changelog line saying who holds it would be that copy again.
|
|
47
|
+
|
|
48
|
+
Everything else stands: the opt-in check, resolving a person through a search
|
|
49
|
+
before a hand-over, and the report. Under `push` (or with ownership unknown)
|
|
50
|
+
nothing in this section applies.
|
|
51
|
+
|
|
31
52
|
## 1. Identify the target spec
|
|
32
53
|
|
|
33
54
|
The argument, else the spec in flight for this session, else ask. Unlike
|
|
@@ -78,8 +99,26 @@ now".
|
|
|
78
99
|
stranger and nothing downstream would notice.
|
|
79
100
|
2. On several matches, show them and let the user pick. On none, say so and
|
|
80
101
|
stop — do not fall back to the raw argument as an id.
|
|
81
|
-
3.
|
|
82
|
-
|
|
102
|
+
3. **Make the work reachable before you hand it over.** Run
|
|
103
|
+
`skitterspec spec-env handoff <spec> --json`. A spec's branch lives in a
|
|
104
|
+
local worktree, so without this the issue would name a new owner for code
|
|
105
|
+
only you can see.
|
|
106
|
+
- **`blocked`** — relay the reason. Where it carries an `offer` (uncommitted
|
|
107
|
+
work: `/commit`), offer it once as `offered-unblocks.md` says, run it on a
|
|
108
|
+
yes, then run `handoff` again. With no offer, stop here: nothing is assigned.
|
|
109
|
+
- **`commands`** non-empty — the branch is not published at HEAD. Ask once,
|
|
110
|
+
naming the target: *"push `<branch>` to `<remote>` so <name> can pick it
|
|
111
|
+
up?"* Run it on a yes. On a no, stop: a hand-over the new owner cannot
|
|
112
|
+
reach is not a hand-over, so nothing is assigned.
|
|
113
|
+
- Then post the note it wrote onto the issue:
|
|
114
|
+
`skitterspec spec-sync comment <spec> --file <notePath>`. It names the
|
|
115
|
+
branch, the sha and the phases done, and a comment is the surface no later
|
|
116
|
+
push replaces. A failed post is said and does not stop the hand-over.
|
|
117
|
+
|
|
118
|
+
The new owner's `/spec-start <spec>` resumes from that branch rather than
|
|
119
|
+
forking a fresh one (`spec-env up` sees it on the remote).
|
|
120
|
+
4. Stamp it with the resolved id and display name.
|
|
121
|
+
5. Set `> **Developer:**` to that person's **GitHub display name**.
|
|
83
122
|
|
|
84
123
|
This is the **one** place the tracker's name reaches the header, and the
|
|
85
124
|
exception is the whole reason it exists: there is no `git config user.name`
|
|
@@ -102,6 +102,29 @@ feature was designed not to disturb.
|
|
|
102
102
|
|
|
103
103
|
- Tick all completed tasks in the phase files; flip every finished phase-file
|
|
104
104
|
heading **and** every row in the `00-overview.md` phase index to `✅`.
|
|
105
|
+
|
|
106
|
+
**Who owns this spec's status.** Only when `specs/.core/github.config.json` exists.
|
|
107
|
+
Run `skitterspec spec-sync ownership --json` once and read both values:
|
|
108
|
+
|
|
109
|
+
- **`workflowState: "pull"`** — GitHub is the record of this spec's status, so
|
|
110
|
+
this skill **writes no `> **Status:**` header and appends no State log row**,
|
|
111
|
+
wherever its steps below say to. A spec this skill creates gets neither: its
|
|
112
|
+
header carries `> **Tracker:** <issue url>` instead, filled in once linking
|
|
113
|
+
has stamped the url, and its body has no `## State log` section. Readiness is
|
|
114
|
+
the spec's own content — a `Draft` is a spec whose **Open questions** is not
|
|
115
|
+
empty — so nothing is lost with the header.
|
|
116
|
+
- **`assignee: "pull"`** — GitHub holds who is building it, so this skill
|
|
117
|
+
**writes no `> **Developer:**` line** either.
|
|
118
|
+
- **Anything else** — `push`, `none`, sync reported off, or the command failing
|
|
119
|
+
— is cannot-tell, and the steps below run exactly as written.
|
|
120
|
+
|
|
121
|
+
What `pull` leaves alone: the folder move (a bucket records what the repo did to
|
|
122
|
+
the code, not a planning status), the phase files and index, and the Changelog.
|
|
123
|
+
A reason a `Status:` header would have carried — a cancellation's, a knock-back
|
|
124
|
+
to Draft — goes in a dated Changelog line instead. A spec that already carries
|
|
125
|
+
any of these lines keeps them untouched: they are history, and nothing rewrites
|
|
126
|
+
them.
|
|
127
|
+
|
|
105
128
|
- Set the **Status** header in the entry point:
|
|
106
129
|
`> **Status:** Complete (<YYYY-MM-DD>)`.
|
|
107
130
|
- Append a **State log** row:
|
|
@@ -135,6 +158,10 @@ GitHub token is set (see `apply.transport` in `github.config.md`).
|
|
|
135
158
|
and **finish the operation anyway**. The spec is complete/cancelled/reviewed in
|
|
136
159
|
the repo regardless; the mirror is disposable and the next push repairs it.
|
|
137
160
|
Do not roll anything back, and do not stop to ask.
|
|
161
|
+
- **In `/spec-complete`'s PR mode this push belongs to run 2.** Run 1 readies
|
|
162
|
+
a PR, and a ready PR is not a merged one — so skip it on run 1, even where
|
|
163
|
+
the `branch` lane committed the move to ride the PR, and run it on run 2 once
|
|
164
|
+
the host has merged. The tracker's Done lands when the work does.
|
|
138
165
|
- **Say what happened** in the skill's report: mirror updated, skipped as
|
|
139
166
|
unlinked, or failed with the reason.
|
|
140
167
|
- **There is no unassign step, and that is not an omission.** Where the repo owns
|
|
@@ -143,6 +170,8 @@ GitHub token is set (see `apply.transport` in `github.config.md`).
|
|
|
143
170
|
releases the issue, and the push above carries it like any other field. The
|
|
144
171
|
`github_assignee_id` stamp and the `> **Developer:**` header both stay put:
|
|
145
172
|
they record who actioned the work, which outlives who is holding it.
|
|
173
|
+
Under `assignee: pull` the projection carries no assignee at all, so the
|
|
174
|
+
issue keeps it: the board records who did the work.
|
|
146
175
|
|
|
147
176
|
### Why it sits here
|
|
148
177
|
|
|
@@ -290,6 +319,27 @@ in that order, and stops at the first step that fails:
|
|
|
290
319
|
**Then stop: the worktree is kept** (step 7). The branch is what the next
|
|
291
320
|
`-hotfix.N` is cut from if this deploy fails, so it waits for the deploy.
|
|
292
321
|
|
|
322
|
+
**A branch-based hotfix** (`> **Base version:** <branch>@<sha>`, from
|
|
323
|
+
`hotfix.releaseBranch`) runs the same command and the same consent ask — the
|
|
324
|
+
engine picks the path from the header. What differs is what it does:
|
|
325
|
+
|
|
326
|
+
- it **rebases** onto `<remote>/<branch>` and **lands on the release branch** by
|
|
327
|
+
`land.strategy`: under `ff` the push of the hotfix onto that branch *is* the
|
|
328
|
+
land (so the consent ask names the release branch, not only a tag); under `pr`
|
|
329
|
+
it pushes the hotfix branch and opens a **ready** PR, then holds with
|
|
330
|
+
`the PR into <branch> is open` — re-run the same command once it merges;
|
|
331
|
+
- the **tag** is optional (`hotfix.tag`): cut and pushed after the land, or not
|
|
332
|
+
at all;
|
|
333
|
+
- the **carry** goes to the resolved base — the current rc under
|
|
334
|
+
`baseBranchPattern` — directly under `ff`, through a `carry/<slug>` branch and
|
|
335
|
+
its own ready PR under `pr`.
|
|
336
|
+
|
|
337
|
+
`Landed` then names the release branch, how it landed (fast-forward, or the PR
|
|
338
|
+
and whether it merged), the tag if one was cut, and the carry. A PR still
|
|
339
|
+
waiting on its merge is a `⚠️` — the land is not done until the host says so.
|
|
340
|
+
`spec-env hotfix finish` tears it down once both the land and the carry are
|
|
341
|
+
confirmed, naming every check that is not.
|
|
342
|
+
|
|
293
343
|
### 6-feature/bug. `Type: Feature` / `Type: Bug` — rebase + fast-forward
|
|
294
344
|
|
|
295
345
|
Land the finished branch on the base branch so the work reaches `main` (or your
|
|
@@ -325,6 +375,19 @@ is finished — e.g. to run a later phase in CI or a shared test env? Use
|
|
|
325
375
|
`git -C <worktree> rebase --abort`, relay the conflict, and **stop** — leave it
|
|
326
376
|
to the user; do not tear anything down.
|
|
327
377
|
On a **no-op** ("already landed"), just say so and continue.
|
|
378
|
+
|
|
379
|
+
**Under a rolling base** (`baseBranchPattern` in `env.config.json`) the plan
|
|
380
|
+
can carry two more things, and both are the engine's to say:
|
|
381
|
+
- a `git -C <mainRepoPath> switch <base>` (or `switch -c … --track`) **first**,
|
|
382
|
+
when the primary checkout still has an older release candidate out — run it
|
|
383
|
+
in order with the rest;
|
|
384
|
+
- a `retarget: forked from <old> · landing onto <new>` line, when the rc
|
|
385
|
+
rolled while this spec was in flight. It is the land working, not a fault:
|
|
386
|
+
relay it verbatim in the `Landed` row so the reader sees where the work went.
|
|
387
|
+
|
|
388
|
+
A refusal naming `no branch matches <pattern>` means no release candidate is
|
|
389
|
+
visible — usually not fetched. Relay it, stop with `⏸`, and name
|
|
390
|
+
`skitterspec spec-env base` (it fetches and lists) as the next step.
|
|
328
391
|
3. **Run the after-land commands.** Where the plan ends with a
|
|
329
392
|
`then, in the primary checkout (<path>), run:` section — the project's
|
|
330
393
|
`afterLand`, such as a data migration — run those commands in that
|
|
@@ -344,6 +407,58 @@ is finished — e.g. to run a later phase in CI or a shared test env? Use
|
|
|
344
407
|
5. **Report** the landing (base branch, fast-forward result). It **never pushes** —
|
|
345
408
|
mention the user can `git push` the base branch themselves.
|
|
346
409
|
|
|
410
|
+
### 6-pr. PR mode (`land.strategy: "pr"`) — dispose, push, ready; finish after the merge
|
|
411
|
+
|
|
412
|
+
Completion is **two runs** here, the `hotfix land`/`finish` shape: the merge is
|
|
413
|
+
the host's act and may be days away, so the run that readies the PR cannot also
|
|
414
|
+
finalise. Which run this is, the engine says: `spec-env integrate <name>`
|
|
415
|
+
printing a `(pr)` plan is run 1; printing
|
|
416
|
+
`already landed … — finish what the merge deferred` is run 2.
|
|
417
|
+
|
|
418
|
+
**Run 1 — the last control point.** Once the PR is ready, anyone can merge from
|
|
419
|
+
the host UI and the tracker's automations act — so everything that needs a
|
|
420
|
+
person happens before the ready, in this order:
|
|
421
|
+
|
|
422
|
+
1. **Disposition pass — mandatory, before anything is pushed.** Run
|
|
423
|
+
`skitterspec spec-env disposition <name> --json`. For every unticked task,
|
|
424
|
+
non-✅ phase and surfaced follow-up it lists, the user disposes it:
|
|
425
|
+
**tick** (it was done — tick it, naming the evidence) · **spin off** (a
|
|
426
|
+
follow-on ticket minted now, linked to this one — offer `/spec` or the
|
|
427
|
+
provider's mint) · **drop** (a dated Changelog line with the reason, the
|
|
428
|
+
`none: <reason>` grammar). Batch the asking; never decide for them, and
|
|
429
|
+
never auto-create. **Refuse to ready the PR while anything is undisposed**
|
|
430
|
+
— you asked the enumeration, so it cannot also be fine. `clean` proceeds
|
|
431
|
+
with nothing asked.
|
|
432
|
+
2. **Consent, naming the target.** Ask once, plainly:
|
|
433
|
+
*"push `<branch>` and open the PR into `<base>` on `<remote>`, ready for
|
|
434
|
+
merge?"* — the base branch is named so a spec that outlived a release roll
|
|
435
|
+
is caught by the person reading a stale rc name. On a no, stop with the
|
|
436
|
+
held commands relayed.
|
|
437
|
+
3. **Run the plan.** `skitterspec spec-env integrate <name> --push` and run
|
|
438
|
+
what it prints: fetch, rebase onto `<remote>/<base>`, the push, and the PR
|
|
439
|
+
create — or, where a draft already exists, the flip-to-ready. A rebase
|
|
440
|
+
conflict aborts and stops exactly as 6-feature/bug step 2.
|
|
441
|
+
4. **Defer the finalise.** §4's bucket move follows the spec documents'
|
|
442
|
+
`land.specDocs` lane: under `trunk` leave the spec in `specs/in-progress/`
|
|
443
|
+
— run 2 moves it on base after the merge; under `branch` commit the move on
|
|
444
|
+
the branch *before* step 3 so it rides the PR. Either way
|
|
445
|
+
**the tracker's Done waits for run 2**: a ready PR is not a merged one.
|
|
446
|
+
5. **Stop, keeping the worktree.** Report
|
|
447
|
+
`Landed: PR #N opened — finish after merge` (or `ready`), spec
|
|
448
|
+
`In Progress`, worktree standing. No afterLand runs — the plan deferred it
|
|
449
|
+
— and no teardown. The merge is what un-blocks run 2; nothing here waits on
|
|
450
|
+
it.
|
|
451
|
+
|
|
452
|
+
**Run 2 — after the host merges.** `integrate` recognises the landed branch
|
|
453
|
+
(ancestry or the host's answer) and prints the finish: catch local base up and
|
|
454
|
+
the deferred `afterLand` with the land's own range. Run those, then do what run
|
|
455
|
+
1 deferred — the §4 move (trunk lane) with its State log row and commit, the
|
|
456
|
+
§5 report — then **§7 teardown runs as normal**:
|
|
457
|
+
a host-merged branch counts as landed (squash and rebase
|
|
458
|
+
merges included), and a host that auto-deleted the branch makes the remote
|
|
459
|
+
delete an already-gone no-op, never a failure. Re-test on base before calling
|
|
460
|
+
it done, exactly as 6-feature/bug step 4.
|
|
461
|
+
|
|
347
462
|
## 7. Tear down the environment (opt-in, only if configured)
|
|
348
463
|
|
|
349
464
|
**A hotfix is torn down later, by `hotfix finish`.**
|
|
@@ -133,12 +133,38 @@ flag in step 6.
|
|
|
133
133
|
but offer to create them now with a colour, since a label made on first use is
|
|
134
134
|
grey and undescribed. Create them only on a yes.
|
|
135
135
|
|
|
136
|
+
## 5b. What does a ticket carry?
|
|
137
|
+
|
|
138
|
+
Ask once, with the recommendation first — this decides what the team sees on
|
|
139
|
+
every ticket, so it is theirs to choose rather than a default to inherit:
|
|
140
|
+
|
|
141
|
+
- **`summary`** *(recommended — what `init-config` writes)* — the ticket holds a
|
|
142
|
+
short delimited block: the spec's summary, its acceptance criteria, the
|
|
143
|
+
surfaces it touches, its gating and its progress. Push splices that block in
|
|
144
|
+
beside whatever the team writes, which no push ever touches. The spec itself
|
|
145
|
+
stays in git.
|
|
146
|
+
- **`spec`** — the whole overview is the ticket body, replaced on every push.
|
|
147
|
+
Pass `--description spec` to `init-config`.
|
|
148
|
+
|
|
149
|
+
GitHub's block is marked with HTML comments, measured to survive its editor.
|
|
150
|
+
|
|
151
|
+
Then name the phase mode, without asking unless they raise it:
|
|
152
|
+
`mapping.phases` stays `subissue` — one assignable sub-issue per phase, which
|
|
153
|
+
is what lets phases run in parallel. `deferred` (minted at `/spec-start`),
|
|
154
|
+
`inline` and `none` (no sub-issues at all) are one edit to the file away.
|
|
155
|
+
|
|
156
|
+
**On GitHub, offer the progress field too.** If the board has (or the user
|
|
157
|
+
wants) a **Number** field for % done, name it in `summary.progressField`
|
|
158
|
+
after the write; every push then fills it. Off by default, and a board
|
|
159
|
+
without the field is one report line, never a failure.
|
|
160
|
+
|
|
136
161
|
## 6. Write it
|
|
137
162
|
|
|
138
163
|
```
|
|
139
164
|
skitterspec spec-sync init-config \
|
|
140
165
|
--owner <owner> --repo <repo> --project <N> \
|
|
141
|
-
[--status-field Status] [--state <bucket>=<name> …] [--force]
|
|
166
|
+
[--status-field Status] [--state <bucket>=<name> …] [--force] \
|
|
167
|
+
[--description summary|spec]
|
|
142
168
|
```
|
|
143
169
|
|
|
144
170
|
The engine writes **only the keys that were given**, so the file shows this
|
|
@@ -211,9 +237,10 @@ Then name the next step:
|
|
|
211
237
|
Mention what setup did **not** configure, so the defaults aren't mistaken for
|
|
212
238
|
decisions: phase mapping (`mapping.phases` — sub-issue per phase by default) and
|
|
213
239
|
field ownership, and intake (`intake.label`, `bugLabels`, `hotfixLabels`).
|
|
214
|
-
Point at `github.config.md` for those.
|
|
215
|
-
(`sync.fieldOwnership
|
|
216
|
-
|
|
240
|
+
Point at `github.config.md` for those. Status and assignee are GitHub's by
|
|
241
|
+
default (`sync.fieldOwnership` `workflowState`/`assignee`: `pull` — the
|
|
242
|
+
`doctor` table's `Ownership` row says which is in force): `/spec-start` assigns
|
|
243
|
+
an unheld issue to the token's login, and `spec-sync whoami` shows who that is.
|
|
217
244
|
|
|
218
245
|
End with the block defined in `.claude/rules/spec-reports.md`. That file carries
|
|
219
246
|
the shape; this section carries only what is specific here.
|
|
@@ -151,6 +151,16 @@ it happens differs (`/spec` writes the spec in Phase B, `/spec-bug` in its step
|
|
|
151
151
|
|
|
152
152
|
## 1. Establish the base version (the tag)
|
|
153
153
|
|
|
154
|
+
**A release BRANCH instead of a tag.** Where `env.config.json` sets
|
|
155
|
+
`hotfix.releaseBranch` (e.g. `"master"` — a team whose prod is whatever that
|
|
156
|
+
branch holds), there is **no tag to ask for**: skip the questions below and run
|
|
157
|
+
§3's `up` **without `--from`**. The engine fetches, forks from the remote's head
|
|
158
|
+
of that branch, and prints two lines — `fork:` naming the commit, and
|
|
159
|
+
`record: > **Base version:** <branch>@<sha>` — and §5 copies that `record:`
|
|
160
|
+
value into the header **verbatim**. Say which commit it forked from in one line;
|
|
161
|
+
that is the version the fix is built on. The rest of this section is the tag
|
|
162
|
+
flow, unchanged.
|
|
163
|
+
|
|
154
164
|
- **Read the arguments.** `/spec-hotfix <tag> <name>` (e.g.
|
|
155
165
|
`/spec-hotfix v33.16.4 login-crash`). An argument shaped like an issue
|
|
156
166
|
reference — letters, a hyphen, digits (`SKI-123`) —
|
|
@@ -268,6 +278,10 @@ installs `.claude/hooks/main-guard.cjs` that first write is refused outright,
|
|
|
268
278
|
and a step whose documented opening the repo will not perform is not a step. The
|
|
269
279
|
spec is written in the worktree at §5, on the branch it belongs to.
|
|
270
280
|
|
|
281
|
+
**Branch-based (`hotfix.releaseBranch`):** run the same command **without**
|
|
282
|
+
`--from` — the engine picks the release branch's head and prints the
|
|
283
|
+
`record:` line §5 copies. An explicit `--from` still wins over it.
|
|
284
|
+
|
|
271
285
|
**§5 records the same tag you passed to `--from`**, on the spec's
|
|
272
286
|
`> **Base version:**` header. That is not bookkeeping: `/spec-complete` cuts the
|
|
273
287
|
release and carries the fix off the header, so a worktree forked from one ref and
|
|
@@ -306,6 +320,28 @@ you there, so create the folder and write it here. A hotfix
|
|
|
306
320
|
is usually a single-pass fix, so the `## Fix` block can live directly in
|
|
307
321
|
`00-overview.md`. Keep it lean:
|
|
308
322
|
|
|
323
|
+
**Who owns this spec's status.** Only when `specs/.core/github.config.json` exists.
|
|
324
|
+
Run `skitterspec spec-sync ownership --json` once and read both values:
|
|
325
|
+
|
|
326
|
+
- **`workflowState: "pull"`** — GitHub is the record of this spec's status, so
|
|
327
|
+
this skill **writes no `> **Status:**` header and appends no State log row**,
|
|
328
|
+
wherever its steps below say to. A spec this skill creates gets neither: its
|
|
329
|
+
header carries `> **Tracker:** <issue url>` instead, filled in once linking
|
|
330
|
+
has stamped the url, and its body has no `## State log` section. Readiness is
|
|
331
|
+
the spec's own content — a `Draft` is a spec whose **Open questions** is not
|
|
332
|
+
empty — so nothing is lost with the header.
|
|
333
|
+
- **`assignee: "pull"`** — GitHub holds who is building it, so this skill
|
|
334
|
+
**writes no `> **Developer:**` line** either.
|
|
335
|
+
- **Anything else** — `push`, `none`, sync reported off, or the command failing
|
|
336
|
+
— is cannot-tell, and the steps below run exactly as written.
|
|
337
|
+
|
|
338
|
+
What `pull` leaves alone: the folder move (a bucket records what the repo did to
|
|
339
|
+
the code, not a planning status), the phase files and index, and the Changelog.
|
|
340
|
+
A reason a `Status:` header would have carried — a cancellation's, a knock-back
|
|
341
|
+
to Draft — goes in a dated Changelog line instead. A spec that already carries
|
|
342
|
+
any of these lines keeps them untouched: they are history, and nothing rewrites
|
|
343
|
+
them.
|
|
344
|
+
|
|
309
345
|
```markdown
|
|
310
346
|
# Hotfix: <short title>
|
|
311
347
|
|
|
@@ -314,7 +350,7 @@ is usually a single-pass fix, so the `## Fix` block can live directly in
|
|
|
314
350
|
> **Status:** In Progress — fixing (red test added)
|
|
315
351
|
> **Author:** <git user.name — who reported/captured it>
|
|
316
352
|
> **Developer:** <git user.name — you, since you're fixing it now>
|
|
317
|
-
> **Base version:** <tag prod is running, e.g. v33.16.4>
|
|
353
|
+
> **Base version:** <tag prod is running, e.g. v33.16.4 — or, branch-based, the `record:` value `up` printed, e.g. master@1a2b3c4d5e6f>
|
|
318
354
|
> **Raised:** <YYYY-MM-DD (today)>
|
|
319
355
|
> **Area:** <files/modules>
|
|
320
356
|
> **Severity:** <Azure's literal values, "1 - Critical" … "4 - Low" — optional;
|
|
@@ -393,7 +429,9 @@ If it's absent, skip this entirely — the spec stays local-only and the skill
|
|
|
393
429
|
behaves exactly as above. When present, link the spec you just wrote so status
|
|
394
430
|
and discussion live in GitHub while the repo stays the source of truth. A spec is
|
|
395
431
|
a GitHub **issue**; each phase is a **sub-issue**, carrying that phase's tasks in
|
|
396
|
-
its description as a read-only checklist.
|
|
432
|
+
its description as a read-only checklist. That is the `spec` description mode;
|
|
433
|
+
under `summary` (a new config's default) the issue and each sub-issue carry
|
|
434
|
+
a short block instead, and the phase's tasks stay in git.
|
|
397
435
|
|
|
398
436
|
**Linking is just the first push**, so it runs the same engine path `/spec-push`
|
|
399
437
|
does — you never create the issue by hand:
|
|
@@ -475,6 +513,12 @@ is a cosmetic gap that `/spec-claim` closes later.
|
|
|
475
513
|
skitterspec spec-sync assign <spec> --to <login> --name "<display name>"
|
|
476
514
|
```
|
|
477
515
|
|
|
516
|
+
**Where `spec-sync ownership` reports `assignee: pull`**, the issue is the
|
|
517
|
+
record and the spec file is not: add `--if-unassigned`. It writes GitHub
|
|
518
|
+
directly, claims the issue only when nobody holds it, and stamps nothing —
|
|
519
|
+
so step 4 has no header to leave alone, since under `pull` no `Developer:`
|
|
520
|
+
line was written.
|
|
521
|
+
|
|
478
522
|
4. **Leave `> **Developer:**` as `git config user.name`** — the step above this
|
|
479
523
|
seam already set it, and this seam must not overwrite it with the tracker's
|
|
480
524
|
display name.
|
|
@@ -496,12 +540,15 @@ is a cosmetic gap that `/spec-claim` closes later.
|
|
|
496
540
|
|
|
497
541
|
**Nothing is pushed here.** `assign` writes the repo only, and the refresh these
|
|
498
542
|
skills already run sends it. Assignment is an ordinary field of the projection,
|
|
499
|
-
not a side errand with its own network call.
|
|
543
|
+
not a side errand with its own network call. Under `pull` the
|
|
544
|
+
`assign` call is itself the write, so there is nothing for a push to carry.
|
|
500
545
|
|
|
501
546
|
**There is no unassign step anywhere.** The projection derives the assignee from
|
|
502
547
|
the spec's lifecycle bucket, so `/spec-complete` and `/spec-cancel` release the
|
|
503
548
|
issue through the push they already make. The stamp deliberately stays in the
|
|
504
|
-
file: who actioned the work outlives who is currently holding it.
|
|
549
|
+
file: who actioned the work outlives who is currently holding it. Under `pull`
|
|
550
|
+
the projection carries no assignee at all, so finishing a spec leaves it on
|
|
551
|
+
the issue: the board keeps who did the work.
|
|
505
552
|
|
|
506
553
|
GitHub has no project picker: a minted issue lands in the configured
|
|
507
554
|
`github.owner`/`github.repo`, on the one board `github.project` names — both
|
|
@@ -72,6 +72,28 @@ this spec. Without isolation, write where you stand.
|
|
|
72
72
|
The spec is a folder in **`specs/in-progress/`** — never backlog — with
|
|
73
73
|
`00-overview.md` and one phase file:
|
|
74
74
|
|
|
75
|
+
**Who owns this spec's status.** Only when `specs/.core/github.config.json` exists.
|
|
76
|
+
Run `skitterspec spec-sync ownership --json` once and read both values:
|
|
77
|
+
|
|
78
|
+
- **`workflowState: "pull"`** — GitHub is the record of this spec's status, so
|
|
79
|
+
this skill **writes no `> **Status:**` header and appends no State log row**,
|
|
80
|
+
wherever its steps below say to. A spec this skill creates gets neither: its
|
|
81
|
+
header carries `> **Tracker:** <issue url>` instead, filled in once linking
|
|
82
|
+
has stamped the url, and its body has no `## State log` section. Readiness is
|
|
83
|
+
the spec's own content — a `Draft` is a spec whose **Open questions** is not
|
|
84
|
+
empty — so nothing is lost with the header.
|
|
85
|
+
- **`assignee: "pull"`** — GitHub holds who is building it, so this skill
|
|
86
|
+
**writes no `> **Developer:**` line** either.
|
|
87
|
+
- **Anything else** — `push`, `none`, sync reported off, or the command failing
|
|
88
|
+
— is cannot-tell, and the steps below run exactly as written.
|
|
89
|
+
|
|
90
|
+
What `pull` leaves alone: the folder move (a bucket records what the repo did to
|
|
91
|
+
the code, not a planning status), the phase files and index, and the Changelog.
|
|
92
|
+
A reason a `Status:` header would have carried — a cancellation's, a knock-back
|
|
93
|
+
to Draft — goes in a dated Changelog line instead. A spec that already carries
|
|
94
|
+
any of these lines keeps them untouched: they are history, and nothing rewrites
|
|
95
|
+
them.
|
|
96
|
+
|
|
75
97
|
```markdown
|
|
76
98
|
# Incident: <short title>
|
|
77
99
|
|
|
@@ -193,10 +193,15 @@ once it is over. Without a provider this is a no-op and nothing below changes.
|
|
|
193
193
|
**Only when `specs/.core/github.config.json` exists** and the spec carries a
|
|
194
194
|
`github_identifier`. Otherwise skip this step — no config means zero change.
|
|
195
195
|
|
|
196
|
-
- **No pull
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
196
|
+
- **No pull — one look at the board, before building.** Nothing is brought
|
|
197
|
+
down. Run `skitterspec spec-sync board <spec>`: it reads GitHub and writes nothing to
|
|
198
|
+
the spec, and it is **silent** unless the issue says Done or Cancelled while
|
|
199
|
+
this spec is still in flight. When it prints a line, relay it once as a
|
|
200
|
+
warning — this session holds the branch, so the cleanup it names is the
|
|
201
|
+
operator's to choose — and **carry on with the build**. Never run that
|
|
202
|
+
cleanup and never refuse on it. A status someone moved anywhere else is the
|
|
203
|
+
board doing its job, and the next push sends a state only when the spec
|
|
204
|
+
itself changes bucket.
|
|
200
205
|
- **Refresh the mirror now, without asking.** Run `/spec-push`. The spec has just
|
|
201
206
|
moved to `in-progress` and its phase to `🔄` — both real state changes, and the
|
|
202
207
|
tracker is a generated mirror of them. This holds under **both**
|
|
@@ -212,7 +217,9 @@ once it is over. Without a provider this is a no-op and nothing below changes.
|
|
|
212
217
|
`assignee` (it does by default; `"none"` declines it). If the spec records nobody and
|
|
213
218
|
`skitterspec spec-sync whoami --json` answers, stamp it with
|
|
214
219
|
`skitterspec spec-sync assign <spec> --to <id> --name "<name>"` and let the
|
|
215
|
-
push above carry it. If identity is unknown, skip it in silence.
|
|
220
|
+
push above carry it. If identity is unknown, skip it in silence. Where
|
|
221
|
+
`spec-sync ownership` reports `assignee: pull`, add `--if-unassigned`: the
|
|
222
|
+
ticket is the record there, so it is assigned only when nobody holds it.
|
|
216
223
|
**Do not prompt**: an assignment question in the middle of a build is an
|
|
217
224
|
interruption with no deadline, and `/spec-claim` answers it whenever the
|
|
218
225
|
operator likes.
|
|
@@ -20,6 +20,13 @@ skill computes what changed since the last push and applies it — it never read
|
|
|
20
20
|
GitHub content back or merges. A person editing the mirror in GitHub will see it
|
|
21
21
|
overwritten on the next push.
|
|
22
22
|
|
|
23
|
+
**That is `mapping.description: "spec"`.** Under `"summary"` (what a new
|
|
24
|
+
config is written with) the issue and each sub-issue carry a delimited
|
|
25
|
+
**block** instead — summary, acceptance criteria, surfaces, gating and
|
|
26
|
+
progress for the spec; goal and task count for a phase — spliced in beside
|
|
27
|
+
whatever the team wrote in GitHub, which is never overwritten. Only the block
|
|
28
|
+
is the repo's, so only an edit inside it is reported.
|
|
29
|
+
|
|
23
30
|
**Opt-in**: only runs when `specs/.core/github.config.json` exists. If absent,
|
|
24
31
|
tell the user how to enable GitHub sync and stop.
|
|
25
32
|
|
|
@@ -146,6 +153,21 @@ configured repo, on the configured board.
|
|
|
146
153
|
|
|
147
154
|
## 4a. Apply it yourself — the MCP path (order matters)
|
|
148
155
|
|
|
156
|
+
**In summary mode, every body you write is the engine's splice — never the plan's text on its own.**
|
|
157
|
+
Only when the plan's `descriptionMode` is
|
|
158
|
+
`summary` (it is always present; `spec` needs none of this). There
|
|
159
|
+
the plan's `description` and each sub-issue's `goal` are a **block**, and the
|
|
160
|
+
issue's body is the block *plus the team's text around it*. Writing the block
|
|
161
|
+
alone deletes that text. So, for each object you are about to write:
|
|
162
|
+
|
|
163
|
+
1. Save the body GitHub holds now to a file — an empty file for one you are
|
|
164
|
+
creating.
|
|
165
|
+
2. `skitterspec spec-sync splice <spec> --live <file>` for the spec issue, or
|
|
166
|
+
`… --phase <ref>` for a phase's sub-issue.
|
|
167
|
+
3. Write **exactly what it prints**. A non-zero exit printed nothing and means
|
|
168
|
+
a delimiter was edited by hand: skip that object's body, write its other
|
|
169
|
+
fields, and name it in the report. Never compose the splice yourself.
|
|
170
|
+
|
|
149
171
|
**First, check whether you are about to overwrite someone.** On the API path
|
|
150
172
|
`apply` does this for itself, off the read-back it already makes — for the spec
|
|
151
173
|
issue and for every phase sub-issue it is about to update, so a box ticked on a
|