---
id: T-063
name: Add PreToolUse hook for task-first enforcement
description: >
  T-061 finding: No enforcement exists before Write/Edit/Bash tools. Create check-active-task.sh
  that reads .context/working/focus.yaml, verifies current_task is set, and blocks
  tool execution if no active task. Wire it as a PreToolUse hook in .claude/settings.json
  with matcher for Write|Edit. This makes the structural enforcement claim in P-002
  actually true.
status: work-completed
workflow_type: build
owner: agent
created: 2026-02-15T08:35:10Z
last_update: '2026-06-11T22:23:36Z'
date_finished: 2026-02-15T08:42:05Z
bvp_scores_proposed:
  - ts: '2026-06-11T22:23:36Z'
    estimator: bvp-estimator-v1-heuristic
    scores:
      D1: 4
      D2: 0
      D3: 0
      D4: 0
      F-RECALL: 0
      F-ORCH: 0
      F3: 0
      F1: 0
      F2: 0
    rationale: D1=4 (body:structural-gate); D2=0 (no-signal); D3=0 (no-signal); 
      D4=0 (no-signal); F-RECALL=0 (no-signal); F-ORCH=0 (no-signal); F3=0 
      (no-signal); F1=0 (no-signal); F2=0 (no-signal)
    rubric_sha: e4a00f38e801
---

# T-063: Add PreToolUse hook for task-first enforcement

## Context

[Link to design docs, specs, or predecessor tasks]

## Updates

### 2026-02-15T08:35:10Z — task-created [task-create-agent]
- **Action:** Created task via task-create agent
- **Output:** /opt/999-Agentic-Engineering-Framework/.tasks/active/T-063-add-pretooluse-hook-for-task-first-enfor.md
- **Context:** Initial task creation

### 2026-02-15T08:38:33Z — status-update [task-update-agent]
- **Change:** status: captured → started-work
- **Change:** owner: human → agent

### 2026-02-15T08:42:05Z — status-update [task-update-agent]
- **Change:** status: started-work → work-completed

## Reviewer Verdict (v1.5)

- **Scan ID:** R-f944bdd8
- **Timestamp:** 2026-06-02T14:54:20Z
- **Catalogue:** v1.3-seed
- **Overall:** PASS
- **Needs Human:** no
- **Findings:** none
