What problem does it solve? AI coding assistants repeat the same mistakes because generic skill instructions lack project-specific knowledge. This Skill closes the loop by analyzing past fix patches, recurring bug patterns, and codebase conventions, then writing targeted rules that prevent future issues. ## Core Features & Use Cases - Incremental Patch Analysis: Processes patch files using a cursor-based system with an overlap window, extracting every independent prevention point and mapping it to the skills that should enforce it. - Skill-Context Rule Management: Writes project-specific rules to .ai-factory/skill-context/<skill-name>/SKILL.md without ever modifying built-in skill files, and detects stale, conflicting, or redundant rules when base skills are updated. - Gap Analysis & Evolution Reports: Compares prevention points against existing skill coverage, presents a traceable improvement report, and applies only user-approved changes with a logged evolution history. - Use Case: After accumulating 10 fix patches where 6 involve null-reference errors, run the evolve workflow to generate a rule for the fix skill that prioritizes null-check guards on optional database relations. ## Quick Start Ask the AI to run /aif-evolve with a skill name like "fix" or "all" to analyze accumulated patches and propose project-specific rule improvements.