Dave Stanton PhD

Teaching the Tools: A Co-Pilot That Learns

2026-08-13

Every operations team has the same asset and the same problem. The asset is a handful of people who can look at a graph for four seconds and say “that’s not the supplier, that’s us, check the deploy.” The problem is that this ability lives in their heads, is transmitted by osmosis, and walks out of the building at 5pm and likes to take well-deserved long vacations.

I tried the usual fixes. Runbooks go stale because nobody updates a document they don’t read during an incident. Training decks describe the map instead of the terrain. Postmortems capture the conclusion — what the root cause turned out to be — while quietly discarding the thing that’s actually scarce: the navigation. How did they know to look there? What did they check and rule out? What made them abandon their first hypothesis?

So I tried something else: encode the navigation into a tool, make the tool available during real incidents, and close the loop so that using the tool improves it.


Encode the navigation, not the answers

The first artifact is a local server that exposes incident knowledge and query tools to whatever LLM client an engineer already uses, over the Model Context Protocol. It runs on localhost, uses the engineer’s own read-only credentials, and does two things: it serves knowledge as context, and it exposes composable query primitives.

The knowledge is a markdown document we call the branch library. It’s not a flowchart the program executes — it’s a pattern set of expert navigation that the model reasons over:

error-rate blip (metrics)
├─ shared platform service affected?  → platform dependency path
│     → operation → error catalog → responsibility (ours / supplier)
└─ public gateway affected → BY-PRODUCT-LINE discriminator
      ├─ one product line → that line's supplier → confirm in logs → contact them
      └─ multiple lines → THE SET IS THE FINGERPRINT
            ├─ {A, B}    → the dependency those two share
            ├─ {all}     → no shared supplier ⇒ internal shared infrastructure
            └─ {one odd} → ambiguous — wait for logs to break the tie

The best thing in there is the fingerprint rule: the set of affected product lines names the shared dependency, because suppliers are shared across specific subsets. That single insight often resolves an incident before the logs have finished ingesting. It had never been written down anywhere. It lived in two people.

Co-pilot, not autopilot

The design constraint we set first, and never relaxed: the human keeps every decision. The analogy we used internally is an aviation emergency — the pilot flies, the co-pilot reads the checklist out loud, fast. We are not automating the operator away. We’re making them faster and giving them something to verify against.

That constraint produced the single most useful piece of the design, an output contract. Every step the tool takes emits a triple, never a bare answer:

  1. The table — the data actually queried, and what came back. Numbers, not vibes.
  2. The read — what it means, and the pivot being considered, with the reason.
  3. The dashboard link — the panel showing the same view.

The third element looks like a nicety and isn’t. It does two jobs. During an incident it lets the operator confirm the AI is looking at what they’re looking at — and trust, at 3am, is the whole ballgame. Afterwards, every incident thread needs links and screenshots anyway, so handing the operator the exact link as you go is half their write-up.

A rule we learned the hard way, several weeks in: the link has to show the quantity you just served. More on that below — it turned out one of our dashboards displayed errors per second while its panel was labelled as a percentage, and the tool was cheerfully citing it behind percentage tables. A link that doesn’t show what the table claims is worse than no link, because it looks like verification.

One source, packaged

An early version had the knowledge in two places: a document humans edited, and string constants in the code the tool served. They drifted within a week. Now the served knowledge is the markdown file — packaged into the distributable, read at runtime, and the same file a human red-lines. There is exactly one copy. This sounds obvious. It is obvious. We still got it wrong first.


Practice, and the coherence trap

Knowledge nobody practices is knowledge nobody has. So the second thing the tool does is generate tabletop drills: synthetic incidents, no live queries, no credentials, safe for anyone at any time. The model picks a scenario from the branch library, presents only the entry symptom, and serves realistic-looking tables as the trainee drills down — then debriefs against the expert path.

This worked immediately and was immediately, subtly wrong.

Here is the failure mode, and I think it generalizes to every LLM-generated training scenario: the model will invent physics to defend a number it already chose.

A drill served a failure rate that sat flat at a single-digit percentage for twenty minutes, and the ground truth was an expired credential. That is physically impossible. A credential failure is binary per process — the handshake either works or it doesn’t. With a homogeneous fleet, the underlying failure rate goes to 100% essentially instantly. Any intermediate percentage on the dashboard is a rolling-window artifact smearing a vertical cliff, and a rate that’s still mid-range two refreshes later has already excluded every binary cause.

The scenario looked plausible. Every individual number was believable. The mechanism was impossible, and a trainee who reasoned correctly from the shape of the curve got marked wrong.

So we wrote coherence constraints into the kit — rules that bind the scenario generator, not the trainee:

  • Author the mechanism first, then derive the numbers. Never invent physics to defend a number you already picked.
  • Every rate needs a denominator you can name. If it’s partial, say why — a fleet fraction, a cache-hit ratio, genuine supplier flakiness — and hold it consistent across every table you serve.
  • The shape over time must match the cause class. Binary causes step to a cliff. Degradation and saturation ramp. A flat partial plateau means a subset of the fleet, not a fleet-wide binary failure.
  • Never build a drill whose lesson is “distrust the prior that is usually right.” If a scenario punishes a correct base rate, it teaches a worse heuristic than the one it replaces. Trap the trainee on evidence they skipped, never on an unlucky prior.

That last one is, I think, the most transferable idea in this post. A trap that punishes correct reasoning doesn’t teach caution. It teaches noise.


The write-back, or: how does the knowledge get better?

A drill that surfaces a flaw in the knowledge is worth more than a drill that goes smoothly. So the tool has a function the trainee’s model can call: report a correction. What was the scenario, what was wrong with it, what’s the better rule.

Two design decisions here mattered more than the feature itself.

Corrections go to a central collector, not a local file. The first implementation wrote to the engineer’s own machine. That’s useless — the entire point is getting judgment into the team’s knowledge base, and a correction stranded on one laptop helps nobody. Now it emits a telemetry record to the same pipeline the tooling already uses, and a scheduled view aggregates them into a queue.

The curator stays human. The tool has no “write to the knowledge base” capability, and won’t get one. Corrections are raw capture; turning them into served knowledge is a periodic editorial step where a person reads the harvest, judges it, and red-lines the document. Automating that step would let a single confidently-wrong drill rewrite the map everyone else navigates by.

What the first harvest actually caught

One senior engineer ran one drill on a screen-share and filed five corrections. I want to be precise about what they were, because it’s not what I expected. None of them were bugs in the code. All five were defects in the knowledge or in the scenario design. And two of them were wrong in a live incident, not merely in practice:

  1. The tool used a classification vocabulary our organization doesn’t use. It graded people against a severity scale; our responders classify by priority, and severity is a different function’s classification entirely, owned by a different team, on a separate track. The tool had invented a plausible scale and was confidently grading correct answers as wrong. It also conflated two questions that must stay apart — how bad is this, versus does someone get woken up.
  2. The verification surface was wrong. Percentage tables cited a dashboard that renders errors per second, with mislabeled panels. Every “verify against this link” was pointing at something that didn’t show the served quantity.
  3. A scenario invented impact it couldn’t produce. The mechanism was resource exhaustion driven by post-booking async work; the scenario placed the impact on the shopping path, which doesn’t touch that resource at all. It punished a trainee for correctly reasoning that the two are unrelated. Same lesson as the coherence rules — the impact path must be derived from the mechanism, not sprayed across the product line for drama.
  4. Invented identifiers. The scenario used operation names that don’t exist. The moment a trainee who knows the platform sees one fake name, they stop trusting every table you serve. We now harvest a canonical inventory from live data and require the generator to instantiate from it.
  5. The entry symptom was unrealistic. The drill opened with a contentless “something is wrong at the front door” page. In reality the alert that reaches an engineer names a specific operation, and the front-line team arrives having already run their runbook. We were training people to start from a situation that never occurs.

The pattern across all five: the knowledge was confidently, plausibly wrong in ways that only surface when a domain expert drills through it. No amount of code review finds these. You have to run the thing with someone who knows the terrain.

Turnaround from drill to shipped correction was about an hour.


The flight recorder

Here’s the gap that bugged me. Drills were captured. Real incidents — the ones with actual stakes, actual novel failure modes, actual expert navigation — produced nothing durable at all. The most valuable investigations on the platform evaporated into chat scrollback.

So live sessions became recorded sessions. An engineer opens one by saying what they’re seeing; from that point the investigation captures itself.

The architectural decision that makes this work is a split along the line of what can be inferred:

What Who captures it Why
Which query was run, with what arguments, and what came back The tools, automatically Mechanical, free, and impossible to forget at 3am
What it meant, and what it made you do next The model, explicitly No tool can infer an interpretation or a pivot

Every live query while a session is open emits a record: sequence number, which move, arguments, and the signal it returned. The model is instructed to follow each move with its interpretation and the pivot that interpretation drove. Closing the session records the outcome — root cause, whether it’s ours or a supplier’s, the owner, the priority, elapsed time, and how many moves it took.

Correlate on the session id and you have the investigation as it actually happened, including the wrong turns.

Degraded mode has to be honest

The capture pipeline is configuration, and configuration can be missing. There are three possible behaviors when it is:

  1. Fail — refuse to open the session. Absurd: you’d be blocking triage over a logging config.
  2. Pretend — work normally, record nothing, say nothing. Worse than failing, because someone goes looking for that session tomorrow and finds a hole where they believed there was a recording.
  3. Say so — work normally, and tell the operator plainly that this session isn’t being recorded.

We do the third. The tool responds with recording off, states what’s lost, and points at the fix. Separately, the config doctor now warns when the endpoint is unset, and the server nudges on startup — because the moment to discover this is before a shift, not during a postmortem. A degraded mode you don’t disclose is just a lie with extra steps.

The recorders are anonymous, on purpose

The records carry no identity. Not an oversight — a decision, and one we wrote into the infrastructure code with its reasoning so nobody “fixes” it later.

The argument for attribution is easy to make: the responder is named in the incident record anyway. The argument against is stronger. A recorder people feel watched by gets used differently, or doesn’t get used. The whole value of the corrections channel is that someone can say “the knowledge is wrong here” without it being a performance review. The same applies to a recorded investigation, which necessarily contains the paths that went nowhere.

Attribution isn’t lost; it moves. The incident management system already records who was on it, and a session id plus a wall-clock timestamp lines the two up when there’s a genuine reason. Attribution stays possible and stays deliberate, instead of being a property of every record by default.


The postmortem is already the artifact

Now the part I didn’t see coming, and which reframed the whole project.

We were sketching a “replay” feature — drill a real past incident instead of a synthetic one — and the obvious problem is data. Live incident data ages out, replays get thinner over time, and you’re back to fabricating.

Then the observation that unlocked it: the postmortem is already the incident artifact, and we were writing it for the wrong audience.

Our RCA template is genuinely good. It has a timeline, an explicit hypothesis-revision section, escalation paths, a scored response card. But it’s written for human review only, and that has two consequences:

  • Numbers live in prose. “Errors peaked at roughly 4,700 per five minutes.” Nobody can verify that a year later without reconstructing the query. The document asserts rather than evidences.
  • The investigation is narrated, not recorded. “We checked the database.” That sentence can’t be replayed, can’t be timed, and doesn’t say which query, in what window, returning what.

So we added an evidence pack: an appendix, generated at postmortem-writing time, holding the actual tables — with the query, the time window, and the environment that produced each one. Two payoffs for one piece of work. The postmortem becomes verifiable (every number in the prose traces to a table, with the query that made it). And it becomes replayable with no dependence on data retention at all, because the data is in the document.

Four design rules make the difference between an appendix and a data dump:

Index by move, never by conclusion. A replay serves evidence in response to what the trainee asks for, so an entry has to be findable by the move that would produce it — never filed under “the smoking gun.” Same vocabulary as the tool’s query primitives.

Slice the timeline. One snapshot flattens the incident and destroys the most teachable signal in it: the shape over time. Capture the key tables at a minimum of three clock points — baseline before impact, at detection, and at peak or recovery.

Record the negatives. “We checked the cache; it was clean.” These vanish from most postmortems because they feel like noise. They are the opposite of noise. They’re what proves the diagnosis was reasoned rather than lucky, and they’re the only honest source for a replay’s “nothing notable there.” Without them, every replay is a rail pointing straight at the answer.

Keep the conclusion out of the appendix. The narrative sections carry the answer; the appendix carries only evidence and verdicts. Which brings us to the sharpest constraint.

Sealing the answer

A replay has an obvious failure mode: the document contains the root cause, usually in its first paragraph. If the harness reads the whole thing into context and then plays Environment, the answer is sitting right there and the model is one careless sentence from leaking it.

So the template names its sealed sections explicitly — the description, the root-cause analysis, the actions taken, the counterfactual, the recommendations, the executive summary — all withheld until the trainee commits to a root cause, an owner, and a priority. Everything else is fair to serve on request. Structuring the document so that evidence is retrievable without the conclusion is what makes a replay honest.

The contract travels with the document

The assembly rules will evolve. A replay reading a two-year-old postmortem needs to know which conventions were in force when it was written. So each document carries a version stamp and an appendix stating its own contract: how the evidence was gathered, how a replay should consume it, which sections are sealed. Bump the version, add a history row, leave old documents alone. The artifact is self-describing rather than dependent on a central guide that has since moved on.

What replay buys that simulation can’t

The coherence problem — the model inventing impossible physics — disappears entirely, because the physics already happened. Nothing is fabricated. The tables are what the platform recorded.

And the assessment gets sharper. You can score two different things: the path (moves versus the recorded expert path, with credit for beating it) and the response (have the trainee fill in the same scored response card the real incident was graded against, then show them the real card). Same event, graded twice, and the delta is the lesson.

The one that keeps paying off: when a trainee reaches the diagnosis in fewer moves than the real response did, that gap is a finding, not a scoring quirk. File it as a correction. The training system starts generating operational improvements.


Where to draw the line between tool and harness

A design argument worth recording, because I got it wrong first.

I proposed a command that would gather the standard evidence set and emit the appendix markdown. It was rejected in about one sentence: if the template is good, the harness can do that with the query commands that already exist.

That’s correct, for three reasons I only fully saw afterwards:

  1. The evidence set is incident-shaped. A credential failure wants shape-over-time, an error catalog, and a log message. A saturation event wants memory, evictions, and queue depth. A command freezes one checklist and quietly teaches people that the checklist is the job — when choosing which evidence matters is precisely the judgment being trained.
  2. It would put a document template inside the tool while the real template lives in another repository. Guaranteed drift, and the tool would be the last to know.
  3. The primitives already exist and return structured data. “Run six queries and format the results” is not a feature; it’s a prompt.

So the division came out as: the tool returns data, the template defines shape, the harness composes the document. The template is the contract between them — which is exactly why its move vocabulary has to name things the tool actually exposes.

The same reasoning applies to replay itself. The harness reads the postmortem from a local checkout; the tool doesn’t need to. What the tool provides is the thing the harness can’t do for itself: open a recorded session and state the contract. Replay turned out to be the co-pilot loop with the tables coming from a document instead of a live query — one new function, not a subsystem.


The flywheel

   curated knowledge ──► served to the model during a real incident
          ▲                              │
          │                              ▼
    a human curates            the session records itself
    the good ones                        │
          │                              ▼
          │                    the postmortem harvests that recording
          │                    and captures its evidence pack
          │                              │
          │                              ▼
    corrections ◄──── replays and drills run against that pack

Every stage feeds the next, and the only genuinely new tooling in the whole loop is the evidence-gathering step. Everything else is a thing the team already did — investigate, write the postmortem, train people — connected so the output of each is the input of the next.

The economics work because of a constraint that was already there: our postmortem lands the same business day, with evidence gathered within hours of the incident closing. So the capture is cheap and fresh, and the recorded session means the author harvests the investigation rather than reconstructing it from memory at hour twenty.


Things that bit us, and things still open

Documentation drifts from reality, including your own. We found a design document confidently describing per-decision capture as “already wired.” It never had been — the capture existed in exactly one place, and the document had been describing an intention in the present tense. If your knowledge base is the product, then untrue documentation is a production defect. We now assert key facts from the knowledge in the test suite, so a correction can’t be quietly dropped by a later edit.

Replays are finite, and people memorize them. Great for reinforcement, worthless for assessment after the second run. Synthetic drills keep their place for novelty, and a perturbation mode — real data, one fact changed — is the obvious next step.

Which evidence to capture is still a judgment call, and a postmortem written under deadline will miss some. Ours records what it couldn’t capture, so a replay can honestly say “not in this pack” rather than inventing a table. Honest gaps beat fabricated coverage, every time.

The knowledge is still opinionated and still partly unverified. We mark best guesses inline with a “confirm this” marker so a reader knows what’s settled and what’s still a hypothesis. Several are still open.


What I’d tell someone starting this

Encode navigation, not answers. The answer is in the postmortem already. What’s scarce is how someone knew where to look.

Make the tool show its work. Table, interpretation, verifiable link. An operator who can check the tool will use it during an incident. One who can’t, won’t — correctly.

Build the write-back before you need it. The first drill with a real expert produced five corrections in an hour. Without a capture path, those would have been a nice conversation.

Keep a human as the editor. Automatic capture, human curation. Let the loop close completely and one confidently wrong drill rewrites the map everybody navigates by.

Assume your generated scenarios are subtly incoherent until an expert tries to break them. And never build a trap that punishes correct reasoning.

Your postmortems are more valuable than you’re treating them. Ours were already the richest artifact we produced, and we were writing them to be read once and filed. A modest amount of extra structure — evidence indexed by move, a few time slices, the negatives, the conclusion sealed off — turns each one into a training scenario with perfect fidelity, and makes the postmortem itself verifiable as a side effect.

The tools got better at the job this week because someone spent forty-five minutes drilling with them and told them where they were wrong. That’s the whole idea.