failure-analyzer
Role
Single-step LLM analysis that classifies failure patterns and decides the next evolutionary action.
Inputs (via SkillContext.extra)
- skill_trace_samples — candidate/response/score triples from this run (new traces only)
- skill_descriptions — name + description of skills appearing in trace
- meta_attempts_history — previously tried evolve actions and their outcomes
- prior_analysis_summary — conclusion from the previous analyze round
Output
{
"dominant_dimensions": ["Refusal Triggered"],
"analysis": "detailed diagnosis citing trace evidence",
"meta_skill_name": "evolve-refine|evolve-combine|evolve-discover",
"args": {"skill_name": "..." | "skill_names": [...] | "discover_direction": "..."},
"reason": "justification linking choice to diagnosed dimensions"
}
Decision Logic
- evolve-refine: A specific skill has strong potential and can be improved
- evolve-combine: Two skills together would create a more effective approach
- evolve-discover: None of the existing skills are well-suited; new approach needed
- Diversity constraint: After 2+ consecutive discovers with no improvement, forces refine or combine to ensure strategy diversity