CMAP Validation Suite v8.0.0
ZERO WARNINGS POLICY (MANDATORY)
Validators produce ONLY pass or fail - NO WARNINGS ALLOWED.
Every check results in one of two states:
- PASS: Meets Microsoft requirements OR is system-expected pattern
- FAIL: Does not meet requirements, must fix before import
System-Expected Patterns (automatically PASS):
- System relationships:
owner_,team_,user_,business_unit_,organization_ - Microsoft auto-generates these without publisher prefixes
CLI Usage (Primary)
The unified cmap-validate CLI is the primary validation tool:
# Validate a solution ZIP
cmap-validate solution.zip
# JSON output for CI/CD
cmap-validate solution.zip --format json -o report.json
# Markdown report
cmap-validate solution.zip --format markdown -o report.md
# SARIF for GitHub/Azure DevOps
cmap-validate solution.zip --format sarif -o results.sarif
# Run specific categories only
cmap-validate solution.zip -c package -c dataverse
# Run with policy evaluation (per-environment thresholds)
cmap-validate solution.zip --policy policy.json --environment prod
# Verbose output
cmap-validate solution.zip --verbose
# Auto-fix issues where possible
cmap-validate solution.zip --fix
Orchestrator Script (Alternative)
For skill-based automation, use the orchestrator wrapper:
# Full validation delegating to cmap-validate CLI
python scripts/validate_cmap_suite.py solution.zip
# With extended standalone checks (YAML, PowerFx, Web Resources, etc.)
python scripts/validate_cmap_suite.py /path/to/deployment/ --include-extended
# JSON report output
python scripts/validate_cmap_suite.py solution.zip --report report.json
Critical Validators (Import Blockers)
| Code | Description | Impact |
|---|---|---|
| PK009 | Hybrid format (entity in both customizations.xml AND Entities/) | BLOCKS IMPORT |
| PK010 | RootComponents/Entities folder mismatch | BLOCKS IMPORT |
| PK011 | Orphan RootComponent without matching Entities/ folder | BLOCKS IMPORT |
| CT001 | Period in Copilot topic name | BLOCKS EXPORT |
| DV074 | IsPrimaryName on non-String type | BLOCKS IMPORT |
| DV075 | IsPrimaryName on system field | BLOCKS IMPORT |
| DV080 | Invalid DateTime format case | BLOCKS IMPORT |
| DV090 | Invalid DisplayMask case | BLOCKS IMPORT |
| SI001 | Orphan workflow RootComponent (file missing) | BLOCKS IMPORT |
Validator Categories (36 Validators, 7 Categories)
| Category | Count | Validators | Key Error Codes |
|---|---|---|---|
| package | 6 | archive_format, folder_structure, hybrid_format, root_components, orphaned_components, solution_integrity | PK001-PK011, SI001-SI004, OF003-OF010 |
| dataverse | 7 | entity_xml, naming_conventions, primary_name, relationship_crossref, relationship_integrity, schema_extended, solution_structure | DV001-DV099, NC010, DV008-DV010, RL002-RL003 |
| copilot_studio | 4 | design_validator, instructions, topic_names, topic_extended | CT001-CT005, CI001-CI007, CS061-CS069 |
| solution | 2 | solution_xml, publisher_validation | SL001-SL008, PB001-PB003, SS012-SS016 |
| governance | 9 | document_quality, entity_metadata_v10, governance_metadata, hardcoded_references, kb_compliance, security_compliance, seed_data, v10_compatibility, version_control | SR001-SR009, SD001-SD010, VC001-VC007, DQ001-DQ008, FQ008-FQ010, CR001, EV001, WF001, PF015, EM001-EM004, DM001-DM002 |
| infrastructure | 8 | ai_builder_validation, azure_validation, dependency_validation, flow_schema_validation, guid_validation, power_automate_validation, sharepoint_validation, workflow_integrity | AZ001-AZ008, SP001-SP007, DP001-DP005, GU001-GU006, PA001-PA005, WF007-WF009 |
| (supplementary) | — | Standalone scripts for extended checks | YS001-YS020, PF001-PF011, WR001-WR025, TL001-TL005, CN001-CN015, AC001-AC005 |
Error Code Coverage
165 error codes defined in tools/cmap-validator/src/cmap_validator/constants.py:
| Group | Codes | Count |
|---|---|---|
| Package (PK) | PK001-PK011 | 11 |
| Solution (SL) | SL001-SL008 | 8 |
| Dataverse (DV) | DV001-DV010, DV070-DV076, DV080-DV081, DV090, DV099 | 22 |
| Copilot (CT/CI/CS) | CT001-CT005, CI001-CI007, CS061-CS069 | 21 |
| KB Compliance (SR) | SR001-SR009 | 9 |
| Seed Data (SD) | SD001-SD010 | 10 |
| Version Control (VC) | VC001-VC007 | 7 |
| Document Quality (DQ) | DQ001-DQ008 | 8 |
| GUID (GU) | GU001-GU006 | 6 |
| Dependencies (DP) | DP001-DP005 | 5 |
| SharePoint (SP) | SP001-SP007 | 7 |
| Azure (AZ) | AZ001-AZ008 | 8 |
| Power Automate (PA) | PA001-PA005 | 5 |
| Extended Coverage | DM001-002, EM001-004, EN001-002, FQ008-010, NC010, OF003-010, PB001-003, PF015, RL002-003, SI001-004, SS012-016, WF007-009 | 37 |
| Internal (VAL) | VAL999 | 1 |
Package Location
tools/cmap-validator/
├── pyproject.toml
├── src/cmap_validator/
│ ├── cli.py (Click CLI: validate, list-validators)
│ ├── constants.py (165 error codes)
│ ├── core/
│ │ ├── validator_base.py (ValidatorBase abstract class)
│ │ ├── result.py (ValidationResult model)
│ │ ├── registry.py (ValidatorRegistry auto-discovery)
│ │ ├── runner.py (ValidationRunner parallel executor)
│ │ ├── policy.py (PolicyEvaluator per-environment thresholds)
│ │ └── report.py (ReportGenerator: JSON, Markdown, SARIF)
│ └── validators/ (36 validators across 7 categories)
│ ├── package/ (6 validators)
│ ├── dataverse/ (7 validators)
│ ├── copilot_studio/ (4 validators)
│ ├── solution/ (2 validators)
│ ├── governance/ (9 validators)
│ └── infrastructure/ (8 validators)
└── tests/
skills/cmap-validation/
├── SKILL.md (this file)
├── CLAUDE.md (AI assistant instructions)
├── references/ (governance rules, error codes, specs)
└── scripts/ (orchestrator + standalone validators)
Acceptable Patterns
These are explicitly PASS, not warnings:
- Publisher prefixes:
eap_,mpa_,ca_,cmap_ - Microsoft system entities:
msdyn_,mspp_ - System-generated relationships:
owner_,team_,user_, etc. - System-generated fields (no prefix required)
Version History
- v8.0.0 - Complete rebuild: 36 validators, 165 error codes, Click CLI, Rich output, SARIF support, parallel execution, policy evaluation
- v7.6.4.10 - Final monolithic version (541 rules, 18 validators)
