@skitterbyte/skitterspec-jira 0.0.0-stage → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MIGRATION.md +1266 -0
- package/README.md +44 -2
- package/assets/claude-md-section.md +85 -0
- package/assets/commands/allow-main.md +33 -0
- package/assets/commands/spec-connect.md +13 -0
- package/assets/commands/spec-live.md +14 -0
- package/assets/commands/spec-remote-review.md +37 -0
- package/assets/commands/spec-skip.md +24 -0
- package/assets/core/SETUP.md +192 -0
- package/assets/core/env.config.json.example +56 -0
- package/assets/core/env.config.md +606 -0
- package/assets/core/gating.config.json.example +4 -0
- package/assets/core/gating.config.md +81 -0
- package/assets/core/jira.config.json.example +18 -0
- package/assets/core/jira.config.md +88 -0
- package/assets/hooks/main-guard.cjs +162 -0
- package/assets/hooks/review-gate.cjs +146 -0
- package/assets/review/page.html +3384 -0
- package/assets/rules/commit-trailers.md +96 -0
- package/assets/rules/negative-checks.md +69 -0
- package/assets/rules/offered-unblocks.md +100 -0
- package/assets/rules/spec-planning.md +702 -0
- package/assets/rules/spec-reports.md +572 -0
- package/assets/skills/no-spec/SKILL.md +249 -0
- package/assets/skills/spec/SKILL.md +714 -0
- package/assets/skills/spec-bug/SKILL.md +585 -0
- package/assets/skills/spec-cancel/SKILL.md +261 -0
- package/assets/skills/spec-complete/SKILL.md +451 -0
- package/assets/skills/spec-diff/SKILL.md +870 -0
- package/assets/skills/spec-hotfix/SKILL.md +607 -0
- package/assets/skills/spec-init/SKILL.md +178 -0
- package/assets/skills/spec-jira-setup/SKILL.md +221 -0
- package/assets/skills/spec-list/SKILL.md +173 -0
- package/assets/skills/spec-next/SKILL.md +678 -0
- package/assets/skills/spec-push/SKILL.md +306 -0
- package/assets/skills/spec-review/SKILL.md +256 -0
- package/assets/skills/spec-reviewed/SKILL.md +284 -0
- package/assets/skills/spec-start/SKILL.md +496 -0
- package/assets/skills/spec-status/SKILL.md +114 -0
- package/assets/skills/spec-sync/SKILL.md +220 -0
- package/assets/skills/spec-to-main/SKILL.md +141 -0
- package/bin/skitterspec-jira.js +68 -0
- package/package.json +40 -4
- package/src/cli.js +5967 -0
- package/src/deprecate.js +138 -0
- package/src/env/bootstrap.js +188 -0
- package/src/env/building.js +143 -0
- package/src/env/classify.js +176 -0
- package/src/env/commitcmd.js +108 -0
- package/src/env/config.js +850 -0
- package/src/env/dev.js +63 -0
- package/src/env/glob.js +34 -0
- package/src/env/hooks.js +226 -0
- package/src/env/hotfix.js +413 -0
- package/src/env/hotfixland.js +302 -0
- package/src/env/integrate.js +167 -0
- package/src/env/live.js +479 -0
- package/src/env/mainguard.js +299 -0
- package/src/env/provision.js +466 -0
- package/src/env/proxy.js +225 -0
- package/src/env/prune.js +119 -0
- package/src/env/registry.js +159 -0
- package/src/env/render.js +17 -0
- package/src/env/resolve.js +716 -0
- package/src/env/review.js +2622 -0
- package/src/env/reviewers/coderabbit.js +228 -0
- package/src/env/reviewers.js +517 -0
- package/src/env/serve.js +1044 -0
- package/src/env/supervise.js +157 -0
- package/src/env/teardown.js +248 -0
- package/src/env/trust.js +87 -0
- package/src/gating.js +155 -0
- package/src/init.js +1150 -0
- package/src/lines-diff.js +114 -0
- package/src/prompts.js +129 -0
- package/src/vendor/jira/adf.js +414 -0
- package/src/vendor/jira/api.js +295 -0
- package/src/vendor/jira/cli-sync.js +1252 -0
- package/src/vendor/jira/commands.js +44 -0
- package/src/vendor/jira/config.js +286 -0
- package/src/vendor/jira/credentials.js +108 -0
- package/src/vendor/jira/dialect.js +45 -0
- package/src/vendor/jira/mcp.js +129 -0
- package/src/vendor/provider-kit/index.js +41 -0
- package/src/vendor/provider-kit/src/adapter.js +23 -0
- package/src/vendor/provider-kit/src/apply.js +207 -0
- package/src/vendor/provider-kit/src/args.js +68 -0
- package/src/vendor/provider-kit/src/assignment.js +277 -0
- package/src/vendor/provider-kit/src/config.js +251 -0
- package/src/vendor/provider-kit/src/credentials.js +404 -0
- package/src/vendor/provider-kit/src/doctor.js +35 -0
- package/src/vendor/provider-kit/src/http.js +63 -0
- package/src/vendor/provider-kit/src/identity.js +93 -0
- package/src/vendor/provider-kit/src/list-assignee.js +71 -0
- package/src/vendor/provider-kit/src/list-rows.js +35 -0
- package/src/vendor/provider-kit/src/md-compare.js +39 -0
- package/src/vendor/provider-kit/src/md-tables.js +94 -0
- package/src/vendor/provider-kit/src/prompt.js +50 -0
- package/src/vendor/provider-kit/src/released.js +219 -0
- package/src/vendor/provider-kit/src/specs.js +248 -0
- package/src/vendor/provider-kit/src/transport.js +22 -0
- package/src/vendor/sync-core/index.js +92 -0
- package/src/vendor/sync-core/src/base.js +81 -0
- package/src/vendor/sync-core/src/compare.js +338 -0
- package/src/vendor/sync-core/src/dialect.js +51 -0
- package/src/vendor/sync-core/src/fields.js +36 -0
- package/src/vendor/sync-core/src/legacy.js +100 -0
- package/src/vendor/sync-core/src/normalize.js +971 -0
- package/src/vendor/sync-core/src/push.js +85 -0
- package/src/vendor/sync-core/src/retarget.js +278 -0
- package/src/vendor/sync-core/src/task-block.js +308 -0
- package/src/vendor/sync-core/src/verify.js +67 -0
- package/src/vendor/sync-core/src/write.js +191 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-cancel
|
|
3
|
+
description: Cancel a spec — capture the reason, record final progress, stamp the reason on the spec header, then move it into specs/cancelled/. Targets a spec by name (arg) or the spec currently in context. Use when the user says "/spec-cancel", "drop this spec", "we're not doing this spec", or "shelve <spec>".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /spec-cancel — record, stamp a reason, archive a spec
|
|
7
|
+
|
|
8
|
+
> Stay silent while this runs — speak only to ask something you cannot answer
|
|
9
|
+
> yourself, or to report a failure at the moment it happens. Read
|
|
10
|
+
> `.claude/rules/spec-reports.md` before reporting; it defines the block this
|
|
11
|
+
> skill ends with.
|
|
12
|
+
|
|
13
|
+
## 1. Identify the target spec
|
|
14
|
+
|
|
15
|
+
- Use the name/path argument if given, else the spec **in context**. If unclear,
|
|
16
|
+
ask which spec.
|
|
17
|
+
- Locate it under `specs/` (any bucket — `backlog/`, `in-progress/`, …). Entry point
|
|
18
|
+
is its `00-overview.md`; phases are separate files (`01-<slug>.md`, `02-…`) listed
|
|
19
|
+
in its phase index (legacy specs may be a bare `<name>.md`).
|
|
20
|
+
|
|
21
|
+
## 2. Ask for the cancellation reason — required
|
|
22
|
+
|
|
23
|
+
Ask the user **why** it's being cancelled (e.g. superseded by X, descoped, no
|
|
24
|
+
longer needed, blocked indefinitely). Do not proceed without a reason; capture
|
|
25
|
+
it verbatim/condensed for the header.
|
|
26
|
+
|
|
27
|
+
## 3. Double-check and record progress
|
|
28
|
+
|
|
29
|
+
- Read the overview and every phase file and reconcile task state with reality:
|
|
30
|
+
tick anything that was actually completed before cancelling so the record is
|
|
31
|
+
honest about what landed.
|
|
32
|
+
- Note any partial/abandoned work so it isn't mistaken for unstarted.
|
|
33
|
+
- **Check for pre-existing uncommitted changes — before you touch anything.**
|
|
34
|
+
Run `git status`. Anything already uncommitted is the *user's* work and must not
|
|
35
|
+
be swept into the cancellation commit: offer `/commit` and **stop**. Everything
|
|
36
|
+
this skill writes in steps 4–5 is its own, and step 5 commits that.
|
|
37
|
+
|
|
38
|
+
## 4. Stamp the spec
|
|
39
|
+
|
|
40
|
+
Update the **Status** header in the entry point so the reason is visible at the
|
|
41
|
+
top:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
> **Status:** Cancelled (<YYYY-MM-DD>) — <reason>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Append a **State log** row:
|
|
48
|
+
`| <YYYY-MM-DD> | Cancelled | cancelled | <git user.name> |`.
|
|
49
|
+
|
|
50
|
+
Add a **Changelog** entry:
|
|
51
|
+
`- <YYYY-MM-DD> — Cancelled: <reason>.`
|
|
52
|
+
|
|
53
|
+
## 5. Move to cancelled — and commit it
|
|
54
|
+
|
|
55
|
+
`mkdir -p specs/cancelled` then **`git mv`** the file or folder:
|
|
56
|
+
`git mv "specs/<bucket>/<name>" "specs/cancelled/<name>"` (preserve history;
|
|
57
|
+
move the whole folder).
|
|
58
|
+
|
|
59
|
+
**Only when `specs/.core/jira.config.json` exists** and the spec's overview
|
|
60
|
+
carries a `jira_identifier`. Either missing → **skip**, in one line
|
|
61
|
+
(`not linked to Jira — /spec-push to mirror it`), and carry on. Nothing else in
|
|
62
|
+
this step changes.
|
|
63
|
+
|
|
64
|
+
**Refresh the mirror now, without asking.** Run `/spec-push`. The repo has just
|
|
65
|
+
become the truth about this spec's state, and the tracker is a generated mirror
|
|
66
|
+
of it — leaving them to diverge until someone remembers to push by hand is the
|
|
67
|
+
gap this exists to close. It costs one engine call and no model tokens when
|
|
68
|
+
Jira credentials are set (see `apply.transport` in `jira.config.md`).
|
|
69
|
+
|
|
70
|
+
- **Never mint.** An unlinked spec is skipped, not created. An issue born `Done`
|
|
71
|
+
is tracker noise, and a spec kept deliberately local should stay that way —
|
|
72
|
+
`/spec-push` is how someone opts in.
|
|
73
|
+
- **Never fatal.** If the push fails — offline, no credentials, a Jira error —
|
|
74
|
+
say so and **finish the operation anyway**. The spec is
|
|
75
|
+
complete/cancelled/reviewed in the repo regardless; the mirror is disposable
|
|
76
|
+
and the next push repairs it. Do not roll anything back, and do not stop to
|
|
77
|
+
ask.
|
|
78
|
+
- **Say what happened** in the skill's report: mirror updated, skipped as
|
|
79
|
+
unlinked, or failed with the reason.
|
|
80
|
+
- **There is no assignment to release here.** Assignment sync is not yet
|
|
81
|
+
supported by the Jira provider; the `> **Developer:**` header stays put as the
|
|
82
|
+
repo's own record of who actioned the work.
|
|
83
|
+
|
|
84
|
+
### Why it sits here
|
|
85
|
+
|
|
86
|
+
In `/spec-complete` and `/spec-cancel` this step is deliberately pinned
|
|
87
|
+
**after the `git mv` and before the commit**, and both halves matter:
|
|
88
|
+
|
|
89
|
+
- **After the move**, because the projection reads a spec's workflow status from
|
|
90
|
+
its folder bucket. Push while the folder is still in `in-progress/` and the
|
|
91
|
+
issue is set to the status the spec is *leaving*.
|
|
92
|
+
- **Before the commit**, because the push stamps keys into the spec and writes a
|
|
93
|
+
snapshot under `specs/.core/`. Push after the commit instead and both are left
|
|
94
|
+
uncommitted, which makes `spec-env integrate` refuse to land the branch.
|
|
95
|
+
|
|
96
|
+
The snapshot is reached **by name**, not by breadth. It is a declared
|
|
97
|
+
`spec.companionPaths` entry (`specs/.core/jira-base/{identifier}.base.json`),
|
|
98
|
+
so `spec-env stage` returns it among this spec's owned paths and the commit below
|
|
99
|
+
names it. This is why the commit no longer stages `specs/` wholesale: the one
|
|
100
|
+
file outside the spec's folder that had to be swept up is addressable, so the
|
|
101
|
+
breadth bought nothing and cost another session's work.
|
|
102
|
+
|
|
103
|
+
Then **commit the cancellation edits** — this skill wrote them, so it commits
|
|
104
|
+
them. Ask the engine which paths are this spec's, then stage and commit
|
|
105
|
+
**exactly those**:
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
skitterspec spec-env stage <name> # lists them; --json to consume
|
|
109
|
+
git add -- <the owned paths>
|
|
110
|
+
git commit -m "chore(spec): cancel <name>" -- <the owned paths>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**Never `git add specs/`.** That stages a *directory*, so a spec another
|
|
114
|
+
session is part-way through writing lands in this commit under this spec's
|
|
115
|
+
ticket. The `--` on the **commit** is the other half: a checkout has one
|
|
116
|
+
`.git/index`, shared by every session standing in it, so a bare `git commit`
|
|
117
|
+
takes whatever else is staged there however carefully you staged your own.
|
|
118
|
+
`.claude/rules/spec-planning.md` carries the full account.
|
|
119
|
+
|
|
120
|
+
**This matters more here than anywhere else.** Teardown (step 7) refuses a dirty
|
|
121
|
+
worktree and offers `--force` as the way through — and forcing would destroy the
|
|
122
|
+
cancellation record this skill just wrote. Committing first means teardown never
|
|
123
|
+
needs `--force`. Do not `git push`.
|
|
124
|
+
|
|
125
|
+
## 6. Report
|
|
126
|
+
|
|
127
|
+
**The block is emitted when the run ends, not where this section sits.** The
|
|
128
|
+
sections below run after it, so their outcome belongs in the block — write it
|
|
129
|
+
once, at the end, with what actually happened.
|
|
130
|
+
|
|
131
|
+
End with the block defined in `.claude/rules/spec-reports.md`. That file carries
|
|
132
|
+
the shape; this section carries only what is specific here.
|
|
133
|
+
|
|
134
|
+
**Verdicts**
|
|
135
|
+
|
|
136
|
+
- `✅` — stamped, moved to `cancelled`, committed, torn down.
|
|
137
|
+
- `⚠️` — cancelled, with something worth knowing: teardown declined, a tracker
|
|
138
|
+
refresh that failed, unpushed commits the operator chose to let go.
|
|
139
|
+
- `❌` — it acted and stopped part-way. Say what is where.
|
|
140
|
+
- `⏸` — no reason given, or no such spec. Nothing changed.
|
|
141
|
+
|
|
142
|
+
**Fields:** `Tracker` · `Spec` · `Worktree` · `Follow-ups` · `Next`
|
|
143
|
+
|
|
144
|
+
**The reason goes in the verdict clause** — `✅ /spec-cancel · feat-foo ·
|
|
145
|
+
superseded by feat-bar`. It is the one thing anyone reading this later wants,
|
|
146
|
+
and a cancellation is an ordinary successful run, so it must not be mistaken for
|
|
147
|
+
a `Why`: that field is for a run that did not do what it set out to.
|
|
148
|
+
|
|
149
|
+
`Worktree` says what was reclaimed, or that teardown was declined and the
|
|
150
|
+
worktree still stands — on a cancelled spec that worktree may hold the only copy
|
|
151
|
+
of the work, so an unreclaimed one is worth a line rather than a silence.
|
|
152
|
+
|
|
153
|
+
## 7. Tear down the environment (opt-in, only if configured)
|
|
154
|
+
|
|
155
|
+
**Only when `specs/.core/env.config.json` exists**, offer — don't force — to
|
|
156
|
+
reclaim the cancelled spec's environment. On confirmation, run the `spec-env` CLI
|
|
157
|
+
directly (the old `/spec-env-down` skill is gone — teardown is folded in here):
|
|
158
|
+
|
|
159
|
+
0. **Name a pass still waiting for THIS spec — before anything is removed.**
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
skitterspec spec-env review waiting --json
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Filter to the spec being cancelled and say nothing about any other: a run
|
|
166
|
+
reports itself and nothing else (`.claude/rules/spec-reports.md`). For each
|
|
167
|
+
one, give the code, the verdict and the age, then the two exits — claim it
|
|
168
|
+
now with `/spec-reviewed <code>` **while the worktree still stands**, or
|
|
169
|
+
disown it with `skitterspec spec-env review <spec> --drop <code>`.
|
|
170
|
+
|
|
171
|
+
**Why here and not anywhere else.** Nothing is about to become unreachable —
|
|
172
|
+
a pass can be disowned long after its spec is gone. What is about to pass is
|
|
173
|
+
the last moment the verdict can still be **honoured**: before teardown a
|
|
174
|
+
`commit` pass can be claimed and acted on, after it there is no branch left
|
|
175
|
+
to commit to and disowning is all that remains. On a cancelled spec that is
|
|
176
|
+
sharper still — the worktree may hold the only copy of the work, so a pass
|
|
177
|
+
approving it is the one thing that might argue for keeping it.
|
|
178
|
+
|
|
179
|
+
**It reports, and it never blocks.** No refusal, no confirmation of its own,
|
|
180
|
+
no non-zero exit — this step already asks before it reclaims anything, and a
|
|
181
|
+
waiting pass is information rather than a second gate.
|
|
182
|
+
And **it never claims** — reporting a pass is not taking one, and
|
|
183
|
+
`/spec-diff` §0 is untouched by this step.
|
|
184
|
+
|
|
185
|
+
Put what you found in the report's `Notes` row.
|
|
186
|
+
Silent when nothing is waiting, which is the usual case.
|
|
187
|
+
|
|
188
|
+
1. If `.spec-env/connected` names this spec, run `skitterspec spec-env connect
|
|
189
|
+
main` first to free the canonical ports.
|
|
190
|
+
2. `skitterspec spec-env dev down <name>` — stop its host dev servers.
|
|
191
|
+
**Standing in the worktree? Leave it before you tear it down.** If this session's
|
|
192
|
+
cwd is inside the spec's own worktree — the normal case in `worktree` mode, since
|
|
193
|
+
`/spec-start` moves you there — get out **first**, then run the teardown commands.
|
|
194
|
+
One instruction covers it:
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
cd <primary checkout>
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
That is the whole mechanism, and it does not matter how you got in: the session
|
|
201
|
+
was moved by a `cd` and it leaves by one. There is no tool to call here, and none
|
|
202
|
+
should be reached for — the move in is a plain `cd` precisely because a tool that
|
|
203
|
+
asks for approval is unusable on a phone.
|
|
204
|
+
|
|
205
|
+
**`spec-env down` stays the single thing that deletes a worktree.** The plan
|
|
206
|
+
below is the only deleter, because a second one is how the teardown guards get
|
|
207
|
+
bypassed.
|
|
208
|
+
|
|
209
|
+
Not because git refuses — it does not. `git worktree remove` **succeeds** on the
|
|
210
|
+
tree you are standing in, and that is the problem: the directory vanishes under
|
|
211
|
+
the shell, `pwd` keeps reporting the path that no longer exists, and every
|
|
212
|
+
command after it dies with `fatal: Unable to read current working directory`.
|
|
213
|
+
The teardown looks fine and everything following it breaks — the report, the
|
|
214
|
+
prune, any check you meant to run. Relocating first costs nothing and is the
|
|
215
|
+
only ordering that survives.
|
|
216
|
+
|
|
217
|
+
3. `skitterspec spec-env down <name>` — then execute the printed commands to
|
|
218
|
+
remove the worktree/stack and free the slot. It respects the teardown guards
|
|
219
|
+
(won't destroy a dirty/unpushed worktree without `--force`).
|
|
220
|
+
|
|
221
|
+
**When it refuses over unpushed commits, relay both ways out.**
|
|
222
|
+
A cancelled spec is normally unlanded, so this is the one moment in the
|
|
223
|
+
lifecycle where that guard genuinely fires — and it fires about real loss.
|
|
224
|
+
The worktree is the only copy of this work: the branch is on no remote and
|
|
225
|
+
not merged into the base branch, so removing it ends it. Say that plainly,
|
|
226
|
+
relay the engine's reason, and give both endings:
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
publish it first — keeps the work reachable, then re-run /spec-cancel:
|
|
230
|
+
git -C <worktreePath> push -u origin <branch>
|
|
231
|
+
|
|
232
|
+
or accept the loss (the worktree and its commits go):
|
|
233
|
+
skitterspec spec-env down <name> --force
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
**Print the push; never run it.** Publishing abandoned work to a shared
|
|
237
|
+
remote is the same unasked-for act this workflow took out of `/spec-start`,
|
|
238
|
+
and it is no more wanted here — someone may well want this branch to exist
|
|
239
|
+
nowhere but their own machine. Offer the command and wait for an answer.
|
|
240
|
+
|
|
241
|
+
**Never reach for `--force` yourself either.** The engine's own message names
|
|
242
|
+
only that half, which is the whole reason this step exists: meeting a wall
|
|
243
|
+
labelled *--force to tear down anyway* at the exact moment a backup is still
|
|
244
|
+
cheap is how work gets thrown away. Both options, then stop — the choice is
|
|
245
|
+
a decision about someone's work, and it is theirs.
|
|
246
|
+
|
|
247
|
+
If the plan prints a `remote branch — confirm with the user first:` section,
|
|
248
|
+
**ask before running that line** — it is a `git push <remote> --delete`, and
|
|
249
|
+
the branch is merged, so it loses nothing. Usually there is nothing to ask:
|
|
250
|
+
a cancelled spec is normally **unlanded**, and the planner deliberately never
|
|
251
|
+
offers the remote delete then, because the pushed branch is the only surviving
|
|
252
|
+
copy of abandoned work. Seeing no such section here is the expected case, not
|
|
253
|
+
a fault — and if the user wants the remote branch gone anyway, that is their
|
|
254
|
+
call to make explicitly, not something to tidy away on their behalf.
|
|
255
|
+
4. `skitterspec spec-env prune` — reap orphaned test-DB volumes that belong to no
|
|
256
|
+
live spec (leftovers from declined/aborted teardowns or manual worktree
|
|
257
|
+
removal). Show the orphan list and, **only on the user's confirmation**, run
|
|
258
|
+
the printed `docker volume rm` commands. Non-fatal: if it can't run or the user
|
|
259
|
+
declines, report and finish cancelling anyway.
|
|
260
|
+
|
|
261
|
+
If `env.config.json` is absent, skip this entirely — behave exactly as before.
|