debug-run
Skill9 starsChanged 4 months agoMITView on GitHub
Debug a failed, unverified, or low-quality readme2demo pipeline run. Use when a run fails at any stage, verify won't pass, the demo video is short or missing steps, generated docs lack detail, or the user pastes readme2demo CLI output showing a failure.
In this repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- docs/llms.txtllms.txt
- add-engineSkill
- add-failure-classSkill
- docker-sandboxSkill
- git-github-operatorSkill
- python-standardsSkill
- sandbox-toolchainsSkill
- vhs-videoSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Every run leaves complete evidence in runs/<run-id>/.
- Distinctive: line 72
If the cause is new, follow the add-failure-class skill: systemic code fix + regression test + CLAUDE.md failure-class entry.
≈ “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
Debugging a readme2demo run
Every run leaves complete evidence in runs/<run-id>/. Read evidence before
theorizing — the answer is almost always in three files.
Evidence map
| File | Tells you |
manifest.json | which stage failed, stage meta (outcome, adjusted_success, source_modified, guide_steps_unattempted, tape_coverage), verified flag, cost |
command_log.json | every command the agent ran, exit codes, outputs, FIX markers, findings_success flags |
verify.log | the clean-container replay, bash -x traced; last + cmd before silence = point of death; ===== ATTEMPT n ===== separates tries |
commands.sh | what verify executed — preamble (harness clone), steps, assertion block |
step_by_step.md + tape_coverage.json | what made the docs/video and what was dropped (with reasons) |
transcript.ndjson | raw agent stream (only needed for parser bugs) |
Decision tree
- ingest failed → planner/LLM issue or infeasible repo (read plan.json blockers). Infeasible is often CORRECT behavior.
- agent failed/blocked → read final assistant text in command_log result + failed entries. Check for the cutoff-denial pattern ("X isn't released yet") and infrastructure rabbit holes (fake sockets). Blocked for credentials/GPU is correct behavior.
- distill failed (ungrounded) → compare the rejected command against
the log: usually a syntax-equivalence gap (whitespace, 2>&1, env prefix,
chain, pipe-cap, heredoc body). Fix in
normalize_cmd/_grounded_candidatessymmetrically, never by weakening validation. - verify failed → tail the last attempt in verify.log. Common causes in
order: missing setup step, cwd drift (run
verify.cwd_hintson the script), findings-tool nonzero exit reachingset -e, wrong expected_pattern, agent had patched source (manifest source_modified). - render failed → duration gate (steps didn't play → stale image or tape bug), VHS parse error (quoting), disk exhaustion (docker system prune), socket permissions if the tape manages containers.
- docs/video missing steps →
tape_coverage.jsondropped list + normalize's guide_steps_unattempted meta. Unattempted = agent never ran it (needs fresh agent run); dropped = grounding gap (fixable + tape regenerable without LLM).
Cheap repairs (no agent re-run)
The artifact writers are pure functions. From the repo root:
# regenerate guide + tape for an existing run after a code fix
PYTHONPATH=src python3 - <<'EOF'
from pathlib import Path
from readme2demo.distill import tape_from_guide, write_tape
from readme2demo.tutorial import write_step_by_step
from readme2demo.types import CommandLog, Plan, TutorialOutline
rd = Path("runs/<run-id>")
plan = Plan.model_validate_json((rd/"plan.json").read_text())
log = CommandLog.model_validate_json((rd/"command_log.json").read_text())
outline = TutorialOutline.model_validate_json((rd/"tutorial_outline.json").read_text())
write_step_by_step(rd, plan, outline, log, verified=False, repo_url="<url>")
write_tape(tape_from_guide((rd/"step_by_step.md").read_text(), log, [], "<url>"), rd)
EOFcommands.sh and plan.json can be patched by hand for one run; then
readme2demo resume runs/<run-id> --from-stage <verify|tutorial|render>.
Resume from the EARLIEST stage whose inputs changed, never earlier.
After the diagnosis
If the cause is new, follow the add-failure-class skill: systemic code fix + regression test + CLAUDE.md failure-class entry. A run-specific patch without a systemic fix just schedules the same debugging session for the next repo.
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.

