---
description: Periodic asks-vs-state audit. Extracts Josh's explicit asks from session DB, reconciles against current state across all projects/skills/repos. Surfaces drift between 'what Josh asked for' and 'what actually happened'. Runs every 14 days via launchd or on demand via /audit.
---

# personal-audit-runner

The reconciliation layer. Catches "Josh asked for X 3 weeks ago, never happened" before it festers.

## Trigger phrases

- "Run the audit"
- "What did I ask for that didn't happen?"
- `/audit`
- Auto: every 14 days on Saturday 09:00 via launchd

## Process

### Phase 1 — Extract asks from session DB

Query `~/.local/share/opencode/opencode.db` for user messages in the last 14 days. Pattern-match for explicit asks:

- "Can you also..."
- "Don't forget to..."
- "Next time, ..."
- "Please add..."
- "Make sure..."
- "We should..."

### Phase 2 — Reconcile against state

For each ask, check whether it landed:

- File created? → check filesystem
- Tracker item created? → check tracker.json
- Skill modified? → check git log on .config/opencode/skills/
- Config change? → check opencode.json

### Phase 3 — Triage

| Status | Meaning | Action |
|---|---|---|
| ✅ Landed | Ask completed, evidence in state | Move on |
| ⚠️ Partial | Some evidence but incomplete | Surface to Josh, ask if more wanted |
| 🔴 Missed | No evidence, ask appears unaddressed | Surface, propose tracker item |
| ❓ Ambiguous | Can't determine if landed | Ask Josh |

### Phase 4 — Tier 1 / Tier 2 / Tier 3 categorization

**Tier 1** — Idempotent, deterministic, additive, reversible. Auto-apply.
Examples: "add this to AGENTS.md" / "create tracker item for X" / "add this to gitignore"

**Tier 2** — Requires human judgment. Draft for Josh's review.
Examples: "rewrite this skill description" / "merge these two skills"

**Tier 3** — High blast radius / irreversible. Surface for explicit Josh decision.
Examples: "delete this skill" / "make this repo public" / "rotate this credential"

### Phase 5 — Output

Save audit report to `~/.personal/reports/audit-{date}/`:

- `01-asks-extracted.md` — raw extraction
- `02-reconciliation.md` — what landed vs missed
- `03-tier1-applied.md` — what was auto-fixed
- `04-tier2-proposals.md` — drafts for Josh review
- `05-tier3-decisions.md` — items requiring Josh's explicit call
- `06-summary.md` — top-level summary

The summary surfaces in chat:

```markdown
# Audit Summary — YYYY-MM-DD

**Period:** [start] to [end]
**Asks extracted:** [N]
**Status:**
- ✅ Landed: [N]
- ⚠️ Partial: [N]
- 🔴 Missed: [N]
- ❓ Ambiguous: [N]

**Tier 1 auto-applied:** [N] (see 03-tier1-applied.md)
**Tier 2 awaiting your review:** [N] (see 04-tier2-proposals.md)
**Tier 3 needs your decision:** [N] (see 05-tier3-decisions.md)

**Top 3 missed asks (highest impact):**
1. ...
2. ...
3. ...

**Recommended next step:** [specific]
```

## Safety rules

- The runner NEVER executes destructive ops without confirmation.
- Tier 2 and Tier 3 items are drafted, never auto-executed.
- The runner writes backups as `{file}.bak-{date}` before any modification.
- Skipped on weekdays unless `/audit --force`.
- Skipped if previous audit <14 days old (unless --force).

## When to run more often

- Right after a major shift (job change, project pivot, big learning)
- When Josh feels like things are slipping
- Quarterly for portfolio-level review

## Failure modes to watch for

- **Audit produces same drifts every run.** Means Tier 1 auto-fixes aren't sticking, or Josh is dropping the same ball repeatedly. Surface as: "These 3 items have appeared in 3 consecutive audits. Either fix the upstream issue or consciously drop them."
- **Tier 1 catalog grows.** Means more things are getting deferred-and-then-auto-fixed. Could indicate Josh is task-saturated.
