Toolchain Setup

Project Rules, Hooks, Guardrails & CLI/MCP Wiring

01 / 12

Set up the agent like a new teammate: house rules, guardrails, and only the keys it needs.

The Shift

You've always configured your own setup: linters, formatters, pre-commit hooks, coding conventions, a .gitignore, the commands you run on autopilot. You did it for yourself, and it lived in your head and your dotfiles.

Now you're configuring for someone else: an agent that starts every session blind to your repo, your conventions, and what it must never touch. Unconfigured, it invents patterns, runs wrong commands, and in YOLO mode, reads your .env or force-pushes a branch.

Your job now is to build it a safe, wired workshop: a tight rules file for the house style, guardrails so it can't take dangerous actions, and least-privilege access so a stray instruction (even one hidden in an issue or tool description it reads) can't reach your secrets. Set it up once; every session inherits it.

Agent core

one setup, every session

Rules

House rules & conventions

  • AGENTS.md
  • CLAUDE.md
  • conventions

Guardrails

Gated, not wide open

  • safe-automode
  • deny rules
  • PreToolUse Hooks

Least privilege

Only the CLIs/MCPs it needs

  • github
  • gcp
  • docs
  • playwright

No access

Secrets · .env

Deny

Blocked by a deny rule

The agent can never read them

Toolchain Setup diagram

Page 4 of 72: Toolchain Setup

Contents