| name | compiler-architecture-validator |
| description | Validates Fakt follows compiler plugin best practices — two-phase FIR→IR, context-driven generation, CompilerPluginRegistrar structure. Use when validating architecture, checking plugin structure, reviewing compiler patterns, or verifying that FIR and IR phases remain properly separated. Make sure to use this skill whenever compiler plugin code is modified — phase mixing and registration issues are subtle bugs that only surface at runtime. |
| allowed-tools | Read, Grep, Glob, TaskCreate, TaskUpdate |
Compiler Architecture Validator
Validates Fakt compiler plugin follows industry-standard architectural patterns.
Instructions
1. Determine Scope
Extract from conversation:
- Specific component: "validate UnifiedFaktIrGenerationExtension"
- General check: "validate architecture"
- Default: validate ALL components
Components:
- CompilerPluginRegistrar — Plugin registration
- IrGenerationExtension — IR generation logic
- FirExtensionRegistrar — FIR phase detection
- Context Pattern — FaktSharedContext / IrFaktContext
- Error Handling — Diagnostic patterns
2. Validate CompilerPluginRegistrar
Read compiler/src/main/kotlin/com/rsicarelli/fakt/compiler/FaktCompilerPluginRegistrar.kt
3. Validate IrGenerationExtension
Read compiler/src/main/kotlin/com/rsicarelli/fakt/compiler/ir/UnifiedFaktIrGenerationExtension.kt
4. Validate Context Pattern
Grep pattern="class.*Context" compiler/src/main/kotlin/com/rsicarelli/fakt/compiler/
5. Validate FIR Phase
Read compiler/src/main/kotlin/com/rsicarelli/fakt/compiler/fir/FaktFirExtensionRegistrar.kt
6. Validate Error Handling
Grep pattern="(messageCollector|reportError|reportWarning)" compiler/src/main/kotlin/com/rsicarelli/fakt/compiler/
7. Generate Report
ARCHITECTURE VALIDATION REPORT
1. CompilerPluginRegistrar: {score}%
2. IrGenerationExtension: {score}%
3. Context Pattern: {score}%
4. FIR Phase: {score}%
5. Error Handling: {score}%
Strengths: {list}
Deviations: {list with explanations}
Recommendations: {actionable items}
Related Skills
kotlin-api-consultant — Validate Kotlin API usage
docs-navigator — Access architecture documentation