Skip to content

Heartbeat

Part 2 · The Heartbeat

Four ways a loop decides when to beat — from a timer you can watch tick, to the world itself reaching over and pulling the trigger. Read this part as a…

The four heartbeats a loop can start with — in-session, conditional, scheduled, event-driven — ranging from you-hold-it to it-runs-without-you; each firing is called a beat

Four ways a loop decides when to beat — from a timer you can watch tick, to the world itself reaching over and pulling the trigger. Read this part as a menu, not a ladder: real fleets mix all four.

The steps

StepPageHeartbeatOne-line takeaway
04In-Session Loopsinterval, inside a sessiontraining wheels: watchable, interruptible, dies with the session
05Conditional — Run Until Donethe goal itselfeverything hangs on three stops: success, limit, no-progress
06Unattended Schedulescron, nobody watchingfour parts (prompt·repos·connectors·trigger); guardrails first
07Event-Driventhe worlddropped-not-queued; always pair with a reconciliation sweep
Diagram

The thread through all four

Two rules keep coming back on every page, because they hold for every heartbeat there is:

  • Missed beats are dropped, not queued — so design beats that act on now, not on a backlog of moments that have already passed.
  • The heartbeat only decides when. What a beat may touch (body), what it remembers (spine), and when it all ends (stops) are the other four organs — Part 3 picks up the body.

Check your understanding

Take the Part 2 quiz · drill the flashcards

This part belongs to track T2 · Practitioner.

Sources: Part 2 draws on Panaversity's Loop Engineering: A Crash Course (S1), Spec-Driven Development (S3), Scheduled Tasks: The Loop Skill & Cron Tools (S4), and the cobusgreyling/loop-engineering reference repo (S7, MIT). Full attribution: resources/sources.md.