agentleFS
GabrieleDattileGabrieleDattile/agent-superpowers/skills/debugging/ghost-runner/SKILL.md

ghost-runner

Skill1 starsChanged 15 days agoMITView on GitHub

Zero-assumption autonomous bug replicator. Prohibits touching production code until a minimal failing test reproduces the bug in isolation.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

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

    Analyze Bug Context: Read the error message, logs, or user description.

    line 30
  2. Very specific:

    Create a minimal standalone test script (e.g.

    line 32
  3. Distinctive:

    Run the full existing test suite to confirm zero regressions were introduced.

    line 49

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

🔬 Skill: Ghost-Runner (Zero-Assumption Bug Reproducer)

1. When to Trigger (Routing)

  • TRIGGER WHEN:
    • The user reports a bug, exception, stack trace, or failing pipeline.
    • The user asks to "fix this error", "why is this failing", or "resolve the bug".
  • DO NOT TRIGGER WHEN:
    • The user is asking for a pure refactor or greenfield feature development where no regression or defect exists.

2. Fundamental Philosophy

"No code modification without scientific proof of defect." AI agents frequently introduce regressions by hallucinating assumptions about what broke. Ghost-Runner forces a strict Test-Driven Remediation (TDR) loop.


3. Operational Protocol (Step-by-Step)

Phase 1: Isolation & Minimal Reproducible Example (MRE)

  1. Analyze Bug Context: Read the error message, logs, or user description.
  2. STRICT CONSTRAINT: DO NOT TOUCH THE TARGET SOURCE CODE YET.
  3. Create a minimal standalone test script (e.g. test_reproduce_<issue>.py).
  4. Execute the test using the Ghost-Runner runner:
    python skills/debugging/ghost-runner/scripts/ghost_runner.py run --test <path_to_test>
  5. Phase Gate 1: The test MUST FAIL (RED) with the exact symptom reported. If the test passes or errors out on syntax, the MRE is invalid. Refine until you have a genuine red test.

Phase 2: Surgical Patch

  1. Formulate the minimal surgical fix in the codebase.
  2. Apply the change to the target file(s). Do not modify surrounding unrelated logic.

Phase 3: Verification & Regression Check

  1. Re-run the Ghost-Runner verification:
    python skills/debugging/ghost-runner/scripts/ghost_runner.py verify --test <path_to_test>
  2. Phase Gate 2: The test MUST PASS (GREEN).
  3. Run the full existing test suite to confirm zero regressions were introduced.
  4. Clean up temporary test files or persist the test into the project's official test directory.

4. Guardrails & Negative Constraints

  • ❌ NEVER edit source code files before observing the MRE fail.
  • ❌ NEVER suppress errors with blanket try...except: pass or mock away the actual failure.
  • ❌ NEVER conclude a bug is fixed without automated execution verification.

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.