@windyroad/itil 2.2.0-preview.1182 → 2.2.1-preview.1195

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.
@@ -497,5 +497,5 @@
497
497
  }
498
498
  },
499
499
  "name": "wr-itil",
500
- "version": "2.2.0"
500
+ "version": "2.2.1"
501
501
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wr-itil",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "ITIL problem-management workflows for AI coding agents",
5
5
  "author": {
6
6
  "name": "Windy Road Technology",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windyroad/itil",
3
- "version": "2.2.0-preview.1182",
3
+ "version": "2.2.1-preview.1195",
4
4
  "description": "ITIL-aligned IT service management for Claude Code and Codex",
5
5
  "bin": {
6
6
  "windyroad-itil": "./bin/install.mjs"
@@ -50,23 +50,31 @@ Per the "Structured User Interaction for Governance-Skill Decisions" architectur
50
50
 
51
51
  ## Steps
52
52
 
53
- ### 0. README reconciliation preflight (the "`docs/problems/README.md` drifts from filesystem truth across sessions despite (refresh-on-create) and (refresh-on-transition) both Closed" problem)
53
+ ### 0. README reconciliation preflight (the "`docs/problems/README.md` drifts from filesystem truth across sessions despite (refresh-on-create) and (refresh-on-transition) both Closed" problem, the "Problem creation is gated on the problem index existing" problem, the "Problem reports precede derived index repair" architecture rule)
54
54
 
55
- Same as `/wr-itil:manage-problem` Step 0 — diagnose-only check. Halt-and-route on Exit 1 (committed cross-session drift); INLINE_REFRESH carve-out (the "`/wr-itil:manage-problem` Step 0 reconcile halt-on-drift directive doesn't distinguish uncommitted-rename-rooted drift (same-session pending) from committed cross-session drift should refresh inline rather than halt for the former case" problem) preserved. capture-problem itself does NOT refresh README.md (see Step 6); the preflight is purely a fail-fast on pre-existing drift.
55
+ Run the strict diagnose-only check, but do not let derived-index repair discard the report this creation-only skill exists to preserve. `capture-problem` always creates a new problem, so the "Problem reports precede derived index repair" architecture rule authorizes it to carry a missing-index or parseable-drift result forward to the inline Step 6 repair. An existing malformed README still halts because replacing it could destroy human-authored narrative.
56
56
 
57
57
  ```bash
58
58
  wr-itil-reconcile-readme docs/problems > /tmp/wr-itil-drift-$$.txt
59
59
  reconcile_exit=$?
60
- if [ "$reconcile_exit" -eq 1 ]; then
61
- wr-itil-classify-readme-drift /tmp/wr-itil-drift-$$.txt docs/problems
62
- classify_exit=$?
63
- rm -f /tmp/wr-itil-drift-$$.txt
64
- # classify_exit 0 (INLINE_REFRESH): proceed (no inline refresh in this skill).
65
- # classify_exit 1 (HALT_ROUTE_RECONCILE): halt; invoke /wr-itil:reconcile-readme.
66
- # classify_exit 2 (parse error): conservative halt-and-route.
67
- fi
60
+ case "$reconcile_exit" in
61
+ 0) readme_repair="clean" ;;
62
+ 1) readme_repair="drift" ;; # preserve the diagnostic; Step 6 repairs generated sections
63
+ 2)
64
+ if [ ! -f docs/problems/README.md ]; then
65
+ readme_repair="missing" # Step 6 creates the canonical index
66
+ else
67
+ rm -f /tmp/wr-itil-drift-$$.txt
68
+ echo "capture-problem: existing docs/problems/README.md is malformed; refusing to overwrite human-authored content" >&2
69
+ exit 2
70
+ fi
71
+ ;;
72
+ esac
73
+ rm -f /tmp/wr-itil-drift-$$.txt
68
74
  ```
69
75
 
76
+ For `readme_repair=drift` or `missing`, emit one advisory naming the repair that will ride with the capture commit, then continue to Step 1. Do not invoke `/wr-itil:reconcile-readme` first and do not emit a bypass token. The ticket plus repaired or newly-created index remain one the "Governance Skills Commit Their Own Completed Work" architecture rule commit grain.
77
+
70
78
  ### 1. Parse the description and flags from `$ARGUMENTS`
71
79
 
72
80
  `$ARGUMENTS` may carry up to two leading flags before the free-text description (caller-side pre-resolution per the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule silent-proceed shape):
@@ -320,6 +328,8 @@ Single `Write` to `docs/problems/open/<NNN>-<kebab-title>.md` (per the "Problem-
320
328
 
321
329
  After writing the new `.open.md` file at Step 5, regenerate `docs/problems/README.md` to insert the new ticket's row into the WSJF Rankings, and stage the refreshed README in the same commit as the new ticket. The mechanism is **inline at this execution site per the "transition-problem SKILL Step 7 Last-reviewed rotation silently skipped across iters" problem** — not deferred via cross-reference — so a single-pass agent reading Step 6 does not silently skip the archive step (the canonical the "transition-problem SKILL Step 7 Last-reviewed rotation silently skipped across iters" problem silent-skip regression).
322
330
 
331
+ **the "Problem reports precede derived index repair" architecture rule repair routing:** when Step 0 set `readme_repair=missing`, create the canonical README from ticket truth and skip history rotation because there is no displaced line 3. When it set `readme_repair=drift`, replace only the generated ranking/queue sections and preserve every narrative line outside those sections before applying the normal line-3 rotation below. `readme_repair=clean` follows the normal refresh. An existing malformed README never reaches this step.
332
+
323
333
  **Mechanism**: use the same rendering rules as `/wr-itil:manage-problem` Step 5 the "Problem 094: `/wr-itil:manage-problem` does not refresh `docs/problems/README.md` on ticket creation" problem / Step 7 the "Problem 062: `manage-problem` does not refresh `docs/problems/README.md` on single-ticket transitions; fast-path cache goes stale silently" problem (glob `docs/problems/*.open.md` / `*.known-error.md` / `*.verifying.md` / `*.parked.md` AND the per-state-subdir layout `docs/problems/open/*.md` / `docs/problems/known-error/*.md` / `docs/problems/verifying/*.md` / `docs/problems/parked/*.md`; rank open/known-error by WSJF; list verifyings in the Verification Queue ordered by Released date ASC per the "docs/problems/README.md Verification Queue rendered newest-first contradicts section header "Ranked by release age, oldest first"" problem; list parkeds in the Parked section). The refresh is a **render, not a re-rank** — existing WSJF values on the other ticket files are trusted per the "Problem 062: `manage-problem` does not refresh `docs/problems/README.md` on single-ticket transitions; fast-path cache goes stale silently" problem's established discipline. Only the new ticket's own (deferred-placeholder) WSJF is consumed from its freshly-written file. **WSJF Rankings tier + tie-break sort** (the "`docs/problems/README.md` WSJF Rankings table row order doesn't match `/wr-itil:work-problems`'s tie-break selection — users assume the orchestrator is broken" problem + the "Inbound-reported problems rank ahead of internally-discovered problems via a sort tier" architecture rule) and **Verification Queue sort direction** (the "docs/problems/README.md Verification Queue rendered newest-first contradicts section header "Ranked by release age, oldest first"" problem) and **Likely-verified cell shape** (the "VQ `Likely verified?` column uses age-based heuristic (≥14 days = yes) instead of session-observed evidence — sibling proxy-for-evidence anti-pattern to" problem) all follow the canonical render rules — see `/wr-itil:manage-problem` Step 5 the "Problem 094: `/wr-itil:manage-problem` does not refresh `docs/problems/README.md` on ticket creation" problem block for the full prose; drift here re-opens those tickets.
324
334
 
325
335
  **the "`docs/problems/README.md` line 3 narrative-blob accumulator bloat — sibling to (briefing tier 3) on a different surface" problem last-reviewed rotation** — inline at this execution site (not deferred to a § subsection) per the "transition-problem SKILL Step 7 Last-reviewed rotation silently skipped across iters" problem silent-skip discipline. MUST execute IN ORDER:
@@ -275,20 +275,20 @@ On a flat-layout adopter repo (first invocation post-update — the "Extend the
275
275
 
276
276
  After Step 0a completes (whether no-op or migration), proceed to Step 0 README reconciliation preflight. The reconcile-readme script reads the post-migration layout; the in-flow Step 5 / Step 7 README refresh paths re-render the README from the per-state subdir shape.
277
277
 
278
- ### 0. README reconciliation preflight (the "`docs/problems/README.md` drifts from filesystem truth across sessions despite (refresh-on-create) and (refresh-on-transition) both Closed" problem)
278
+ ### 0. README reconciliation preflight (the "`docs/problems/README.md` drifts from filesystem truth across sessions despite (refresh-on-create) and (refresh-on-transition) both Closed" problem, the "Problem creation is gated on the problem index existing" problem, the "Problem reports precede derived index repair" architecture rule)
279
279
 
280
280
  Before parsing the request, run the diagnose-only reconciliation check. The contract here catches **cross-session drift** that per-operation refresh paths (the "Problem 094: `/wr-itil:manage-problem` does not refresh `docs/problems/README.md` on ticket creation" problem refresh-on-create + the "Problem 062: `manage-problem` does not refresh `docs/problems/README.md` on single-ticket transitions; fast-path cache goes stale silently" problem refresh-on-transition) cannot retroactively see — if any past session committed a ticket change without staging the README refresh, the next manage-problem invocation reads a stale README that lies about what is open / verifying / closed.
281
281
 
282
+ Store the exit code and diagnostic until Step 1 classifies the requested operation. Do not halt before classification: the "Problem reports precede derived index repair" architecture rule permits only new-problem creation to preserve the report first and repair a missing or parseably stale derived index in the same commit. Existing-problem operations keep the strict routing below.
283
+
282
284
  ```bash
283
- wr-itil-reconcile-readme docs/problems
285
+ wr-itil-reconcile-readme docs/problems > /tmp/wr-itil-drift-$$.txt
286
+ reconcile_exit=$?
284
287
  ```
285
288
 
286
289
  The `wr-itil-reconcile-readme` command is a `$PATH`-resolved shim shipped in `packages/itil/bin/` that dispatches the canonical `packages/itil/scripts/reconcile-readme.sh` body. the "Plugin-bundled scripts invoked from SKILL.md resolve via `bin/` on `$PATH`" architecture rule — never invoke the canonical script via repo-relative path; the path does not resolve in adopter trees.
287
290
 
288
- Exit-code routing:
289
- - **Exit 0 (clean)**: continue to Step 1.
290
- - **Exit 1 (drift detected)**: structured diff lines printed to stdout, one per drift entry (≤150 bytes per the "Progressive disclosure + once-per-session budget for UserPromptSubmit governance prose" architecture rule progressive-disclosure budget). Capture stdout to a temp file and classify the drift via the **uncommitted-rename carve-out** (the "`/wr-itil:manage-problem` Step 0 reconcile halt-on-drift directive doesn't distinguish uncommitted-rename-rooted drift (same-session pending) from committed cross-session drift — should refresh inline rather than halt for the former case" problem) before halt-routing — see "Drift classification carve-out" immediately below.
291
- - **Exit 2 (parse error)**: README missing or malformed. Halt with the parse-error message; this needs investigation, not mechanical reconciliation. AFK orchestrators halt-with-report per the "Structured User Interaction for Governance-Skill Decisions" architecture rule Rule 6.
291
+ Exit-code routing is applied after Step 1 classifies the operation. Exit 0 continues. Exit 1 carries structured drift lines in the temp file. Exit 2 is split mechanically into a missing README (`[ ! -f docs/problems/README.md ]`) and an existing malformed README.
292
292
 
293
293
  #### Drift classification carve-out (the "`/wr-itil:manage-problem` Step 0 reconcile halt-on-drift directive doesn't distinguish uncommitted-rename-rooted drift (same-session pending) from committed cross-session drift — should refresh inline rather than halt for the former case" problem)
294
294
 
@@ -363,6 +363,17 @@ Determine the operation from `$ARGUMENTS`:
363
363
  - If arguments contain "review", **delegate to `/wr-itil:review-problems`** via the Skill tool. See "Deprecated-argument forwarders" below.
364
364
  - Otherwise, this is a new problem creation
365
365
 
366
+ #### Creation-only reconciliation routing (the "Problem creation is gated on the problem index existing" problem, the "Problem reports precede derived index repair" architecture rule)
367
+
368
+ After classifying the request, apply the stored Step 0 result:
369
+
370
+ - **New problem + Exit 1 (parseable drift):** preserve the diagnostic, continue through duplicate checking and ticket creation, then repair only the generated README sections at Step 5 while preserving narrative. Stage the ticket and repaired index together.
371
+ - **New problem + Exit 2 + README absent:** continue through ticket creation, then create the canonical README from ticket truth at Step 5. There is no prior line 3 to rotate. Stage the ticket and new index together.
372
+ - **New problem + Exit 2 + existing README:** halt with the parse-error message. Existing malformed content is not safe to overwrite.
373
+ - **Every non-creation operation:** retain the prior strict behavior. Exit 1 runs the "`/wr-itil:manage-problem` Step 0 reconcile halt-on-drift directive doesn't distinguish uncommitted-rename-rooted drift (same-session pending) from committed cross-session drift — should refresh inline rather than halt for the former case" problem classifier below and halt-routes unless every drifting ID is an in-flow staged rename. Exit 2 halts. Forwarders delegate only after this routing passes.
374
+
375
+ Remove the Step 0 temp file after routing. The creation exception never invokes a preceding reconciliation commit and never emits a bypass token.
376
+
366
377
  #### 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 Claude Code autocomplete" problem)
367
378
 
368
379
  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 Skill tool AND emit a one-line systemMessage with the canonical deprecation notice so the user learns the new invocation shape.
@@ -617,6 +628,8 @@ The `## Dependencies` section uses **bare ticket IDs** (`the "Problem 038: No vo
617
628
 
618
629
  After writing the new `.open.md` file, regenerate `docs/problems/README.md` to insert the new ticket's row into the WSJF Rankings, and stage the refreshed README in the same commit as the new ticket. Without this refresh, new tickets are absent from the ranked table until the next `/wr-itil:review-problems` invocation or the next Step 7 transition — staleness accumulates silently on every creation-only session.
619
630
 
631
+ **the "Problem reports precede derived index repair" architecture rule repair routing:** when Step 0 reported a missing README, create the canonical README from ticket truth and skip history rotation because no line 3 was displaced. For parseable drift, replace only generated ranking/queue sections and preserve all narrative outside those sections before the normal line-3 rotation. An existing malformed README remains blocked before Step 5.
632
+
620
633
  **Mechanism**: use the same rendering rules as Step 7's the "Problem 062: `manage-problem` does not refresh `docs/problems/README.md` on single-ticket transitions; fast-path cache goes stale silently" problem block (glob `docs/problems/*.open.md` / `*.known-error.md` / `*.verifying.md` / `*.parked.md`; rank open/known-error by WSJF; list verifyings in the Verification Queue ordered by release age; list parkeds in the Parked section). The refresh is a **render, not a re-rank** — existing WSJF values on the other ticket files are trusted per the "Problem 062: `manage-problem` does not refresh `docs/problems/README.md` on single-ticket transitions; fast-path cache goes stale silently" problem's established discipline. Only the new ticket's own WSJF is consumed from its freshly-written file.
621
634
 
622
635
  **WSJF Rankings tier + tie-break sort (the "`docs/problems/README.md` WSJF Rankings table row order doesn't match `/wr-itil:work-problems`'s tie-break selection — users assume the orchestrator is broken" problem + the "Inbound-reported problems rank ahead of internally-discovered problems via a sort tier" architecture rule)**: rows render **tier-first** — Tier 0 Critical-bypass (Severity Very High ≥17 OR security-classified OR incident-linked) → Tier 1 Inbound-reported (`**Origin**: inbound-reported`) → Tier 2 Internal — and **within each tier** by the multi-key `(WSJF desc, Known-Error-first, Effort-divisor asc, Reported-date asc, ID asc)` so the rendered top-to-bottom row order matches `/wr-itil:work-problems` SKILL.md Step 3's selection 1:1. The "Inbound-reported problems rank ahead of internally-discovered problems via a sort tier" architecture rule tier partition sets the top-level order; within a tier WSJF desc sets the band, then the next three keys are the canonical tie-break ladder (Known Error before Open; smaller effort before larger; older Reported date before newer); ID asc is the deterministic final tiebreaker for full-tie cases. The table MUST include a `Reported` column so the third tie-break input is visible, and an `Origin` column so the Tier 1 partition is visible — without them, users cannot reconcile the rendered order against the orchestrator's selection. <!-- REPORTED-FIRST-TIER-SOURCE: /wr-itil:work-problems SKILL.md Step 3 (the "Inbound-reported problems rank ahead of internally-discovered problems via a sort tier" architecture rule) --> <!-- TIE-BREAK-LADDER-SOURCE: /wr-itil:work-problems SKILL.md Step 3 --> Any future change to the tie-break ladder OR the reported-first tier MUST update this render block, the Step 7 the "Problem 062: `manage-problem` does not refresh `docs/problems/README.md` on single-ticket transitions; fast-path cache goes stale silently" problem block, the Step 9e template, AND `/wr-itil:review-problems` SKILL.md Step 3 / Step 5 — drift here re-opens the "`docs/problems/README.md` WSJF Rankings table row order doesn't match `/wr-itil:work-problems`'s tie-break selection — users assume the orchestrator is broken" problem / the "Inbound-reported problems rank ahead of internally-discovered problems via a sort tier" architecture rule.
@@ -61,23 +61,31 @@ Per the "Structured User Interaction for Governance-Skill Decisions" architectur
61
61
 
62
62
  ## Steps
63
63
 
64
- ### 0. README reconciliation preflight (the "`docs/problems/README.md` drifts from filesystem truth across sessions despite (refresh-on-create) and (refresh-on-transition) both Closed" problem)
64
+ ### 0. README reconciliation preflight (the "`docs/problems/README.md` drifts from filesystem truth across sessions despite (refresh-on-create) and (refresh-on-transition) both Closed" problem, the "Problem creation is gated on the problem index existing" problem, the "Problem reports precede derived index repair" architecture rule)
65
65
 
66
- Same as `/wr-itil:manage-problem` Step 0 — diagnose-only check. Halt-and-route on Exit 1 (committed cross-session drift); INLINE_REFRESH carve-out (the "`/wr-itil:manage-problem` Step 0 reconcile halt-on-drift directive doesn't distinguish uncommitted-rename-rooted drift (same-session pending) from committed cross-session drift should refresh inline rather than halt for the former case" problem) preserved. capture-problem itself does NOT refresh README.md (see Step 6); the preflight is purely a fail-fast on pre-existing drift.
66
+ Run the strict diagnose-only check, but do not let derived-index repair discard the report this creation-only skill exists to preserve. `capture-problem` always creates a new problem, so the "Problem reports precede derived index repair" architecture rule authorizes it to carry a missing-index or parseable-drift result forward to the inline Step 6 repair. An existing malformed README still halts because replacing it could destroy human-authored narrative.
67
67
 
68
68
  ```bash
69
69
  <itil-plugin-root>/bin/wr-itil-reconcile-readme docs/problems > /tmp/wr-itil-drift-$$.txt
70
70
  reconcile_exit=$?
71
- if [ "$reconcile_exit" -eq 1 ]; then
72
- <itil-plugin-root>/bin/wr-itil-classify-readme-drift /tmp/wr-itil-drift-$$.txt docs/problems
73
- classify_exit=$?
74
- rm -f /tmp/wr-itil-drift-$$.txt
75
- # classify_exit 0 (INLINE_REFRESH): proceed (no inline refresh in this skill).
76
- # classify_exit 1 (HALT_ROUTE_RECONCILE): halt; invoke /wr-itil:reconcile-readme.
77
- # classify_exit 2 (parse error): conservative halt-and-route.
78
- fi
71
+ case "$reconcile_exit" in
72
+ 0) readme_repair="clean" ;;
73
+ 1) readme_repair="drift" ;; # preserve the diagnostic; Step 6 repairs generated sections
74
+ 2)
75
+ if [ ! -f docs/problems/README.md ]; then
76
+ readme_repair="missing" # Step 6 creates the canonical index
77
+ else
78
+ rm -f /tmp/wr-itil-drift-$$.txt
79
+ echo "capture-problem: existing docs/problems/README.md is malformed; refusing to overwrite human-authored content" >&2
80
+ exit 2
81
+ fi
82
+ ;;
83
+ esac
84
+ rm -f /tmp/wr-itil-drift-$$.txt
79
85
  ```
80
86
 
87
+ For `readme_repair=drift` or `missing`, emit one advisory naming the repair that will ride with the capture commit, then continue to Step 1. Do not invoke `/wr-itil:reconcile-readme` first and do not emit a bypass token. The ticket plus repaired or newly-created index remain one the "Governance Skills Commit Their Own Completed Work" architecture rule commit grain.
88
+
81
89
  ### 1. Parse the description and flags from `$ARGUMENTS`
82
90
 
83
91
  `$ARGUMENTS` may carry up to two leading flags before the free-text description (caller-side pre-resolution per the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule silent-proceed shape):
@@ -331,6 +339,8 @@ Single `Write` to `docs/problems/open/<NNN>-<kebab-title>.md` (per the "Problem-
331
339
 
332
340
  After writing the new `.open.md` file at Step 5, regenerate `docs/problems/README.md` to insert the new ticket's row into the WSJF Rankings, and stage the refreshed README in the same commit as the new ticket. The mechanism is **inline at this execution site per the "transition-problem SKILL Step 7 Last-reviewed rotation silently skipped across iters" problem** — not deferred via cross-reference — so a single-pass agent reading Step 6 does not silently skip the archive step (the canonical the "transition-problem SKILL Step 7 Last-reviewed rotation silently skipped across iters" problem silent-skip regression).
333
341
 
342
+ **the "Problem reports precede derived index repair" architecture rule repair routing:** when Step 0 set `readme_repair=missing`, create the canonical README from ticket truth and skip history rotation because there is no displaced line 3. When it set `readme_repair=drift`, replace only the generated ranking/queue sections and preserve every narrative line outside those sections before applying the normal line-3 rotation below. `readme_repair=clean` follows the normal refresh. An existing malformed README never reaches this step.
343
+
334
344
  **Mechanism**: use the same rendering rules as `/wr-itil:manage-problem` Step 5 the "Problem 094: `/wr-itil:manage-problem` does not refresh `docs/problems/README.md` on ticket creation" problem / Step 7 the "Problem 062: `manage-problem` does not refresh `docs/problems/README.md` on single-ticket transitions; fast-path cache goes stale silently" problem (glob `docs/problems/*.open.md` / `*.known-error.md` / `*.verifying.md` / `*.parked.md` AND the per-state-subdir layout `docs/problems/open/*.md` / `docs/problems/known-error/*.md` / `docs/problems/verifying/*.md` / `docs/problems/parked/*.md`; rank open/known-error by WSJF; list verifyings in the Verification Queue ordered by Released date ASC per the "docs/problems/README.md Verification Queue rendered newest-first contradicts section header "Ranked by release age, oldest first"" problem; list parkeds in the Parked section). The refresh is a **render, not a re-rank** — existing WSJF values on the other ticket files are trusted per the "Problem 062: `manage-problem` does not refresh `docs/problems/README.md` on single-ticket transitions; fast-path cache goes stale silently" problem's established discipline. Only the new ticket's own (deferred-placeholder) WSJF is consumed from its freshly-written file. **WSJF Rankings tier + tie-break sort** (the "`docs/problems/README.md` WSJF Rankings table row order doesn't match `/wr-itil:work-problems`'s tie-break selection — users assume the orchestrator is broken" problem + the "Inbound-reported problems rank ahead of internally-discovered problems via a sort tier" architecture rule) and **Verification Queue sort direction** (the "docs/problems/README.md Verification Queue rendered newest-first contradicts section header "Ranked by release age, oldest first"" problem) and **Likely-verified cell shape** (the "VQ `Likely verified?` column uses age-based heuristic (≥14 days = yes) instead of session-observed evidence — sibling proxy-for-evidence anti-pattern to" problem) all follow the canonical render rules — see `/wr-itil:manage-problem` Step 5 the "Problem 094: `/wr-itil:manage-problem` does not refresh `docs/problems/README.md` on ticket creation" problem block for the full prose; drift here re-opens those tickets.
335
345
 
336
346
  **the "`docs/problems/README.md` line 3 narrative-blob accumulator bloat — sibling to (briefing tier 3) on a different surface" problem last-reviewed rotation** — inline at this execution site (not deferred to a § subsection) per the "transition-problem SKILL Step 7 Last-reviewed rotation silently skipped across iters" problem silent-skip discipline. MUST execute IN ORDER:
@@ -286,20 +286,20 @@ On a flat-layout adopter repo (first invocation post-update — the "Extend the
286
286
 
287
287
  After Step 0a completes (whether no-op or migration), proceed to Step 0 README reconciliation preflight. The reconcile-readme script reads the post-migration layout; the in-flow Step 5 / Step 7 README refresh paths re-render the README from the per-state subdir shape.
288
288
 
289
- ### 0. README reconciliation preflight (the "`docs/problems/README.md` drifts from filesystem truth across sessions despite (refresh-on-create) and (refresh-on-transition) both Closed" problem)
289
+ ### 0. README reconciliation preflight (the "`docs/problems/README.md` drifts from filesystem truth across sessions despite (refresh-on-create) and (refresh-on-transition) both Closed" problem, the "Problem creation is gated on the problem index existing" problem, the "Problem reports precede derived index repair" architecture rule)
290
290
 
291
291
  Before parsing the request, run the diagnose-only reconciliation check. The contract here catches **cross-session drift** that per-operation refresh paths (the "Problem 094: `/wr-itil:manage-problem` does not refresh `docs/problems/README.md` on ticket creation" problem refresh-on-create + the "Problem 062: `manage-problem` does not refresh `docs/problems/README.md` on single-ticket transitions; fast-path cache goes stale silently" problem refresh-on-transition) cannot retroactively see — if any past session committed a ticket change without staging the README refresh, the next manage-problem invocation reads a stale README that lies about what is open / verifying / closed.
292
292
 
293
+ Store the exit code and diagnostic until Step 1 classifies the requested operation. Do not halt before classification: the "Problem reports precede derived index repair" architecture rule permits only new-problem creation to preserve the report first and repair a missing or parseably stale derived index in the same commit. Existing-problem operations keep the strict routing below.
294
+
293
295
  ```bash
294
- <itil-plugin-root>/bin/wr-itil-reconcile-readme docs/problems
296
+ <itil-plugin-root>/bin/wr-itil-reconcile-readme docs/problems > /tmp/wr-itil-drift-$$.txt
297
+ reconcile_exit=$?
295
298
  ```
296
299
 
297
300
  The `<itil-plugin-root>/bin/wr-itil-reconcile-readme` command is a `$PATH`-resolved shim shipped in `<itil-plugin-root>/bin/` that dispatches the canonical `<itil-plugin-root>/scripts/reconcile-readme.sh` body. the "Plugin-bundled scripts invoked from SKILL.md resolve via `bin/` on `$PATH`" architecture rule — never invoke the canonical script via repo-relative path; the path does not resolve in adopter trees.
298
301
 
299
- Exit-code routing:
300
- - **Exit 0 (clean)**: continue to Step 1.
301
- - **Exit 1 (drift detected)**: structured diff lines printed to stdout, one per drift entry (≤150 bytes per the "Progressive disclosure + once-per-session budget for UserPromptSubmit governance prose" architecture rule progressive-disclosure budget). Capture stdout to a temp file and classify the drift via the **uncommitted-rename carve-out** (the "`/wr-itil:manage-problem` Step 0 reconcile halt-on-drift directive doesn't distinguish uncommitted-rename-rooted drift (same-session pending) from committed cross-session drift — should refresh inline rather than halt for the former case" problem) before halt-routing — see "Drift classification carve-out" immediately below.
302
- - **Exit 2 (parse error)**: README missing or malformed. Halt with the parse-error message; this needs investigation, not mechanical reconciliation. AFK orchestrators halt-with-report per the "Structured User Interaction for Governance-Skill Decisions" architecture rule Rule 6.
302
+ Exit-code routing is applied after Step 1 classifies the operation. Exit 0 continues. Exit 1 carries structured drift lines in the temp file. Exit 2 is split mechanically into a missing README (`[ ! -f docs/problems/README.md ]`) and an existing malformed README.
303
303
 
304
304
  #### Drift classification carve-out (the "`/wr-itil:manage-problem` Step 0 reconcile halt-on-drift directive doesn't distinguish uncommitted-rename-rooted drift (same-session pending) from committed cross-session drift — should refresh inline rather than halt for the former case" problem)
305
305
 
@@ -374,6 +374,17 @@ Determine the operation from `$ARGUMENTS`:
374
374
  - If arguments contain "review", **delegate to `/wr-itil:review-problems`** via the installed skill invocation. See "Deprecated-argument forwarders" below.
375
375
  - Otherwise, this is a new problem creation
376
376
 
377
+ #### Creation-only reconciliation routing (the "Problem creation is gated on the problem index existing" problem, the "Problem reports precede derived index repair" architecture rule)
378
+
379
+ After classifying the request, apply the stored Step 0 result:
380
+
381
+ - **New problem + Exit 1 (parseable drift):** preserve the diagnostic, continue through duplicate checking and ticket creation, then repair only the generated README sections at Step 5 while preserving narrative. Stage the ticket and repaired index together.
382
+ - **New problem + Exit 2 + README absent:** continue through ticket creation, then create the canonical README from ticket truth at Step 5. There is no prior line 3 to rotate. Stage the ticket and new index together.
383
+ - **New problem + Exit 2 + existing README:** halt with the parse-error message. Existing malformed content is not safe to overwrite.
384
+ - **Every non-creation operation:** retain the prior strict behavior. Exit 1 runs the "`/wr-itil:manage-problem` Step 0 reconcile halt-on-drift directive doesn't distinguish uncommitted-rename-rooted drift (same-session pending) from committed cross-session drift — should refresh inline rather than halt for the former case" problem classifier below and halt-routes unless every drifting ID is an in-flow staged rename. Exit 2 halts. Forwarders delegate only after this routing passes.
385
+
386
+ Remove the Step 0 temp file after routing. The creation exception never invokes a preceding reconciliation commit and never emits a bypass token.
387
+
377
388
  #### 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)
378
389
 
379
390
  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.
@@ -628,6 +639,8 @@ The `## Dependencies` section uses **bare ticket IDs** (`the "Problem 038: No vo
628
639
 
629
640
  After writing the new `.open.md` file, regenerate `docs/problems/README.md` to insert the new ticket's row into the WSJF Rankings, and stage the refreshed README in the same commit as the new ticket. Without this refresh, new tickets are absent from the ranked table until the next `/wr-itil:review-problems` invocation or the next Step 7 transition — staleness accumulates silently on every creation-only session.
630
641
 
642
+ **the "Problem reports precede derived index repair" architecture rule repair routing:** when Step 0 reported a missing README, create the canonical README from ticket truth and skip history rotation because no line 3 was displaced. For parseable drift, replace only generated ranking/queue sections and preserve all narrative outside those sections before the normal line-3 rotation. An existing malformed README remains blocked before Step 5.
643
+
631
644
  **Mechanism**: use the same rendering rules as Step 7's the "Problem 062: `manage-problem` does not refresh `docs/problems/README.md` on single-ticket transitions; fast-path cache goes stale silently" problem block (glob `docs/problems/*.open.md` / `*.known-error.md` / `*.verifying.md` / `*.parked.md`; rank open/known-error by WSJF; list verifyings in the Verification Queue ordered by release age; list parkeds in the Parked section). The refresh is a **render, not a re-rank** — existing WSJF values on the other ticket files are trusted per the "Problem 062: `manage-problem` does not refresh `docs/problems/README.md` on single-ticket transitions; fast-path cache goes stale silently" problem's established discipline. Only the new ticket's own WSJF is consumed from its freshly-written file.
632
645
 
633
646
  **WSJF Rankings tier + tie-break sort (the "`docs/problems/README.md` WSJF Rankings table row order doesn't match `/wr-itil:work-problems`'s tie-break selection — users assume the orchestrator is broken" problem + the "Inbound-reported problems rank ahead of internally-discovered problems via a sort tier" architecture rule)**: rows render **tier-first** — Tier 0 Critical-bypass (Severity Very High ≥17 OR security-classified OR incident-linked) → Tier 1 Inbound-reported (`**Origin**: inbound-reported`) → Tier 2 Internal — and **within each tier** by the multi-key `(WSJF desc, Known-Error-first, Effort-divisor asc, Reported-date asc, ID asc)` so the rendered top-to-bottom row order matches `/wr-itil:work-problems` SKILL.md Step 3's selection 1:1. The "Inbound-reported problems rank ahead of internally-discovered problems via a sort tier" architecture rule tier partition sets the top-level order; within a tier WSJF desc sets the band, then the next three keys are the canonical tie-break ladder (Known Error before Open; smaller effort before larger; older Reported date before newer); ID asc is the deterministic final tiebreaker for full-tie cases. The table MUST include a `Reported` column so the third tie-break input is visible, and an `Origin` column so the Tier 1 partition is visible — without them, users cannot reconcile the rendered order against the orchestrator's selection. <!-- REPORTED-FIRST-TIER-SOURCE: /wr-itil:work-problems SKILL.md Step 3 (the "Inbound-reported problems rank ahead of internally-discovered problems via a sort tier" architecture rule) --> <!-- TIE-BREAK-LADDER-SOURCE: /wr-itil:work-problems SKILL.md Step 3 --> Any future change to the tie-break ladder OR the reported-first tier MUST update this render block, the Step 7 the "Problem 062: `manage-problem` does not refresh `docs/problems/README.md` on single-ticket transitions; fast-path cache goes stale silently" problem block, the Step 9e template, AND `/wr-itil:review-problems` SKILL.md Step 3 / Step 5 — drift here re-opens the "`docs/problems/README.md` WSJF Rankings table row order doesn't match `/wr-itil:work-problems`'s tie-break selection — users assume the orchestrator is broken" problem / the "Inbound-reported problems rank ahead of internally-discovered problems via a sort tier" architecture rule.