differential-session-runner
Skill104 starsChanged 8 months agoMITView on GitHub
Run or continue a differential debugging session between two implementations, traces, captures, or outputs. Record artifact identity, exact commands, first mismatch progression, findings, validation, and next probe in a durable session log.
In this repository7 other files it gives its agents.
- agents-md-mapperSkill
- ast-grep-setupSkill
- execute-phaseSkill
- harness-mapSkill
- plan-phaseSkill
- qa-from-executeSkill
- research-phaseSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
25 rules. About 0 are common, 23 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈23
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Use this skill when debugging requires a durable evidence trail rather than ad hoc notes.
- Distinctive: line 26
before vs after replay output
- Distinctive: line 33
Use this skill when the user asks to:
- Distinctive: line 37
create or update a debugging session log
- Distinctive: line 39
document what changed between mismatched and cleared runs
- Distinctive: line 58
If the repo already has a native evidence location, use it.
- Distinctive: line 66
If the repo does not already have a native convention, write to:
- Distinctive: line 75
Before creating anything, search for:
- Distinctive: line 83
Read the relevant guidance and continue the repo's existing pattern.
- Distinctive: line 95
If a content hash is possible, record it early and use it as the main session identity.
- Distinctive: line 99
Search existing sessions for the artifact identity.
- Distinctive: line 101
If a session already exists for the same artifact/hash, append to that session.
- Distinctive: line 102
If the artifact identity is new, create a new session and update the session index if the repo has one.
- Distinctive: line 116
Never summarize commands loosely.
- Distinctive: line 129
If later fixes move the mismatch frontier, append the new progression rather than deleting the old one.
- Distinctive: line 133
Write findings as evidence-backed observations, not guesses.
- Distinctive: line 143
If code changes are made during the investigation, capture them in a separate section:
- Distinctive: line 149
If no changes were made, state that explicitly.
- Distinctive: line 161
Do not write "fixed" without a validation section.
- Distinctive: line 165
Every session should end with one of:
- Distinctive: line 214
use hashes or artifact IDs to avoid ambiguous session naming
- Distinctive: line 243
After updating the session artifact:
- Very specific: line 245
if the investigation uncovered code work, hand off to plan-phase
- Very specific: line 246
if code work is already scoped in a plan, hand off to execute-phase
- Distinctive: line 247
if the investigation is complete, send the user the session path and a one-line status
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Differential Session Runner
Use this skill when debugging requires a durable evidence trail rather than ad hoc notes.
This skill is for workflows where you are comparing:
- original vs rewrite
- implementation A vs implementation B
- baseline trace vs candidate trace
- before vs after replay output
- captured artifact vs regenerated artifact
The goal is not only to investigate. The goal is to leave behind a session artifact another operator or agent can continue.
When to Use
Use this skill when the user asks to:
- continue a differential debugging session
- compare two implementations and record mismatches
- create or update a debugging session log
- track replay / trace / capture divergence over time
- document what changed between mismatched and cleared runs
Core Principle
Every differential investigation should produce a reusable evidence packet.
A good session artifact lets another operator answer:
- what exact artifact was investigated?
- how was it identified?
- what commands were run?
- where did the first mismatch appear?
- what was learned?
- what changed?
- what validation proves the current state?
- what should happen next?
Preferred Storage
If the repo already has a native evidence location, use it.
Examples:
docs/.../sessions/docs/chunks/analysis/.../reports/- existing session indexes
If the repo does not already have a native convention, write to:
memory-bank/evidence/YYYY-MM-DD_HH-MM-SS_<topic>-session.md- optional index:
memory-bank/evidence/index.md
Workflow
1. Load the repo's evidence convention first
Before creating anything, search for:
- playbooks / runbooks
- session indexes
- prior session files
- report directories
- chunk/evidence templates
Read the relevant guidance and continue the repo's existing pattern.
2. Identify the artifact under investigation
Capture the strongest available identity for the artifact:
- artifact path
- SHA256 / content hash
- commit SHA
- case name / run id / replay id
- timestamp if needed
If a content hash is possible, record it early and use it as the main session identity.
3. Decide whether to continue or create
Search existing sessions for the artifact identity.
- If a session already exists for the same artifact/hash, append to that session.
- If the artifact identity is new, create a new session and update the session index if the repo has one.
4. Record baseline comparison commands
Capture the exact commands used for the first comparison step.
Examples:
python compare.py --baseline out/a.json --candidate out/b.json
pytest tests/test_replay.py -k case_17
mytool diff trace_a.cdt trace_b.cdtNever summarize commands loosely. Record them exactly.
5. Record first mismatch progression
Capture the first relevant divergence and, if applicable, how it moved over time.
Examples:
- first bad tick
- first mismatched field
- first unexpected output line
- first extra/missing RNG draw
- first snapshot diff
If later fixes move the mismatch frontier, append the new progression rather than deleting the old one.
6. Record key findings
Write findings as evidence-backed observations, not guesses.
Good findings:
- identify the mismatched subsystem or callsite
- name the field or branch that diverged
- note whether the issue self-heals or persists
- connect the mismatch to a concrete code path or state transition
7. Record landed changes separately
If code changes are made during the investigation, capture them in a separate section:
- files changed
- short description of each change
- tests added or updated
If no changes were made, state that explicitly.
8. Record validation
List the validation commands and their results.
Examples:
- replay passes end-to-end
- diff result is now clean
- targeted tests pass
- health check passes
Do not write "fixed" without a validation section.
9. Set the next probe
Every session should end with one of:
- cleared / no next probe required
- one explicit next investigation target
- one blocked dependency or missing tool/input
Recommended Session Template
---
title: "<topic> – Differential Session"
phase: Evidence
date: "YYYY-MM-DD HH:MM:SS"
owner: "<agent_or_user>"
tags: [evidence, differential, <topic>]
---
## Artifact
- Path: `<path>`
- Identity: `<sha256|commit|case-id>`
## Baseline Commands
- `<exact command 1>`
- `<exact command 2>`
## First Mismatch Progression
- baseline: `<first mismatch>`
- after fix 1: `<new frontier>`
- after fix 2: `<cleared|new mismatch>`
## Key Findings
- finding 1
- finding 2
## Landed Changes
- `path/to/file` → change summary
- `tests/...` → validation coverage added
## Validation
- `<command>` → `<result>`
- `<command>` → `<result>`
## Outcome / Next Probe
- `<cleared | next probe | blocked reason>`Good Session Behavior
- preserve earlier mismatch states instead of overwriting them
- use hashes or artifact IDs to avoid ambiguous session naming
- record exact commands so another operator can replay the same evidence path
- separate findings from fixes
- separate fixes from validation
Bad Session Behavior
- "Investigated replay issue and fixed some stuff"
- omitting the artifact identity
- omitting commands
- replacing prior mismatch history with the latest state only
- claiming success without validation evidence
Output Requirements
A completed session artifact should make handoff possible with no hidden context.
It must include:
- artifact identity
- exact commands
- first mismatch progression
- key findings
- landed changes or explicit no-change note
- validation evidence
- next probe or clear outcome
Handoff
After updating the session artifact:
- if the investigation uncovered code work, hand off to
plan-phase - if code work is already scoped in a plan, hand off to
execute-phase - if the investigation is complete, send the user the session path and a one-line status
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

