@windyroad/itil 0.5.0-preview.116 → 0.6.0-preview.118

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.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "wr-itil",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "ITIL-aligned IT service management for Claude Code"
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windyroad/itil",
3
- "version": "0.5.0-preview.116",
3
+ "version": "0.6.0-preview.118",
4
4
  "description": "ITIL-aligned IT service management for Claude Code (problem, and future incident/change skills)",
5
5
  "bin": {
6
6
  "windyroad-itil": "./bin/install.mjs"
@@ -210,7 +210,7 @@ linked_id=<extracted from Linked Problem section>
210
210
  linked_file=$(ls docs/problems/${linked_id}-*.md 2>/dev/null | head -1)
211
211
  ```
212
212
 
213
- - If `linked_file` ends with `.known-error.md` or `.closed.md` → close is allowed
213
+ - If `linked_file` ends with `.known-error.md`, `.verifying.md`, or `.closed.md` → close is allowed (per ADR-022: `.verifying.md` means root cause is confirmed AND fix has been released, which satisfies the "Restored → Closed" handoff at least as well as Known Error did under the old contract)
214
214
  - If `linked_file` ends with `.open.md` → close is blocked; report "Linked problem ${linked_id} is still Open. Transition it to Known Error first, or update the Linked Problem reference."
215
215
  - If no linked problem and the file has a **No Problem** section → close is allowed
216
216
 
@@ -21,19 +21,22 @@ When referencing problem IDs, ADR IDs, or JTBD IDs in prose output, always inclu
21
21
  - **Work**: `problem work` — runs a review first, then begins working the highest-WSJF problem
22
22
  - **Review**: `problem review` — re-assess all open problems: update priorities per RISK-POLICY.md, estimate effort, calculate WSJF, and update files
23
23
 
24
- **Closing problems:** Problems are closed ONLY after the user verifies the fix in production — not when the fix is committed or released. The workflow:
25
- 1. When the fix is released: add a `## Fix Released` section to the known-error file (e.g., `Deployed in v0.26.X. Awaiting user verification.`). Keep the file as `.known-error.md`.
26
- 2. When the user explicitly confirms ("it's fixed", "verified", "working"): `git mv` to `.closed.md`, update the Status field, and reference the problem in the commit message (e.g., "Closes P008").
24
+ **Closing problems:** Problems are closed ONLY after the user verifies the fix in production — not when the fix is committed or released. The workflow (per ADR-022):
25
+ 1. When the fix is released: `git mv` the file from `.known-error.md` to `.verifying.md`, update the Status field to "Verification Pending", AND add a `## Fix Released` section (e.g., `Deployed in v0.26.X. Awaiting user verification.`). All three edits land in the same commit per ADR-014.
26
+ 2. When the user explicitly confirms ("it's fixed", "verified", "working"): `git mv` from `.verifying.md` to `.closed.md`, update the Status field to "Closed", and reference the problem in the commit message (e.g., "Closes P008").
27
27
  3. Never assume the fix works — always wait for explicit user confirmation before closing.
28
28
 
29
+ The `.verifying.md` suffix distinguishes "fix released, awaiting user verification" from "root cause confirmed, fix not yet implemented" (the Known Error meaning pre-release). See ADR-022 for rationale.
30
+
29
31
  ## Problem Lifecycle
30
32
 
31
33
  | Status | File suffix | Meaning | Entry criteria |
32
34
  |--------|-----------|---------|----------------|
33
35
  | **Open** | `.open.md` | Reported, under investigation | New problem identified |
34
- | **Known Error** | `.known-error.md` | Root cause confirmed, fix path clear | Root cause documented, reproduction test exists, workaround in place |
36
+ | **Known Error** | `.known-error.md` | Root cause confirmed, fix path clear, **fix NOT yet released** | Root cause documented, reproduction test exists, workaround in place |
37
+ | **Verification Pending** | `.verifying.md` | Fix released, awaiting user verification (ADR-022) | Fix shipped; `## Fix Released` section written; user action remaining |
35
38
  | **Parked** | `.parked.md` | Blocked on upstream or suspended by user decision | Upstream blocker identified, or user explicitly suspends; reason and un-park trigger documented |
36
- | **Closed** | `.closed.md` | Fix verified in production | Fix released AND user explicitly confirms it works |
39
+ | **Closed** | `.closed.md` | Fix verified in production | User explicitly confirms the released fix works |
37
40
 
38
41
  **Parked problems** are excluded from WSJF ranking and work selection. They are listed separately in review output so users can see them without them polluting the backlog. To park a problem:
39
42
  1. `git mv docs/problems/<NNN>-<title>.<current>.md docs/problems/<NNN>-<title>.parked.md`
@@ -42,6 +45,8 @@ When referencing problem IDs, ADR IDs, or JTBD IDs in prose output, always inclu
42
45
 
43
46
  To un-park: `git mv` back to `.open.md` (or `.known-error.md` if root cause is confirmed), update Status, remove `## Parked` section.
44
47
 
48
+ **Verification Pending problems** are also excluded from WSJF ranking — their remaining work is user-side verification, not dev effort. They appear in a dedicated "Verification Queue" section in review output so the user can see what's waiting on them without mixing with dev-work ranking. See step 9c for the queue layout.
49
+
45
50
  **Test-driven resolution:** When root cause is identified, create a failing test that reproduces the problem. Skip/disable the test if a feature-disabling workaround is applied. Re-enable the test when the permanent fix is implemented — the test passing confirms resolution.
46
51
 
47
52
  ## WSJF Prioritisation
@@ -58,6 +63,10 @@ Problems are ranked using Weighted Shortest Job First (WSJF):
58
63
  |--------|-----------|
59
64
  | Known Error | 2.0 |
60
65
  | Open | 1.0 |
66
+ | Verification Pending | 0 (excluded) |
67
+ | Parked | 0 (excluded) |
68
+
69
+ `Verification Pending` and `Parked` tickets are excluded from the main dev-work ranking per ADR-022 (verification) and the Parked policy above. `Verification Pending` remaining work is user-side confirmation, not dev effort, so mixing it into the dev-work queue would distort WSJF. Both are surfaced in dedicated sections (see step 9c) — not in the ranked table.
61
70
 
62
71
  **Effort** (estimated fix size — smaller effort = higher priority):
63
72
 
@@ -251,6 +260,8 @@ Apply the update — this could be:
251
260
 
252
261
  **Open → Known Error** (rename file, update content):
253
262
 
263
+ Known Error means "root cause confirmed, fix path clear, fix NOT yet released" (per ADR-022). Releasing the fix is a separate Known Error → Verification Pending transition — do NOT stay on `.known-error.md` after the fix ships.
264
+
254
265
  Pre-flight checks before allowing transition:
255
266
  - [ ] Root cause is documented (not just "Preliminary Hypothesis")
256
267
  - [ ] At least one investigation task is checked off
@@ -266,7 +277,29 @@ git mv docs/problems/<NNN>-<title>.open.md docs/problems/<NNN>-<title>.known-err
266
277
 
267
278
  Update the "Status" field in the file to "Known Error".
268
279
 
269
- **Closing** requires user verification in production — see "Closing problems" above. When the fix is released, add a `## Fix Released` section but keep as `.known-error.md`. Only close when the user confirms.
280
+ **Known Error Verification Pending** (fix released, per ADR-022):
281
+
282
+ When the fix for a Known Error ships, transition the ticket in a single commit:
283
+
284
+ ```bash
285
+ git mv docs/problems/<NNN>-<title>.known-error.md docs/problems/<NNN>-<title>.verifying.md
286
+ ```
287
+
288
+ Then edit the file:
289
+ - Update the "Status" field to "Verification Pending"
290
+ - Add a `## Fix Released` section with: release marker (version, commit SHA, or date), one-sentence fix summary, "Awaiting user verification" line, and any exercise evidence from the releasing session.
291
+
292
+ Both the `git mv` and the file edits belong in the same commit as the fix implementation per ADR-014 (governance skills commit their own work). 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.
293
+
294
+ **Verification Pending → Closed** (user confirms):
295
+
296
+ Only the user can make this call. When they explicitly confirm the fix works in production:
297
+
298
+ ```bash
299
+ git mv docs/problems/<NNN>-<title>.verifying.md docs/problems/<NNN>-<title>.closed.md
300
+ ```
301
+
302
+ Update the "Status" field to "Closed". Reference the problem ID in the closure commit message (e.g., "Closes P008"). Step 9d's verification prompt is the structured path that fires this transition during `manage-problem review`.
270
303
 
271
304
  ### 8. For list: Show summary
272
305
 
@@ -301,9 +334,9 @@ If the command prints "stale", or `README.md` does not exist in git, run the ful
301
334
 
302
335
  Read `RISK-POLICY.md` to get the current impact levels (1-5), likelihood levels (1-5), risk matrix, and label bands. These are the authoritative definitions — do not use outdated scales.
303
336
 
304
- **Step 9b: For each open/known-error problem (skip `.parked.md` files entirely):**
337
+ **Step 9b: For each open/known-error problem (skip `.parked.md` and `.verifying.md` files entirely):**
305
338
 
306
- Parked problems are excluded from WSJF ranking — do not read, score, or update them in this step. They are shown in a separate section in step 9c.
339
+ Parked problems and Verification Pending problems are excluded from WSJF ranking — do not read, score, or update them in this step. Parked tickets are shown in a dedicated Parked section in step 9c; Verification Pending tickets are shown in a dedicated Verification Queue section in step 9c (ranked by release age, not WSJF — per ADR-022).
307
340
 
308
341
  1. Read the problem file
309
342
  2. Read the codebase context — check if the problem's root cause has been investigated, if there are related fixes in git history, or if the problem is stale
@@ -321,11 +354,16 @@ Parked problems are excluded from WSJF ranking — do not read, score, or update
321
354
 
322
355
  **Step 9c: Present summary and select problem to work**
323
356
 
324
- After reviewing all problems, present a WSJF-ranked table for open/known-error problems:
357
+ After reviewing all problems, present a WSJF-ranked table for open/known-error problems (the main dev-work queue):
325
358
 
326
359
  | WSJF | ID | Title | Severity | Status | Effort | Notes |
327
360
  |------|-----|-------|----------|--------|--------|-------|
328
361
 
362
+ Then present a separate **Verification Queue** section for `.verifying.md` files (per ADR-022 — ranked by release age, oldest first; no WSJF because the multiplier is 0):
363
+
364
+ | ID | Title | Released | Fix summary |
365
+ |----|-------|----------|-------------|
366
+
329
367
  Then present a separate **Parked** section listing `.parked.md` files (no ranking):
330
368
 
331
369
  | ID | Title | Reason | Parked since |
@@ -336,7 +374,7 @@ Highlight:
336
374
  - Problems that were auto-transitioned to known-error
337
375
  - Problems that may be stale (reported > 2 weeks ago with no investigation progress)
338
376
  - Problems that have been fixed but not closed (check git history for fix commits)
339
- - Known errors with a `## Fix Released` section (pending user verification)
377
+ - Verification Pending tickets whose fix has been exercised repeatedly without regression (P048 detection layer — candidate for closure verification)
340
378
 
341
379
  **When the operation is `work` (not just `review`), select the problem to work using `AskUserQuestion`:**
342
380
 
@@ -352,7 +390,7 @@ Highlight:
352
390
 
353
391
  **Step 9d: Check for pending verifications**
354
392
 
355
- For each known-error that has a `## Fix Released` section, use `AskUserQuestion` to ask the user if the fix has been verified in production. The question MUST include a fix summary extracted from the `## Fix Released` section — include the first sentence (or first bullet list) of that section in the question body or as the option description, so the user can answer without reading the full problem file. Do not ask with only the problem ID + title + version. If the user confirms, close the problem (`git mv` to `.closed.md`, update Status). If the user says no or is unsure, leave it as known-error.
393
+ Target `docs/problems/*.verifying.md` via glob — do NOT scan `.known-error.md` bodies for a `## Fix Released` section (per ADR-022, Verification Pending is a first-class status, not a substring marker). For each `.verifying.md` file, use `AskUserQuestion` to ask the user if the fix has been verified in production. The question MUST include a fix summary extracted from the `## Fix Released` section — include the first sentence (or first bullet list) of that section in the question body or as the option description, so the user can answer without reading the full problem file. Do not ask with only the problem ID + title + version. If the user confirms, close the problem (`git mv` from `.verifying.md` to `.closed.md`, update Status). If the user says no or is unsure, leave it as Verification Pending.
356
394
 
357
395
  **Step 9e: Update files and refresh README.md cache**
358
396
 
@@ -371,6 +409,15 @@ Edit each problem file where the priority changed. Then write/overwrite `docs/pr
371
409
  | <score> | P<NNN> | <title> | <severity> | <status> | <effort> |
372
410
  ...
373
411
 
412
+ ## Verification Queue
413
+
414
+ Fix released, awaiting user verification (driven off `docs/problems/*.verifying.md` via glob — per ADR-022). Ranked by release age, oldest first:
415
+
416
+ | ID | Title | Released | Fix summary |
417
+ |----|-------|----------|-------------|
418
+ | P<NNN> | <title> | <release marker> | <one-sentence fix summary> |
419
+ ...
420
+
374
421
  ## Parked
375
422
 
376
423
  | ID | Title | Reason | Parked since |
@@ -417,9 +464,10 @@ Commit the completed work per ADR-014 (governance skills commit their own work):
417
464
  3. `git commit -m "<message>"` using the convention for the operation type:
418
465
  - New problem: `docs(problems): open P<NNN> <title>`
419
466
  - Known Error transition: `docs(problems): P<NNN> known error — <root cause summary>`
467
+ - Verification Pending transition: usually folded into the `fix(<scope>): ... (closes P<NNN>)` commit that ships the fix — the `git mv` to `.verifying.md` and the `## Fix Released` section land together. If transitioning without a fix commit, use `docs(problems): P<NNN> verification pending — <release marker>`.
420
468
  - Problem closed: `docs(problems): close P<NNN> <title>`
421
469
  - Review/re-rank: `docs(problems): review — re-rank priorities`
422
- - Fix implemented: `fix(<scope>): <description> (closes P<NNN>)` — include problem file changes in the same commit
470
+ - Fix implemented: `fix(<scope>): <description> (closes P<NNN>)` — include problem file changes (rename to `.verifying.md` + `## Fix Released` section) in the same commit per ADR-022
423
471
  4. If risk is above appetite: use `AskUserQuestion` to ask whether to commit anyway, remediate first, or park the work. If `AskUserQuestion` is unavailable, skip the commit and report the uncommitted state clearly (ADR-013 Rule 6 fail-safe). This applies only to the risk-above-appetite branch, not to the delegation-unavailable case above.
424
472
 
425
473
  ### 12. Auto-release when changesets are queued (ADR-020)
@@ -0,0 +1,114 @@
1
+ #!/usr/bin/env bats
2
+ # Doc-lint guard: manage-problem / work-problems / manage-incident SKILL.md
3
+ # files must document the Verification Pending lifecycle status per ADR-022.
4
+ # README.md template must present a Verification Queue section driven off the
5
+ # `.verifying.md` glob.
6
+ #
7
+ # Structural assertion — Permitted Exception to the source-grep ban
8
+ # (ADR-005 / P011). These tests assert that the three skill specification
9
+ # documents and the README template contain the status contract introduced
10
+ # by ADR-022 (Problem lifecycle — Verification Pending).
11
+ #
12
+ # Migration of existing `.known-error.md` files to `.verifying.md` is a
13
+ # separate follow-up commit per ADR-022 Scope; these tests cover only the
14
+ # documentation/contract changes that land in this iteration.
15
+ #
16
+ # Cross-reference:
17
+ # ADR-022: docs/decisions/022-problem-lifecycle-verification-pending-status.proposed.md
18
+ # P049: docs/problems/049-known-error-status-overloaded-with-fix-released-substate.*.md
19
+ # P048: docs/problems/048-manage-problem-does-not-detect-verification-candidates.open.md
20
+ # ADR-011: docs/decisions/011-manage-incident-skill.proposed.md
21
+ # ADR-014: docs/decisions/014-governance-skills-commit-their-own-work.proposed.md
22
+ # @jtbd JTBD-001 (enforce governance without slowing down)
23
+ # @jtbd JTBD-006 (progress the backlog while I'm away)
24
+ # @jtbd JTBD-101 (extend the suite with clear patterns)
25
+ # @jtbd JTBD-201 (restore service fast with an audit trail)
26
+
27
+ setup() {
28
+ TEST_DIR="$(cd "$(dirname "$BATS_TEST_FILENAME")" && pwd)"
29
+ # Test file lives at packages/itil/skills/manage-problem/test/ — walk up to the
30
+ # repo root and then into the three SKILL.md locations.
31
+ REPO_ROOT="$(cd "${TEST_DIR}/../../../../.." && pwd)"
32
+ MANAGE_PROBLEM="${REPO_ROOT}/packages/itil/skills/manage-problem/SKILL.md"
33
+ WORK_PROBLEMS="${REPO_ROOT}/packages/itil/skills/work-problems/SKILL.md"
34
+ MANAGE_INCIDENT="${REPO_ROOT}/packages/itil/skills/manage-incident/SKILL.md"
35
+ README_FILE="${REPO_ROOT}/docs/problems/README.md"
36
+ }
37
+
38
+ @test "ADR-022 exists (P049 precondition)" {
39
+ [ -f "${REPO_ROOT}/docs/decisions/022-problem-lifecycle-verification-pending-status.proposed.md" ] || \
40
+ [ -f "${REPO_ROOT}/docs/decisions/022-problem-lifecycle-verification-pending-status.accepted.md" ]
41
+ }
42
+
43
+ @test "manage-problem SKILL.md exists (P049 precondition)" {
44
+ [ -f "$MANAGE_PROBLEM" ]
45
+ }
46
+
47
+ @test "manage-problem SKILL.md lifecycle table includes Verification Pending status (P049 + ADR-022)" {
48
+ # ADR-022 Confirmation item 1: the lifecycle table must carry
49
+ # "Verification Pending | .verifying.md" as a first-class row.
50
+ run grep -inE "Verification Pending" "$MANAGE_PROBLEM"
51
+ [ "$status" -eq 0 ]
52
+ run grep -inE "\.verifying\.md" "$MANAGE_PROBLEM"
53
+ [ "$status" -eq 0 ]
54
+ }
55
+
56
+ @test "manage-problem SKILL.md WSJF multiplier table documents Verification Pending exclusion (P049 + ADR-022)" {
57
+ # ADR-022 Confirmation item 1: status multiplier table must carry a row
58
+ # with the new status and either multiplier 0 OR explicit "excluded"
59
+ # wording. Accept either so future tuning within the ADR's "reassessment
60
+ # criteria" envelope doesn't require this test to change.
61
+ run grep -inE "Verification Pending.*(0|excluded)|excluded.*Verification Pending" "$MANAGE_PROBLEM"
62
+ [ "$status" -eq 0 ]
63
+ }
64
+
65
+ @test "manage-problem SKILL.md documents the Known Error to Verification Pending transition (P049 + ADR-022)" {
66
+ # ADR-022 Scope line 61: the skill must describe the Known Error →
67
+ # Verification Pending transition explicitly (git mv + Status field
68
+ # update + Fix Released section in the same commit).
69
+ run grep -inE "(Known Error|\.known-error\.md).*(→|->|to).*(Verification Pending|\.verifying\.md)|git mv.*\.verifying\.md" "$MANAGE_PROBLEM"
70
+ [ "$status" -eq 0 ]
71
+ }
72
+
73
+ @test "manage-problem SKILL.md review step 9 targets .verifying.md via glob or suffix (P049 + ADR-022)" {
74
+ # ADR-022 Confirmation: step 9d targets *.verifying.md via glob rather
75
+ # than scanning .known-error.md bodies.
76
+ run grep -inE "\*\.verifying\.md|\.verifying\.md.*glob|glob.*\.verifying\.md" "$MANAGE_PROBLEM"
77
+ [ "$status" -eq 0 ]
78
+ }
79
+
80
+ @test "manage-problem SKILL.md review step 9 has a Verification Queue section (P049 + ADR-022)" {
81
+ # ADR-022 Scope line 63: dedicated Verification Queue section parallel to
82
+ # the main ranked table.
83
+ run grep -inE "Verification Queue" "$MANAGE_PROBLEM"
84
+ [ "$status" -eq 0 ]
85
+ }
86
+
87
+ @test "manage-problem SKILL.md cites ADR-022 (P049)" {
88
+ # Traceability: the skill must cite the ADR that governs the status
89
+ # contract so reviewers can chase the decision from the implementation.
90
+ run grep -n "ADR-022" "$MANAGE_PROBLEM"
91
+ [ "$status" -eq 0 ]
92
+ }
93
+
94
+ @test "work-problems SKILL.md classifier uses the .verifying.md suffix (P049 + ADR-022)" {
95
+ # ADR-022 Scope line 67: work-problems classifier becomes suffix-based
96
+ # rather than file-body-scan-based.
97
+ run grep -inE "\.verifying\.md" "$WORK_PROBLEMS"
98
+ [ "$status" -eq 0 ]
99
+ }
100
+
101
+ @test "manage-incident SKILL.md linked-problem close gating accepts .verifying.md (P049 + ADR-022)" {
102
+ # ADR-022 Scope line 68: incident close gating accepts .verifying.md
103
+ # alongside .known-error.md and .closed.md; .open.md still blocks.
104
+ run grep -inE "\.verifying\.md" "$MANAGE_INCIDENT"
105
+ [ "$status" -eq 0 ]
106
+ }
107
+
108
+ @test "docs/problems/README.md template has a Verification Queue section (P049 + ADR-022)" {
109
+ # ADR-022 Scope line 69: README replaces the hand-maintained "Known Errors
110
+ # (Fix Released — pending verification)" shadow table with a Verification
111
+ # Queue driven off the glob.
112
+ run grep -inE "Verification Queue" "$README_FILE"
113
+ [ "$status" -eq 0 ]
114
+ }
@@ -43,6 +43,7 @@ Read `docs/problems/README.md` if it exists and is fresh (check via git history
43
43
  Exclude:
44
44
  - `.closed.md` files (done)
45
45
  - `.parked.md` files (blocked on upstream)
46
+ - `.verifying.md` files (Verification Pending — fix released, awaiting user verification per ADR-022; surfaced in the Verification Queue section, never in dev-work ranking)
46
47
  - Problems with no WSJF score (need a review first — run `/wr-itil:manage-problem review` as the first iteration if scores are missing)
47
48
 
48
49
  ### Step 2: Check stop conditions
@@ -91,8 +92,8 @@ Read the problem file and apply these deterministic rules:
91
92
 
92
93
  | Problem state | Action | Skip-reason category |
93
94
  |---|---|---|
94
- | Known Error with `## Fix Released` | **Skip** — needs user verification | user-answerable (verification) |
95
- | Known Error with fix strategy documented | **Work it** — implement the fix | — |
95
+ | `.verifying.md` (Verification Pending, per ADR-022) | **Skip** — fix released, awaiting user verification | user-answerable (verification) |
96
+ | Known Error with fix strategy documented | **Work it** — implement the fix (on release, transition to `.verifying.md` per ADR-022) | — |
96
97
  | Known Error without fix strategy | **Work it** — produce a fix strategy, then implement | — |
97
98
  | Open problem with preliminary hypothesis or investigation notes | **Work it** — continue the investigation | — |
98
99
  | Open problem with no leads (empty Root Cause Analysis) | **Work it** — read the relevant code, form a hypothesis, document findings | — |