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
975 B
975 B
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
- After a successful pre-commit check, read
.agent.mdto detectAutopilot: Enabled - If autopilot is enabled, scan all tasks for non-terminal (stuck) tasks
- If hanging tasks exist, emit a clear warning in the hook output
- Do NOT block the commit — only warn. Blocking would prevent legitimate fixes.
- 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