fix(skills): the diff skill drops its coverage ledger instructions when the coverage tools are off

This commit is contained in:
Ahmed Allam 2026-10-24 17:53:00 +00:00 • committed by Ahmed Allam
parent aaf1f8c823
commit fa3539cb75
2 changed files with 15 additions and 0 deletions

View file

@ -1,6 +1,7 @@
---
name: diff
description: Methodology for diff-scoped review of a pull request, commit, or branch — what counts as in scope, how far to follow a change, and what not to report
template: jinja
---
# Diff-Scoped Review
@ -69,9 +70,14 @@ When it is not, the closure rules apply unchanged: a complete
source → control → sink → impact trace through the changed code is
reportable at reduced confidence, with the missing runtime proof named in
`confidence_rationale`. A candidate you can neither confirm nor rule out
{% if coverage_tools %}
with a named control is an `open_proof_gap` — record it as
`needs_follow_up` coverage rather than dropping it because the
environment was inconvenient.
{% else %}
with a named control is an `open_proof_gap` — carry it up as an open
item rather than dropping it because the environment was inconvenient.
{% endif %}
## Reporting
@ -80,7 +86,9 @@ plainly which part of the diff introduced or exposed it. A reviewer
reading your report next to the diff should be able to see the connection
without re-deriving your analysis.
{% if coverage_tools %}
Record coverage per changed component, not per changed file — a
formatting-only file and a rewritten auth module are not equal rows.
{% endif %}
State which changed areas you reviewed and cleared, so the author knows
what a clean result actually covered.

View file

@ -127,6 +127,13 @@ def test_coverage_tools_can_be_turned_off() -> None:
assert "Coverage reconciliation" not in off_descriptions
assert not any(name in off_descriptions for name in coverage)
diff_on = factory.build_strix_agent(is_root=True, is_diff_scoped=True)
diff_off = factory.build_strix_agent(is_root=True, is_diff_scoped=True, coverage_tools=False)
assert isinstance(diff_on.instructions, str)
assert isinstance(diff_off.instructions, str)
assert "Record coverage per changed component" in diff_on.instructions
assert "coverage" not in diff_off.instructions.lower()
def test_instructions_override_is_used_verbatim() -> None:
custom = "You are a scan agent. Follow the provided scope."