Analyze Helix compliance and architectural patterns in Sitecore 10.x projects
Analyzes Sitecore projects for Helix compliance, detects architectural violations, and generates dependency graphs.
/plugin marketplace add twofoldtech-dakota/claude-marketplace/plugin install twofoldtech-dakota-sitecore-classic-analyzer-plugins-sitecore-classic-analyzer@twofoldtech-dakota/claude-marketplaceAnalyze Helix architecture compliance and identify structural issues.
Verify three-layer structure exists:
src/
├── Foundation/ # Cross-cutting concerns
├── Feature/ # Business capabilities
└── Project/ # Tenant/site-specific
Validate project naming follows pattern: {Layer}.{Module}
Foundation.DependencyInjection
Foundation.Serialization
Feature.Navigation
Feature.Search
Project.Website
Project.Corporate
Parse .csproj files for ProjectReferences and validate:
Allowed Dependencies:
Forbidden Dependencies:
<!-- Example violation to detect -->
<ProjectReference Include="..\..\Feature\Search\code\Feature.Search.csproj" />
Verify /App_Config/Include/ structure matches layers:
App_Config/Include/
├── Foundation/
│ └── Foundation.DI/
├── Feature/
│ └── Feature.Navigation/
└── Project/
└── Project.Website/
Count classes per module to identify "God modules":
Glob: src/{Layer}/{Module}/code/**/*.cs
Flag if module has >15 classes (ARCH-003).
Check .sln file for proper folder structure matching Helix layers.
| Code | Severity | Issue | Detection |
|---|---|---|---|
| ARCH-001 | Critical | Cross-Feature dependency | Feature.A references Feature.B in csproj |
| ARCH-002 | Critical | Upward dependency | Foundation references Feature or Project |
| ARCH-003 | Warning | God module | Module has >15 .cs files |
| ARCH-004 | Warning | Config patch in wrong layer | /App_Config/Include/Feature/ contains Foundation module config |
| ARCH-005 | Warning | Missing Helix layer | No Foundation, Feature, or Project folder |
| ARCH-006 | Info | Non-standard naming | Project doesn't follow {Layer}.{Module} pattern |
| ARCH-007 | Info | Empty module | Module folder exists but has no code |
For each .csproj:
1. Extract project name and layer from path
2. Parse all <ProjectReference> elements
3. Determine referenced project's layer
4. Flag if dependency violates Helix rules
Score = (Valid Dependencies / Total Dependencies) × 100
90-100%: Excellent
70-89%: Good (minor issues)
50-69%: Needs Work
<50%: Significant refactoring needed
Create a text-based dependency summary:
Foundation.DI
└── (no project dependencies)
Feature.Navigation
└── Foundation.DI ✓
└── Foundation.Serialization ✓
Feature.Search
└── Foundation.DI ✓
└── Feature.Navigation ✗ ARCH-001
Project.Website
└── Feature.Navigation ✓
└── Feature.Search ✓
## Architecture Analysis
### Helix Compliance: 87%
### Layer Summary
| Layer | Modules | Classes | Issues |
|-------|---------|---------|--------|
| Foundation | 5 | 45 | 0 |
| Feature | 8 | 120 | 2 |
| Project | 2 | 25 | 0 |
### Dependency Violations
#### [ARCH-001] Cross-Feature Dependency
**Location**: `src/Feature/Search/code/Feature.Search.csproj:24`
**Issue**: Feature.Search references Feature.Navigation
**Impact**: Tight coupling between features, harder to maintain/test
**Fix**: Extract shared functionality to Foundation.Navigation or Foundation.Search
### Recommendations
1. Create Foundation.Navigation for shared navigation logic
2. Review Feature.Search to determine minimal required interface