@windyroad/itil 0.17.0 → 0.17.1-preview.176
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/package.json
CHANGED
|
@@ -208,7 +208,7 @@ When `$ARGUMENTS` starts with a three-digit ticket ID followed by a status word
|
|
|
208
208
|
|
|
209
209
|
The parser must distinguish a **bare `<NNN>`** (update flow — handled inline by Step 6) from a **`<NNN> <status>` pair** (transition — delegated). The status-word tokens that trigger the transition forwarder are fixed: `known-error`, `verifying`, `close`. Any other suffix after `<NNN>` routes to the inline update flow per Step 6. This preserves the two legitimate shapes the original subcommand carried while splitting the transition intent out cleanly.
|
|
210
210
|
|
|
211
|
-
The forwarder does NOT re-implement the Step 7 transition logic locally — it invokes the Skill tool with `wr-itil:transition-problem` and returns the new skill's output verbatim. Duplicating the pre-flight-checks / P063-external-root-cause-detection / P057-staging-trap / P062-README-refresh stack would harden the deprecation window into a permanent fork.
|
|
211
|
+
The forwarder does NOT re-implement the Step 7 transition logic locally — it invokes the Skill tool with `wr-itil:transition-problem` and returns the new skill's output verbatim. Duplicating the pre-flight-checks / P063-external-root-cause-detection / P057-staging-trap / P062-README-refresh stack would harden the deprecation window into a permanent fork. Per ADR-010 amended "Split-skill execution ownership" (P093), the forwarder is **one-way** — `/wr-itil:transition-problem` hosts its own inline Step 7 block and does NOT re-invoke `/wr-itil:manage-problem`. The in-skill Step 7 block below stays in place for in-skill callers (Step 9b auto-transition, the Parked path, Step 9d closure inside review); the split skill carries a scoped inline copy for the user-initiated transition path only ("copy, not move"). Lifecycle completeness (known-error + verifying + close) is covered per ADR-022's three-status mandate.
|
|
212
212
|
|
|
213
213
|
### 2. For new problems: Check for duplicates FIRST
|
|
214
214
|
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wr-itil:transition-problem
|
|
3
|
-
description: Advance a problem ticket's lifecycle status — Open → Known Error, Known Error → Verification Pending (verifying), Verification Pending → Closed. Renames the ticket file, updates the Status field, and refreshes docs/problems/README.md in the same commit.
|
|
3
|
+
description: Advance a problem ticket's lifecycle status — Open → Known Error, Known Error → Verification Pending (verifying), Verification Pending → Closed. Renames the ticket file, updates the Status field, and refreshes docs/problems/README.md in the same commit. Hosts the transition execution inline (pre-flight checks, P057 staging-trap handling, P063 external-root-cause detection, P062 README refresh, ADR-014 commit) per ADR-010 amended "Split-skill execution ownership". Use when the user asks to "transition", "close", "mark known-error", or "release" a specific ticket.
|
|
4
4
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, Skill
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Transition Problem — Lifecycle Advance
|
|
8
8
|
|
|
9
|
-
Advance a specific problem ticket along the ITIL lifecycle: Open → Known Error → Verification Pending → Closed. The skill is
|
|
9
|
+
Advance a specific problem ticket along the ITIL lifecycle: Open → Known Error → Verification Pending → Closed. The skill is the **authoritative executor** for the user-initiated transition path — it identifies the ticket and the destination status, then executes the transition inline: pre-flight checks, external-root-cause detection (P063), `git mv` + Status edit with staging re-stage (P057), `## Fix Released` section write for the `verifying` destination, README.md refresh (P062), and ADR-014 commit.
|
|
10
10
|
|
|
11
|
-
This skill is phase 4 of the P071 phased-landing split of `/wr-itil:manage-problem <NNN> <status>` per ADR-010's amended Skill Granularity rule (one skill per distinct user intent).
|
|
11
|
+
This skill is phase 4 of the P071 phased-landing split of `/wr-itil:manage-problem <NNN> <status>` per ADR-010's amended Skill Granularity rule (one skill per distinct user intent). Per ADR-010's "Split-skill execution ownership" rule (P093), the skill does **not** re-invoke `/wr-itil:manage-problem` to run Step 7 (no round-trip); the deprecation-window forwarder on manage-problem routes one-way to this skill and returns its output verbatim. The in-skill Step 7 block on manage-problem remains in place for in-skill callers (Step 9b auto-transition, Parked path, Step 9d closure inside review) — "copy, not move" per ADR-010 amended.
|
|
12
|
+
|
|
13
|
+
The deprecated `/wr-itil:manage-problem <NNN> known-error` subcommand route remains as a one-way forwarder during the deprecation window but is scheduled for removal in `@windyroad/itil`'s next major version.
|
|
12
14
|
|
|
13
15
|
## Arguments
|
|
14
16
|
|
|
@@ -24,14 +26,14 @@ The `<NNN>` and `<status>` tokens are **data parameters**, not word-subcommands.
|
|
|
24
26
|
|
|
25
27
|
**In scope:**
|
|
26
28
|
- Validate that the ticket file exists and the destination status is reachable from the current status (e.g. an `.open.md` file cannot transition directly to Verification Pending — it must go through Known Error first).
|
|
27
|
-
-
|
|
29
|
+
- Execute the transition inline: pre-flight checks, P063 external-root-cause detection (for the Open → Known Error destination), `git mv` to the new suffix, Status field edit, `## Fix Released` section write (for the Known Error → Verification Pending destination), P057 staging re-stage, P062 README.md refresh, ADR-014 commit.
|
|
28
30
|
- Report the outcome (new filename, new Status, commit SHA).
|
|
29
31
|
|
|
30
32
|
**Out of scope:**
|
|
31
|
-
- Re-implementing the Step 7 transition logic inline. Delegation to `/wr-itil:manage-problem` is the anti-fork discipline.
|
|
32
33
|
- Backlog re-ranking — that's `/wr-itil:review-problems`.
|
|
33
34
|
- Ticket creation or bare-update flows — that's `/wr-itil:manage-problem` (no-args form for creation, `<NNN>` bare for update).
|
|
34
35
|
- Parking a ticket — that's a distinct lifecycle move handled by `/wr-itil:manage-problem` directly (the `.parked.md` suffix has its own pre-flight path including P063 external-root-cause detection for `upstream-blocked` reasons).
|
|
36
|
+
- Auto-transitions fired inside `/wr-itil:review-problems` Step 9b (Open → Known Error when root cause + workaround are documented) — those use manage-problem's in-skill Step 7 block per ADR-010 amended "Split-skill execution ownership" ("copy, not move").
|
|
35
37
|
|
|
36
38
|
## Steps
|
|
37
39
|
|
|
@@ -70,53 +72,155 @@ Check the current filename suffix and verify the destination status is reachable
|
|
|
70
72
|
|
|
71
73
|
If the pairing is invalid, emit a clear message naming the current status, the requested destination, and the valid next step. Do not silently skip or auto-correct — invalid transitions are almost always user typos and a clear error is the cheapest recovery.
|
|
72
74
|
|
|
73
|
-
### 4.
|
|
75
|
+
### 4. Run pre-flight checks
|
|
76
|
+
|
|
77
|
+
Destination-specific pre-flight checks gate the transition. If any check fails, report which ones and stop — do not auto-remediate.
|
|
78
|
+
|
|
79
|
+
**Open → Known Error** (`<status>` = `known-error`) requires:
|
|
80
|
+
|
|
81
|
+
- [ ] Root cause is documented in the Root Cause Analysis section (not just "Preliminary Hypothesis")
|
|
82
|
+
- [ ] At least one investigation task is checked off
|
|
83
|
+
- [ ] A reproduction test exists or is referenced
|
|
84
|
+
- [ ] A workaround is documented (even if "feature disabled")
|
|
85
|
+
- [ ] Effort bucket re-rated against the now-documented fix strategy; if the bucket changed since creation, update the Effort / WSJF lines and note the reason (P047 — creation-time estimates drift as scope clarifies)
|
|
86
|
+
|
|
87
|
+
**Known Error → Verification Pending** (`<status>` = `verifying`) requires:
|
|
88
|
+
|
|
89
|
+
- [ ] The fix has been implemented (the transition typically rides with the `fix(<scope>): ... (closes P<NNN>)` commit)
|
|
90
|
+
- [ ] A release marker is available (version, commit SHA, or date) so the `## Fix Released` section can name it
|
|
91
|
+
|
|
92
|
+
**Verification Pending → Closed** (`<status>` = `close`) requires:
|
|
93
|
+
|
|
94
|
+
- [ ] The user has explicitly confirmed the fix works in production (this skill never auto-closes on inference — only on explicit user confirmation or orchestrator-supplied `close` argument)
|
|
95
|
+
|
|
96
|
+
### 5. External-root-cause detection (P063 — Open → Known Error only)
|
|
97
|
+
|
|
98
|
+
Fires on the Open → Known Error transition only. Parking with the `upstream-blocked` reason reuses the same mechanism but is handled by `/wr-itil:manage-problem`'s Step 7 (this skill does not park).
|
|
99
|
+
|
|
100
|
+
**Strict detection tokens** (any of the following within the Root Cause Analysis section counts as a hit):
|
|
101
|
+
|
|
102
|
+
- Literal label words: `upstream`, `third-party`, `external`, `vendor`.
|
|
103
|
+
- Scoped npm package pattern: `@[\w-]+/[\w-]+` (e.g. `@anthropic/claude-code`, `@windyroad/itil`).
|
|
104
|
+
|
|
105
|
+
Bash heuristic:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
if grep -iE '\b(upstream|third-party|external|vendor)\b|@[[:alnum:]_-]+/[[:alnum:]_-]+' "$problem_file"; then
|
|
109
|
+
external_root_cause_detected=1
|
|
110
|
+
fi
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Detection is intentionally **strict** (explicit label or scoped-npm package only) to avoid prompt fatigue (P063 Direction decision). A passing reference to a bare package name (`gh`, `npm`) does NOT trigger the prompt.
|
|
114
|
+
|
|
115
|
+
**Already-noted check** — before firing the prompt, grep the ticket for the stable marker `- **Upstream report pending** —` (written by option 2 / the AFK fallback below) or `- **Reported Upstream:**` / a `## Reported Upstream` section (written by `/wr-itil:report-upstream` Step 7 back-write per ADR-024 Confirmation criterion 3a). If any of those are already present, skip the prompt — the detection has already fired on a prior run.
|
|
116
|
+
|
|
117
|
+
**If the detection fires and nothing has been noted yet**, use `AskUserQuestion`:
|
|
118
|
+
|
|
119
|
+
- `header: "External root cause detected"`
|
|
120
|
+
- `multiSelect: false`
|
|
121
|
+
- Options:
|
|
122
|
+
1. `Invoke /wr-itil:report-upstream now` — halt the transition; the skill runs (it writes the `## Reported Upstream` appendage per ADR-024 Confirmation criterion 3a); the transition resumes afterwards.
|
|
123
|
+
2. `Defer and note in ticket` — append a pending-upstream-report line to the ticket's `## Related` section using the stable marker `- **Upstream report pending** — external dependency identified; invoke /wr-itil:report-upstream when ready`. The marker wording is fixed so subsequent runs (and the work-problems `upstream-blocked` skip path) can detect "already noted" without re-firing.
|
|
124
|
+
3. `Not actually upstream` — proceed without invocation; append the same marker with text `- **Upstream report pending** — false positive; detection misfire` so the prompt does not re-fire on later reviews.
|
|
125
|
+
|
|
126
|
+
**Non-interactive (AFK) branch** (per ADR-013 Rule 6): when `AskUserQuestion` is unavailable (detect via orchestrator markers in the invoking prompt — phrases like "AFK", "work-problems", "batch-work", "ALL_DONE"), default to option 2 — append the pending-upstream-report line with the stable `- **Upstream report pending** —` marker. Do NOT auto-invoke `/wr-itil:report-upstream`; its Step 6 security-path branch is interactive and would halt the orchestrator anyway (per ADR-024 Consequences).
|
|
127
|
+
|
|
128
|
+
### 6. Rename the file, edit content, and re-stage (P057 staging trap)
|
|
129
|
+
|
|
130
|
+
Per destination, run the rename + edit + explicit re-stage sequence. The explicit re-stage after `Edit` is mandatory — without it the content edit leaks into the next commit and the audit trail breaks.
|
|
131
|
+
|
|
132
|
+
> **Staging trap (P057).** `git mv` stages only the rename — it does NOT pick up subsequent `Edit`-tool content changes. After the `Edit` tool modifies the renamed file (Status field, `## Fix Released` section, etc.), re-stage it explicitly: `git add <new>`. Without the explicit re-stage, the transition commit captures the rename-only change and the content edit leaks into the next commit, corrupting the audit trail.
|
|
133
|
+
|
|
134
|
+
**Open → Known Error**:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
git mv docs/problems/<NNN>-<title>.open.md docs/problems/<NNN>-<title>.known-error.md
|
|
138
|
+
# ... use the Edit tool to update the Status field to "Known Error" ...
|
|
139
|
+
git add docs/problems/<NNN>-<title>.known-error.md
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Known Error → Verification Pending** (per ADR-022, on release):
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
git mv docs/problems/<NNN>-<title>.known-error.md docs/problems/<NNN>-<title>.verifying.md
|
|
146
|
+
# ... use the Edit tool to update Status to "Verification Pending" AND add the `## Fix Released` section ...
|
|
147
|
+
git add docs/problems/<NNN>-<title>.verifying.md
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
The `## Fix Released` section contains: release marker (version, commit SHA, or date), one-sentence fix summary, "Awaiting user verification" line, and any exercise evidence from the releasing session. The `.verifying.md` suffix signals to every downstream consumer (work-problems classifier, review step 9d, README rendering) that the remaining work is user-side verification — no file-body scan needed.
|
|
151
|
+
|
|
152
|
+
When this transition is folded into a `fix(<scope>): ... (closes P<NNN>)` commit (the common case), the `git mv` + `Edit` + re-stage + README refresh all join that single commit — never split across commits.
|
|
153
|
+
|
|
154
|
+
**Verification Pending → Closed**:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
git mv docs/problems/<NNN>-<title>.verifying.md docs/problems/<NNN>-<title>.closed.md
|
|
158
|
+
# ... use the Edit tool to update the Status field to "Closed" ...
|
|
159
|
+
git add docs/problems/<NNN>-<title>.closed.md
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### 7. Refresh docs/problems/README.md (P062)
|
|
163
|
+
|
|
164
|
+
Every Step 7 status transition regenerates `docs/problems/README.md` and stages it in the same commit so the dev-work table, Verification Queue, Parked section, and "Last reviewed" line never lag the on-disk ticket inventory. Without this step, README.md accumulates staleness between review invocations.
|
|
165
|
+
|
|
166
|
+
The refresh uses the same rendering rules as `/wr-itil:review-problems` Step 9e (glob `docs/problems/*.open.md` / `*.known-error.md` / `*.verifying.md` / `*.parked.md`; rank open/known-error by WSJF; list verifyings in the Verification Queue ordered by release age; list parkeds in the Parked section) but skips the full re-scoring pass — existing WSJF values on the ticket files are trusted. The refresh is a render, not a re-rank.
|
|
167
|
+
|
|
168
|
+
**Mechanism:**
|
|
169
|
+
|
|
170
|
+
1. After renaming + Editing + `git add`-ing the transitioned ticket file (per the staging-trap rule above), regenerate `docs/problems/README.md` in-place reflecting the new filename set and the transitioned ticket's new Status.
|
|
171
|
+
2. `git add docs/problems/README.md` — stage the refreshed README with the same commit as the transition.
|
|
172
|
+
3. Update the "Last reviewed" line's parenthetical to name the transition (e.g. `P<NNN> <status> — <one-line fix summary>`) so the next session's fast-path check has a human-readable audit marker alongside the git-history staleness test.
|
|
173
|
+
|
|
174
|
+
### 8. Commit per ADR-014
|
|
74
175
|
|
|
75
|
-
|
|
176
|
+
Governance skills commit their own work. Transition commits include the renamed ticket file + any content edits + the refreshed `docs/problems/README.md`.
|
|
76
177
|
|
|
77
|
-
|
|
78
|
-
- **P063 external-root-cause detection** — fires on Open → Known Error (and on the `upstream-blocked` park path). If a strict-token hit appears in the Root Cause Analysis section, the prompt routes the user to `/wr-itil:report-upstream` or defers with a stable marker. The AFK fallback (per ADR-013 Rule 6) appends the deferred-report marker automatically.
|
|
79
|
-
- **Staging trap handling (P057)** — after `git mv` renames the file, the Edit tool writes the Status field and (for the `verifying` destination) the `## Fix Released` section. The re-stage (`git add <new>`) is explicit — without it the content edit leaks into the next commit and the audit trail breaks.
|
|
80
|
-
- **README.md refresh (P062)** — regenerates `docs/problems/README.md` in-place on every transition so the dev-work table, Verification Queue, and Parked section never lag the on-disk ticket inventory. The refresh joins the same commit as the rename + content edit.
|
|
81
|
-
- **Commit per ADR-014** — governance skills commit their own work. Transition commits use the conventions named in the delegated skill's Step 11 block.
|
|
178
|
+
**Commit gate** — satisfy via one of two paths (either produces a bypass marker):
|
|
82
179
|
|
|
83
|
-
**
|
|
180
|
+
- **Primary**: delegate to subagent type `wr-risk-scorer:pipeline` via the Agent tool.
|
|
181
|
+
- **Fallback**: if `wr-risk-scorer:pipeline` is not available in the current tool set (e.g. this skill is running inside a spawned subagent), invoke `/wr-risk-scorer:assess-release` via the Skill tool. Per ADR-015 it wraps the same pipeline subagent and the `PostToolUse:Agent` hook writes an equivalent bypass marker. Do not silently skip the gate because the primary path is unavailable — the fallback exists specifically to close this gap (see P035).
|
|
84
182
|
|
|
85
|
-
|
|
183
|
+
**Commit message conventions**:
|
|
86
184
|
|
|
87
|
-
|
|
185
|
+
- Open → Known Error transition (standalone): `docs(problems): P<NNN> known error — <root cause summary>`
|
|
186
|
+
- Known Error → Verification Pending (folded with fix): `fix(<scope>): <description> (closes P<NNN>)` — per ADR-022, include the rename-to-`.verifying.md` + `## Fix Released` section in the same commit
|
|
187
|
+
- Known Error → Verification Pending (standalone, no fix riding with it): `docs(problems): P<NNN> verification pending — <release marker>`
|
|
188
|
+
- Verification Pending → Closed: `docs(problems): close P<NNN> <title>`
|
|
88
189
|
|
|
89
|
-
|
|
190
|
+
If risk is above appetite and `AskUserQuestion` is available: ask whether to commit anyway, remediate first, or park the work. If `AskUserQuestion` is unavailable (AFK), skip the commit and report the uncommitted state (ADR-013 Rule 6 fail-safe). This applies only to the risk-above-appetite branch, not to the delegation-unavailable case above.
|
|
90
191
|
|
|
91
|
-
###
|
|
192
|
+
### 9. Report the outcome
|
|
92
193
|
|
|
93
|
-
|
|
194
|
+
Report: ticket ID, previous Status, new Status, new filename, commit SHA. If the destination was `verifying`, name the `## Fix Released` section's release marker so the user can correlate with the shipped version.
|
|
94
195
|
|
|
95
|
-
|
|
96
|
-
2. If the destination was `verifying`, name the `## Fix Released` section's release marker in the output so the user can correlate with the shipped version.
|
|
97
|
-
3. **Do NOT re-commit or re-refresh** — the delegated skill already committed the change per ADR-014 and refreshed the README per P062. Re-emitting either would break the single-commit audit trail.
|
|
196
|
+
Release draining is owned by the caller — `/wr-itil:manage-problem` Step 12 (interactive) or the `/wr-itil:work-problems` orchestrator (AFK, Step 6.5 cadence). This skill does not invoke `npm run push:watch` / `release:watch` on its own.
|
|
98
197
|
|
|
99
198
|
## Ownership boundary
|
|
100
199
|
|
|
101
|
-
`transition-problem` owns:
|
|
200
|
+
`transition-problem` owns (for the user-initiated transition path):
|
|
102
201
|
- Argument parsing (`<NNN> <status>`).
|
|
103
202
|
- Ticket-file discovery via `ls docs/problems/<NNN>-*.md`.
|
|
104
203
|
- Destination-reachability validation (Open → Known Error → Verification Pending → Closed, one step at a time).
|
|
105
|
-
-
|
|
204
|
+
- Pre-flight checks for the supplied destination.
|
|
205
|
+
- P063 external-root-cause detection (Open → Known Error only) — including the AFK fallback that appends the stable `- **Upstream report pending** —` marker.
|
|
206
|
+
- `git mv` rename + Status field edit + (for `verifying`) `## Fix Released` section write + explicit P057 re-stage.
|
|
207
|
+
- `docs/problems/README.md` refresh (P062) staged alongside the transition.
|
|
208
|
+
- ADR-014 commit through the risk-scorer commit gate.
|
|
106
209
|
|
|
107
210
|
`transition-problem` does NOT:
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
- Commit — delegated skill commits per ADR-014.
|
|
211
|
+
- Re-invoke `/wr-itil:manage-problem` to run Step 7 — the deprecation-window forwarder on manage-problem is one-way (P093 / ADR-010 amended "Split-skill execution ownership", no round-trip).
|
|
212
|
+
- Re-rank the backlog — that's `/wr-itil:review-problems`.
|
|
213
|
+
- Create tickets or run the bare-`<NNN>` update flow — those stay on `/wr-itil:manage-problem`.
|
|
112
214
|
- Park tickets — the `.parked.md` suffix has its own path on `/wr-itil:manage-problem` (P063 AFK fallback fires there too).
|
|
215
|
+
- Auto-transition inside review — Step 9b's Open → Known Error auto-transition uses manage-problem's in-skill Step 7 block ("copy, not move").
|
|
216
|
+
- Drain the release queue — `push:watch` / `release:watch` are owned by the caller (`/wr-itil:manage-problem` Step 12, or the `/wr-itil:work-problems` orchestrator).
|
|
113
217
|
|
|
114
218
|
## Related
|
|
115
219
|
|
|
116
220
|
- **P071** (`docs/problems/071-argument-based-skill-subcommands-are-not-discoverable.open.md`) — originating ticket. This skill is phase 4 of the P071 phased-landing plan (list-problems was phase 1; review-problems was phase 2; work-problem was phase 3).
|
|
117
221
|
- **ADR-010 amended** (`docs/decisions/010-rename-wr-problem-to-wr-itil.proposed.md` — Skill Granularity section) — canonical skill-split naming + forwarder contract + `deprecated-arguments: true` frontmatter flag.
|
|
118
222
|
- **ADR-013** (`docs/decisions/013-structured-user-interaction-for-governance-decisions.proposed.md`) — Rule 1 for interactive prompts; Rule 6 for the AFK non-interactive branch.
|
|
119
|
-
- **ADR-014** — governance skills commit their own work.
|
|
223
|
+
- **ADR-014** — governance skills commit their own work. This skill owns the per-transition commit (P093 — authoritative executor for the user-initiated path).
|
|
120
224
|
- **ADR-022** — `.verifying.md` suffix on release; Verification Pending is a first-class status distinct from Known Error. Known Error → Verification Pending is the most common transition this skill forwards.
|
|
121
225
|
- **ADR-032** — governance skill invocation patterns. `/wr-itil:work-problems` may delegate transition iterations to this skill during AFK release orchestration.
|
|
122
226
|
- **ADR-037** (`docs/decisions/037-skill-testing-strategy.proposed.md`) — contract-assertion bats pattern applied to this skill.
|
|
@@ -125,7 +229,8 @@ After the delegated `/wr-itil:manage-problem <NNN> <status>` completes:
|
|
|
125
229
|
- **P063** — external-root-cause detection at Open → Known Error and at the `upstream-blocked` park path. The delegated Step 7 block owns the prompt; this skill inherits the AFK fallback without re-implementing.
|
|
126
230
|
- **JTBD-001** (`docs/jtbd/solo-developer/JTBD-001-enforce-governance.proposed.md`) — discoverable surface via `/wr-itil:` autocomplete. Users type `/wr-itil:transition-problem 042 known-error` rather than remembering the `manage-problem <NNN> known-error` subcommand.
|
|
127
231
|
- **JTBD-101** (`docs/jtbd/plugin-developer/JTBD-101-extend-suite.proposed.md`) — one skill per distinct user intent.
|
|
128
|
-
- `packages/itil/skills/manage-problem/SKILL.md` — hosts the
|
|
232
|
+
- `packages/itil/skills/manage-problem/SKILL.md` — hosts the deprecation-window forwarder for the `manage-problem <NNN> <status>` form (one-way to this skill, no round-trip per P093). Also retains its own in-skill Step 7 block for in-skill callers (Step 9b auto-transition, Parked path, Step 9d closure) per ADR-010 amended "Split-skill execution ownership" — copy, not move.
|
|
233
|
+
- **P093** (`docs/problems/093-transition-problem-and-manage-problem-circular-delegation-for-nnn-status-args.*.md`) — the circular-delegation ticket that authorised this skill's absorbing the Step 7 block inline.
|
|
129
234
|
- `packages/itil/skills/review-problems/SKILL.md` — sibling refresh skill; this skill's transitions trigger the same README.md regeneration mechanism P062 codifies.
|
|
130
235
|
- `packages/itil/skills/list-problems/SKILL.md` — sibling read-only display skill; same cache contract.
|
|
131
236
|
- `packages/itil/skills/work-problem/SKILL.md` — sibling selection skill; delegates per-ticket execution (including transitions) through `/wr-itil:manage-problem`.
|
|
@@ -7,27 +7,37 @@
|
|
|
7
7
|
# file, updates the Status field, and refreshes docs/problems/README.md
|
|
8
8
|
# in the same commit per ADR-014 + ADR-022 + P062.
|
|
9
9
|
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
10
|
+
# This skill is the AUTHORITATIVE executor for the user-initiated
|
|
11
|
+
# transition path per P093: it hosts the Step 7 transition block inline
|
|
12
|
+
# (pre-flight checks, P063 external-root-cause detection, git mv + Edit
|
|
13
|
+
# + P057 re-stage, Status field edit, ## Fix Released section write for
|
|
14
|
+
# the verifying destination, P062 README.md refresh, ADR-014 commit).
|
|
15
|
+
# The skill does NOT delegate execution back to /wr-itil:manage-problem;
|
|
16
|
+
# the deprecation-window forwarder on manage-problem routes one-way to
|
|
17
|
+
# this skill and returns its output verbatim (no round-trip).
|
|
18
|
+
#
|
|
19
|
+
# The in-skill Step 7 block on manage-problem remains the authoritative
|
|
20
|
+
# source for in-skill callers (Step 9b auto-transition, the Parked path,
|
|
21
|
+
# Step 9d closure inside review). Per ADR-010 amended "Split-skill
|
|
22
|
+
# execution ownership": copy, not move — the user-initiated transition
|
|
23
|
+
# path owned by this skill carries an inline scoped copy of the
|
|
24
|
+
# mechanic; the host skill's in-house callers keep their inline copy.
|
|
17
25
|
#
|
|
18
26
|
# Structural assertion — Permitted Exception to the source-grep ban
|
|
19
27
|
# (ADR-005 / P011 / ADR-037 contract-assertion pattern).
|
|
20
28
|
#
|
|
21
29
|
# @problem P071
|
|
22
|
-
# @
|
|
23
|
-
# @jtbd JTBD-
|
|
30
|
+
# @problem P093
|
|
31
|
+
# @jtbd JTBD-001 (enforce governance without slowing down — discoverable surface + terminating contract)
|
|
32
|
+
# @jtbd JTBD-101 (extend the suite with clear patterns — one skill per distinct user intent, split skills own execution)
|
|
24
33
|
#
|
|
25
34
|
# Cross-reference:
|
|
26
35
|
# P071: docs/problems/071-argument-based-skill-subcommands-are-not-discoverable.open.md
|
|
27
|
-
#
|
|
36
|
+
# P093: docs/problems/093-transition-problem-and-manage-problem-circular-delegation-for-nnn-status-args.*.md
|
|
37
|
+
# ADR-010 amended (Skill Granularity section) — split naming + forwarder contract + split-skill execution ownership
|
|
28
38
|
# ADR-013 Rule 1 — structured user interaction (tie-break selection, if any)
|
|
29
39
|
# ADR-013 Rule 6 — AFK non-interactive fallback
|
|
30
|
-
# ADR-014 — governance skills commit their own work (
|
|
40
|
+
# ADR-014 — governance skills commit their own work (this skill owns the transition commit)
|
|
31
41
|
# ADR-022 — .verifying.md suffix on release; Verification Pending distinct from Known Error
|
|
32
42
|
# ADR-037 — contract-assertion bats pattern
|
|
33
43
|
# P057 — git mv + Edit staging trap
|
|
@@ -67,11 +77,14 @@ setup() {
|
|
|
67
77
|
[ "$status" -eq 0 ]
|
|
68
78
|
}
|
|
69
79
|
|
|
70
|
-
@test "SKILL.md frontmatter allowed-tools includes Skill (
|
|
71
|
-
#
|
|
72
|
-
# /wr-itil:manage-problem
|
|
73
|
-
#
|
|
74
|
-
#
|
|
80
|
+
@test "SKILL.md frontmatter allowed-tools includes Skill (retained for orchestrator composition)" {
|
|
81
|
+
# Although this skill no longer delegates Step 7 execution to
|
|
82
|
+
# /wr-itil:manage-problem (P093 fix — inline execution), the Skill
|
|
83
|
+
# tool remains in allowed-tools so the skill can be invoked from
|
|
84
|
+
# orchestrators (e.g. /wr-itil:work-problems) and so it can invoke
|
|
85
|
+
# /wr-itil:report-upstream when P063 external-root-cause detection
|
|
86
|
+
# fires option 1. Dropping Skill from allowed-tools would break both
|
|
87
|
+
# composition paths.
|
|
75
88
|
run grep -nE "^allowed-tools:.*Skill" "$SKILL_FILE"
|
|
76
89
|
[ "$status" -eq 0 ]
|
|
77
90
|
}
|
|
@@ -97,15 +110,45 @@ setup() {
|
|
|
97
110
|
[ "$status" -eq 0 ]
|
|
98
111
|
}
|
|
99
112
|
|
|
100
|
-
@test "SKILL.md
|
|
101
|
-
#
|
|
102
|
-
#
|
|
103
|
-
#
|
|
104
|
-
#
|
|
105
|
-
#
|
|
106
|
-
|
|
113
|
+
@test "SKILL.md hosts the transition execution inline (P093 — no round-trip to manage-problem)" {
|
|
114
|
+
# P093 inversion: the split skill owns BOTH intent selection AND
|
|
115
|
+
# execution. The pre-flight / P063 external-root-cause detection /
|
|
116
|
+
# staging-trap / README refresh stack is hosted inline here so a
|
|
117
|
+
# contract-literal agent invoking /wr-itil:transition-problem NNN
|
|
118
|
+
# <status> reaches a terminal state — no recursion into
|
|
119
|
+
# /wr-itil:manage-problem.
|
|
120
|
+
#
|
|
121
|
+
# "No round-trip" scope: the SKILL.md body MUST NOT contain a
|
|
122
|
+
# delegation-imperative instruction that routes Step 7 execution back
|
|
123
|
+
# to /wr-itil:manage-problem. Citations to manage-problem in the
|
|
124
|
+
# Related section or as a sibling skill reference are permitted —
|
|
125
|
+
# this assertion targets delegation-imperative language only.
|
|
126
|
+
#
|
|
127
|
+
# Per ADR-010 amended "Split-skill execution ownership": copy, not
|
|
128
|
+
# move. The Step 7 block on manage-problem stays in place for
|
|
129
|
+
# in-skill callers (Step 9b auto-transition, Parked path, Step 9d
|
|
130
|
+
# closure inside review). This skill carries a scoped inline copy for
|
|
131
|
+
# the user-initiated transition path only.
|
|
132
|
+
run grep -inE "delegate.{0,40}(to |/)?/?wr-itil:manage-problem|Skill tool.{0,40}manage-problem|manage-problem.{0,40}(via|through)? ?the Skill tool" "$SKILL_FILE"
|
|
133
|
+
[ "$status" -ne 0 ]
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@test "SKILL.md documents the inline Step 7 execution mechanics (P093 — authoritative executor)" {
|
|
137
|
+
# Positive assertion: the skill must describe the full Step 7
|
|
138
|
+
# mechanic so a contract-literal agent has enough information to
|
|
139
|
+
# execute the transition without reading manage-problem's SKILL.md.
|
|
140
|
+
# Each mechanic is represented by at least one identifying phrase;
|
|
141
|
+
# missing any of them would leave a gap the execution path can fall
|
|
142
|
+
# through.
|
|
143
|
+
run grep -inE "pre-flight|pre.flight" "$SKILL_FILE"
|
|
144
|
+
[ "$status" -eq 0 ]
|
|
145
|
+
run grep -inE "git mv" "$SKILL_FILE"
|
|
146
|
+
[ "$status" -eq 0 ]
|
|
147
|
+
run grep -inE "git add" "$SKILL_FILE"
|
|
148
|
+
[ "$status" -eq 0 ]
|
|
149
|
+
run grep -inE "Fix Released" "$SKILL_FILE"
|
|
107
150
|
[ "$status" -eq 0 ]
|
|
108
|
-
run grep -inE "
|
|
151
|
+
run grep -inE "git commit|commit per ADR-014" "$SKILL_FILE"
|
|
109
152
|
[ "$status" -eq 0 ]
|
|
110
153
|
}
|
|
111
154
|
|