원클릭으로
compare-framework
Semantic comparison workflow for validating equivalence between artifacts.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Semantic comparison workflow for validating equivalence between artifacts.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
This skill should be used when the user asks to "plan a blog post", "research for blog", "draft a blog post", "critique a draft", "deformulize a post", "commit blog changes", "editorial review", "voice check", "style check", "audit blog", "content audit", "audit series", or "audit drafts".
This skill should be used when the user asks to "commit code", "review code", "fix lint/type error", "improve performance", "compare code", "shrink code", "generate spec from code", "investigate code", or "create handoff prompt".
This skill should be used when the user asks to "create documentation", "build docs", "review docs", "compare documents", "compress docs", "adversarial review docs", or "commit docs".
Unified identify-verify-stage-commit logic reused by other skills.
Pre-edit investigation workflow for understanding code and behavior before changes.
Validation-driven compression workflow that requires semantic comparison before approval.
| name | compare-framework |
| description | Semantic comparison workflow for validating equivalence between artifacts. |
Compare two artifacts (code, documents, configs) for behavioral/execution equivalence.
CRITICAL: Steps 1-2 MUST run in parallel (single message, two Task calls). Extract independently — NEVER pre-populate with "items to verify" or prime with change knowledge. Targeted validation inflates scores.
Use Task tool with subagent_type: "general-purpose", model: "sonnet":
**SEMANTIC EXTRACTION**
**Artifact**: {{path}} | **Type**: {{code|document|config}}
Extract ALL {{type-specific items}} from this artifact.
Rules: Extract ALL items (not just obvious), normalize to standard forms, include line numbers, note confidence level.
Output Format (JSON):
{ "items": [...], "relationships": [...], "metadata": {...} }
Execute: Single message with TWO Task calls.
def calculate_equivalence(primary_comp, relationship_comp, structure_comp):
weights = {"primary": 0.4, "relationship": 0.4, "structure": 0.2}
base_score = sum(weights[k] * scores[k] for k in weights)
if breaking_changes > 0:
base_score *= 0.5
if critical_relationships_broken > 0:
base_score *= 0.7
return base_score
| Score | Interpretation |
|---|---|
| >=0.95 | Equivalent - safe to proceed |
| 0.85-0.94 | Mostly equivalent - review carefully |
| 0.70-0.84 | Significant differences |
| <0.70 | BREAKING - not equivalent |
| Type | Severity | Trigger |
|---|---|---|
| Breaking change | CRITICAL | Core contract changed |
| Relationship loss | HIGH | Dependency removed |
| Structural change | MEDIUM | Organization differs |
| Minor difference | LOW | Cosmetic changes |
## Comparison: {{A}} vs {{B}}
### Equivalence Summary
- **Score**: {score}/1.0 ({interpretation})
- **Primary Preservation**: {score}/1.0
- **Relationship Preservation**: {score}/1.0
- **Structure**: {score}/1.0
### Warnings ({count})
**{severity}**: {description}
### Shared ({count})
- {item} - Match: {type}
### Unique to A ({count})
- {item}
### Unique to B ({count})
- {item}
### Recommendation
{SAFE|REVIEW|BREAKING}