Coding-agent reasoning
Reason From Experience
Turn prior coding outcomes into better next actions instead of merely retaining them as memory.
The distinction
Memory is evidence. Intuition changes the move.
Memory answers what happened. Intuition asks what those outcomes imply here, what is materially different now, and why the next move should work when a similar one did not.
Public and installable
Add it to Codex.
Use $skill-installer to install https://github.com/Agent-Pattern-Labs/public-agent-skills/tree/main/skills/reason-from-experience Use $reason-from-experience to choose the next coding action from prior attempts and current evidence. Use this when
Use this skill for stubborn debugging, trial-and-error loops, long sessions, agent handoffs, implementation choices, postmortems, or any moment when another plausible attempt risks repeating the same underlying premise.
The experience loop
- Define the target and observable success condition.
- Recover only relevant attempts, commands, test outcomes, logs, diffs, and environment facts.
- Fingerprint the current situation by symptom, layer, execution path, input, and state change.
- Compare that fingerprint with prior attempts and separate causal changes from cosmetic variations.
- Explain why the proposed move follows from the comparison, especially when retrying something similar.
- Choose the smallest action that distinguishes competing explanations and predict its result.
- Run the action, classify the evidence, and update the working model.
- Compress the outcome into a conditional lesson with an explicit boundary.
Ten transfer cases
Build intuition by mechanism, not vocabulary.
Each case shows how prior outcomes should change the next move. The full scenario library ships with the skill.
A test passes alone but fails in the suite
Investigate state lifetime before local logic because prior execution is the differentiating variable.
Longer async retries preserve flakiness
Synchronize on the causal state transition instead of elapsed time.
Valid configuration edits have no effect
Verify which file the process reads before changing configuration semantics again.
A dependency upgrade exposes a failure
Distinguish a changed contract from newly detected misuse before blaming the dependency.
Fresh sessions work while old sessions stay stale
Inspect retained client or edge state before repeating origin-cache changes.
A local optimization does not move latency
Remeasure the whole path and optimize the dominant measured component.
A parser gains one patch per example
Infer the missing grammar or invariant before adding another branch.
Logging makes a concurrency bug disappear
Treat observation as a causal variable and switch to schedule-aware evidence.
A migration works only on empty databases
Test representative data shape, locks, and operational conditions before changing syntax.
A visual UI fix breaks interaction
Reason about paint order, hit testing, focus, and scrolling as one system.