@windyroad/itil 0.21.1 → 0.21.2-preview.226
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
|
@@ -671,7 +671,9 @@ Highlight:
|
|
|
671
671
|
|
|
672
672
|
**Step 9d: Check for pending verifications**
|
|
673
673
|
|
|
674
|
-
Target `docs/problems/*.verifying.md` via glob — do NOT scan `.known-error.md` bodies for a `## Fix Released` section (per ADR-022, Verification Pending is a first-class status, not a substring marker). For each `.verifying.md` file,
|
|
674
|
+
Target `docs/problems/*.verifying.md` via glob — do NOT scan `.known-error.md` bodies for a `## Fix Released` section (per ADR-022, Verification Pending is a first-class status, not a substring marker). For each `.verifying.md` file, the agent collects in-session evidence per Step 4a's "Exercised successfully in-session" pattern (test invocation + observable outcome per ADR-026 grounding). When evidence-citation is concrete and unambiguous, the agent **closes the ticket on evidence** by delegating to `/wr-itil:transition-problem <NNN> close` (per ADR-014 commit grain) WITHOUT firing `AskUserQuestion` — per ADR-044 framework-resolution boundary, evidence-grounded close is a framework-mediated decision (the agent applies ADR-022's evidence semantics; per-candidate ask is sub-contracting that resolution back to the user as lazy deferral per Step 2d Ask Hygiene Pass classification).
|
|
675
|
+
|
|
676
|
+
When evidence is **ambiguous, contested, or absent** (no specific in-session citation), leave the ticket as Verification Pending — same exclusion path as Step 4a. The user surfaces concerns via the P078 capture-on-correction surface (authentic-correction per ADR-044 category 6) if a close-on-evidence action was wrong; closes are reversible via `/wr-itil:transition-problem <NNN> known-error` (the verifying-flip-back path used in the 2026-04-27 P124 regression flip-back). The Step 9d output table records each close action with its triggering citation + the documented recovery path.
|
|
675
677
|
|
|
676
678
|
**Step 9e: Update files and refresh README.md cache**
|
|
677
679
|
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
#!/usr/bin/env bats
|
|
2
|
+
#
|
|
3
|
+
# packages/itil/skills/manage-problem/test/manage-problem-step-9d-recovery-path.bats
|
|
4
|
+
#
|
|
5
|
+
# Behavioural tests for manage-problem Step 9d's recovery-path
|
|
6
|
+
# documentation (P135 Phase 2 / R5 / ADR-044).
|
|
7
|
+
#
|
|
8
|
+
# Step 9d closes verifying tickets on evidence WITHOUT firing
|
|
9
|
+
# AskUserQuestion (per ADR-044 framework-resolution boundary).
|
|
10
|
+
# Mirrors the run-retro Step 4a recovery-path contract.
|
|
11
|
+
#
|
|
12
|
+
# tdd-review: structural-permitted (justification: skill behavioural
|
|
13
|
+
# harness pending P012 + P081 Phase 2; SKILL.md contract assertions
|
|
14
|
+
# bridge until then; expected to migrate to behavioural form once
|
|
15
|
+
# the harness exists)
|
|
16
|
+
#
|
|
17
|
+
# @problem P135 Phase 2 R5
|
|
18
|
+
# @adr ADR-044 (Decision-Delegation Contract — closes are reversible)
|
|
19
|
+
# @adr ADR-022 (verification-pending lifecycle)
|
|
20
|
+
# @adr ADR-026 (cost-source grounding for in-session evidence)
|
|
21
|
+
# @adr ADR-005 / ADR-037 (testing strategy — bridge during harness build)
|
|
22
|
+
# @jtbd JTBD-001 / JTBD-006 / JTBD-201
|
|
23
|
+
|
|
24
|
+
SKILL_FILE="${BATS_TEST_DIRNAME}/../SKILL.md"
|
|
25
|
+
|
|
26
|
+
setup() {
|
|
27
|
+
[ -f "$SKILL_FILE" ]
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
# ── Step 9d's close-on-evidence contract ────────────────────────────────────
|
|
31
|
+
|
|
32
|
+
@test "Step 9d SKILL.md cites /wr-itil:transition-problem as the close-on-evidence dispatch target" {
|
|
33
|
+
# Bound the search to Step 9d (not the entire file)
|
|
34
|
+
run awk '/^\*\*Step 9d:/,/^\*\*Step 9e:/ {print}' "$SKILL_FILE"
|
|
35
|
+
[ "$status" -eq 0 ]
|
|
36
|
+
[[ "$output" == *"/wr-itil:transition-problem"* ]]
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@test "Step 9d SKILL.md names ADR-044 framework-resolution boundary as the rationale for no-AskUserQuestion close" {
|
|
40
|
+
run awk '/^\*\*Step 9d:/,/^\*\*Step 9e:/ {print}' "$SKILL_FILE"
|
|
41
|
+
[ "$status" -eq 0 ]
|
|
42
|
+
[[ "$output" == *"ADR-044"* ]]
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@test "Step 9d SKILL.md cites ADR-026 grounding requirement for in-session evidence" {
|
|
46
|
+
run awk '/^\*\*Step 9d:/,/^\*\*Step 9e:/ {print}' "$SKILL_FILE"
|
|
47
|
+
[ "$status" -eq 0 ]
|
|
48
|
+
[[ "$output" == *"ADR-026"* ]]
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@test "Step 9d SKILL.md cites ADR-022 verification-pending lifecycle semantics" {
|
|
52
|
+
run awk '/^\*\*Step 9d:/,/^\*\*Step 9e:/ {print}' "$SKILL_FILE"
|
|
53
|
+
[ "$status" -eq 0 ]
|
|
54
|
+
[[ "$output" == *"ADR-022"* ]]
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
# ── Recovery-path contract ──────────────────────────────────────────────────
|
|
58
|
+
|
|
59
|
+
@test "Step 9d SKILL.md documents that closes are reversible" {
|
|
60
|
+
run awk '/^\*\*Step 9d:/,/^\*\*Step 9e:/ {print}' "$SKILL_FILE"
|
|
61
|
+
[ "$status" -eq 0 ]
|
|
62
|
+
[[ "$output" == *"reversible"* ]]
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@test "Step 9d SKILL.md names the recovery invocation (transition-problem known-error)" {
|
|
66
|
+
run awk '/^\*\*Step 9d:/,/^\*\*Step 9e:/ {print}' "$SKILL_FILE"
|
|
67
|
+
[ "$status" -eq 0 ]
|
|
68
|
+
[[ "$output" == *"known-error"* ]]
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@test "Step 9d SKILL.md cites 2026-04-27 P124 verifying-flip-back precedent" {
|
|
72
|
+
run awk '/^\*\*Step 9d:/,/^\*\*Step 9e:/ {print}' "$SKILL_FILE"
|
|
73
|
+
[ "$status" -eq 0 ]
|
|
74
|
+
[[ "$output" == *"P124"* ]]
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
# ── Ambiguous-evidence preservation (no auto-close on weak evidence) ────────
|
|
78
|
+
|
|
79
|
+
@test "Step 9d SKILL.md preserves the ambiguous-evidence path (left as Verification Pending)" {
|
|
80
|
+
run awk '/^\*\*Step 9d:/,/^\*\*Step 9e:/ {print}' "$SKILL_FILE"
|
|
81
|
+
[ "$status" -eq 0 ]
|
|
82
|
+
[[ "$output" == *"ambiguous"* ]] || [[ "$output" == *"Verification Pending"* ]]
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@test "Step 9d SKILL.md routes user disagreement through authentic-correction surface" {
|
|
86
|
+
run awk '/^\*\*Step 9d:/,/^\*\*Step 9e:/ {print}' "$SKILL_FILE"
|
|
87
|
+
[ "$status" -eq 0 ]
|
|
88
|
+
[[ "$output" == *"authentic-correction"* ]] || [[ "$output" == *"P078"* ]]
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
# ── Step 9d output contract ─────────────────────────────────────────────────
|
|
92
|
+
|
|
93
|
+
@test "Step 9d SKILL.md says output table records each close action with citation" {
|
|
94
|
+
run awk '/^\*\*Step 9d:/,/^\*\*Step 9e:/ {print}' "$SKILL_FILE"
|
|
95
|
+
[ "$status" -eq 0 ]
|
|
96
|
+
[[ "$output" == *"citation"* ]] || [[ "$output" == *"output table"* ]]
|
|
97
|
+
}
|
|
@@ -114,16 +114,22 @@ Detection is intentionally **strict** (explicit label or scoped-npm package only
|
|
|
114
114
|
|
|
115
115
|
**Already-noted check** — before firing the prompt, grep the ticket for the stable marker `- **Upstream report pending** —` (written by option 2 / the AFK fallback below) or `- **Reported Upstream:**` / a `## Reported Upstream` section (written by `/wr-itil:report-upstream` Step 7 back-write per ADR-024 Confirmation criterion 3a). If any of those are already present, skip the prompt — the detection has already fired on a prior run.
|
|
116
116
|
|
|
117
|
-
**If the detection fires and nothing has been noted yet
|
|
117
|
+
**If the detection fires and nothing has been noted yet** (per ADR-044 framework-resolution boundary): the agent applies the AFK fallback default WITHOUT firing `AskUserQuestion`. Per ADR-044, this decision IS framework-resolved — the safe action is "defer and note marker", and the user can correct via authentic-correction (ADR-044 category 6) if a manual `/wr-itil:report-upstream` invocation is wanted instead. Per-transition `AskUserQuestion` for upstream-detection is sub-contracting framework-resolved decisions back to the user (lazy deferral per Step 2d Ask Hygiene Pass classification).
|
|
118
118
|
|
|
119
|
-
- `
|
|
120
|
-
- `multiSelect: false`
|
|
121
|
-
- Options:
|
|
122
|
-
1. `Invoke /wr-itil:report-upstream now` — halt the transition; the skill runs (it writes the `## Reported Upstream` appendage per ADR-024 Confirmation criterion 3a); the transition resumes afterwards.
|
|
123
|
-
2. `Defer and note in ticket` — append a pending-upstream-report line to the ticket's `## Related` section using the stable marker `- **Upstream report pending** — external dependency identified; invoke /wr-itil:report-upstream when ready`. The marker wording is fixed so subsequent runs (and the work-problems `upstream-blocked` skip path) can detect "already noted" without re-firing.
|
|
124
|
-
3. `Not actually upstream` — proceed without invocation; append the same marker with text `- **Upstream report pending** — false positive; detection misfire` so the prompt does not re-fire on later reviews.
|
|
119
|
+
**Default behaviour (silent agent action, per ADR-044)**: append the pending-upstream-report line to the ticket's `## Related` section using the stable marker:
|
|
125
120
|
|
|
126
|
-
|
|
121
|
+
```
|
|
122
|
+
- **Upstream report pending** — external dependency identified; invoke /wr-itil:report-upstream when ready
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
The marker wording is fixed so subsequent runs (and the work-problems `upstream-blocked` skip path) can detect "already noted" without re-firing. The transition proceeds normally after the marker is appended.
|
|
126
|
+
|
|
127
|
+
**Recovery / override paths** (user-initiated, not asked-per-transition):
|
|
128
|
+
|
|
129
|
+
- If the detection misfired (false positive — not actually upstream), user appends `- **Upstream report pending** — false positive; detection misfire` directly to the ticket's `## Related` section. The next detection-pass observes the marker and skips firing again.
|
|
130
|
+
- If the user wants to invoke `/wr-itil:report-upstream` immediately rather than deferring, they invoke it directly (`/wr-itil:report-upstream <NNN> <upstream-repo-url>`). The skill writes the `## Reported Upstream` appendage per ADR-024.
|
|
131
|
+
|
|
132
|
+
**AFK and interactive modes use identical behaviour** — the silent-default-with-recovery-path shape is the framework-resolution boundary application; there's no `AskUserQuestion`-vs-fallback differentiation.
|
|
127
133
|
|
|
128
134
|
### 6. Rename the file, edit content, and re-stage (P057 staging trap)
|
|
129
135
|
|
|
@@ -258,7 +258,7 @@ rm -f "$ITER_JSON"
|
|
|
258
258
|
|
|
259
259
|
1. **Context**: this is one iteration of the AFK work-problems loop. The user is AFK. The orchestrator selected `P<NNN> (<title>)` as the highest-WSJF actionable ticket.
|
|
260
260
|
2. **Task**: apply the `/wr-itil:manage-problem` workflow for `work highest WSJF problem that can be progressed non-interactively as the user is AFK`. Follow manage-problem SKILL.md verbatim, including architect / jtbd / style-guide / voice-tone gate reviews and the commit gate (manage-problem Step 11). Because this subprocess has the Agent tool in its own surface, the normal review-via-subagent paths work — no inline-verdict fallback needed.
|
|
261
|
-
3. **Constraints**: commit the completed work per ADR-014. Do NOT push, do NOT run `push:watch`, do NOT run `release:watch` — the orchestrator's Step 6.5 owns release cadence. Do NOT invoke `capture-*` background skills (AFK carve-out — ADR-032). Do NOT use `ScheduleWakeup` under any circumstance (P083 — iteration workers must not self-reschedule). Non-interactive defaults apply per ADR-013 Rule 6.
|
|
261
|
+
3. **Constraints**: commit the completed work per ADR-014. Do NOT push, do NOT run `push:watch`, do NOT run `release:watch` — the orchestrator's Step 6.5 owns release cadence. Do NOT invoke `capture-*` background skills (AFK carve-out — ADR-032). Do NOT use `ScheduleWakeup` under any circumstance (P083 — iteration workers must not self-reschedule). **NEVER call `AskUserQuestion` mid-loop in AFK** (P135 / ADR-044): direction / deviation-approval / one-time-override / silent-framework observations queue at `ITERATION_SUMMARY.outstanding_questions` for loop-end batched presentation. Per-iter `AskUserQuestion` calls are sub-contracting framework-resolved decisions back to the user (lazy deferral per Step 2d Ask Hygiene Pass classification). Non-interactive defaults apply per ADR-013 Rule 6 + ADR-044's framework-resolution boundary.
|
|
262
262
|
4. **Retro-on-exit (P086)**: before emitting `ITERATION_SUMMARY`, invoke `/wr-retrospective:run-retro`. Retro runs INSIDE this subprocess so its Step 2b pipeline-instability scan has access to the iteration's rich tool-call history (hook misbehaviour, repeat-workaround patterns, subagent-delegation friction, release-path instability). Retro may create tickets or update `docs/BRIEFING.md` — run-retro commits its own work per ADR-014; any tickets it creates ride into either the iteration's own commit (if retro runs before the main commit) or a retro-owned follow-up commit, and the orchestrator picks them up on the next Step 1 scan. Proceed to `ITERATION_SUMMARY` emission regardless of retro findings — retro is non-blocking (do not block on retro): if retro fails or surfaces findings, the iteration still returns a summary so the AFK loop does not silently halt on a flaky retro run.
|
|
263
263
|
5. **Output**: end the final message with the `ITERATION_SUMMARY` block defined below — this is how the orchestrator consumes the iteration's result.
|
|
264
264
|
|