@windyroad/retrospective 0.10.0 → 0.11.0-preview.223

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.10.0",
3
+ "version": "0.11.0",
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.10.0",
3
+ "version": "0.11.0-preview.223",
4
4
  "description": "Session retrospectives that update briefings and create problem tickets",
5
5
  "bin": {
6
6
  "windyroad-retrospective": "./bin/install.mjs"
@@ -209,6 +209,49 @@ Per **ADR-043** (Progressive context-usage measurement and reporting for retrosp
209
209
  - **`/wr-retrospective:analyze-context` (deep layer)** — invoked only by explicit user direction. Never auto-fires from this step. Deep-layer report writes the HTML-comment-trailer snapshot that subsequent runs of this step read.
210
210
  - **ADR-027 compatibility note**: same migration shape as Step 2b. The script invocation must run in main-agent context; the parsed bucket totals are the artefact a delegated subagent can consume without re-running the byte-count.
211
211
 
212
+ ### 2d. Ask Hygiene Pass (P135 Phase 5 / ADR-044)
213
+
214
+ Per **ADR-044** (Decision-Delegation Contract — framework-resolution boundary), every retro emits a per-session classification of the agent's `AskUserQuestion` calls so the **lazy-AskUserQuestion-count** regression metric is visible at session-time rather than after the user notices the friction. The pass runs unconditionally in every retro (interactive and AFK). Output is a structured table in the Step 5 retro summary; persistence is a one-shot trail file consumed by `packages/retrospective/scripts/check-ask-hygiene.sh` for cross-session trend analysis.
215
+
216
+ **Ownership boundary**: this step measures and surfaces; it does NOT block, gate, or auto-correct any AskUserQuestion call. The lazy-count metric is the regression signal; correction is the user's call (via direction-setting / deviation-approval / authentic-correction per ADR-044 categories).
217
+
218
+ **Steps:**
219
+
220
+ 1. **Enumerate AskUserQuestion calls** in the session's tool-use history. For each call, capture: the `header` field, the `question` text, the call ordinal (1..N), and the session-position marker (turn / commit / artefact reference per ADR-026 grounding).
221
+
222
+ 2. **Classify each call** per ADR-044's 6-class authority taxonomy:
223
+
224
+ | Classification | Definition | Lazy? |
225
+ |---|---|---|
226
+ | **direction** | New tickets / new ADRs / new SKILLs / additions to suite that were not derivable from existing framework | NO |
227
+ | **deviation-approval** | Existing decision found wrong under current evidence; user approves amend / supersede | NO |
228
+ | **override** | One-time exception to a still-valid rule (not a rule-change) | NO |
229
+ | **silent-framework** | No ADR / JTBD / policy / WSJF / risk-score / SKILL applies; genuine new territory | NO |
230
+ | **taste** | Authentic preference on novel artefact where no guide settles | NO |
231
+ | **correction-followup** | Clarifying a user-issued correction (P078 surface) | NO |
232
+ | **lazy** | Framework resolves the decision; ask is sub-contracting agent work back to user | **YES (regression metric)** |
233
+
234
+ Classification ownership is silent agent judgement (per ADR-044 mechanical-stage discipline — no AskUserQuestion-about-AskUserQuestion meta-loop). The agent applies the framework-resolution heuristic: for each call, can the framework (ADR / JTBD / policy / WSJF / SKILL contract) resolve the decision? If yes → lazy. If no AND the call falls into one of the 5 non-lazy categories → that category. Borderline cases default to lazy (conservative — prefer false-positive lazy classification over silently underreporting friction).
235
+
236
+ 3. **Per-call grounding (ADR-026)**: each classification MUST cite the framework artefact that resolves the decision (for lazy) OR the framework gap (for non-lazy). Bare classifications are forbidden. Citation format: `Framework: <ADR / SKILL.md path / policy reference>` for lazy; `Gap: <one-line rationale>` for non-lazy.
237
+
238
+ 4. **Emit the in-session table** as a `## Ask Hygiene` section in the Step 5 retro summary (see Step 5 template). Columns: `Call # | Header | Classification | Citation`. Plus a `**Lazy count: <N>**` line for cheap-script parsing, plus per-category count lines (`**Direction count: <N>**`, etc.).
239
+
240
+ 5. **Persist trail entry** at `docs/retros/<YYYY-MM-DD>-ask-hygiene.md` (one file per retro; date in filename for natural sort-by-date). Same structured shape as the Step 5 emit. The advisory script `packages/retrospective/scripts/check-ask-hygiene.sh` consumes these files for cross-session trend.
241
+
242
+ 6. **Defensive trip (fail-open)**: if classification produces ambiguous results OR the trail file write fails, skip the persistence step but ALWAYS emit the in-session table (even if classifications are flagged as `unclear`). Better to surface partial data than no data.
243
+
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
+
246
+ **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
+
248
+ **Interaction with other surfaces:**
249
+
250
+ - **`P099` Tier 3 advisory** (`check-briefing-budgets.sh`) and **`P101` cheap-layer measurement** (`check-context-budget.sh`) follow the same advisory-script pattern that `check-ask-hygiene.sh` adopts. Reusable triplet (script + bats + ADR-tier-policy precedent).
251
+ - **`P132` enforcement hook** (Phase 4 of the P135 plan, gated on Phase 1-3 declarative being insufficient — R6 numeric gate: lazy count ≥2 across 3 consecutive retros after Phase 2/3 land) consumes the same lazy-count trail to decide whether to fire.
252
+ - **`P078` capture-on-correction** is the inverse pattern; ADR-044 category 6 (`correction-followup`) is the surface where P078 catches operate. Bounded — should be rare.
253
+ - **`/wr-retrospective:analyze-context` deep layer** — separate measurement surface (context bytes, not AskUserQuestion calls). Both share the `docs/retros/` trail directory; no double-counting because file naming differs (`<date>-ask-hygiene.md` vs `<date>-context-analysis.md`).
254
+
212
255
  ### 3. Update the briefing tree
213
256
 
214
257
  Edit `docs/briefing/<topic>.md` files — each topic file is per-subject (`hooks-and-gates.md`, `releases-and-ci.md`, `governance-workflow.md`, `afk-subprocess.md`, `plugin-distribution.md`, `agent-interaction-patterns.md`). Select the topic file whose scope matches the learning; if no file fits, add a new topic file under `docs/briefing/` and update `docs/briefing/README.md`'s Topic Index accordingly.
@@ -442,6 +485,21 @@ Present a summary to the user:
442
485
  |------------|-------|-----------|-------------------|----------|
443
486
  | `docs/briefing/<topic>.md` | <N> | <N> | split-by-subtopic / split-by-date / trim-noise / defer | applied / deferred / flagged (non-interactive) |
444
487
 
488
+ ### Ask Hygiene (P135 Phase 5 / ADR-044)
489
+
490
+ (Emitted unconditionally by Step 2d. Mirrors the trail file persisted at `docs/retros/<YYYY-MM-DD>-ask-hygiene.md` for cross-session trend via `packages/retrospective/scripts/check-ask-hygiene.sh`. Lazy count is the regression metric per ADR-044 — target 0.)
491
+
492
+ | Call # | Header | Classification | Citation |
493
+ |--------|--------|----------------|----------|
494
+ | 1 | <header> | direction \| deviation-approval \| override \| silent-framework \| taste \| correction-followup \| **lazy** | `Framework: <ADR / SKILL / policy>` for lazy; `Gap: <one-line>` for non-lazy |
495
+
496
+ **Lazy count: <N>**
497
+ **Direction count: <N>**
498
+ **Override count: <N>**
499
+ **Silent-framework count: <N>**
500
+ **Taste count: <N>**
501
+ **Correction-followup count: <N>**
502
+
445
503
  ### Codification Candidates
446
504
 
447
505
  | Kind | Shape | Suggested name / Target file | Scope / Flaw | Triggers / Evidence | Decision |