@windyroad/retrospective 0.21.4 → 0.22.0-preview.472

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.
@@ -66,5 +66,5 @@
66
66
  }
67
67
  },
68
68
  "name": "wr-retrospective",
69
- "version": "0.21.4"
69
+ "version": "0.22.0"
70
70
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windyroad/retrospective",
3
- "version": "0.21.4",
3
+ "version": "0.22.0-preview.472",
4
4
  "description": "Session retrospectives that update briefings and create problem tickets",
5
5
  "bin": {
6
6
  "windyroad-retrospective": "./bin/install.mjs"
@@ -434,7 +434,13 @@ Every codification candidate identified in Step 2 flows through a **two-stage fl
434
434
  For every codifiable observation identified in Step 2:
435
435
 
436
436
  1. **Apply P016 concern-boundary analysis**: if the observation covers multiple independent concerns, split into N observations before ticketing. One ticket per concern.
437
- 2. **Invoke `/wr-itil:manage-problem`** via the Skill tool to create a problem ticket. The observation text becomes the ticket Description; the retro narrative populates the Root Cause Analysis; the `## Related` section cites this retro run. (Once the ADR-032 `capture-*` background sibling ships for manage-problem, Stage 1 can delegate to `/wr-itil:capture-problem` instead so ticketing runs out of the foreground turn; same contract, different invocation mode.)
437
+ 2. **Classify the observation per the P342 trust-boundary taxonomy** (mirror of `/wr-itil:work-problems` Step 5 iter-prompt body's classification same trust-boundary fires whether retro runs in iter context OR standalone in main turn):
438
+ - **Recurring class-of-behaviour observation** (sibling iters / sessions hit same pattern; SKILL-contract drift; hook misbehaviour; framework-gap; pipeline instability with concrete fix path): **mechanical-auto-ticket** via `/wr-itil:capture-problem` (or `/wr-itil:manage-problem` if capture sibling not yet available). This is the mechanical-stage carve-out per **Step 4a precedent** (verification close-on-evidence — same trust-boundary). Per ADR-013 Rule 5 (policy-authorised silent proceed) + ADR-044 framework-resolution boundary: the retro IS the system designed to mechanically observe recurring patterns; ticketing them is mechanical, not user-decision.
439
+ - **Direction-setting observation** (genuine user-judgment-bound question — design choice, deviation-approval, framework boundary): route to `outstanding_questions` queue when retro runs inside an AFK iter (via the `ITERATION_SUMMARY.outstanding_questions` schema documented in `packages/itil/skills/work-problems/SKILL.md` Step 5); surface at retro-end interactively when retro runs standalone in main turn. These observations preserve the user's authority surface and MUST NOT auto-ticket.
440
+ - **Ambiguous** (retro cannot cleanly distinguish recurring-class from direction-setting): **default to mechanical-auto-ticket** per the P342 trust-boundary asymmetry. The ticket lifecycle (`/wr-itil:manage-problem` Step 9d / `/wr-itil:review-problems` Step 4) will surface any embedded direction-setting question through the standard problem-review flow. Defaulting to queue would re-introduce the silent-queue-accumulation hazard P342 closes; defaulting to ticket has zero observation-drop risk.
441
+
442
+ This is silent agent judgement — no `AskUserQuestion` per observation. The classification taxonomy is framework-resolved per ADR-044; per-observation `AskUserQuestion` would re-route mechanical decisions back to the user (lazy-deferral surface per Step 2d Ask Hygiene Pass). The work-problems Step 5 iter-prompt body carries the symmetric mirror — both surfaces use the same taxonomy.
443
+ 3. **Invoke `/wr-itil:manage-problem`** via the Skill tool to create a problem ticket. The observation text becomes the ticket Description; the retro narrative populates the Root Cause Analysis; the `## Related` section cites this retro run. (Once the ADR-032 `capture-*` background sibling ships for manage-problem, Stage 1 can delegate to `/wr-itil:capture-problem` instead so ticketing runs out of the foreground turn; same contract, different invocation mode.)
438
444
 
439
445
  **ADR-032 note**: Stage 1 is a legitimate **foreground-spawns-N-background fanout** pattern — run-retro's foreground context spawns one background capture invocation per observation (when the background sibling exists). ADR-032's Confirmation section must carry this case; cite `ADR-032` (`docs/decisions/032-governance-skill-invocation-patterns.proposed.md`) explicitly when the background path lands.
440
446
 
@@ -0,0 +1,115 @@
1
+ #!/usr/bin/env bats
2
+ #
3
+ # packages/retrospective/skills/run-retro/test/run-retro-step-4b-retro-auto-ticket-carveout.bats
4
+ #
5
+ # P342: run-retro Step 4b stage classification must mirror the trust-
6
+ # boundary established at Step 4a (verification close-on-evidence) — so
7
+ # the same mechanical-stage carve-out applies whether retro fires in iter
8
+ # context (work-problems Step 5 iter-prompt) OR standalone in main turn.
9
+ #
10
+ # The fix shape amends Step 4b stage classification:
11
+ # - Mechanical-auto-ticket path: recurring class-of-behaviour /
12
+ # SKILL-contract drift / hook misbehaviour / framework-gap → Stage 1
13
+ # auto-creates a ticket via /wr-itil:capture-problem (or
14
+ # manage-problem if capture sibling not yet available).
15
+ # - Direction-setting-queue path: genuine user-judgment-bound questions
16
+ # (design choice, deviation-approval, framework boundary) → queued
17
+ # as outstanding_questions for orchestrator-level Step 2.5 surface
18
+ # when retro runs inside an AFK iter; surfaced at retro end when
19
+ # standalone.
20
+ # - Ambiguous → default to mechanical-auto-ticket (per P342 trust-
21
+ # boundary asymmetry preventing silent queue accumulation).
22
+ #
23
+ # Contract-assertion tests per ADR-037 Permitted Exception (structural
24
+ # checks on prose contract; behavioural harness for SKILL.md pending
25
+ # P081 Phase 2 / P012).
26
+ #
27
+ # @problem P342
28
+ # @adr ADR-044 (Decision-Delegation Contract — mechanical-stage carve-out per Step 4a precedent)
29
+ # @adr ADR-013 Rule 5 (policy-authorised silent proceed for capture-* on retro path)
30
+ # @adr ADR-014 (governance skills commit own work — capture-problem commits per ticket)
31
+ # @adr ADR-032 (foreground-spawns-N-background fanout pattern already documented for Stage 1)
32
+ # @jtbd JTBD-006 (durable WSJF-ranked backlog accumulation)
33
+ # @jtbd JTBD-201 (audit-trail integrity)
34
+
35
+ SKILL_FILE="${BATS_TEST_DIRNAME}/../SKILL.md"
36
+
37
+ setup() {
38
+ [ -f "$SKILL_FILE" ]
39
+ }
40
+
41
+ # ── Step 4b carve-out subsection presence ───────────────────────────────────
42
+
43
+ @test "Step 4b P342: SKILL.md names the mechanical-auto-ticket vs direction-setting-queue split" {
44
+ # The fix establishes a classification split at Stage 1 routing.
45
+ # Mechanical-class observations route to auto-ticket; direction-class
46
+ # to outstanding_questions queue.
47
+ run grep -F "mechanical-auto-ticket" "$SKILL_FILE"
48
+ [ "$status" -eq 0 ]
49
+ }
50
+
51
+ @test "Step 4b P342: SKILL.md cites Step 4a precedent for the mechanical-stage carve-out" {
52
+ # The carve-out's authority is the Step 4a verification close-on-
53
+ # evidence precedent. Cite explicitly so the trust-boundary symmetry
54
+ # is discoverable.
55
+ run grep -nE 'Step 4a precedent|same trust[- ]boundary.*Step 4a|Step 4a.*precedent' "$SKILL_FILE"
56
+ [ "$status" -eq 0 ]
57
+ }
58
+
59
+ @test "Step 4b P342: SKILL.md names recurring class-of-behaviour as auto-ticket route" {
60
+ # Recurring class-of-behaviour / SKILL-contract drift / hook
61
+ # misbehaviour / framework-gap → auto-ticket. The taxonomy must be
62
+ # documented at Step 4b so the same classification fires whether retro
63
+ # runs in iter context OR standalone.
64
+ run grep -nE 'recurring class-of-behaviour|class-of-behaviour observation' "$SKILL_FILE"
65
+ [ "$status" -eq 0 ]
66
+ }
67
+
68
+ @test "Step 4b P342: SKILL.md names direction-setting as outstanding_questions route" {
69
+ # Direction-setting (design choice, deviation-approval, framework
70
+ # boundary) → outstanding_questions when retro runs inside an AFK
71
+ # iter; surfaced at retro end when standalone.
72
+ run grep -nE 'direction-setting.*outstanding_questions|Direction-setting observation' "$SKILL_FILE"
73
+ [ "$status" -eq 0 ]
74
+ }
75
+
76
+ @test "Step 4b P342: SKILL.md names ambiguous default-to-auto-ticket asymmetry" {
77
+ # Per P342 trust-boundary asymmetry: ambiguous → default to auto-
78
+ # ticket. This prevents the silent-queue accumulation P342 was filed
79
+ # to close.
80
+ run grep -nE 'Ambiguous.*auto-ticket|default to auto-ticket|ambiguous.*default.*ticket' "$SKILL_FILE"
81
+ [ "$status" -eq 0 ]
82
+ }
83
+
84
+ # ── Cross-reference to work-problems Step 5 iter-prompt carve-out ──────────
85
+
86
+ @test "Step 4b P342: SKILL.md cross-references work-problems Step 5 iter-prompt symmetry" {
87
+ # The work-problems iter-prompt amendment is the sibling locus — the
88
+ # same trust-boundary fires in both surfaces. Cross-reference so the
89
+ # symmetry is discoverable from either side.
90
+ run grep -nE 'work-problems Step 5|work-problems.*iter-prompt|Step 5 iter-prompt' "$SKILL_FILE"
91
+ [ "$status" -eq 0 ]
92
+ }
93
+
94
+ # ── ADR-044 framework-resolution boundary citation ─────────────────────────
95
+
96
+ @test "Step 4b P342: SKILL.md cites ADR-044 as the framework-resolution authority for the carve-out" {
97
+ run grep -F "ADR-044" "$SKILL_FILE"
98
+ [ "$status" -eq 0 ]
99
+ }
100
+
101
+ # ── ADR-014 commit ownership preserved ─────────────────────────────────────
102
+
103
+ @test "Step 4b P342: SKILL.md preserves ADR-014 capture-* commit ownership for auto-ticket path" {
104
+ # capture-problem (or manage-problem fallback) commits per ADR-014;
105
+ # run-retro does not commit auto-ticket creates.
106
+ run grep -F "ADR-014" "$SKILL_FILE"
107
+ [ "$status" -eq 0 ]
108
+ }
109
+
110
+ # ── P342 ticket cross-reference ─────────────────────────────────────────────
111
+
112
+ @test "Step 4b P342: SKILL.md cites P342 as the trust-boundary mirror ticket" {
113
+ run grep -nE 'P342\b' "$SKILL_FILE"
114
+ [ "$status" -eq 0 ]
115
+ }