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.