# Compound Nightly

> Nightly maintenance for the compound loop — review each project STATE.md, promote only verified lessons to durable rules, keep MEMORY.md under budget, and log a short digest. Conservative and local only — never edits source, never pushes, never messages anyone. Schedule it to run nightly (see Scheduling).

- Skill: `sethdford/compound-nightly` (Agent Skill)
- Install (CLI): `npx skillmds@latest add sethdford/compound-nightly`
- Raw SKILL.md: https://api.skillmd.com/api/skills/sethdford/compound-nightly/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Finance & Business
- Author: sethdford (https://skillmd.com/u/sethdford)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/sethdford/compound-nightly

---


# Compound nightly distill

Steady, unattended compounding. This is the maintenance half of the loop: it does not write
code — it promotes already-verified outcomes into durable rules and keeps memory healthy.

## Procedure

1. **Find state files:**
   `find . ~ -maxdepth 3 -name STATE.md -not -path '*/node_modules/*' -not -path '*/.git/*'`
   (scope to your project roots as you prefer).
2. **Promote verified lessons only.** For each `STATE.md` with real content, review
   **Open failures**. Promote one to a generalized rule under **Verified facts** /
   **General rules** *only* when there's concrete evidence the fix holds (tests passing, a
   merged commit). Never invent a lesson. If a fix looks done but you can't confirm it, leave
   it and note it under **Waiting for human**. Update **Last session** with the date.
3. **Memory hygiene.** If `MEMORY.md` exceeds ~200 lines / 25 KB, consolidate it: merge
   duplicate rules, drop stale entries, and push detail into per-topic files, so the index
   still auto-loads into subagents. (If a memory-consolidation skill is available in your
   setup, you may use it instead.)
4. **Digest.** Append one dated line of what changed to a log (e.g.
   `~/.claude/logs/compound-nightly.md`). If nothing to do, log "idle — no history yet".

## Guardrails

- LOCAL ONLY: no source edits, no `git push`, no external messages.
- Conservative: promote on evidence, not optimism. Churn is failure, not progress.

## Scheduling

Run nightly via Claude Code scheduled tasks or `/schedule`. Example cron (local time):
`41 3 * * *`. Keep the prompt self-contained — scheduled runs start fresh with no memory of
prior sessions, so point them at this skill explicitly.

