Fix 11 automation gaps: dead-end phases, autopilot runtime, guard plugin, status.py bugs, Category 3 audit
CI / build (push) Has been cancelled
CI / build (push) Has been cancelled
- Fix decomposition:approved and human_intervention dead-end phases - Add scripts/autopilot.py: real drive_all() implementation - Fix guard plugin: throw Error instead of injecting user messages - Fix status.py: double continue, _require_state, --list-states - Add Category 3 (git-based modification) audit - Add Category 5 (stuck-task detection) audit - All 206 tests pass
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
# Implement Autopilot Runtime
|
||||
|
||||
## Problem
|
||||
- `drive_all()` only exists as pseudocode in orchestrate.md. No Python implementation.
|
||||
- No idle loop when all tasks complete.
|
||||
- No stuck-task detection (crash recovery, phase-stuck detection).
|
||||
|
||||
## Fix
|
||||
Create `scripts/autopilot.py` with:
|
||||
1. `scan_all_tasks()` — reads all .state files in tasks/
|
||||
2. `is_terminal()` — checks if phase is complete or human_intervention
|
||||
3. `needs_user_input()` — checks if phase ends with :awaiting_approval or task has VERDICT.md with FAIL/NEEDS_REVIEW
|
||||
4. `drive_task()` — loads and executes the prompt for the current phase
|
||||
5. `drive_all()` — main loop that processes unblocked non-terminal tasks
|
||||
6. Idle behavior: when all tasks terminal, prompt user to create new tasks
|
||||
7. Stuck detection: tasks in same non-terminal phase > 60 min are flagged
|
||||
|
||||
## Verification
|
||||
- `python scripts/autopilot.py --project /path/to/project` runs the autopilot
|
||||
- Handles empty queue gracefully
|
||||
- Detects and reports stuck tasks
|
||||
Reference in New Issue
Block a user