Test whether the proposed mapping preserves the required relations/operations/invariants and actively search for a minimal counterexample to preservation.
Installs into .claude/skills of the current project.
Are you the author of Test Structure Preservation?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/yogsoth-ai-test-structure-preservation)
---
name: test-structure-preservation
description: "Test whether the proposed mapping preserves the required relations/operations/invariants and actively search for a minimal counterexample to preservation."
---
# test-structure-preservation
## Purpose
Test whether a proposed mapping preserves required relations, operations, and invariants, while searching a minimal counterexample.
## Input contract
```yaml
required: [mapping, preservation_obligations, source_and_target]
optional: [counterexample_search_space]
constraints: [obligations must be enumerated before testing]
```
## Procedure
1. Evaluate each relation, operation, and invariant.
2. Search for the smallest preservation failure.
3. Record pass, fail, unknown, and counterexample evidence.
If material relations fail to survive the mapping, consider `downgrade-equivalence-claim` as the next tactic.
## Output contract
```yaml
produces: [preservation_matrix, counterexample, failed_obligations, uncertainty]
delta_fields: [findings, evidence_updates, uncertainties, decisions]
```
## Quality gates
- A preserved invariant needs a tested mapping and evidence.
## Failure and counterexamples
Unknown preservation is not a pass.
## Provenance map
- resolved: isomorphism-falsification