Analyze naming conventions and structural patterns in Sitecore 10.x projects
Analyzes Sitecore project conventions for templates, fields, renderings, and config files.
/plugin marketplace add twofoldtech-dakota/claude-marketplace/plugin install twofoldtech-dakota-sitecore-classic-analyzer-plugins-sitecore-classic-analyzer@twofoldtech-dakota/claude-marketplaceAnalyze naming conventions, folder structure, and Sitecore-specific patterns.
Check template names follow conventions:
Good:
- "Navigation Item" (Title Case with spaces)
- "Hero Banner"
- "Article Page"
Bad:
- "navigation_item" (snake_case)
- "heroBanner" (camelCase)
- "ARTICLE PAGE" (ALL CAPS)
Check field names follow conventions:
Good (Title Case):
- "Page Title"
- "Navigation Title"
- "Hero Image"
Bad:
- "pageTitle" (camelCase in display name)
- "hero_image" (snake_case)
Check field names (technical name) follow conventions:
Good (PascalCase or Title):
- PageTitle
- NavigationTitle
- HeroImage
Bad:
- page_title
- hero-image
Check rendering names:
Good:
- "Main Navigation"
- "Hero Banner"
- "Article List"
Pattern: [Feature] [Type/Purpose]
Check config patch file naming:
Good:
- Feature.Navigation.config
- Foundation.DI.Serialization.config
- Project.Website.Sites.config
Pattern: [Layer].[Module].[Purpose].config
Bad:
- nav-config.config
- mySettings.config
Check config patches have layer prefix for load order:
Good:
- z.Feature.Navigation.config (loads after Foundation)
- zz.Project.Website.config (loads last)
Or numbered:
- 01.Foundation.DI.config
- 02.Feature.Navigation.config
- 03.Project.Website.config
Check for consistent folder organization:
src/Feature/Navigation/
├── code/
│ ├── Controllers/
│ ├── Models/
│ ├── Services/
│ ├── Repositories/
│ └── Feature.Navigation.csproj
└── serialization/
├── Templates/
├── Renderings/
└── Content/
Check templates have icons assigned:
# In serialization
SharedFields:
- ID: "__Icon"
Value: "Office/32x32/navigate_right.png"
Check templates have standard values configured:
/sitecore/templates/Feature/Navigation/Navigation Item/__Standard Values
Check for proper use of branch templates for complex content structures.
| Code | Severity | Issue | Detection |
|---|---|---|---|
| CONV-001 | Warning | Inconsistent template naming | Mixed naming conventions |
| CONV-002 | Warning | Field naming violation | camelCase or snake_case in fields |
| CONV-003 | Warning | Config patch missing layer prefix | Config file without layer in name |
| CONV-004 | Warning | Inconsistent folder structure | Non-standard code organization |
| CONV-005 | Info | Missing template icon | Template without __Icon value |
| CONV-006 | Info | Missing standard values | Template without __Standard Values |
| CONV-007 | Info | Rendering naming inconsistent | Mixed rendering name patterns |
Glob: **/serialization/**/Templates/**/*.yml
Extract template names
Check for naming pattern consistency
From template YAML:
Extract all field definitions
Check SharedFields and Versions for naming
Glob: **/App_Config/Include/**/*.config
Check file names against pattern
Verify layer prefix exists
For each module:
Check for standard folders (Controllers, Services, Models)
Flag non-standard organization
For each template YAML:
Check for __Icon field
Check for __Standard Values item
## Conventions Analysis
### Summary
- **Templates Analyzed**: 45
- **Renderings Analyzed**: 23
- **Config Files Analyzed**: 18
- **Naming Score**: 78%
### Warnings
#### [CONV-001] Inconsistent Template Naming
**Issue**: Mixed naming conventions in templates
**Examples**:
Good: "Navigation Item", "Hero Banner" Bad: "articlePage", "footer_links"
**Affected Templates**:
- articlePage → "Article Page"
- footer_links → "Footer Links"
**Fix**: Rename to Title Case with spaces
#### [CONV-003] Config Patch Missing Layer Prefix
**Files**:
- `App_Config/Include/Navigation.config`
- `App_Config/Include/SearchSettings.config`
**Fix**: Rename to:
- `Feature.Navigation.config`
- `Feature.Search.Settings.config`
### Info
#### [CONV-005] Missing Template Icons
**Templates without icons**: 12
- Feature/Navigation/Navigation Item
- Feature/Search/Search Results Page
- ...
### Naming Convention Summary
| Category | Compliant | Non-Compliant | % |
|----------|-----------|---------------|---|
| Templates | 38 | 7 | 84% |
| Fields | 156 | 23 | 87% |
| Renderings | 20 | 3 | 87% |
| Config Files | 12 | 6 | 67% |
### Recommendations
1. Standardize on Title Case for all template and field display names
2. Add layer prefix to all config patch files
3. Add icons to frequently used templates for better content editor UX