agentleFS
DITlieDDITlieD/ELAI-archive/.agents/skills/impact-check/SKILL.md

impact-check

Skill24 starsChanged 2 months agoMITView on GitHub

Pre-edit blast-radius safety. Triggers on the FIRST Write or Edit of an EXECUTING phase that touches files under F:\.ELAI_workflow\.elai_cc\crates\, F:\.ELAI_workflow\.elai_cc\python\, or any cross-language pair location (sidecar/dashboard). Spawns impact-mapper agent. Caches result so subsequent edits in the same session don't re-run unless files change.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After any cargo refactor that touches >5 files

    line 17
  2. Very specific:

    Check cache. If workflow/sessions/{session_id}/blast-radius.md exists AND its mtime is newer than the newest file in the planned-edit list, …

    line 23
  3. Very specific:

    Wait for completion. The agent writes workflow/sessions/{session_id}/blast-radius.md.

    line 34
  4. Distinctive:

    Read blast-radius.md. Apply gates:

    line 36
  5. Very specific:

    If CROSS_LANG_RISK lists any pair (Rust↔Python, Tauri↔Svelte, etc.): a.

    line 39
  6. Very specific:

    If consumers count >= 3 cross-crate AND the active B-N file's WIRING_CONTRACT block was not updated this session: Tell user: "Edits affect …

    line 45
  7. Distinctive:

    Don't block — just warn.

    line 47
  8. Distinctive:

    If overall SCIP confidence is LOW (<0.3): emit a note suggesting that callers may exist that elai.map missed (macro-generated code, …

    line 50
  9. Very specific:

    If any planned file is in the auto-monolith list (task_runner.rs, live_cli.rs, pipeline.rs, dashboard-v2/src-tauri/src/lib.rs, …

    line 54
  10. Very specific:

    If user proceeds: write workflow/sessions/{session_id}/blast-radius-acknowledged.flag to skip GATE A on subsequent edits in same session.

    line 57

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “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

Impact-check pre-edit safety

Trigger: any of these

  • First Write/Edit of session targeting F:.ELAI_workflow.elai_cc\crates***.rs
  • First Write/Edit targeting F:.ELAI_workflow.elai_cc\python***.py
  • First Write/Edit targeting F:.ELAI_workflow.elai_cc\crates\dashboard-v2\src\lib**
  • After any cargo refactor that touches >5 files

Skip: edits to memory-bank, workflow/, .Codex/ tooling, or test files only.

PROTOCOL

  1. Check cache. If workflow/sessions/{session_id}/blast-radius.md exists AND its mtime is newer than the newest file in the planned-edit list, use the cached version. Skip to step 5.
  2. Determine planned files. Get the list of files the main model intends to edit in this batch. (If unclear, ask user; default to the last 5 files mentioned in the active task.)
  3. Determine planned symbols (optional, improves precision). For each planned file, peek the public API and identify which symbols (function names, struct names, trait names) are being changed. If unsure, omit.
  4. Spawn impact-mapper agent (.Codex/agents/impact-mapper.md) with: files_planned: <comma-separated absolute paths> symbols_planned: <comma-separated symbols, optional> session_id: <session_id> depth: 2 Wait for completion. The agent writes workflow/sessions/{session_id}/blast-radius.md.
  5. Read blast-radius.md. Apply gates:

    GATE A — Cross-language risk If CROSS_LANG_RISK lists any pair (Rust↔Python, Tauri↔Svelte, etc.): a. Check whether all paired files are in the planned-edits list. b. If only one side is queued: tell user "Cross-language pair detected. Edit <other-side> in the same EXECUTING pass, or annotate with // cross-lang-skip: <pair> to opt out." c. Block until user confirms (cap 1 round-trip).

    GATE B — Wide blast radius without WIRING_CONTRACT update If consumers count >= 3 cross-crate AND the active B-N file's WIRING_CONTRACT block was not updated this session: Tell user: "Edits affect <N> consumers across <M> crates. Recommend updating WIRING_CONTRACT.consumes_symbols in B-{N}. Continue without update?" Don't block — just warn.

    GATE C — Low SCIP confidence If overall SCIP confidence is LOW (<0.3): emit a note suggesting that callers may exist that elai.map missed (macro-generated code, conditional compilation). Recommend: regen elai.map first via the script in AGENTS.md. Don't block.

    GATE D — Spec-known monolith touch If any planned file is in the auto-monolith list (task_runner.rs, live_cli.rs, pipeline.rs, dashboard-v2/src-tauri/src/lib.rs, python/elai_inference/server.py): emit a note that this is a known hub; downstream impact may be larger than computed. Don't block.

  6. If user proceeds: write workflow/sessions/{session_id}/blast-radius-acknowledged.flag to skip GATE A on subsequent edits in same session.

CACHE INVALIDATION

  • Invalidate when elai.map mtime changes (regen happened).
  • Invalidate when blast-radius.md is older than 1 hour.
  • Invalidate when planned-files changes (new files added).

INTEGRATION WITH B-PLAN-RUNNER The b-plan-runner skill calls this skill at step 7. After approval, b-plan-runner proceeds to EXECUTING.

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.