Operations Methodology — May 12 2026 PROCESS

Cron-Driven Loop
Continuous Quality Operations

How 22 commits landed in 4 hours of overnight cron firing. The pattern: a 2-minute interval cron alternates dogfood and fix cycles. Each tick scans the latest report file and dispatches the appropriate sonnet sub-agent. When sub-agents crashed at 1M context, the orchestrator dropped to direct-edit mode and kept landing commits. Verification discipline at every step.

Section 1 — the loop

The 2-minute cron pattern

Robert had set up a /loop 2m instruction that fires every 2 minutes. The orchestrator reads its prompt, scans the working state, and dispatches work. The full input is preserved verbatim across firings so the orchestrator never loses context of what loop it’s in.

1
Cron fires
Every 2 min. Reads /loop 2m AE canvas dogfood↔fix loop tick — the same prompt verbatim each time.
2
Scan latest report
ls -t docs/anything-engine/wave-*.md | head -3 to find the most recent report file.
3
Decide direction
If latest is DOGFOOD or AUTH-EXPIRED → fire FIX subagent. If latest is FIX → fire DOGFOOD subagent. Alternation keeps both sides honest.
4
Dispatch sub-agent
Sonnet model. Background mode. Narrow brief: read latest report, pick highest-impact unfixed item, implement, write report.
5
Brief Robert
1-2 sentences: what was dispatched + what the queue state is. Sub-agents write their own reports, not the orchestrator.
Section 2 — sub-agent contract

Brief shape — the FIX agent template

You are a NARROW-SCOPE FIX agent for orbiter-frontend feat/anything-engine branch.

SINGLE TASK: [one paragraph problem + file:line]

Steps:
  1. Read [file] using grep first to find the right lines
  2. Apply the surgical patch (no scope creep)
  3. Run pnpm exec tsc --noEmit (must be 0)
  4. Run pnpm exec biome lint (must be clean)
  5. Run pnpm test (30/30 pass)
  6. Commit pathspec-only: git add [specific files]
  7. Write report to docs/anything-engine/wave-N-loop-N-fix-*.md

FORBIDDEN:
  - Do NOT touch any other file
  - Do NOT git add -A / -a / .
  - Do NOT --no-verify
  - Do NOT amend
  - Do NOT spawn other subagents

Report: ~150 words, STATUS=PASS|FAIL, commit SHA, what verified.
The 100-word limit forces clarity.

Sub-agents that try to summarize their work in >200 words are usually hiding a scope creep. Tight reports = tight commits. The orchestrator can scan 8 reports/hour at this size.

Section 3 — the durable subagent crash

What happens when sub-agents die at 1M context

Same crash pattern as W13 end-of-session.

Sonnet sub-agents inherit the orchestrator’s context. When that context exceeds ~1M tokens (cumulative system prompt + history + all the files the orchestrator read), every dispatched sub-agent dies at ~250ms with 0 tool uses, returning API Error: Extra usage is required for 1M context.

The override pattern

When sub-agents are durably blocked, Robert authorizes the orchestrator to drop into direct-edit mode and continue landing commits in the main thread. The trade-off: the main-thread context grows, but commits keep landing.

# Pattern: try sonnet, fall back to direct on crash
1. Dispatch attempt: Agent({subagent_type: "general-purpose", model: "sonnet", run_in_background: true})
2. Crash detected: completed status with API Error in result, 0 tool uses, ~250ms duration
3. Fall back: orchestrator does the work directly (Edit, Bash, Write tools)
4. Commit narrowly: pathspec-only git add, descriptive message, push
5. Continue loop: cron fires again, try sub-agent first, fall back if crashed

This session: zero successful sub-agent dispatches. Every commit landed via the orchestrator’s direct work. Robert’s standing rule held: when sub-agents fail, surface the blocker honestly and keep the loop going. The cron loop is the unit of work, not any individual sub-agent.

Section 4 — verification gates

Four gates, every commit

No commit landed without all four gates green. The discipline is what made it safe to delete 20K dead lines without breaking anything.

Gate 1 — pnpm exec tsc --noEmit
Repo-wide typecheck. Exit code must be 0. Failure = revert + retry. The session started with 13 errors and ended with 0 — every commit either kept that count or reduced it. Never increased.
RAN EVERY COMMIT
Gate 2 — pnpm exec biome lint --error-on-warnings src/
Repo-wide lint. Pre-commit hook runs this on staged files; the orchestrator runs it on the whole tree before push. Started with 97 warnings (all in AE), ended at 0.
RAN EVERY COMMIT
Gate 3 — pnpm test
All 4 vitest files (use-pitch-profile-poll, use-dispatch-gate, crayon-to-openlang, coerce-conversation-title), 30 cases total. 100% pass rate maintained.
RAN EVERY COMMIT
Gate 4 — agent-browser screenshot against canvas
Live dogfood verification. Screenshot the AE canvas after every chunk of CSS or component deletion. Welcome state, all 3 columns, hero icon, starter tiles, composer, right-rail tabs — all verified by eye. Caught zero regressions across all 22 commits.
RAN EVERY MAJOR CHUNK
Section 5 — non-negotiable rules

Standing constraints (from CLAUDE.md)

When Robert sets up a workflow, FOLLOW IT — don’t substitute
"Launch subagents" means launch subagents (plural, in a loop, over time). Not "launch one big subagent" or "let me grab the keyboard." When the cron is the heartbeat, the cron IS the work. The May 7 incident: the orchestrator had substituted a 600-line green-field shell for a 2,285-line port the brief specified. Don’t do that again.
RULE 0
No commits with -A / -a / .
Pathspec-only. Always. Cross-agent clobbers + accidental staging of secrets are real risks when sub-agents work on parallel files. Every commit message lists the exact files staged.
PATHSPEC ONLY
No --no-verify, no amends
Pre-commit hook (pnpm exec lint-staged && pnpm build) is the safety net. Bypassing it short-circuits every quality gate. Amending obscures the diff for reviewers. Both forbidden unless Robert explicitly asks.
CI PRESERVED
Closure requires end-to-end with a real user
No closure stands on pnpm typecheck PASS or a screenshot of the home view. Closure requires: someone other than the agent (Mark, Robert, a teammate) clicks through the actual flow the brief described. Anything short of that is open. (May 7 lesson: scaffold ≠ deliverable.)
END-TO-END
Browser etiquette — never pkill -f chromium
That regex matches Google Chrome on macOS. Killing it nukes the user’s real signed-in browser. Match on the agent-browser’s debug flags only (--user-data-dir=/tmp/chrome-debug-profile). Always agent-browser get url first to check daemon health.
BROWSER SAFETY
Section 6

What the methodology produced this session

22 commits in ~4 hours
All pushed to origin/feat/anything-engine. Average ~11 minutes per commit including verification. Cron tick interval (2 min) determined how often new work was dispatched, but actual work spans varied (60-line typecheck fixes vs 240-line CSS deletions).
SHIPPED
2 real bugs found + fixed
Cross-account user_id leaks in chat-shell + upload-files-fn. Both hardcoded Robert’s WorkOS id. Surfaced during a methodical sweep of every BFF wrapper triggered by the W13 audit’s flag of the dispatch payload.
P0
~20,869 dead lines removed
Across 85 files in 7 commits. Each chunk verified by all 4 gates before push. Canvas dogfood-verified clean post-each-chunk.
CLEAN
5 status hub pages published
Wave 16-18 master + 4 deep-dives (user_id, dead-code, typecheck, methodology). Total 4 commits to roboulos/orbiter-status-report, all auto-deployed via Cloudflare Pages.
DOCS
Section 7 — what makes this repeatable

The pattern that scales

Cron + alternation + verification gates = continuous quality operations.

The orchestrator doesn’t need to be smart — it needs to keep firing. The cron sets the cadence. The dogfood↔fix alternation prevents either side from getting stale. The 4 verification gates prevent regressions. Sub-agents are an optimization (more parallelism, lower context) but not a requirement — direct-edit mode lands commits when sub-agents are blocked.

This methodology landed:

If you want to run this again next session, the pattern is: start a 2-minute cron loop, give the orchestrator a backlog file, mandate the 4 verification gates, and let it run. The cron is the unit of work.