---
description: Compare before/after audit state to verify fixes worked
argument-hint: "[project-path: defaults to .]"
allowed-tools: Read, Write, Bash, Grep, Glob
---

Verify that fixes improved the security posture by comparing audit snapshots.

## Steps

1. **Preserve baseline**
   - If `AUDIT.md` exists, rename to `AUDIT-BEFORE.md`
   - If `.vaspera/audit/*.json` exists, note the latest as "before" snapshot

2. **Run fresh audit**
   - Execute `/vaspera-audit` to generate new findings
   - This creates a new `.vaspera/audit/{timestamp}.json`

3. **Compare before vs after**
   Calculate deltas:
   - Critical: before → after (delta)
   - High: before → after (delta)
   - Medium: before → after (delta)
   - Low: before → after (delta)
   - Total: before → after (delta)

4. **Calculate Production Readiness Score**
   Score = 100 - (critical×10 + high×5 + medium×2 + low×0.5)
   
   Certification levels:
   - 90-100: CERTIFIED (green)
   - 70-89: APPROVED (yellow)
   - 40-69: REVIEW_REQUIRED (orange)
   - 0-39: BLOCKED (red)

5. **Detect regressions**
   - New findings that didn't exist in "before" snapshot
   - Flag these prominently — fixes may have introduced new issues

6. **Generate HARDENING-REPORT.md**
   ```markdown
   # Hardening Report
   
   ## Summary
   | Severity | Before | After | Delta |
   |----------|--------|-------|-------|
   | Critical | X | Y | -N |
   ...
   
   ## Production Readiness Score
   Before: XX/100 (LEVEL)
   After: YY/100 (LEVEL)
   
   ## Remaining Issues
   - [file:line] — description
   
   ## Regressions (NEW)
   - [file:line] — description
   
   ## Deployment Checklist
   - [ ] All critical fixed
   - [ ] Tests passing
   - [ ] Build succeeds
   ```

## Important

- This skill is READ-ONLY for code — it generates reports, doesn't fix
- Always flag regressions prominently
- The score is informational — use judgment on whether to deploy
