# Overview & Outcomes

# ANVIL Filesystem Sweep — Overview &amp; Outcomes

## What and Why

The ANVIL Filesystem Sweep (MC #99637) was a comprehensive cleanup and canonicalization effort to resolve structural drift in ALAI's Mac Studio orchestration host filesystem. After 4+ months of agent activity without central governance, the system accumulated 15 split-brain directory names (same name under both `~/system/` and `~/ALAI/`), 158 daemon references (30 broken), and no canonical path registry. This sweep established tree ownership rules, resolved all split-brain conflicts, reclaimed storage, and documented the canonical map for future agent compliance.

## Headline Numbers

- **62,838 paths inventoried** across `/Users/makinja/`
- **158 daemons audited** via LaunchAgent plist examination
- **3 PHANTOM daemons unloaded** (KeepAlive=true boot failures, BLOCKER resolved)
- **~9GB storage reclaimed** after archiving deprecated tools and split-brain duplicates
- **30 valid tar archives** created in `~/backups/anvil-fs-sweep-2026-05-07/` (36 on-disk including W1C additions)
- **6 split-brain pairs resolved** via merge/rename/migrate strategy
- **9 ALAI-canonical dirs established** (clients, infrastructure, legal, products, sales, etc.)
- **4 surprise-canonical paths protected** (live-referenced by tools: aisystem, system/security, system/schemas, system/hooks)
- **5 CEO-excluded items deferred** (drafts, company-prompts, exo-env, hook-native, minions.db)

## Phase Chain

<table id="bkmrk-phasemc-iddescriptio"><thead><tr><th>Phase</th><th>MC ID</th><th>Description</th><th>Status</th></tr></thead><tbody><tr><td>Phase 1.1</td><td>[\#99644](#99644)</td><td>Inventory + heatmap</td><td>ready\_for\_review</td></tr><tr><td>Phase 1.2</td><td>[\#99639](#99639)</td><td>Daemon-path graph</td><td>ready\_for\_review</td></tr><tr><td>Phase 1.3</td><td>[\#99642](#99642)</td><td>Doc-disk reference audit</td><td>ready\_for\_review</td></tr><tr><td>Phase 1.4</td><td>[\#99646](#99646)</td><td>Canonical map synthesis</td><td>ready\_for\_review</td></tr><tr><td>Phase 1.5</td><td>[\#99648](#99648)</td><td>Verification</td><td>ready\_for\_review</td></tr><tr><td>Phase 1.6</td><td>[\#99662](#99662)</td><td>Content-aware re-classification</td><td>ready\_for\_review</td></tr><tr><td>Phase 2</td><td>[\#99655](#99655)</td><td>Gap report (10 CEO decisions)</td><td>ready\_for\_review</td></tr><tr><td>Phase 3 W1-A</td><td>[\#99669](#99669)</td><td>BLOCKER: unload 3 PHANTOM daemons</td><td>ready\_for\_review</td></tr><tr><td>Phase 3 W1-B</td><td>[\#99672](#99672)</td><td>Bulk safe cleanup</td><td>ready\_for\_review</td></tr><tr><td>Phase 3 W1-C</td><td>[\#99695](#99695)</td><td>Split-brain merges (6 pairs)</td><td>ready\_for\_review</td></tr><tr><td>Phase 3 W1-C+</td><td>[\#99699](#99699)</td><td>Final 3 split-brain pairs</td><td>ready\_for\_review</td></tr><tr><td>Phase 3 W2</td><td>[\#99701](#99701)</td><td>Documentation (registry, ADR, drift spec)</td><td>ready\_for\_review</td></tr><tr><td>Phase 3 W3-A</td><td>[\#99703](#99703)</td><td>E2E validation (Proveo)</td><td>ready\_for\_review</td></tr><tr><td>Phase 3 W3-B</td><td>TBD</td><td>BookStack publish (this page)</td><td>in\_progress</td></tr></tbody></table>

## Status

**COMPLETE** — Proveo E2E validation returned **PARTIAL (9/10 PASS)**. All critical probes passed:

- Inventory diff: PASS (all intended deletions done, ALAI/clients=13 subdirs, new ALAI subdirs present)
- Daemon health: PASS (53 daemons, 3 phantoms absent, running daemons healthy)
- Boot health: PASS (exit 0, no FATAL errors)
- Discover.js verify: PASS (all 9 checks OK)
- Canonical paths preservation: PASS (4 surprise-canonical + 5 CEO-excluded all intact)
- Active reference integrity: PASS (security refs, mehanik-marker, hooks, DEPLOY-MAP valid)
- ALAI/CLAUDE.md: PASS (0 broken refs, pointer present)
- Wave 2 documentation: PASS (3 files with exact line counts)
- Archive integrity: **PARTIAL** (36 tars vs 30 expected, explainable via W1C additions; no corruption)
- MC chain integrity: PASS (all 16 MCs verified)

## Open Items

- **Organizational audit** (semantic-fit review): Deferred to separate workstream. Examples: `~/ALAI/web-worktrees/ucenje-v2` (personal scholarly project under commercial brand tree?), `~/projects/` vs `~/companies/` placement criteria.
- **5 CEO-excluded paths**: Pending separate org decision (drafts, company-prompts, exo-env, hook-native, minions.db archived but not deleted).
- **3 technical debt MCs**: #99665 (mlx-router fix), #99666 (db-ttl-sweep), #99667 (distillation-scorer) — open, not yet actioned.

## Related Pages

- [Canonical Registry](#page2) — Authoritative path ownership table
- [ADR-022](#page3) — Architectural decision record
- [Drift Detection Design](#page4) — Future build spec
- [Validation Evidence](#page5) — Proveo 10-probe E2E report