@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.
- package/.agents/plugins/marketplace.json +12 -0
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +42 -0
- package/README.md +34 -25
- package/agents/hang-off-check.md +34 -34
- package/bin/install.mjs +71 -5
- package/bin/wr-itil-catchup-scan +4 -4
- package/bin/wr-itil-check-deferred-placeholder-staleness +4 -4
- package/bin/wr-itil-check-fail-soft-skip-discipline +4 -4
- package/bin/wr-itil-check-fix-rfc-trace +4 -4
- package/bin/wr-itil-check-locale-discipline +4 -4
- package/bin/wr-itil-check-outbound-responses-staleness +4 -4
- package/bin/wr-itil-check-problems-readme-budget +4 -4
- package/bin/wr-itil-check-rfc-has-stories +4 -4
- package/bin/wr-itil-check-rfc-stories-ratified +4 -4
- package/bin/wr-itil-check-ticket-jtbd-ratification +4 -4
- package/bin/wr-itil-check-upstream-cache-staleness +4 -4
- package/bin/wr-itil-check-upstream-responses +4 -4
- package/bin/wr-itil-classify-readme-drift +4 -4
- package/bin/wr-itil-derive-release-vehicle +4 -4
- package/bin/wr-itil-detect-unratified-stories-maps +4 -4
- package/bin/wr-itil-effort-tally +4 -4
- package/bin/wr-itil-enumerate-postrelease-kv-candidates +4 -4
- package/bin/wr-itil-evaluate-relevance +4 -4
- package/bin/wr-itil-mark-create-gate +4 -4
- package/bin/wr-itil-mark-story-oversight-confirmed +4 -4
- package/bin/wr-itil-migrate-problems-layout +4 -4
- package/bin/wr-itil-migrate-story-status-mirror +4 -4
- package/bin/wr-itil-next-rfc-id +4 -4
- package/bin/wr-itil-plugin-exercise-index +4 -4
- package/bin/wr-itil-plugin-maturity-populate +4 -4
- package/bin/wr-itil-plugin-maturity-render +4 -4
- package/bin/wr-itil-plugin-validate-ci-gate +4 -4
- package/bin/wr-itil-reconcile-readme +4 -4
- package/bin/wr-itil-reconcile-rfcs +4 -4
- package/bin/wr-itil-reconcile-stories +4 -4
- package/bin/wr-itil-reconcile-story-maps +4 -4
- package/bin/wr-itil-render-story-map +4 -4
- package/bin/wr-itil-resolve-governance-plugin-dirs +4 -4
- package/bin/wr-itil-skill-invocations +4 -4
- package/bin/wr-itil-story-map-edit +4 -4
- package/bin/wr-itil-story-map-query +4 -4
- package/bin/wr-itil-update-jtbd-references-section +4 -4
- package/bin/wr-itil-update-problem-references-section +4 -4
- package/bin/wr-itil-update-problem-rfcs-section +4 -4
- package/bin/wr-itil-update-rfc-commits-section +4 -4
- package/bin/wr-itil-update-rfc-references-section +4 -4
- package/bin/wr-itil-verify-iter-summary +4 -4
- package/hooks/itil-assistant-output-gate.sh +3 -3
- package/hooks/itil-assistant-output-review.sh +5 -5
- package/hooks/itil-bash-polling-antipattern-detect.sh +11 -11
- package/hooks/itil-changeset-discipline.sh +24 -24
- package/hooks/itil-claude-space-protection.sh +21 -14
- package/hooks/itil-codex-dispatch.sh +164 -0
- package/hooks/itil-commit-trailer-transition-advisory.sh +11 -11
- package/hooks/itil-correction-detect.sh +8 -8
- package/hooks/itil-deferral-cadence-gate.sh +23 -23
- package/hooks/itil-fictional-defer-detect.sh +16 -16
- package/hooks/itil-fix-title-lifecycle-advisory.sh +11 -11
- package/hooks/itil-mid-loop-ask-detect.sh +14 -14
- package/hooks/itil-no-implement-draft-gate.sh +18 -18
- package/hooks/itil-pending-questions-surface.sh +11 -11
- package/hooks/itil-readme-refresh-discipline.sh +27 -27
- package/hooks/itil-rfc-oversight-nudge.sh +7 -7
- package/hooks/itil-rfc-trailer-advisory.sh +28 -28
- package/hooks/itil-runtime-sid-marker.sh +11 -11
- package/hooks/itil-story-mirror-migration-nudge.sh +7 -7
- package/hooks/lib/block-list.sh +17 -17
- package/hooks/lib/changeset-detect.sh +27 -27
- package/hooks/lib/claude-space-gate.sh +23 -15
- package/hooks/lib/command-detect.sh +12 -12
- package/hooks/lib/create-gate.sh +9 -39
- package/hooks/lib/detectors.sh +12 -12
- package/hooks/lib/readme-refresh-detect.sh +51 -51
- package/hooks/lib/runtime-sid.sh +12 -12
- package/hooks/lib/session-id.sh +28 -28
- package/hooks/lib/session-marker.sh +1 -1
- package/hooks/lib/staging-detect.sh +13 -13
- package/hooks/manage-problem-enforce-create.sh +16 -27
- package/hooks/p057-staging-trap-detect.sh +18 -18
- package/hooks/pre-publish-intake-gate.sh +5 -5
- package/hooks/staleness-check.sh +6 -6
- package/hooks-codex/hooks.json +57 -0
- package/lib/check-deferred-placeholder-staleness.sh +10 -10
- package/lib/check-outbound-responses-staleness.sh +2 -2
- package/lib/check-upstream-cache-staleness.sh +2 -2
- package/lib/derive-first-dispatch.sh +19 -19
- package/lib/enumerate-postrelease-kv-candidates.sh +18 -18
- package/lib/migrate-problems-layout.sh +12 -12
- package/lib/story-oversight.sh +27 -27
- package/package.json +16 -3
- package/scripts/catchup-scan.sh +25 -25
- package/scripts/check-fail-soft-skip-discipline.sh +10 -10
- package/scripts/check-fix-rfc-trace.sh +8 -8
- package/scripts/check-locale-discipline.sh +13 -13
- package/scripts/check-problems-readme-budget.sh +12 -12
- package/scripts/check-rfc-has-stories.sh +7 -7
- package/scripts/check-rfc-rejected-alternatives.sh +11 -11
- package/scripts/check-rfc-stories-ratified.sh +9 -9
- package/scripts/check-ticket-jtbd-ratification.sh +10 -10
- package/scripts/check-upstream-responses.sh +22 -22
- package/scripts/classify-readme-drift.sh +13 -13
- package/scripts/codex-agent.mjs +104 -0
- package/scripts/derive-release-vehicle.sh +23 -23
- package/scripts/detect-unoversighted-rfcs.sh +3 -3
- package/scripts/detect-unratified-stories-maps.sh +5 -5
- package/scripts/effort-tally.sh +10 -10
- package/scripts/evaluate-relevance.sh +16 -16
- package/scripts/mark-create-gate.sh +4 -4
- package/scripts/mark-story-oversight-confirmed.sh +14 -14
- package/scripts/migrate-story-status-mirror.sh +6 -6
- package/scripts/next-rfc-id.sh +5 -5
- package/scripts/plugin-exercise-index.sh +26 -26
- package/scripts/plugin-maturity-populate.sh +38 -38
- package/scripts/plugin-maturity-render.sh +26 -26
- package/scripts/plugin-validate-ci-gate.sh +14 -14
- package/scripts/reconcile-readme.sh +23 -23
- package/scripts/reconcile-rfcs.sh +13 -13
- package/scripts/reconcile-stories.sh +12 -12
- package/scripts/reconcile-story-maps.sh +6 -6
- package/scripts/render-story-map.mjs +24 -24
- package/scripts/render-story-map.sh +3 -3
- package/scripts/resolve-governance-plugin-dirs.sh +10 -10
- package/scripts/run-check-deferred-placeholder-staleness.sh +3 -3
- package/scripts/run-check-outbound-responses-staleness.sh +3 -3
- package/scripts/run-check-upstream-cache-staleness.sh +3 -3
- package/scripts/run-enumerate-postrelease-kv-candidates.sh +3 -3
- package/scripts/run-migrate-problems-layout.sh +3 -3
- package/scripts/skill-invocations.sh +29 -29
- package/scripts/story-map-edit.mjs +6 -6
- package/scripts/story-map-edit.sh +3 -3
- package/scripts/story-map-query.mjs +8 -8
- package/scripts/story-map-query.sh +3 -3
- package/scripts/update-jtbd-references-section.sh +8 -8
- package/scripts/update-problem-references-section.sh +12 -12
- package/scripts/update-problem-rfcs-section.sh +9 -9
- package/scripts/update-rfc-commits-section.sh +7 -7
- package/scripts/update-rfc-references-section.sh +3 -3
- package/scripts/update-story-references-section.sh +5 -5
- package/scripts/verify-iter-summary.sh +3 -3
- package/skills/capture-problem/REFERENCE.md +33 -33
- package/skills/capture-problem/SKILL.md +108 -108
- package/skills/capture-problem/agents/openai.yaml +3 -0
- package/skills/capture-rfc/SKILL.md +21 -323
- package/skills/capture-rfc/agents/openai.yaml +3 -0
- package/skills/capture-story/SKILL.md +65 -65
- package/skills/capture-story/agents/openai.yaml +3 -0
- package/skills/capture-story-map/SKILL.md +31 -31
- package/skills/capture-story-map/agents/openai.yaml +3 -0
- package/skills/check-upstream-responses/SKILL.md +38 -38
- package/skills/check-upstream-responses/agents/openai.yaml +3 -0
- package/skills/close-incident/SKILL.md +25 -25
- package/skills/close-incident/agents/openai.yaml +3 -0
- package/skills/link-incident/SKILL.md +22 -22
- package/skills/link-incident/agents/openai.yaml +3 -0
- package/skills/list-incidents/SKILL.md +9 -9
- package/skills/list-incidents/agents/openai.yaml +3 -0
- package/skills/list-problems/SKILL.md +17 -17
- package/skills/list-problems/agents/openai.yaml +3 -0
- package/skills/list-stories/SKILL.md +23 -23
- package/skills/list-stories/agents/openai.yaml +3 -0
- package/skills/list-story-maps/SKILL.md +9 -9
- package/skills/list-story-maps/agents/openai.yaml +3 -0
- package/skills/manage-incident/SKILL.md +59 -59
- package/skills/manage-incident/agents/openai.yaml +3 -0
- package/skills/manage-problem/SKILL.md +222 -222
- package/skills/manage-problem/agents/openai.yaml +3 -0
- package/skills/manage-rfc/SKILL.md +62 -62
- package/skills/manage-rfc/agents/openai.yaml +3 -0
- package/skills/manage-story/SKILL.md +49 -49
- package/skills/manage-story/agents/openai.yaml +3 -0
- package/skills/manage-story-map/SKILL.md +30 -30
- package/skills/manage-story-map/agents/openai.yaml +3 -0
- package/skills/mitigate-incident/SKILL.md +40 -40
- package/skills/mitigate-incident/agents/openai.yaml +3 -0
- package/skills/reconcile-readme/SKILL.md +28 -28
- package/skills/reconcile-readme/agents/openai.yaml +3 -0
- package/skills/reconcile-stories/SKILL.md +17 -17
- package/skills/reconcile-stories/agents/openai.yaml +3 -0
- package/skills/reconcile-story-maps/SKILL.md +11 -11
- package/skills/reconcile-story-maps/agents/openai.yaml +3 -0
- package/skills/report-upstream/SKILL.md +73 -73
- package/skills/report-upstream/agents/openai.yaml +3 -0
- package/skills/restore-incident/SKILL.md +28 -28
- package/skills/restore-incident/agents/openai.yaml +3 -0
- package/skills/review-problems/SKILL.md +129 -129
- package/skills/review-problems/agents/openai.yaml +3 -0
- package/skills/scaffold-intake/SKILL.md +26 -26
- package/skills/scaffold-intake/agents/openai.yaml +3 -0
- package/skills/transition-problem/SKILL.md +85 -85
- package/skills/transition-problem/agents/openai.yaml +3 -0
- package/skills/transition-problems/SKILL.md +69 -69
- package/skills/transition-problems/agents/openai.yaml +3 -0
- package/skills/update-upstream/SKILL.md +97 -97
- package/skills/update-upstream/agents/openai.yaml +3 -0
- package/skills/work-problem/SKILL.md +42 -42
- package/skills/work-problem/agents/openai.yaml +3 -0
- package/skills/work-problems/SKILL.md +327 -327
- package/skills/work-problems/agents/openai.yaml +3 -0
- package/skills-codex/capture-problem/REFERENCE.md +139 -0
- package/skills-codex/capture-problem/SKILL.md +438 -0
- package/skills-codex/capture-problem/agents/openai.yaml +3 -0
- package/skills-codex/capture-rfc/SKILL.md +45 -0
- package/skills-codex/capture-rfc/agents/openai.yaml +3 -0
- package/skills-codex/capture-story/SKILL.md +407 -0
- package/skills-codex/capture-story/agents/openai.yaml +3 -0
- package/skills-codex/capture-story-map/SKILL.md +286 -0
- package/skills-codex/capture-story-map/agents/openai.yaml +3 -0
- package/skills-codex/check-upstream-responses/SKILL.md +160 -0
- package/skills-codex/check-upstream-responses/agents/openai.yaml +3 -0
- package/skills-codex/close-incident/SKILL.md +192 -0
- package/skills-codex/close-incident/agents/openai.yaml +3 -0
- package/skills-codex/link-incident/SKILL.md +173 -0
- package/skills-codex/link-incident/agents/openai.yaml +3 -0
- package/skills-codex/list-incidents/SKILL.md +92 -0
- package/skills-codex/list-incidents/agents/openai.yaml +3 -0
- package/skills-codex/list-problems/SKILL.md +126 -0
- package/skills-codex/list-problems/agents/openai.yaml +3 -0
- package/skills-codex/list-stories/SKILL.md +170 -0
- package/skills-codex/list-stories/agents/openai.yaml +3 -0
- package/skills-codex/list-story-maps/SKILL.md +104 -0
- package/skills-codex/list-story-maps/agents/openai.yaml +3 -0
- package/skills-codex/manage-incident/SKILL.md +378 -0
- package/skills-codex/manage-incident/agents/openai.yaml +3 -0
- package/skills-codex/manage-problem/SKILL.md +1180 -0
- package/skills-codex/manage-problem/agents/openai.yaml +3 -0
- package/skills-codex/manage-rfc/SKILL.md +314 -0
- package/skills-codex/manage-rfc/agents/openai.yaml +3 -0
- package/skills-codex/manage-story/SKILL.md +284 -0
- package/skills-codex/manage-story/agents/openai.yaml +3 -0
- package/skills-codex/manage-story-map/SKILL.md +198 -0
- package/skills-codex/manage-story-map/agents/openai.yaml +3 -0
- package/skills-codex/mitigate-incident/SKILL.md +239 -0
- package/skills-codex/mitigate-incident/agents/openai.yaml +3 -0
- package/skills-codex/reconcile-readme/SKILL.md +175 -0
- package/skills-codex/reconcile-readme/agents/openai.yaml +3 -0
- package/skills-codex/reconcile-stories/SKILL.md +124 -0
- package/skills-codex/reconcile-stories/agents/openai.yaml +3 -0
- package/skills-codex/reconcile-story-maps/SKILL.md +81 -0
- package/skills-codex/reconcile-story-maps/agents/openai.yaml +3 -0
- package/skills-codex/report-upstream/SKILL.md +716 -0
- package/skills-codex/report-upstream/agents/openai.yaml +3 -0
- package/skills-codex/restore-incident/SKILL.md +216 -0
- package/skills-codex/restore-incident/agents/openai.yaml +3 -0
- package/skills-codex/review-problems/SKILL.md +524 -0
- package/skills-codex/review-problems/agents/openai.yaml +3 -0
- package/skills-codex/scaffold-intake/SKILL.md +209 -0
- package/skills-codex/scaffold-intake/agents/openai.yaml +3 -0
- package/skills-codex/scaffold-intake/templates/CONTRIBUTING.md.tmpl +31 -0
- package/skills-codex/scaffold-intake/templates/SECURITY.md.tmpl +39 -0
- package/skills-codex/scaffold-intake/templates/SUPPORT.md.tmpl +32 -0
- package/skills-codex/scaffold-intake/templates/config.yml.tmpl +8 -0
- package/skills-codex/scaffold-intake/templates/problem-report.yml.tmpl +114 -0
- package/skills-codex/transition-problem/SKILL.md +371 -0
- package/skills-codex/transition-problem/agents/openai.yaml +3 -0
- package/skills-codex/transition-problems/SKILL.md +310 -0
- package/skills-codex/transition-problems/agents/openai.yaml +3 -0
- package/skills-codex/update-upstream/SKILL.md +583 -0
- package/skills-codex/update-upstream/agents/openai.yaml +3 -0
- package/skills-codex/work-problem/SKILL.md +160 -0
- package/skills-codex/work-problem/agents/openai.yaml +3 -0
- package/skills-codex/work-problems/SKILL.md +58 -0
- package/skills-codex/work-problems/agents/openai.yaml +3 -0
- package/templates/story-map.css +1 -1
- package/bin/wr-itil-mark-rfc-capture-gate +0 -51
- package/scripts/mark-rfc-capture-gate.sh +0 -32
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wr-itil:restore-incident
|
|
3
|
+
description: Mark an incident as service-restored — transitions a mitigating incident to restored, appends a Timeline entry, and hands off to /wr-itil:manage-problem for linked-problem creation or update per the "Add `manage-incident` Skill to `wr-itil` Plugin" architecture rule.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, request_user_input, Skill
|
|
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
|
+
# Restore Incident
|
|
19
|
+
|
|
20
|
+
Mark an active incident as service-restored and hand off to problem management for root-cause tracking. This skill is the active-restoration path — the point where the "cool-headed, evidence-first" incident lifecycle crosses from mitigation to post-restoration (the "Restore Service Fast with an Audit Trail" user outcome).
|
|
21
|
+
|
|
22
|
+
The first restore attempt moves the file from `.mitigating.md` to `.restored.md`, updates the `**Status**` field to "Restored", appends a verification-signal entry to the Timeline, and invokes `/wr-itil:manage-problem` via the installed skill invocation so a problem record captures the root-cause handoff. If the user declines problem creation with a justification, a `## No Problem` section is written on the incident instead — preserving the audit-trail invariant.
|
|
23
|
+
|
|
24
|
+
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> restored` 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 — only word-verb-arguments must be split out. The original `/wr-itil:manage-incident <I> restored` subcommand route remains as a thin-router forwarder during the deprecation window but is scheduled for removal in `@windyroad/itil`'s next major version.
|
|
25
|
+
|
|
26
|
+
## Arguments
|
|
27
|
+
|
|
28
|
+
`/wr-itil:restore-incident <I###>` — one positional data parameter:
|
|
29
|
+
|
|
30
|
+
- `<I###>` — the incident ID (e.g. `I007` or bare `007`). Resolves to `docs/incidents/<I###>-*.mitigating.md` (primary path) or `docs/incidents/<I###>-*.restored.md` (idempotent re-invocation).
|
|
31
|
+
|
|
32
|
+
If `$ARGUMENTS` is empty or malformed, fail-fast with a usage message and exit (per the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule Framework-Mediated Surface; matches the `mitigate-incident` Surface 1 / `transition-problem` / `work-problem` precedent). Argument malformation is a typo-class signal, not a decision — the slash command is the input contract; re-typing is faster than a multi-turn `request_user_input` dialogue, and the user-memory direction `feedback_act_on_obvious_decisions.md` pins this. This scopes to the `<I###>` ID only — the verification signal (Pre-flight / Step 3) and the problem-handoff decision (Step 5) remain genuine interactive user-authority surfaces. The exact usage block is in Step 1.
|
|
33
|
+
|
|
34
|
+
## Pre-flight (the "Add `manage-incident` Skill to `wr-itil` Plugin" architecture rule)
|
|
35
|
+
|
|
36
|
+
Restore requires two pre-flight conditions:
|
|
37
|
+
|
|
38
|
+
1. **Mitigation recorded**: at least one `[<timestamp> UTC] <action> → <outcome>` row in the `## Mitigation attempts` section. A restore with no mitigation recorded usually means the incident self-resolved — in that case the user should record the self-resolution as a mitigation entry first (e.g. `[<timestamp> UTC] (no action taken — issue self-resolved) → pending verification`).
|
|
39
|
+
2. **Verification signal captured**: the user must describe the signal that confirms service is restored (e.g. "error rate back to baseline per Datadog", "user reports normal", "synthetic probe passing"). This is the verification evidence that the restore is real, not wishful.
|
|
40
|
+
|
|
41
|
+
If either pre-flight fails, block the transition and ask via `request_user_input` what to do: (a) record a mitigation + verification signal now and retry, (b) document why this incident is an exception (e.g. Sev 4-5 lightweight path) and proceed with an Audit-trail note, (c) cancel.
|
|
42
|
+
|
|
43
|
+
## Steps
|
|
44
|
+
|
|
45
|
+
### 1. Parse arguments (fail-fast on typos — the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule Surface 1)
|
|
46
|
+
|
|
47
|
+
Extract `<I###>` from `$ARGUMENTS`. Normalise:
|
|
48
|
+
|
|
49
|
+
- Accept `I007`, `i007`, `007`, `7` → canonicalise to `I007` (uppercase I + zero-padded 3 digits).
|
|
50
|
+
- If missing, malformed, or unrecognisable, emit the usage block below and exit. **Do not** fire `request_user_input` for argument backfill — argument shape is a typo-class signal, not a decision. The framework-mediated answer per the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule is fail-fast + exit; the user re-types in 1 second. Matches the `mitigate-incident` Step 1 + `transition-problem` Step 1 + `work-problem` singular precedent for consistency across the suite (the "Extend the Suite with New Plugins" user outcome — clear patterns).
|
|
51
|
+
|
|
52
|
+
**Usage block** (emitted on any malformed-argument case; copy verbatim so adopters get a consistent shape):
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
Usage: /wr-itil:restore-incident <I###>
|
|
56
|
+
<I###> — incident ID (e.g. I007 or bare 007); must resolve to docs/incidents/<I###>-*.{mitigating,restored}.md
|
|
57
|
+
|
|
58
|
+
Run /wr-itil:list-incidents to see active incidents if you don't know the ID.
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 2. Locate the incident file
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
ls docs/incidents/<I###>-*.mitigating.md docs/incidents/<I###>-*.restored.md 2>/dev/null
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
- If neither exists (the incident is `.investigating.md` or `.closed.md`), report "No active mitigation-or-restored incident `<I###>` found. If the incident is still investigating, record at least one mitigation attempt via `/wr-itil:mitigate-incident <I###> <action>` first." and exit.
|
|
68
|
+
- If a `.mitigating.md` file matches, this is the restore transition (Case A in Step 4).
|
|
69
|
+
- If a `.restored.md` file matches, this is an idempotent re-invocation (Case B in Step 4).
|
|
70
|
+
- If multiple files match (should not happen under the naming convention), report the ambiguity and exit.
|
|
71
|
+
|
|
72
|
+
### 3. Pre-flight: verification signal + mitigation-attempts check
|
|
73
|
+
|
|
74
|
+
For the Case A path (restore transition), perform the pre-flight checks:
|
|
75
|
+
|
|
76
|
+
1. Read the `## Mitigation attempts` section. If it is missing, empty, or contains only `*(none yet)*`, the first pre-flight fails. Ask via `request_user_input`.
|
|
77
|
+
2. Ask via `request_user_input` for the verification signal if not already provided in `$ARGUMENTS`. The signal is free-text and should name the metric, probe, or report that confirms restoration.
|
|
78
|
+
|
|
79
|
+
### 4. Record the restore and transition if needed
|
|
80
|
+
|
|
81
|
+
Compute a UTC timestamp (e.g. `2026-04-21T14:37Z`). Then:
|
|
82
|
+
|
|
83
|
+
**Case A — first restore (`.mitigating.md` → `.restored.md`)**:
|
|
84
|
+
|
|
85
|
+
1. `git mv docs/incidents/<I###>-<title>.mitigating.md docs/incidents/<I###>-<title>.restored.md`
|
|
86
|
+
2. Update the `**Status**:` field from `Mitigating` to `Restored` via `Edit`.
|
|
87
|
+
3. Append to the `## Timeline` section:
|
|
88
|
+
|
|
89
|
+
```markdown
|
|
90
|
+
- [<timestamp> UTC] Service restored — <verification signal>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Case B — idempotent re-invocation (`.restored.md` stays `.restored.md`)**:
|
|
94
|
+
|
|
95
|
+
1. No `git mv` needed.
|
|
96
|
+
2. Do not re-edit the `**Status**:` field.
|
|
97
|
+
3. If a verification signal was provided in `$ARGUMENTS` and differs from the existing Timeline, append an additional `[<timestamp> UTC] Service restored (re-verified) — <verification signal>` line to the `## Timeline`. Otherwise, skip the Timeline append and proceed to Step 5 (the user may be re-running the handoff).
|
|
98
|
+
|
|
99
|
+
### 5. Problem handoff
|
|
100
|
+
|
|
101
|
+
Ask via `request_user_input`: "Service restored. Should I create or update a problem record for the root cause? (a) yes — recommended, (b) no — document why (trivial/one-off)".
|
|
102
|
+
|
|
103
|
+
**Branch (a) — Yes, create or update problem**:
|
|
104
|
+
|
|
105
|
+
1. Construct a handoff payload:
|
|
106
|
+
- Incident ID and title
|
|
107
|
+
- Timeline summary (most recent entries)
|
|
108
|
+
- Top-ranked hypothesis + cited evidence from `## Hypotheses`
|
|
109
|
+
- Mitigation applied + verification signal from `## Mitigation attempts` + the just-appended Timeline entry
|
|
110
|
+
2. Invoke `/wr-itil:manage-problem` via the **installed skill invocation** with the payload as arguments. The problem skill's existing dedupe flow handles new-vs-update — do not duplicate that logic here.
|
|
111
|
+
3. Capture the returned `P<NNN>` (or `P<NNN> (updated)` for a dedupe hit).
|
|
112
|
+
4. Write (or update) the incident's `## Linked Problem` section:
|
|
113
|
+
|
|
114
|
+
```markdown
|
|
115
|
+
## Linked Problem
|
|
116
|
+
P<NNN> (<title>) — <status>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
If the section already exists, edit it in place; otherwise append at the end of the file.
|
|
120
|
+
|
|
121
|
+
**Branch (b) — No, document the no-problem justification**:
|
|
122
|
+
|
|
123
|
+
1. Ask via `request_user_input` for the justification (free-text). Examples: "one-off cosmic-bit-flip; not reproducible", "transient upstream outage; no action on our side", "test incident (training exercise)".
|
|
124
|
+
2. Write a `## No Problem` section into the incident file:
|
|
125
|
+
|
|
126
|
+
```markdown
|
|
127
|
+
## No Problem
|
|
128
|
+
<reason — e.g. "one-off cosmic-bit-flip; not reproducible">
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
If a `## Linked Problem` section exists, replace it with the `## No Problem` section (one or the other — never both).
|
|
132
|
+
|
|
133
|
+
### 6. Quality checks
|
|
134
|
+
|
|
135
|
+
After the restore, verify:
|
|
136
|
+
|
|
137
|
+
- **Status consistency**: `**Status**:` field matches the filename suffix (`Restored` + `.restored.md`).
|
|
138
|
+
- **Timeline monotonicity**: the new "Service restored" entry's timestamp is ≥ the last existing timeline entry's timestamp.
|
|
139
|
+
- **Post-restore sections present**: exactly one of `## Linked Problem` or `## No Problem` exists; never both, never neither.
|
|
140
|
+
|
|
141
|
+
### 7. Report
|
|
142
|
+
|
|
143
|
+
Report:
|
|
144
|
+
|
|
145
|
+
- The file path created/modified.
|
|
146
|
+
- The incident ID and title.
|
|
147
|
+
- The transition (Mitigating → Restored, or Restored → Restored for re-invocations).
|
|
148
|
+
- The verification signal recorded.
|
|
149
|
+
- Whether a problem was created, updated, or skipped with a `## No Problem` justification.
|
|
150
|
+
- The linked problem ID (if any).
|
|
151
|
+
- A pointer: "Run `/wr-itil:close-incident <I###>` when the linked problem reaches Known Error, Verifying, or Closed (or if the incident carries a No Problem justification), or keep the incident in Restored while the root cause work progresses."
|
|
152
|
+
|
|
153
|
+
### 8. Commit the completed work (the "Governance Skills Commit Their Own Completed Work" architecture rule)
|
|
154
|
+
|
|
155
|
+
Per the "Governance Skills Commit Their Own Completed Work" architecture rule, governance skills commit their own work.
|
|
156
|
+
|
|
157
|
+
1. `git add` the renamed / modified incident file.
|
|
158
|
+
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.
|
|
159
|
+
3. `git commit -m "docs(incidents): I<NNN> restored — <verification signal summary>"`.
|
|
160
|
+
4. If commit risk is above appetite: **framework-mediated, no ask** (the "Skills, agents, and hooks override RISK-POLICY appetite instead of applying it" problem/the ": Apply RISK-POLICY appetite faithfully across all surfaces" release design — no incident carve-out). Per **the "Auto-apply scorer remediations to reach within appetite — open action-class vocabulary" architecture rule Rule 1b**: score the restore action against the live realised-risk baseline (incident Likelihood already 5) — net risk-reducing actions take the risk-reducing path (`RISK_BYPASS: reducing`) and proceed; otherwise auto-remediate (Rule 1) or halt (Rule 5). **MUST NOT commit above appetite; MUST NOT `request_user_input` "commit anyway".** If `request_user_input` is unavailable, the "Structured User Interaction for Governance-Skill Decisions" architecture rule Rule 6 fail-safe — skip the commit and report the uncommitted state.
|
|
161
|
+
|
|
162
|
+
### 9. Auto-release when changesets are queued (the "Governance skills auto-release when changesets are queued" architecture rule)
|
|
163
|
+
|
|
164
|
+
**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.
|
|
165
|
+
|
|
166
|
+
Otherwise, after the commit in step 8 lands, drain the release queue so the fix actually lands on npm without requiring manual user action.
|
|
167
|
+
|
|
168
|
+
**Mechanism — delegate, do not re-implement scoring (per the "On-Demand Assessment Skills for Governance Plugins" architecture rule):**
|
|
169
|
+
|
|
170
|
+
1. Invoke the release scorer. Two paths are valid:
|
|
171
|
+
- **Primary**: delegate to subagent type `wr-risk-scorer:pipeline` via the native Codex subagent tool.
|
|
172
|
+
- **Fallback**: if that subagent type is not available, invoke skill `/wr-risk-scorer:assess-release` via the installed skill invocation.
|
|
173
|
+
2. Read the returned `RISK_SCORES: commit=X push=Y release=Z` line.
|
|
174
|
+
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.
|
|
175
|
+
|
|
176
|
+
**Drain action (non-interactive, policy-authorised per the "Structured User Interaction for Governance-Skill Decisions" architecture rule Rule 6):**
|
|
177
|
+
|
|
178
|
+
1. Run `npm run push:watch` (push + wait for CI to pass).
|
|
179
|
+
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).
|
|
180
|
+
3. Report the release: "Released <package>@<version>. Restoration record is now live on npm."
|
|
181
|
+
|
|
182
|
+
**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.
|
|
183
|
+
|
|
184
|
+
**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."
|
|
185
|
+
|
|
186
|
+
## Ownership boundary
|
|
187
|
+
|
|
188
|
+
`restore-incident` writes the Timeline "Service restored" entry, the Status field, the file rename on the transition, and exactly one of `## Linked Problem` or `## No Problem`. It does NOT:
|
|
189
|
+
|
|
190
|
+
- Close the incident (that is `/wr-itil:close-incident <I###>` — slice 6c).
|
|
191
|
+
- Link the incident to an existing problem without performing the restore transition (that is `/wr-itil:link-incident <I###> P<MMM>` — slice 6d).
|
|
192
|
+
- Record a mitigation attempt (that is `/wr-itil:mitigate-incident <I###> <action>` — slice 6a).
|
|
193
|
+
- Rename or transition a `.investigating.md` file — the incident must already be `.mitigating.md` before restore.
|
|
194
|
+
|
|
195
|
+
If the user wants any of the above, the skill reports the appropriate sibling and exits.
|
|
196
|
+
|
|
197
|
+
## Related
|
|
198
|
+
|
|
199
|
+
- **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 6b of the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem phased-landing plan.
|
|
200
|
+
- **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.
|
|
201
|
+
- **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`) + Decision Outcome point 4 (direct installed-skill-invocation invocation of `/wr-itil:manage-problem` for problem handoff).
|
|
202
|
+
- **the "Structured User Interaction for Governance-Skill Decisions" architecture rule** Rule 1 — structured user interaction (verification-signal and handoff prompts use request_user_input; deprecation notice uses systemMessage).
|
|
203
|
+
- **the "Structured User Interaction for Governance-Skill Decisions" architecture rule** Rule 6 — policy-within-appetite non-interactive actions (release drain).
|
|
204
|
+
- **the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule** (`docs/decisions/044-decision-delegation-contract.proposed.md`) — Framework-Mediated Surface: `<I###>` argument-shape backfill is a typo-class signal resolved by fail-fast + exit (Arguments + Step 1), NOT a user decision. The genuine user-authority asks remain interactive per the 6-class taxonomy: verification-signal + mitigation-attempts pre-flight (cat-2 deviation-approval), problem-handoff + no-problem justification (cat-1 direction-setting). the "alignment audit — sweep all unaudited skills/hooks/agents/ADRs/JTBDs/READMEs against the framework-resolution boundary (master ticket)" problem Phase-remediation surface (mirrors the shipped `mitigate-incident` Surface 1).
|
|
205
|
+
- **the "Governance Skills Commit Their Own Completed Work" architecture rule** — governance skills commit their own work.
|
|
206
|
+
- **the "On-Demand Assessment Skills for Governance Plugins" architecture rule** — release scorer delegation pattern.
|
|
207
|
+
- **the "Governance skills auto-release when changesets are queued" architecture rule** — auto-release when changesets are queued.
|
|
208
|
+
- **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.
|
|
209
|
+
- **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.
|
|
210
|
+
- **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.
|
|
211
|
+
- **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`) — this skill IS the active-restoration path; audit trail invariants preserved post-split.
|
|
212
|
+
- `<itil-plugin-root>/skills/manage-incident/SKILL.md` — hosts the thin-router forwarder for the deprecated `manage-incident <I###> restored` form.
|
|
213
|
+
- `<itil-plugin-root>/skills/mitigate-incident/SKILL.md` — slice 6a precedent; restore-incident mirrors the split shape.
|
|
214
|
+
- `<itil-plugin-root>/skills/manage-problem/SKILL.md` — cross-skill invocation target during problem handoff.
|
|
215
|
+
|
|
216
|
+
$ARGUMENTS
|