{
  "$comment": "Merge into .claude/settings.json. SessionStart is the safe venue: it fires before this session spawns anything, the active-run guard protects concurrent sessions' work, and the stamp-file debounce (default 6h) keeps it cheap. Keep the existing Stop -> verify wiring; do NOT run housekeeping on Stop (it would race the very processes the turn just started).",
  "hooks": {
    "SessionStart": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "powershell -NoProfile -ExecutionPolicy Bypass -File \"$env:CLAUDE_PROJECT_DIR/.claude/hooks/housekeep.ps1\" -Apply -Hook"
          }
        ]
      }
    ]
  },
  "$claude_md_binding_block": [
    "Add to CLAUDE.md §0 (or §2) — the housekeeping bindings /housekeep and the hook read:",
    "- **Housekeeping:** scratch screenshot dirs: `<docs/screenshots, …>` · protected (NEVER deleted): `<visual-regression baselines dir, reference screenshots dir>` · retention: scratch `<3>`d, approval-inbox `<14>`d, obj/_v* `<3>`d · orphan process age: `<2>`h · CDP port convention: `<92xx>` · policy: reclamation never runs while a RUN_STATE is open or extra worktrees exist; worktree removal requires human approval; every agent kills every process it starts and lists spawned PIDs in Evidence."
  ]
}
