Problem
Repeated initialization appends duplicate agent-hook entries because detection does not match the generated command reliably. Conversely, strict doctor can accept arbitrary text containing a loose marker as a valid hook configuration.
Scope
Give generated hook entries a stable marker and validate their event, matcher, command, referenced script, and freshness.
Acceptance criteria
- Repeated installation produces one effective entry per supported agent integration.
- Doctor rejects wrong events, malformed commands, stale scripts, and prose-only matches.
- Existing tracked integration files are normalized.
- Tests cover duplicate installation and malformed-but-marker-containing configuration.
Problem
Repeated initialization appends duplicate agent-hook entries because detection does not match the generated command reliably. Conversely, strict doctor can accept arbitrary text containing a loose marker as a valid hook configuration.
Scope
Give generated hook entries a stable marker and validate their event, matcher, command, referenced script, and freshness.
Acceptance criteria