@windyroad/itil 0.15.0-preview.157 → 0.16.0-preview.159
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
|
@@ -150,7 +150,8 @@ claude -p \
|
|
|
150
150
|
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.
|
|
151
151
|
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.
|
|
152
152
|
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.
|
|
153
|
-
4. **
|
|
153
|
+
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.
|
|
154
|
+
5. **Output**: end the final message with the `ITERATION_SUMMARY` block defined below — this is how the orchestrator consumes the iteration's result.
|
|
154
155
|
|
|
155
156
|
**Return-summary contract** (unchanged from the P077 amendment — the parse shape is dispatch-mechanism-agnostic). The subprocess's final message MUST end with this structured block, extracted by the orchestrator from the JSON `.result` field:
|
|
156
157
|
|
|
@@ -289,6 +290,7 @@ When `AskUserQuestion` is unavailable or the user is AFK, the skill (and the del
|
|
|
289
290
|
| Decision Point | Non-Interactive Default |
|
|
290
291
|
|---|---|
|
|
291
292
|
| How each iteration runs (iteration delegation) | Dispatch to a fresh `claude -p --permission-mode bypassPermissions --output-format json` subprocess via Bash per Step 5 — NOT Agent-tool dispatch (the Agent-tool-spawned subagent has no Agent in its own surface, so governance gates cannot be satisfied — P084), and NOT inline Skill-tool invocation (expands manage-problem into the orchestrator's context and burns turns — P077). The subprocess is a full main Claude Code session with Agent available, so architect / JTBD / risk-scorer reviews run at full depth; the orchestrator consumes the `ITERATION_SUMMARY` return-shape from the subprocess's JSON stdout. No per-iteration budget cap — natural stop is quota exhaustion. This is the AFK iteration-isolation wrapper — subprocess-boundary variant under ADR-032. Per P084 + P077 + ADR-032. |
|
|
293
|
+
| Retro at iteration end (per-iteration lessons captured) | Iteration subprocess invokes `/wr-retrospective:run-retro` before emitting `ITERATION_SUMMARY` so Step 2b pipeline-instability scan runs inside the subprocess's tool-call history. Retro commits its own work per ADR-014; orchestrator picks up retro-created tickets on next Step 1 scan. Non-blocking: if retro fails or surfaces findings, iteration still emits summary — do not halt the AFK loop on a flaky retro. Per P086 + ADR-032 subprocess-boundary retro-on-exit clause. |
|
|
292
294
|
| Which problem to work | Highest WSJF, no prompt needed |
|
|
293
295
|
| Multi-concern split | Auto-split (manage-problem step 4b fallback) |
|
|
294
296
|
| Scope expansion during work | Update problem file, re-score WSJF, move to next problem instead of continuing |
|
|
@@ -367,6 +369,7 @@ When every skipped ticket is in the `upstream-blocked` category (stop-condition
|
|
|
367
369
|
|
|
368
370
|
## Related
|
|
369
371
|
|
|
372
|
+
- **P086** (`docs/problems/086-afk-iteration-subprocess-does-not-run-retro-before-returning.verifying.md`) — driver for Step 5's retro-on-exit clause. Iteration subprocesses exit without running retro, so per-iteration friction (hook misbehaviour, repeat-workaround patterns, pipeline instability) evaporates on exit. Fix: iteration prompt body names `/wr-retrospective:run-retro` as a closing step before `ITERATION_SUMMARY` emission; retro runs inside the subprocess so Step 2b pipeline-instability scan has the full tool-call history; run-retro commits its own work per ADR-014; orchestrator picks up retro-created tickets on the next Step 1 scan.
|
|
370
373
|
- **P084** (`docs/problems/084-work-problems-iteration-worker-has-no-agent-tool-so-architect-jtbd-gates-block.open.md`) — driver for Step 5's subprocess-boundary dispatch. Supersedes P077's Agent-tool dispatch on the same Step 5 surface because Agent-tool-spawned subagents cannot themselves invoke Agent (platform restriction), which prevents governance gate markers from being set inside the iteration worker.
|
|
371
374
|
- **P077** (`docs/problems/077-work-problems-step-5-does-not-delegate-to-subagent.verifying.md`) — parent amendment. Established the AFK iteration-isolation wrapper sub-pattern and the `ITERATION_SUMMARY` return contract. P084 is the refinement that swaps the spawn mechanism; the isolation intent and return contract are preserved verbatim.
|
|
372
375
|
- **P083** (`docs/problems/083-work-problems-iteration-worker-prompt-does-not-forbid-schedulewakeup.open.md`) — iteration prompt body forbids `ScheduleWakeup`. Applies equally to subprocess-dispatched iterations.
|
|
@@ -17,8 +17,10 @@
|
|
|
17
17
|
#
|
|
18
18
|
# @problem P084
|
|
19
19
|
# @problem P077
|
|
20
|
+
# @problem P086
|
|
20
21
|
# @jtbd JTBD-006
|
|
21
22
|
# @jtbd JTBD-001
|
|
23
|
+
# @jtbd JTBD-101
|
|
22
24
|
#
|
|
23
25
|
# Cross-reference:
|
|
24
26
|
# P084 (iteration worker has no Agent tool) — driver for the subprocess swap
|
|
@@ -166,3 +168,48 @@ setup() {
|
|
|
166
168
|
run grep -niE "CLAUDE_SESSION_ID|session.?id isolation|session-id isolation|marker.{0,40}isolated|subprocess.{0,40}SESSION_ID" "$SKILL_FILE"
|
|
167
169
|
[ "$status" -eq 0 ]
|
|
168
170
|
}
|
|
171
|
+
|
|
172
|
+
@test "SKILL.md Step 5 iteration prompt names /wr-retrospective:run-retro (P086 retro-on-exit)" {
|
|
173
|
+
# P086 (2026-04-21): iteration subprocesses exit without running retro, so
|
|
174
|
+
# per-iteration friction, hook misbehaviour, repeat-workaround patterns, and
|
|
175
|
+
# pipeline-instability observations evaporate on exit. The iteration prompt
|
|
176
|
+
# body MUST name /wr-retrospective:run-retro as a closing step so the retro
|
|
177
|
+
# skill's Step 2b pipeline-instability scan fires inside the subprocess's
|
|
178
|
+
# full tool-call history. Retro commits its own work per ADR-014; orchestrator
|
|
179
|
+
# picks up retro-created tickets on the next Step 1 scan naturally.
|
|
180
|
+
run grep -nE "/wr-retrospective:run-retro" "$SKILL_FILE"
|
|
181
|
+
[ "$status" -eq 0 ]
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
@test "SKILL.md Step 5 orders retro BEFORE ITERATION_SUMMARY emission (P086)" {
|
|
185
|
+
# The retro-on-exit clause must fire BEFORE the ITERATION_SUMMARY block so
|
|
186
|
+
# any tickets retro creates ride into either the iteration's own commit or
|
|
187
|
+
# a retro-owned follow-up commit — and the orchestrator sees them on the
|
|
188
|
+
# next Step 1 scan. Emitting ITERATION_SUMMARY first and running retro after
|
|
189
|
+
# would leave retro tickets uncommitted when the subprocess exits.
|
|
190
|
+
#
|
|
191
|
+
# The assertion: the first mention of "run-retro" must appear BEFORE a
|
|
192
|
+
# phrase that explicitly names the ordering (e.g. "before emitting
|
|
193
|
+
# ITERATION_SUMMARY" or similar).
|
|
194
|
+
run grep -niE "before.{0,40}emit.{0,40}ITERATION_SUMMARY|before.{0,20}ITERATION_SUMMARY.{0,40}(emission|emit)|prior to.{0,40}ITERATION_SUMMARY" "$SKILL_FILE"
|
|
195
|
+
[ "$status" -eq 0 ]
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
@test "SKILL.md Step 5 names retro as non-blocking closing step (P086)" {
|
|
199
|
+
# Retro findings MUST NOT block ITERATION_SUMMARY emission — if retro fails
|
|
200
|
+
# or surfaces findings, the iteration still returns to the orchestrator with
|
|
201
|
+
# a summary. Otherwise a flaky retro run could silently halt the AFK loop.
|
|
202
|
+
# The SKILL.md prompt body must state that the subprocess proceeds to
|
|
203
|
+
# ITERATION_SUMMARY regardless of retro findings.
|
|
204
|
+
run grep -niE "do not block on retro|regardless of retro|retro.{0,40}non-blocking|proceed.{0,40}regardless.{0,40}retro|non-blocking.{0,40}retro" "$SKILL_FILE"
|
|
205
|
+
[ "$status" -eq 0 ]
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
@test "SKILL.md Step 5 cites ADR-014 for retro commit ownership (P086)" {
|
|
209
|
+
# Retro-created tickets ride into the iteration's commit OR a retro follow-up
|
|
210
|
+
# commit per run-retro's ADR-014 contract. The iteration prompt body must
|
|
211
|
+
# name ADR-014 so contributors do not accidentally wire iteration-side commit
|
|
212
|
+
# of retro artefacts — retro owns its own commits.
|
|
213
|
+
run grep -nE "ADR-014" "$SKILL_FILE"
|
|
214
|
+
[ "$status" -eq 0 ]
|
|
215
|
+
}
|