Forward-deployed / AI Knowledge Graph
AI-assisted developmenta craft track

AI-assisted development for the product and technology leader

What changes when a coding agent writes the code: specifying, verifying, controlling and measuring the work, with runnable examples and one real Stop-hook script.

Core insight

When an agent writes the code, the scarce work is specifying and verifying, so speed comes from the checks you build, not from the agent.

6 lessons+ recaprunnable codeknowledge graphdiagrams included

A coding agent reads your repository, edits files, runs commands and reports back. Teams that use one well ship faster. Teams that use one badly ship the same bugs faster, and review more code than before.

The tool is the easy part. The work that changes is around it. Someone must specify the task so the agent can finish it. Someone must verify the result, because the agent will say it is done when it is not. Someone must control what the agent may touch. And someone must measure the outcome in a way that does not fool them.

This module covers those four jobs for the leader who sets the rules. It does not teach one tool's menus. The examples follow Claude Code, because its documentation is public and specific, and the ideas carry to other coding agents.

Every lesson has two layers. The body is for the leader who decides. A short Under the hood section is for the engineer who builds. It points to code that runs on the Python standard library and ends in assert lines. One file is a real Stop-hook script you can copy. The others are small models of cost, review time, permission rules and metrics, with invented numbers.

A note on scope and freshness. Coding agents change every few weeks. Settings, modes and prices in this module come from the Claude Code documentation as read in 2026-10. The ideas hold longer than the names. Check the documentation before you copy a setting.

Where the depth lives

If you want the full depth on Read
How an agent loop works Agentic AI and AI agents
How agents call tools and servers Tool calling
What goes into the context and how it fills Context engineering
Writing evals and checks Evaluation and observability
Prompt injection, secrets and least privilege AI security and guardrails
Token prices, caching and budgets Cost optimization
Why a long session costs more Generating text and the KV cache

The knowledge graph

The module map

A loop that feeds the spec

What you learn from measuring changes what you specify.

1The bottleneck moves
specify · run · verify

Checks beat raw speed.

2Specs and the context file
standing brief + task spec

Write it once, use it every session.

3Verification
exit codes, not sentences

Make "done" a fact.

4Control
permissions · modes · hooks

Guardrails, then a sandbox.

5Running at scale
sessions · subagents · fan-out

Review capacity is the limit.

6Measuring and governing
outcomes by difficulty

One-page policy.

Measurement feeds back into the spec.

Read it as a loop. When an agent writes the code, the scarce steps become specifying and verifying. The context file carries the spec across sessions. Verification turns "done" into a fact. Control limits the harm when the agent is wrong. Scale multiplies all of it. Measurement tells you whether it worked, and feeds back into the spec.

The lessons

  1. When an agent writes the code: where the bottleneck goes — a model of time per task, and why checks beat speed.
  2. Specs and the context file — what to write once so every session starts well.
  3. Verification is the product — tests, hooks and the rule that "done" must be checked.
  4. Control: permissions, modes and hooks — what a rule stops, and what it does not.
  5. Running at scale: sessions, subagents and fan-out — context cost, parallel work and the review queue.
  6. Measuring and governing — metrics that do not mislead, costs, and a policy that fits on a page.

Then the recap and real-world examples, with a self-test.

Run the code

Every example is in ai-assisted-development/code/. Run them all with one command.

python3 ai-assisted-development/code/test_examples.py

The files are lesson1_bottleneck.py through lesson6_metrics.py, plus stop_gate.py, a Stop-hook script you can register. A passing file checks the direction of each claim, such as strong checks beating a faster agent. Run a file to see every quoted number printed.

The lessons

01

When an agent writes the code: where the bottleneck goes

Read lesson →
02

Specs and the context file

Read lesson →
03

Verification is the product

Read lesson →
04

Control: permissions, modes and hooks

Read lesson →
05

Running at scale: sessions, subagents and fan-out

Read lesson →
06

Measuring and governing

Read lesson →
📌

Recap & real-world examples

Read recap →