|
| 1 | +# Session 92: ADR Review Auto-Trigger Fix |
| 2 | + |
| 3 | +**Date**: 2025-12-27 |
| 4 | +**Branch**: `feat/adr-review-auto-trigger` |
| 5 | +**Issue**: Follow-up from Session 91 (P1 action item) |
| 6 | + |
| 7 | +## Outcome |
| 8 | + |
| 9 | +**Status**: SUCCESS - PR #467 created |
| 10 | + |
| 11 | +## Objective |
| 12 | + |
| 13 | +Ensure adr-review skill is ALWAYS triggered automatically when an ADR is created or updated, regardless of which agent performs the operation. |
| 14 | + |
| 15 | +## Customer Impact (Working Backwards) |
| 16 | + |
| 17 | +**Before**: Users must manually request ADR review after architect creates ADRs (discovered in Session 91 with ADR-021). |
| 18 | + |
| 19 | +**After**: ADR review is automatic - architect signals orchestrator with MANDATORY routing, orchestrator enforces the gate. |
| 20 | + |
| 21 | +**Result**: All ADRs receive multi-agent validation without manual intervention. |
| 22 | + |
| 23 | +## Implementation Plan |
| 24 | + |
| 25 | +Based on analysis at `.agents/analysis/adr-review-trigger-fix.md`: |
| 26 | + |
| 27 | +| Change | File | Purpose | |
| 28 | +|--------|------|---------| |
| 29 | +| 1 | `src/claude/architect.md` | Add BLOCKING gate to handoff protocol | |
| 30 | +| 2 | `src/claude/orchestrator.md` | Add ADR Review Enforcement section | |
| 31 | +| 3 | `AGENTS.md` | Add global ADR Review Requirement | |
| 32 | +| 4 | `.claude/skills/adr-review/SKILL.md` | Update with MANDATORY enforcement language | |
| 33 | + |
| 34 | +## Limitation Note |
| 35 | + |
| 36 | +The user correctly identified that this fix is a workaround, not a fundamental solution: |
| 37 | + |
| 38 | +**Root Cause**: Claude Code skills are **pull-based**, not **push-based**. There's no automatic skill invocation based on file operations or context detection. |
| 39 | + |
| 40 | +**Why This Matters**: The skill documentation said "triggers on...when architect creates ADR" but this was aspirational documentation, not implemented behavior. |
| 41 | + |
| 42 | +**This Fix**: Adds explicit BLOCKING gates in agent prompts so they signal and invoke the skill manually. |
| 43 | + |
| 44 | +**True Solution** (out of scope): Would require Claude Code framework changes: |
| 45 | + |
| 46 | +- Event-driven skill invocation |
| 47 | +- File pattern matching for automatic activation |
| 48 | +- Push-based skill triggering |
| 49 | + |
| 50 | +## Protocol Compliance |
| 51 | + |
| 52 | +### Session End Checklist |
| 53 | + |
| 54 | +| Step | Status | Evidence | |
| 55 | +|------|--------|----------| |
| 56 | +| [x] Session log created | PASS | This file | |
| 57 | +| [x] All changes committed | PASS | 4d61706 | |
| 58 | +| [x] PR created | PASS | #467 | |
| 59 | +| [ ] HANDOFF context stored | Pending | | |
| 60 | +| [x] Markdownlint run | PASS | 0 errors in changed files | |
| 61 | +| [ ] Validation script | Pending | | |
| 62 | + |
| 63 | +## References |
| 64 | + |
| 65 | +- [Session 91 Analysis](/.agents/analysis/adr-review-trigger-fix.md) - Root cause and fix design |
| 66 | +- [Session 91 Log](/.agents/sessions/2025-12-27-session-91-issue-357-quality-gate-prompts.md) - Discovery context |
0 commit comments