← projects

claude-init

Developer tooling — A version-controlled Claude Code setup with three working modes enforced by hooks.

Python · Shell · Claude Code · Developer Tooling · Hooks

Where
Personal project
Team
Solo
My role
Everything

Problem

Agent configuration drifts across machines with no history of what changed, and the authority you want to grant an agent is not constant — the right latitude on a scratch repo is the wrong latitude on production code.

Solution

Make the repository the source of truth and symlink ~/.claude into it, then split authority into three per-repository modes whose boundaries a PreToolUse hook actually enforces rather than merely describes.

Overview

A version-controlled Claude Code configuration where the repository is the source of truth and ~/.claude holds symlinks into it, installed by an idempotent script with a --dry flag that shows what would change first. The core idea is three working modes — coach, build, and autopilot — that change the working relationship for a single repository rather than globally. Mode is stored per repository in .claude/.mode, so different projects can sit in different modes at once. The boundaries are real rather than advisory: in coach mode a PreToolUse hook blocks Edit and Write outright, so the agent scaffolds and explains while you write the code. The behavioral frame for the active mode is injected at session start by a hook, so switching modes is one command with no second step.