Skip to main content

You are here: Playbook

On this page

AI Coding

What separates AI coding environments that amplify output from ones that slow you down?

The answer is signal discipline — less context, not more. Most setups fail by adding too much.

Providers

  • Config Architecture — Agent-agnostic setup: rules, hooks, skills
  • Claude Code — Hooks, settings, Claude-specific patterns
  • Gemini CLI — Large-context, repository-wide analysis
  • Codex — choose a surface, bound permissions, verify the result, and test whether assistance becomes independent capability

Principles

  • Agent Context Prompts
  • Command Prompts
  • Skills

Context Files

Agent MD files (CLAUDE.md, AGENTS.md) shape what the model sees. Used well, they correct consistent errors. Overused, they add noise: LLM-generated context files decrease performance by 3% on average and increase costs by 20%+.

PrincipleWhat to Do
Minimize contextInclude only essential information — irrelevant context distracts
Correct consistent errors onlyAdd rules when the model reliably makes the same mistake
Prioritize codebaseIf the model struggles, fix the codebase first — move confused elements, improve tests
Read agent strugglesConfusion signals an unclear codebase, not a prompting problem
Watch outputsNote what files the agent reads and how long tasks take — builds intuition

Agent Prompts

System prompt (Mindset)

Command Prompts

Instructions (JTBD)

Skills

  • skills.sh — Open source AI coding skills library

Hooks

Dev Workflow

AI agents operate in the same two-stream pattern as human engineers. See Dev Workflow for the full worktrees pattern.

StreamAgent readsAgent produces
BuildPRD spec → project-from-prdNew capabilities
FixIssues Log (src/pages/priorities/) → fix-from-issuesBug fixes

Rule: One session, one stream. Never mix building new features with fixing existing issues in the same agent context.

Steps

  1. Name one beneficiary, engineering outcome, writable scope, reviewer, and stop condition.
  2. Give the agent only the context and permissions needed for that outcome.
  3. Keep one coherent workstream in one session and isolate concurrent writes.
  4. Inspect the diff, run relevant checks, and review consequential decisions.
  5. Record the result, remaining uncertainty, and next action.

Agent-Operable Codebases

If the same agent workflow happens twice, do not keep it as a chat habit. Turn it into an operating surface: a skill, command, hook, test, log query, documentation sweep, or bounded loop with a stop condition.

Use the Agent-Operable Codebase checklist before scaling from one agent to many. The checklist is especially important once the bottleneck moves from code generation to review, CI, merge order, and deploy coordination.

Failure Modes

  • Adding context rules that should be tests.
  • Treating agent confusion as a prompting problem when the codebase is unclear.
  • Scaling to many agents before the merge path is visible.

Proof Of Done

The workflow is complete when the intended change is visible, relevant checks pass, a responsible human has reviewed the result, and the receipt distinguishes agent output from beneficiary improvement.

Context

  • Dev Workflow — Two-worktree pattern: build vs fix
  • Agent-Operable Codebase — checks for safe bounded agent loops
  • Priorities — Active PRDs and build queue
  • Business Factory — PRD specs for the build stream
  • Agent configuration belongs in the provider list above.
  • Reality Scoreboard — proof that the workflow improved

Questions

What happens when the agent's context file corrects errors the codebase should prevent?

  • If agent confusion signals an unclear codebase, how do you measure codebase clarity?
  • When does adding a rule to CLAUDE.md become a substitute for fixing the actual code?

Changes my mind: more context repeatedly improves verified engineering outcomes without increasing review cost, confusion, or hidden dependency.

Next question: which recurring agent mistake should become a codebase control instead of another prompt?