agentleFS
ashley-eyekyamashley-eyekyam/probematrix-learnings-coach/skills/causal-map/SKILL.md

causal-map

Skill0 starsChanged 27 days agoMITView on GitHub

Extract and explain the causal map of a ProbeMatrix investigation - how organisational influences enabled supervisory failures, preconditions and unsafe acts - using the factor links the AI wrote into each finding's causal explanation, even when the export's Causal Chain sheet is empty. Produces a Mermaid diagram, a ranked list of causal pathways and a plain-language narrative. Use when someone asks how the factors connect, for a causal chain, causal tree, root-cause pathway, "how did the organisation set this up", or wants a diagram of the investigation.

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

    Event sequence: If the export narrative or evidence gives times, align the pathways to the event sequence (latent conditions → trigger → …

    line 24
  2. Very specific:

    Write the pack <run>/outputs/causal-map.json (schema: learnings-coach/references/pack-schema.md), then:

    line 28

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

Causal Map

Engine: PMLC = python3 <skills-root>/learnings-coach/scripts/pmlc.py (this skill needs the learnings-coach skill installed alongside it).

Build

PMLC causal <ws> --top 60                       # causal explanations only
PMLC causal <ws> --top 60 --include-justification   # wider net, more links

Outputs <ws>/causal_graph.json (nodes, edges with mention counts and supporting finding IDs) and <ws>/causal_graph.mmd (Mermaid flowchart grouped by level). Edge direction follows the four-level convention: the higher-level factor enables the lower-level one. Same-level links have no implied direction.

Interpret

  1. Hubs. Rank nodes by out-degree from L4 and L3. These are the organisational and supervisory conditions that fed many downstream factors: the most valuable learnings.
  2. Pathways. Trace three to six chains from an L4 node to an L1 node through the strongest edges. For each, read the supporting findings (PMLC select <ws> --code "<code>") and write the pathway as a story in four sentences, one per level, with evidence IDs. Read it top-down and end on a condition, never on a person: start at the L4 condition, pass through supervision and preconditions, and finish on the sharp-end condition (for example "the replacement was returned to service without a design-pressure test"), not on someone's act or character.
  3. Breaks. Where the narrative needs a link the graph lacks, say so as a gap. Do not invent the link.
  4. Event sequence. If the export narrative or evidence gives times, align the pathways to the event sequence (latent conditions → trigger → escalation → response).

Output

Write the pack <run>/outputs/causal-map.json (schema: learnings-coach/references/pack-schema.md), then:

PMLC causal-item <ws> --top 40                      # paste its output as the graph item; never retype links
PMLC check-pack <ws> <run>/outputs/causal-map.json   # fix every problem it lists
PMLC pack <ws> <run>/outputs/causal-map.json         # -> causal-map.html (primary, drawn graph) and causal-map.md

Sections and the kinds that fill them:

  • map: the graph from causal-item, kept to the top 30–40 links for legibility.
  • hubs: a table with columns Factor, Level and Out-links, plus row_cites.
  • pathways: one para per pathway, with group set to the pathway's name. Write four sentences, one per level.
  • breaks: para. Never invent a link.
  • sequence: a timeline running from latent conditions to the trigger.

causal_graph.mmd is still written for hosts that draw Mermaid. Put data-quality corrections in data_quality, findings left out on purpose in exclusions, and same-condition findings in supporting_cites.

{"kind": "table", "columns": ["Factor", "Level", "Out-links"], "rows": [["OR 2.2 …", "L4", 3]], "row_cites": [["FND-…"]]}

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.