agentleFS
alchemiststudiosDOTaialchemiststudiosDOTai/harness-engineering/skills/differential-session-runner/SKILL.md

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.

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
  1. Distinctive:

    Use this skill when debugging requires a durable evidence trail rather than ad hoc notes.

    line 19
  2. Distinctive:

    before vs after replay output

    line 26
  3. Distinctive:

    Use this skill when the user asks to:

    line 33
  4. Distinctive:

    create or update a debugging session log

    line 37
  5. Distinctive:

    document what changed between mismatched and cleared runs

    line 39
  6. Distinctive:

    If the repo already has a native evidence location, use it.

    line 58
  7. Distinctive:

    If the repo does not already have a native convention, write to:

    line 66
  8. Distinctive:

    Before creating anything, search for:

    line 75
  9. Distinctive:

    Read the relevant guidance and continue the repo's existing pattern.

    line 83
  10. Distinctive:

    If a content hash is possible, record it early and use it as the main session identity.

    line 95
  11. Distinctive:

    Search existing sessions for the artifact identity.

    line 99
  12. Distinctive:

    If a session already exists for the same artifact/hash, append to that session.

    line 101
  13. Distinctive:

    If the artifact identity is new, create a new session and update the session index if the repo has one.

    line 102
  14. Distinctive:

    Never summarize commands loosely.

    line 116
  15. Distinctive:

    If later fixes move the mismatch frontier, append the new progression rather than deleting the old one.

    line 129
  16. Distinctive:

    Write findings as evidence-backed observations, not guesses.

    line 133
  17. Distinctive:

    If code changes are made during the investigation, capture them in a separate section:

    line 143
  18. Distinctive:

    If no changes were made, state that explicitly.

    line 149
  19. Distinctive:

    Do not write "fixed" without a validation section.

    line 161
  20. Distinctive:

    Every session should end with one of:

    line 165
  21. Distinctive:

    use hashes or artifact IDs to avoid ambiguous session naming

    line 214
  22. Distinctive:

    After updating the session artifact:

    line 243
  23. Very specific:

    if the investigation uncovered code work, hand off to plan-phase

    line 245
  24. Very specific:

    if code work is already scoped in a plan, hand off to execute-phase

    line 246
  25. Distinctive:

    if the investigation is complete, send the user the session path and a one-line status

    line 247

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.cdt

Never 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.