๐Purpose
The Remediation Detector scans an initiative's title and description for CAROL-INI-NNN references near remediation keywords and resolves the single confident reference to a target initiative row, returning the target id with evidence, or None with a reason. It is conservative by design: it returns None when the references are ambiguous, when no remediation keyword is nearby, or when the matched initiative does not exist - better to miss than mis-link. It is the single source of truth for this detection, previously duplicated verbatim in the initiatives app and the Initiative Creator droid.
๐Duties
- Triggered when a new initiative is created or an Orion bypass needs its remediation target detected.
- Scans title+description for CAROL-INI-NNN references and nearby remediation keywords.
- Resolves a single confident reference to a specific initiative row (including sub-attempts).
- Returns (target_id, evidence) on a confident match, or (None, reason) when ambiguous/absent.
๐Constraints
- Conservative: returns None rather than guess when references are ambiguous or no keyword is nearby.
- Uses the caller-supplied database connection exactly as the original helper did; self-contained otherwise.
- Behavior is preserved exactly; the body is byte-identical to the former app helper.
- Reached only through the shared shim, never imported by the app directly.
๐คBelongs to
Source: Droid Families ยท Public information reflected here.