--- name: autonomous-mode description: Use when the user wants to run ArcheFlow orchestrations unattended -- overnight sessions, batch processing multiple tasks, or fully autonomous coding. Handles self-organization, progress logging, and safe stopping. --- # Autonomous Mode ArcheFlow orchestrations run fully autonomously through the PDCA cycle's natural quality gates. No unreviewed code reaches main. ## Task Queue Formats **Inline:** ``` 1. "Fix the login bug" (fast) 2. "Add user profile page" (standard) ``` **From file (`.archeflow/queue.md`):** ```markdown - [ ] Fix the login bug | fast - [ ] Add user profile page | standard | depends: fix login - [ ] Security audit | thorough | done: Guardian approves AND load_test.sh passes ``` Tasks with `depends:` wait for the named task to complete. Tasks with `done:` have completion criteria checked in the Act phase. ## Safety Mechanisms ### Automatic Stop Conditions - **3 consecutive failures:** Something systemic is wrong - **Test suite broken:** Halt immediately, revert last merge - **Budget exceeded:** Stop at limit - **Shadow escalation:** Same shadow detected 3+ times across tasks - **Destructive action detected:** Force push, branch deletion, schema drop ### Everything is Reversible - Code lives on worktree branches until explicitly merged - Merges use `--no-ff` (individually revertable) - Failed tasks leave branches intact for inspection ### User Controls - **Cancel:** Kill session, incomplete work stays on branches - **Pause:** Stop after current task, resume later - **Skip:** Move to next task - **Review:** Read `.archeflow/session-log.md` for progress ## Session Log Every session writes to `.archeflow/session-log.md` with per-task entries: - Workflow, status, cycles, reviewer verdicts - Files changed, tests added - Branch and commit info - Duration and timestamps - Session summary at the end ## Budget-Aware Scheduling | Budget Remaining | Action | |-----------------|--------| | > 50% | Run at selected workflow level | | 25-50% | Downgrade thorough to standard, standard to fast | | < 25% | All tasks as fast only | | Exhausted | Stop, log remaining as skipped | ## Auto-Resume On interruption, save state to `.archeflow/state.json` (current task, phase, cycle, completed tasks, worktree branch). On next session start, offer to resume or start fresh.