{
  "schema_version": "0.1",
  "id": "IMP-005",
  "title": "Configurable Stop-hook reflections",
  "status": "complete",
  "source_prd_id": "PRD-004",
  "source_architecture_id": "ARCH-004",
  "source_request_id": "REQ-090",
  "created_at": "2026-07-14",
  "updated_at": "2026-07-14",
  "summary": "Build the reflection configuration, bounded Stop hook, complete category/question CRUD, downstream parity, and release verification using RED-GREEN and repeated CHML audits.",
  "phases": [
    {"id": "IMP-PHASE-013", "name": "Behavior and management tools", "order": 1, "tasks": ["IMP-TASK-037", "IMP-TASK-038", "IMP-TASK-039"], "exit_criteria": "Focused tests prove selection, one-pass Stop behavior, and complete duplicate-safe CRUD."},
    {"id": "IMP-PHASE-014", "name": "Integration, audit, and release", "order": 2, "tasks": ["IMP-TASK-040", "IMP-TASK-041"], "exit_criteria": "All delivery surfaces are synchronized, verification is green, CHML is zero, and the release is published."}
  ],
  "tasks": [
    {"id": "IMP-TASK-037", "phase": "IMP-PHASE-013", "summary": "Write failing tests for reflection defaults, validation, deterministic bounded selection, Stop marker lifecycle, privacy constraints, malformed-input fail-open, and opt-out; implement the shared hook and config model.", "sources": ["PRD-REQ-025", "PRD-REQ-026", "PRD-REQ-027", "ARCH-COMP-020", "ARCH-COMP-021", "ARCH-IF-013", "ARCH-IF-014"], "validation": "IMP-VAL-034", "complexity": "medium", "confidence": "high", "risk": "medium", "status": "complete", "completed_at": "2026-07-14"},
    {"id": "IMP-TASK-038", "phase": "IMP-PHASE-013", "summary": "Write failing tests for CLI category/question list/create/update/enable/disable/move/delete and implement atomic config mutations.", "sources": ["PRD-REQ-028", "ARCH-COMP-022", "ARCH-IF-015"], "validation": "IMP-VAL-035", "complexity": "medium", "confidence": "high", "risk": "medium", "status": "complete", "completed_at": "2026-07-14"},
    {"id": "IMP-TASK-039", "phase": "IMP-PHASE-013", "summary": "Write failing Node tests for four MCP CRUD tools, RFQ collision safety, validation, and config preservation; implement them by reusing the server lock and writer.", "sources": ["PRD-REQ-028", "ARCH-COMP-023", "ARCH-IF-016", "ARCH-DEC-014"], "validation": "IMP-VAL-036", "complexity": "medium", "confidence": "high", "risk": "medium", "status": "complete", "completed_at": "2026-07-14"},
    {"id": "IMP-TASK-040", "phase": "IMP-PHASE-014", "summary": "Wire Claude, Codex, and opencode Stop surfaces; update installer scope, config templates, hook controls, method/docs, and parity/package tests.", "sources": ["PRD-REQ-029", "ARCH-COMP-021", "ARCH-RISK-010"], "validation": "IMP-VAL-037", "complexity": "large", "confidence": "high", "risk": "medium", "status": "complete", "completed_at": "2026-07-14"},
    {"id": "IMP-TASK-041", "phase": "IMP-PHASE-014", "summary": "Update version/release/tracking/wiki/evidence, run full verification and audit/fix loops until CHML zero, then merge, tag, push, and verify publication under autonomous policy.", "sources": ["PRD-REQ-029", "PRD-NFR-013", "PRD-NFR-014", "PRD-NFR-015", "ARCH-RISK-010", "ARCH-RISK-011", "ARCH-RISK-012"], "validation": "IMP-VAL-038", "complexity": "large", "confidence": "high", "risk": "medium", "status": "complete", "completed_at": "2026-07-14"}
  ],
  "validations": [
    {"id": "IMP-VAL-034", "method": "Focused Python hook/config tests demonstrate RED then GREEN across selection, lifecycle, fail-open, and privacy behavior.", "evidence": "EV-066"},
    {"id": "IMP-VAL-035", "method": "Focused CLI tests exercise full category/question CRUD, activation, movement, and malformed/duplicate rejection.", "evidence": "EV-066"},
    {"id": "IMP-VAL-036", "method": "Node MCP tests exercise list/create/update/delete, concurrent allocation, validation, atomic writes, and tool discovery.", "evidence": "EV-066"},
    {"id": "IMP-VAL-037", "method": "Cross-host parity, installer, package, script-scope, and config-template tests prove downstream delivery.", "evidence": "EV-066"},
    {"id": "IMP-VAL-038", "method": "Full unit/system/workflow/state/release/gate/drift/traceability checks and repeated CHML reviews finish with zero findings; remote workflow and npm version verify publication.", "evidence": "EV-066; EV-067"}
  ],
  "dependencies": ["IMP-TASK-037 and IMP-TASK-038 define the shared config contract before MCP and host integration."],
  "risks_and_rollback": [
    "Reflection defaults disabled, so rollback can remove hook wiring/tools while preserving unrelated Stop behavior.",
    "If a host cannot surface a reflection block, its adapter must fail open and document the limitation rather than emulate canonical answer storage."
  ],
  "tracking_ids": ["TRK-087", "TRK-088", "TRK-089", "TRK-090"],
  "completed_at": "2026-07-14",
  "evidence_ids": ["EV-066", "EV-067"],
  "change_ids": ["CHG-067"]
}
