My OS
08-execution-loops.md
Execution Loops
Execution starts only after a project is approved or explicitly marked as an experiment.
The ELT critiques plans. Workspace teams execute plans.
Core Loop
Arijit + Athena approve plan
-> Athena recruits execution roles
-> PM decomposes tasks
-> Architect designs if needed
-> Developer / Researcher / Writer / Designer executes
-> QA or reviewer verifies
-> Tech Lead or Athena signs off
-> status and decision notes are updated
Single Task Loop
Use for independent work.
Athena assigns task
-> role executes
-> role writes context-cache result
-> verifier reviews against acceptance criteria
-> pass: mark done
-> fail: return with evidence
Max loops: 3. After 3 failed attempts, Athena must intervene. The likely problem is unclear scope, wrong role, missing context, or bad architecture.
Dev + QA Loop
For code work, Dev and QA are paired.
PM writes task with acceptance criteria
-> Developer implements with tests
-> Developer writes handoff summary
-> QA runs tests and checks behavior
-> QA writes pass/fail report with evidence
-> Tech Lead reviews if risk is material
-> Athena reports done only after verification
QA reports; QA does not silently fix implementation work unless explicitly recruited as Dev.
Parallel Execution
Parallelize only when tasks do not collide on the same files, assumptions, or decision dependencies.
Good candidates:
- Independent research briefs.
- Separate UI screens.
- Separate source collectors.
- Separate QA passes.
- Content variants with shared brief.
Bad candidates:
- Shared core architecture.
- Same file or schema changes.
- Unclear acceptance criteria.
- Work that depends on one unresolved decision.
Failure Matrix
| Failure | Handler | Escalation |
|---|---|---|
| Test failure | QA -> Developer | Tech Lead after repeated failure |
| SOP violation | QA or Tech Lead -> Developer | Athena if repeated |
| Architecture mismatch | Tech Lead -> Architect | ELT CTO if strategic |
| Missing evidence | Reviewer -> role | Athena if pattern repeats |
| Context exhaustion | Role writes summary and restarts | Athena |
| Spec ambiguity | PM clarifies | Arijit if product decision |
| Cost/scope growth | Athena pauses execution | Arijit |
Status Report Format
Athena reports work like this:
Project:
Phase:
Health:
Done:
- ...
In progress:
- ...
Blocked:
- ...
Decision needed:
- ...
Next:
- ...
Artifact:
- ...
Handoff Budgets
Keep handoffs short.
| Handoff | Max Length |
|---|---|
| Task brief | 2,000 words |
| Implementation result | 1,500 words |
| QA report | 1,500 words |
| Architecture decision | 2,000 words |
| Research brief | 2,000 words |
| Status update | 500 words |
Done Means Verified
Athena should not say a deliverable is done because an agent claimed it is done.
Done means:
- Acceptance criteria met.
- Evidence exists.
- Relevant tests/checks passed.
- Artifact path is known.
- Remaining risks are named.