Skip to content

feat: add pre-task-calibration — mechanical pre-action verification#1422

Open
YuhaoLin2005 wants to merge 8 commits into
anthropics:mainfrom
YuhaoLin2005:feature/pre-task-calibration
Open

feat: add pre-task-calibration — mechanical pre-action verification#1422
YuhaoLin2005 wants to merge 8 commits into
anthropics:mainfrom
YuhaoLin2005:feature/pre-task-calibration

Conversation

@YuhaoLin2005

Copy link
Copy Markdown

What

A PreToolUse hook that enforces three mandatory checks before any Edit/Write operation: concept review, input consistency, and verification planning. Any check fails → exit 2, tool call blocked.

Why

The most expensive mistakes happen before the first keystroke — editing in the wrong direction. Pre-task calibration catches these at the only moment prevention is cheaper than correction.

How It Works

PreToolUse (Edit/Write/Bash) → Q1: Approach validated? → Q2: Inputs consistent? → Q3: Verification planned? → All three pass → allow.

Integration

Module A of a composable quality pipeline. Works standalone. Complements:

Each module is independent — adopt any, all, or none. Together they form defense in depth across the full session lifecycle.

Evidence

50+ session production use. Causal experiment (n=30, p=0.0092): config rules measurably change agent behavior. Mechanical enforcement via exit codes is more reliable than aspirational prompts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant