Using the AEM Cloud Migration Skill using-cloud-migration-skill
This reference covers each supported migration pattern, how to provide BPA findings, and how to manage sessions across a large project. For an introduction and setup instructions, see the overview.
How a Session Works workflow-overview
Every migration session follows this sequence:
- Name the pattern: specify one pattern (for example,
scheduler) - Provide findings: from a BPA CSV file, CAM via MCP, or specific file paths
- Agent reads transformation rules: the skill reads the relevant best-practices module before making any code changes
- First batch of five: the agent transforms up to five findings and reports what it changed
- You review and continue: after reviewing each batch, reply
continueto proceed to the next
The agent processes one pattern and one batch at a time. It does not proceed automatically; each batch requires your confirmation.
Migration Patterns patterns
Scheduler scheduler
Targets Java classes using sling.commons.scheduler or Scheduler injection that are incompatible with AEMaaCS’s stateless, containerized runtime.
BPA pattern id: scheduler
The agent converts Scheduler-injected jobs to @Component implementations of Runnable using @Designate, replacing constructor-based scheduler registration with @Activate / @Deactivate lifecycle methods.
ResourceChangeListener resource-change-listener
Targets ResourceChangeListener or ResourceChange listener implementations that require updates for AEMaaCS.
BPA pattern id: resourceChangeListener
Replication replication
Targets classes importing com.day.cq.replication.Replicator or related replication APIs, which are not supported in AEMaaCS. The agent replaces them with ContentDistribution-based equivalents and updates the corresponding OSGi service references.
BPA pattern id: replication
Event Listener event-listener
Targets OSGi EventListener or EventHandler implementations that must be updated for AEMaaCS event processing semantics.
BPA pattern id: eventListener
Event Handler event-handler
Targets synchronous OSGi EventHandler services that need to be adapted for AEMaaCS.
BPA pattern id: eventHandler
Asset API asset-api
Targets classes using deprecated AssetManager, DAMEvent, or unsupported DAM APIs. The agent replaces them with the supported AEM Assets API equivalents.
BPA pattern id: assetApi
HTL Lint (data-sly-test) htl-lint
Targets HTL templates under ui.apps that produce data-sly-test: redundant constant value comparison lint warnings. The agent discovers affected templates by scanning the content package directly; this pattern does not require a BPA CSV or CAM connection.
BPA pattern id: htlLint
htlLint findings do not appear in BPA CSV exports. The agent discovers them through direct file scanning when you start a session for this pattern.OSGi Configs to Cloud Manager osgi-cloud-manager
Converts OSGi configurations in ui.config to Cloud Manager–compatible .cfg.json format with full environment-specific handling. This covers two related tasks:
Config format conversion
AEMaaCS requires OSGi configurations to be stored as .cfg.json files, with environment-specific configs in runmode-scoped folders (config.author/, config.publish/, config.dev/, and so on). The agent:
- Converts existing
.config,.cfg, and XML-format OSGi configs to.cfg.json - Splits configs containing both author- and publish-specific values into separate runmode-scoped files
- Validates property types against the OSGi metatype specification (strings, integers, booleans, arrays)
- Flags Adobe-owned PIDs for manual review rather than auto-converting them
Secrets and environment variables
Moves plaintext secrets and environment-specific values out of committed config files and replaces them with Cloud Manager placeholders:
$[secret:NAME]: for passwords, tokens, and other sensitive values$[env:NAME]: for non-sensitive values that differ per environment (for example, service URLs)
The corresponding variables and secrets are applied in Cloud Manager and injected at runtime; no values are stored in source control.
This pattern does not use BPA CSV or CAM. Start a session with:
Scan my config files and create Cloud Manager environment secrets or variables.
BPA Source Options bpa-source
MCP Error Handling mcp-errors
If the MCP connection returns an error (including project-not-found or authentication failures), the agent stops and shows you the error. It does not automatically switch to another source. From the stopped state, you can:
- Confirm the correct project from the list the agent displayed
- Supply a BPA CSV path as an alternative
- Provide specific Java file paths for a manual migration
Managing Sessions Across Large Reports large-reports
For BPA reports with many findings, the batch-by-batch approach lets you validate incrementally:
- Review the diff for each batch
- Commit the batch with a pattern-scoped commit message
- Reply
continueto start the next batch - Repeat until the agent reports that all findings for the pattern are done
One pattern per commit keeps your git history readable and makes individual pattern transformations easy to revert if needed.
Workspace Scope workspace-scope
The agent searches for and edits files only within the open IDE workspace folders. It does not scan parent directories, sibling folders, or other locations on disk.
If a BPA finding references a file path that does not exist in the workspace, the agent stops and tells you which paths are missing. Open the correct project folder or provide the paths explicitly to continue.