kookr-shadow-detectionlisted
Install: claude install-skill kookr-ai/kookr
# Shadow Detection System
Kookr has a shadow detection infrastructure that lets you safely validate new stuck-detection strategies. New strategies run alongside the real detector: they see the same data but their verdicts are **logged, not acted upon**. An offline report compares shadow vs. real verdicts using interval-based coverage metrics.
## Purpose
The real anomaly detector (needs_input, permission_blocked, stale_agent, etc.) is stable and reliable. When adding new detection strategies (pane pattern matching, PID monitoring, HTTP push), we need to prove they work correctly before activating them. Shadow mode provides this proof:
1. **Strategy runs in shadow mode** — evaluates live data, logs verdicts to `~/.kookr/shadow-detection.jsonl`
2. **Shadow report compares** — reconstructs anomaly intervals, computes coverage/precision/latency
3. **Promotion when validated** — strategy moves from `shadow` to `active` after meeting thresholds
## Shadow Report Endpoint
```bash
# JSON format (for programmatic analysis)
curl -s http://localhost:4800/api/shadow-report | jq .
# Text format (for human reading)
curl -s "http://localhost:4800/api/shadow-report?format=text"
```
### Response (JSON)
```json
{
"generatedAt": "2026-03-28T12:00:00.000Z",
"observationWindow": { "startMs": 1743163200000, "endMs": 1743249600000 },
"strategies": [
{
"source": "pane_semantics",
"totalObservationMs": 86400000,
"realIntervals": 14,
"matchedIntervals": 14,