@windyroad/itil 0.4.5 → 0.5.0-preview.116
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
|
@@ -53,7 +53,24 @@ Stop the loop and report a summary if any of these are true:
|
|
|
53
53
|
2. **All remaining problems require interactive input** — e.g., they all need user verification (known-errors with `## Fix Released`), or their scope expanded beyond what's safe to auto-resolve
|
|
54
54
|
3. **All remaining problems are blocked** — investigation hit a dead end, or the fix requires changes outside the project
|
|
55
55
|
|
|
56
|
-
When
|
|
56
|
+
When stop-condition #2 fires, do not jump straight to `ALL_DONE` — run Step 2.5 first to surface the outstanding questions.
|
|
57
|
+
|
|
58
|
+
For stop-conditions #1 and #3 (no questions to ask), skip Step 2.5 and emit the summary + `ALL_DONE` directly.
|
|
59
|
+
|
|
60
|
+
### Step 2.5: Surface outstanding design questions (P053, fires only for stop-condition #2)
|
|
61
|
+
|
|
62
|
+
The skipped tickets that triggered stop-condition #2 frequently carry **user-answerable design questions** (naming, direction, pacing, scope) whose answers would unblock the next AFK loop. The information the user needs to answer is fully known at stop time, so there is no cost to surfacing the questions before the terminal `ALL_DONE` emit.
|
|
63
|
+
|
|
64
|
+
**1. Extract the question set.** For every skipped ticket whose classifier skip-reason is `user-answerable` (see Step 4's taxonomy), extract its outstanding question(s) from the ticket body — typically from a "Pacing decision", "Naming decision", or outstanding "Investigation Tasks" section. Cap at 4 questions per `AskUserQuestion` call per Anthropic's tool documentation.
|
|
65
|
+
|
|
66
|
+
**2. Branch on interactivity per ADR-013 Rule 1 / Rule 6.**
|
|
67
|
+
|
|
68
|
+
- **Interactive invocation** (AskUserQuestion is available AND the loop was not started in AFK mode): batch the questions into one `AskUserQuestion` call (or more, if >4 questions, issued sequentially). Header: `"Outstanding design questions"`. For each question, set the prompt from the extracted text and the options from the ticket's candidate fixes or option list. Write each answer back to the corresponding ticket file so the next AFK loop does not re-ask.
|
|
69
|
+
- **Non-interactive / AFK invocation** (default for this skill per JTBD-006 — the persona is AFK): do NOT call `AskUserQuestion`. Instead emit an `### Outstanding Design Questions` section in the post-stop summary listing each question with its Ticket ID, the question text, and one-line context. The user answers on return.
|
|
70
|
+
|
|
71
|
+
This branch is the Rule 6 fail-safe applied to stop-condition #2: Rule 1 says route governance decisions through `AskUserQuestion`; Rule 6 says fall back to a structured summary when the tool is unavailable or the user is away. JTBD-006's persona constraint ("autonomously work without needing interactive input") makes the non-interactive path the default for this skill — AskUserQuestion is the exception, not the rule.
|
|
72
|
+
|
|
73
|
+
**3. Emit the final summary + `ALL_DONE`.** The summary includes the Outstanding Design Questions table when any user-answerable questions were surfaced (see Output Format).
|
|
57
74
|
|
|
58
75
|
```
|
|
59
76
|
ALL_DONE
|
|
@@ -72,17 +89,28 @@ Select the problem with the highest WSJF score. If there's a tie, prefer:
|
|
|
72
89
|
|
|
73
90
|
Read the problem file and apply these deterministic rules:
|
|
74
91
|
|
|
75
|
-
| Problem state | Action |
|
|
76
|
-
|
|
77
|
-
| Known Error with `## Fix Released` | **Skip** — needs user verification |
|
|
78
|
-
| Known Error with fix strategy documented | **Work it** — implement the fix |
|
|
79
|
-
| Known Error without fix strategy | **Work it** — produce a fix strategy, then implement |
|
|
80
|
-
| Open problem with preliminary hypothesis or investigation notes | **Work it** — continue the investigation |
|
|
81
|
-
| Open problem with no leads (empty Root Cause Analysis) | **Work it** — read the relevant code, form a hypothesis, document findings |
|
|
82
|
-
| Problem previously attempted twice without progress in this session | **Skip** — mark as stuck, needs interactive attention |
|
|
92
|
+
| Problem state | Action | Skip-reason category |
|
|
93
|
+
|---|---|---|
|
|
94
|
+
| Known Error with `## Fix Released` | **Skip** — needs user verification | user-answerable (verification) |
|
|
95
|
+
| Known Error with fix strategy documented | **Work it** — implement the fix | — |
|
|
96
|
+
| Known Error without fix strategy | **Work it** — produce a fix strategy, then implement | — |
|
|
97
|
+
| Open problem with preliminary hypothesis or investigation notes | **Work it** — continue the investigation | — |
|
|
98
|
+
| Open problem with no leads (empty Root Cause Analysis) | **Work it** — read the relevant code, form a hypothesis, document findings | — |
|
|
99
|
+
| Problem previously attempted twice without progress in this session | **Skip** — mark as stuck, needs interactive attention | user-answerable (direction) |
|
|
100
|
+
| Open problem with outstanding user-answerable design question (naming, direction, pacing, scope) | **Skip** — surface the question at stop (Step 2.5) | user-answerable (design) |
|
|
101
|
+
| Open problem needing architect design judgment (new-ADR-level question) | **Skip** — note the architect-design blocker; Step 2.5 may elevate via a pre-triggered architect call in `--deep-stop` mode | architect-design |
|
|
102
|
+
| Open problem blocked on upstream dependency or Claude Code capability gap | **Skip** — record the upstream-blocked reason | upstream-blocked |
|
|
83
103
|
|
|
84
104
|
The default is to work the problem. Only skip when the rule explicitly says so. This is an AFK loop — forward progress matters more than avoiding dead ends, because dead ends are cheap (findings are saved) and interactive input is expensive (user is absent).
|
|
85
105
|
|
|
106
|
+
**Skip-reason taxonomy.** Every skipped ticket is tagged with one of three categories so Step 2.5 can select which ones to surface as questions:
|
|
107
|
+
|
|
108
|
+
- **user-answerable** — the user can answer directly (verification, naming, direction, pacing, scope). Step 2.5 surfaces these as questions (interactive) or in the Outstanding Design Questions table (non-interactive / AFK).
|
|
109
|
+
- **architect-design** — requires architect judgment first; may escalate to a new ADR. Step 2.5 can optionally pre-trigger the architect agent in `--deep-stop` mode to produce a concrete user-answerable question. Otherwise noted as "pending architect review".
|
|
110
|
+
- **upstream-blocked** — external dependency, Claude Code capability gap, or waiting on third-party fix. Truly terminal for this loop — no user question would change anything. Report the blocker and move on.
|
|
111
|
+
|
|
112
|
+
Record the category alongside the skip reason in the iteration report so Step 2.5 can read the categories deterministically.
|
|
113
|
+
|
|
86
114
|
**Time-box each problem** to avoid runaway investigation: the delegated `manage-problem` skill's internal logic decides scope. If investigation reveals the scope has grown (e.g., effort was estimated S but turns out to be L or XL), save findings to the problem file, update the WSJF score, and move to the next problem. Never sink unbounded effort into one problem during AFK mode.
|
|
87
115
|
|
|
88
116
|
If a problem is skipped by this step, add it to a "skipped" list with the reason and loop back to step 3 for the next one.
|
|
@@ -158,6 +186,7 @@ When `AskUserQuestion` is unavailable or the user is AFK, the skill (and the del
|
|
|
158
186
|
| Pipeline risk at appetite (push or release >= 4/25) | Drain release queue (`push:watch` then `release:watch`) before next iteration — per ADR-018 (Step 6.5) |
|
|
159
187
|
| Origin diverged before start | Pull `--ff-only` if trivial; stop with report (`git log HEAD..origin/<base>` and reverse) if non-fast-forward — per ADR-019 (Step 0) |
|
|
160
188
|
| Fix verification needed | Skip problem, add to "needs verification" list |
|
|
189
|
+
| Stop-condition #2 with user-answerable skip-reasons | Emit Outstanding Design Questions table in summary (do NOT call AskUserQuestion). The persona is AFK by definition — per JTBD-006 and ADR-013 Rule 6 — so the table is the default. Interactive invocations may batch up to 4 questions through AskUserQuestion instead — per ADR-013 Rule 1 (Step 2.5). |
|
|
161
190
|
|
|
162
191
|
## Edge Cases
|
|
163
192
|
|
|
@@ -183,9 +212,18 @@ The skill should produce a final summary when the loop ends:
|
|
|
183
212
|
| 2 | P021 (Structured prompts) | Investigated root cause | Transitioned to Known Error |
|
|
184
213
|
|
|
185
214
|
### Skipped
|
|
186
|
-
| Problem | Reason |
|
|
187
|
-
|
|
188
|
-
| P016 (Multi-concern splitting) | Awaiting user verification |
|
|
215
|
+
| Problem | Skip-reason category | Reason |
|
|
216
|
+
|---------|---------------------|--------|
|
|
217
|
+
| P016 (Multi-concern splitting) | user-answerable (verification) | Awaiting user verification |
|
|
218
|
+
|
|
219
|
+
### Outstanding Design Questions
|
|
220
|
+
|
|
221
|
+
(Emitted only when stop-condition #2 fires AND at least one skipped ticket has a `user-answerable (design/direction/pacing/scope)` skip-reason. Populated by Step 2.5 in non-interactive / AFK mode per ADR-013 Rule 6.)
|
|
222
|
+
|
|
223
|
+
| Ticket | Question | Context |
|
|
224
|
+
|--------|----------|---------|
|
|
225
|
+
| P049 (Known Error overloaded) | What should the new status be called, and what file suffix? | Decide so the rename/migration commit can land unambiguously. |
|
|
226
|
+
| P051 (run-retro improvement axis) | Ship in this AFK loop or next? | P050 is still fresh; rewriting Step 2/4b/5 twice in one session may churn. |
|
|
189
227
|
|
|
190
228
|
### Remaining Backlog
|
|
191
229
|
| WSJF | Problem | Status |
|
|
@@ -194,3 +232,5 @@ The skill should produce a final summary when the loop ends:
|
|
|
194
232
|
|
|
195
233
|
ALL_DONE
|
|
196
234
|
```
|
|
235
|
+
|
|
236
|
+
When every skipped ticket is in the `upstream-blocked` category (stop-condition #3) or there are no skipped tickets (stop-condition #1), omit the Outstanding Design Questions section entirely rather than rendering an empty heading.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
#!/usr/bin/env bats
|
|
2
|
+
# Doc-lint guard: work-problems SKILL.md must surface outstanding design
|
|
3
|
+
# questions before emitting `ALL_DONE` at stop-condition #2. In AFK mode
|
|
4
|
+
# (the persona default per JTBD-006) the questions are listed in the
|
|
5
|
+
# post-stop summary as an "Outstanding Design Questions" table. In
|
|
6
|
+
# interactive invocations the skill may batch up to 4 questions through
|
|
7
|
+
# a single `AskUserQuestion` call per ADR-013 Rule 1.
|
|
8
|
+
#
|
|
9
|
+
# Structural assertion — Permitted Exception to the source-grep ban
|
|
10
|
+
# (ADR-005 / P011). These tests assert that the skill specification
|
|
11
|
+
# document contains the stop-condition #2 question-surfacing step and its
|
|
12
|
+
# supporting classifier taxonomy.
|
|
13
|
+
#
|
|
14
|
+
# Cross-reference:
|
|
15
|
+
# P053: docs/problems/053-work-problems-does-not-surface-outstanding-design-questions-at-stop.open.md
|
|
16
|
+
# ADR-013 Rule 1 / Rule 6: docs/decisions/013-structured-user-interaction-for-governance-decisions.proposed.md
|
|
17
|
+
# ADR-018: docs/decisions/018-inter-iteration-release-cadence-for-afk-loops.proposed.md
|
|
18
|
+
# @jtbd JTBD-006 (Progress the Backlog While I'm Away)
|
|
19
|
+
# @jtbd JTBD-001 (Enforce Governance Without Slowing Down)
|
|
20
|
+
|
|
21
|
+
setup() {
|
|
22
|
+
SKILL_DIR="$(cd "$(dirname "$BATS_TEST_FILENAME")/.." && pwd)"
|
|
23
|
+
SKILL_FILE="${SKILL_DIR}/SKILL.md"
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@test "SKILL.md exists (P053 precondition)" {
|
|
27
|
+
[ -f "$SKILL_FILE" ]
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@test "SKILL.md stop-condition #2 has a pre-terminal question-surfacing step (P053)" {
|
|
31
|
+
# P053 fix: between detecting stop-condition #2 and emitting `ALL_DONE`,
|
|
32
|
+
# the skill must surface outstanding design questions. Accept a dedicated
|
|
33
|
+
# "Step 2.5" heading OR equivalent wording that names the pre-terminal
|
|
34
|
+
# question-batching step.
|
|
35
|
+
run grep -inE "Step 2\.5|pre-terminal question|question-batching|outstanding design question|surface (the )?(outstanding )?questions? before ALL_DONE" "$SKILL_FILE"
|
|
36
|
+
[ "$status" -eq 0 ]
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@test "SKILL.md stop-condition #2 cites the 4-question AskUserQuestion cap (P053 + ADR-013)" {
|
|
40
|
+
# ADR-013 Rule 1 routes governance decisions through AskUserQuestion.
|
|
41
|
+
# AskUserQuestion's documented per-call limit is 4 options. The
|
|
42
|
+
# Step 2.5 block must name this cap so implementers do not silently
|
|
43
|
+
# overflow.
|
|
44
|
+
run grep -inE "cap at 4|up to 4 question|4 options? per AskUserQuestion|AskUserQuestion'?s? 4-(question|option) (limit|cap)|4-question cap|four questions? (per|at) a time" "$SKILL_FILE"
|
|
45
|
+
[ "$status" -eq 0 ]
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@test "SKILL.md classifier records a skip-reason taxonomy (P053)" {
|
|
49
|
+
# Step 4 classifier must distinguish user-answerable skips from
|
|
50
|
+
# architect-design and upstream-blocked skips so Step 2.5 can select
|
|
51
|
+
# the user-answerable subset. Accept either an explicit three-bucket
|
|
52
|
+
# taxonomy OR the individual category names appearing near the
|
|
53
|
+
# classifier.
|
|
54
|
+
run grep -inE "user-answerable|user answerable" "$SKILL_FILE"
|
|
55
|
+
[ "$status" -eq 0 ]
|
|
56
|
+
run grep -inE "architect-design|architect design (judgment|required)" "$SKILL_FILE"
|
|
57
|
+
[ "$status" -eq 0 ]
|
|
58
|
+
run grep -inE "upstream-blocked|upstream blocked|upstream dependency" "$SKILL_FILE"
|
|
59
|
+
[ "$status" -eq 0 ]
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@test "SKILL.md non-interactive fallback emits an Outstanding Design Questions table (P053 + ADR-013 Rule 6)" {
|
|
63
|
+
# Rule 6: when AskUserQuestion is unavailable (AFK default per
|
|
64
|
+
# JTBD-006), the skill must record the questions in the post-stop
|
|
65
|
+
# summary rather than asking. Accept either literal "Outstanding
|
|
66
|
+
# Design Questions" heading OR a named table with Ticket/Question
|
|
67
|
+
# columns that carries the same semantics.
|
|
68
|
+
run grep -inE "Outstanding Design Questions|outstanding.design.questions" "$SKILL_FILE"
|
|
69
|
+
[ "$status" -eq 0 ]
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@test "SKILL.md stop-condition #2 cites ADR-013 Rule 6 fallback path (P053)" {
|
|
73
|
+
# The fallback must be traceable to the ADR it honours. Require an
|
|
74
|
+
# explicit Rule 6 citation in the stop-condition block.
|
|
75
|
+
run grep -inE "ADR-013.*Rule 6|Rule 6.*ADR-013" "$SKILL_FILE"
|
|
76
|
+
[ "$status" -eq 0 ]
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@test "SKILL.md Final Summary template includes the Outstanding Design Questions section when relevant (P053)" {
|
|
80
|
+
# The Output Format block must show reviewers what the summary looks
|
|
81
|
+
# like with outstanding questions attached — not just describe it in
|
|
82
|
+
# prose elsewhere.
|
|
83
|
+
run grep -n "### Outstanding Design Questions\|## Outstanding Design Questions" "$SKILL_FILE"
|
|
84
|
+
[ "$status" -eq 0 ]
|
|
85
|
+
}
|