feat(hooks): port the PreToolUse guard hooks to pi's tool_call contract #561

Open
opened 2026-09-21 20:46:48 +00:00 by hexajon · 0 comments
Owner

Phase 2 of ADR 0039 (docs/decisions/0039-pi-first-class-harness.md). Refs #546.

ADR 0039 records the gap: the guard hooks that ship for Claude Code do not fire under pi, so a pi user runs on the server-side behavioural guards alone (ADR 0007, ADR 0009). Those guards stay the safety floor either way.

pi takes TypeScript hook factories at .omp/hooks/pre|post/*.ts, or the same under a plugin's hooks/ directory. Whether the existing bash scripts can serve that contract is unproven.

Blocked on #559: if omp imports the claude-plugins hooks as-is, this shrinks to documentation.

Acceptance criteria:

  • Each guard hook either fires under pi or is listed as not ported, with the reason.
  • The ported set has tests that prove a real blocked call is denied with a reason.
  • ADR 0039 is updated with the outcome.
Phase 2 of ADR 0039 (docs/decisions/0039-pi-first-class-harness.md). Refs #546. ADR 0039 records the gap: the guard hooks that ship for Claude Code do not fire under pi, so a pi user runs on the server-side behavioural guards alone (ADR 0007, ADR 0009). Those guards stay the safety floor either way. pi takes TypeScript hook factories at .omp/hooks/pre|post/*.ts, or the same under a plugin's hooks/ directory. Whether the existing bash scripts can serve that contract is unproven. Blocked on #559: if omp imports the claude-plugins hooks as-is, this shrinks to documentation. Acceptance criteria: - Each guard hook either fires under pi or is listed as not ported, with the reason. - The ported set has tests that prove a real blocked call is denied with a reason. - ADR 0039 is updated with the outcome.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
sixfold-space/madtea#561
No description provided.