← back to Checkup

references/actions.md

90 lines

# checkup — action matrix & procedures

The audit only *reports*. This file tells Claude how to turn each finding into a
change, and — critically — which changes Claude may apply itself (AUTO) versus
which must be handed to Steve or routed through a sanctioned skill (GATED).

## The gate rule (Steve-specific, non-negotiable)

`settings.json` / `settings.local.json` cannot be edited by Claude directly —
Steve's classifier blocks autonomous writes to them. Anything that changes those
files (turn off a hook, enable auto mode, add a permission) is **GATED**:
- Prefer routing through the **`update-config`** skill (the harness's sanctioned
  path for settings changes) or **`/fewer-permission-prompts`** (permissions).
- If neither applies, surface the exact change as a copy-paste block for Steve.
Never hand-edit the settings files.

Likewise GATED: `sudo pmset` (surface the paste), deleting/archiving a skill,
purging git history, the CC version update, and enabling auto mode.

## Per-finding playbook

### 1. Unused skills / MCPs / plugins  → save context
- **Skills.** The audit lists least-recently-modified + (with `--deep`)
  never-seen-in-logs candidates. mtime is a *weak* signal — Steve has 280+ skills
  and rarely-fired ones (restore, canaries) are still wanted. **AUTO w/ confirm:**
  after Steve okays a specific list, "archive" by moving the dir to
  `~/.claude/skills-archive/<name>` (reversible) — do NOT `rm`. Never archive on
  mtime alone.
- **MCPs.** Removing an MCP server edits `~/.claude.json` (not settings.json, so
  not classifier-blocked) but it's still outward-affecting — **GATED: confirm each
  removal with Steve**, then remove the block from `.claude.json` (write a `.bak`
  first, mirroring the secrets-skill pattern).

### 2. Dedup local vs checked-in CLAUDE.md
- **AUTO w/ confirm.** If `CLAUDE.local.md` repeats lines already in the committed
  `CLAUDE.md`, delete the duplicated lines from the *local* file only. Show the
  diff, get a yes, apply, `git add -A && git commit` in that repo.

### 3. Break up a bloated root CLAUDE.md
- Global `~/.claude/CLAUDE.md` (~18KB) and any project CLAUDE.md over ~12KB.
- **AUTO w/ confirm.** Extract cohesive sections into either nested
  `<subdir>/CLAUDE.md` files (loaded only when working in that subtree) or into
  skills, leaving a one-line pointer behind. Preserve every rule verbatim — this
  is a *move*, never a *summarize*. Commit after.
- **MEMORY.md is the same class of problem** and the highest-value target here:
  the harness warns when `MEMORY.md` exceeds ~24KB and only loads part of it.
  The `-Users-macstudio3` index is ~45KB / 134 lines with lines up to ~695 chars.
  Fix = trim each index line to a one-line hook (<200 chars) and move the detail
  into the linked topic file (`<slug>.md`). Never delete a memory's information —
  relocate it. Legacy `-Users-stevestudio2*` MEMORY.md files (one is 265KB) belong
  to an old home dir and are almost certainly dead context — flag them but confirm
  before touching; they may not even load for the current `-Users-macstudio3` home.

### 4. Turn off slow hooks
- The audit lists hook commands. Judge "slow": SessionStart hooks that run
  network calls / big scans / loops. **GATED** (settings.json) — route via
  `update-config` or surface the paste. Note `~/.claude/hooks-lite` already exists
  as the streamline off-switch for slow SessionStart hooks; prefer toggling that
  over editing individual hooks.

### 5. Update Claude Code
- **GATED.** Surface the command for Steve to run himself (a live update can
  interrupt running sessions): `claude update` (or `npm i -g @anthropic-ai/claude-code@latest`).
  Report current→latest from the audit so Steve decides.

### 6. Enable auto mode by default
- **GATED** (settings.json + a real behavior change). Surface it; do not flip it.
  Auto mode routes permission prompts to a classifier — that's Steve's call, and
  many of his rules assume gated actions still stop. Recommend, never enable.

### 7. Pre-approve frequently-DENIED read-only commands
- **Delegate.** Run the existing **`/fewer-permission-prompts`** skill — it scans
  session history for safe-but-repeatedly-prompted bash/MCP commands and proposes
  an allowlist. Don't reimplement that scan here.

## Steve goodies (the "and a few other goodies" bucket)
- **keepawake guard.** Verify `com.steve.keepawake` is alive + screensaver
  idleTime 0 (a standing session rule). Repairs are in the global CLAUDE.md; the
  `sudo pmset` repair is a Steve-paste.
- **launchd health.** Report `com.steve.*` jobs whose last exit code is non-zero.
  Exit `-15`/`-9` are just SIGTERM/SIGKILL (a restart/reboot) — usually benign, not
  a crash. A positive exit (e.g. `1`) is a real failure worth surfacing. Don't
  auto-restart anything; report and let the relevant owner/agent handle it.

## Output shape Claude should produce
A grouped report: **AUTO (with confirm)** list, **GATED (Steve paste / skill)**
list, **CLEAN** list. Then ONE confirmation prompt. Apply only the AUTO items
Steve okays; commit each in its repo; hand back the GATED paste blocks. Always
end with a `$0 (local)` cost line — the audit and all fixes are free/local.