Problem
Many engineering teams run private LLMs or internal CLI tools that do not emit vendor telemetry. Without an explicit adapter, AI-generated edits appear in the editor but lack prompt, model, and session context. That gap reduces the usefulness of provenance for audits and PR reviews.
High-level approach
Define the signals you can trust: header signatures, stable user‑agent tokens, unique payload fields, or session identifiers. Rank them by trustworthiness.
Design evidence rules: for each detectable signal, document a short justification, the expected field, and an evidence weight (high for signed headers, lower for heuristics).
Implement a conservative detection rule that returns a detection only when combined evidence passes a clear threshold.
Register the adapter so the registry can consider it; ensure its declared priority (ordering) sits ahead of fallback heuristics but after core, high-trust adapters.
Validate with unit fixtures and an end‑to‑end replay through the local proxy and dashboard.
Detection principles
Precision over recall: prefer missing a match to declaring an incorrect attribution.
Explainability: every detection must carry evidence that an auditor can inspect.
Performance: keep per-detection logic cheap; avoid heavy parsing in the hot path.
Redaction: strip or hash any secrets before saving evidence.
Testing and validation
Unit tests: supply positive and negative recorded request/response fixtures to assert match/no-match behavior and to lock down the confidence threshold.
Integration test: replay a recorded proxy request/response along with the inserted text through a local quickstart and confirm the dashboard displays your adapter name and evidence.
Canary rollout: enable the adapter in logging-only mode for a short period, measure false positives, and adjust weights before enabling in alerts or PR gates.
Operational checklist
Document the adapter’s evidence rules and ordering so future maintainers can tune it.
Ensure stored evidence is redacted or hashed as needed for compliance.
Add telemetry around low‑confidence matches for manual labeling and continuous improvement.
Add CI guards: regression tests preventing accidental broadening of detection heuristics.
Practical takeaway
Custom adapters let teams capture private tools with auditability — but only if they are designed for precision, documented for explainability, and validated with unit and replay tests. Start conservative, collect samples, and iterate on evidence weights rather than broadening heuristics.

















