@windyroad/itil 1.2.0 → 2.0.0-preview.1111

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.
Files changed (266) hide show
  1. package/.agents/plugins/marketplace.json +12 -0
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.codex-plugin/plugin.json +42 -0
  4. package/README.md +34 -25
  5. package/agents/hang-off-check.md +34 -34
  6. package/bin/install.mjs +71 -5
  7. package/bin/wr-itil-catchup-scan +4 -4
  8. package/bin/wr-itil-check-deferred-placeholder-staleness +4 -4
  9. package/bin/wr-itil-check-fail-soft-skip-discipline +4 -4
  10. package/bin/wr-itil-check-fix-rfc-trace +4 -4
  11. package/bin/wr-itil-check-locale-discipline +4 -4
  12. package/bin/wr-itil-check-outbound-responses-staleness +4 -4
  13. package/bin/wr-itil-check-problems-readme-budget +4 -4
  14. package/bin/wr-itil-check-rfc-has-stories +4 -4
  15. package/bin/wr-itil-check-rfc-stories-ratified +4 -4
  16. package/bin/wr-itil-check-ticket-jtbd-ratification +4 -4
  17. package/bin/wr-itil-check-upstream-cache-staleness +4 -4
  18. package/bin/wr-itil-check-upstream-responses +4 -4
  19. package/bin/wr-itil-classify-readme-drift +4 -4
  20. package/bin/wr-itil-derive-release-vehicle +4 -4
  21. package/bin/wr-itil-detect-unratified-stories-maps +4 -4
  22. package/bin/wr-itil-effort-tally +4 -4
  23. package/bin/wr-itil-enumerate-postrelease-kv-candidates +4 -4
  24. package/bin/wr-itil-evaluate-relevance +4 -4
  25. package/bin/wr-itil-mark-create-gate +4 -4
  26. package/bin/wr-itil-mark-story-oversight-confirmed +4 -4
  27. package/bin/wr-itil-migrate-problems-layout +4 -4
  28. package/bin/wr-itil-migrate-story-status-mirror +4 -4
  29. package/bin/wr-itil-next-rfc-id +4 -4
  30. package/bin/wr-itil-plugin-exercise-index +4 -4
  31. package/bin/wr-itil-plugin-maturity-populate +4 -4
  32. package/bin/wr-itil-plugin-maturity-render +4 -4
  33. package/bin/wr-itil-plugin-validate-ci-gate +4 -4
  34. package/bin/wr-itil-reconcile-readme +4 -4
  35. package/bin/wr-itil-reconcile-rfcs +4 -4
  36. package/bin/wr-itil-reconcile-stories +4 -4
  37. package/bin/wr-itil-reconcile-story-maps +4 -4
  38. package/bin/wr-itil-render-story-map +4 -4
  39. package/bin/wr-itil-resolve-governance-plugin-dirs +4 -4
  40. package/bin/wr-itil-skill-invocations +4 -4
  41. package/bin/wr-itil-story-map-edit +4 -4
  42. package/bin/wr-itil-story-map-query +4 -4
  43. package/bin/wr-itil-update-jtbd-references-section +4 -4
  44. package/bin/wr-itil-update-problem-references-section +4 -4
  45. package/bin/wr-itil-update-problem-rfcs-section +4 -4
  46. package/bin/wr-itil-update-rfc-commits-section +4 -4
  47. package/bin/wr-itil-update-rfc-references-section +4 -4
  48. package/bin/wr-itil-verify-iter-summary +4 -4
  49. package/hooks/itil-assistant-output-gate.sh +3 -3
  50. package/hooks/itil-assistant-output-review.sh +5 -5
  51. package/hooks/itil-bash-polling-antipattern-detect.sh +11 -11
  52. package/hooks/itil-changeset-discipline.sh +24 -24
  53. package/hooks/itil-claude-space-protection.sh +21 -14
  54. package/hooks/itil-codex-dispatch.sh +164 -0
  55. package/hooks/itil-commit-trailer-transition-advisory.sh +11 -11
  56. package/hooks/itil-correction-detect.sh +8 -8
  57. package/hooks/itil-deferral-cadence-gate.sh +23 -23
  58. package/hooks/itil-fictional-defer-detect.sh +16 -16
  59. package/hooks/itil-fix-title-lifecycle-advisory.sh +11 -11
  60. package/hooks/itil-mid-loop-ask-detect.sh +14 -14
  61. package/hooks/itil-no-implement-draft-gate.sh +18 -18
  62. package/hooks/itil-pending-questions-surface.sh +11 -11
  63. package/hooks/itil-readme-refresh-discipline.sh +27 -27
  64. package/hooks/itil-rfc-oversight-nudge.sh +7 -7
  65. package/hooks/itil-rfc-trailer-advisory.sh +28 -28
  66. package/hooks/itil-runtime-sid-marker.sh +11 -11
  67. package/hooks/itil-story-mirror-migration-nudge.sh +7 -7
  68. package/hooks/lib/block-list.sh +17 -17
  69. package/hooks/lib/changeset-detect.sh +27 -27
  70. package/hooks/lib/claude-space-gate.sh +23 -15
  71. package/hooks/lib/command-detect.sh +12 -12
  72. package/hooks/lib/create-gate.sh +9 -39
  73. package/hooks/lib/detectors.sh +12 -12
  74. package/hooks/lib/readme-refresh-detect.sh +51 -51
  75. package/hooks/lib/runtime-sid.sh +12 -12
  76. package/hooks/lib/session-id.sh +28 -28
  77. package/hooks/lib/session-marker.sh +1 -1
  78. package/hooks/lib/staging-detect.sh +13 -13
  79. package/hooks/manage-problem-enforce-create.sh +16 -27
  80. package/hooks/p057-staging-trap-detect.sh +18 -18
  81. package/hooks/pre-publish-intake-gate.sh +5 -5
  82. package/hooks/staleness-check.sh +6 -6
  83. package/hooks-codex/hooks.json +57 -0
  84. package/lib/check-deferred-placeholder-staleness.sh +10 -10
  85. package/lib/check-outbound-responses-staleness.sh +2 -2
  86. package/lib/check-upstream-cache-staleness.sh +2 -2
  87. package/lib/derive-first-dispatch.sh +19 -19
  88. package/lib/enumerate-postrelease-kv-candidates.sh +18 -18
  89. package/lib/migrate-problems-layout.sh +12 -12
  90. package/lib/story-oversight.sh +27 -27
  91. package/package.json +16 -3
  92. package/scripts/catchup-scan.sh +25 -25
  93. package/scripts/check-fail-soft-skip-discipline.sh +10 -10
  94. package/scripts/check-fix-rfc-trace.sh +8 -8
  95. package/scripts/check-locale-discipline.sh +13 -13
  96. package/scripts/check-problems-readme-budget.sh +12 -12
  97. package/scripts/check-rfc-has-stories.sh +7 -7
  98. package/scripts/check-rfc-rejected-alternatives.sh +11 -11
  99. package/scripts/check-rfc-stories-ratified.sh +9 -9
  100. package/scripts/check-ticket-jtbd-ratification.sh +10 -10
  101. package/scripts/check-upstream-responses.sh +22 -22
  102. package/scripts/classify-readme-drift.sh +13 -13
  103. package/scripts/codex-agent.mjs +104 -0
  104. package/scripts/derive-release-vehicle.sh +23 -23
  105. package/scripts/detect-unoversighted-rfcs.sh +3 -3
  106. package/scripts/detect-unratified-stories-maps.sh +5 -5
  107. package/scripts/effort-tally.sh +10 -10
  108. package/scripts/evaluate-relevance.sh +16 -16
  109. package/scripts/mark-create-gate.sh +4 -4
  110. package/scripts/mark-story-oversight-confirmed.sh +14 -14
  111. package/scripts/migrate-story-status-mirror.sh +6 -6
  112. package/scripts/next-rfc-id.sh +5 -5
  113. package/scripts/plugin-exercise-index.sh +26 -26
  114. package/scripts/plugin-maturity-populate.sh +38 -38
  115. package/scripts/plugin-maturity-render.sh +26 -26
  116. package/scripts/plugin-validate-ci-gate.sh +14 -14
  117. package/scripts/reconcile-readme.sh +23 -23
  118. package/scripts/reconcile-rfcs.sh +13 -13
  119. package/scripts/reconcile-stories.sh +12 -12
  120. package/scripts/reconcile-story-maps.sh +6 -6
  121. package/scripts/render-story-map.mjs +24 -24
  122. package/scripts/render-story-map.sh +3 -3
  123. package/scripts/resolve-governance-plugin-dirs.sh +10 -10
  124. package/scripts/run-check-deferred-placeholder-staleness.sh +3 -3
  125. package/scripts/run-check-outbound-responses-staleness.sh +3 -3
  126. package/scripts/run-check-upstream-cache-staleness.sh +3 -3
  127. package/scripts/run-enumerate-postrelease-kv-candidates.sh +3 -3
  128. package/scripts/run-migrate-problems-layout.sh +3 -3
  129. package/scripts/skill-invocations.sh +29 -29
  130. package/scripts/story-map-edit.mjs +6 -6
  131. package/scripts/story-map-edit.sh +3 -3
  132. package/scripts/story-map-query.mjs +8 -8
  133. package/scripts/story-map-query.sh +3 -3
  134. package/scripts/update-jtbd-references-section.sh +8 -8
  135. package/scripts/update-problem-references-section.sh +12 -12
  136. package/scripts/update-problem-rfcs-section.sh +9 -9
  137. package/scripts/update-rfc-commits-section.sh +7 -7
  138. package/scripts/update-rfc-references-section.sh +3 -3
  139. package/scripts/update-story-references-section.sh +5 -5
  140. package/scripts/verify-iter-summary.sh +3 -3
  141. package/skills/capture-problem/REFERENCE.md +33 -33
  142. package/skills/capture-problem/SKILL.md +108 -108
  143. package/skills/capture-problem/agents/openai.yaml +3 -0
  144. package/skills/capture-rfc/SKILL.md +21 -323
  145. package/skills/capture-rfc/agents/openai.yaml +3 -0
  146. package/skills/capture-story/SKILL.md +65 -65
  147. package/skills/capture-story/agents/openai.yaml +3 -0
  148. package/skills/capture-story-map/SKILL.md +31 -31
  149. package/skills/capture-story-map/agents/openai.yaml +3 -0
  150. package/skills/check-upstream-responses/SKILL.md +38 -38
  151. package/skills/check-upstream-responses/agents/openai.yaml +3 -0
  152. package/skills/close-incident/SKILL.md +25 -25
  153. package/skills/close-incident/agents/openai.yaml +3 -0
  154. package/skills/link-incident/SKILL.md +22 -22
  155. package/skills/link-incident/agents/openai.yaml +3 -0
  156. package/skills/list-incidents/SKILL.md +9 -9
  157. package/skills/list-incidents/agents/openai.yaml +3 -0
  158. package/skills/list-problems/SKILL.md +17 -17
  159. package/skills/list-problems/agents/openai.yaml +3 -0
  160. package/skills/list-stories/SKILL.md +23 -23
  161. package/skills/list-stories/agents/openai.yaml +3 -0
  162. package/skills/list-story-maps/SKILL.md +9 -9
  163. package/skills/list-story-maps/agents/openai.yaml +3 -0
  164. package/skills/manage-incident/SKILL.md +59 -59
  165. package/skills/manage-incident/agents/openai.yaml +3 -0
  166. package/skills/manage-problem/SKILL.md +222 -222
  167. package/skills/manage-problem/agents/openai.yaml +3 -0
  168. package/skills/manage-rfc/SKILL.md +62 -62
  169. package/skills/manage-rfc/agents/openai.yaml +3 -0
  170. package/skills/manage-story/SKILL.md +49 -49
  171. package/skills/manage-story/agents/openai.yaml +3 -0
  172. package/skills/manage-story-map/SKILL.md +30 -30
  173. package/skills/manage-story-map/agents/openai.yaml +3 -0
  174. package/skills/mitigate-incident/SKILL.md +40 -40
  175. package/skills/mitigate-incident/agents/openai.yaml +3 -0
  176. package/skills/reconcile-readme/SKILL.md +28 -28
  177. package/skills/reconcile-readme/agents/openai.yaml +3 -0
  178. package/skills/reconcile-stories/SKILL.md +17 -17
  179. package/skills/reconcile-stories/agents/openai.yaml +3 -0
  180. package/skills/reconcile-story-maps/SKILL.md +11 -11
  181. package/skills/reconcile-story-maps/agents/openai.yaml +3 -0
  182. package/skills/report-upstream/SKILL.md +73 -73
  183. package/skills/report-upstream/agents/openai.yaml +3 -0
  184. package/skills/restore-incident/SKILL.md +28 -28
  185. package/skills/restore-incident/agents/openai.yaml +3 -0
  186. package/skills/review-problems/SKILL.md +129 -129
  187. package/skills/review-problems/agents/openai.yaml +3 -0
  188. package/skills/scaffold-intake/SKILL.md +26 -26
  189. package/skills/scaffold-intake/agents/openai.yaml +3 -0
  190. package/skills/transition-problem/SKILL.md +85 -85
  191. package/skills/transition-problem/agents/openai.yaml +3 -0
  192. package/skills/transition-problems/SKILL.md +69 -69
  193. package/skills/transition-problems/agents/openai.yaml +3 -0
  194. package/skills/update-upstream/SKILL.md +97 -97
  195. package/skills/update-upstream/agents/openai.yaml +3 -0
  196. package/skills/work-problem/SKILL.md +42 -42
  197. package/skills/work-problem/agents/openai.yaml +3 -0
  198. package/skills/work-problems/SKILL.md +327 -327
  199. package/skills/work-problems/agents/openai.yaml +3 -0
  200. package/skills-codex/capture-problem/REFERENCE.md +139 -0
  201. package/skills-codex/capture-problem/SKILL.md +438 -0
  202. package/skills-codex/capture-problem/agents/openai.yaml +3 -0
  203. package/skills-codex/capture-rfc/SKILL.md +45 -0
  204. package/skills-codex/capture-rfc/agents/openai.yaml +3 -0
  205. package/skills-codex/capture-story/SKILL.md +407 -0
  206. package/skills-codex/capture-story/agents/openai.yaml +3 -0
  207. package/skills-codex/capture-story-map/SKILL.md +286 -0
  208. package/skills-codex/capture-story-map/agents/openai.yaml +3 -0
  209. package/skills-codex/check-upstream-responses/SKILL.md +160 -0
  210. package/skills-codex/check-upstream-responses/agents/openai.yaml +3 -0
  211. package/skills-codex/close-incident/SKILL.md +192 -0
  212. package/skills-codex/close-incident/agents/openai.yaml +3 -0
  213. package/skills-codex/link-incident/SKILL.md +173 -0
  214. package/skills-codex/link-incident/agents/openai.yaml +3 -0
  215. package/skills-codex/list-incidents/SKILL.md +92 -0
  216. package/skills-codex/list-incidents/agents/openai.yaml +3 -0
  217. package/skills-codex/list-problems/SKILL.md +126 -0
  218. package/skills-codex/list-problems/agents/openai.yaml +3 -0
  219. package/skills-codex/list-stories/SKILL.md +170 -0
  220. package/skills-codex/list-stories/agents/openai.yaml +3 -0
  221. package/skills-codex/list-story-maps/SKILL.md +104 -0
  222. package/skills-codex/list-story-maps/agents/openai.yaml +3 -0
  223. package/skills-codex/manage-incident/SKILL.md +378 -0
  224. package/skills-codex/manage-incident/agents/openai.yaml +3 -0
  225. package/skills-codex/manage-problem/SKILL.md +1180 -0
  226. package/skills-codex/manage-problem/agents/openai.yaml +3 -0
  227. package/skills-codex/manage-rfc/SKILL.md +314 -0
  228. package/skills-codex/manage-rfc/agents/openai.yaml +3 -0
  229. package/skills-codex/manage-story/SKILL.md +284 -0
  230. package/skills-codex/manage-story/agents/openai.yaml +3 -0
  231. package/skills-codex/manage-story-map/SKILL.md +198 -0
  232. package/skills-codex/manage-story-map/agents/openai.yaml +3 -0
  233. package/skills-codex/mitigate-incident/SKILL.md +239 -0
  234. package/skills-codex/mitigate-incident/agents/openai.yaml +3 -0
  235. package/skills-codex/reconcile-readme/SKILL.md +175 -0
  236. package/skills-codex/reconcile-readme/agents/openai.yaml +3 -0
  237. package/skills-codex/reconcile-stories/SKILL.md +124 -0
  238. package/skills-codex/reconcile-stories/agents/openai.yaml +3 -0
  239. package/skills-codex/reconcile-story-maps/SKILL.md +81 -0
  240. package/skills-codex/reconcile-story-maps/agents/openai.yaml +3 -0
  241. package/skills-codex/report-upstream/SKILL.md +716 -0
  242. package/skills-codex/report-upstream/agents/openai.yaml +3 -0
  243. package/skills-codex/restore-incident/SKILL.md +216 -0
  244. package/skills-codex/restore-incident/agents/openai.yaml +3 -0
  245. package/skills-codex/review-problems/SKILL.md +524 -0
  246. package/skills-codex/review-problems/agents/openai.yaml +3 -0
  247. package/skills-codex/scaffold-intake/SKILL.md +209 -0
  248. package/skills-codex/scaffold-intake/agents/openai.yaml +3 -0
  249. package/skills-codex/scaffold-intake/templates/CONTRIBUTING.md.tmpl +31 -0
  250. package/skills-codex/scaffold-intake/templates/SECURITY.md.tmpl +39 -0
  251. package/skills-codex/scaffold-intake/templates/SUPPORT.md.tmpl +32 -0
  252. package/skills-codex/scaffold-intake/templates/config.yml.tmpl +8 -0
  253. package/skills-codex/scaffold-intake/templates/problem-report.yml.tmpl +114 -0
  254. package/skills-codex/transition-problem/SKILL.md +371 -0
  255. package/skills-codex/transition-problem/agents/openai.yaml +3 -0
  256. package/skills-codex/transition-problems/SKILL.md +310 -0
  257. package/skills-codex/transition-problems/agents/openai.yaml +3 -0
  258. package/skills-codex/update-upstream/SKILL.md +583 -0
  259. package/skills-codex/update-upstream/agents/openai.yaml +3 -0
  260. package/skills-codex/work-problem/SKILL.md +160 -0
  261. package/skills-codex/work-problem/agents/openai.yaml +3 -0
  262. package/skills-codex/work-problems/SKILL.md +58 -0
  263. package/skills-codex/work-problems/agents/openai.yaml +3 -0
  264. package/templates/story-map.css +1 -1
  265. package/bin/wr-itil-mark-rfc-capture-gate +0 -51
  266. package/scripts/mark-rfc-capture-gate.sh +0 -32
@@ -0,0 +1,192 @@
1
+ ---
2
+ name: wr-itil:close-incident
3
+ description: Close a restored incident — gated on the Linked Problem reaching Known Error, Verifying, or Closed (or a ## No Problem justification). Renames .restored.md to .closed.md.
4
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
5
+ ---
6
+
7
+ <!-- Generated from the runtime-neutral skill source. Do not edit. -->
8
+
9
+ > Codex runtime note: use `request_user_input` only where this contract
10
+ > explicitly requires a human decision. Resolve `<itil-plugin-root>` from
11
+ > this installed `SKILL.md`: it is two directories above the skill
12
+ > directory. Run bundled commands from `<itil-plugin-root>/bin/`; do not
13
+ > search the adopter repository or rely on those commands being on `PATH`.
14
+ > Spawn `wr-itil:hang-off-check` with the native Codex subagent tool, wait
15
+ > for it, and close that same agent.
16
+
17
+
18
+ # Close Incident
19
+
20
+ Close a restored incident. Closing is the final lifecycle transition — once closed, the incident file is archival and does not appear in active incident views. The close operation is gated on the Linked Problem reaching an acceptable terminal state, or on the incident carrying a documented "No Problem" justification. The gate exists so the problem-handoff invariant (the "Restore Service Fast with an Audit Trail" user outcome) is preserved: every incident either tracks to a root cause or carries an explicit note that none is required.
21
+
22
+ This skill is the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem phased-landing split of `/wr-itil:manage-incident <I> close` per the "Rename `wr-problem` Plugin to `wr-itil`" architecture rule amended Skill Granularity rule: one skill per distinct user intent. The argument `<I>` is a data parameter, permitted under the amendment. The original `/wr-itil:manage-incident <I> close` subcommand route remains as a thin-router forwarder during the deprecation window but is scheduled for removal in `@windyroad/itil`'s next major version.
23
+
24
+ ## Arguments
25
+
26
+ `/wr-itil:close-incident <I###>` — one positional data parameter:
27
+
28
+ - `<I###>` — the incident ID (e.g. `I007` or bare `007`). Resolves to `docs/incidents/<I###>-*.restored.md` (primary path) or `docs/incidents/<I###>-*.closed.md` (idempotent — already-closed short-circuits).
29
+
30
+ If `$ARGUMENTS` is empty or malformed, read the message from the arguments and report the expected shape. No request_user_input — the gate itself is a hard check with a message, and an empty-arguments case is a user misinvocation, not a decisional branch.
31
+
32
+ ## Close gate (the "Add `manage-incident` Skill to `wr-itil` Plugin" architecture rule + the "Problem lifecycle — add a Verification Pending status between Known Error and Closed" architecture rule)
33
+
34
+ The close operation checks the Linked Problem's file suffix:
35
+
36
+ | Linked problem state | File suffix | Close allowed? | Rationale |
37
+ |----------------------|-------------|----------------|-----------|
38
+ | Open | `.open.md` | **Blocked** | Root cause work not yet converged. The problem may still reclassify, re-scope, or need a fix before the incident can be safely archived. |
39
+ | Known Error | `.known-error.md` | Allowed | Root cause is identified and understood; a workaround exists or the risk is accepted. Incident may close. |
40
+ | Verifying | `.verifying.md` | Allowed (the "Problem lifecycle — add a Verification Pending status between Known Error and Closed" architecture rule) | Fix released, root cause confirmed, post-release verification pending. Per the "Problem lifecycle — add a Verification Pending status between Known Error and Closed" architecture rule, verifying satisfies the "Restored → Closed" handoff at least as well as Known Error did under the old contract. |
41
+ | Closed | `.closed.md` | Allowed | Problem fully resolved. Incident may close. |
42
+
43
+ If the incident carries a `## No Problem` section (instead of a Linked Problem), the gate is bypassed — the user has documented why no problem record is required.
44
+
45
+ ## Steps
46
+
47
+ ### 1. Parse arguments
48
+
49
+ Extract `<I###>` from `$ARGUMENTS`. Normalise:
50
+
51
+ - Accept `I007`, `i007`, `007`, `7` → canonicalise to `I007` (uppercase I + zero-padded 3 digits).
52
+ - If missing, report "Usage: `/wr-itil:close-incident <I###>`" and exit.
53
+
54
+ ### 2. Locate the incident file
55
+
56
+ ```bash
57
+ ls docs/incidents/<I###>-*.restored.md docs/incidents/<I###>-*.closed.md 2>/dev/null
58
+ ```
59
+
60
+ - If no file matches, report "No restored incident `<I###>` found. If the incident is still mitigating, run `/wr-itil:restore-incident <I###>` first. If no incident with this ID exists, check `/wr-itil:list-incidents`." and exit.
61
+ - If a `.closed.md` file matches, this is an idempotent re-invocation — report "Incident `<I###>` is already closed." and exit without further action.
62
+ - If a `.restored.md` file matches, proceed to Step 3.
63
+ - If both suffixes somehow match (should not happen under the naming convention), report the ambiguity and exit.
64
+
65
+ ### 3. Read the Linked Problem (or No Problem) section
66
+
67
+ Read the incident file and locate either:
68
+
69
+ - A `## Linked Problem` section with a line like `P<NNN> (<title>) — <status>`, OR
70
+ - A `## No Problem` section with a justification.
71
+
72
+ Branch on which section is present:
73
+
74
+ **Case A — `## Linked Problem` present**:
75
+
76
+ 1. Extract the problem ID `P<NNN>` from the section.
77
+ 2. Locate the problem file. Dual-tolerant lookup spans flat layout AND per-state subdir layout (the ": docs/problems/ flat layout migration — per-state subdirs + adopter auto-migration" release design migration window):
78
+
79
+ ```bash
80
+ ls docs/problems/<NNN>-*.md docs/problems/*/<NNN>-*.md 2>/dev/null | head -1
81
+ ```
82
+
83
+ Accept both `P<NNN>-*.md` and `<NNN>-*.md` naming conventions for robustness.
84
+
85
+ 3. Read the problem file's suffix:
86
+ - `.open.md` → close is **blocked**. Report: "Linked problem `P<NNN>` is still Open. Transition it to Known Error (via `/wr-itil:transition-problem P<NNN> known-error`), or let the release verification pipeline take it to `.verifying.md` before closing this incident. If the problem is genuinely not required, update the Linked Problem section to a No Problem justification instead." and exit.
87
+ - `.known-error.md`, `.verifying.md`, or `.closed.md` → close is **allowed**. Proceed to Step 4.
88
+
89
+ **Case B — `## No Problem` present**:
90
+
91
+ Close is **allowed**. Proceed to Step 4.
92
+
93
+ **Case C — neither section present**:
94
+
95
+ Report: "Incident `<I###>` has no Linked Problem or No Problem section. Run `/wr-itil:restore-incident <I###>` to complete the restore handoff first (which writes one of those sections), or run `/wr-itil:link-incident <I###> P<MMM>` to attach an existing problem, or edit the file manually to add a No Problem section." and exit.
96
+
97
+ ### 4. Transition to closed
98
+
99
+ Compute a UTC timestamp (e.g. `2026-04-21T14:37Z`). Then:
100
+
101
+ 1. `git mv docs/incidents/<I###>-<title>.restored.md docs/incidents/<I###>-<title>.closed.md`
102
+ 2. Update the `**Status**:` field from `Restored` to `Closed` via `Edit`.
103
+ 3. Append to the `## Timeline` section:
104
+
105
+ ```markdown
106
+ - [<timestamp> UTC] Incident closed
107
+ ```
108
+
109
+ ### 5. Quality checks
110
+
111
+ After the close, verify:
112
+
113
+ - **Status consistency**: `**Status**:` field matches the filename suffix (`Closed` + `.closed.md`).
114
+ - **Timeline monotonicity**: the "Incident closed" entry's timestamp is ≥ the last existing timeline entry's timestamp.
115
+ - **Post-close sections present**: either `## Linked Problem` with an acceptable terminal-state problem, or `## No Problem` with a justification.
116
+
117
+ ### 6. Report
118
+
119
+ Report:
120
+
121
+ - The file path closed.
122
+ - The incident ID and title.
123
+ - The transition (Restored → Closed).
124
+ - The linked problem ID (if any) and its state at close-time, OR the No Problem justification.
125
+ - Any quality-check warnings.
126
+
127
+ ### 7. Commit the completed work (the "Governance Skills Commit Their Own Completed Work" architecture rule)
128
+
129
+ Per the "Governance Skills Commit Their Own Completed Work" architecture rule, governance skills commit their own work.
130
+
131
+ 1. `git add` the renamed incident file.
132
+ 2. Delegate to `wr-risk-scorer:pipeline` (subagent_type: `wr-risk-scorer:pipeline`) to assess the staged changes and create a bypass marker. If the subagent type is not available (spawned subagent surface), invoke `/wr-risk-scorer:assess-release` via the installed skill invocation instead — per the "On-Demand Assessment Skills for Governance Plugins" architecture rule it wraps the same pipeline subagent.
133
+ 3. `git commit -m "docs(incidents): close I<NNN>"`.
134
+ 4. If risk is above appetite: report the above-appetite state clearly and exit without committing (close-incident does not carry `request_user_input` in its allowed-tools — the gate is a hard check). The user can re-run with `--force` semantics by invoking the commit manually if they choose.
135
+
136
+ ### 8. Auto-release when changesets are queued (the "Governance skills auto-release when changesets are queued" architecture rule)
137
+
138
+ **Skip this step if the skill is running inside an AFK orchestrator.** Orchestrators handle release cadence themselves per the "Inter-iteration release cadence for AFK loops" architecture rule (Step 6.5). When in doubt, defer to the orchestrator by skipping this step.
139
+
140
+ Otherwise, after the commit in step 7 lands, drain the release queue so the close lands on npm without requiring manual user action.
141
+
142
+ **Mechanism — delegate, do not re-implement scoring (per the "On-Demand Assessment Skills for Governance Plugins" architecture rule):**
143
+
144
+ 1. Invoke the release scorer. Two paths are valid:
145
+ - **Primary**: delegate to subagent type `wr-risk-scorer:pipeline` via the native Codex subagent tool.
146
+ - **Fallback**: if that subagent type is not available, invoke skill `/wr-risk-scorer:assess-release` via the installed skill invocation.
147
+ 2. Read the returned `RISK_SCORES: commit=X push=Y release=Z` line.
148
+ 3. **Drain condition**: if `push` and `release` are both within appetite (≤ 4/25, "Low" band per `RISK-POLICY.md`), AND `.changeset/` is non-empty, proceed to the drain action. Otherwise, skip the drain and report the unreleased state.
149
+
150
+ **Drain action (non-interactive, policy-authorised per the "Structured User Interaction for Governance-Skill Decisions" architecture rule Rule 6):**
151
+
152
+ 1. Run `npm run push:watch` (push + wait for CI to pass).
153
+ 2. If `.changeset/` remains non-empty after push (i.e. a release PR is pending), run `npm run release:watch` (merge the release PR + wait for npm publish).
154
+ 3. Report the release: "Released <package>@<version>. Close record is now live on npm."
155
+
156
+ **Failure handling**: if `release:watch` fails (CI failure, publish failure), stop and report the failure clearly. Do not retry non-interactively — the user must intervene.
157
+
158
+ **Above-appetite branch**: if push/release risk is above appetite, skip the drain and report: "Release skipped — risk above appetite. Run `npm run push:watch` and `npm run release:watch` manually when ready."
159
+
160
+ ## Ownership boundary
161
+
162
+ `close-incident` writes the `## Timeline` close entry, the Status field, and the `.restored.md → .closed.md` rename. It does NOT:
163
+
164
+ - Restore the incident (that is `/wr-itil:restore-incident <I###>` — slice 6b).
165
+ - Link a problem to the incident (that is `/wr-itil:link-incident <I###> P<MMM>` — slice 6d).
166
+ - Record a mitigation attempt (that is `/wr-itil:mitigate-incident <I###> <action>` — slice 6a).
167
+ - Transition the linked problem's status (that is `/wr-itil:transition-problem P<NNN> <status>`).
168
+ - Rename a `.investigating.md` or `.mitigating.md` file — the incident must already be `.restored.md`.
169
+ - Prompt the user for decisions — the gate is a hard check with a message, never a prompt. If a decisional branch is needed (e.g. "close anyway without a linked problem"), the user edits the incident file to add a No Problem section and re-runs.
170
+
171
+ If the user wants any of the above, the skill reports the appropriate sibling and exits.
172
+
173
+ ## Related
174
+
175
+ - **the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem** (`docs/problems/071-argument-based-skill-subcommands-are-not-discoverable.open.md`) — originating ticket. This skill is slice 6c of the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem phased-landing plan.
176
+ - **the "Rename `wr-problem` Plugin to `wr-itil`" architecture rule 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.
177
+ - **the "Add `manage-incident` Skill to `wr-itil` Plugin" architecture rule** (`docs/decisions/011-manage-incident-skill.proposed.md`) — incident lifecycle file-suffix conventions (`.investigating.md` / `.mitigating.md` / `.restored.md` / `.closed.md`) + close-gate-on-linked-problem rule.
178
+ - **the "Problem lifecycle — add a Verification Pending status between Known Error and Closed" architecture rule** (`docs/decisions/022-problem-lifecycle-verification-pending-status.proposed.md`) — `.verifying.md` status; extends the close gate to accept `.verifying.md` alongside `.known-error.md` and `.closed.md`.
179
+ - **the "Structured User Interaction for Governance-Skill Decisions" architecture rule** Rule 1 — structured user interaction (forwarder emits systemMessage for deprecation notice; gate-blocks are hard-fail messages, not prompts).
180
+ - **the "Structured User Interaction for Governance-Skill Decisions" architecture rule** Rule 6 — policy-within-appetite non-interactive actions (release drain).
181
+ - **the "Governance Skills Commit Their Own Completed Work" architecture rule** — governance skills commit their own work.
182
+ - **the "On-Demand Assessment Skills for Governance Plugins" architecture rule** — release scorer delegation pattern.
183
+ - **the "Governance skills auto-release when changesets are queued" architecture rule** — auto-release when changesets are queued.
184
+ - **the "Skill testing strategy — contract-assertion bats companion to" architecture rule** (`docs/decisions/037-skill-testing-strategy.proposed.md`) — contract-assertion bats pattern applied to this skill.
185
+ - **the ": Enforce Governance Without Slowing Down" user outcome** (`docs/jtbd/developer/the ": Enforce Governance Without Slowing Down" user outcome-enforce-governance.proposed.md`) — discoverable surface via `/wr-itil:` autocomplete.
186
+ - **the "Extend the Suite with New Plugins" user outcome** (`docs/jtbd/plugin-developer/the "Extend the Suite with New Plugins" user outcome-extend-suite.proposed.md`) — one skill per distinct user intent.
187
+ - **the "Restore Service Fast with an Audit Trail" user outcome** (`docs/jtbd/tech-lead/the "Restore Service Fast with an Audit Trail" user outcome-restore-service-fast.proposed.md`) — close gate preserves the problem-handoff audit trail.
188
+ - `<itil-plugin-root>/skills/manage-incident/SKILL.md` — hosts the thin-router forwarder for the deprecated `manage-incident <I###> close` form.
189
+ - `<itil-plugin-root>/skills/restore-incident/SKILL.md` — slice 6b precedent; close-incident is the next transition after restore.
190
+ - `<itil-plugin-root>/skills/transition-problem/SKILL.md` — the skill used to advance a linked problem from `.open.md` to `.known-error.md` so the incident close gate can pass.
191
+
192
+ $ARGUMENTS
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "WR ITIL: Close Incident"
3
+ short_description: "Close a restored incident after its problem gate passes."
@@ -0,0 +1,173 @@
1
+ ---
2
+ name: wr-itil:link-incident
3
+ description: Link an incident to an existing problem — writes or updates the ## Linked Problem section on the incident file with the problem's ID, title, and current status.
4
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
5
+ ---
6
+
7
+ <!-- Generated from the runtime-neutral skill source. Do not edit. -->
8
+
9
+ > Codex runtime note: use `request_user_input` only where this contract
10
+ > explicitly requires a human decision. Resolve `<itil-plugin-root>` from
11
+ > this installed `SKILL.md`: it is two directories above the skill
12
+ > directory. Run bundled commands from `<itil-plugin-root>/bin/`; do not
13
+ > search the adopter repository or rely on those commands being on `PATH`.
14
+ > Spawn `wr-itil:hang-off-check` with the native Codex subagent tool, wait
15
+ > for it, and close that same agent.
16
+
17
+
18
+ # Link Incident
19
+
20
+ Attach an existing problem record to an incident. This is the standalone link operation — the `/wr-itil:restore-incident` skill already handles the link-at-restore flow (writing the `## Linked Problem` section as part of problem-handoff). The `link-incident` skill is for after-the-fact links: when an incident was closed with a `## No Problem` note that later turned out to be wrong, when multiple incidents share a newly-created problem and need to be linked, or when a problem existed in parallel but was not attached during restore.
21
+
22
+ This skill is the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem phased-landing split of `/wr-itil:manage-incident <I> link P<M>` per the "Rename `wr-problem` Plugin to `wr-itil`" architecture rule amended Skill Granularity rule: one skill per distinct user intent. The arguments `<I>` (incident ID) and `<P>` (problem ID) are data parameters, permitted under the amendment. The original `/wr-itil:manage-incident <I> link P<M>` subcommand route remains as a thin-router forwarder during the deprecation window but is scheduled for removal in `@windyroad/itil`'s next major version.
23
+
24
+ ## Arguments
25
+
26
+ `/wr-itil:link-incident <I###> P<MMM>` — two positional data parameters:
27
+
28
+ - `<I###>` — the incident ID (e.g. `I007` or bare `007`). Resolves to `docs/incidents/<I###>-*.{investigating,mitigating,restored,closed}.md`.
29
+ - `P<MMM>` — the problem ID (e.g. `the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem` or bare `071`). Resolves to `docs/problems/<MMM>-*.md` (any lifecycle suffix).
30
+
31
+ If either argument is missing or malformed, report the expected shape and exit. No request_user_input — both are data parameters, not decisional branches.
32
+
33
+ ## Steps
34
+
35
+ ### 1. Parse arguments
36
+
37
+ Extract `<I###>` and `P<MMM>` from `$ARGUMENTS`. Normalise:
38
+
39
+ - Accept `I007`, `i007`, `007`, `7` → canonicalise the incident ID to `I007`.
40
+ - Accept `the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem`, `p071`, `071`, `71` → canonicalise the problem ID to `the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem`.
41
+ - If either is missing, report "Usage: `/wr-itil:link-incident <I###> P<MMM>`" and exit.
42
+
43
+ ### 2. Locate the incident file
44
+
45
+ ```bash
46
+ ls docs/incidents/<I###>-*.md 2>/dev/null | head -1
47
+ ```
48
+
49
+ The link operation works on any incident status — investigating, mitigating, restored, or closed. (Closed incidents are rare to link retroactively but not impossible — the audit-trail requirement is preserved either way.)
50
+
51
+ - If no file matches, report "No incident `<I###>` found. Check `/wr-itil:list-incidents` for active incidents or search `docs/incidents/` for closed incidents." and exit.
52
+ - If multiple files match (should not happen under the naming convention), report the ambiguity and exit.
53
+
54
+ ### 3. Locate the problem file
55
+
56
+ Dual-tolerant lookup spans flat layout AND per-state subdir layout (the ": docs/problems/ flat layout migration — per-state subdirs + adopter auto-migration" release design migration window):
57
+
58
+ ```bash
59
+ ls docs/problems/<MMM>-*.md docs/problems/*/<MMM>-*.md 2>/dev/null | head -1
60
+ ```
61
+
62
+ Accept any lifecycle suffix: `.open.md`, `.known-error.md`, `.verifying.md`, `.closed.md` in flat layout; bare `<MMM>-<title>.md` under `docs/problems/<state>/` in per-state layout.
63
+
64
+ - If no file matches, report "No problem `P<MMM>` found. Check `/wr-itil:list-problems` for the current backlog." and exit.
65
+ - Read the problem file's title from the `# Problem <MMM>: <Title>` header line.
66
+ - Read the problem file's status from the filename suffix (Open / Known Error / Verifying / Closed).
67
+
68
+ ### 4. Write or update the Linked Problem section
69
+
70
+ Construct the link entry:
71
+
72
+ ```markdown
73
+ ## Linked Problem
74
+ P<MMM> (<title>) — <status>
75
+ ```
76
+
77
+ where `<status>` is the human-readable label derived from the file suffix (`Open`, `Known Error`, `Verifying`, `Closed`).
78
+
79
+ Branch on whether the incident already has a link:
80
+
81
+ **Case A — no `## Linked Problem` or `## No Problem` section present**:
82
+
83
+ Append the `## Linked Problem` section at the end of the incident file.
84
+
85
+ **Case B — `## Linked Problem` section already present**:
86
+
87
+ Replace the existing section's body with the new link entry. Keep the `## Linked Problem` heading. If the existing link matches exactly (same `P<MMM>`, same title, same status), report "Incident `<I###>` is already linked to `P<MMM>` with the same status — no change." and exit without modifying the file.
88
+
89
+ **Case C — `## No Problem` section present**:
90
+
91
+ This is a retroactive-link-after-no-problem case. Replace the `## No Problem` section with a `## Linked Problem` section carrying the new link entry. Also append a `[<timestamp> UTC] Retroactive link to P<MMM>` entry to the `## Timeline` section so the audit trail records the revision.
92
+
93
+ ### 5. Quality checks
94
+
95
+ After the link, verify:
96
+
97
+ - Exactly one of `## Linked Problem` or `## No Problem` exists on the incident file (never both, never neither).
98
+ - The `## Linked Problem` body matches the canonical shape `P<MMM> (<title>) — <status>`.
99
+ - The problem file referenced actually exists in `docs/problems/`.
100
+
101
+ ### 6. Report
102
+
103
+ Report:
104
+
105
+ - The incident ID and file path modified.
106
+ - The problem ID, title, and status linked.
107
+ - Whether the link was a new attach (Case A), an update (Case B), or a retroactive conversion from No Problem (Case C).
108
+ - Any quality-check warnings.
109
+
110
+ ### 7. Commit the completed work (the "Governance Skills Commit Their Own Completed Work" architecture rule)
111
+
112
+ Per the "Governance Skills Commit Their Own Completed Work" architecture rule, governance skills commit their own work.
113
+
114
+ 1. `git add` the modified incident file.
115
+ 2. Delegate to `wr-risk-scorer:pipeline` (subagent_type: `wr-risk-scorer:pipeline`) to assess the staged changes and create a bypass marker. If the subagent type is not available (spawned subagent surface), invoke `/wr-risk-scorer:assess-release` via the installed skill invocation instead — per the "On-Demand Assessment Skills for Governance Plugins" architecture rule it wraps the same pipeline subagent.
116
+ 3. `git commit -m "docs(incidents): link I<NNN> to P<MMM>"`.
117
+ 4. If risk is above appetite: report the above-appetite state clearly and exit without committing. The user can re-run the commit manually if they choose.
118
+
119
+ ### 8. Auto-release when changesets are queued (the "Governance skills auto-release when changesets are queued" architecture rule)
120
+
121
+ **Skip this step if the skill is running inside an AFK orchestrator.** Orchestrators handle release cadence themselves per the "Inter-iteration release cadence for AFK loops" architecture rule (Step 6.5). When in doubt, defer to the orchestrator by skipping this step.
122
+
123
+ Otherwise, after the commit in step 7 lands, drain the release queue so the link lands on npm without requiring manual user action.
124
+
125
+ **Mechanism — delegate, do not re-implement scoring (per the "On-Demand Assessment Skills for Governance Plugins" architecture rule):**
126
+
127
+ 1. Invoke the release scorer. Two paths are valid:
128
+ - **Primary**: delegate to subagent type `wr-risk-scorer:pipeline` via the native Codex subagent tool.
129
+ - **Fallback**: if that subagent type is not available, invoke skill `/wr-risk-scorer:assess-release` via the installed skill invocation.
130
+ 2. Read the returned `RISK_SCORES: commit=X push=Y release=Z` line.
131
+ 3. **Drain condition**: if `push` and `release` are both within appetite (≤ 4/25, "Low" band per `RISK-POLICY.md`), AND `.changeset/` is non-empty, proceed to the drain action. Otherwise, skip the drain and report the unreleased state.
132
+
133
+ **Drain action (non-interactive, policy-authorised per the "Structured User Interaction for Governance-Skill Decisions" architecture rule Rule 6):**
134
+
135
+ 1. Run `npm run push:watch` (push + wait for CI to pass).
136
+ 2. If `.changeset/` remains non-empty after push (i.e. a release PR is pending), run `npm run release:watch` (merge the release PR + wait for npm publish).
137
+ 3. Report the release: "Released <package>@<version>. Link record is now live on npm."
138
+
139
+ **Failure handling**: if `release:watch` fails (CI failure, publish failure), stop and report the failure clearly. Do not retry non-interactively — the user must intervene.
140
+
141
+ **Above-appetite branch**: if push/release risk is above appetite, skip the drain and report: "Release skipped — risk above appetite. Run `npm run push:watch` and `npm run release:watch` manually when ready."
142
+
143
+ ## Ownership boundary
144
+
145
+ `link-incident` writes (or updates) the `## Linked Problem` section on an incident file and, in Case C only, appends a retroactive-link Timeline entry. It does NOT:
146
+
147
+ - Create a new problem (that is `/wr-itil:manage-problem` with no args).
148
+ - Update the problem's body (that is `/wr-itil:manage-problem P<MMM>`).
149
+ - Transition the problem's status (that is `/wr-itil:transition-problem P<MMM> <status>`).
150
+ - Transition the incident's status (that is `/wr-itil:restore-incident` or `/wr-itil:close-incident`).
151
+ - Record a mitigation (that is `/wr-itil:mitigate-incident`).
152
+ - Prompt the user for decisions — both arguments are data parameters; any missing-argument case is a hard-fail message, not a decisional branch.
153
+
154
+ If the user wants any of the above, the skill reports the appropriate sibling and exits.
155
+
156
+ ## Related
157
+
158
+ - **the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem** (`docs/problems/071-argument-based-skill-subcommands-are-not-discoverable.open.md`) — originating ticket. This skill is slice 6d of the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem phased-landing plan.
159
+ - **the "Rename `wr-problem` Plugin to `wr-itil`" architecture rule 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.
160
+ - **the "Add `manage-incident` Skill to `wr-itil` Plugin" architecture rule** (`docs/decisions/011-manage-incident-skill.proposed.md`) — incident lifecycle file-suffix conventions + Linked Problem section convention.
161
+ - **the "Structured User Interaction for Governance-Skill Decisions" architecture rule** Rule 1 — structured user interaction (forwarder emits systemMessage for deprecation; missing-argument is a hard-fail message, not a prompt).
162
+ - **the "Governance Skills Commit Their Own Completed Work" architecture rule** — governance skills commit their own work.
163
+ - **the "On-Demand Assessment Skills for Governance Plugins" architecture rule** — release scorer delegation pattern.
164
+ - **the "Governance skills auto-release when changesets are queued" architecture rule** — auto-release when changesets are queued.
165
+ - **the "Skill testing strategy — contract-assertion bats companion to" architecture rule** (`docs/decisions/037-skill-testing-strategy.proposed.md`) — contract-assertion bats pattern applied to this skill.
166
+ - **the ": Enforce Governance Without Slowing Down" user outcome** (`docs/jtbd/developer/the ": Enforce Governance Without Slowing Down" user outcome-enforce-governance.proposed.md`) — discoverable surface via `/wr-itil:` autocomplete.
167
+ - **the "Extend the Suite with New Plugins" user outcome** (`docs/jtbd/plugin-developer/the "Extend the Suite with New Plugins" user outcome-extend-suite.proposed.md`) — one skill per distinct user intent.
168
+ - **the "Restore Service Fast with an Audit Trail" user outcome** (`docs/jtbd/tech-lead/the "Restore Service Fast with an Audit Trail" user outcome-restore-service-fast.proposed.md`) — Linked Problem traceability preserved post-split.
169
+ - `<itil-plugin-root>/skills/manage-incident/SKILL.md` — hosts the thin-router forwarder for the deprecated `manage-incident <I###> link P<MMM>` form.
170
+ - `<itil-plugin-root>/skills/restore-incident/SKILL.md` — slice 6b precedent; writes the `## Linked Problem` section as part of problem-handoff. `link-incident` is the standalone-after-the-fact equivalent.
171
+ - `<itil-plugin-root>/skills/manage-problem/SKILL.md` — the source of truth for problem titles / statuses read during link.
172
+
173
+ $ARGUMENTS
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "WR ITIL: Link Incident"
3
+ short_description: "Link an incident to an existing problem."
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: wr-itil:list-incidents
3
+ description: List active incidents from docs/incidents/ sorted by severity. Read-only display of the incident backlog — no edits, no interaction. Shown as a markdown table with ID, title, severity, and status columns.
4
+ allowed-tools: Read, Bash, Grep, Glob
5
+ ---
6
+
7
+ <!-- Generated from the runtime-neutral skill source. Do not edit. -->
8
+
9
+ > Codex runtime note: use `request_user_input` only where this contract
10
+ > explicitly requires a human decision. Resolve `<itil-plugin-root>` from
11
+ > this installed `SKILL.md`: it is two directories above the skill
12
+ > directory. Run bundled commands from `<itil-plugin-root>/bin/`; do not
13
+ > search the adopter repository or rely on those commands being on `PATH`.
14
+ > Spawn `wr-itil:hang-off-check` with the native Codex subagent tool, wait
15
+ > for it, and close that same agent.
16
+
17
+
18
+ # List Incidents
19
+
20
+ Display the active incident backlog — investigating, mitigating, and restored incidents — sorted by severity (highest first). This skill is a pure read-only view of `docs/incidents/`; it does not edit, transition, close, or create incidents. For those operations, use the dedicated skills (`/wr-itil:manage-incident` to declare / update / mitigate / restore / close / link).
21
+
22
+ This skill is the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem phased-landing split of `/wr-itil:manage-incident list` per the "Rename `wr-problem` Plugin to `wr-itil`" architecture rule amended Skill Granularity rule: one skill per distinct user intent. The original `/wr-itil:manage-incident list` subcommand route remains as a thin-router forwarder during the deprecation window but is scheduled for removal in `@windyroad/itil`'s next major version.
23
+
24
+ ## Scope
25
+
26
+ Included in the ranking table:
27
+ - `docs/incidents/*.investigating.md` — symptoms reported, scope being established
28
+ - `docs/incidents/*.mitigating.md` — mitigation(s) in flight
29
+ - `docs/incidents/*.restored.md` — service verified restored, awaiting close gate
30
+
31
+ `docs/incidents/*.closed.md` is omitted entirely (the view is of active incidents, not the closed archive). Closed incidents remain readable by filename convention; this skill does not index them.
32
+
33
+ **Severity, not WSJF** — per the "Add `manage-incident` Skill to `wr-itil` Plugin" architecture rule: incidents are time-bound events where the WSJF "effort" divisor is meaningless during a live event. Severity uses Impact × Likelihood from `RISK-POLICY.md`, interpreted as "right now, what's the live business impact?". The skill surfaces the severity score from each incident file's frontmatter directly — no re-scoring, no auto-transitioning.
34
+
35
+ ## Steps
36
+
37
+ ### 1. Live scan
38
+
39
+ Enumerate the active incident files via glob:
40
+
41
+ ```bash
42
+ ls docs/incidents/*.investigating.md docs/incidents/*.mitigating.md docs/incidents/*.restored.md 2>/dev/null
43
+ ```
44
+
45
+ If the `docs/incidents/` directory does not exist or no active incidents are present, report "No active incidents." and exit.
46
+
47
+ For each matched file, read the `**Status**`, `**Severity**`, and the first-line `# Incident <I###>: <Title>` header. The severity line shape is:
48
+
49
+ ```
50
+ **Severity**: <score> (<label>) — Impact: <label> (<n>) x Likelihood: <label> (<n>)
51
+ ```
52
+
53
+ Extract the numeric `<score>` for sorting. If severity is missing, treat the incident as severity 0 and flag it so the user knows the incident file is incomplete.
54
+
55
+ ### 2. Display
56
+
57
+ Render one section:
58
+
59
+ **Active Incidents** — sorted by severity descending:
60
+
61
+ ```
62
+ | Severity | ID | Title | Status |
63
+ |----------|------|-------|--------|
64
+ | <score> | I<NNN> | <title> | <status> |
65
+ ```
66
+
67
+ If the section is empty (no active incidents), omit the table and print "No active incidents." instead.
68
+
69
+ ### 3. Trailing suggestions
70
+
71
+ After the table, print one short pointer depending on what the output showed:
72
+
73
+ - When the table is non-empty: `Run /wr-itil:manage-incident <I###> to update a specific incident, or /wr-itil:manage-incident <I###> mitigate / restored / close to advance its lifecycle.`
74
+ - When the table is empty: (no pointer needed).
75
+
76
+ ## Ownership boundary
77
+
78
+ `list-incidents` is read-only — it does not modify, rename, or commit any files. There is no README cache for incidents (unlike `docs/problems/README.md` which the `review-problems` skill maintains). Every invocation runs a live scan. If the output seems wrong, check the incident file frontmatter directly; there is no cache to refresh.
79
+
80
+ ## Related
81
+
82
+ - **the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem** (`docs/problems/071-argument-based-skill-subcommands-are-not-discoverable.open.md`) — originating ticket. This skill is slice 5 of the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem phased-landing plan.
83
+ - **the "Rename `wr-problem` Plugin to `wr-itil`" architecture rule 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.
84
+ - **the "Add `manage-incident` Skill to `wr-itil` Plugin" architecture rule** (`docs/decisions/011-manage-incident-skill-wrapping.proposed.md`) — incident lifecycle file-suffix conventions (`.investigating.md` / `.mitigating.md` / `.restored.md` / `.closed.md`) + "Severity, not WSJF" rule.
85
+ - **the "Skill testing strategy — contract-assertion bats companion to" architecture rule** (`docs/decisions/037-skill-testing-strategy.proposed.md`) — contract-assertion bats pattern applied to this skill.
86
+ - **the ": Enforce Governance Without Slowing Down" user outcome** (`docs/jtbd/developer/the ": Enforce Governance Without Slowing Down" user outcome-enforce-governance.proposed.md`) — discoverable surface via `/wr-itil:` autocomplete.
87
+ - **the "Extend the Suite with New Plugins" user outcome** (`docs/jtbd/plugin-developer/the "Extend the Suite with New Plugins" user outcome-extend-suite.proposed.md`) — one skill per distinct user intent.
88
+ - **the "Restore Service Fast with an Audit Trail" user outcome** (`docs/jtbd/tech-lead/the "Restore Service Fast with an Audit Trail" user outcome-restore-service-fast.proposed.md`) — incident status visibility for audit trail.
89
+ - `<itil-plugin-root>/skills/manage-incident/SKILL.md` — hosts the thin-router forwarder for the deprecated `manage-incident list` form.
90
+ - `<itil-plugin-root>/skills/list-problems/SKILL.md` — slice 1 precedent; this skill mirrors its read-only display shape.
91
+
92
+ $ARGUMENTS
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "WR ITIL: List Incidents"
3
+ short_description: "List active incidents in lifecycle order."
@@ -0,0 +1,126 @@
1
+ ---
2
+ name: wr-itil:list-problems
3
+ description: List open and known-error problem tickets from docs/problems/ sorted by WSJF priority. Read-only display of the current backlog — no edits, no interaction. Shown as a markdown table with ID, title, severity, status, and effort columns.
4
+ allowed-tools: Read, Bash, Grep, Glob
5
+ ---
6
+
7
+ <!-- Generated from the runtime-neutral skill source. Do not edit. -->
8
+
9
+ > Codex runtime note: use `request_user_input` only where this contract
10
+ > explicitly requires a human decision. Resolve `<itil-plugin-root>` from
11
+ > this installed `SKILL.md`: it is two directories above the skill
12
+ > directory. Run bundled commands from `<itil-plugin-root>/bin/`; do not
13
+ > search the adopter repository or rely on those commands being on `PATH`.
14
+ > Spawn `wr-itil:hang-off-check` with the native Codex subagent tool, wait
15
+ > for it, and close that same agent.
16
+
17
+
18
+ # List Problems
19
+
20
+ Display the current problem backlog — open and known-error tickets — sorted by Weighted Shortest Job First (WSJF) priority. This skill is a pure read-only view of `docs/problems/`; it does not edit, transition, close, or create tickets. For those operations, use the dedicated skills (`/wr-itil:manage-problem`, `/wr-itil:transition-problem`, etc.).
21
+
22
+ This skill is the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem phased-landing split of `/wr-itil:manage-problem list` per the "Rename `wr-problem` Plugin to `wr-itil`" architecture rule amended Skill Granularity rule: one skill per distinct user intent. The original `/wr-itil:manage-problem list` subcommand route remains as a thin-router forwarder during the deprecation window but is scheduled for removal in `@windyroad/itil`'s next major version.
23
+
24
+ ## Scope
25
+
26
+ Included in the ranking table (the ": docs/problems/ flat layout migration — per-state subdirs + adopter auto-migration" release design migration window — each glob is dual-tolerant, covering BOTH the flat `docs/problems/<NNN>-<title>.<state>.md` filename-suffix layout AND the per-state subdir `docs/problems/<state>/<NNN>-<title>.md` layout):
27
+
28
+ - `docs/problems/*.open.md` + `docs/problems/open/*.md` — open tickets (under investigation)
29
+ - `docs/problems/*.known-error.md` + `docs/problems/known-error/*.md` — known errors (root cause confirmed, fix NOT yet released)
30
+
31
+ Shown in separate sections, excluded from the dev-work WSJF ranking per the "Problem lifecycle — add a Verification Pending status between Known Error and Closed" architecture rule:
32
+ - `docs/problems/*.verifying.md` + `docs/problems/verifying/*.md` — Verification Pending (fix released, awaiting user verification; WSJF multiplier 0)
33
+ - `docs/problems/*.parked.md` + `docs/problems/parked/*.md` — Parked on upstream or user-suspended (WSJF multiplier 0)
34
+
35
+ `docs/problems/*.closed.md` + `docs/problems/closed/*.md` is omitted entirely (the view is of active backlog, not the closed archive).
36
+
37
+ ## Steps
38
+
39
+ ### 1. Check README.md cache freshness
40
+
41
+ Reuse the same `git log`-based freshness test as `/wr-itil:manage-problem review` Step 9 (per the "Problem 031: `manage-problem work` incorrectly determines cache is fresh" problem — filesystem mtime is unreliable in worktrees and fresh checkouts, so git history is the authoritative staleness signal):
42
+
43
+ ```bash
44
+ readme_commit=$(git log -1 --format=%H -- docs/problems/README.md 2>/dev/null)
45
+ if [ -z "$readme_commit" ] || \
46
+ git log --oneline "${readme_commit}..HEAD" -- 'docs/problems/*.md' 'docs/problems/*/*.md' ':!docs/problems/README.md' 2>/dev/null | grep -q .; then
47
+ # Pathspec pair `'docs/problems/*.md' 'docs/problems/*/*.md'` is the
48
+ # the ": docs/problems/ flat layout migration — per-state subdirs + adopter auto-migration" release design dual-tolerant transitional shape — covers BOTH the flat
49
+ # layout AND the per-state subdir layout.
50
+ echo "stale"
51
+ fi
52
+ ```
53
+
54
+ **Cache fresh** (no output): read `docs/problems/README.md` directly — it already contains the ranked table from the last review. Display the WSJF Rankings section + Verification Queue section + Parked section as-is. Note in the output: "Using cached ranking from [timestamp in README.md]".
55
+
56
+ **Cache stale** (prints "stale") or `README.md` missing: run the live scan in Step 2.
57
+
58
+ ### 2. Live scan (cache-stale fallback)
59
+
60
+ Enumerate the backlog files via dual-tolerant globs (the ": docs/problems/ flat layout migration — per-state subdirs + adopter auto-migration" release design migration window — each line covers BOTH the flat `<NNN>-<title>.<state>.md` filename-suffix layout AND the per-state subdir `<state>/<NNN>-<title>.md` layout):
61
+
62
+ ```bash
63
+ ls docs/problems/*.open.md docs/problems/*.known-error.md docs/problems/open/*.md docs/problems/known-error/*.md 2>/dev/null
64
+ ls docs/problems/*.verifying.md docs/problems/verifying/*.md 2>/dev/null # for Verification Queue section
65
+ ls docs/problems/*.parked.md docs/problems/parked/*.md 2>/dev/null # for Parked section
66
+ ```
67
+
68
+ For each `.open.md` and `.known-error.md` file, read the `**Status**`, `**Priority**`, `**Effort**`, and `**WSJF**` lines from the frontmatter section. Compute WSJF if missing: `WSJF = (Severity × StatusMultiplier) / EffortDivisor` per `/wr-itil:manage-problem` WSJF Prioritisation. Default to M (divisor 2) when Effort is absent; flag missing scores so the user knows a review is overdue.
69
+
70
+ For each `.verifying.md` file, read the `## Fix Released` marker. The `Likely verified?` column carries an **evidence-first** cell per the "VQ `Likely verified?` column uses age-based heuristic (≥14 days = yes) instead of session-observed evidence — sibling proxy-for-evidence anti-pattern to" problem (supersedes the original the "Problem 048: manage-problem does not surface Fix Released problems as verification candidates when the fix path has been exercised" problem Candidate 4 14-day heuristic). <!-- LIKELY-VERIFIED-CELL-SHAPE: evidence-based per the "VQ `Likely verified?` column uses age-based heuristic (≥14 days = yes) instead of session-observed evidence — sibling proxy-for-evidence anti-pattern to" problem --> When this skill runs against a stale cache, the live-scan path reads the cell value from the `.verifying.md` ticket's `## Fix Released` section (or carries forward the prior cell value from the cached README when present); it does NOT compute the cell from age — that responsibility moved to `/wr-itil:review-problems` Step 4 (user confirmation populates `yes — observed: …`) and `run-retro` Step 4a close-on-evidence citations.
71
+
72
+ ### 3. Display
73
+
74
+ Render three sections matching the README.md format so cached and live output look identical:
75
+
76
+ **WSJF Rankings** — dev-work queue (open + known-error), sorted by WSJF descending:
77
+
78
+ ```
79
+ | WSJF | ID | Title | Severity | Status | Effort |
80
+ |------|-----|-------|----------|--------|--------|
81
+ | <score> | P<NNN> | <title> | <severity> | <status> | <effort> |
82
+ ```
83
+
84
+ **Verification Queue** — `.verifying.md` tickets, sorted by `Released date ASC` (oldest at row 1; same-day releases tiebreak by ID ASC) per the "Problem lifecycle — add a Verification Pending status between Known Error and Closed" architecture rule + the "Problem 048: manage-problem does not surface Fix Released problems as verification candidates when the fix path has been exercised" problem user-task semantics. <!-- VQ-SORT-DIRECTION: oldest-first per the "Problem lifecycle — add a Verification Pending status between Known Error and Closed" architecture rule --> Drift here re-opens the "docs/problems/README.md Verification Queue rendered newest-first contradicts section header "Ranked by release age, oldest first"" problem. The `Likely verified?` column carries an **evidence-first** cell per the "VQ `Likely verified?` column uses age-based heuristic (≥14 days = yes) instead of session-observed evidence — sibling proxy-for-evidence anti-pattern to" problem — three canonical values: `yes — observed: <evidence>`, `no — not observed` (default for newly-released tickets), `no — observed regression`. <!-- LIKELY-VERIFIED-CELL-SHAPE: evidence-based per the "VQ `Likely verified?` column uses age-based heuristic (≥14 days = yes) instead of session-observed evidence — sibling proxy-for-evidence anti-pattern to" problem --> Drift on the cell shape re-opens the "VQ `Likely verified?` column uses age-based heuristic (≥14 days = yes) instead of session-observed evidence — sibling proxy-for-evidence anti-pattern to" problem.
85
+
86
+ ```
87
+ | ID | Title | Released | Likely verified? |
88
+ |----|-------|----------|------------------|
89
+ | P<NNN> | <title> | <release marker> | <yes — observed: … / no — not observed / no — observed regression> |
90
+ ```
91
+
92
+ **Parked** — `.parked.md` tickets:
93
+
94
+ ```
95
+ | ID | Title | Reason | Parked since |
96
+ |----|-------|--------|-------------|
97
+ | P<NNN> | <title> | <reason> | <date> |
98
+ ```
99
+
100
+ If a section is empty, omit it rather than rendering an empty header.
101
+
102
+ ### 4. Trailing suggestions
103
+
104
+ After the tables, print one of two short pointers depending on what the output showed:
105
+
106
+ - When dev-work queue is non-empty: `Run /wr-itil:work-problem to work the highest-WSJF ticket, or /wr-itil:manage-problem <NNN> to update a specific ticket.` (Note: `/wr-itil:work-problem` is singular — distinct from `/wr-itil:work-problems` plural AFK orchestrator.)
107
+ - When Verification Queue is non-empty: `Run /wr-itil:manage-problem review to trigger the verification prompt for pending tickets.`
108
+
109
+ ## Ownership boundary
110
+
111
+ `list-problems` does not modify, rename, or commit any files. If the README.md cache is stale, `list-problems` performs a live scan but does NOT rewrite `README.md` — refreshing the cache is `/wr-itil:manage-problem review`'s ownership. The trailing-suggestion pointer surfaces this boundary so the user can refresh via the correct skill when they notice stale output.
112
+
113
+ ## Related
114
+
115
+ - **the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem** (`docs/problems/071-argument-based-skill-subcommands-are-not-discoverable.open.md`) — originating ticket. This skill is phase 1 of the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem phased-landing plan.
116
+ - **the "Rename `wr-problem` Plugin to `wr-itil`" architecture rule 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.
117
+ - **the "Problem lifecycle — add a Verification Pending status between Known Error and Closed" architecture rule** (`docs/decisions/022-verification-pending-status.proposed.md`) — Verification Pending status conventions; `.verifying.md` exclusion from WSJF ranking.
118
+ - **the "Skill testing strategy — contract-assertion bats companion to" architecture rule** (`docs/decisions/037-skill-testing-strategy.proposed.md`) — contract-assertion bats pattern applied to this skill.
119
+ - **the "Problem 031: `manage-problem work` incorrectly determines cache is fresh" problem** — git-history freshness check rationale (mtime unreliable in worktrees).
120
+ - **the "Problem 048: manage-problem does not surface Fix Released problems as verification candidates when the fix path has been exercised" problem** Candidate 4 — original `Likely verified?` column (14-day age-heuristic). Superseded by the "VQ `Likely verified?` column uses age-based heuristic (≥14 days = yes) instead of session-observed evidence — sibling proxy-for-evidence anti-pattern to" problem.
121
+ - **the "VQ `Likely verified?` column uses age-based heuristic (≥14 days = yes) instead of session-observed evidence — sibling proxy-for-evidence anti-pattern to" problem** — evidence-first cell shape (`yes — observed: <evidence>` / `no — not observed` / `no — observed regression`) replaces the age-based heuristic; `<!-- LIKELY-VERIFIED-CELL-SHAPE: evidence-based per the "VQ `Likely verified?` column uses age-based heuristic (≥14 days = yes) instead of session-observed evidence — sibling proxy-for-evidence anti-pattern to" problem -->` drives cross-skill drift detection.
122
+ - **the ": Enforce Governance Without Slowing Down" user outcome** (`docs/jtbd/developer/the ": Enforce Governance Without Slowing Down" user outcome-enforce-governance.proposed.md`) — discoverable surface via `/wr-itil:` autocomplete.
123
+ - **the "Extend the Suite with New Plugins" user outcome** (`docs/jtbd/plugin-developer/the "Extend the Suite with New Plugins" user outcome-extend-suite.proposed.md`) — one skill per distinct user intent.
124
+ - `<itil-plugin-root>/skills/manage-problem/SKILL.md` — hosts the thin-router forwarder for the deprecated `manage-problem list` form.
125
+
126
+ $ARGUMENTS
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "WR ITIL: List Problems"
3
+ short_description: "List open problems in WSJF order."