Skip to content

Lesson 2: The 12 Leverage Points of Agentic Coding

Tactical Agentic Coding

The one tactic: Adopt your agent's perspective — give a brilliant-but-blind agent the same context, model, prompt, and tools you would use, then stack the 12 leverage points so one-shot success becomes inevitable.

Overview

Your agent is brilliant but blind. Every session starts as a blank instance: no context, no memories, no awareness beyond what you hand it, and it resets to zero when the work is done. To make it perform like you would across your codebase, you must give it your perspective — your context, model, prompt, and tools (the core four).

This is the tactic that moves you from AI coding into high-leverage agentic coding: it stops being about what you can do and becomes about what you can teach your agents to do. By consistently taking your agent's perspective, you close the gap between your ability and your agent's ability.

The durable framework underneath all of this is the software development lifecycle (SDLC), compressed for phase two into five steps: plan → code → test → review → document. Across TAC you augment and automate each step until the codebase ships on your behalf.

This lesson delivers three things: the tactic (adopt your agent's perspective), the 12 leverage points you use to maximize your agent, and the 4 KPIs that tell you whether you are actually improving.

Key concepts

The compressed SDLC

The one aspect of engineering that never changes and is resurfacing hard: plan, code, test, review, document. It is TAC's framework for success; every leverage point maps onto or feeds one of these nodes.

The 12 leverage points

There are two categories. In-agent leverage points are the core four — they travel with the agent. Through-agent leverage points are external levers that eventually flow through the context window and have massive impact on success.

In-agent (the core four):

#Leverage pointWhy it matters
1ContextThe information the agent operates on; everything flows through the context window
2ModelRaw intelligence and reasoning; use the best available, activate thinking when needed
3PromptHow you communicate the work — the medium of all instruction
4ToolsThe agent's ability to act (CRUD the codebase, run commands, delegate, search web). Know every tool your agent has — even hidden options like the bash timeout

Through-agent (external levers):

#Leverage pointWhy it matters
5Standard outThe agent can only see what you let it see. Clear logging of every error and success guides the agent to fixes. Missing stdout = a blind agent
6TypesClasses, exceptions, interfaces, and typing structures are information-dense keywords (IDKs) that trace the flow of information through the codebase
7ArchitectureConsistent structure (clear entry points, separated services, mirrored test folders) halves the search space. Solves the "agent navigation problem"
8DocumentationInternal (ai_docs/, CLAUDE.md, READMEs) and external docs. Keep references local so the agent doesn't web-fetch every lookup
9TestsThe agent will make mistakes; tests are the leverage that lets it self-correct. Enables closed-loop structures
10PlansPrompts scaled up. How you communicate massive amounts of work. Planning is the first SDLC step
11TemplatesReusable agentic prompts (slash commands) that encode your engineering. "Three times makes a pattern" — automate it
12ADWs (AI Developer Workflows)The highest abstraction: one or more agentic prompts wrapped in code and fired by a trigger, running autonomously

Standard out in practice

The most common — and most punishing — mistake is bad agentic code: a codebase that doesn't print errors, so the agent can never see what broke. Fix the code so every exception and every successful response is written to stdout before returning. Then the agent can see the failure and resolve it on its own. For noisy codebases: use a per-session log file the agent reads after the fact, or drop the log level to warnings/errors (though full output is best).

Types as information-dense keywords (IDKs)

Copy a type/class and search the codebase; the agent (or a sub-agent) traces every location and tells a top-to-bottom story of how that information flows. Name types verbosely — QueryRequest/DataRequest are terrible, low-information names; be direct and specific so IDKs point to exact locations.

Architecture and the agent navigation problem

Every new agent must re-explore the codebase. The best defense against complexity is consistency: reuse the same patterns, folder structures, and names. Recommended habits:

  • Clear entry points per service (e.g. a known server.py main file).
  • Constant files for unchanging information.
  • Types, classes, and structures over loose dictionaries.
  • Meaningful, verbose directory/file/type/variable names.
  • Keep files under ~1000 lines (loose max).
  • One responsibility per file; separate services (client vs. server).
  • Spread CLAUDE.md/README docs throughout the tree.
  • Mirror your test folder structure to your source structure.

The 4 KPIs of agentic coding

Four numbers tell you whether you are improving. If you don't measure it, you can't improve it.

KPIDirectionMeaning
Size⬆ increaseThe size of work you can hand off in one prompt — bigger plans, longer agent runs (5 min → 20 min → hours)
Attempts⬇ decreaseHow many times you re-prompt to fix issues. High attempts (3–10) means you're missing a leverage point. Aim for one shot
Streak⬆ increaseBack-to-back one-shot successes with zero issues. Once you start one-shotting, don't break the chain
Presence⬇ decrease (→ 0)How much you must sit, guide, and correct the agent. High presence is the early game, not the end game

Every KPI improves by applying one or more of the 12 leverage points. Confused agent using dicts? Add types. Inconsistent structure? Refactor for agents. Still reading error messages by hand? Add stdout and let the agent read them.

How to apply it

  1. Lead with your agent. Make Claude Code the primary interface — have it install, prime, and explain the codebase (/install, /prime).
  2. See what your agent sees. Enumerate its tools (/tools) so you can push it to full capability.
  3. Fix stdout first. Ensure every exception and success prints before returning; confirm the agent can actually see errors, then let it resolve them.
  4. Leverage types. Copy a type, ask the agent to trace its flow across files/functions; name everything as an information-dense keyword.
  5. Audit architecture. Clear entry points, separated services, consistent names, mirrored tests, files under ~1000 lines. Refactor for the agent — but not yet; do it deliberately in later lessons.
  6. Write tests so the agent can self-validate; feed uv run pytest output straight into its context.
  7. Write plans, not short iterative prompts. Plan with your agent.
  8. Templatize repeated work. Three repeats → make a /command.
  9. Measure. Keep Size, Attempts, Streak, Presence in mind every run; when the streak breaks, find the missing leverage point.

Commands & conventions

Command / pathPurpose
/installReusable prompt that installs front-end and back-end dependencies
/primeRamps a fresh agent on the codebase (e.g. git ls-files + read README)
/toolsReusable prompt that lists the agent's available tools
/startExample self-made command wrapping scripts/start.sh
.claude/commands/Where reusable prompts (slash commands / templates) live
specs/Where generated plans are written
ai_docs/Local documentation dedicated to your agents
claude -p /toolsProgrammable mode — run a command non-interactively
bash
# Feed tests straight into the agent's context (bang = run a bash command)
!cd app/server && uv run pytest

# Run the start script for a bounded time and capture stdout
scripts/start.sh 300s
markdown
<!-- Creating a slash command from a repeated shell step -->
Create .claude/commands/start with exactly:
  sh scripts/start.sh

Key takeaways

  • Your agent is brilliant but blind; give it your perspective (the core four).
  • 12 leverage points = the core four (in-agent) plus 8 through-agent levers: stdout, types, architecture, docs, tests, plans, templates, ADWs.
  • Standard out and tests are the first two levers to fix if you're missing them.
  • Types are IDKs — they trace information flow and shrink the agent's search space.
  • Consistent architecture defeats the agent navigation problem better than clever code.
  • Plans are prompts scaled up; great planning is great prompting.
  • 4 KPIs: Size ⬆, Attempts ⬇, Streak ⬆, Presence ⬇ (to zero).
  • Stop looking at error messages by hand — hand them to the agent, and only dig in when the agent fails.

Notable quotes

"Your agent is brilliant, but blind. With every new session, it starts as a blank instance."

"It's not about what you can do anymore. It's about what you can teach your agents to do."

"If it's hard for you, you should assume it'll be hard for your agent."

"Three times makes a pattern. Three times should trigger your engineering brain: automate."