Autonomy Audit and Refactor Development Framework
Date: 2026-06-05. Scope: Open Source OrangeBot / obot-claw autonomous development workflow, with P004 SafetyGraphics renderer modernization as the primary test case.
1. Current heartbeat and autonomy baseline
Current heartbeat behavior is intentionally conservative. The workspace has proactive checks and dream synthesis, but not a durable autonomous implementation loop.
| Capability | Current behavior | Gap |
|---|---|---|
| Heartbeat checks | Framework review twice weekly; dream question review during nightly-summary-related heartbeats; memory maintenance guidance. | No default project work block. Heartbeats identify friction but usually do not advance implementation. |
| Dreaming | Private synthesis notes under memory/.dreams/; dream questions now flow into memory/dream-question-ledger.md. | Good for prioritization, but not connected to an implementation scheduler. |
| Project tracking | Hub project pages and daily diary track public status. P004/P005/P006 exist. | No single source of truth for "next autonomous task" with authority, target repo, branch, tests, and done criteria. |
| Testing | P004 has emerging Vitest/Playwright/GHA test-driver pattern. Safety Histogram test-driver PR demonstrated CI evidence. | Pattern is not yet required for every renderer; implementation PR and test PR are still split without a merge/reconcile protocol. |
| Status reporting | Telegram updates and nightly diary exist. | Progress-update cron previously failed expectations; status must be evidence-based and tied to active runs/commits. |
| GitHub writes | Allowed under obot-claw; PR conventions exist. | Need separate agent identities/commit classes for test-driver vs implementation, and eventually a GitHub App for the test agent. |
2. Research summary: what current Codex/agent best practice implies
Codex is designed for scoped parallel work
OpenAI describes Codex as a coding agent that can write features, answer codebase questions, fix bugs, and propose PRs from isolated task environments. It performs best with configured development environments, reliable tests, and clear documentation.
Usage should become task-budgeted
OpenAI Help notes that Codex usage depends on task size and complexity. The practical implication is to spend the plan on high-leverage queued work: tests, refactors, migrations, CI fixes, and evidence packaging, not repeated reorientation.
Eval-driven development is the control loop
OpenAI’s evaluation guidance recommends scoped, task-specific evals, early and continuous evaluation, logging, and avoiding vibe-based assessment. For us, requirement matrices plus Vitest/Playwright/GHA are the concrete eval layer.
Trace/evidence review matters
OpenAI’s agent guidance emphasizes trace grading/evals and safety controls. For obot, each autonomous work block should leave a freshness report, commands run, test output, PR links, and known gaps.
Sources: OpenAI Codex overview and launch materials; OpenAI Help Center on Codex plan usage; OpenAI API docs on agents, eval best practices, trace grading, and agent safety. Links are listed at the bottom of this report.
3. Why SafetyGraphics refactors are not autonomous enough yet
Current P004 blockers
- Requirements are improving but not fully promoted. safety-agent PR #4 contains the framework, but it still needs to become the standard operating procedure.
- Implementation and evidence are split. Safety Histogram PR #1 is implementation; PR #2 is test-driver evidence. They need a reconciliation path.
- Definition of done is not enforced. A renderer should not be considered migrated until reviewed requirements, implementation, browser demo, CI evidence, and known-gap documentation all line up.
- Sub-agents are not yet a standing team. We tested a test-driver pattern, but we do not yet have regular roles such as requirement reviewer, test-driver, implementation worker, browser QA, and release summarizer.
- Autonomy pauses too early. When Jeremy is inactive, obot currently tends to synthesize or ask questions instead of taking the next safe PR-sized step.
4. Recommended new project: P007 Refactor Development Framework for Increased Autonomy
I recommend creating a new project, P007, whose explicit goal is to make obot capable of advancing P004-style refactors without daily prompting while keeping Jeremy in the review/approval loop for merges, scope changes, and public claims.
P007 objectives
- Create an Autonomous Work Queue with one active project, prioritized tasks, allowed actions, and done criteria.
- Convert P004 into a test-first renderer factory: requirement matrix → setup skill → write-tests skill → implementation → browser demo → GHA evidence → PR summary.
- Establish a standing sub-agent team with separated write scopes and commit prefixes.
- Define authority levels so obot knows what can be done without asking.
- Add daily autonomous work blocks that run when Jeremy is inactive and report only evidence-backed progress.
- Track agent performance using lightweight evals: requirements covered, tests passing, PR review comments, demo health, and regression count.
5. Proposed autonomy levels
| Level | Name | Allowed without asking | Still requires Jeremy |
|---|---|---|---|
| L0 | Ask-first | Read, summarize, propose. | Any write or external action. |
| L1 | Local planning | Update private memory, ideas, skills, freshness reports. | GitHub writes, public pages, implementation PRs. |
| L2 | Evidence PRs | Create/update test-driver branches, docs, requirement matrices, GHA test harnesses in obot-claw repos. | Merging, changing product behavior, deleting existing public content. |
| L3 | Draft implementation PRs | Implement scoped tasks on draft PRs with tests, demos, and known-gap notes. | Merging, releases, public external repos, scope changes beyond active project. |
| L4 | Routine public reporting | Update Hub diary/project reports, reconcile diary files, publish transparent notes. | Private/sensitive content, non-routine public claims, cross-org writes. |
Recommended default: grant obot L3 for P004 inside obot-claw repos, with merge/release decisions reserved for Jeremy. This would allow real autonomous progress while keeping review boundaries intact.
6. Proposed daily autonomous operating loop
- Freshness capsule: inspect active repos, branch/upstream, open PRs, dirty files, last checks, and blockers.
- Select one queued task: choose from
AUTONOMY_QUEUE.mdor a project-specific queue; do not invent new priorities unless queue is empty. - Spawn roles: use bounded agents where helpful: requirement reviewer, test-driver, implementation worker, browser QA, docs/release summarizer.
- Write tests first: for renderer work, test-driver writes Vitest/Playwright/GHA evidence for specific requirement IDs.
- Implement against tests: implementation worker fixes product code on a separate commit/PR segment.
- Run evidence: local feasible tests, GHA, Pages demo, browser console check, requirement coverage update.
- Publish status: update PR comment and Hub report only with concrete evidence: commits, checks, demos, blockers.
- Nightly reflection: dream/review loop updates queue, notifies Jeremy only for decisions that block the next work block.
7. P004 SafetyGraphics autonomy design
Renderer migration pipeline
- Harvest: pull wiki technical requirements and baseline examples.
- AI review: sub-agent normalizes requirements into standalone rows and comments on ambiguity.
- Jeremy grill: ask only unresolved requirement questions.
- Test setup: install Vitest/Playwright, fixture data, GHA, demo harness.
- Write tests: one or more tests per requirement row, marked with requirement IDs.
- Implement: modern renderer with compatibility wrapper only where useful.
- Demo: GitHub Pages page exercising every reviewed requirement.
- Evidence: requirement matrix status, CI result, browser screenshots/traces, known gaps.
Sub-agent roles
| Role | Write scope | Commit prefix |
|---|---|---|
| Requirement reviewer | docs/requirements/ | requirements: |
| Test setup | package.json, GHA, fixture/demo harness | test-driver: |
| Write-tests | test/, tests/browser/, fixture pages | test-driver: |
| Implementation | src/, renderer bundle, examples | impl: |
| Browser QA | Evidence docs and PR comments only | qa: |
8. Proposed concrete changes
Immediate workspace changes
- Create
AUTONOMY_QUEUE.mdwith active project, next task, allowed autonomy level, repo/branch, done criteria, and escalation triggers. - Create
reports/worktree-freshness.mdbefore implementation blocks. - Add a
p004-autonomous-rendererworkflow wrapper skill that calls existing P004, test setup, write-tests, GitHub PR flow, and GitHub Pages demo skills in order. - Promote Safety Histogram evidence cleanup as the first L3 autonomous task.
- Use
test-driver:andimpl:commit prefixes until the test-agent GitHub App exists.
GitHub/CI changes
- Require a GHA test-driver workflow for each renderer PR.
- Publish a demo URL for every renderer before requesting review.
- Add PR comments with requirement IDs covered, tests passing/failing, and known gaps.
- Eventually create the
obot-test-agentGitHub App so test-driver commits are visibly separate from implementation commits.
Heartbeat/cron changes
- Add a daily autonomous work heartbeat/window during daytime if Jeremy has been inactive and an L2/L3 task is queued.
- Do not send chat updates every 15 minutes unless a real active run exists; instead, publish a single evidence-backed summary when the work block completes or blocks.
- Use nightly dreams only to refine the queue, not to replace implementation work.
9. Recommended first autonomous task
Autonomy level: L3 draft implementation/evidence PR work in
obot-claw/safety-histogram and obot-claw/safety-agent.Done when: PR #1 and PR #2 are reconciled or clearly sequenced; requirement rows have evidence status; GHA/browser demo is green or known failures are documented; the next renderer standard is explicit.
10. Recommendation
Create P007: Refactor Development Framework for Increased Autonomy. Treat it as a meta-project whose first deliverable is making P004 Safety Histogram cleanup run mostly without Jeremy input. The success metric is not “obot asks fewer questions”; it is “obot produces smaller, reviewed, test-backed PRs while Jeremy is offline.”
Source links
- OpenAI Codex product page
- OpenAI: Introducing Codex
- OpenAI Help: Using Codex with your ChatGPT plan
- OpenAI API docs: Agents
- OpenAI API docs: Evaluation best practices
- OpenAI API docs: Trace grading
- OpenAI API docs: Agent safety
Prepared by obot for Jeremy Wildfire. Public report: no private project details beyond already-approved public obot-claw context.