@skitterbyte/skitterspec-azure-boards 2.1.0 → 2.3.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 +42 -0
- package/assets/core/azure-boards.config.md +2 -1
- package/assets/rules/spec-planning.md +91 -13
- package/assets/skills/spec/SKILL.md +70 -18
- package/assets/skills/spec-bug/SKILL.md +36 -0
- package/assets/skills/spec-complete/SKILL.md +39 -0
- package/assets/skills/spec-hotfix/SKILL.md +25 -0
- package/assets/skills/spec-incident/SKILL.md +164 -0
- package/assets/skills/spec-init/SKILL.md +2 -1
- package/package.json +1 -1
- package/src/cli.js +1 -1
- package/src/env/resolve.js +5 -4
- package/src/vendor/azure-boards/api.js +32 -2
- package/src/vendor/azure-boards/cli-sync.js +220 -33
- package/src/vendor/azure-boards/config.js +4 -2
- package/src/vendor/provider-kit/src/config.js +44 -0
- package/src/vendor/sync-core/index.js +4 -1
- package/src/vendor/sync-core/src/normalize.js +111 -18
package/MIGRATION.md
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# Migration guide
|
|
2
2
|
|
|
3
|
+
## `issue` and `incident` spec kinds, per-type states, incident log (additive — nothing breaks)
|
|
4
|
+
|
|
5
|
+
Specs can now be **issues** (`issue-` prefix — non-code work done as recorded
|
|
6
|
+
manual steps) and **incidents** (`incident-` prefix, captured live by the new
|
|
7
|
+
`/spec-incident` skill; `/spec-complete` ends one by writing `incident-log.md`
|
|
8
|
+
and posting it onto the tracker item as a comment, via the new
|
|
9
|
+
`spec-sync comment <spec> --file <f>` verb). A lifecycle bucket can map to a
|
|
10
|
+
different state per work item type (`statesByType` on Azure Boards and Jira)
|
|
11
|
+
or per spec kind (`statesByKind` on GitHub and Linear), both top-level beside
|
|
12
|
+
`states`, with `null` meaning "send no state" — and the pre-write check now
|
|
13
|
+
validates each type's effective states against **that type's own** list, so a
|
|
14
|
+
state only one type lacks refuses before anything is written. On Azure and
|
|
15
|
+
Jira, `spec-sync states --json` now prints a per-type map
|
|
16
|
+
(`{ "<type>": [names] }`); a flat array from an older file is still accepted
|
|
17
|
+
and checked as the union. A fix spec can carry
|
|
18
|
+
`> **Incident:** incident-<name>` (linked as related on push) and
|
|
19
|
+
`> **Severity:**` (`1 - Critical` … `4 - Low`). Configs without any of the new
|
|
20
|
+
keys behave exactly as before, and `skitterspec update` ships the new skill
|
|
21
|
+
and rules.
|
|
22
|
+
|
|
23
|
+
Consumer config, by provider:
|
|
24
|
+
|
|
25
|
+
- **Azure Boards** —
|
|
26
|
+
`azure.workItemTypeByKind: { "issue": "Issue", "incident": "Incident" }`,
|
|
27
|
+
plus
|
|
28
|
+
`statesByType: { "Issue": { "complete": "Closed" }, "Incident": { "backlog": null, "complete": "Closed" } }`.
|
|
29
|
+
Severity writes the built-in `Microsoft.VSTS.Common.Severity` — nothing to
|
|
30
|
+
configure; a type without the field skips it with a note. The incident link
|
|
31
|
+
is `System.LinkTypes.Related`.
|
|
32
|
+
- **GitHub** — `github.labelsByKind` accepts the new kinds;
|
|
33
|
+
`statesByKind: { "issue": { "complete": "Done" } }` routes a kind's board
|
|
34
|
+
Status (`null` sends none); `github.severityLabels: { "2": "sev-high" }`
|
|
35
|
+
maps the header's leading digit to a label. The incident rides in the
|
|
36
|
+
generated body as a `Related incident: #N` line.
|
|
37
|
+
- **Jira** — `jira.issueTypeByKind` accepts the new kinds; `statesByType`
|
|
38
|
+
keys by issue type; `jira.severityField` names the field to write (e.g.
|
|
39
|
+
`customfield_10900`). The incident link is a `Relates` issue link, added
|
|
40
|
+
once.
|
|
41
|
+
- **Linear** — `linear.labelsByKind` accepts the new kinds; `statesByKind`
|
|
42
|
+
keys by spec kind; `linear.severityLabels` maps digits to team labels. The
|
|
43
|
+
incident link is a related-issue relation.
|
|
44
|
+
|
|
3
45
|
## The `chore` spec kind, and per-type bodies (additive — nothing breaks)
|
|
4
46
|
|
|
5
47
|
Specs can now be **chores** (`chore-` prefix, `> **Type:** Chore`) and every
|
|
@@ -9,13 +9,14 @@ env-var NAMES — never a credential. Credentials live in the user-level store
|
|
|
9
9
|
| `azure.orgUrl` | The organization (`https://dev.azure.com/<org>`). Also keys the credentials-store entry. | `""` |
|
|
10
10
|
| `azure.project` | The project spec work items land in. | `""` |
|
|
11
11
|
| `azure.workItemType` | The work item type a spec mints as. Types are process-defined (Basic: `Issue`; Agile: `User Story`; custom anything), so this is config, not a constant. | `"Issue"` |
|
|
12
|
-
| `azure.workItemTypeByKind` | The mint type per spec kind — `feature`, `bug`, `hotfix`, `chore`, read off the spec folder's prefix — falling back to `azure.workItemType`. In Agile/Scrum/CMMI a bug is a type, so `{ "bug": "Bug", "hotfix": "Bug" }` keeps `/spec-bug` and `/spec-hotfix` out of the story backlog. `chore` wants a custom inherited type — create `Chore` and its states in your process **before** mapping it — so tooling work stays off the customer-facing release ladder. Each named type's states are validated like the base pair's. | `{}` |
|
|
12
|
+
| `azure.workItemTypeByKind` | The mint type per spec kind — `feature`, `bug`, `hotfix`, `chore`, `issue`, `incident`, read off the spec folder's prefix — falling back to `azure.workItemType`. In Agile/Scrum/CMMI a bug is a type, so `{ "bug": "Bug", "hotfix": "Bug" }` keeps `/spec-bug` and `/spec-hotfix` out of the story backlog. `chore` wants a custom inherited type — create `Chore` and its states in your process **before** mapping it — so tooling work stays off the customer-facing release ladder. Each named type's states are validated like the base pair's. | `{}` |
|
|
13
13
|
| `azure.bodyFieldByType` | The field a TYPE's body is written to and read from, keyed by work item type name — `{ "Bug": "Microsoft.VSTS.TCM.ReproSteps" }` on Agile/Scrum/CMMI, whose Bug form does not show `System.Description`. Unmapped types keep `System.Description`. The mapping is symmetric — create, update, read-back and the edited-in-Boards hash compare all use it — so a push then an immediate `/spec-status` round-trips clean. Items minted before the mapping read their `System.Description` until the next push rewrites them. `doctor --check-remote` verifies each mapped type exists and carries its field. | `{}` |
|
|
14
14
|
| `azure.childType` | The type a phase mints as, linked parent/child under the spec's item. | `"Task"` |
|
|
15
15
|
| `azure.areaPath` | Optional area path for minted items; empty means the project default. | `""` |
|
|
16
16
|
| `azure.backlogOrderField` | The field `spec-sync list --next` ranks the backlog by, ascending. StackRank is what Basic, Agile and CMMI backlogs drag-order; a Scrum process uses `Microsoft.VSTS.Common.BacklogPriority`. | `Microsoft.VSTS.Common.StackRank` |
|
|
17
17
|
| `mapping.specFolder` / `mapping.phases` / `mapping.tasks` | Spec → work item, phase → child item, tasks → markdown checklist. Same modes as the other providers (`subissue` \| `deferred` \| `inline`; `checklist` \| `none`). | `issue` / `subissue` / `checklist` |
|
|
18
18
|
| `states.<bucket>` | The Boards STATE name for each lifecycle bucket, per the project's own process. Moves are direct `System.State` writes; a state the process refuses is a named refusal listing the states the type has. `cancelled` defaults to `Done` because the Basic process carries no Cancelled state. | see example |
|
|
19
|
+
| `statesByType.<type>.<bucket>` | Per-TYPE override laid over `states` — `{ "Issue": { "complete": "Closed" }, "Incident": { "backlog": null, "complete": "Closed" } }`. A bucket set to `null` sends no state; a bucket the entry lacks falls through. Validation checks each configured type's effective states against that type's own list, before the first write. | `{}` |
|
|
19
20
|
| `intake.tag` / `intake.bugTags` / `intake.hotfixTags` | Intake routes an adopted work item by its tags (Boards has tags, not labels): the inbox filter, and the routes to `/spec-bug` and `/spec-hotfix`. Empty lists route nothing. | `""` / `["bug"]` / `[]` |
|
|
20
21
|
| `intake.bugTypes` / `intake.hotfixTypes` | The same routes, keyed on the item's work item TYPE — in Agile/Scrum/CMMI a bug is a type, not a tag, so an untagged `Bug` still reaches `/spec-bug`. A match on either axis routes, hotfix wins over bug, and an explicit `[]` opts type routing out. | `["Bug"]` / `[]` |
|
|
21
22
|
| `auth.tokenEnv` | The env-var NAME for the PAT — the official CLI's by default, so a machine set up for `az boards` needs nothing new. Work Items (Read & Write) covers everything but identity search, which wants Identity (Read). | `AZURE_DEVOPS_EXT_PAT` |
|
|
@@ -7,9 +7,10 @@ and lifecycle stay consistent. Each sets a status on the spec header
|
|
|
7
7
|
|
|
8
8
|
| Skill | Purpose | Status | Folder |
|
|
9
9
|
|-------|---------|--------|--------|
|
|
10
|
-
| `/spec` | (Feature/Chore) Grill to a clear shared understanding, propose the kind, write a groomed spec in its own worktree, then land it on the verdict | `Ready` (or `Draft`) | `specs/backlog/` (on the base branch, by a fast-forward) |
|
|
10
|
+
| `/spec` | (Feature/Chore/Issue) Grill to a clear shared understanding, propose the kind, write a groomed spec in its own worktree, then land it on the verdict | `Ready` (or `Draft`) | `specs/backlog/` (on the base branch, by a fast-forward) |
|
|
11
11
|
| `/spec-bug` | (Bug) Reproduce with a failing test, capture spec, drive red→green | `In Progress` | `specs/in-progress/` |
|
|
12
12
|
| `/spec-hotfix` | (Hotfix) Fork a worktree from a release tag, red→green, land by tag + cherry-pick | `In Progress` | `specs/in-progress/` |
|
|
13
|
+
| `/spec-incident` | (Incident) Capture a live outage as a record written during it — grill, write in flight, fixes as separate linked specs | `In Progress` | `specs/in-progress/` |
|
|
13
14
|
| `/no-spec` | Work that genuinely has no spec — its own branch, worktree, page and land. Writes no spec and moves nothing through the lifecycle | `—` | (none) |
|
|
14
15
|
| `/spec-review` | Re-validate a spec against the codebase; refresh stale parts | `—` | (unchanged) |
|
|
15
16
|
| `/spec-start` | Put a spec in flight — provision its branch, then build phase 1 | `In Progress` | `specs/in-progress/` |
|
|
@@ -587,26 +588,34 @@ none of them describes.
|
|
|
587
588
|
- **Other rules specs must honour:** link the relevant `.claude/rules/*.md`
|
|
588
589
|
(architecture, code style, testing, database, etc.) rather than restating them.
|
|
589
590
|
|
|
590
|
-
## Spec types — Feature, Chore, Bug, Hotfix
|
|
591
|
+
## Spec types — Feature, Chore, Issue, Bug, Hotfix, Incident
|
|
591
592
|
|
|
592
|
-
Every spec is one of
|
|
593
|
+
Every spec is one of six types, recorded **both** in the header and the filename:
|
|
593
594
|
|
|
594
595
|
- **Header field:** `> **Type:** Feature`, `> **Type:** Chore`,
|
|
595
|
-
`> **Type:** Bug`,
|
|
596
|
+
`> **Type:** Issue`, `> **Type:** Bug`, `> **Type:** Hotfix`, or
|
|
597
|
+
`> **Type:** Incident` (authoritative, greppable:
|
|
596
598
|
`grep -rl 'Type:.*Hotfix' specs/`).
|
|
597
599
|
- **Filename prefix:** `feat-<name>` for features, `chore-<name>` for chores,
|
|
598
|
-
`bug-<name>` for bugs, `hotfix-<name>` for
|
|
600
|
+
`issue-<name>` for issues, `bug-<name>` for bugs, `hotfix-<name>` for
|
|
601
|
+
hotfixes, `incident-<name>` for incidents (visible in listings;
|
|
599
602
|
glob-safe — never use `[BUG]`/`[FEATURE]` brackets).
|
|
600
603
|
|
|
601
|
-
A **Chore** is work no end user sees — tooling, CI, dependency bumps,
|
|
602
|
-
refactors.
|
|
603
|
-
|
|
604
|
-
|
|
604
|
+
A **Chore** is code work no end user sees — tooling, CI, dependency bumps,
|
|
605
|
+
internal refactors. An **Issue** is work with **no code change at all** —
|
|
606
|
+
in-app configuration, a data fix, a support task — written as a spec of manual
|
|
607
|
+
steps so there is a record and a history; everything user-facing that changes
|
|
608
|
+
code is a feature. There is no
|
|
609
|
+
separate entry skill for either — `/spec` **proposes** feature, chore or issue
|
|
610
|
+
from what the
|
|
605
611
|
grilling defined, with a one-line reason, and the user confirms. A chore
|
|
606
612
|
defaults its `Gating:` to `none: not user-facing` (where gating is configured),
|
|
607
613
|
and its commits default to `chore`/`refactor`/`ci` types with **no**
|
|
608
614
|
`Release-Note:` footer — a chore is by definition not user-visible, so it has
|
|
609
|
-
no release note to write.
|
|
615
|
+
no release note to write. An issue defaults its `Gating:` to `none: no code`
|
|
616
|
+
and its commits to `docs` with no `Release-Note:`, and it closes when the spec
|
|
617
|
+
completes — nothing is released. Feature specs keep `feat`; bug specs keep
|
|
618
|
+
`fix`.
|
|
610
619
|
Where a ticketing provider maps kinds to tracker types (e.g. Azure's
|
|
611
620
|
`workItemTypeByKind`), the chore mapping is what keeps tooling work off the
|
|
612
621
|
customer-facing release ladder.
|
|
@@ -616,14 +625,75 @@ carries an extra `> **Base version:** <tag>` header, forks its worktree from tha
|
|
|
616
625
|
tag, and lands by tagging a new patch + cherry-picking onto `main` (never a
|
|
617
626
|
fast-forward merge). `/spec-live` refuses a hotfix — test it with `/spec-connect`.
|
|
618
627
|
|
|
619
|
-
|
|
628
|
+
An **Incident** is an outage or degradation of a live service, captured by
|
|
629
|
+
**`/spec-incident`** during the outage, so it starts straight in
|
|
630
|
+
`specs/in-progress/`. It is a record, not delivery work: its fixes are
|
|
631
|
+
separate hotfix, bug, chore or issue specs, each carrying
|
|
632
|
+
`> **Incident:** incident-<name>` so the push links them, and they are never
|
|
633
|
+
its phases. It carries `> **Severity:**` (Azure's literal values,
|
|
634
|
+
`1 - Critical` … `4 - Low`) and a `## Timeline` appended to as the incident
|
|
635
|
+
unfolds; `/spec-complete` writes `incident-log.md` from it and pushes the log
|
|
636
|
+
onto the tracker item as a comment.
|
|
637
|
+
|
|
638
|
+
### Kind routing — any door, the right spec
|
|
639
|
+
|
|
640
|
+
`/spec` is the default door, so the kind of work someone describes does not
|
|
641
|
+
always match the skill they typed — especially for someone new, for whom
|
|
642
|
+
"spec it" is the reflex. Every entry skill therefore
|
|
643
|
+
**watches its grill for the signals that mark the other kinds**, and proposes a
|
|
644
|
+
hand-off the moment one appears — never at the end of a grill already shaping
|
|
645
|
+
the wrong spec:
|
|
646
|
+
|
|
647
|
+
| In | Watches for | Hands to |
|
|
648
|
+
|----|-------------|----------|
|
|
649
|
+
| `/spec` | defect · defect on a released version · live outage | `/spec-bug` · `/spec-hotfix` · `/spec-incident` |
|
|
650
|
+
| `/spec-bug` | on a released version · live outage · not a defect | `/spec-hotfix` · `/spec-incident` · `/spec` |
|
|
651
|
+
| `/spec-hotfix` | live outage · not on a released version · not a defect | `/spec-incident` · `/spec-bug` · `/spec` |
|
|
652
|
+
| `/spec-incident` | no live outage to record | defect → `/spec-bug` (on a released version → `/spec-hotfix`), else `/spec` |
|
|
653
|
+
|
|
654
|
+
Feature, chore and issue all route to `/spec` — one door for the three kinds it
|
|
655
|
+
writes, where its kind proposal picks between them. Example signals, weighed in
|
|
656
|
+
context rather than matched as keywords: a **defect** is behaviour differing
|
|
657
|
+
from intended — "it's broken", a failing flow, a stack trace of a failure;
|
|
658
|
+
**on a released version** is that defect where what is deployed is named — "in
|
|
659
|
+
prod", "since v2.1"; a **live outage** is a service down or degraded
|
|
660
|
+
**right now**, users affected as we speak; **not a defect** is an ask for new or
|
|
661
|
+
changed behaviour rather than for restoring intended behaviour.
|
|
662
|
+
|
|
663
|
+
Three rules, the same in every skill:
|
|
664
|
+
|
|
665
|
+
- **Always confirm; never silently switch.** Name the signal in the user's own
|
|
666
|
+
words and propose the destination with a one-line reason; the user confirms
|
|
667
|
+
or declines. A decline ends the matter — the grill carries on where it was,
|
|
668
|
+
and the same signal is not raised again. A signal is a question, never a
|
|
669
|
+
verdict: a pasted stack trace in "handle this error nicely" is a feature
|
|
670
|
+
request, not a bug report.
|
|
671
|
+
- **Precedence: incident > hotfix > bug.** One description can carry several
|
|
672
|
+
signals; propose the most specific destination — the same reasoning the
|
|
673
|
+
intake label routing documents for hotfix-over-bug.
|
|
674
|
+
- **Hand off in-session, carrying the context.** On a confirmed switch the
|
|
675
|
+
current skill invokes the destination skill directly and seeds it with
|
|
676
|
+
everything the grilling has already established — symptom, version, impact,
|
|
677
|
+
repro material, decisions so far — so the destination grills only what it
|
|
678
|
+
still needs ("seed, don't skip, the grill", the principle issue adoption
|
|
679
|
+
already uses). Stop-and-retype is the **label** routing's shape, and right
|
|
680
|
+
there because it fires before any grilling; mid-grill it would throw away
|
|
681
|
+
the answers already given.
|
|
682
|
+
|
|
683
|
+
This is judgment, not configuration: the signals are examples, there is no
|
|
684
|
+
list to maintain, and nothing here reads a label. A ticketing provider's
|
|
685
|
+
intake label routing (`intake.bugLabels` / `intake.hotfixLabels`) is a
|
|
686
|
+
separate, earlier check and is unchanged by this.
|
|
687
|
+
|
|
688
|
+
All six types share the same lifecycle folders below — type is orthogonal to
|
|
620
689
|
status.
|
|
621
690
|
|
|
622
691
|
## Header fields & State log (audit trail)
|
|
623
692
|
|
|
624
693
|
Every spec header carries:
|
|
625
694
|
|
|
626
|
-
- `> **Name:**` — the spec's folder name
|
|
695
|
+
- `> **Name:**` — the spec's folder name
|
|
696
|
+
(`feat-`/`chore-`/`issue-`/`bug-`/`hotfix-`/`incident-<kebab-name>`).
|
|
627
697
|
It's the handle you pass to `/spec-start` and the other lifecycle skills, surfaced
|
|
628
698
|
in the header so it's copy-pasteable without digging for the folder name.
|
|
629
699
|
- `> **Author:**` — who created the spec (set at `/spec` / `/spec-bug`, defaults
|
|
@@ -634,6 +704,14 @@ Every spec header carries:
|
|
|
634
704
|
**only when `specs/.core/gating.config.json` exists**: a flag name, or
|
|
635
705
|
`none: <one-line reason>`. Absent entirely in a project that has not adopted
|
|
636
706
|
gating.
|
|
707
|
+
- `> **Severity:**` — on bug, hotfix and incident specs, optional except where
|
|
708
|
+
`/spec-incident` grills it: Azure's literal values
|
|
709
|
+
(`1 - Critical` … `4 - Low`). The push writes it where the provider has a
|
|
710
|
+
home for it; absent, nothing is sent.
|
|
711
|
+
- `> **Incident:**` — on a spec that is a **fix** for an open incident:
|
|
712
|
+
`incident-<name>`. The push links the two as related on the tracker
|
|
713
|
+
(one-way; the repo owns the link), and `/spec-complete` on the incident
|
|
714
|
+
counts the spec among its fixes. Absent on everything else.
|
|
637
715
|
|
|
638
716
|
Every spec also has a **State log** table — the audit trail of folder/status
|
|
639
717
|
transitions. Each lifecycle skill appends exactly one row when it changes state:
|
|
@@ -668,7 +746,7 @@ When asked for a plan, implementation strategy, or feature breakdown:
|
|
|
668
746
|
|
|
669
747
|
```
|
|
670
748
|
specs/backlog/ Ready (or Draft) specs (/spec)
|
|
671
|
-
specs/in-progress/ under active implementation (/spec-start, /spec-bug)
|
|
749
|
+
specs/in-progress/ under active implementation (/spec-start, /spec-bug, /spec-incident)
|
|
672
750
|
specs/complete/ finished (/spec-complete)
|
|
673
751
|
specs/cancelled/ abandoned, with a reason on the header (/spec-cancel)
|
|
674
752
|
specs/.core/ project rules — ALWAYS APPLY, never moved
|
|
@@ -198,31 +198,78 @@ not write the spec until this is resolved.
|
|
|
198
198
|
Stop grilling when there are no unresolved branches that would change the spec.
|
|
199
199
|
Briefly play back the agreed understanding before writing.
|
|
200
200
|
|
|
201
|
-
###
|
|
202
|
-
|
|
203
|
-
|
|
201
|
+
### Watch for the other doors — bug, hotfix, incident
|
|
202
|
+
|
|
203
|
+
`/spec` is the default door, so work that belongs to another skill arrives here
|
|
204
|
+
described in the user's own words — no issue, no labels for Phase 0 to route
|
|
205
|
+
on. While grilling, watch for the signals that mark the other kinds and raise
|
|
206
|
+
the hand-off **the moment one appears**, not at the end of the grill: for a
|
|
207
|
+
live outage especially, finishing a feature grill first is actively harmful,
|
|
208
|
+
because `/spec-incident` exists to be written *during* the outage.
|
|
209
|
+
|
|
210
|
+
- **Defect** — behaviour differing from intended ("it's broken", a failing
|
|
211
|
+
flow, a stack trace of a failure) → propose **`/spec-bug`**.
|
|
212
|
+
- **Defect on a released version** — the defect is on what is deployed ("in
|
|
213
|
+
prod", "since v2.1") → propose **`/spec-hotfix`**.
|
|
214
|
+
- **Live outage** — a service down or degraded **right now**, users affected
|
|
215
|
+
as we speak → propose **`/spec-incident`**.
|
|
216
|
+
|
|
217
|
+
**Always confirm; never silently switch.** Name the signal in the user's own
|
|
218
|
+
words, propose the destination with a one-line reason, and let them decide. A
|
|
219
|
+
decline carries the grill on where it was, and the same signal is not raised
|
|
220
|
+
again. A signal is a question, never a verdict: a pasted stack trace in
|
|
221
|
+
"handle this error nicely" is a feature request. When one description carries
|
|
222
|
+
several signals, propose the most specific destination —
|
|
223
|
+
**incident > hotfix > bug**.
|
|
224
|
+
|
|
225
|
+
**On a confirmed switch, hand off in-session and carry the context.** Invoke
|
|
226
|
+
the destination skill directly and seed it with everything the grilling has
|
|
227
|
+
already established — symptom, version, impact, repro material, decisions so
|
|
228
|
+
far — so it grills only what it still needs ("seed, don't skip, the grill",
|
|
229
|
+
exactly as issue adoption does). Do not stop and tell the user to retype: that
|
|
230
|
+
shape belongs to Phase 0's label routing, which fires before any grilling has
|
|
231
|
+
happened and so has nothing to lose. The full routing matrix lives in
|
|
232
|
+
`.claude/rules/spec-planning.md`.
|
|
233
|
+
|
|
234
|
+
### Propose the kind — feature, chore or issue
|
|
235
|
+
|
|
236
|
+
This skill writes three kinds of spec, and
|
|
204
237
|
**you propose which from what the grilling defined, with a one-line reason; the user confirms or overrides.**
|
|
205
238
|
The
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
239
|
+
lines that decide it: a **chore** is code work no end user sees — tooling, CI,
|
|
240
|
+
dependency bumps, internal refactors. An **issue** is work with
|
|
241
|
+
**no code change at all** — in-app configuration, a data fix, a support task —
|
|
242
|
+
written as a spec of manual steps so there is a record and a history.
|
|
243
|
+
Everything user-facing that changes code is a **feature**. So the proposal
|
|
244
|
+
reads like *"no user-visible surface → chore"*, *"no code change, manual
|
|
245
|
+
steps → issue"* or *"adds an endpoint users call → feature"*.
|
|
210
246
|
|
|
211
247
|
The kind is recorded twice, and both follow from the answer: the folder prefix
|
|
212
|
-
(`feat-` / `chore-`) and the `> **Type:**` header
|
|
248
|
+
(`feat-` / `chore-` / `issue-`) and the `> **Type:**` header
|
|
249
|
+
(`Feature` / `Chore` / `Issue`). A chore
|
|
213
250
|
also defaults its `Gating:` to `none: not user-facing` (only when gating is
|
|
214
251
|
configured — offer the default, let the user override it like any other
|
|
215
252
|
answer), and its commits default to `chore`/`refactor`/`ci` types with no
|
|
216
|
-
`Release-Note:` (see `.claude/rules/spec-planning.md`).
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
253
|
+
`Release-Note:` (see `.claude/rules/spec-planning.md`). An issue defaults its
|
|
254
|
+
`Gating:` to `none: no code`, and its commits to `docs` with no
|
|
255
|
+
`Release-Note:` — its phases are manual steps, not code, though `/spec-start`
|
|
256
|
+
still gives it a worktree, because the document needs one and the history is
|
|
257
|
+
the point.
|
|
258
|
+
|
|
259
|
+
There is no `/spec-chore` or `/spec-issue` and none should be added: one entry
|
|
260
|
+
point, one grill, and the kind is an output of understanding the work rather
|
|
261
|
+
than a door the user must pick before describing it. The kinds with their own
|
|
262
|
+
doors — bug, hotfix, and the **incident**, an outage or degradation of a live
|
|
263
|
+
service that needs a different grill and starts mid-flight — are the watch's
|
|
264
|
+
business above: when the grilling uncovers one, hand off to **`/spec-bug`**,
|
|
265
|
+
**`/spec-hotfix`** or **`/spec-incident`** rather than writing it here, and it
|
|
266
|
+
is never too late to propose that — reaching this proposal with the signal
|
|
267
|
+
unraised is a missed watch, not a reason to write the wrong kind.
|
|
221
268
|
|
|
222
269
|
## Phase B — write the spec
|
|
223
270
|
|
|
224
|
-
This skill is for **features and
|
|
225
|
-
(test-first, red→green)
|
|
271
|
+
This skill is for **features, chores and issues**. For bugs, use `/spec-bug`
|
|
272
|
+
(test-first, red→green); for a live outage, `/spec-incident`.
|
|
226
273
|
|
|
227
274
|
### Write it in its own worktree
|
|
228
275
|
|
|
@@ -290,7 +337,8 @@ move to, **warn, don't refuse**, and say the trailer for that commit wants
|
|
|
290
337
|
notes. **Even a single-phase spec gets `01-….md`** — never lump phase tasks
|
|
291
338
|
into `00-overview.md`. This keeps each phase easy to dive into on its own.
|
|
292
339
|
- Choose a short kebab-case name and **prefix it with the kind** — `feat-` for
|
|
293
|
-
a feature, `chore-` for a chore (the bug counterpart
|
|
340
|
+
a feature, `chore-` for a chore, `issue-` for an issue (the bug counterpart
|
|
341
|
+
uses `bug-`, the incident one `incident-`).
|
|
294
342
|
|
|
295
343
|
Use this template (keep it **as concise as possible** — no filler, no restating
|
|
296
344
|
the codebase, link rather than duplicate):
|
|
@@ -298,8 +346,8 @@ the codebase, link rather than duplicate):
|
|
|
298
346
|
```markdown
|
|
299
347
|
# <Feature title>
|
|
300
348
|
|
|
301
|
-
> **Type:** <Feature or
|
|
302
|
-
> **Name:** <feat- or
|
|
349
|
+
> **Type:** <Feature, Chore or Issue — the kind proposed after Phase A>
|
|
350
|
+
> **Name:** <feat-, chore- or issue-><kebab-name> (the spec folder name — the handle you paste into `/spec-start`)
|
|
303
351
|
> **Status:** Ready — not started
|
|
304
352
|
> **Author:** <git user.name — `git config user.name`>
|
|
305
353
|
> **Developer:** —
|
|
@@ -307,6 +355,10 @@ the codebase, link rather than duplicate):
|
|
|
307
355
|
> **Area:** <comma-separated files/modules this touches>
|
|
308
356
|
> **Stack:** <worktree — or "worktree + docker" if it touches the DB/stateful
|
|
309
357
|
> services; only acted on when isolation is enabled — see Phase A item 9>
|
|
358
|
+
> **Incident:** <incident-<name> — only when this spec is a fix for an open
|
|
359
|
+
> incident spec; the next push links the two as related on the tracker, and
|
|
360
|
+
> `/spec-complete` on the incident counts this spec among its fixes. Omit the
|
|
361
|
+
> line entirely otherwise>
|
|
310
362
|
> **Gating:** <flag name — or "none: <one-line reason>". Only when release gating
|
|
311
363
|
> is configured; omit the line entirely otherwise. A chore defaults to
|
|
312
364
|
> "none: not user-facing". An empty value or a bare
|
|
@@ -160,6 +160,38 @@ Bugs are concrete — confirm, don't over-grill. Establish:
|
|
|
160
160
|
against the broken one (the bug usually lives in the differential). Do NOT
|
|
161
161
|
patch a symptom before you understand the cause.
|
|
162
162
|
|
|
163
|
+
### Watch for the other doors — hotfix, incident, or not a bug at all
|
|
164
|
+
|
|
165
|
+
The investigation above is where mis-entry shows, so watch it for the signals
|
|
166
|
+
that mark the other kinds and raise the hand-off the moment one appears —
|
|
167
|
+
before the failing test is written, while nothing is on disk
|
|
168
|
+
(`.claude/rules/spec-planning.md` carries the full routing matrix):
|
|
169
|
+
|
|
170
|
+
- **On a released version** — the defect is on what is deployed ("in prod",
|
|
171
|
+
"since v2.1") → propose **`/spec-hotfix`**. This is the escalation that must
|
|
172
|
+
not be missed: a fix built here lands on `main` and never reaches the
|
|
173
|
+
running version.
|
|
174
|
+
- **Live outage** — a service down or degraded **right now** → propose
|
|
175
|
+
**`/spec-incident`**; the record comes first, and the fix returns as a
|
|
176
|
+
linked spec.
|
|
177
|
+
- **Not a defect** — the ask is new or changed behaviour, not restoring
|
|
178
|
+
intended behaviour → propose **`/spec`**, whose kind proposal picks feature,
|
|
179
|
+
chore or issue from there.
|
|
180
|
+
|
|
181
|
+
**Always confirm; never silently switch** — name the signal in the user's own
|
|
182
|
+
words with a one-line reason, and a decline carries this skill on where it
|
|
183
|
+
was, the same signal not raised again. When several signals appear at once,
|
|
184
|
+
propose the most specific destination — incident over hotfix.
|
|
185
|
+
**On a confirmed switch, hand off in-session and carry the context**: invoke
|
|
186
|
+
the destination skill directly and seed it with what §1 established — symptom,
|
|
187
|
+
repro, root-cause notes, any version named — so it grills only what it still
|
|
188
|
+
needs.
|
|
189
|
+
|
|
190
|
+
**Once the failing test exists, the repro is evidence, not a question to re-litigate**
|
|
191
|
+
— but evidence can still escalate: a red test that also fails at
|
|
192
|
+
the released tag is the hotfix signal with proof attached, and the hand-off
|
|
193
|
+
carries the failing test across.
|
|
194
|
+
|
|
163
195
|
## 2. Isolate the fix in a worktree — when isolation is enabled
|
|
164
196
|
|
|
165
197
|
**Only when per-spec isolation is enabled** (`specs/.core/env.config.json`
|
|
@@ -279,6 +311,10 @@ because work is already underway. Keep it lean:
|
|
|
279
311
|
> **Developer:** <git user.name — you, since you're fixing it now>
|
|
280
312
|
> **Raised:** <YYYY-MM-DD (today)>
|
|
281
313
|
> **Area:** <files/modules>
|
|
314
|
+
> **Severity:** <Azure's literal values, "1 - Critical" … "4 - Low" — optional;
|
|
315
|
+
> the push writes it where the provider has a home for it. Omit otherwise>
|
|
316
|
+
> **Incident:** <incident-<name> — only when this bug is a fix for an open
|
|
317
|
+
> incident spec; the next push links the two as related. Omit otherwise>
|
|
282
318
|
> **Gating:** <flag name — or "none: <one-line reason>". Only when release gating
|
|
283
319
|
> is configured; omit the line entirely otherwise>
|
|
284
320
|
|
|
@@ -42,6 +42,45 @@ Before marking complete, confirm the work is actually finished:
|
|
|
42
42
|
is its own, and step 4 commits that.
|
|
43
43
|
|
|
44
44
|
|
|
45
|
+
### An incident spec — the log, and the open-fix check
|
|
46
|
+
|
|
47
|
+
**Only for `Type: Incident` specs** (folder prefix `incident-`); every other
|
|
48
|
+
kind skips this in silence.
|
|
49
|
+
|
|
50
|
+
1. **Check for open linked fixes.** Grep `specs/backlog/` and
|
|
51
|
+
`specs/in-progress/` for specs carrying `> **Incident:** <this spec's name>`.
|
|
52
|
+
Any hit is a fix still open: **refuse**, naming each one, and offer to
|
|
53
|
+
complete anyway with it listed as outstanding in the log — the operator
|
|
54
|
+
answers; record the choice in the spec's Changelog either way.
|
|
55
|
+
BLIND SPOT, named: a fix spec authored but not yet landed on the base branch
|
|
56
|
+
is invisible to this grep — acceptable, because `/spec`'s committing
|
|
57
|
+
verdicts land authored specs on the base
|
|
58
|
+
(`.claude/rules/negative-checks.md`).
|
|
59
|
+
2. **Write `incident-log.md`** into the spec folder — the stakeholder- and
|
|
60
|
+
support-facing record, built from the spec and its linked fixes:
|
|
61
|
+
summary · severity · timeline (started, detected, mitigated, resolved) ·
|
|
62
|
+
impact (who, what, for how long) · root cause · the fixes (each linked
|
|
63
|
+
spec, its ticket, and the release it shipped in — `spec-sync released`
|
|
64
|
+
answers that where a provider is installed; a fix completed but not yet
|
|
65
|
+
released is listed as such) · what went well and what didn't · follow-ups,
|
|
66
|
+
each offered as a `/spec` on the spot.
|
|
67
|
+
3. **Push the log onto the incident item as a comment** (only when a provider
|
|
68
|
+
is installed and the spec is linked):
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
skitterspec spec-sync comment <spec> --file specs/in-progress/<spec>/incident-log.md
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
A comment, deliberately: the item's description is generated from the spec,
|
|
75
|
+
so a log written there would be clobbered by the next push — comments are
|
|
76
|
+
the one surface one-way sync never touches. The command exits 0 on every
|
|
77
|
+
cannot-tell (unlinked, offline, no credentials) and says so; relay the line
|
|
78
|
+
and finish either way — the log in the repo is the record.
|
|
79
|
+
|
|
80
|
+
Completion then proceeds as normal: the per-type state map decides what the
|
|
81
|
+
tracker is sent (an Incident completes to whatever `statesByType` names for
|
|
82
|
+
it), and steps 3–7 below are unchanged.
|
|
83
|
+
|
|
45
84
|
### Release gating (only when configured)
|
|
46
85
|
|
|
47
86
|
**Only when `specs/.core/gating.config.json` exists.** Run
|
|
@@ -187,6 +187,27 @@ Hotfixes are concrete — confirm, don't over-grill. Establish:
|
|
|
187
187
|
- **Root cause:** read the code **at the base tag** and trace it to `file:line`.
|
|
188
188
|
The fix belongs on the tag's line, so reason about that code, not `main`'s.
|
|
189
189
|
|
|
190
|
+
### Watch for the other doors — incident, bug, or not a defect
|
|
191
|
+
|
|
192
|
+
This is the most specific defect door, so most mis-entries route *down*
|
|
193
|
+
(`.claude/rules/spec-planning.md` carries the full routing matrix):
|
|
194
|
+
|
|
195
|
+
- **Live outage** — the released version is not just wrong but down or
|
|
196
|
+
degraded **right now** → propose **`/spec-incident`**; the record comes
|
|
197
|
+
first, and the fix returns here as a linked hotfix spec.
|
|
198
|
+
- **Not on a released version** — §1 cannot name a deployed tag the defect is
|
|
199
|
+
on (it exists only on `main`, or prod runs something newer that is fine) →
|
|
200
|
+
propose **`/spec-bug`**; a hotfix branch for something `main` can carry is
|
|
201
|
+
waste, not safety.
|
|
202
|
+
- **Not a defect** — the ask is new or changed behaviour, not restoring
|
|
203
|
+
intended behaviour → propose **`/spec`**.
|
|
204
|
+
|
|
205
|
+
**Always confirm; never silently switch** — name the signal in the user's own
|
|
206
|
+
words with a one-line reason; a decline carries this skill on where it was.
|
|
207
|
+
**On a confirmed switch, hand off in-session and carry the context**
|
|
208
|
+
established so far — the symptom, the repro, any version discussion — so the
|
|
209
|
+
destination grills only what it still needs.
|
|
210
|
+
|
|
190
211
|
## 3. Provision the worktree from the tag, then write in it
|
|
191
212
|
|
|
192
213
|
**Provision before you write, not after.** §1 settled the tag and the name and
|
|
@@ -303,6 +324,10 @@ is usually a single-pass fix, so the `## Fix` block can live directly in
|
|
|
303
324
|
> **Base version:** <tag prod is running, e.g. v33.16.4>
|
|
304
325
|
> **Raised:** <YYYY-MM-DD (today)>
|
|
305
326
|
> **Area:** <files/modules>
|
|
327
|
+
> **Severity:** <Azure's literal values, "1 - Critical" … "4 - Low" — optional;
|
|
328
|
+
> the push writes it where the provider has a home for it. Omit otherwise>
|
|
329
|
+
> **Incident:** <incident-<name> — only when this hotfix is a fix for an open
|
|
330
|
+
> incident spec; the next push links the two as related. Omit otherwise>
|
|
306
331
|
> **Gating:** <pre-filled "none: hotfix — restoring released behaviour"; only
|
|
307
332
|
> when release gating is configured, and overridable — see below>
|
|
308
333
|
|