Use when you have a written implementation plan to execute in a separate session with review checkpoints
npx skills add 30eggis/claude-frontend-skills --skill "spec-mirror"
Install specific skill from multi-skill repository
# Description
|
# SKILL.md
name: spec-mirror
description: |
Compare original Spec against actual implementation to verify spec compliance.
Integrates with hack-2-spec skill to reverse-engineer Spec from codebase and compare.
Use when reviewing implementation for over-spec features or missing requirements.
permissionMode: bypassPermissions
Spec Mirror
Compare original Spec against implementation to identify over-spec/missing items.
Workflow
[Original Spec] + [Codebase]
β
[Generate reverse-engineered Spec via hack-2-spec]
β
[Ask language preference]
β
[Compare REQ items]
β
[Generate report]
Step 1: Confirm Inputs
Gather from user:
| Input | Description | Example |
|---|---|---|
| Original Spec | Requirements doc written before development | docs/SPEC.md |
| Codebase | Implemented project path | ./my-project |
Step 2: Generate Reverse-Engineered Spec
Use hack-2-spec skill to analyze codebase:
- Analyze codebase using hack-2-spec's "Code Analysis" method
- Generate reverse-engineered Spec (temp path:
docs/_mirror/SPEC.md) - Extract requirements in same REQ-### format as original Spec
Step 3: Ask Language Preference
Before generating report, ask user which language to use:
Which language would you like the report to be written in?
- English
- Korean (νκ΅μ΄)
- Other (please specify)
Store the preference and apply to the generated report.
Step 4: Compare Specs
Compare REQ items between original and reverse-engineered Spec:
Comparison Criteria
| Category | Definition | Identification | Verdict |
|---|---|---|---|
| Match | Original REQ properly implemented | Same/similar REQ exists in reverse Spec | PASS |
| Missing | Original REQ not implemented | No corresponding REQ in reverse Spec | FAIL |
| Over-spec | Feature implemented without Spec | REQ exists only in reverse Spec | PASS (νμ©) |
Over-spec νμ© μ μ±
μ€μ: Over-spec νλͺ©μ FAILμ΄ μλλλ€.
- Specμ μμ§λ§ ꡬνλ μΆκ° κΈ°λ₯μ νμ©λ©λλ€
- Missing νλͺ©λ§μ΄ μ€ν¨ 쑰건μ λλ€
- Over-specμ μ 보 μ 곡 λͺ©μ μΌλ‘ 리ν¬νΈμ ν¬ν¨λ©λλ€
Matching Method
- Direct match by REQ ID if available
- Semantic matching by feature description if no ID
- Mark as "Review needed" if low confidence
Step 5: Generate Report
Use assets/templates/MIRROR_REPORT_TEMPLATE.md template.
Report structure:
- Summary (count of match/missing/over-spec)
- Detailed analysis (each item with explanation)
- Verdict (PASS if missing_count == 0, regardless of over-spec count)
- Checklist (action items for missing items only)
Output: docs/MIRROR_REPORT.md
Verdict Rules
IF missing_count == 0:
verdict = "PASS"
message = "λͺ¨λ Specμ΄ κ΅¬νλμμ΅λλ€. (over-spec {N}건 νμ©)"
ELSE:
verdict = "FAIL"
message = "λλ½λ μꡬμ¬ν {N}κ±΄μ΄ μμ΅λλ€."
Usage Example
User: Review implementation against Spec
Assistant: Please provide the original Spec path and codebase path.
User: Spec is docs/SPEC.md, code is current folder
Assistant: Which language for the report? [English/Korean/Other]
User: Korean
Assistant: [reverse-engineer via hack-2-spec] β [compare] β [generate report in Korean]
Integration with spec-it-execute
When called from spec-it-execute Phase 5:
- Input: spec-folder path (from _state.specSource)
- Action: Compare implementation against original spec
- Output: MIRROR_REPORT with match/missing/over-spec counts
- Return:
{ matchCount, missingCount, overCount, verdict }
# spec-it-execute Phase 5 νΈμΆ ν¨ν΄
Skill(spec-mirror {spec-folder} --codebase .)
# κ²°κ³Ό νμΈ
IF missingCount > 0:
β λλ½ νλͺ© μ¬κ°λ° β Phase 4 QA β Phase 5 μ¬κ²μ¦
ELSE:
β Phase 6 μ§ν (over-specμ νμ©)
Templates
assets/templates/MIRROR_REPORT_TEMPLATE.md- Comparison report template
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.