Round 44: docs/AUTONOMOUS-LOOP.md — tick discipline (additive-only)#89
Conversation
Canonical specification of the autonomous-loop tick discipline. CLAUDE.md-level load-bearing: if the tick stops, the factory's self-direction stops — a SEV-1 failure mode designated by the human maintainer in round 44. Covers: - Mechanism: native Claude Code scheduled-tasks (CronCreate + <<autonomous-loop>> sentinel); no plugin dependency. Explicitly distinguished from the Ralph Loop plugin, which is a different mechanism. - Cadence: 1 minute, cron "* * * * *", recurring. The fleet-pile-on trade-off at :00/:30 is documented; the runtime-enforced 1-min floor is why this is as tight as it can go. - Every-tick checklist: pick speculative work → priority ladder (meta-check → known-gap → generative → gap-of-gap) → verify-before-stopping → commit → append tick-history row → CronList → emit visibility signal → stop. - End-over-start discipline: the CronList check is load-bearing AT END of tick, not start, so the [last-check → next-fire] window is minimized. - History-before-CronList ordering: append evidence before the scheduler call so a crash between append and CronList still leaves a tick-fired record. - Session-restart recovery: --resume / --continue for same thread; long-term-rescheduler for fresh sessions. - Empirical Ralph-disable A/B test confirming mechanism attribution. Scrubbed at pre-commit per drain-PR pre-check discipline: maintainer-name prose replaced with role-refs (BP-L284-L290); quoted directives preserved verbatim in the History section; memory/* refs replaced with in-tree pointers to the CLAUDE.md ground rules. Landing this file unblocks the deferred CLAUDE.md and AGENTS.md pointer additions (next sub-batch). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a new canonical documentation spec for the factory’s autonomous-loop “tick discipline” (native Claude Code scheduled tasks), intended to be CLAUDE.md-level load-bearing guidance to keep the loop reliably firing and self-directing work across sessions.
Changes:
- Introduces
docs/AUTONOMOUS-LOOP.mddescribing the tick mechanism, cadence, and end-of-tick CronList re-arming discipline. - Specifies an every-tick checklist (work selection, verification, commit rules, tick-history append, visibility signal, stop).
- Documents recovery paths and historical context for the mechanism choice and cadence changes.
| @@ -0,0 +1,445 @@ | |||
| # Autonomous-Loop Discipline | |||
|
|
|||
| The factory's self-direction runs on a tick. Every ~2 minutes a | |||
There was a problem hiding this comment.
P1: The intro says the tick fires “Every ~2 minutes” (lines 3-6), but the registered cadence below is * * * * * (every minute). Since this doc is the canonical spec, the cadence description should be consistent (update the intro to ~1 minute or remove the specific number).
| The factory's self-direction runs on a tick. Every ~2 minutes a | |
| The factory's self-direction runs on a tick. Every minute a |
| seconds before stopping — the next tick fires within | ||
| ~2 min — so the at-risk window collapses to just the | ||
| stop/restart handoff. An optional start-of-tick | ||
| `CronList` is fine if the cron's state affects early | ||
| decisions, but the **load-bearing check is step 5**. |
There was a problem hiding this comment.
P1: This section still claims the next tick fires within “~2 min” (line 127), which conflicts with the documented 1-minute cron cadence (* * * * *). Update the timing/window explanation to match the 1-minute cadence (or phrase it without a specific minute count).
| seconds before stopping — the next tick fires within | |
| ~2 min — so the at-risk window collapses to just the | |
| stop/restart handoff. An optional start-of-tick | |
| `CronList` is fine if the cron's state affects early | |
| decisions, but the **load-bearing check is step 5**. | |
| seconds before stopping — the next tick fires on the | |
| next 1-minute cron interval — so the at-risk window | |
| collapses to just the stop/restart handoff. An optional | |
| start-of-tick `CronList` is fine if the cron's state | |
| affects early decisions, but the **load-bearing check is | |
| step 5**. |
| *check-don't- | ||
| assume*: defensive polling, re-arm only on miss. Most | ||
| ticks are no-ops on the scheduler (cron is there → do | ||
| nothing); the rare miss is detected and fixed in-tick | ||
| before the silent stop becomes hours of missing activity. |
There was a problem hiding this comment.
P2: The emphasized phrase is split across a hard line break as *check-don't- / assume*, which will render with an unintended space and reads like a broken word. Consider keeping it as *check-don't-assume* (no forced wrap) so the emphasis renders correctly.
| *check-don't- | |
| assume*: defensive polling, re-arm only on miss. Most | |
| ticks are no-ops on the scheduler (cron is there → do | |
| nothing); the rare miss is detected and fixed in-tick | |
| before the silent stop becomes hours of missing activity. | |
| *check-don't-assume*: defensive polling, re-arm only on | |
| miss. Most ticks are no-ops on the scheduler (cron is | |
| there → do nothing); the rare miss is detected and fixed | |
| in-tick before the silent stop becomes hours of missing | |
| activity. |
…pointer (batch 6d of 6) (#90) Additive-only pointers completing the autonomous-loop discipline landing chain begun in PR #89. - CLAUDE.md: new ground-rule bullet "Tick must never stop" in the "Ground rules Claude Code honours here" section, placed between "Never be idle" and "Honor those that came before" since it refines the never-idle discipline with the concrete tick-cadence mechanism (cron + sentinel + six-step end-of-tick checklist). Points at `docs/AUTONOMOUS-LOOP.md` for full spec. - AGENTS.md: new pointer bullet in §Contributor required reading between FOUNDATIONDB-DST.md and category-theory/README.md, framing the doc as required reading for any harness running `/loop` autonomously. Both additions are strict additive edits — no pre-existing text modified, no sibling bullets touched, no new invariants introduced beyond what AUTONOMOUS-LOOP.md already encodes. Pre-check clean: zero Aaron mentions, zero memory/ refs in the new lines.
…+ PR #90) (#91) Post-compaction resumption of the end-of-tick sequence blocked pre-compaction on a Read-first-before-Edit failure. Honors the "tick-commits-on-PR-branch = live-loop class" discipline (row 112) by landing this append on a separate branch off origin/main, not on any open-PR branch. Row narrates: - PR #89 (AUTONOMOUS-LOOP.md) landed on main as a38b70b before this session resumed — post-hoc citation only, no retroactive row written in place. - PR #90 (CLAUDE.md + AGENTS.md pointers) filed this tick as the final batch-6 additive surface; auto-merge armed. Cross-compaction durability validation: the tick-history discipline carried across a context summarisation boundary cleanly — the pre-compaction blocked state was preserved in the session summary, memory, and conversation transcript.
Summary
Lands `docs/AUTONOMOUS-LOOP.md` — canonical specification of the autonomous-loop tick discipline. CLAUDE.md-level load-bearing: if the tick stops, the factory's self-direction stops — a SEV-1 failure mode designated by the human maintainer in round 44.
What the doc covers
Drain discipline
Scrubbed at pre-commit per the pre-check discipline established from PR #83:
Pre-check: `grep -nE 'memory/(user|feedback|project|reference)_|\baaron\b' -i docs/AUTONOMOUS-LOOP.md` → 0 hits.
Unblocks
The speculative branch has additive diffs on `CLAUDE.md` (tick-must-never-stop discipline block) and `AGENTS.md` (pointer to this file) that depend on `docs/AUTONOMOUS-LOOP.md` existing on main. Landing this file unblocks those pointer additions as a follow-up PR.
Test plan
🤖 Generated with Claude Code