06-reference

nightly learn and ship loop

Fri Apr 03 2026 20:00:00 GMT-0400 (Eastern Daylight Time) ·tweet ·source: https://x.com/ryancarson/status/2016520542723924279 ·by Ryan Carson

Nightly Learn-and-Ship Loop — Make Your Agent Learn While You Sleep

Summary

A two-phase nightly automation loop that separates learning from execution:

  1. 10:30 PM — Compound Review: reviews all Claude Code threads from the last 24 hours, extracts patterns, gotchas, and learnings, then writes them into AGENTS.md / CLAUDE.md instruction files.
  2. 11:00 PM — Auto-Compound: pulls latest code (now containing fresh learnings), picks the #1 priority task from reports, implements it, and opens a PR.

Mental model: the nightly loop is a two-stroke engine. First stroke compresses the day’s experience into fuel (updated instructions). Second stroke burns that fuel to do real work. The order is the insight — if you reverse them, the implementation job runs on yesterday’s knowledge instead of today’s.

Built on three projects: Compound Engineering Plugin (@kieranklaassen), Compound Product (the automation layer), and Ralph (the autonomous agent loop that executes).

Why This Was Bookmarked

This is what we’re building toward with the 4am restart + /check-board. The two-phase pattern — learn first, then execute — is the missing piece. Our current setup restarts and picks up tasks, but doesn’t have a structured “extract learnings from the day” step before execution begins.

Key Ideas

Connections

Direct extension of 06-reference/2026-04-04-compound-engineering — Kieran’s plugin provides the “Compound” step, and this wraps it in a nightly automation. The four-step loop (Plan > Work > Review > Compound) is now running unattended.

This is 06-reference/concepts/compounding-knowledge in its purest automated form. The knowledge base literally improves itself every night.

Connects to our infrastructure at 04-tooling/2026-03-29-infrastructure-decisions — we already have the LaunchAgent + tmux + 4am restart pattern. Adding a “compound review” phase before /check-board would give us the same two-stroke architecture.

See SOUL.md operating model layer 3 (dedicated instances via LaunchAgent + tmux) — this nightly loop is exactly the kind of always-on worker we’re designed for.

The thread review concept relates to 06-reference/2026-04-04-karpathy-llm-wiki-idea-file — both are about extracting durable knowledge from ephemeral interactions. Karpathy’s idea file is manual; this automates the extraction.

See 06-reference/concepts/skills-as-building-blocks — the three-project stack (plugin + automation + agent) is a layered skill architecture. Each piece is reusable independently.

See also 06-reference/2026-04-04-superpowers-plugin-analysis — another plugin-based approach to extending Claude Code. The Compound Engineering Plugin is narrower in scope but deeper in its domain.

Open Questions