Skip to content

Feat/template modernization pipeline#226

Open
Himanich wants to merge 3 commits into
mainfrom
feat/template-modernization-pipeline
Open

Feat/template modernization pipeline#226
Himanich wants to merge 3 commits into
mainfrom
feat/template-modernization-pipeline

Conversation

@Himanich

Copy link
Copy Markdown
Collaborator

Description

Adds a template modernization pipeline to the AEM Cloud Service migration skill (Branch C): a per-template, three-phase flow — context → per-template execute → validate — that converts static templates to editable /conf templates and generates AEM Modernize Tools structure/component/policy rewrite rules.

New references under migration/references/template-modernization/:

template-modernization-context.md — shared discovery; emits a confirmable .migration/template-context.yml and a per-template plan table. Data-driven classifier decides structure-vs-initial placement of named children from actual /content scans (no guesswork).
editable-template-creation.md — generates the 4-node editable template (root / structure / initial / policies) and appends to templates/.content.xml.
aem-modernization.md — generates structure, component, and policy rewrite rules, their OSGi service configs, and the repoinit initializer.
template-modernization-validation.md — post-generation rg/Grep assertions; blocks commit on failure.
SKILL.md is wired for Branch C across the description, decision table, "When to Use", routing, and quick reference (no BPA / no MCP).

Related Issue

Motivation and Context

Static-to-editable template conversion plus AEM Modernize Tools rule authoring is one of the most error-prone, manual steps in a 6.x/AMS → AEMaaCS migration, with failure modes that destroy content silently (locked components placed in initial/, missing cq:copyChildren on component rules). This pipeline codifies the safe path and mechanically validates against those hazards.

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Himani Chauhan and others added 2 commits June 26, 2026 18:44
Introduces a three-phase static → editable template migration pipeline:
context discovery (shared YAML + plan table), per-template execution via
editable-template-creation and aem-modernization generators, and
post-generation validation with blocking rg assertions.

- Add references/template-modernization/template-modernization-context.md
  — discovery schema, 8-step pipeline, named-child classification table,
    plan table (Create editable / structure rule / component rule / policy rule)
- Add references/template-modernization/editable-template-creation.md
  — generates 4-node editable template (root, structure, initial, policies)
    and updates templates/.content.xml; sourced from confirmed context YAML
- Add references/template-modernization/aem-modernization.md
  — generates structure rewrite rules, component rewrite rules (cq:copyChildren
    enforced), policy import rules, repoinit initializer, and service configs
- Add references/template-modernization/template-modernization-validation.md
  — 7-section post-generation validation; any failure blocks commit
- Update SKILL.md: add Branch C routing, Quick Start row, starter prompt,
  Step 1 pattern recognition, Template modernization flow section, and
  Quick Reference entry

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Address review findings on the template-modernization pipeline references:

- breakpoints: remove the 768/1200 default that contradicted the
  "never invent breakpoints" rule; emit one node per conventions.breakpoints
  entry, placeholder-driven node names/titles/widths
- remove/ignore/rename/order.components: clarify all four operate on JCR
  node names, not sling:resourceType values (verified against
  adobe/aem-modernize-tools PageRewriteRule.getName() matching) — wrong
  identifier silently removes the wrong node or nothing
- service config PIDs: use the impl-class FQN (…impl.*ServiceImpl) for
  structure/component/policy; the interface-named PID is inert and leaves
  search.paths empty so rule folders are never scanned
- runtime nodes: re-anchor stale "checklist step 8" ref to the context
  classifier's required-runtime / placement:initial
- cq:deviceGroups: note /etc/mobile/groups/responsive is the standard
  path, use verbatim, do not modernize
- validation: align 2.3/3.4/4.2 with the impl PID; spell out the Grep-tool
  invocation for the cq:copyChildren check
- add allowedTemplates manual step (template not selectable in Create Page
  wizard until allowed on the parent content tree)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

Tessl Skill Lint

⚠️ edge-delivery-services — 1 warning(s)
⚠ tile.json is deprecated. Migrate to .tessl-plugin/plugin.json to publish a plugin-shape package. Run `tessl plugin migrate` to convert automatically. tile.json support will be removed in a future release.

✔ Plugin adobe/aem-edge-delivery-services@0.1.0 is valid
⚠️ stardust — 1 warning(s)
⚠ tile.json is deprecated. Migrate to .tessl-plugin/plugin.json to publish a plugin-shape package. Run `tessl plugin migrate` to convert automatically. tile.json support will be removed in a future release.

✔ Plugin adobe/stardust@0.13.1 is valid

✅ All 2 tile(s) lint passed with 2 warning(s) total.

Updated by tessl-lint for commit bacf459.

The description's "per-template pipeline: context → …" parsed the
space-after-colon as a nested YAML mapping key, failing deterministic
validation (and cascading the tessl-review score to 16%). Replace the
colon with an em dash to match the file's existing style.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants