Skip to main content

Module analyzer

Module analyzer 

Source
Expand description

Post-mortem analysis: produce lessons and rule proposals from session data.

The analyzer takes session statistics and trigger reasons, then produces structured findings. The current implementation uses deterministic heuristics; future versions can delegate to LLM (Sonnet) for deeper analysis.

Output hierarchy (from GH-157 spec):

  • Rules: Hook-enforced (block/auto-run), 100% compliance
  • Lessons: CLAUDE.md auto-maintained paragraph, ~90% compliance
  • Observations: edda ask on-demand, no enforcement

Structs§

AnalysisInput
Session data available for analysis.
Lesson
A lesson extracted from post-mortem analysis (descriptive, not prescriptive).
PostMortemResult
Complete result of a post-mortem analysis.
RuleProposal
A rule proposal from post-mortem analysis (prescriptive).

Enums§

LessonSeverity
Severity of a lesson.

Functions§

analyze
Run deterministic post-mortem analysis on a triggered session.