Add autopilot-aware pre-commit warnings + post-commit driver reminder
CI / build (push) Has been cancelled

- Pre-commit hook: warns when autopilot is enabled and non-terminal tasks exist
- Post-commit hook: after commit, prints non-terminal task summary if autopilot on
- Post-commit exits 0 always (informational only, never blocks)
- Both hooks read .agent.md to detect Autopilot: Enabled
This commit is contained in:
2026-06-16 12:44:21 -04:00
parent 02c7a4649b
commit 1d36c0e4ad
20 changed files with 191 additions and 1 deletions
@@ -0,0 +1,18 @@
# SPEC: Upgrade Pre-Commit Hook with Autopilot Awareness
## Problem
Agents create throwaway tasks (skip to implement, commit, abandon) to bypass the pre-commit hook.
The hook checks for an edit-phase task but doesn't detect hollow/stale tasks or warn about
hanging tasks when autopilot is enabled.
## Requirements
1. After a successful pre-commit check, read `.agent.md` to detect `Autopilot: Enabled`
2. If autopilot is enabled, scan all tasks for non-terminal (stuck) tasks
3. If hanging tasks exist, emit a clear warning in the hook output
4. Do NOT block the commit — only warn. Blocking would prevent legitimate fixes.
5. Detect hollow tasks: tasks in implement/doc_review phase with no IMPLEMENTATION.md artifact
## Acceptance Criteria
- Pre-commit hook warns when autopilot is on and non-terminal tasks exist
- Pre-commit hook warns when the edit task is hollow (no real implementation)
- Existing blocking behavior (no edit task = DENIED) is preserved unchanged