Problem
A PostToolUse guard fires automatically whenever a plan or research markdown file is edited, and instructs the assistant to invoke a specific skill afterward. The guard's purpose is to make sure in-progress plan edits go through that skill's review flow.
However, the guard fires unconditionally on every edit, including edits made after a plan has already reached a finalized state — for example, a plan file whose frontmatter already records status: ready and a recorded decision: value, being edited only to relocate it to a different repository or to correct a file path reference. In a single session this guard fired 6+ times for edits of that kind, none of which needed the review flow the guard exists to protect. Each time, the edit's intent was still validated (informally, by re-checking the change made sense) but the guard's own literal instruction to invoke the skill was not followed, since doing so for a purely mechanical fix to an already-decided plan adds no value.
Scope
- Add an exemption condition to the trigger source (the part of the codebase that generates the guard) so that when a plan/research file's frontmatter already declares both a finalized
status (e.g. ready) and a recorded decision field, edits to that file do not re-trigger the skill-invocation guard.
- Regenerate the compiled guard from the updated trigger source using the project's existing trigger-compilation tooling.
- The trigger compiler currently detects "content worth guarding" via a hardcoded pattern matched against checklist/checkbox-style diffs only. Extending it to also recognize frontmatter field state (
status/decision) requires understanding the compiler's current matching approach first — a plain regex addition on top of the existing checkbox-diff pattern is not sufficient by itself.
Verification
| Feature |
Procedure |
Expected Result |
| Guard exempts finalized plans |
Edit a plan file whose frontmatter already has status: ready and a decision: field (e.g. a relocation-only or path-correction edit) |
Guard does not fire the skill-invocation instruction |
| Guard still fires for undecided plans |
Edit a plan file that does NOT yet have both status: ready and a decision: field |
Guard fires as before, unchanged |
| No regression in existing checkbox-diff detection |
Edit a plan file's checklist/checkbox content |
Guard still fires per its original behavior |
Problem
A PostToolUse guard fires automatically whenever a plan or research markdown file is edited, and instructs the assistant to invoke a specific skill afterward. The guard's purpose is to make sure in-progress plan edits go through that skill's review flow.
However, the guard fires unconditionally on every edit, including edits made after a plan has already reached a finalized state — for example, a plan file whose frontmatter already records
status: readyand a recordeddecision:value, being edited only to relocate it to a different repository or to correct a file path reference. In a single session this guard fired 6+ times for edits of that kind, none of which needed the review flow the guard exists to protect. Each time, the edit's intent was still validated (informally, by re-checking the change made sense) but the guard's own literal instruction to invoke the skill was not followed, since doing so for a purely mechanical fix to an already-decided plan adds no value.Scope
status(e.g.ready) and a recordeddecisionfield, edits to that file do not re-trigger the skill-invocation guard.status/decision) requires understanding the compiler's current matching approach first — a plain regex addition on top of the existing checkbox-diff pattern is not sufficient by itself.Verification
status: readyand adecision:field (e.g. a relocation-only or path-correction edit)status: readyand adecision:field