agentleFS
kings0527kings0527/pi-harness/skills/analyze-failures/SKILL.md

analyze-failures

Skill9 starsChanged 3 months agoMITView on GitHub

Analyze failure patterns from events.jsonl. Use after completing a complex task to identify recurring issues.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After completing a complex investigation or encountering repeated issues, use this skill to systematically analyze the event log for …

    line 7
  2. Very specific:

    Use board with action=distill, the relative path above, and the selected scope.

    line 44
  3. Very specific:

    After board close on a complex topic (especially if multiple spawn rounds occurred)

    line 48
  4. Distinctive:

    When you notice the same hook_warn firing repeatedly

    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

Analyze Failures: Mine Patterns from Event Log

After completing a complex investigation or encountering repeated issues, use this skill to systematically analyze the event log for failure patterns.

Process

Step 1: Read Event Log

read .pi-board/events.jsonl

Filter for failure-related events: hook_warn, hook_fail_loud, hook_block.

Step 2: Cluster by Rule

Group failures by their rule field:

  • read-before-write — files modified without reading first
  • diff-scope-observation — too many files touched
  • fail-loud — bash commands failing silently
  • convergence-gate — premature close attempts
  • spawn-round-guard — excessive spawn rounds

Step 3: Identify Patterns

For each cluster with ≥2 occurrences, ask:

  • Root cause: Why does this keep happening?
  • Is it a doctrine gap? (Agent doesn't know better → improve doctrine)
  • Is it a skill gap? (Agent can't do better → add tool/skill)
  • Is it environmental? (External issue → document workaround)

Step 4: Distill into Knowledge

For actionable project patterns, use the project knowledge tier:

  • Path: failures/<pattern-name>.md
  • Scope: project for one component, workspace for related components, global across repositories
  • Content: description + root cause + mitigation
  • Source: events.jsonl entries at timestamps X, Y, Z

Use board with action=distill, the relative path above, and the selected scope.

When to Use

  • After board close on a complex topic (especially if multiple spawn rounds occurred)
  • When you notice the same hook_warn firing repeatedly
  • Periodically (every ~5 topics) as maintenance

Output

A brief report: which patterns found, severity, suggested mitigation. If a pattern suggests a doctrine change, flag it for human review.

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.