@windyroad/itil 0.4.3-preview.99 → 0.4.4-preview.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "wr-itil",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "ITIL-aligned IT service management for Claude Code"
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windyroad/itil",
3
- "version": "0.4.3-preview.99",
3
+ "version": "0.4.4-preview.103",
4
4
  "description": "ITIL-aligned IT service management for Claude Code (problem, and future incident/change skills)",
5
5
  "bin": {
6
6
  "windyroad-itil": "./bin/install.mjs"
@@ -262,7 +262,7 @@ After any operation, report:
262
262
 
263
263
  Commit the completed work per ADR-014 (governance skills commit their own work):
264
264
  1. `git add` all created/modified files for this operation
265
- 2. Delegate to `wr-risk-scorer:pipeline` (subagent_type: `wr-risk-scorer:pipeline`) to assess the staged changes and create a bypass marker
265
+ 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 Skill tool instead — per ADR-015 it wraps the same pipeline subagent.
266
266
  3. `git commit -m "<message>"` using the convention for the operation type:
267
267
  - New incident: `docs(incidents): open I<NNN> <title>`
268
268
  - Incident mitigated: `docs(incidents): I<NNN> mitigated — <mitigation summary>`
@@ -270,4 +270,30 @@ Commit the completed work per ADR-014 (governance skills commit their own work):
270
270
  - Incident closed: `docs(incidents): close I<NNN>`
271
271
  4. If risk is above appetite: use `AskUserQuestion` to ask whether to commit anyway, remediate first, or park the work. If `AskUserQuestion` is unavailable, skip the commit and report the uncommitted state clearly.
272
272
 
273
+ ### 15. Auto-release when changesets are queued (ADR-020)
274
+
275
+ **Skip this step if the skill is running inside an AFK orchestrator.** Orchestrators handle release cadence themselves per ADR-018 (Step 6.5). When in doubt, defer to the orchestrator by skipping this step.
276
+
277
+ Otherwise, after the commit in step 14 lands, drain the release queue so the fix actually lands on npm without requiring manual user action.
278
+
279
+ **Mechanism — delegate, do not re-implement scoring (per ADR-015):**
280
+
281
+ 1. Invoke the release scorer. Two paths are valid:
282
+ - **Primary**: delegate to subagent type `wr-risk-scorer:pipeline` via the Agent tool.
283
+ - **Fallback**: if that subagent type is not available, invoke skill `/wr-risk-scorer:assess-release` via the Skill tool. The skill wraps the same pipeline subagent.
284
+ 2. Read the returned `RISK_SCORES: commit=X push=Y release=Z` line.
285
+ 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.
286
+
287
+ **Drain action (non-interactive, policy-authorised per ADR-013 Rule 6):**
288
+
289
+ 1. Run `npm run push:watch` (push + wait for CI to pass).
290
+ 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).
291
+ 3. Report the release: "Released <package>@<version>. Fix is now live on npm."
292
+
293
+ **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.
294
+
295
+ **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."
296
+
297
+ `push:watch` and `release:watch` are policy-authorised actions when residual risk is within appetite per RISK-POLICY.md, so no `AskUserQuestion` is required for the drain itself (ADR-013 Rule 6).
298
+
273
299
  $ARGUMENTS
@@ -417,4 +417,30 @@ Commit the completed work per ADR-014 (governance skills commit their own work):
417
417
  - Fix implemented: `fix(<scope>): <description> (closes P<NNN>)` — include problem file changes in the same commit
418
418
  4. If risk is above appetite: use `AskUserQuestion` to ask whether to commit anyway, remediate first, or park the work. If `AskUserQuestion` is unavailable, skip the commit and report the uncommitted state clearly (ADR-013 Rule 6 fail-safe). This applies only to the risk-above-appetite branch, not to the delegation-unavailable case above.
419
419
 
420
+ ### 12. Auto-release when changesets are queued (ADR-020)
421
+
422
+ **Skip this step if the skill is running inside an AFK orchestrator** (e.g. `/wr-itil:work-problems`). Orchestrators handle release cadence themselves per ADR-018 (Step 6.5). Detect via the presence of an orchestrator marker in the invoking prompt — look for phrases like "AFK", "work-problems", "batch-work", or the sentinel `ALL_DONE` convention. When in doubt, defer to the orchestrator by skipping this step.
423
+
424
+ Otherwise, after the commit in step 11 lands, drain the release queue so the fix actually lands on npm without requiring manual user action.
425
+
426
+ **Mechanism — delegate, do not re-implement scoring (per ADR-015):**
427
+
428
+ 1. Invoke the release scorer. Two paths are valid:
429
+ - **Primary**: delegate to subagent type `wr-risk-scorer:pipeline` via the Agent tool.
430
+ - **Fallback**: if that subagent type is not available, invoke skill `/wr-risk-scorer:assess-release` via the Skill tool. The skill wraps the same pipeline subagent.
431
+ 2. Read the returned `RISK_SCORES: commit=X push=Y release=Z` line.
432
+ 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.
433
+
434
+ **Drain action (non-interactive, policy-authorised per ADR-013 Rule 6):**
435
+
436
+ 1. Run `npm run push:watch` (push + wait for CI to pass).
437
+ 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).
438
+ 3. Report the release: "Released <package>@<version>. Fix is now live on npm."
439
+
440
+ **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.
441
+
442
+ **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."
443
+
444
+ `push:watch` and `release:watch` are policy-authorised actions when residual risk is within appetite per RISK-POLICY.md, so no `AskUserQuestion` is required for the drain itself (ADR-013 Rule 6).
445
+
420
446
  $ARGUMENTS