Learn AI
How to ask so it works the first time
One way to assign work: write the background, requirements, limits, and acceptance. The last lesson is which jobs not to assign at all.
1Write the briefWho it is for, what to produce, what is off-limits, what counts as done
2Make it complyExamples beat adjectives, fix the format, say once-only things once
3Decide what to assignClear rules, reversible, checkable; miss one, keep a human
How to make it reliably good
Stability is not luck: change one thing at a time, turn good prompts into assets, and spend tokens where thinking pays.
1Change one thingMake each change attributable, compared on the same samples
2Keep what worksPrompts scattered across code become untouchable
3Spend where it paysWhen thinking longer pays, reading benchmarks, planning the fallback
Where it gets what it doesn't know
How much the window holds, how retrieval finds things, what memory costs, and where each RAG stage breaks.
1Does it fitThe window is bounded, the middle fades, long chats drop
Context Window
The window is a budget to allocate, not a bucket to fill.
02Lost in the Middle
Attention is strong at the ends, weak in the middle. Position is a design decision.
03Conversation Compaction
Compaction always drops something, and the earliest constraints go first.
04Long-Term Memory
The model has no memory; your system does. Extraction and conflict are the hard parts.
2Can it find itSimilar sits close, but closest is not useful
3Is it wired rightRetrieve then answer; each of three stages breaks
What a call really costs
Pricing is not by characters; one call has three prices. Caching is the biggest lever, and self-hosting has hard edges.
1How it is pricedNot by characters; three prices per call
2How to pay lessA cache needs a stable prefix; whose weights are they
Which answers to trust
Making things up is the default, not a bug. Three verification moves, plus the line between instructions and data.
1Why it inventsIts world stops at a date; past that, it fills one in
2Where things standWhat already works, and what is still a demo
3How to verifyThree moves filter out most fabrication; no line-by-line checking
4Instructions vs dataIt cannot tell commands from content, and chats go somewhere
Why it's powerful and unreliable
It does one thing: guess the next token. Every strength and every failure grows out of that.
1It does one thingGuessing the next token, and what that rules out
2Where ability growsTraining and inference are two bills; images are tokens
3Match the namesSix kinds of machine, and one map of the terms
Forward Deployed Engineering
Rethinking FDE
Define the role: what it is, what it is not, the capabilities it needs, and where it sits in a team.
1The roleWhat it is, and what it is not
Choose the Right Battlefield
Screen the problem, go to the field, and narrow the validation to a valuable slice within institutional constraints.
1Find the problemIs it worth doing, and where to see it
2Cut the sliceThe smallest provable deployment, on the right ground
Earn Trust
Choose a lighthouse customer first, then earn durable trust through real results, action, and honesty.
1Pick the customerHow to choose a lighthouse
2Earn itHands on, honest, and on the record
Make the System Stick
Launch is not activation. Use hot fixes, read-old-write-new, and change management to reach real usage.
1Keep it aliveThe day-one curse, and reading the old system
2Get it usedTurn the customer's org into an ally
Grow the Relationship
Use health scores as an early warning, charge for outcomes, and expand from one department to the network.
1Hold itHealth scores as an early warning, billing on outcomes
2Grow itFrom one department to the whole network
Turn the Playbook into a Product
Capture each success in a playbook, then turn it into reusable platform capability.
1Capture itThe playbook, then shipping it as product
2Case filesHow others won it, and what not to copy
3Staff itReporting lines, headcount, reviews, and load limits
Agent Engineering
Pick the Right Complexity
Start at the lowest complexity that works: when you do not need an agent at all, and which rung to start from when you do.
1Pick the levelWhether you need an agent, and which rung to start at
2Build the shellWhat the harness owns, and which rules go in
3Grant autonomyAutonomy caps out where verification does
Context Engineering
Context is the agent's only working memory: what goes in, how it is layered, and how to stop it from degrading as a run grows.
1What's in itWhat goes in, and how it sours
2How to loadData through the pipes, loads by layer, knowledge structured first
Stop Making the Model Carry Data
Models truncate, mix up, and invent IDs. Let the system be the pipe and the model be the judge.
08Layered Loading and Handoffs
Five layers loaded on demand, structured handoffs, and why a stable prefix keeps your cache alive.
09Align the Domain Before Reaching for RAG
Retrieval finds related material; structure decides what must be understood. Get the order wrong and you have only built a more searchable pile of documents.
Tools and Environment
Tools are contracts and the environment is the capability boundary. Together they decide how much real feedback the agent can get.
1ContractsHow tools are specified, how the environment answers back
2Who executesBatching in code; allowlists for MCP and skills
Put Loops and Batches in Code
Round trips issued one at a time scale latency, tokens, and drift linearly with N.
13Where MCP and Skills Belong
MCP costs are resident, skill risk is supply-chain grade, and both need per-agent allowlists.
14Ecosystem Connectors: MCP, A2A, and Office Protocols
Retire bespoke glue code: unify tool calls, multi-agent work, and chat interaction.
State and Long Tasks
A good run is not a delivery: state layering, interrupt recovery, side-effect receipts, and the bar for going multi-agent.
1Layer itFour lifecycles, not one array
2Fix the protocolStable objects outsiders can hook onto
3Go longLong tasks run on handoffs with a real end state
4Own the falloutReceipts for actions, a bar for scaling up
Evals and Verification
Define done before you build: eval sets, four metric layers, the online and offline tracks, and keeping verification ahead of generation.
1Define doneSay what finished means before you build
2Four layersOutcome, process, efficiency, risk
3On railsOnline and offline tracks, verification keeping pace
Online and Offline Evals
Treating production scores as acceptance is the mistake agent teams make most often.
24Verification Must Keep Up With Generation
Nobody declared what was relaxed. Review just turned from reading into skimming.
25Judge Trustworthiness Starts With the Input
A wrong number is a data problem first, not a model problem.
Safety, Cost, and Shipping
What matters once it runs: containment and credential boundaries, cost attribution, launch metrics, and feeding failures back into the system.
1Contain itSandbox, credentials, and the human boundary
2Count itCost attributable to every step
Runtime Discipline
The discipline after launch: classify failures before counting them, tier recovery, consume events at safe points, and treat launch as a process, not a switch.
1When it breaksClassify before counting; tier recovery with circuit breakers
Classify Failures Before You Count Them
Blind retrying counts errors that no retry can fix. Classify first; only then do metrics and circuit breakers mean anything.
31Tier Your Recovery, Then Circuit-Break
Three escalating tiers, each more transparent than the last; breaker ceilings read off production data.
2Run the loopAdmission gates in, five layers of stop
Loop Engineering: Admission and Stopping
Seven admission conditions, five layers of stop semantics — separating "a prompt on a timer" from a real loop.
33Loop Engineering: The Control Surface and Its Failure Modes
Six components, each guarding one failure mode: coarse goals, swallowed verification, unread state, parallelism debt, uncapped cost.
34Hooks: Deterministic Gates at Each Lifecycle Node
Four checkpoints hold the safety line; high-risk actions block and wait for approval.
3Release disciplineEvents at safe points; launch as a chain of gates
Continuous Evolution
Getting better with age, not messier: first-deviation attribution, tending the eval set, turning experience into learning, and braking the evolution loop.
1DiagnoseBlame the first deviation; tend the eval set
Attribute Failure to the First Deviation
End-to-end scores only say it failed; attribution says from which step — and only the first deviating error earns that role.
38Tend the Eval Set Like a Product
Five redesigns in tau-bench, 300-plus issues in OSWorld: every trustworthy benchmark was tended into being.
2CompoundExperience into learning, with brakes on the loop
Saving Experience Is Not Learning From It
Store the evidence, induce offline, then prove transfer on new tasks — drop one of the three and it is only archiving.
40An Evolution Loop Needs Three Brakes
Prompt injection must not travel through experience, and regression must not travel through the verifier — three hard boundaries around automatic evolution.
Build with AI
Stance
You steer, AI rows: act as the tech lead, not a wish well or a bystander.
1The internTreat AI as a gifted intern, not a wish well
2Pick a modeFour modes, where you land
3Hold judgmentYou steer, it rows
Pick the Problem
Choose the right problem first: generative or agentic, where AI truly helps, and what you will not build.
1Pick a skeletonGenerative or agentic
2Judge the valueOnly build what AI truly improves
3Draw the lineOne-line positioning plus a not-doing list
Write the Contract
Turn intent into a contract: spec first, machine-checkable done criteria, and a project rules file.
1Spec firstTurn intent into a spec
2Define doneMachine-checkable, define before you build
3Land the contractAGENTS is a map, not an encyclopedia
Set Up
Lay the ground once: enough tools, context engineering, and the three jobs of a project harness.
1Pick toolsFour kinds, enough is enough
2Feed contextGood context beats a good prompt
3Build the harnessRead right, block, reconnect
Build in Small Steps
The craft of generation: verifiable chunks, delegate outcomes not steps, iterate fast.
1Split smallOnly start when you can verify
2Delegate outcomeNot the steps
3Iterate fastRough first, polish later
Review the Output
Read structure, data flow, and dependencies to decide what to keep; the 70/30 split and a checklist.
1Read itStructure, data flow, dependencies, gaps
2Hold the splitThe 70/30 goes where it belongs
3Run the checklistReport only what's actionable
Verify, Catch Fake Fixes
One command runs every validation layer; catch fake fixes on the spot; tests first or in parallel.
1Layer the checksOne command runs them all
2Catch fake fixesReproduce before, disappear after
Launch and Measure
Ship small with a safety net; measure what matters for AI products; feed failures back in.
1Ship smallPadding before you jump
2Measure rightResult, not activity
3Feed failures backInto the next iteration
Safety and Cost
The two silent costs: security debt and wasted tokens. Non-negotiables and saving toward completion.
1Hold securityCredentials, input, permissions, review
2Slim contextDon't let it sour
3Save on completionDowngrading sub-agents is the lever
Keep Improving
Grow from one-person intuition to sustainable collaboration: a knowledge flywheel, reliable handoff, ship weekly.
1Spin the flywheelDon't wait for perfect
The Knowledge Flywheel: Don't Wait for Perfect
Every iteration's artifacts become the next stage's input; knowledge accrues as a byproduct. Don't wait for perfect.
08The Saved Time Piles Up Between Rounds
Coding intervention is down to half a round while the cycle improved sixteen percent. The bottleneck moved to pickup waiting.
2Handoff that holdsSomeone else can pick it up
3Ship weeklyIterate on a standing test bed
4Govern the frictionThe tail hides in waiting; killing is an expected outcome
Individual Speedup Is Not Organizational Speedup
Median falling while P85 holds means the bottleneck has moved from coding to waiting.
05The Biweekly Review: Persevere, Pivot, or Kill
Cadence buys psychological safety, the org chart stays off the projects, features get deleted — product organization in the AI era.
06The Organization Is the Human Harness
Why patches pile into the agent, why teams write a shared charter before the meeting, and why acceptance is judged by what the user sees.
5Watch the bottleneckHuman-scale infra buckles first; measure before rebuilding
Use AI Products
Change the Frame
Stop asking questions. Assign finished work you can accept.
1Change the askStop questioning, start assigning
2Write it allFive things every assignment needs
3Draw the lineWhat to hand off, what to keep
Run It Once
First jobs are low-risk, reversible, and obviously right or wrong. Finish the five-step loop before you scale.
1Pick the jobLow risk, reversible, obviously right or wrong
2Five stepsBrief, release, watch, check, keep
3Stay on itWatch, stop, take over
Make It Steady
Reusable briefs, hard red lines, and debugging the process first. Stability comes from a skeleton, not a spell.
1The skeletonStability comes from a reusable brief
2Red linesStop when they are crossed
3DebugLook at the process before you blame the model
Match the Product
Pick the product by the shape of the work, then open the thin product chapter. The wrong product wastes a correct method.
1Match itPick the product by the shape of the work
Codex
A coding agent: assign work in the repo, park long jobs in files, and keep humans on the irreversible steps.
1FitWork that lives in a repo
2One loopA small change you can accept
3The extraPark long jobs in files
4BreaksNo acceptance, encyclopedia rules, pushing while broken
Doubao Work
Office cowork: you assign files and tables; company context needs a boundary; daily work becomes a reusable play.
1FitYou assign files, not a paragraph
2One loopThe first reversible job
3Company contextDraw the boundary before you connect
4Daily workNext time, swap the source material only
5BreaksThin sources, overwritten originals, unchecked numbers
WorkBuddy
A desktop workbench: finish one real job, then pack the method as a skill. Connectors and automation come after.
1FitA workbench, not another chat box
2One loopFinish one real job first
3The extraSkills, then connectors, then automation
4BreaksA pile of features, wide permissions, no acceptance
Grok Bot
Cloud teammates: dump context, hire by business lane, and stop before irreversible acts.
