19 lines
975 B
Markdown
19 lines
975 B
Markdown
# 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
|