@windyroad/retrospective 0.12.0-preview.228 → 0.12.1-preview.230

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.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "wr-retrospective",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "Session retrospective reminders and plan review for Claude Code"
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windyroad/retrospective",
3
- "version": "0.12.0-preview.228",
3
+ "version": "0.12.1-preview.230",
4
4
  "description": "Session retrospectives that update briefings and create problem tickets",
5
5
  "bin": {
6
6
  "windyroad-retrospective": "./bin/install.mjs"
@@ -243,6 +243,19 @@ Per **ADR-044** (Decision-Delegation Contract — framework-resolution boundary)
243
243
 
244
244
  7. **AFK behaviour (ADR-013 Rule 6 / ADR-044)**: identical to interactive mode. The pass is silent (no AskUserQuestion-about-the-classifications); the table + trail entry ride the retro summary; AFK orchestrators read the summary on iteration close.
245
245
 
246
+ 8. **R6 numeric gate auto-flag** (P135 / ADR-044 Reassessment Trigger): after computing this retro's lazy count, invoke `packages/retrospective/scripts/check-ask-hygiene.sh` to read the cross-session trail and detect the R6 condition (lazy count remains **≥2 across 3 consecutive retros** including this one). When the gate fires, **auto-queue a deviation-candidate** in the orchestrator's `outstanding_questions` queue (per the AFK loop's Phase 3 schema in `packages/itil/skills/work-problems/SKILL.md` ITERATION_SUMMARY contract):
247
+ ```
248
+ {
249
+ category: "deviation-approval"
250
+ existing_decision: "ADR-044 Reassessment / declarative-first; P135 Phase 4 gated on R6"
251
+ contradicting_evidence: "<3 consecutive retros' lazy counts: e.g. 3, 2, 4 — citations to docs/retros/<date>-ask-hygiene.md per retro>"
252
+ proposed_shape: "amend"
253
+ rationale: "R6 numeric gate fired (lazy count ≥2 across 3 consecutive retros after Phase 2/3 land); declarative-first declared insufficient; Phase 4 enforcement hook now warranted per P135 plan."
254
+ ticket_id: "P135"
255
+ }
256
+ ```
257
+ The deviation-candidate surfaces at loop end (Step 2.5) with the standard 5-option `AskUserQuestion` (Approve+amend / Approve+supersede / Approve+one-time / Reject / Defer). The framework reminds itself; no manual remembering required. When this retro is invoked outside an AFK loop (interactive `/wr-retrospective:run-retro`), the same auto-queue logic surfaces the candidate via the orchestrator's main turn AskUserQuestion at retro end — same shape.
258
+
246
259
  **Forbidden phrases (anti-friction)**: the in-session table MUST NOT include qualitative-only phrases on the lazy count. Banned: `lazy count is acceptable`, `within tolerance`, `improving`, `regression contained`. Concrete numbers + the trend script's TREND line are the truth surface.
247
260
 
248
261
  **Interaction with other surfaces:**
@@ -0,0 +1,82 @@
1
+ #!/usr/bin/env bats
2
+ #
3
+ # packages/retrospective/skills/run-retro/test/run-retro-step-2d-r6-auto-flag.bats
4
+ #
5
+ # Behavioural tests for Step 2d's R6-numeric-gate auto-flag contract
6
+ # (P135 follow-up / ADR-044 Reassessment Trigger). When the R6 gate
7
+ # fires (lazy count ≥2 across 3 consecutive retros), Step 2d MUST
8
+ # auto-queue a deviation-candidate so the framework reminds itself
9
+ # that Phase 4 enforcement-hook work is warranted.
10
+ #
11
+ # tdd-review: structural-permitted (justification: skill behavioural
12
+ # harness pending P012 + P081 Phase 2; SKILL.md contract assertions
13
+ # bridge until then; expected to migrate to behavioural form once
14
+ # the harness exists)
15
+ #
16
+ # @problem P135 (ADR-044 Reassessment / Phase 4 gating)
17
+ # @adr ADR-044 (Decision-Delegation Contract — R6 numeric gate)
18
+ # @adr ADR-005 / ADR-037 (testing strategy)
19
+ # @jtbd JTBD-001 / JTBD-006
20
+
21
+ SKILL_FILE="${BATS_TEST_DIRNAME}/../SKILL.md"
22
+
23
+ setup() {
24
+ [ -f "$SKILL_FILE" ]
25
+ }
26
+
27
+ @test "Step 2d documents R6 numeric gate auto-flag mechanism (P135 Reassessment Trigger)" {
28
+ run grep -F "R6 numeric gate auto-flag" "$SKILL_FILE"
29
+ [ "$status" -eq 0 ]
30
+ }
31
+
32
+ @test "Step 2d invokes check-ask-hygiene.sh to detect R6 condition" {
33
+ run grep -F "check-ask-hygiene.sh" "$SKILL_FILE"
34
+ [ "$status" -eq 0 ]
35
+ }
36
+
37
+ @test "Step 2d R6 condition explicit: lazy count >=2 across 3 consecutive retros" {
38
+ run grep -F "≥2 across 3 consecutive retros" "$SKILL_FILE"
39
+ [ "$status" -eq 0 ]
40
+ }
41
+
42
+ @test "Step 2d auto-queues a deviation-candidate when R6 fires" {
43
+ run grep -F "auto-queue a deviation-candidate" "$SKILL_FILE"
44
+ [ "$status" -eq 0 ]
45
+ }
46
+
47
+ @test "Step 2d auto-flag deviation-candidate cites P135 + ADR-044" {
48
+ # Bound to Step 2d section
49
+ run awk '/^### 2d\./,/^### 3\./ {print}' "$SKILL_FILE"
50
+ [ "$status" -eq 0 ]
51
+ [[ "$output" == *"P135"* ]]
52
+ [[ "$output" == *"ADR-044"* ]]
53
+ }
54
+
55
+ @test "Step 2d auto-flag specifies the proposed_shape: amend (Phase 4 enforcement hook)" {
56
+ run awk '/^### 2d\./,/^### 3\./ {print}' "$SKILL_FILE"
57
+ [ "$status" -eq 0 ]
58
+ [[ "$output" == *"proposed_shape:"* ]]
59
+ [[ "$output" == *"amend"* ]]
60
+ [[ "$output" == *"Phase 4 enforcement hook"* ]]
61
+ }
62
+
63
+ @test "ADR-044 Reassessment cites R6 numeric gate as the explicit trigger" {
64
+ ADR_FILE="${BATS_TEST_DIRNAME}/../../../../../docs/decisions/044-decision-delegation-contract.proposed.md"
65
+ [ -f "$ADR_FILE" ]
66
+ run grep -F "R6 numeric gate fires" "$ADR_FILE"
67
+ [ "$status" -eq 0 ]
68
+ }
69
+
70
+ @test "ADR-044 Reassessment explicitly cross-references Step 2d's auto-queue mechanism" {
71
+ ADR_FILE="${BATS_TEST_DIRNAME}/../../../../../docs/decisions/044-decision-delegation-contract.proposed.md"
72
+ [ -f "$ADR_FILE" ]
73
+ run grep -F "auto-queue a deviation-candidate" "$ADR_FILE"
74
+ [ "$status" -eq 0 ]
75
+ }
76
+
77
+ @test "ADR-044 Reassessment names 'framework reminds itself' as the no-manual-tracking property" {
78
+ ADR_FILE="${BATS_TEST_DIRNAME}/../../../../../docs/decisions/044-decision-delegation-contract.proposed.md"
79
+ [ -f "$ADR_FILE" ]
80
+ run grep -F "framework reminds itself" "$ADR_FILE"
81
+ [ "$status" -eq 0 ]
82
+ }