{
  "schema_version": "0.1",
  "artifact_type": "implementation_plan",
  "canonical": true,
  "artifact_id": "IMP-014",
  "agent_summary": {
    "title": "Minimal visible-summary classification and telemetry",
    "status": "complete",
    "summary": "Use representative real-session evaluation to preserve only high-confidence Reason Guard findings, abstain safely on uncertain active summaries, and expose privacy-safe accuracy and latency telemetry through existing report/status surfaces.",
    "last_reviewed_at": "2026-07-25",
    "load_notes": "User authorized implementation on 2026-07-25. The original 46-case corpus was later proven vocabulary-leaky by deduplicated real-session development/holdout evaluation. Lexical expansion, MiniLM, and character n-grams were rejected. The bounded correction keeps narrow high-confidence obligations and records active-looking uncertainty only as aggregate telemetry. Models, embeddings, RAG, daemons, GPU use, raw-summary telemetry, and new configuration remain excluded."
  },
  "source_ids": [
    "REQ-174",
    "REQ-171",
    "REQ-172",
    "REQ-173",
    "PRD-011",
    "ARCH-011",
    "WFR-420"
  ],
  "approval_gate": {
    "status": "approved",
    "implementation_authorized": true,
    "approved_at": "2026-07-25",
    "approved_by": "user"
  },
  "phases": [
    {
      "id": "IMP-PHASE-045",
      "title": "Deterministic accuracy and measurement",
      "tasks": [
        {
          "id": "IMP-TASK-113",
          "summary": "RED: extend existing Reason Guard coverage with a balanced labelled visible-summary replay corpus containing real missed heading forms and close counterexamples; prove the current classifier's false negatives and record precision, recall, F1, accuracy, and classification latency. GREEN: add the smallest anchored active-check normalization that clears the accuracy gate while preserving low-confidence report-only authority and existing lifecycle matching.",
          "status": "complete",
          "requirement_ids": [
            "REQ-174",
            "PRD-011"
          ],
          "architecture_ids": [
            "ARCH-011"
          ],
          "validation_ids": [
            "IMP-VAL-099"
          ]
        },
        {
          "id": "IMP-TASK-114",
          "summary": "RED then GREEN: prove unresolved inferred checks cannot yield unconditional clear clearance; add bounded aggregate-only classification counters to the existing local metrics and project them through existing status/report surfaces; update documentation, traceability, version metadata, and release evidence without adding a new service, dependency, model, index, or configuration surface.",
          "status": "complete",
          "requirement_ids": [
            "REQ-174",
            "PRD-011"
          ],
          "architecture_ids": [
            "ARCH-011"
          ],
          "validation_ids": [
            "IMP-VAL-100"
          ]
        }
      ]
    },
    {
      "id": "IMP-PHASE-046",
      "title": "Representative evaluation and confidence-bounded abstention",
      "tasks": [
        {
          "id": "IMP-TASK-115",
          "summary": "Freeze a deduplicated real-session rubric and development/holdout corpus; reject lexical or model approaches that miss the accuracy/latency boundary; keep the narrow high-confidence classifier; add aggregate-only uncertainty and conditional clearance; project uncertainty through status and UI; prove downstream parity and replay the active Codex session end to end.",
          "status": "complete",
          "requirement_ids": [
            "REQ-174",
            "PRD-011"
          ],
          "architecture_ids": [
            "ARCH-011"
          ],
          "validation_ids": [
            "IMP-VAL-101"
          ]
        }
      ]
    }
  ],
  "validations": [
    {
      "id": "IMP-VAL-099",
      "summary": "The labelled replay reports precision, recall, F1, accuracy, false positives, false negatives, and classification p50/p95; required real-world regression cases have zero misses; the selected deterministic rule achieves at least 0.95 precision and recall and adds no dependency or process."
    },
    {
      "id": "IMP-VAL-100",
      "summary": "Runtime telemetry stores only bounded numeric counters and latency samples, never summary text; inferred open checks make clearance conditional; focused, parity, privacy, performance, full-suite, workflow, state, feature, release, and repeated CHML audits are green before shipping."
    },
    {
      "id": "IMP-VAL-101",
      "summary": "On deduplicated real-session holdout data, high-confidence candidate precision is at least 0.95 when predictions exist (otherwise it is unmeasured and false obligations are zero), safety recall is at least 0.95, overall and representative-neutral clear specificity are at least 0.50, required misses are zero, classifier p95 is at most 1 ms, and replay of the active Codex session cannot produce a false clear when uncertain active summaries exist."
    }
  ],
  "execution_rules": [
    "Run one hypothesis at a time: measure baseline, make the smallest rule change, replay, and reject any change that worsens accuracy or latency without a compensating required gain.",
    "Fail fast: reject deterministic rules or models that miss the representative validation or latency bar; prefer bounded abstention over expanding vocabulary or infrastructure.",
    "Extend existing tests before production code and confirm the red failure is the missing behavior.",
    "Persist aggregate telemetry only; test fixtures contain sanitized synthetic or already-approved visible-summary examples.",
    "Commit verified increments and ship through the configured autonomous git and release workflow only after all gates are green."
  ],
  "traceability": {
    "request_ids": [
      "REQ-174",
      "REQ-171",
      "REQ-172",
      "REQ-173"
    ],
    "prd_ids": [
      "PRD-011"
    ],
    "architecture_ids": [
      "ARCH-011"
    ],
    "tracking_ids": [
      "TRK-161"
    ],
    "workflow_ids": [
      "WFR-420",
      "WFR-421",
      "WFR-422",
      "WFR-424",
      "WFR-425",
      "WFR-426",
      "WFR-427",
      "WFR-428",
      "WFR-429",
      "WFR-430",
      "WFR-431",
      "WFR-432",
      "WFR-433",
      "WFR-434",
      "WFR-435"
    ],
    "evidence_ids": [
      "EV-210",
      "EV-211",
      "EV-212"
    ],
    "change_ids": [
      "CHG-137",
      "CHG-138",
      "CHG-139"
    ]
  }
}
