What the plugin's hooks do

They act only in a project with a real .marvin/ directory. Everywhere else they exit silently.

The hooks

HookRuns onWhat it does
Session startSessionStartFlags version drift and kit-file drift (manifest); adds the kit core when no mod does; adds the update rules under another output style; prints the resource gate's path (Resource gate: bash '…').
User-update gate
update_gate: advise | block | off
UserPromptSubmit, StopChecks Marvin's messages against the update format.
Sub-agent rulesSubagentStartGives every marvin:* persona a constant rules block.
Sub-agent gateSubagentStopSends back, once, a final message missing a reserved line or over 25 lines.
Brief lintPreToolUse on AgentAdvises when a brief lacks its run-report path, FINAL MESSAGE spec, DoD or DATA: line (the data boundary).
Context ladder
context_window_ktokens
PostToolUse, UserPromptSubmitSpeaks at 70 / 80 / 90 % of the window and the 400k / 700k budgets.
Worktree marker and sweep
worktree_sweep: on | check | off
SubagentStop, SessionStartMarks agent worktrees as Marvin's, then removes finished marked ones.
Run-state syncSessionStart, PostToolUse, SubagentStop, StopKeeps ledgers, briefs and run reports in .marvin/runs/<session>/<KEY>/.
Docker sweepSessionStartRemoves throwaway Docker resources whose worktree is gone.
Docker lint
docker_lint: advise | off
PreToolUse on BashAdvises when a Docker command lacks Marvin's labels or a project name.
Resource gate
resource_gate: block | advise | off
PreToolUse on BashHolds a heavy command (tests, a Docker build or stack) run outside the machine-wide queue, and says how to run it through the gate.
Ticket lint
ticket_lint: advise | block | off
PreToolUse on tracker writesChecks a ticket's labels against the registry before it is written.
Persona scope
persona_scope: block | advise | off
PreToolUse on writes, Bash, Read, Grep, GlobKeeps validators and the researcher to their run folder, and every marvin:* sub-agent off agent config and credentials. File tools are checked fully; Bash is best-effort (what it covers).

Each mode key lives in .marvin/PROJECT-INFO.md and is listed on Settings.

What they never do

Turning them off

A hook with a mode key turns off with off. Otherwise disable the whole plugin with /plugin disable marvin, or all hooks with "disableAllHooks": true. Editing hooks/hooks.json in the plugin cache does not survive an update.

Details: hooks/hooks.json, worktrees.md, ticket-filing.md, tidying.md.