@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,378 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wr-itil:manage-incident
|
|
3
|
+
description: Declare, triage, mitigate, and close an incident using an evidence-first workflow. Restores service first, then hands off to manage-problem for root-cause work.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, request_user_input, Skill
|
|
5
|
+
deprecated-arguments: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Generated from the runtime-neutral skill source. Do not edit. -->
|
|
9
|
+
|
|
10
|
+
> Codex runtime note: use `request_user_input` only where this contract
|
|
11
|
+
> explicitly requires a human decision. Resolve `<itil-plugin-root>` from
|
|
12
|
+
> this installed `SKILL.md`: it is two directories above the skill
|
|
13
|
+
> directory. Run bundled commands from `<itil-plugin-root>/bin/`; do not
|
|
14
|
+
> search the adopter repository or rely on those commands being on `PATH`.
|
|
15
|
+
> Spawn `wr-itil:hang-off-check` with the native Codex subagent tool, wait
|
|
16
|
+
> for it, and close that same agent.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# Incident Management Skill
|
|
20
|
+
|
|
21
|
+
Declare, triage, mitigate, and close an incident using an evidence-first, cool-headed workflow. This skill's primary goal is **restoring service**. Once service is restored, the skill hands off to `wr-itil:manage-problem` so the underlying cause is tracked.
|
|
22
|
+
|
|
23
|
+
Incidents are time-bound events. Problems are persistent root causes. One problem can cause many incidents; one incident may (or may not) link to a problem.
|
|
24
|
+
|
|
25
|
+
## Operations
|
|
26
|
+
|
|
27
|
+
- **Declare**: `incident <title or symptoms>` — creates a new investigating incident
|
|
28
|
+
- **Update**: `incident <NNN> <details>` — append observations, evidence, or actions
|
|
29
|
+
- **Mitigate**: `incident <NNN> mitigate <action>` — record a mitigation attempt and outcome
|
|
30
|
+
- **Restore**: `incident <NNN> restored` — transition to `.restored.md` and trigger problem handoff
|
|
31
|
+
- **Close**: `incident <NNN> close` — only allowed when the linked problem is Known Error or Closed (or an explicit "no problem required" justification is recorded)
|
|
32
|
+
- **List**: `incident list` — active incidents, severity-sorted
|
|
33
|
+
- **Link**: `incident <NNN> link P<MMM>` — link an incident to an existing problem
|
|
34
|
+
|
|
35
|
+
## Lifecycle
|
|
36
|
+
|
|
37
|
+
| Status | File suffix | Meaning | Entry criteria |
|
|
38
|
+
|--------|-------------|---------|----------------|
|
|
39
|
+
| **Investigating** | `.investigating.md` | Symptoms reported, scope being established | Incident declared |
|
|
40
|
+
| **Mitigating** | `.mitigating.md` | Mitigation(s) in flight | At least one ranked hypothesis with cited evidence |
|
|
41
|
+
| **Restored** | `.restored.md` | Service verified restored | Mitigation applied + verification signal recorded |
|
|
42
|
+
| **Closed** | `.closed.md` | Incident complete | Linked problem is Known Error or Closed (or "no problem required" justification documented) |
|
|
43
|
+
|
|
44
|
+
## Evidence-First Workflow (The Cool-Headed Commitment)
|
|
45
|
+
|
|
46
|
+
During an incident, the instinct to jump to conclusions is strong. This skill forces evidence-first discipline via a required template. **Do not act on a hypothesis without at least one cited evidence source.**
|
|
47
|
+
|
|
48
|
+
### Required sections in every incident file
|
|
49
|
+
|
|
50
|
+
```markdown
|
|
51
|
+
## Observations
|
|
52
|
+
- [timestamp] <what was seen, from where — e.g. "14:02 UTC, 500s on /api/orders in Datadog dashboard foo">
|
|
53
|
+
|
|
54
|
+
## Hypotheses
|
|
55
|
+
- [ranked] <hypothesis> — Evidence: <log/repro/diff/metric reference>. Confidence: <low|med|high>.
|
|
56
|
+
|
|
57
|
+
## Mitigation attempts
|
|
58
|
+
- [timestamp] <action> → <outcome / verification signal>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Mitigation preference
|
|
62
|
+
|
|
63
|
+
Prefer **reversible** mitigations over forward fixes:
|
|
64
|
+
|
|
65
|
+
1. Rollback to a known-good version
|
|
66
|
+
2. Feature flag off
|
|
67
|
+
3. Restart / cycle the affected component
|
|
68
|
+
4. Route traffic away
|
|
69
|
+
5. Scale up
|
|
70
|
+
6. Only after reversibles are exhausted: forward fix
|
|
71
|
+
|
|
72
|
+
Record every attempt, successful or not.
|
|
73
|
+
|
|
74
|
+
**Mitigation SELECTION is agent-owned — do NOT defer "which mitigation" to the user (the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule framework-mediated surface; category-4 silent-framework family).** Choosing *which* mitigation to attempt — traversing the ladder above, backed by cited evidence, within risk appetite — is the agent's call, not a user-authority decision. The framework already resolved it (the ladder is the selection mechanism, the evidence-first gate is the quality bar, RISK-POLICY appetite is the bound). Do NOT surface "which mitigation should I attempt?" via `request_user_input` **or** a prose-ask ("I'll wait for your direction on which mitigation to attempt"). Authority: the "Structured User Interaction for Governance-Skill Decisions" architecture rule Rule 5; the "Restore Service Fast with an Audit Trail" user outcome ("reversible mitigations are preferred"); user direction 2026-05-10 — *"mitigations don't belong to me. You are empowered."* (the "Agent defers mitigation selection to user during active incident — surfaces mitigation choice as user-authority when SKILL contract empowers agent-driven reversible mitigations" problem). Genuine user-authority surfaces are unchanged: the evidence-gate bypass (the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule category-2, Step 6) and the risk-above-appetite commit (category-3, Step 14). Mitigation execution is delegated to `/wr-itil:mitigate-incident` (Step 7), which carries the same empowerment annotation.
|
|
75
|
+
|
|
76
|
+
## Severity, not WSJF
|
|
77
|
+
|
|
78
|
+
Incidents are severity-driven and time-boxed. **WSJF does not apply to incidents** — the "effort" divisor is meaningless during a live event. WSJF applies to the resulting problem created via handoff.
|
|
79
|
+
|
|
80
|
+
Severity uses the Impact × Likelihood matrix from `RISK-POLICY.md`, interpreted as "right now, what's the live business impact?" — not "in general, how bad could this be?".
|
|
81
|
+
|
|
82
|
+
## Steps
|
|
83
|
+
|
|
84
|
+
### 1. Parse the request
|
|
85
|
+
|
|
86
|
+
Determine the operation from `$ARGUMENTS`:
|
|
87
|
+
|
|
88
|
+
- If arguments start with "list" → **delegate to `/wr-itil:list-incidents`** via the installed skill invocation. See "Deprecated-argument forwarders" below.
|
|
89
|
+
- If arguments match `<I###> mitigate <action>` → **delegate to `/wr-itil:mitigate-incident <I###> <action>`** via the installed skill invocation. See "Deprecated-argument forwarders" below.
|
|
90
|
+
- If arguments match `<I###> restored` → **delegate to `/wr-itil:restore-incident <I###>`** via the installed skill invocation. See "Deprecated-argument forwarders" below.
|
|
91
|
+
- If arguments match `<I###> close` → **delegate to `/wr-itil:close-incident <I###>`** via the installed skill invocation. See "Deprecated-argument forwarders" below.
|
|
92
|
+
- If arguments match `<I###> link P<MMM>` → **delegate to `/wr-itil:link-incident <I###> P<MMM>`** via the installed skill invocation. See "Deprecated-argument forwarders" below.
|
|
93
|
+
- If arguments start with `I<NNN>` or a bare number → this is an update
|
|
94
|
+
- Otherwise → declare a new incident
|
|
95
|
+
|
|
96
|
+
#### Deprecated-argument forwarders (the "Rename `wr-problem` Plugin to `wr-itil`" architecture rule amended + the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem)
|
|
97
|
+
|
|
98
|
+
Per the "Rename `wr-problem` Plugin to `wr-itil`" architecture rule's amended Skill Granularity section, word-argument subcommands that name distinct user intents are being split into their own named skills. During the deprecation window, this skill's Step 1 parser retains the legacy argument routes as **thin-router forwarders** that re-invoke the new named skill via the installed skill invocation AND emit a one-line systemMessage with the canonical deprecation notice so the user learns the new invocation shape.
|
|
99
|
+
|
|
100
|
+
**Forwarder for `list`** (the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem split slice 5 — new skill `/wr-itil:list-incidents`):
|
|
101
|
+
|
|
102
|
+
When `$ARGUMENTS` contains the word `list` as a top-level argument (not inside an incident body edit), delegate to `/wr-itil:list-incidents` via the installed skill invocation and emit this systemMessage verbatim:
|
|
103
|
+
|
|
104
|
+
> `/wr-itil:manage-incident list is deprecated; use /wr-itil:list-incidents directly. This forwarder will be removed in @windyroad/itil's next major version.`
|
|
105
|
+
|
|
106
|
+
The forwarder does NOT re-implement the list logic locally — it invokes the installed skill invocation with `wr-itil:list-incidents` and returns the new skill's output verbatim. Duplicating the scan logic would harden the deprecation window into a permanent fork.
|
|
107
|
+
|
|
108
|
+
**Forwarder for `<I###> mitigate <action>`** (the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem split slice 6a — new skill `/wr-itil:mitigate-incident`):
|
|
109
|
+
|
|
110
|
+
When `$ARGUMENTS` matches the shape `<I###> mitigate <action>` (an incident ID followed by the literal word `mitigate` followed by a free-text action), delegate to `/wr-itil:mitigate-incident <I###> <action>` via the installed skill invocation and emit this systemMessage verbatim:
|
|
111
|
+
|
|
112
|
+
> `/wr-itil:manage-incident <I###> mitigate <action> is deprecated; use /wr-itil:mitigate-incident <I###> <action> directly. This forwarder will be removed in @windyroad/itil's next major version.`
|
|
113
|
+
|
|
114
|
+
The forwarder does NOT re-implement the mitigation logic locally — it invokes the installed skill invocation with `wr-itil:mitigate-incident`, passes `<I###> <action>` through as the data parameters, and returns the new skill's output verbatim. Duplicating the rename + evidence-gate + timeline-append logic would harden the deprecation window into a permanent fork. The data-parameter shape `<I###> <action>` is permitted under the "Rename `wr-problem` Plugin to `wr-itil`" architecture rule amended — only the verb word `mitigate` is being split out.
|
|
115
|
+
|
|
116
|
+
**Forwarder for `<I###> restored`** (the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem split slice 6b — new skill `/wr-itil:restore-incident`):
|
|
117
|
+
|
|
118
|
+
When `$ARGUMENTS` matches the shape `<I###> restored` (an incident ID followed by the literal word `restored`), delegate to `/wr-itil:restore-incident <I###>` via the installed skill invocation and emit this systemMessage verbatim:
|
|
119
|
+
|
|
120
|
+
> `/wr-itil:manage-incident <I###> restored is deprecated; use /wr-itil:restore-incident <I###> directly. This forwarder will be removed in @windyroad/itil's next major version.`
|
|
121
|
+
|
|
122
|
+
The forwarder does NOT re-implement the restore logic locally — it invokes the installed skill invocation with `wr-itil:restore-incident`, passes `<I###>` through as the data parameter, and returns the new skill's output verbatim. Duplicating the rename + verification-signal prompt + manage-problem handoff logic would harden the deprecation window into a permanent fork.
|
|
123
|
+
|
|
124
|
+
**Forwarder for `<I###> close`** (the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem split slice 6c — new skill `/wr-itil:close-incident`):
|
|
125
|
+
|
|
126
|
+
When `$ARGUMENTS` matches the shape `<I###> close` (an incident ID followed by the literal word `close`), delegate to `/wr-itil:close-incident <I###>` via the installed skill invocation and emit this systemMessage verbatim:
|
|
127
|
+
|
|
128
|
+
> `/wr-itil:manage-incident <I###> close is deprecated; use /wr-itil:close-incident <I###> directly. This forwarder will be removed in @windyroad/itil's next major version.`
|
|
129
|
+
|
|
130
|
+
The forwarder does NOT re-implement the close logic locally — it invokes the installed skill invocation with `wr-itil:close-incident`, passes `<I###>` through as the data parameter, and returns the new skill's output verbatim. Duplicating the linked-problem gate + rename logic would harden the deprecation window into a permanent fork.
|
|
131
|
+
|
|
132
|
+
**Forwarder for `<I###> link P<MMM>`** (the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem split slice 6d — new skill `/wr-itil:link-incident`):
|
|
133
|
+
|
|
134
|
+
When `$ARGUMENTS` matches the shape `<I###> link P<MMM>` (an incident ID followed by the literal word `link` followed by a problem ID), delegate to `/wr-itil:link-incident <I###> P<MMM>` via the installed skill invocation and emit this systemMessage verbatim:
|
|
135
|
+
|
|
136
|
+
> `/wr-itil:manage-incident <I###> link P<MMM> is deprecated; use /wr-itil:link-incident <I###> P<MMM> directly. This forwarder will be removed in @windyroad/itil's next major version.`
|
|
137
|
+
|
|
138
|
+
The forwarder does NOT re-implement the link logic locally — it invokes the installed skill invocation with `wr-itil:link-incident`, passes `<I###> P<MMM>` through as the data parameters, and returns the new skill's output verbatim. Duplicating the problem-file-lookup + Linked Problem section write logic would harden the deprecation window into a permanent fork. The data-parameter shape `<I###> P<MMM>` is permitted under the "Rename `wr-problem` Plugin to `wr-itil`" architecture rule amended — only the verb word `link` is being split out.
|
|
139
|
+
|
|
140
|
+
### 2. For new incidents: Check for duplicates FIRST (the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule category-1 direction-setting)
|
|
141
|
+
|
|
142
|
+
Before creating, search `docs/incidents/` for active (non-closed) incidents with overlapping symptoms or scope. The user may already have an incident open for this outage.
|
|
143
|
+
|
|
144
|
+
1. Extract keywords from the description (e.g., "500 errors", "checkout", "login").
|
|
145
|
+
2. `grep -l` the keywords across `docs/incidents/*.{investigating,mitigating,restored}.md`.
|
|
146
|
+
3. If matches are found, present them via `request_user_input` (this is the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule **category-1 (direction-setting)** surface — only the user knows whether the new symptoms describe the same outage as an existing ticket; the framework cannot resolve semantic similarity deterministically). Construct the call as:
|
|
147
|
+
- `header: "Active incidents found"`
|
|
148
|
+
- `multiSelect: false`
|
|
149
|
+
- `question` body (plain prose, no parenthetical option-letters and no prose-ask phrasing per the "Structured User Interaction for Governance-Skill Decisions" architecture rule Confirmation criterion #1; the structured `options[]` below replaces both): `"I found active incidents that may be related: I003 (checkout 500s, mitigating), I007 (login slowness, investigating). Choose how to proceed:"`
|
|
150
|
+
- `options[]`:
|
|
151
|
+
1. `Update an existing incident` — description: "Switch to the update flow for the chosen incident ID; you'll name the ID in the next step."
|
|
152
|
+
2. `Declare a new incident anyway` — description: "Proceed to Step 3 (assign next ID) and treat this as a distinct event."
|
|
153
|
+
3. `Cancel` — description: "Exit without creating or modifying any incident."
|
|
154
|
+
4. If the user chooses **Update an existing incident**, switch to the update flow for the user-named incident ID.
|
|
155
|
+
5. If no matches, proceed to create.
|
|
156
|
+
|
|
157
|
+
### 3. For new incidents: Assign the next ID
|
|
158
|
+
|
|
159
|
+
Create `docs/incidents/` if it does not exist. Then scan for the highest existing `I<NNN>` and increment:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
mkdir -p docs/incidents
|
|
163
|
+
last=$(ls docs/incidents/I*.md 2>/dev/null | sed 's/.*\///' | grep -oE '^I[0-9]+' | sed 's/^I//' | sort -n | tail -1)
|
|
164
|
+
next=$(printf 'I%03d' $((10#${last:-0} + 1)))
|
|
165
|
+
echo "$next"
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### 4. For new incidents: Gather information (the "Agents over-ask in interactive sessions — conflating mechanical-stages with user-interactive-stages of multi-stage skill contracts (inverse-)" problem derive-first; the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule category-4 silent-framework on derivable fields; category-1 direction-setting fallback only on Scope)
|
|
169
|
+
|
|
170
|
+
**Shared dispatch helper**: this surface invokes `<itil-plugin-root>/lib/derive-first-dispatch.sh` for the canonical slug derivation (Title), RISK-POLICY matrix lookup (Severity), and I2-isomorphic stderr advisory format. The helper is sourced by `/wr-itil:capture-problem`, `/wr-itil:manage-incident`, and `/wr-itil:manage-problem`; drift in the advisory shape re-opens the "Agents over-ask in interactive sessions — conflating mechanical-stages with user-interactive-stages of multi-stage skill contracts (inverse-)" problem. Surface-specific signal definitions (severity impact / likelihood regex lists, start-time evidence sources) stay inline below — the helper owns the mechanism, not the per-surface signals (architect verdict 2026-05-15 the "Agents over-ask in interactive sessions — conflating mechanical-stages with user-interactive-stages of multi-stage skill contracts (inverse-)" problem Phase 2a-iii-A: "Helper must preserve per-surface signal definitions; only the dispatch mechanism is shared").
|
|
171
|
+
|
|
172
|
+
**Derive-first dispatch.** Incident declarations carry observable evidence in the user's prose, the working tree, `RISK-POLICY.md`, and the wall-clock — the framework can resolve most fields without firing `request_user_input`. Only **Scope** is genuinely user-judgment (semantic blast-radius the framework cannot infer); only **Scope** retains the request_user_input gate.
|
|
173
|
+
|
|
174
|
+
The "Agents over-ask in interactive sessions — conflating mechanical-stages with user-interactive-stages of multi-stage skill contracts (inverse-)" problem inverse-the "Problem 078: Assistant does not offer to capture a problem ticket when the user delivers strong-signal correction" problem trap (`docs/problems/known-error/132-...md`) is the load-bearing motivation: the I001 declaration regression fired a 4-question request_user_input with 3 of 4 sub-questions being lazy classifications (Title kebab-derivable, Severity matrix-derivable, Start time git-log-derivable). This dispatch closes that regression on the manage-incident surface and mirrors `/wr-itil:capture-problem` Step 1.5's worked-example pattern (the "`/wr-itil:capture-problem` asks a classification question (technical vs user-business) that it can answer itself from the description's observable evidence" problem derive-first refactor).
|
|
175
|
+
|
|
176
|
+
Resolve each field via the following dispatch. **The order is load-bearing** — every field except Scope resolves silently with a stderr advisory citing the source; Scope alone fires `request_user_input` as the genuine category-1 surface.
|
|
177
|
+
|
|
178
|
+
| Field | Dispatch | the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule category |
|
|
179
|
+
|-------|----------|------------------|
|
|
180
|
+
| **Title** | Derive silently. Kebab-case the first 8-10 non-stopword tokens of the user's prose description (same slug derivation as `/wr-itil:capture-problem` Step 1.4 and `/wr-itil:manage-problem` Step 4). Emit stderr advisory: `manage-incident: derived title='<slug>' from description; re-invoke or rename the file if the slug is wrong`. Do NOT fire request_user_input. | category-4 silent-framework |
|
|
181
|
+
| **Symptoms** | Pull from user prose verbatim — the description text IS the symptoms surface for declaration. Place into the `## Observations` section template at Step 5. Do NOT fire request_user_input. | category-4 silent-framework |
|
|
182
|
+
| **Start time** | Derive silently, three sources in priority order: (a) explicit timestamp in description (regex `\b\d{4}-\d{2}-\d{2}([ T]\d{2}:\d{2})?\b`, or relative form `"<N> (minutes|hours|days) ago"` resolved against current wall-clock); (b) if the description cites a specific file or directory, run `git log --diff-filter=A --follow -- <path> \| tail -1` for first-touch evidence; (c) otherwise default to current wall-clock UTC. Emit stderr advisory: `manage-incident: start-time derived as <ts> from <source>; cite an additional evidence anchor in the Timeline section if symptoms began earlier`. Do NOT fire request_user_input. | category-4 silent-framework |
|
|
183
|
+
| **Severity** | Derive silently when evidence maps to a clear `RISK-POLICY.md` Impact × Likelihood cell. Cross-reference description signals against the matrix: (a) impact signals (service disruption keywords like `down` / `degraded` / `unavailable` → high; latency / throughput keywords → moderate; cosmetic / typo keywords → low); (b) likelihood signals (`reproducible` / `every request` → high; `intermittent` / `flaky` → medium; `one-off` / `single user` → low); (c) named anchors (held-cluster age cited → use that age to map cell; scorer state cited → use the cited band). When the cross-reference produces a single clear cell, set it silently and emit stderr advisory: `manage-incident: severity derived as <score> (<label>) from RISK-POLICY matrix + evidence: <evidence list>; re-invoke or update if mis-rated`. **Ambiguous-evidence fallback** (no mappable signal in description, or signals point to conflicting cells): fire request_user_input with the Impact (1-5) × Likelihood (1-5) options as the genuine the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule **category-5 (taste)** fallback surface. The fallback is genuine ambiguity, NOT defaults. | category-4 silent-framework (derivable); category-5 fallback (ambiguous) |
|
|
184
|
+
| **Scope** | Retain request_user_input. Scope is the user-judgment surface — only the user knows whether downstream-adopter-risk is in scope, whether mobile is affected, whether the blast radius extends past the cited symptoms. The framework cannot resolve semantic scope deterministically (same reasoning as Step 2 duplicate-check). Construct the call with `header: "Incident scope"`, `multiSelect: false` if a closed enum applies or free-text capture otherwise. This is the canonical the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule **category-1 (direction-setting)** surface — *"only the user knows the goals that haven't been written down yet."* | category-1 direction-setting |
|
|
185
|
+
|
|
186
|
+
**Inferred fields (no ask, no advisory needed)**:
|
|
187
|
+
|
|
188
|
+
- **Reported**: today's date (UTC)
|
|
189
|
+
- **Status**: always "Investigating" for new incidents
|
|
190
|
+
|
|
191
|
+
**Stderr advisory contract**: each derived field emits a SINGLE line to stderr (NOT stdout, NOT in the ticket body) per the capture-problem Step 1.5 pattern. The advisory text shape is I2-isomorphic — identical sentence structure across fields beyond substituted values + source names. Embedding the advisory in stdout would risk machine-readers parsing it as a ticket-body line; embedding it in the ticket body would violate the "Add `manage-incident` Skill to `wr-itil` Plugin" architecture rule's required-section schema. Stderr is the correct channel — visible to interactive maintainers in the terminal; invisible to ticket consumers; loggable by orchestrators that capture subprocess stderr.
|
|
192
|
+
|
|
193
|
+
**the "Agent output grounding — no fabricated quantitative estimates, cite + persist + uncertainty" architecture rule cost-source grounding**: each derived field cites its source in the advisory (description token sequence for Title; explicit-regex / `git log` / wall-clock for Start time; RISK-POLICY matrix cell + named evidence for Severity). The `re-invoke or update if mis-rated` clause carries the reversibility marker the "Agent output grounding — no fabricated quantitative estimates, cite + persist + uncertainty" architecture rule mandates for ungrounded outputs.
|
|
194
|
+
|
|
195
|
+
**AFK fail-safe (the "Structured User Interaction for Governance-Skill Decisions" architecture rule Rule 6)**: under AFK orchestration, all derivable fields resolve without interactive input; only Scope's request_user_input can block. The orchestrator should halt-with-stderr citing which field needed input rather than guess (Scope is genuinely user-judgment per the ": Progress the Backlog While I'm Away" user outcome's "Problems requiring my judgment ... are queued for my return, not guessed at"). manage-incident is rarely AFK-invoked because incidents are interactive by design (the "Restore Service Fast with an Audit Trail" user outcome), so the halt-on-Scope path is the expected behaviour, not a regression.
|
|
196
|
+
|
|
197
|
+
### 5. For new incidents: Write the incident file
|
|
198
|
+
|
|
199
|
+
**File path**: `docs/incidents/<I###>-<kebab-case-title>.investigating.md`
|
|
200
|
+
|
|
201
|
+
**Template**:
|
|
202
|
+
|
|
203
|
+
```markdown
|
|
204
|
+
# Incident <I###>: <Title>
|
|
205
|
+
|
|
206
|
+
**Status**: Investigating
|
|
207
|
+
**Reported**: <YYYY-MM-DD HH:MM UTC>
|
|
208
|
+
**Severity**: <score> (<label>) — Impact: <label> (<n>) x Likelihood: <label> (<n>)
|
|
209
|
+
**Scope**: <who/what is affected>
|
|
210
|
+
|
|
211
|
+
## Timeline
|
|
212
|
+
|
|
213
|
+
- [<start-time> UTC] Symptoms began
|
|
214
|
+
- [<reported-time> UTC] Incident declared
|
|
215
|
+
|
|
216
|
+
## Observations
|
|
217
|
+
|
|
218
|
+
- [<timestamp> UTC] <what was seen, from where>
|
|
219
|
+
|
|
220
|
+
## Hypotheses
|
|
221
|
+
|
|
222
|
+
- [ranked] <hypothesis> — Evidence: <log/repro/diff/metric reference>. Confidence: <low|med|high>.
|
|
223
|
+
|
|
224
|
+
## Mitigation attempts
|
|
225
|
+
|
|
226
|
+
*(none yet)*
|
|
227
|
+
|
|
228
|
+
## Linked Problem
|
|
229
|
+
|
|
230
|
+
*(none yet — added on restore transition)*
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### 6. For updates: Edit the existing file (evidence gate is the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule category-2 deviation-approval)
|
|
234
|
+
|
|
235
|
+
Find the file by ID:
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
ls docs/incidents/<I###>-*.md 2>/dev/null
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Append new observations, hypotheses, or timeline entries. **Every hypothesis must cite evidence.** If the user proposes a hypothesis without evidence, fire the **3-option evidence gate** — same shape as `/wr-itil:mitigate-incident` Step 3, for cross-skill cool-headed-commitment consistency. This is the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule **category-2 (deviation-approval)** surface: the "Add `manage-incident` Skill to `wr-itil` Plugin" architecture rule's evidence-first rule is the existing decision; "Record anyway" is the user-approved deviation in this specific case. The user is the right authority for the bypass shape.
|
|
242
|
+
|
|
243
|
+
Construct the `request_user_input` call as:
|
|
244
|
+
|
|
245
|
+
- `header: "Evidence gate"`
|
|
246
|
+
- `multiSelect: false`
|
|
247
|
+
- `question` body: `"Hypothesis '<one-line summary>' has no cited evidence reference. Per the "Add `manage-incident` Skill to `wr-itil` Plugin" architecture rule evidence-first rule, every hypothesis must cite a log / repro / diff / metric reference. Choose how to proceed:"`
|
|
248
|
+
- `options[]`:
|
|
249
|
+
1. `Add evidence now` — description: "Provide the evidence reference (log line, dashboard URL, repro steps, diff hash, etc.); the hypothesis lands with the cited evidence."
|
|
250
|
+
2. `Record anyway with audit-trail bypass` — description: "Land the hypothesis without cited evidence; agent appends `[<timestamp> UTC] Evidence-gate bypassed by user — reason: <justification>` to the incident file's `## Audit trail` section."
|
|
251
|
+
3. `Cancel` — description: "Discard the hypothesis; do not write it to the file."
|
|
252
|
+
|
|
253
|
+
On option 2 (bypass), append the `Evidence-gate bypassed by user — reason: <justification>` line to the `## Audit trail` section of the incident file before writing the hypothesis. If the section does not exist, create it. The bypass-marker prose is fixed verbatim so post-incident review can locate every bypassed gate via grep.
|
|
254
|
+
|
|
255
|
+
### 7. For mitigate: delegate to `/wr-itil:mitigate-incident` (the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem split slice 6a)
|
|
256
|
+
|
|
257
|
+
The `mitigate` subcommand is now hosted by the `/wr-itil:mitigate-incident` skill. This step exists as a thin-router forwarder — the Step 1 parser recognises the `<I###> mitigate <action>` shape and delegates via the installed skill invocation. This body is intentionally empty of implementation logic; the canonical documentation of the rename, Status update, evidence-gate pre-flight, and Mitigation attempts append lives in `/wr-itil:mitigate-incident`.
|
|
258
|
+
|
|
259
|
+
Do not re-implement the rename or the evidence gate here — delegate. See "Deprecated-argument forwarders" under Step 1 for the canonical systemMessage.
|
|
260
|
+
|
|
261
|
+
### 8. For restore: delegate to `/wr-itil:restore-incident` (the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem split slice 6b)
|
|
262
|
+
|
|
263
|
+
The `restored` subcommand is now hosted by the `/wr-itil:restore-incident` skill. This step exists as a thin-router forwarder — the Step 1 parser recognises the `<I###> restored` shape and delegates via the installed skill invocation. This body is intentionally empty of implementation logic; the canonical documentation of the pre-flight checks, rename, Status update, Timeline append, and manage-problem handoff lives in `/wr-itil:restore-incident`.
|
|
264
|
+
|
|
265
|
+
Do not re-implement the rename or the problem handoff here — delegate. See "Deprecated-argument forwarders" under Step 1 for the canonical systemMessage.
|
|
266
|
+
|
|
267
|
+
### 9. For close: delegate to `/wr-itil:close-incident` (the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem split slice 6c)
|
|
268
|
+
|
|
269
|
+
The `close` subcommand is now hosted by the `/wr-itil:close-incident` skill. This step exists as a thin-router forwarder — the Step 1 parser recognises the `<I###> close` shape and delegates via the installed skill invocation. This body is intentionally empty of implementation logic; the canonical documentation of the Linked-Problem gate (accepting `.known-error.md`, `.verifying.md`, and `.closed.md`), the No Problem bypass, and the rename lives in `/wr-itil:close-incident`.
|
|
270
|
+
|
|
271
|
+
Do not re-implement the close gate or the rename here — delegate. See "Deprecated-argument forwarders" under Step 1 for the canonical systemMessage.
|
|
272
|
+
|
|
273
|
+
### 10. For list: Show active incidents
|
|
274
|
+
|
|
275
|
+
Read all `.investigating.md`, `.mitigating.md`, and `.restored.md` files in `docs/incidents/`. Extract ID, title, severity, and status. Sort by severity (highest first). Display as a markdown table.
|
|
276
|
+
|
|
277
|
+
### 11. For link: delegate to `/wr-itil:link-incident` (the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem split slice 6d)
|
|
278
|
+
|
|
279
|
+
The `link` subcommand is now hosted by the `/wr-itil:link-incident` skill. This step exists as a thin-router forwarder — the Step 1 parser recognises the `<I###> link P<MMM>` shape and delegates via the installed skill invocation. This body is intentionally empty of implementation logic; the canonical documentation of the problem-file lookup and the `## Linked Problem` section write (including the retroactive-link-from-No-Problem case) lives in `/wr-itil:link-incident`.
|
|
280
|
+
|
|
281
|
+
Do not re-implement the link logic here — delegate. See "Deprecated-argument forwarders" under Step 1 for the canonical systemMessage.
|
|
282
|
+
|
|
283
|
+
### 12. Edge cases
|
|
284
|
+
|
|
285
|
+
- **No problem required** — record a **No Problem** section with justification; close immediately.
|
|
286
|
+
- **Multiple incidents → one problem** — each incident links to the same `P<NNN>`; the problem file accumulates "Reported by incident" entries via `manage-problem`'s update flow.
|
|
287
|
+
- **Problem re-opens after the incident closed** — the closed incident stays closed; a new incident is declared for the new occurrence, linked to the re-opened problem.
|
|
288
|
+
- **Low-severity / developer lightweight path** — for Sev 4-5 incidents, the skill may skip the Hypotheses section if the user confirms no investigation is needed. Timeline, Observations, and at least one mitigation attempt remain mandatory.
|
|
289
|
+
|
|
290
|
+
### 13. Quality checks
|
|
291
|
+
|
|
292
|
+
After any operation, verify:
|
|
293
|
+
|
|
294
|
+
- **ID uniqueness**: no duplicate `I<NNN>` in `docs/incidents/`
|
|
295
|
+
- **Naming convention**: `I<NNN>-<kebab-case-title>.<status>.md`
|
|
296
|
+
- **Status consistency**: Status field matches filename suffix
|
|
297
|
+
- **Required sections**: Timeline, Observations, Hypotheses (or documented skip), Mitigation attempts
|
|
298
|
+
- **Evidence discipline**: every Hypothesis has a cited evidence reference
|
|
299
|
+
- **Linked Problem** section present and consistent (or **No Problem** with justification) once the incident reaches Restored
|
|
300
|
+
|
|
301
|
+
### 14. Report (risk-above-appetite commit is the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule category-3 one-time-override)
|
|
302
|
+
|
|
303
|
+
After any operation, report:
|
|
304
|
+
|
|
305
|
+
- The file path created/modified
|
|
306
|
+
- The incident ID and title
|
|
307
|
+
- The current status
|
|
308
|
+
- For restore: the linked problem ID (or "No Problem" note)
|
|
309
|
+
- Any quality-check warnings
|
|
310
|
+
|
|
311
|
+
Commit the completed work per the "Governance Skills Commit Their Own Completed Work" architecture rule (governance skills commit their own work):
|
|
312
|
+
1. `git add` all created/modified files for this operation
|
|
313
|
+
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 in the current tool set (e.g. this skill is running inside a spawned subagent), 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.
|
|
314
|
+
3. `git commit -m "<message>"` using the convention for the operation type:
|
|
315
|
+
- New incident: `docs(incidents): open I<NNN> <title>`
|
|
316
|
+
- Incident mitigated: `docs(incidents): I<NNN> mitigated — <mitigation summary>`
|
|
317
|
+
- Incident restored: `docs(incidents): I<NNN> restored — <action>`
|
|
318
|
+
- Incident closed: `docs(incidents): close I<NNN>`
|
|
319
|
+
4. If commit risk is above appetite: this is **framework-mediated, NOT a category-3 one-time-override 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 amendment 2026-06-24 — there is no incident carve-out). Per **the "Auto-apply scorer remediations to reach within appetite — open action-class vocabulary" architecture rule Rule 1b (incident-context scoring)**: an active incident is a risk being realised (Likelihood already 5), so the incident-response change is scored against that live realised-risk baseline — weighing P(the change increases impact) vs P(it reduces impact & likelihood / restores service) + P(it introduces a new incident). If net risk-reducing, it takes the risk-reducing path (the `reducing` bypass — `RISK_BYPASS: reducing`) and proceeds, no ask. This is *better* for restore-service-fast (the "Restore Service Fast with an Audit Trail" user outcome): a genuine hotfix clears via scoring with no consent gate mid-outage. If the change is NOT net-reducing, auto-remediate per the "Auto-apply scorer remediations to reach within appetite — open action-class vocabulary" architecture rule Rule 1 or halt per 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 applies — skip the commit and report the uncommitted state.
|
|
320
|
+
|
|
321
|
+
### 15. Auto-release when changesets are queued (the "Governance skills auto-release when changesets are queued" architecture rule)
|
|
322
|
+
|
|
323
|
+
**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.
|
|
324
|
+
|
|
325
|
+
Otherwise, after the commit in step 14 lands, drain the release queue so the fix actually lands on npm without requiring manual user action.
|
|
326
|
+
|
|
327
|
+
**Mechanism — delegate, do not re-implement scoring (per the "On-Demand Assessment Skills for Governance Plugins" architecture rule):**
|
|
328
|
+
|
|
329
|
+
1. Invoke the release scorer. Two paths are valid:
|
|
330
|
+
- **Primary**: delegate to subagent type `wr-risk-scorer:pipeline` via the native Codex subagent tool.
|
|
331
|
+
- **Fallback**: if that subagent type is not available, invoke skill `/wr-risk-scorer:assess-release` via the installed skill invocation. The skill wraps the same pipeline subagent.
|
|
332
|
+
2. Read the returned `RISK_SCORES: commit=X push=Y release=Z` line.
|
|
333
|
+
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.
|
|
334
|
+
|
|
335
|
+
**Drain action (non-interactive, policy-authorised per the "Structured User Interaction for Governance-Skill Decisions" architecture rule Rule 6):**
|
|
336
|
+
|
|
337
|
+
1. Run `npm run push:watch` (push + wait for CI to pass).
|
|
338
|
+
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).
|
|
339
|
+
3. Report the release: "Released <package>@<version>. Fix is now live on npm."
|
|
340
|
+
|
|
341
|
+
**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.
|
|
342
|
+
|
|
343
|
+
**Above-appetite branch (per the "Auto-apply scorer remediations to reach within appetite — open action-class vocabulary" architecture rule)**: If push or release risk is above appetite (≥ 5/25), the skill MUST auto-apply scorer remediations incrementally until residual risk converges within appetite, OR halt the skill per the "Auto-apply scorer remediations to reach within appetite — open action-class vocabulary" architecture rule Rule 5 if the scorer cannot produce a convergent plan. **The skill MUST NOT release above appetite under any circumstance.** The skill MUST NOT call `request_user_input` as a shortcut out of the auto-apply loop.
|
|
344
|
+
|
|
345
|
+
**Auto-apply mechanism (the "Auto-apply scorer remediations to reach within appetite — open action-class vocabulary" architecture rule Rule 2):**
|
|
346
|
+
|
|
347
|
+
1. Parse the scorer's `RISK_REMEDIATIONS:` block.
|
|
348
|
+
2. Read the descriptions. Decide what to do. The agent MAY follow a scorer suggestion, adapt it, or do something else entirely. There is no requirement to rank all suggestions upfront or iterate through them in order.
|
|
349
|
+
3. **Verification Pending carve-out (the "Auto-apply scorer remediations to reach within appetite — open action-class vocabulary" architecture rule Rule 2b)**: skip remediations that target a commit attached to a `.verifying.md` ticket.
|
|
350
|
+
4. Apply the chosen action using standard primitives (git, Edit, Bash). Each auto-apply is its own commit (the "Auto-apply scorer remediations to reach within appetite — open action-class vocabulary" architecture rule Rule 3 — non-AFK has no iteration wrapper to amend into); each commit goes through architect + JTBD + risk-scorer gates per the "Governance Skills Commit Their Own Completed Work" architecture rule.
|
|
351
|
+
5. Re-score via the same delegation path as step 1 above.
|
|
352
|
+
6. **Loop**: within appetite → drain per the Drain action above. Still above → continue working to reduce risk. The agent reads the new remediations and decides what to do next. Loop. Exhausted → Rule 5 halt.
|
|
353
|
+
|
|
354
|
+
**Rule 5 halt (non-AFK mode)**: halt the skill. Emit the terminal report naming the final `RISK_SCORES:`, the Auto-apply trail, any Verification Pending ticket IDs implicated, and a one-line scorer-gap note. The user resolves interactively.
|
|
355
|
+
|
|
356
|
+
`push:watch` and `release:watch` are policy-authorised actions when residual risk is within appetite per RISK-POLICY.md, so no `request_user_input` is required for the drain itself (the "Structured User Interaction for Governance-Skill Decisions" architecture rule Rule 5). Auto-apply actions under Rules 2–7 are also policy-authorised per the "Structured User Interaction for Governance-Skill Decisions" architecture rule Rule 5.
|
|
357
|
+
|
|
358
|
+
## Related
|
|
359
|
+
|
|
360
|
+
- **the "alignment audit — sweep all unaudited skills/hooks/agents/ADRs/JTBDs/READMEs against the framework-resolution boundary (master ticket)" problem** (`docs/problems/136-adr-044-alignment-audit-master.open.md`) — the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule alignment audit master. This skill is the third high-ask SKILL audited under Phase 2 (after work-problem singular and mitigate-incident).
|
|
361
|
+
- **the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule** (`docs/decisions/044-decision-delegation-contract.proposed.md`) — Decision-Delegation Contract. The skill's request_user_input surfaces align with the 6-class authority taxonomy: Step 2 duplicate-check is **category-1 (direction-setting)**; Step 4 is **category-4 (silent-framework)** on Title / Symptoms / Start time / Severity-when-evidence-present + **category-1 (direction-setting)** on Scope + **category-5 (taste)** fallback on Severity-on-ambiguity (the "Agents over-ask in interactive sessions — conflating mechanical-stages with user-interactive-stages of multi-stage skill contracts (inverse-)" problem derive-first refactor 2026-05-15 re-classified Step 4 from "single cat-1 declaration" to "derive-first dispatch with cat-1 / cat-5 fallback only"); Step 6 evidence-gate is **category-2 (deviation-approval)**; Step 14 risk-above-appetite is **category-3 (one-time-override)**; the **Mitigation preference** ladder's mitigation-SELECTION surface is **framework-mediated / category-4 silent-framework family** — agent-owned, no request_user_input and no prose-ask (the "Agent defers mitigation selection to user during active incident — surfaces mitigation choice as user-authority when SKILL contract empowers agent-driven reversible mitigations" problem declarative-layer fix; see "Mitigation preference").
|
|
362
|
+
- **the "Agents over-ask in interactive sessions — conflating mechanical-stages with user-interactive-stages of multi-stage skill contracts (inverse-)" problem** (`docs/problems/known-error/132-agents-over-ask-in-interactive-sessions-conflating-mechanical-stages-with-user-interactive-stages.md`) — Agents over-ask in interactive sessions (inverse-the "Problem 078: Assistant does not offer to capture a problem ticket when the user delivers strong-signal correction" problem). Step 4 derive-first refactor closes the 2026-05-06 I001 declaration regression where 3 of 4 sub-questions were lazy classifications. Composes with the "`/wr-itil:capture-problem` asks a classification question (technical vs user-business) that it can answer itself from the description's observable evidence" problem (capture-problem Step 1.5 derive-first refactor — the in-tree worked-example precedent).
|
|
363
|
+
- **the "`/wr-itil:capture-problem` asks a classification question (technical vs user-business) that it can answer itself from the description's observable evidence" problem** (`docs/problems/...`) — capture-problem Step 1.5 derive-first refactor. Step 4 mirrors the same dispatch shape (silent classifier + stderr advisory + request_user_input only on ambiguity).
|
|
364
|
+
- **the "Structured User Interaction for Governance-Skill Decisions" architecture rule amended Rule 1** (`docs/decisions/013-structured-user-interaction-for-governance-decisions.proposed.md`) — structured user interaction; narrowed in the "Decision-delegation contract — agents over-apply Rule 1's interactive default to framework-resolved decisions; codify the framework-resolution boundary + AFK loop's batched-questions-as-deliverable + lazy-request_user_input measurement" problem to defer to the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule for framework-resolution boundary. All four surfaces retain `request_user_input` as genuine user-authority surfaces under categories enumerated in the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule.
|
|
365
|
+
- **the "Structured User Interaction for Governance-Skill Decisions" architecture rule Confirmation criterion #1** — `grep -inE "Options:.*\(a\)\|Your call:\|which would you like\|which way?"` returns zero matches. Step 2's prior prompt body violated this with `Would you like to (a) update...` phrasing; the "alignment audit — sweep all unaudited skills/hooks/agents/ADRs/JTBDs/READMEs against the framework-resolution boundary (master ticket)" problem Phase 2 refactor (2026-04-28) closed the regression by lifting options into the `request_user_input` `options[]` mechanism.
|
|
366
|
+
- **the "Add `manage-incident` Skill to `wr-itil` Plugin" architecture rule** (`docs/decisions/011-manage-incident-skill.proposed.md`) — incident lifecycle; evidence-first workflow; reversible-mitigation preference; Sev 4-5 lightweight path. Step 6's evidence-gate refactor (2026-04-28) extends the "Add `manage-incident` Skill to `wr-itil` Plugin" architecture rule's evidence-first rule with the documented `Record anyway` audit-trail bypass that mitigate-incident already used (cool-headed-commitment consistency across the two incident skills).
|
|
367
|
+
- **the "Governance Skills Commit Their Own Completed Work" architecture rule** — governance skills commit their own work. Step 14 unchanged.
|
|
368
|
+
- **the "On-Demand Assessment Skills for Governance Plugins" architecture rule** — release scorer delegation pattern. Step 15 unchanged.
|
|
369
|
+
- **the "Inter-iteration release cadence for AFK loops" architecture rule** + **the "Governance skills auto-release when changesets are queued" architecture rule** — release cadence. Step 15 unchanged.
|
|
370
|
+
- **the "Agent output grounding — no fabricated quantitative estimates, cite + persist + uncertainty" architecture rule** — cost-source grounding. Step 6's audit-trail bypass note preserves grounding by capturing the user's justification at deviation time.
|
|
371
|
+
- **the "Auto-apply scorer remediations to reach within appetite — open action-class vocabulary" architecture rule** — auto-apply scorer remediations. Step 15 above-appetite branch unchanged.
|
|
372
|
+
- **the "Problem 071: Argument-based skill subcommands are not discoverable in Codex autocomplete" problem** — skill-split origin (slice 6 — manage-incident is the host with thin-router forwarders for `list`, `mitigate`, `restored`, `close`, `link`).
|
|
373
|
+
- **the "Problem 081: Structural source-content tests are wasteful — TDD agent should reject them and require behavioural tests (+ framework / stub enhancements)" problem** — structural-grep retrofit; the `manage-incident-adr-044-contract.bats` companion test file carries the `tdd-review: structural-permitted` marker as the bridge until the "Problem 081: Structural source-content tests are wasteful — TDD agent should reject them and require behavioural tests (+ framework / stub enhancements)" problem Phase 2 retrofit lands.
|
|
374
|
+
- **the ": Enforce Governance Without Slowing Down" user outcome** (`docs/jtbd/developer/the ": Enforce Governance Without Slowing Down" user outcome-enforce-governance.proposed.md`) — Surface 1 refactor preserves the duplicate-check governance gate while removing the prose-ask compliance gap; Surfaces 2 + 3 + 4 retain genuine consent-gate-for-the-genuinely-direction-setting / deviation-approval / one-time-override.
|
|
375
|
+
- **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`) — Step 6 evidence-gate refactor brings manage-incident into pattern parity with mitigate-incident's slice-6a evidence-gate. Adopters get one consistent evidence-gate pattern across both incident skills.
|
|
376
|
+
- **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`) — Step 6 explicit `Record anyway` bypass strengthens the audit-trail outcome (implicit-bypass becomes explicit-bypass-with-permanent-trail) without weakening the cool-headed-commitment outcome (`Add evidence` remains the friction-free default; bypass requires conscious second choice).
|
|
377
|
+
|
|
378
|
+
$ARGUMENTS
|