site-auditlisted
Install: claude install-skill mattbutlerengineering/mattbutlerengineering
# Site Audit
Inventory-tracked audit system with three modes. Each mode targets different surfaces and creates GitHub issues for findings.
**Parse the argument to determine mode:** `smoke` (default), `sweep`, or `scout`.
## Inventory
The audit inventory at `.audit-state/inventory.json` tracks every auditable surface (22+ pages and API endpoints), when each was last checked, and Lighthouse score history. The `@mbe/agent-core` package provides `buildInventory()`, `loadInventory()`, `saveInventory()`, `mapFilesToSurfaces()`, `findStalestZone()`, `updateSurfaceScore()`, and `detectRegression()`.
**Before any mode runs:**
```bash
# Load or create inventory
cat .audit-state/inventory.json 2>/dev/null || echo "No inventory — will build fresh"
```
The agent-core functions handle building a fresh inventory if none exists and merging with existing data to preserve score history.
**After any mode completes**, save the updated inventory back.
## Mode 1: Smoke (per-commit regression check)
**Trigger:** `/site-audit smoke` or `/site-audit` (default)
**Purpose:** Check if recent changes broke anything.
### Steps
1. **Get changed files:**
```bash
git diff HEAD~1 --name-only
```
2. **Map to affected surfaces** using the file-to-surface mapping in agent-core's `mapFilesToSurfaces()`. The mapping rules:
- `apps/<app>/src/pages/<Page>.tsx` → specific surface
- `apps/<app>/src/components/**` → all surfaces in that app
- `packages/rialto/src/**` → all frontend surfaces
-