Ian Provencher
Read the blog
Operating Stack

The hooks · Claude Code

Five hooks that run the discipline for me.

A hook is a shell command Claude Code fires on an event — a prompt, a tool call, the start or end of a session. Mine turn the operating doctrine and the execution register from “things I have to remember” into automatic behavior, and keep the entire environment reproducible across machines.

One session, start to end — the hooks firing

Register autoload

UserPromptSubmit
What it does
When I enter plan mode, injects the full Fable execution register into the turn — sourced live from the skill so it never drifts out of sync.
Why
The hardest work (plans, builds) gets frontier-execution discipline automatically, without my having to remember to invoke it.

Build-time inject

PreToolUse
What it does
On the first build action of a turn (an edit, a write, or a shell command), injects a trimmed core of the same register — deduped so it fires once per turn.
Why
Keeps the discipline live across a long autonomous run instead of fading after the first message.

Status-line auto-publish

PostToolUse
What it does
Whenever I edit the status-line script, it re-publishes the public gist automatically.
Why
The shared version is always the current one — no manual copy-and-paste step to forget.

Doctrine + skills pull

SessionStart
What it does
At the start of every session, pulls my private doctrine repo and copies the doctrine into the assistant’s standing instructions, then pulls my skills repo.
Why
Every session, on every machine, starts from the same latest operating doctrine and skill set — one source of truth, no drift.

Home + skills sync

SessionEnd
What it does
At session end, commits and pushes my Claude config and skills back to their private repos.
Why
The whole setup is reproducible and portable — a fresh machine restores the entire environment from git.

The doctrine and skills live in private repos, referred to here by role. One of these hooks keeps the status line in sync; the other four keep the doctrine and register live and the setup portable.