agentleFS
D-SheyD-Shey/autoharness/.agents/skills/consequence-simulation/SKILL.md

consequence-simulation

Skill10 starsChanged todayMITView on GitHub

Simulate action consequences, blast radius, and reversibility tiers before human-in-the-loop approvals

  • Deletes or force-pushes

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are 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.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use before requesting user approval or executing high-impact actions (file deletions, gateway reconfigurations, migrations, architectural …

    line 9
  2. Very specific:

    Use AST Call Graph (codemap.analyze_impact) to locate direct callers, callees, and impacted test suites.

    line 21
  3. Very specific:

    Run pytest tests/test_consequence_simulation.py to verify risk categorization and blast radius calculations.

    line 33
  4. Very specific:

    Run autoharness permissions simulate <action> and check terminal output.

    line 34
  5. Very specific:

    Verify Gateway MCP tool harness_simulate_action.

    line 35

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

consequence-simulation

When to use

Use before requesting user approval or executing high-impact actions (file deletions, gateway reconfigurations, migrations, architectural boundary edits). Grounded in Hugging Face arXiv:2610.40753, this skill replaces blind confirmation prompts with structured consequence simulations.

Steps

  1. Action Classification: Identify action type: file_delete, file_modify, gateway_reconfig, command_exec, schema_change.
  2. Reversibility Tier Assignment:
    • IRREVERSIBLE: Deleting untracked files, dropping tables, git clean -fdx, overwriting data without backup.
    • HIGH_RISK: Reconfiguring MCP gateway (gateway.json), modifying core state or security integrity keys, editing files with wide blast radius (>5 dependents).
    • REVERSIBLE: Modifying git-tracked files, creating new tests or branches, editing isolated utilities.
    • READ_ONLY: Static inspection, queries, AST codemap, test runs without side-effects.
  3. Blast Radius Analysis:
    • Compute affected files and directory hierarchy.
    • Use AST Call Graph (codemap.analyze_impact) to locate direct callers, callees, and impacted test suites.
    • Detect if boundary rules or architectural layers are breached.
  4. Generate Consequence Manifest:
    • Format a clear Markdown/JSON summary outlining:
      • Action & Target
      • Reversibility Tier & Risk Score (0-100)
      • Impacted Files & Symbols
      • Rollback Plan / Recovery Path
  5. Present to User / Agent:
    • Deliver the simulation report alongside the approval dialog.

How to verify

  1. Run pytest tests/test_consequence_simulation.py to verify risk categorization and blast radius calculations.
  2. Run autoharness permissions simulate <action> and check terminal output.
  3. Verify Gateway MCP tool harness_simulate_action.

Facts found here

  • Hugging Face arXiv:2610.40753 demonstrates that providing consequence simulation reduces catastrophic agent errors by over 60% compared to binary "Allow/Deny" prompts.

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.