From sacco-skills
Contract test parity verification for system rewrites and technology migrations. Generates behavioral tests from a reference implementation, tracks RED/GREEN progress, produces parity reports. Use when rewriting a system in a new language/framework, migrating between platforms, or ensuring API compatibility. Triggers: "parity", "contract tests", "ensure compatibility", "rewrite", "migration", "port from X to Y".
How this skill is triggered — by the user, by Claude, or both
Slash command
/sacco-skills:sacco-parity-verificationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Ensures a new implementation is behaviorally equivalent to a reference implementation
Ensures a new implementation is behaviorally equivalent to a reference implementation through contract tests with tracked RED-to-GREEN progress.
Read the reference implementation and extract behavioral contracts:
# Behavioral Contracts: <system>
| ID | Category | Behavior | Source (ref) | Test Status |
|----|----------|----------|-------------|-------------|
| BC-001 | Auth | Login with valid credentials returns token | auth.ts:45 | RED |
| BC-002 | Auth | Login with invalid credentials returns 401 | auth.ts:52 | RED |
| BC-003 | CRUD | Create entity returns entity with ID | commands.ts:120 | RED |
Sources of contracts:
For each contract, write a test against the NEW implementation:
Test file: tests/parity/auth_test.rs (or .py, .ts, etc.)
Test name: test_bc_001_login_valid_credentials_returns_token
Rules:
Maintain docs/parity-status.json:
{
"reference": "src/routes/commands.ts",
"target": "crates/new-service/src/routes/",
"total_contracts": 120,
"passing": 25,
"failing": 95,
"categories": {
"auth": { "total": 12, "passing": 8, "failing": 4 },
"crud": { "total": 50, "passing": 15, "failing": 35 },
"events": { "total": 30, "passing": 5, "failing": 25 }
},
"last_updated": "2025-01-20T12:00:00Z"
}
Update after every test run.
Work through failing contracts in priority order:
For each round:
parity(<category>): <N> contracts now passing [<passing>/<total>]When all contracts pass (or at any checkpoint), produce:
# Parity Report: <system>
## Status: 120/120 passing (100%)
## Category Breakdown
| Category | Passing | Total | Notes |
|----------|---------|-------|-------|
| Auth | 12/12 | 100% | Full parity |
| CRUD | 50/50 | 100% | Full parity |
## Behavioral Differences (Intentional)
| Contract | Reference Behavior | New Behavior | Reason |
|----------|-------------------|-------------|--------|
| BC-089 | Returns XML | Returns JSON | Modernization |
## Known Gaps
| Contract | Status | Plan |
|----------|--------|------|
| BC-120 | SKIP | Deprecated feature, not porting |
npx claudepluginhub adrien-sacco/sacco-skills --plugin sacco-skillsGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.