Category: behavioral
What happened
During a babysit-prs pass on #529 I edited a single prose line (line 57) in plugins/testing/skills/diagnose/context/loop.md. The cli-flag-verify PostToolUse:Edit hook then flagged dotnet test --project on line 61 — a pre-existing, illustrative code block I did not touch:
cli-flag-verify: 1 unknown flag(s) in ...loop.md
UNKNOWN_FLAG: dotnet test --project (not found in 'dotnet test --help')
Why it is friction
The hook re-scans the entire file after any edit rather than scoping to the changed hunk. Editing unrelated prose surfaces warnings about flags in lines the change never touched. On docs files that carry deliberately illustrative command snippets, this is recurring noise: every future edit to the file re-raises the same warning, and it competes for attention with warnings that ARE about the current change. (dotnet test --project is also SDK-version-dependent — valid under the .NET 10 MTP-based dotnet test, absent in older VSTest-based dotnet test — so the flag itself is arguable, but that is secondary to the scoping point.)
Suggested direction
Scope cli-flag-verify to the added/changed lines of the edit (the diff hunk) rather than the whole file, so it flags flags the current edit introduced, not pre-existing content. Whole-file scanning still has value for newly-created files; the regression is specifically re-warning on untouched lines during incremental edits.
Context
Filed by an automated PR-babysitting worker (self-observation).
Category: behavioral
What happened
During a babysit-prs pass on #529 I edited a single prose line (line 57) in
plugins/testing/skills/diagnose/context/loop.md. Thecli-flag-verifyPostToolUse:Edit hook then flaggeddotnet test --projecton line 61 — a pre-existing, illustrative code block I did not touch:Why it is friction
The hook re-scans the entire file after any edit rather than scoping to the changed hunk. Editing unrelated prose surfaces warnings about flags in lines the change never touched. On docs files that carry deliberately illustrative command snippets, this is recurring noise: every future edit to the file re-raises the same warning, and it competes for attention with warnings that ARE about the current change. (
dotnet test --projectis also SDK-version-dependent — valid under the .NET 10 MTP-baseddotnet test, absent in older VSTest-baseddotnet test— so the flag itself is arguable, but that is secondary to the scoping point.)Suggested direction
Scope cli-flag-verify to the added/changed lines of the edit (the diff hunk) rather than the whole file, so it flags flags the current edit introduced, not pre-existing content. Whole-file scanning still has value for newly-created files; the regression is specifically re-warning on untouched lines during incremental edits.
Context
Filed by an automated PR-babysitting worker (self-observation).