You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/aem/cloud-service/skills/migration/SKILL.md
+21-4Lines changed: 21 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
name: migration
3
-
description: Orchestrates legacy AEM (6.x, AMS, on-prem) to AEM as a Cloud Service migration using BPA CSV or cache, CAM/MCP target discovery, and one-pattern-per-session workflow. Use for BPA/CAM findings, Cloud Service blockers, or fixes for scheduler, ResourceChangeListener, replication, EventListener, OSGi EventHandler, DAM AssetManager, HTL data-sly-test lint. Transformation steps live in the best-practices skill—read it and the right references/ modules before editing code.
3
+
description: Orchestrates legacy AEM (6.x, AMS, on-prem) to AEM as a Cloud Service migration using BPA CSV or cache, CAM/MCP target discovery, and one-pattern-per-session workflow. Use for BPA/CAM findings, Cloud Service blockers, or fixes for scheduler, ResourceChangeListener, replication, EventListener, OSGi EventHandler, DAM AssetManager, HTL data-sly-test lint. OSGi configs → Cloud Manager — scan ui.config, .cfg.json, secrets, $[secret:]/$[env:] — agent follows references/osgi-cfg-json-cloud-manager.md when prompted. Transformation steps live in the best-practices skill—read it and the right references/ modules before editing code.
4
4
license: Apache-2.0
5
5
---
6
6
@@ -21,13 +21,15 @@ This skill is **orchestration**: BPA data, CAM/MCP, **one pattern per session**,
21
21
| A **BPA CSV**|*"Fix **scheduler** findings using `./path/to/bpa.csv`"*| Fastest path: CSV → cached collection → files |
22
22
|**CAM + MCP** only |*"Get **scheduler** findings from CAM; I'll pick the project when you list them."*| Agent lists projects → you confirm → MCP fetch ([cam-mcp.md](references/cam-mcp.md)) |
23
23
|**Just a few files**|*"Migrate **scheduler** in `core/.../MyJob.java`"*| Manual flow: no BPA required |
24
+
|**OSGi → Cloud Manager**|*"**Scan my config files and create Cloud Manager environment secrets or variables.**"*| Agent **auto-reads**[references/osgi-cfg-json-cloud-manager.md](references/osgi-cfg-json-cloud-manager.md) (full Adobe-aligned rules inlined there); no BPA pattern id |
24
25
|**HTL lint warnings**|*"Fix **htlLint** issues in `ui.apps`"*| Proactive discovery via `rg` → fix per reference module |
25
26
26
27
**Starter prompts (copy-paste):**
27
28
28
29
-*"Use the migration skill: **scheduler** only, BPA CSV at `./reports/bpa.csv`, then apply best-practices reference modules before editing."*
29
30
-*"**Replication** only from CAM; list projects first, I'll pick one."*
30
31
-*"**Manual:****event listener** migration for `.../Listener.java` — read best-practices module first."*
32
+
-*"Scan my config files and create Cloud Manager environment secrets or variables."*
31
33
-*"Fix **htlLint** in `ui.apps` — scan for `data-sly-test` redundant constant warnings and fix them."*
32
34
33
35
@@ -52,18 +54,27 @@ Applies to **finding and editing the user's AEM project** (Java, bundles, config
52
54
53
55
## Required delegation (do this first)
54
56
57
+
**Branch A — OSGi configs → Cloud Manager** (no Java BPA pattern this session): If the user asks to **scan config files**, **create / set up Cloud Manager environment secrets or variables**, move **passwords or secrets** out of **OSGi / `.cfg.json` / `ui.config`**, or mentions **`$[secret:]`** / **`$[env:]`** for AEM CS, then **read [references/osgi-cfg-json-cloud-manager.md](references/osgi-cfg-json-cloud-manager.md) immediately** and follow the **product rules and workflow** defined in that file (Adobe AEM as a Cloud Service OSGi + Cloud Manager behavior is reproduced there—no external doc URL required). Sleek prompts are enough — **no** need to name the reference file. **Skip** branch B for that work.
58
+
59
+
**Branch B — Java / HTL / BPA pattern migration:**
2. Read **`{best-practices}/references/<module>.md`** for the **single** active pattern (see table in that `SKILL.md`).
57
63
3. When code uses SCR, `ResourceResolver`, or console logging, read **`{best-practices}/references/scr-to-osgi-ds.md`** and **`{best-practices}/references/resource-resolver-logging.md`** (or the hub **`{best-practices}/references/aem-cloud-service-pattern-prerequisites.md`**).
58
64
59
-
Do not transform code until the pattern module is read.
65
+
Do not transform **Java or HTL**until the pattern module is read (branch B). Branch A does not require `{best-practices}` pattern modules.
- Fix **HTL (Sightly)** lint warnings (`data-sly-test: redundant constant value comparison`) across component templates
65
71
- Drive work from **BPA** (CSV or cached collection) or **CAM via MCP**
66
72
- Enforce **one pattern type per session**
73
+
-**OSGi → Cloud Manager:****Branch A** — scan scoped **`.cfg.json`**, apply **`$[secret:…]`** / **`$[env:…]`** per rules in **[references/osgi-cfg-json-cloud-manager.md](references/osgi-cfg-json-cloud-manager.md)**; gitignored handoff; **no** secret values in chat.
74
+
75
+
### OSGi configs and Cloud Manager (no BPA pattern id)
76
+
77
+
Sleek user prompts are enough (see Quick start). **Agent:****Branch A** → read the reference → **One-prompt workflow**; obey the **inlined Adobe AEM CS rules** in that file (value types, placeholders, CM API/CLI, custom-properties-only, repoinit, runmode context, local SDK secrets). Ambiguous or Adobe-owned PIDs → **`needs_user_review`**, not guesses.
67
78
68
79
## Prerequisites
69
80
@@ -142,7 +153,9 @@ If the user asks to fix everything or BPA mixes patterns, **ask which pattern fi
142
153
143
154
### Step 1: Pattern id
144
155
145
-
Map the request to a pattern id: `scheduler`, `resourceChangeListener`, `replication`, `eventListener`, `eventHandler`, `assetApi`, `htlLint`. If unclear, use **Manual Pattern Hints** in **`{best-practices}/SKILL.md`** or ask the user to pick one of those.
156
+
If the request is **OSGi configs → Cloud Manager** (see **Required delegation**, branch A), do **not** map to a BPA pattern — follow [references/osgi-cfg-json-cloud-manager.md](references/osgi-cfg-json-cloud-manager.md) instead.
157
+
158
+
Otherwise map the request to a pattern id: `scheduler`, `resourceChangeListener`, `replication`, `eventListener`, `eventHandler`, `assetApi`, `htlLint`. If unclear, use **Manual Pattern Hints** in **`{best-practices}/SKILL.md`** or ask the user to pick one of those.
Does **not** use BPA CSV, CAM/MCP, or best-practices pattern modules for collection. Follow **Branch A** in **Required delegation** and the **One-prompt workflow** in [references/osgi-cfg-json-cloud-manager.md](references/osgi-cfg-json-cloud-manager.md).
189
+
173
190
### htlLint flow
174
191
175
192
`htlLint` does not use BPA CSV or CAM/MCP. Instead:
@@ -182,7 +199,7 @@ User-named files → classify (best-practices hints or ask) → confirm module e
182
199
183
200
## Quick reference
184
201
185
-
**Source priority (when choosing how to obtain targets):** unified collection → BPA CSV → MCP → manual paths. **Not** an automatic cascade after MCP errors — if MCP fails, stop and wait for user direction (see **MCP errors and fallback**). For `htlLint`, use proactive `rg` discovery (no BPA/MCP).
202
+
**Source priority (when choosing how to obtain targets):** unified collection → BPA CSV → MCP → manual paths. **Not** an automatic cascade after MCP errors — if MCP fails, stop and wait for user direction (see **MCP errors and fallback**). For `htlLint`, use proactive `rg` discovery (no BPA/MCP). For **OSGi → Cloud Manager**, use [references/osgi-cfg-json-cloud-manager.md](references/osgi-cfg-json-cloud-manager.md) only (no BPA/MCP).
186
203
187
204
**User-facing snippets:***"Using existing BPA collection (N findings)…"* / *"Processing your BPA report…"* / *"Fetched findings from CAM."* / *"Scanning HTL templates for data-sly-test lint issues…"* / optional prompt after MCP stop above.
0 commit comments