@windyroad/itil 0.37.0 → 0.37.1-preview.455

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.
@@ -484,5 +484,5 @@
484
484
  }
485
485
  },
486
486
  "name": "wr-itil",
487
- "version": "0.37.0"
487
+ "version": "0.37.1"
488
488
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windyroad/itil",
3
- "version": "0.37.0",
3
+ "version": "0.37.1-preview.455",
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"
@@ -153,7 +153,7 @@ The **3-keyword cap** is a hard-coded constant. Do NOT make it env-overridable
153
153
 
154
154
  If matches are found: list them in the final report. **Do NOT halt or branch.** Capture proceeds. The user can resolve duplicates at the next `/wr-itil:review-problems` invocation (or invoke `/wr-itil:manage-problem` directly if the duplicate-check shape needs a structured branch).
155
155
 
156
- **After the grep completes**, write the per-session create-gate marker so the `PreToolUse:Write` hook (P119) permits the subsequent Write of the new `.open.md` file. Per **P260 / ADR-050 Option C**, write it under EVERY recent candidate session SID (not just one) so a concurrent orchestrator+subprocess race cannot land the marker under the wrong UUID:
156
+ **After the grep completes**, write the per-session create-gate marker so the `PreToolUse:Write` hook (P119) permits the subsequent Write of the new ticket file under `docs/problems/open/`. Per **P260 / ADR-050 Option C**, write it under EVERY recent candidate session SID (not just one) so a concurrent orchestrator+subprocess race cannot land the marker under the wrong UUID:
157
157
 
158
158
  ```bash
159
159
  wr-itil-mark-create-gate
@@ -185,7 +185,7 @@ Log the renumber decision in the operation report if origin and local diverged.
185
185
 
186
186
  ### 4. Skeleton-fill the ticket
187
187
 
188
- **File path**: `docs/problems/<NNN>-<kebab-title>.open.md`
188
+ **File path**: `docs/problems/open/<NNN>-<kebab-title>.md` (per ADR-031 per-state-subdir layout)
189
189
 
190
190
  **Template** (deferred-placeholder pattern — flag every section the capture didn't fill):
191
191
 
@@ -243,14 +243,14 @@ The deferred-placeholder pattern is load-bearing — `/wr-itil:review-problems`
243
243
 
244
244
  ### 5. Write the file
245
245
 
246
- Single `Write` to `docs/problems/<NNN>-<kebab-title>.open.md`. The P119 PreToolUse hook permits the Write because Step 2 set the marker.
246
+ Single `Write` to `docs/problems/open/<NNN>-<kebab-title>.md` (per ADR-031 per-state-subdir layout). The P119 PreToolUse hook permits the Write because Step 2 set the marker.
247
247
 
248
248
  ### 6. Commit per ADR-014 — single commit, no README refresh
249
249
 
250
250
  **Stage list**: ONLY the new ticket file. **Do NOT** stage `docs/problems/README.md`. The deferred-README-refresh contract is the load-bearing distinction from `/wr-itil:manage-problem` — capture-time speed depends on skipping the regenerate-and-stage cycle.
251
251
 
252
252
  ```bash
253
- git add docs/problems/<NNN>-<kebab-title>.open.md
253
+ git add docs/problems/open/<NNN>-<kebab-title>.md
254
254
  ```
255
255
 
256
256
  Satisfy the commit gate per ADR-014 — same two-path pattern as manage-problem Step 11:
@@ -304,13 +304,13 @@ The two skills share the `/tmp/manage-problem-grep-${SESSION_ID}` create-gate ma
304
304
 
305
305
  ## Related
306
306
 
307
- - **P155** (`docs/problems/155-ship-capture-problem-skill.open.md`) — driver ticket.
308
- - **P014** (`docs/problems/014-aside-invocation-for-governance-skills.open.md`) — parent / master tracker.
307
+ - **P155** (`docs/problems/closed/155-ship-capture-problem-skill.md`) — driver ticket.
308
+ - **P014** (`docs/problems/open/014-aside-invocation-for-governance-skills.md`) — parent / master tracker.
309
309
  - **P078** — capture-on-correction OFFER pattern; depends on capture-problem shipping.
310
310
  - **P119** — manage-problem create-gate hook; capture-problem composes with the same marker.
311
311
  - **P262** — the P165 README-refresh-discipline hook conflicted with this skill's deferred-README-refresh contract (Step 6 "do NOT stage README" was denied by the hook on every capture commit). Resolved by the `RISK_BYPASS: capture-deferred-readme` allow-list token (Step 6 trailer above); clears the README-refresh gate only, not the risk-score gate.
312
312
  - **P265** — the RISK_BYPASS-trailer allow-list mechanism in `readme-refresh-detect.sh` that P262's `capture-deferred-readme` token registers into.
313
- - **P170** (`docs/problems/170-...open.md`) — RFC framework driver; Slice 4 B7.T3 / item 8c authored the type-classification prompt at Step 1.5.
313
+ - **P170** (`docs/problems/known-error/170-problem-tickets-strain-as-fixes-decompose-into-multiple-coordinated-changes-need-rfc-framework.md`) — RFC framework driver; Slice 4 B7.T3 / item 8c authored the type-classification prompt at Step 1.5.
314
314
  - **P176** — agent-side I2 (no type-branching) coverage gap on the SKILL.md surface (this file's surface); descendant of P012 master harness ticket. The Step 1.5 I2 invariant guard is enforced by audit-trailed prose here per ADR-052 § Surface 2 escape-hatch contract; behavioural enforcement awaits the master harness.
315
315
  - **ADR-032** (`docs/decisions/032-governance-skill-invocation-patterns.proposed.md`) — foreground-lightweight-capture variant amendment.
316
316
  - **ADR-038** — progressive-disclosure pattern (SKILL.md + REFERENCE.md split).
@@ -203,14 +203,19 @@ EOF
203
203
  # ---------------------------------------------------------------------------
204
204
 
205
205
  @test "capture-problem: skeleton-filled ticket carries the deferred-placeholder pattern" {
206
- mkdir -p "$TMPROOT/docs/problems"
206
+ # Fixture mirrors the SKILL.md Step 4-5 prescribed write target — per
207
+ # ADR-031 per-state-subdir layout (`docs/problems/open/<NNN>-<slug>.md`),
208
+ # NOT the pre-ADR-031 flat shape (`docs/problems/<NNN>-<slug>.open.md`).
209
+ # P281 (template-refresh sub-shape) corrected the SKILL.md drift; this
210
+ # fixture exercises the now-canonical write path.
211
+ mkdir -p "$TMPROOT/docs/problems/open"
207
212
  TITLE="example-aside-finding"
208
213
  ID="200"
209
214
  TODAY=$(date -u +%Y-%m-%d)
210
215
  DESCRIPTION="Quick observation worth a ticket but not blocking."
211
216
 
212
217
  # Mirror the SKILL.md skeleton-fill template.
213
- cat > "$TMPROOT/docs/problems/${ID}-${TITLE}.open.md" <<EOF
218
+ cat > "$TMPROOT/docs/problems/open/${ID}-${TITLE}.md" <<EOF
214
219
  # Problem ${ID}: ${TITLE}
215
220
 
216
221
  **Status**: Open
@@ -257,7 +262,7 @@ ${DESCRIPTION}
257
262
  EOF
258
263
 
259
264
  # Behavioural assertions: ticket file has the load-bearing fields.
260
- TICKET="$TMPROOT/docs/problems/${ID}-${TITLE}.open.md"
265
+ TICKET="$TMPROOT/docs/problems/open/${ID}-${TITLE}.md"
261
266
  [ -f "$TICKET" ]
262
267
  run grep -F '**Status**: Open' "$TICKET"
263
268
  [ "$status" -eq 0 ]
@@ -584,3 +589,49 @@ resolve_type_dispatch() {
584
589
  result=$(classify_description "$desc")
585
590
  [ "$result" = "technical" ]
586
591
  }
592
+
593
+ # ---------------------------------------------------------------------------
594
+ # P281 — ADR-031 per-state-subdir layout conformance on the SKILL.md
595
+ # write-target path template.
596
+ #
597
+ # Surface 2 / structural-grep is justified here per ADR-052 § Surface 2
598
+ # escape-hatch contract: the SKILL.md path template IS the contract surface
599
+ # that adopter-side agents read literally. Concrete observed regression
600
+ # (voder-mcp-hub commit 6c73880) landed a ticket at the pre-ADR-031 flat
601
+ # path because the SKILL.md template named the flat shape. No pure-bash
602
+ # script equivalent exists to behaviourally test against — the test target
603
+ # IS the agent-driven prose instruction. Drift here re-opens the P281
604
+ # regression vector.
605
+ # ---------------------------------------------------------------------------
606
+
607
+ @test "P281: SKILL.md Step 4 File-path template names per-state-subdir layout (ADR-031)" {
608
+ # The contract surface: the literal `**File path**:` declaration in
609
+ # Step 4 of SKILL.md. Must name `docs/problems/open/<NNN>-<kebab-title>.md`
610
+ # per ADR-031 (accepted + human-oversight: confirmed), NOT the pre-ADR-031
611
+ # flat shape `docs/problems/<NNN>-<kebab-title>.open.md`.
612
+ run grep -F '**File path**: `docs/problems/open/<NNN>-<kebab-title>.md`' "$SKILL_FILE"
613
+ [ "$status" -eq 0 ]
614
+ }
615
+
616
+ @test "P281: SKILL.md Step 4-5-6 path declarations do NOT carry the pre-ADR-031 flat shape" {
617
+ # Negative assertion: none of the SKILL.md write-target path declarations
618
+ # may name the flat `docs/problems/<NNN>-<kebab-title>.open.md` shape.
619
+ # The voder-mcp-hub P032 regression (commit 6c73880) was driven by this
620
+ # literal text appearing in SKILL.md and being followed by an adopter-side
621
+ # agent. Title-anchored grep — body-text mentions of the old shape (e.g.
622
+ # commit-message examples that don't actually carry the path) are fine.
623
+ run grep -F 'docs/problems/<NNN>-<kebab-title>.open.md' "$SKILL_FILE"
624
+ [ "$status" -ne 0 ]
625
+ }
626
+
627
+ @test "P281: SKILL.md Step 5 Write target names per-state-subdir layout" {
628
+ # Step 5 prescribes the single Write call — must direct to per-state path.
629
+ run grep -F 'Single `Write` to `docs/problems/open/<NNN>-<kebab-title>.md`' "$SKILL_FILE"
630
+ [ "$status" -eq 0 ]
631
+ }
632
+
633
+ @test "P281: SKILL.md Step 6 git-add target names per-state-subdir layout" {
634
+ # Step 6 prescribes the stage command — must reference per-state path.
635
+ run grep -F 'git add docs/problems/open/<NNN>-<kebab-title>.md' "$SKILL_FILE"
636
+ [ "$status" -eq 0 ]
637
+ }