-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Description
Formalize the human-in-the-loop approval workflow that connects the Fix Review panel (#10), pattern library (#8), and self-healing mode (#7) into a cohesive HITL system.
Current State (Delivered)
- Fix Review panel: Before/after screenshots, Approve/Partial/Reject buttons
- Pattern library: Stores successful fixes, matches on new issues
- Telemetry: resolve() closes the feedback loop, metrics() shows dashboard
HITL Requirements
1. Approval Queue
- Persistent queue of pending fixes (survives page refresh)
- Queue items show: description, issue class, before/after screenshots, code diff
- Batch approve/reject for same-class fixes
- Queue badge count in the visualizer header bar
2. Code Diff View
- Show the actual file edits made by Claude Code (parse session JSONL for Edit/Write tool calls)
- Syntax-highlighted diff alongside the visual before/after
- One-click revert if rejected (git checkout the changed files)
3. Approval Graduation (ADR-0007)
- Track approval rate per issue class
- When class hits 95%+ approval over 10+ fixes, propose auto-apply
- "Graduate" button promotes class from HITL → autonomous
- Graduated classes still log telemetry but skip the review queue
- Regression detection: if a graduated fix fails, revoke auto-apply
4. Confidence Scoring
- Display confidence score based on pattern match quality
- High-confidence fixes (known class, strong pattern match) show green badge
- Low-confidence fixes (novel class, no prior patterns) show orange badge
- Confidence threshold configurable (default: auto-apply above 0.9)
5. Notification Integration
- Desktop notification when fix is ready for review
- Optional sound (via TTS feedback skill)
- Slack/webhook notification for remote review
Architecture
__claude.fix() → Before screenshot → Claude Code session → After screenshot
↓
Fix Review Panel (HITL)
├── Before/After images
├── Code diff
├── Confidence score
└── [Approve] [Partial] [Reject]
↓
Pattern stored (success)
→ Metrics updated
→ Graduation check
Depends On
- ADR-0006: DevTools Bridge integration #6 (ADR-0006: DevTools Bridge) — Done
- Fix pattern library: store and reuse successful fix patterns #8 (Fix pattern library) — Done
- Before/after visual diff for fix approval workflow #10 (Before/after visual diff) — Done
- Self-healing UI: proactive issue detection and auto-fix queue #7 (Self-healing UI) — Open (provides the fix source)
- Context pruning: reduce context size using telemetry signal-to-noise data #9 (Context pruning) — Open (optimizes what gets sent)
References
- PKM ADR-0007: Always-On Agent Fleet (operational autonomy)
- PKM ADR-0013 Benchmarks: Self-Improvement Loop 3 (Approval Lane Graduation)
- PKM ADR-0013 Benchmarks: North Star principles
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request