/jleechan-skills:ablation runs instead · from jleechan-skills
Runs controlled ablation experiments on stochastic or LLM bugs: replays real captured input through the production path, one variable per arm, with a control arm first.
This skill never runs in Claude Code
It ships in jleechan-skills at .claude/, but /jleechan-skills:ablation (a command, or a skill Claude Code finds first) has the same name: typing it, or Claude choosing it, runs that one instead.
For any disputed cause in a model-driven or stochastic system, manipulate the real captured input and replay it through the real production path, one variable per arm, with a verbatim control arm run first.
A plausible mechanism is not evidence of causation. A code reading is a hypothesis. A single clean run is not a fix. The control's base rate is the measurement that makes every other arm interpretable — run it first, report it, and never skip it.
Origin: 2026-08-18, worldarchitect.ai campaign time-travel. Three documents, one PR, and a multi-lane investigation theorized the root cause; a 5-arm ablation refuted the shipped fix in ~30 minutes and revealed the bug was 80% stochastic, invalidating every N=1 result in the incident — including the fix PR's own evidence bundle.
Do NOT reach for this when the failure is deterministic and a unit test reproduces it — just write the test.
Not a reconstruction, not a synthetic fixture — the actual captured payload from the
failing event. Look in provider/forensics capture mirrors, BigQuery payload tables, and
worktree-local *_forensics.jsonl files.
Confirm it is the right specimen by CONTENT, never by timestamp proximity. Match multiple independent fields against the persisted record of the failure (e.g. the stored output document): byte-identical state updates, verbatim summary text, verbatim narrative opening, matching headers. State how you confirmed it.
Read the code to find what production actually invokes, then call that. Not a convenient SDK equivalent, not a CLI wrapper you construct yourself.
If the production path applies its own transformation (prompt wrapping, tool loop, retries), that is acceptable only because it is constant across arms. Say so explicitly; do not claim you made a bare API call when you didn't.
Replay the payload verbatim, N≥5. Report the failure ratio.
If the control does not reproduce, stop: your specimen or instrument is wrong, and every downstream arm is void. If it reproduces at less than 100%, that base rate is the single most important number you will produce — it determines what any treatment arm can mean.
Each arm changes exactly one thing from the control. Hold constant, and state that you held constant: model string, system instruction, generation config, safety settings, and every field except the one under test.
Read the model string from the captured payload rather than hardcoding it — that way it provably cannot drift between arms.
Include a size-matched / structure-matched control whenever your treatment removes a large fraction of the input. Removing 40% of a payload confounds "the content mattered" with "the volume mattered", and those imply opposite fixes. The matched arm removes an equivalent mass of different content.
Prefer same-offset replacement over deletion when isolating a string or block: deletion shifts every downstream offset and confounds content with position. Swap in a neutral placeholder of equal length instead.
Programmatically assert what you removed or changed — indices, byte/char deltas, and a positive assertion that the target is (or isn't) present. Print it.
This is where ablations silently die. A filter that matches nothing produces a "treatment" arm identical to the control, and it will look like a null result.
Write a scoring function; do not eyeball. Search the entire raw response, not one field — field names drift between runs and a field-scoped check under-counts.
Count semantic recurrences, not just literal ones. If you removed a string and the model paraphrases it, that is still a failure — and the fact that it paraphrased is itself a finding.
Always X/N vs control's Y/N. Give P under the null (that the treatment did nothing) and
say what N can and cannot support.
| Control base rate | Result | P under null | Reading |
|---|---|---|---|
| 80% | 0/5 | 0.2^5 ≈ 0.03% | Real signal |
| 80% | ≤2/5 | ≈ 5.8% | Borderline, not confirmatory |
| 80% | 3/3 fail | 0.8^3 ≈ 51% | Refutes SUFFICIENCY; proves nothing about zero-effect |
| 80% | any 1 run | 20% clean by chance | Worthless |
Rules of thumb:
X/Y = Z% with Y named. A real instance: "85.4% of
the compact delta" got reported as "96.9%" because the text-only sum was the actual
denominator.Each run row must record: arm label, run index, ok/error, duration, resolved model string, provider type, the full raw response, and the parsed scoring fields. Model and provider per row are routinely omitted and routinely wanted later — stamp them.
Keep superseded runs on disk for audit, and mark them do not cite. A corrected rerun that silently overwrites a buggy one destroys the trail that proves you caught the bug.
Write the methodology up separately from the results, and include a known weaknesses section. If you did not isolate which element of a removed block was responsible, say so — that is the next experiment, and the fix spec depends on it.
## Ablation summary
- Specimen: <path, size, how confirmed by content>
- Instrument: <production call path; transformations constant across arms>
- Control (Arm A): <X/N> failed -> base rate <R>%
- Arm <n>: <one-variable change> -> <X/N>, P(null) = <p>
- Verdict: <hypothesis> CONFIRMED | REFUTED-AS-SUFFICIENT | INCONCLUSIVE
- Not established: <what this cannot show>
- Next experiment: <the discriminating test still unrun>
Campaign regressed to its opening scene at Turn 131. Five arms, N=5, real payload, real provider:
| Arm | Manipulation | Failed |
|---|---|---|
| A | verbatim (control) | 4/5 — base rate 80%, NOT deterministic |
| B | remove the 6 occurrences of the suspected trigger string | 3/3 — refutes sufficiency |
| C | strip one word from 3 fields | inconclusive by design — word persisted elsewhere; reported, not counted |
| D | remove history entries 0-6 wholesale | 0/5, P ≈ 0.03% |
| E | keep 0-6, remove an equivalent mass of other entries | 5/5 — volume refuted |
D vs E is what made it a cause rather than a correlation. It also exposed that the shipped fix removed only 3% of what worked — it kept the single largest entry, which matched neither of its filter markers.
What SKILL.md sets; muted values are Claude Code's defaults
Claude Code refuses to install this plugin
.claude-plugin/plugin.json: commands: Invalid input, agents.0: Invalid string: must start with "./", agents.0: Invalid string: must end with ".md", skills.0: Invalid string: must start with "./"
.claude-plugin/plugin.json: commands: Invalid input, agents.0: Invalid string: must start with "./", agents.0: Invalid string: must end with ".md", skills.0: Invalid string: must start with "./"
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
242 skills in this plugin
/4layer/4layer - Four-Layer Minimal Repro Testing Protocol/accept-adapt-rejectTriage incoming feedback into Accept / Adapt / Reject buckets with structured verdicts and follow-up actions. Triggers on /aar, /accept-adapt-reject, or review triage./adjustment-proofUse when proving, rejecting, or deleting backend adjustment registry entries with real LLM evidence and independent disabled-adjustment worktrees./adviceUse when a focused second opinion is needed; collect the applicable independent, full-coverage reviewer votes on an exact change or saved-document bundle.