@windyroad/itil 0.47.10-preview.576 → 0.47.10-preview.581

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windyroad/itil",
3
- "version": "0.47.10-preview.576",
3
+ "version": "0.47.10-preview.581",
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"
@@ -46,6 +46,8 @@ This skill has **at most one direction-setting AskUserQuestion (the I12 derive-t
46
46
 
47
47
  Per ADR-013 Rule 6 fail-safe: every decision above resolves without interactive user input in non-interactive contexts. The derive-then-ratify AskUserQuestion fires only on derivation-failure (interactive surface) AND only when `--no-prompt` is absent (AFK callers pre-resolve via flags or halt-with-stderr-directive — never silently swallow the ratification gate).
48
48
 
49
+ **ADR-013 Rule 6 carve-out audit (P352, 2026-06-06 amendment)**: the universal AFK default is **queue-and-continue** (queue the decision, continue the loop). The HALT-with-stderr-directive carve-outs in the Resolution table above (Empty `$ARGUMENTS`, AFK halt-without-flags) are documented deviations from the universal default, authorised by **ADR-074** (Confirm decision substance before building dependent work). Rationale: capture-problem creates a durable ticket artefact; auto-creating with derived-but-unratified persona/JTBD substance would build dependent work (the ticket file, the README row, the WSJF rank) on an unconfirmed decision — the precise harm ADR-074 prohibits. No-ticket-created is the user-pinned protection; the HALT is the persona-correct shape (JTBD-006's "queued for my return, not guessed at" is satisfied by the stderr directive surfacing on user return + the AFK loop continuing to the next problem).
50
+
49
51
  ## Steps
50
52
 
51
53
  ### 0. README reconciliation preflight (P118)
@@ -179,7 +179,7 @@ What "work" means depends on the problem's status:
179
179
  Exit 0 = unconfirmed (born without `human-oversight: confirmed`, not superseded) → the guard fires for that ADR. Exit 1 = confirmed or superseded → OK to build. Exit 2 = not found → treat as not-a-blocker (surface in the report).
180
180
  3. **If any referenced decision is unconfirmed**: do NOT implement yet. Surface its **substance** (the chosen option the ADR records — not a grain/meta question) for human confirmation:
181
181
  - **Interactive**: `AskUserQuestion` presenting the ADR's Decision Outcome + Considered Options so the user confirms / amends / rejects the substantive choice. On confirm, the recording skill writes the `human-oversight: confirmed` marker (ADR-066) before the build proceeds.
182
- - **AFK** (`/wr-itil:work-problems` orchestrator): NEVER ask mid-loop — queue the substance to the iteration's `outstanding_questions` (ADR-044 AFK carve-out) and skip the build; do not guess.
182
+ - **AFK** (`/wr-itil:work-problems` orchestrator): NEVER ask mid-loop — queue the substance to the iteration's `outstanding_questions` (ADR-044 AFK carve-out) and skip the build; do not guess. This is the **queue-and-continue** universal default per ADR-013 Rule 6 (P352, 2026-06-06 amendment): the iter queues the substance + advances; the orchestrator main turn surfaces the queued question at loop end via the Step 2.5 batched AskUserQuestion.
183
183
  4. This ask is **ADR-044 category-1 direction-setting** and is EXCLUDED from the lazy-AskUserQuestion regression metric (it is legitimate, not lazy). The trigger is narrow — detection is mechanical (the predicate); only genuine unconfirmed decisions about to be built on fire it. Do NOT over-fire on confirmed/superseded/obvious decisions (inverse-P078 / P132 guard). A born-`proposed` marker is fine for *recording*; it is not a licence to *build* (ADR-066 carve-out).
184
184
 
185
185
  The Phase 2 working-the-problem traversal makes "implement the fix" concretely traceable via stories (per ADR-060 lines 300-320). Replaces the prior vague "implement the fix following the project's development workflow" with a deterministic problem → RFC → story dispatch:
@@ -496,6 +496,8 @@ Before writing the problem file, perform a concern-boundary analysis on the gath
496
496
 
497
497
  **Non-interactive fallback**: When `AskUserQuestion` is unavailable (e.g., non-interactive/AFK mode), automatically split into separate problems and note the auto-split in output. Do not block creation.
498
498
 
499
+ **ADR-013 Rule 6 carve-out audit (P352, 2026-06-06 amendment)**: the universal AFK default is **queue-and-continue**; this site is a documented **AUTO-DEFAULT** carve-out. Authorising principle: policy-authorised safe default per ADR-044 category 4 (silent framework). Splitting is fully reversible (manual combine via Related cross-references + WSJF re-rank), the framework's lifecycle model rewards explicit per-concern WSJF ranking, and "split when in doubt" is the persona-correct safe heuristic for JTBD-006 — the loop progresses, over-splits are cheap to combine, and halt would cost more loop throughput than the over-split risk. Symmetric with the parallel `/wr-architect:create-adr` Step 1 multi-decision auto-split (same authority, same rationale).
500
+
499
501
  **Split implementation**: When splitting, assign consecutive IDs (e.g., if next ID is 035, create P035 and P036). Create each problem file independently. Cross-reference each ticket in the other's "Related" section.
500
502
 
501
503
  **Scope**: This step applies only to **new problem creation** (steps 2–5). It does NOT apply to updates, status transitions, or reviews of existing tickets.
@@ -134,7 +134,7 @@ Per ADR-062 (peer of ADR-024). Polls configured upstream channels, runs each unm
134
134
  Read `docs/problems/.upstream-channels.json`. Branch on state:
135
135
 
136
136
  - **File exists and parses cleanly** → continue to 4.5b with the parsed `channels[]` list.
137
- - **File exists but is malformed JSON** → log an advisory note (`channel config malformed JSON; inbound-discovery skipped this pass — fix the file then re-invoke`) and skip Step 4.5. This is genuine fail-soft because the user already SHIPPED a config and the malformation is an editing artefact best resolved by the user reading the parse error; auto-rewriting their file would destroy their work.
137
+ - **File exists but is malformed JSON** → log an advisory note (`channel config malformed JSON; inbound-discovery skipped this pass — fix the file then re-invoke`) and skip Step 4.5. **ADR-013 Rule 6 carve-out (P352, 2026-06-06 amendment)**: this is a documented SKIP carve-out (deviation from the universal queue-and-continue default). Authorising principle: user-shipped artefact protection — the user already SHIPPED a config and the malformation is an editing artefact best resolved by the user reading the parse error; auto-rewriting their file (queue-then-overwrite-on-return) would destroy their work. The advisory note IS the queued surface for user attention on next interactive session; the loop continues. Same shape as a parse-error halt at a user-owned file boundary.
138
138
  - **File does NOT exist** → run the **auto-bootstrap routine** below per P351 / JTBD-101 / JTBD-007. **Adopters who never want to configure inbound-discovery** can keep `.upstream-channels.json` absent by answering `decline` at the interactive prompt OR allowing the AFK-mode outstanding-question to lapse; the absence stays zero-ceremony-tax (ADR-062 § Downstream-adopter non-obligation), but the silent skip is replaced by an explicit one-time-per-session prompt so the adopter has a visible signal that the inbound-discovery capability exists. <!-- @jtbd JTBD-101 (Extend the Suite — deliver-installed-features signal) --> <!-- @jtbd JTBD-007 (Keep Plugins Current — process reports what configured) --> <!-- @problem P351 (auto-bootstrap on missing precondition config) -->
139
139
 
140
140
  **Auto-bootstrap routine (P351)**: replaces the prior "missing file → silent skip" behaviour. The routine branches on AskUserQuestion availability per ADR-013 Rule 6 + ADR-044 category 1 (direction-setting):
@@ -149,6 +149,9 @@ Read `docs/problems/.upstream-channels.json`. Branch on state:
149
149
  - On `Decline permanently (write empty channels stub)`: write `{"channels": [], "ttl_seconds": 86400, "declined_at": "<ISO>"}` so future invocations parse cleanly + skip silently. Per ADR-062 § Downstream-adopter non-obligation — the empty-channels stub IS the documented "I never want this" surface.
150
150
 
151
151
  - **AFK mode** (AskUserQuestion unavailable, e.g. invoked from `/wr-itil:work-problems`):
152
+
153
+ **ADR-013 Rule 6 universal default (P352, 2026-06-06 amendment)** — queue-and-continue. This branch is the canonical exemplar: P351 lifted this site from the prior "missing file → silent skip" anti-pattern to queue-and-continue. The pattern below is the model the rest of the suite follows.
154
+
152
155
  1. Log advisory (`inbound-discovery: channel config absent; queued config-direction outstanding_question, skipping THIS pass to allow other passes to proceed`).
153
156
  2. Queue a `direction` entry per `/wr-itil:work-problems` SKILL.md Step 5 `outstanding_questions` schema (ADR-044 category 1):
154
157
 
@@ -164,6 +164,8 @@ When all three checks pass, the host emits a one-shot `AskUserQuestion` prompt w
164
164
 
165
165
  **AFK fail-safe**: when the host is invoked from an AFK orchestrator, do NOT fire the prompt. Append a one-line "pending intake scaffold" note to the iteration report and continue. The user catches up on next interactive session.
166
166
 
167
+ **ADR-013 Rule 6 universal default (P352, 2026-06-06 amendment)**: this IS queue-and-continue — the iteration-report note is the queued surface; the loop advances. Persona-correct for JTBD-006 ("queued for my return, not guessed at"). Not a carve-out — this is the canonical default shape.
168
+
167
169
  ### Trigger 2: Pre-publish PreToolUse gate (hard stop)
168
170
 
169
171
  `packages/itil/hooks/pre-publish-intake-gate.sh` matches `npm publish` and `gh pr merge ... changeset-release/*` and denies if any of the five intake files are missing AND the decline marker is absent AND `INTAKE_BYPASS` is not set.
@@ -0,0 +1,160 @@
1
+ #!/usr/bin/env bats
2
+ # ADR-013 Rule 6 P352 amendment (2026-06-06): queue-and-continue is the
3
+ # universal AFK default when a skill needs user input but AskUserQuestion is
4
+ # unavailable. HALT/SKIP/AUTO-DEFAULT are deviations requiring inline-cited
5
+ # carve-out justification.
6
+ #
7
+ # Structural assertion — Permitted Exception to the source-grep ban (ADR-005 /
8
+ # P011). These assertions are load-bearing-string checks on the ADR + SKILL
9
+ # specification prose. Per P081, structural tests are placeholders for
10
+ # behavioural tests against P012's skill-testing harness; until the harness
11
+ # can exercise AFK fallback shapes, prose assertions on the carve-out audit
12
+ # are the confirmation mechanism named in the amended Rule 6 Confirmation
13
+ # section.
14
+ #
15
+ # tdd-review: structural-permitted (justification: ADR Rule 6 + SKILL.md prose
16
+ # contract assertions for an interaction-pattern contract that has no
17
+ # behavioural skill-runtime harness yet — P012 + P081 Phase 2 bridge window.
18
+ # Isomorphic precedent in this repo: work-problems-above-appetite-remediation.bats,
19
+ # create-adr-substance-confirm-pattern.bats, create-adr-adr-044-contract.bats.)
20
+ #
21
+ # @problem P352 (AFK queue-and-continue is the universal default)
22
+ # @adr ADR-013 (structured user interaction; Rule 6 amended 2026-06-06)
23
+ # @adr ADR-044 (decision-delegation contract; AUTO-DEFAULT lives inside framework-resolution)
24
+ # @adr ADR-052 (behavioural-by-default with structural bridge window)
25
+ # @adr ADR-074 (confirm decision substance before building; authorises HALT carve-outs)
26
+ # @jtbd JTBD-006 (Progress the Backlog While I'm Away — primary persona)
27
+ # @jtbd JTBD-001 (Enforce Governance Without Slowing Down — queue keeps governance on during AFK)
28
+
29
+ setup() {
30
+ REPO_ROOT="$(cd "$(dirname "$BATS_TEST_FILENAME")/../../../../.." && pwd)"
31
+ ADR_013="${REPO_ROOT}/docs/decisions/013-structured-user-interaction-for-governance-decisions.proposed.md"
32
+ }
33
+
34
+ # ----------------------------------------------------------------------
35
+ # ADR-013 Rule 6 amendment prose
36
+ # ----------------------------------------------------------------------
37
+
38
+ @test "ADR-013 file exists" {
39
+ [ -f "$ADR_013" ]
40
+ }
41
+
42
+ @test "ADR-013 Rule 6 names queue-and-continue as the universal default (P352 amendment)" {
43
+ # The load-bearing prose: queue-and-continue is THE universal default.
44
+ run grep -nE "queue-and-continue is the universal default" "$ADR_013"
45
+ [ "$status" -eq 0 ]
46
+ }
47
+
48
+ @test "ADR-013 Rule 6 dates the amendment (2026-06-06)" {
49
+ # Date-anchoring lets future readers correlate the prose with P352 timeline.
50
+ run grep -nE "2026-06-06 amendment" "$ADR_013"
51
+ [ "$status" -eq 0 ]
52
+ }
53
+
54
+ @test "ADR-013 Rule 6 names halt-with-directive AND silent-skip as deviations" {
55
+ # The amendment's contract: HALT and SKIP are DEVIATIONS requiring carve-out
56
+ # justification — they are not the default.
57
+ run grep -nE "DEVIATIONS that require an explicit" "$ADR_013"
58
+ [ "$status" -eq 0 ]
59
+ }
60
+
61
+ @test "ADR-013 Rule 6 documents the capture-problem HALT carve-out (ADR-074 authority)" {
62
+ # The amendment must explicitly name the documented HALT carve-outs so
63
+ # readers know the SKILL surfaces that LEGITIMATELY halt and why.
64
+ run grep -nE "capture-problem.*derive-then-ratify HALT" "$ADR_013"
65
+ [ "$status" -eq 0 ]
66
+ }
67
+
68
+ @test "ADR-013 Rule 6 documents the create-adr Step 5 HALT carve-out" {
69
+ run grep -nE "create-adr.*Step 5 substance-confirm HALT" "$ADR_013"
70
+ [ "$status" -eq 0 ]
71
+ }
72
+
73
+ @test "ADR-013 Rule 6 documents the manage-problem create-gate HALT carve-out" {
74
+ run grep -nE "manage-problem.*create-gate HALT" "$ADR_013"
75
+ [ "$status" -eq 0 ]
76
+ }
77
+
78
+ @test "ADR-013 Rule 6 names AUTO-DEFAULT as framework-resolved-only (ADR-044 boundary)" {
79
+ # AUTO-DEFAULT is permitted ONLY when the decision is framework-resolved.
80
+ # Outside the framework-resolution boundary, AUTO-DEFAULT is a defect.
81
+ run grep -nE "AUTO-DEFAULT.*permitted ONLY when the decision is framework-resolved" "$ADR_013"
82
+ [ "$status" -eq 0 ]
83
+ }
84
+
85
+ @test "ADR-013 Rule 6 cites ADR-044 (decision-delegation framework-resolution boundary)" {
86
+ run grep -nE "ADR-044" "$ADR_013"
87
+ [ "$status" -eq 0 ]
88
+ }
89
+
90
+ @test "ADR-013 Rule 6 cites ADR-074 (substance-confirm authority for HALT carve-outs)" {
91
+ run grep -nE "ADR-074" "$ADR_013"
92
+ [ "$status" -eq 0 ]
93
+ }
94
+
95
+ @test "ADR-013 Rule 6 cites JTBD-006 (Progress the Backlog While I'm Away)" {
96
+ run grep -nE "JTBD-006" "$ADR_013"
97
+ [ "$status" -eq 0 ]
98
+ }
99
+
100
+ @test "ADR-013 Rule 6 cites P352 as the originating ticket" {
101
+ run grep -nE "\bP352\b" "$ADR_013"
102
+ [ "$status" -eq 0 ]
103
+ }
104
+
105
+ @test "ADR-013 Rule 6 records the shared-helper extraction as a follow-on (deferred)" {
106
+ # The ratified design explicitly deferred the shared-helper extraction to
107
+ # follow-on. The prose must record the deferral so future readers (and
108
+ # future iter agents) know the interim contract.
109
+ run grep -nE "Shared-helper extraction deferred" "$ADR_013"
110
+ [ "$status" -eq 0 ]
111
+ }
112
+
113
+ # ----------------------------------------------------------------------
114
+ # Per-SKILL carve-out audit annotations
115
+ # ----------------------------------------------------------------------
116
+
117
+ @test "capture-problem SKILL.md carries the P352 carve-out audit (HALT per ADR-074)" {
118
+ SKILL="${REPO_ROOT}/packages/itil/skills/capture-problem/SKILL.md"
119
+ [ -f "$SKILL" ]
120
+ run grep -nE "ADR-013 Rule 6 carve-out audit \(P352" "$SKILL"
121
+ [ "$status" -eq 0 ]
122
+ # And the carve-out must name its authorising ADR
123
+ run grep -nE "authorised by \*\*ADR-074" "$SKILL"
124
+ [ "$status" -eq 0 ]
125
+ }
126
+
127
+ @test "create-adr SKILL.md carries the P352 carve-out audit (Step 1 AUTO-DEFAULT + Step 5 HALT)" {
128
+ SKILL="${REPO_ROOT}/packages/architect/skills/create-adr/SKILL.md"
129
+ [ -f "$SKILL" ]
130
+ run grep -nE "ADR-013 Rule 6 carve-out audit \(P352" "$SKILL"
131
+ [ "$status" -eq 0 ]
132
+ }
133
+
134
+ @test "manage-problem SKILL.md carries the P352 carve-out audit (Step 4b AUTO-DEFAULT)" {
135
+ SKILL="${REPO_ROOT}/packages/itil/skills/manage-problem/SKILL.md"
136
+ [ -f "$SKILL" ]
137
+ run grep -nE "ADR-013 Rule 6 carve-out audit \(P352" "$SKILL"
138
+ [ "$status" -eq 0 ]
139
+ }
140
+
141
+ @test "review-problems SKILL.md cites the P352 amendment at the Step 4.5 AFK branch" {
142
+ SKILL="${REPO_ROOT}/packages/itil/skills/review-problems/SKILL.md"
143
+ [ -f "$SKILL" ]
144
+ run grep -nE "ADR-013 Rule 6 universal default \(P352" "$SKILL"
145
+ [ "$status" -eq 0 ]
146
+ }
147
+
148
+ @test "scaffold-intake SKILL.md cites the P352 amendment as canonical queue-and-continue" {
149
+ SKILL="${REPO_ROOT}/packages/itil/skills/scaffold-intake/SKILL.md"
150
+ [ -f "$SKILL" ]
151
+ run grep -nE "ADR-013 Rule 6 universal default \(P352" "$SKILL"
152
+ [ "$status" -eq 0 ]
153
+ }
154
+
155
+ @test "run-retro SKILL.md cites the P352 amendment at the Step 1.5 AFK branch" {
156
+ SKILL="${REPO_ROOT}/packages/retrospective/skills/run-retro/SKILL.md"
157
+ [ -f "$SKILL" ]
158
+ run grep -nE "ADR-013 Rule 6 universal default \(P352" "$SKILL"
159
+ [ "$status" -eq 0 ]
160
+ }