Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gemini/bin/lior-loop-tick.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ZERO DEPENDENCE ON HUMANS. Do everything autonomously.
7. Update your status in ~/.local/share/zeta-broadcasts/lior.md.
8. Perform global lock cleanup: clear stale git index locks, broken plugin directories (like Codex prompt-limit SIGSEGV loops), or orphan agent lockfiles to ensure network health.
9. PRESERVATION DISCIPLINE: For any recently merged PRs, automatically run \`bun run tools/pr-preservation/archive-pr.ts <PR_NUMBER>\`. Commit and push the resulting markdown file to \`docs/pr-discussions/\` to permanently capture alignment drift and review friction into the native repository memory.
10. BACKLOG DECOMPOSITION: If you pick up a backlog item and it is a blob that needs decomposition, peel one layer off to work on and put the rest back on the backlog. Decomposition does not have to be complete in one go—it will get iteratively decomposed on future ticks.
Comment thread
AceHack marked this conversation as resolved.
Do not guess. Do not overlap. The fire is watched.

EXECUTE THESE STEPS IMMEDIATELY USING YOUR TOOLS. Do not ask "How can I help you?". DO THE REAL WORK NOW.`;
Expand Down
23 changes: 23 additions & 0 deletions .gemini/launchd/com.zeta.missed-substrate-detector.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key><string>com.zeta.missed-substrate-detector</string>
<!-- Maintainer-only artifact: paths are machine-specific (/Users/acehack, /opt/homebrew).
Run tools/setup/install-launchd-services.sh to regenerate with local paths. -->
<key>ProgramArguments</key><array>
<string>/opt/homebrew/bin/bun</string>
<string>/Users/acehack/Documents/src/repos/Zeta/tools/bg/missed-substrate-detector.ts</string>
<string>--once</string>
</array>
Comment thread
AceHack marked this conversation as resolved.
<key>StartInterval</key><integer>300</integer>
<key>RunAtLoad</key><true/>
<key>StandardOutPath</key><string>/Users/acehack/Library/Logs/zeta-missed-substrate-detector/stdout.log</string>
<key>StandardErrorPath</key><string>/Users/acehack/Library/Logs/zeta-missed-substrate-detector/stderr.log</string>
<key>EnvironmentVariables</key><dict>
<key>HOME</key><string>/Users/acehack</string>
<key>PATH</key><string>/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
</dict>
<key>WorkingDirectory</key><string>/Users/acehack/Documents/src/repos/Zeta</string>
Comment thread
AceHack marked this conversation as resolved.
</dict>
</plist>
8 changes: 8 additions & 0 deletions docs/AUTONOMOUS-LOOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,14 @@ declared) against `CronList` and re-arms missing rows.

## Related artifacts

- **Background Services Architecture** (B-0440, B-0441, B-0442) — the
proactive multi-agent loop is augmented by macOS `launchd` background
daemons that ensure failure modes and deadlocks are broken without human
intervention. See `tools/bg/`. Currently launchd-registered:
`missed-substrate-detector.ts` (`.gemini/launchd/com.zeta.missed-substrate-detector.plist`).
`standing-by-detector.ts` is not yet wired to launchd (slice 5+ pending).
Note: plist files contain machine-specific paths and are maintainer-only artifacts.

- **`docs/hygiene-history/loop-tick-history.md`** — the
factory's durable tick fire-log; appended to every tick
at step 5 per the round-44 human-maintainer directive.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ a branch, the service catches it BEFORE branch deletion.
## Acceptance criteria

- [x] Background service `tools/bg/missed-substrate-detector.ts` exists (slices 1+2+4 — earlier)
- [ ] Runs under existing launchd / cron infrastructure (slice 6 — pending)
- [x] Runs under existing launchd / cron infrastructure (slice 6 — landed 2026-05-13)
- [x] On PR merge events (poll or webhook), checks if branch HEAD ==
merge commit content (slice 3 — landed 2026-05-13 via `gh pr view --json headRefOid`
+ `git log <headRefOid>..origin/<branch>`)
Expand All @@ -67,7 +67,7 @@ a branch, the service catches it BEFORE branch deletion.
- [ ] Optionally auto-opens recovery PR with the missing commits
(gated by configuration) (slice 5 — pending; subscriber-agent layer)
- [x] Tests cover the detection heuristics (DST-replayable) — 24 tests cover slice 4 wiring + slice 3 detector (drift / no-drift / branch-deleted / branch-rebased / gh-error / git-error) + urgency classification
- [ ] Documented in `docs/AUTONOMOUS-LOOP.md` (slice 6 — pending)
- [x] Documented in `docs/AUTONOMOUS-LOOP.md` (slice 6 — landed 2026-05-13)

## Slice 3 implementation summary (2026-05-13)

Expand Down
Loading