What 893 readers and 63 comments on Part 5 forced us to formalize: why Markdown rules hit a physical ceiling, when to graduate a scar into deterministic code, how to stop a veto list from rotting, and why context compaction eats negative constraints first.

"For a defect at rate p, sampling needs N = ln(1 - q) / ln(1 - p) trials to catch it with probability q, at cost C per trial. A deterministic check costs D to build once and 0 per run. So build the deterministic check whenever D < N * C."

— HAOHAOnovai, in the Part 5 comment thread

When I opened our 375-ticket empirical ledger in Part 5, I expected people to argue about token budgets or ask how to set up a Makefile workflow. Instead, 893 readers and 63 comments did something far more useful: they walked straight past the victory lap and poked directly at the load-bearing joints of the architecture.

Every sharp question in that thread landed on one of four real production headaches. Why did prose scars hold domain-code repeat regressions to 0.0% (0 / 375) while still losing 9.87% (37 / 375) of runs to runtime tool reflexes? Where is the exact mathematical line between keeping a rule in prose and moving it into a deterministic lint or test? How do you keep a 689-scar veto list from turning into a stale, self-contradictory AGENTS.md swamp? And what happens when a long session hits context compaction and rolls up your carefully earned postmortems?

Here is the short version of what we formalized in response—and how every piece runs in our live workflow (syntheticscars.org and my Public Workflow Gist):

  • Prose hits a physical wall at 9.87%: Domain logic responds cleanly to fresh-context critique, whereas low-level tool reflexes, early-onset epistemic cascades, and harness maintenance debt require deterministic locks and Target 15 ground-truth checks.
  • Graduate scars by the D < N * C crossover: Rare regressions (p = 0.02) defeat stochastic sampling (N = 114 trials for 90% detection), and rising long-context marginal cost (C_marginal) keeps pushing the economic line toward 15ms deterministic checks.
  • Treat veto lists as garbage-collected software: Every scar moves through an explicit Active -> Dormant -> Graduated lifecycle backed by automated titration probes, Turn-2 drift gates, fresh post-compaction disk reloads, and explicit exposure denominators (N_exposed and W_soak).

If you are jumping into the series here, here is a 30-second decoder ring for two notations we use throughout the post:

  • Target 00 through Target 90: Instead of a 20-step English checklist, our agent runs a 1976 Makefile DAG (Part 3.6) backed by a 1983 /etc/init.d state directory (Part 3.7). Target 15/20 runs read-only codebase archaeology and human plan approval; Target 30 runs Red-to-Green TDD in an isolated worker subagent; Target 40 forks a fresh, un-primed Six-Pillar Adversarial Critic to try to break the uncommitted diff; Target 80 lands the verified PR; and Target 90 runs post-mortem scar consolidation.
  • SCAR-<DOMAIN>-<NN>: Every time an agent steps on a rake—or needs a human Socratic nudge at a pause gate—Target 90 compiles that collision into a permanent, numbered Synthetic Scar (The Wound, The Trap, The Circuit Breaker, and The Permanent Reflex). The prefix names the subsystem that got burned: for example SCAR-HCI-05 (human-computer interaction / blank modal gates) or SCAR-PROC-176 (workflow process / subagent polling loops).

1. Why Prose Scars Still Lose 9.87% of the Time (And Where Cascades Begin)

Let's start right at the uncomfortable row in the Part 5 ledger. Across 375 evaluated production tickets (216 open-source + 159 commercial industrial), our domain and code repeat regression rate stayed at 0.0% (0 / 375). Once an async teardown leak, a state disposal race, or a SwitchStatement AST jump got compiled into a scar and wired into planning (Target 15/20) and fresh-context review (Target 40), it stayed dead.

Yet 37 tickets (9.87%) still tripped on repeat failures—and almost every single one landed in Tickets 302–375, right after new IDE runtime tools entered the loop:

  • Blank modal collisions (SCAR-HCI-05 / SCAR-HCI-08 / SCAR-HCI-11): Firing an interactive multiple-choice modal (ask_question) with empty chat text (content: null) instead of printing the full review or landing matrix in the conversation first.
  • Subagent polling loops (SCAR-PROC-176): Ignoring reactive wakeup notifications and calling manage_subagents(list) over and over like a nervous cook opening the oven door every ten seconds.
  • Premature gate banners (SCAR-PROC-174 / SCAR-PROC-179): Declaring a review gate ready before the Critic subagent had returned its verdict.

Notice the pattern. Every single miss was a low-level tool-calling reflex, where the model's tool-use post-training pulled harder than an English paragraph in Markdown.

Early-Onset Epistemic Cascades (arXiv:2607.09510)

Two 2026 empirical audits explain why those early slips snowball so violently. First, Zhao, Li, Li, Zhao, Barr, Sarro, and Ye (Failure as a Process: An Anatomy of CLI Coding Agent Trajectories) analyzed thousands of CLI agent trajectories across Terminal-Bench, OpenHands, and Mini-SWE. Their headline finding matches what every working engineer has watched happen at a terminal: agent failure is rarely a dramatic last-minute blunder. It is an early-onset epistemic error seeded in the opening steps.

Once an agent's mental model of the repository diverges from physical disk reality at step t_0 (wrong file layout, wrong branch state, wrong assumption about an existing API), its probability of recovering decays exponentially with every subsequent turn delta_t = t - t_0:

P(Recovery | e_t0 = 1, delta_t) ~ exp(-lambda * delta_t) 

Every speculative edit and redundant grep appends confirmatory clutter to the context window, raising the energy barrier required to drop the bad premise until the session burns its budget or hits compaction.

That is why our workflow puts read-only Ground-Truth Archaeology (Target 15) before a single line of code is written. Reconciling git status, file layout, symbol definitions, and existing tests against disk while delta_t = 0 keeps recovery O(1) instead of letting a bad assumption metastasize across 35 tool turns.

Harness Maintenance Debt (arXiv:2611.08417) and the Tri-Axis Split

The second audit comes from Buchanan, Zhou, Linderman, and Ré (Benchmarks as Software: Terminal-Bench and the Case for Continuous Benchmarks). They audited long-horizon benchmark infrastructure and found that up to 30% of apparent agent failures come from benchmark maintenance debt—drifted container images, stale lockfiles, broken test assertions, and misconfigured tool shims—instead of model capability limits.

That forces a strict Tri-Axis Variance Decomposition whenever a run goes red:

flowchart TD Obs["Observed Failure Rate"] M["Axis 1: Model / Scar Gap\nGenuine missing invariant or\npre-training gravity trap"] S["Axis 2: Stochastic Sampling\nTemperature variance across\nrepeated trials (N, T)"] H["Axis 3: Harness Maintenance Debt\nDrifted SDKs, broken fixtures,\nor tool-wrapper shims (up to 30%)"] Obs --> M Obs --> S Obs --> H

If you skip that separation and blame the model for every red run, you fall straight into False Scar Accretion: stuffing prose rules into AGENTS.md to lecture an LLM about a broken test fixture or a drifting CLI wrapper. Verify deterministic environment health first; write scars only for genuine model or domain traps.

2. When to Graduate a Scar Out of Prose: The D < N * C Crossover Law

Once you accept that prose rules lose 9.87% of the time against stubborn reflexes, the obvious engineering question follows: which rules stay in Markdown, and which ones get compiled into deterministic code?

In the Part 5 thread, HAOHAOnovai laid down the cleanest economic rule I have seen for this exact decision.

Suppose a defect class escapes at per-trial rate p, and you want a stochastic verification gate (such as repeated LLM sampling or a multi-trial lab probe) to catch it with target probability q. The minimum number of independent trials N you must run is:

N(p, q) = ceil(ln(1 - q) / ln(1 - p)) 

Plug in two realistic production numbers and watch what happens:

Failure Class Escape Rate (p) Caught by N = 5 Trials (1 - (1 - p)^5) Trials Needed for q = 90% Detection Engineering Verdict
Noisy Generator Trap 0.30 (3 in 10) 83.2% 7 trials Cheaply policed by fresh-context critique (Target 40)
Rare Production Scar 0.02 (1 in 50) 9.6% 114 trials Sampling is effectively blind—graduate to deterministic code

Look at that bottom row. At a 1-in-50 escape rate (p = 0.02), a 5-trial stochastic gate lets 90.4% of failures walk right through. Catching 90% of them by sampling takes 114 independent trials.

Now price the two options. If one stochastic trial costs C (tokens + latency) and authoring a deterministic check (a 15ms AST lint, a Red-to-Green unit test, a JSON schema check, or a git pre-commit hook) costs D once and 0 per run, you graduate the scar out of prose whenever:

D < N(p, q) * C 

Even at a modest 30-second model call, 114 trials burn roughly 57 minutes of compute per detection. Almost every deterministic check you can write in Dart, Python, TypeScript, or shell lands decisively on the winning side of D < N * C.

Why Long-Context Scaling Pushes the Line Further Every Month

In a sharp follow-up comment, HAOHAOnovai pointed out something even more important: C is never a fixed constant. A tiny probe run under a small token cap costs pennies. A real production trial running inside a full agent context window L_cap pays three bills at once:

C_marginal(L_cap) = C_token(L_cap) + p_fail * C_retry + C_attention 

You pay the token cost at the actual context length where the trial runs (C_token(L_cap)), the expected retry cost when a trial fails (p_fail * C_retry), and the human attention tax to inspect the output (C_attention).

And watch the trend line. Per-token inference prices drop, and AI-assisted deterministic check-writing cost D drops right alongside them. Meanwhile, production agent context lengths L_cap keep ballooning—driving C_marginal(L_cap) upward faster than D falls. Every bump in agent context length pushes the D < N * C crossover further in favor of deleting the Markdown rule and locking the invariant in code.

One quick bookkeeping guardrail from the same thread: keep your production ticket ledger (single-shot task diversity across unfamiliar codepaths) strictly separate from your lab titration harness (repeated-trial sampling on fixed prompts reported as k / N with N explicit). Averaging those two variance budgets together gives you a composite number that moves when either input shifts while hiding which lever changed.

3. Keeping the Veto List from Going Stale (Active -> Dormant -> Graduated) & Turn-2 Probes

Right after Part 5 went live, Arslan Ahmad (on DEV.to) and Dismal-Dimension-756 (on Reddit) both asked the exact question every veteran engineer asks when they hear the number 689 scars:

"How do you keep a veto list like that from going stale as models improve and codebases evolve?"

If you treat an AGENTS.md or .cursorrules file as an append-only junk drawer, it will rot. Within six months you are paying input tokens on every single turn to warn a frontier model against a syntax quirk from two model generations ago, while newer constraints drown in the noise.

We prevent rule rot by treating the scar registry as garbage-collected software with three explicit lifecycle states and phase-scoped loading:

flowchart TD W["Production Collision or Critic BLOCKER"] A["Active Scar\nPhase-bound to exact workflow target\n(Target 15/20, Target 30, or Target 40)"] D["Dormant (Model-Superseded)\nRemoved from hot prompt;\nkept in regression probe suite (--scars=dormant)"] G["Graduated (Deterministic Lock)\nD < N * C fired: moved into AST lint,\nunit test, schema check, or git hook"] W --> A A -->|"Clean baseline passes\non newer model/toolchain"| D D -->|"Future model swap\nre-triggers trap"| A A -->|"D < N * C holds"| G

Here is how each state works in practice:

  • Active (Phase-Scoped, Never Global): An active scar is bound strictly to the workflow phase where it applies. Planning scars load at Target 15/20; implementation traps load at Target 30; review checks load at Target 40. Nothing irrelevant rides along in context.
  • Dormant (Empirically Retired, Never Erased): Every scar pairs with an automated clean-vs.-loaded titration probe (CleanRate vs. LoadedRate on a fixed reproduction harness). When a newer model or upgraded SDK stops tripping on the clean baseline, the scar moves to Dormant. It leaves the hot prompt immediately—zero wasted tokens—while remaining runnable via --scars=dormant. Why keep it around at all? Because model capabilities are non-monotonic: a future model swap or quantization tweak can resurrect a bug that went away two releases ago, and the dormant suite catches it on day one.
  • Graduated (Deleted from Prose): The moment D < N * C fires and a constraint can be enforced by a compiler lint, a unit test, a schema check, or a pre-commit hook, it graduates out of prose permanently. As we covered in Part 3.12, the best prompt rule is the one you delete because the toolchain enforces it in 15ms.

"Boring Is the Feature": The Turn-2 First-Class Gate

Even with clean titration probes, single-turn evaluations hide one of the nastiest failure modes in agentic coding: "works once" drift.

In the Part 5 thread, Atom Zero dropped a line I immediately stole for a sticky note:

"We also treat the second turn as a first-class gate... Boring is the feature."

Think about what happens in a standard single-turn benchmark. You hand a model a clean prompt, it emits a tidy answer, the assertion turns green, and you celebrate. Now watch what happens in real development on Turn 2, right after the model sees its own Turn-1 output and a follow-up requirement arrives. That is where self-anchoring, half-refactored state, and "helpful" scope creep hide.

Scoring Turn 2 on the same rows after the model has read its own Turn-1 output smokes out drift that single-turn averages completely miss. If a workflow passes Turn 1 with fireworks and wobbles on Turn 2, you have a demo. When Turn 2 is just as predictable and uneventful as Turn 1, you have an engineering system.

4. Surviving Compaction, Anti-Anchoring, & Explicit Denominators

That brings us to the final two pressure points from the thread: what happens when a long session compacts, and how to prove a 0.0% repeat regression claim is more than lucky traffic.

Why Compaction Summaries Eat Negative Constraints First

digbijoylabs put a finger straight on a universal production failure:

Past postmortems trapped in prose lose their teeth right across context compaction and prompt updates.

Watch what any summarizer does when a 180k-token session compresses down to a 4k-token recap. Summarizers are trained to preserve forward narrative momentum—the active goal, the files touched, the optimistic next step. What gets trimmed first to save tokens? Sharp, conditional negative constraints ("never call X when Y is true", "do not bypass gate Z before receipt R is hashed"). The happy-path goal survives the lobotomy; the edge-case veto gets vaporized.

We counter compaction amnesia with two mechanical rules:

  1. Keep PID 1 lean and move constraints outside the model: Fork ephemeral subagents (Target 15, Target 30, Target 40) so the orchestrator stays well below the compaction wall, and graduate high-value constraints into deterministic checks that live on disk instead of conversation history.
  2. Treat post-compaction wakeup as Turn 1: Whenever a session resumes from compaction, we never trust the rolled-up summary for workflow invariants. The agent reloads its canonical phase-bound skill files and on-disk state cards (<brain>/state/) fresh before issuing a single tool call.

Anti-Anchoring and the Identification–Execution Gap (extrapolation-n26)

Independent empirical work from Blankline Research's extrapolation-n26 (write-up) adds three sharp data points on why how you feed memory back into an agent matters as much as what you store.

In a 32-hour, 91-attempt run pairing a frozen model with an external procedural memory store (LessonStore) and an exact verifier, Blankline ran controlled ablations and uncovered three lessons that map straight onto multi-agent coding:

  • Procedures transfer; solutions do not: On tasks sharing structural conventions (report-convention.md), external memory lifted first-pass/transfer accuracy from 0% / 0% (memory OFF) to 75% / 100% (memory ON). On tasks with no shared structure (report-independent.md), memory produced a clean null result (100% / 100% vs. 90% / 100%). Caching old code snippets rots immediately; storing reusable (situation, strategy, why) tactics transfers.
  • Withholding the incumbent breaks anchoring: When Blankline handed the best-known coordinate configuration to an exploratory propose turn—even with explicit permission to ignore it—the model collapsed into local polishing (+1.7e-10). Withholding the incumbent during exploration while keeping it for targeted mutate turns produced the run's largest structural jump (+0.008075). In our workflow, that is why exploratory planners and fresh-context Critics inspect the problem contract and physical diagnostics directly instead of polishing a presumptive patch.
  • Spotting a better method in prose fails to execute it: In extrapolation-n26's provenance ledger, the model repeatedly recognized in prose that maximizing circle radii with fixed centers is an exact linear program (LP), yet reverted on every single attempt to a greedy grow-to-fit heuristic until a human wrote the LP script (scripts/lp-radii.mjs). Awareness in commentary never beats pre-training gravity on its own; you need a hard circuit breaker or a deterministic tool.

Explicit Denominators: N_exposed and W_soak

Finally, Raju Dandigam and Alex Shev pressed on the right scientific guardrail for our headline metric: a 0.0% repeat regression rate is only meaningful if you publish the denominator.

If you write a scar for an obscure SwitchStatement AST edge case and never touch an AST visitor again for the next 100 tickets, scoring 0 / 100 proves nothing about that scar. Likewise, if a diff merges cleanly on Friday afternoon and nobody runs that codepath in production for three weeks, merge-time green is only half the story.

So we added two explicit denominator fields (Theorem 362.d) to our empirical ledger:

  • Per-Scar Opportunity Exposure (N_exposed): How many subsequent tickets touched the guarded boundary (for example, stream teardowns vs. AST visitors), separating battle-tested scars from unexercised ones.
  • Post-Merge Observation Window (W_soak): The monitored invariant, elapsed soak duration after Target 80 landing, and rollback/hotfix status per ticket.

Zero repeat regressions with N_exposed = 0 is an untested hypothesis. Zero repeat regressions across high N_exposed and completed W_soak is earned trust.

5. Summary & What's Next

If you want your AI coding guardrails to survive past Month 2 without turning into a 2,000-line AGENTS.md museum, treat them like production code instead of wishful prose:

  • Separate the three error axes: Distinguish genuine model/scar gaps from stochastic sampling variance and harness maintenance debt (arXiv:2611.08417), and catch early epistemic drift at t_0 with read-only archaeology (Target 15).
  • Graduate scars by D < N * C: Once a failure rate drops below 1 / N—and as long-context C_marginal(L_cap) climbs—stop burning sampling turns and lock the invariant in a 15ms deterministic check.
  • Garbage-collect your veto list: Move scars cleanly across Active -> Dormant -> Graduated using automated titration probes, keep dormant probes runnable against non-monotonic model regressions, and gate on Turn 2 ("Boring is the feature.").
  • Never trust a compaction summary for negative rules: Reload phase-bound invariants fresh from disk after compaction, withhold incumbents during exploratory turns, and pair 0.0% regression claims with N_exposed and W_soak.

You can explore the full public scar catalog, theoretical sections, and methodology at syntheticscars.org, or grab the runnable Makefile DAG and phase-bound references directly from my Public Workflow Gist.

Next Up in Part 7: The Funes Paradox & Human Scar Atrophy

Now that we know how to keep an agent's memory from rotting, there is a sharper mirror waiting for us: what happens to human engineering judgment when AI smooths away the hot stove? In Part 7, we dig into Borges's Funes the Memorious (why remembering everything destroys generalization) and Human Scar Atrophy—how to keep junior and senior developers building real systems instincts when the workbench catches 95% of the bruises first.

📚 The Synthetic Scars Series on DEV.to

What is the oldest rule still sitting in your team's AGENTS.md or .cursorrules that nobody has checked in six months—and which one should have graduated into a 15ms lint or test by now? Let me know in the comments!