test-provenance-guard
SolidDetects tests that pass by construction — tests that define a private copy of the function under test instead of importing the production module — and self-heals by extracting the inline logic to an exported function, updating production callers, and rewriting the test to import the export. Two checks: (1) static — the test file must import the SUT and must not shadow its exported names; (2) mutation — blanking the production function body re-runs the test and expects failure. Runs autonomously inside autonomous-workflow Phase 4 and as a slash command for human-driven PR review. Use when adding new tests for existing or refactored code, when CI is green but you are unsure whether the tests actually exercise production, or when reviewing a PR for tests-by-construction. Triggers on "test provenance", "tests by construction", "verify tests cover real code", "tests duplicate logic", "mutation sanity check", "are these tests fake", "/test-provenance-guard".
Install
Quality Score: 86/100
Skill Content
Details
- Author
- mthines
- Repository
- mthines/agent-skills
- Created
- 4 months ago
- Last Updated
- yesterday
- Language
- JavaScript
- License
- MIT
Similar Skills
Semantically similar based on skill content — not just same category
analysis-provenance
Identify code ownership before modifying validators or linters. Checks file headers for provenance indicators, reviews documentation, and determines provenance as UPSTREAM, LOCAL, VENDOR, or UNKNOWN. Prevents accidental modification of upstream tools.
writing-tests
Use when adding or changing a test in this repo — the tier map (where a new guard goes), the scenario-first rule, the no-prose-presence-guards and no-mirror-harnesses rules, the mjs-seam grep exception, and the mutation-catalog anchoring obligations.
mutation-test
Proves a test actually checks something, by breaking the behaviour it claims to cover and confirming it goes red. Use when a test, fixture, assertion or guard has been reported as working and you want evidence rather than a green run, or to check a claim that some code is dead, unused or unreachable. Triggers on "mutation test", "mutation testing", "prove it fails", "are these tests real", "does this test actually assert anything", "is that assertion live", "did you verify it's not vacuous", "how do you know it's checking anything", or any claim that a test passes being offered as evidence the behaviour is correct. Also use it proactively before reporting harness or fixture work as done.