agentleFS
alphacrackalphacrack/readme2demo/.claude/skills/add-failure-class/SKILL.md

add-failure-class

Skill9 starsChanged 4 months agoMITView on GitHub

The workflow for turning a newly diagnosed readme2demo run failure into a permanent, tested defense. Use after debug-run identifies a failure mechanism that is not yet in CLAUDE.md's known-failure-classes table.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every robustness feature in this repo came from a real failed run processed through exactly these steps.

    line 8
  2. Distinctive:

    Code first, prompt second: If the fix involves an LLM behaving differently, the prompt edit gets a sibling code-level check or validation — …

    line 29
  3. Distinctive:

    Document: add a numbered entry to CLAUDE.md "Known failure classes" (symptom → mechanism → defense location).

    line 40
  4. Distinctive:

    never make an unproven command grounded (add a negative test: the evil variant is still rejected),

    line 50

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

Adding a failure class (the maintenance meta-workflow)

Every robustness feature in this repo came from a real failed run processed through exactly these steps. Do them in order; skipping the test or the CLAUDE.md entry is how knowledge evaporates.

Steps

  1. Name the mechanism, not the symptom. "verify exit 1" is a symptom; "findings tools exit nonzero on success and set -e kills the assertion" is a mechanism. You must be able to say which two components disagreed about an assumption.
  2. Pick the owning module (one, occasionally two):
    • agent behavior → prompts/agent.md rule AND a detector in normalize.py (rule 6 + repo_files_edited is the template)
    • command equivalence → distill.normalize_cmd / _grounded_candidates (always symmetric, both directions tested)
    • replay semantics → distill._render_commands_sh (assertion block) or verify.py
    • video → templates/demo.tape.j2 / render.py gates
    • parsing → the engine adapter, kept pure and tolerant
  3. Code first, prompt second. If the fix involves an LLM behaving differently, the prompt edit gets a sibling code-level check or validation — prompts alone are not defenses.
  4. Regression test named for the run. Docstring starts with """Regression (<repo> run): ...""" describing the real failure. Must fail on the old code. Tests stay free of docker/network/API.
  5. Repair the triggering run cheaply (see debug-run skill) and give the exact resume command.
  6. Document: add a numbered entry to CLAUDE.md "Known failure classes" (symptom → mechanism → defense location). If the class is user-visible, consider a line in README or the troubleshooting-relevant prompt.
  7. Full suite green (python -m pytest tests/ -q) before claiming done.

Quality bar for grounding changes

New equivalences (like the 2>&1 or pipe-variant rules) must:

  • apply to BOTH the candidate set and the queried command (symmetry),
  • never make an unproven command grounded (add a negative test: the evil variant is still rejected),
  • be documented in the is_grounded docstring's accepted-forms list.

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.