diff --git a/strix/skills/scan_modes/diff.md b/strix/skills/scan_modes/diff.md index 49a7d14c1..17159bd96 100644 --- a/strix/skills/scan_modes/diff.md +++ b/strix/skills/scan_modes/diff.md @@ -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. diff --git a/tests/test_agent_tool_registration.py b/tests/test_agent_tool_registration.py index 6ebb2fddf..b9011c19e 100644 --- a/tests/test_agent_tool_registration.py +++ b/tests/test_agent_tool_registration.py @@ -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."