agentleFS
alphacrackalphacrack/readme2demo/.claude/skills/debug-run/SKILL.md

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.

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
  1. Very specific:

    Every run leaves complete evidence in runs/<run-id>/.

    line 8
  2. Distinctive:

    If the cause is new, follow the add-failure-class skill: systemic code fix + regression test + CLAUDE.md failure-class entry.

    line 72

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

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

FileTells you
manifest.jsonwhich stage failed, stage meta (outcome, adjusted_success, source_modified, guide_steps_unattempted, tape_coverage), verified flag, cost
command_log.jsonevery command the agent ran, exit codes, outputs, FIX markers, findings_success flags
verify.logthe clean-container replay, bash -x traced; last + cmd before silence = point of death; ===== ATTEMPT n ===== separates tries
commands.shwhat verify executed — preamble (harness clone), steps, assertion block
step_by_step.md + tape_coverage.jsonwhat made the docs/video and what was dropped (with reasons)
transcript.ndjsonraw agent stream (only needed for parser bugs)

Decision tree

  1. ingest failed → planner/LLM issue or infeasible repo (read plan.json blockers). Infeasible is often CORRECT behavior.
  2. 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.
  3. 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_candidates symmetrically, never by weakening validation.
  4. verify failed → tail the last attempt in verify.log. Common causes in order: missing setup step, cwd drift (run verify.cwd_hints on the script), findings-tool nonzero exit reaching set -e, wrong expected_pattern, agent had patched source (manifest source_modified).
  5. 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.
  6. docs/video missing steps → tape_coverage.json dropped 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)
EOF

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

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.