| name | serialization-config-authoring |
| description | Authors and validates serialization module configuration, includes/rules/aliases, and serialization options. Use when editing sitecoreai.cli.json or module.module.json files, or when the user asks about scopes, includes/excludes, aliases, or maxRelativePathLength. |
Serialization Config Authoring
Quick start
- Validate:
npm run dev -- config validate
- Validate serialization content:
npm run dev -- serialization validate
Authoring checklist
- Root config:
sitecoreai.cli.json has modules and defaultEnvProfile.
- Module files: each
module.module.json has namespace and items.includes.
- Items path:
items.path can use ~/ to be rooted at the repo and $(module) to use the namespace.
- Includes: every include has
name, path, optional scope, allowedPushOperations.
- Rules:
scope is required unless using alias.
alias cannot be combined with scope or wildcards.
alias chars: letters, numbers, spaces, hyphen, underscore.
- Path length:
maxRelativePathLength should be >= 16 for hashing to work.
- Excluded fields: use
excludedFields with fieldId (optional description).
Examples
Minimal module
{
"namespace": "content",
"items": {
"path": "~/serialization/$(module)",
"includes": [
{
"name": "content",
"path": "/sitecore/content",
"scope": "itemAndDescendants"
}
]
}
}
Include with rules and alias
{
"name": "marketing",
"path": "/sitecore/content/Marketing",
"rules": [
{ "path": "/sitecore/content/Marketing/Archive", "scope": "ignored" },
{ "path": "/sitecore/content/Marketing/Short", "alias": "short" }
]
}
When modifying configs
- Run
npm run dev -- serialization validate after edits.
- Use
--include / --exclude for scoped validation runs.