A supervised agent loop: wake a primary assistant session, feed it bounded task-hook passes, and rotate it through sleep handoffs — all on a heartbeat cadence.
heart.tsis the main entrypointheart/holds the reusable supervision runtimeheart-hooks/holds the boundedtlitask hook flowprompts/soul.mdandprompts/sleep.mdstay generic
Each heart beat runs one bounded supervisor pass through five stages:
WAKE → adopt or start the primary assistant session
HOOK → feed it a tli task hook (discover → plan → execute → verify)
SLEEP → rotate the session after long uptime (checkpoint loop state)
The repo maps to five loop building blocks:
| Block | Where | Role |
|---|---|---|
| Automation | heart.ts + heart/main.ts |
Heartbeat cadence; wakes, hooks, sleeps on schedule |
| Skill | heart-hooks/tasks-hook.md |
Reusable instructions; the task hook prompt is the skill |
| Sub-agents | Worker sessions via oly |
Maker/checker split; supervisor delegates, workers execute |
| Connectors | heart/oly.ts |
Acts on the real environment: start sessions, send input, stop |
| Verifier | tli + the hook prompt |
The gate; tasks are only "done" when a real verify gate passes |
The supervisor loop in prompts/soul.md enforces the cycle: discover (read tli state), plan (pick one action), dispatch to a worker (or act if trivial), verify (check a real gate), iterate or stop.
The main session is the brain: it analyzes, triages, dispatches, and verifies. Real work happens in worker sessions (copilot, mimo, codex, gemini, etc.) started via oly start --tag task:<id>. This keeps the main session unblocked to handle heartbeats and new tasks in parallel.
-
Install dependencies.
npm install
-
Make sure
oly,tli, and your assistant command are available onPATH.npm i -g @slaveoftime/oly npm i -g @slaveoftime/tli
-
Edit
heart.tsand set the starter-specific values you want to use:assistantNameprimarySessionTitlesupervisedSessionTaglaunch.commandlaunch.arguments- any timing values under
settings
-
Adjust the generic prompts in:
heart-hooks/tasks-hook.mdheart-hooks/tasks-hook-compact.mdprompts/soul.mdprompts/sleep.md
Check config without touching oly or tli:
npm run check-configRun the type checker:
npm run typecheckRun continuously:
oly start -t gogo-heart --disable-notifications node heart.ts