Skip to content

feat(aem-cloud-service): add vault-package-dependencies analyzer detector + expert skill - #330

Open
bharat941 wants to merge 6 commits into
mainfrom
feat/vault-package-dependencies-pattern
Open

feat(aem-cloud-service): add vault-package-dependencies analyzer detector + expert skill#330
bharat941 wants to merge 6 commits into
mainfrom
feat/vault-package-dependencies-pattern

Conversation

@bharat941

Copy link
Copy Markdown
Contributor

Adds the vault-package-dependencies code-assessment pattern — surface missing <dependencies> inside filevault-package-maven-plugin (or content-package-maven-plugin) configurations that block AEM as a Cloud Service package deploys. Follows the references/adding-a-pattern.md procedure; the slug vault-package-dependencies is wired into all four required places so the [wiring] test stays green.

Changes

  • Detector — scripts/analyzer/detectors/VaultPackageDependencies.java, registered in Registry.all(). Pom-only, mechanical fix; flags vault/content-package plugin configurations without a <dependencies> block.
  • Expert skill — vault-package-dependencies/SKILL.md (control plane) + vault-package-dependencies/recipe.md (mechanical fix: add <dependencies> block with correct group/artifact refs).
  • Catalog + routing — references/patterns.md row (high | ready | analyzer | mechanical) and Manual Pattern Hints row in code-assessment/SKILL.md.
  • Migration deploy-blocker note — migration/SKILL.md entry pointing at the new pattern.
  • Fixtures + test — test/code-assessment/fixtures/vault-package-dependencies/ (legacy pom missing dependencies) and .../vault-package-dependencies-clean/ (correct pom) + a block in run-tests.sh.
  • Removes the duplicate standalone skills/vault-package-dependencies/ skill superseded by the code-assessment version.

Test Plan

run-tests.sh — all blocks PASS (incl. [wiring] and the new [vault-package-dependencies] block). Detector flags vault/content-package plugin configs missing <dependencies>; does not flag the clean fixture. End-to-end on a real legacy AEM project: analyzer detects → recipe transform applied → analyzer re-scan clean → mvn package builds and the resulting content package deploys on AEMaaCS.

…nt pattern

- Add VaultPackageDependencies detector (pom-only, mechanical fix)
- Add expert skill SKILL.md + recipe.md under code-assessment/
- Register detector in Registry.java
- Add routing hint to code-assessment/SKILL.md
- Add catalog row (high severity, ready, analyzer, mechanical) to patterns.md
- Add vault deploy blocker entry to migration/SKILL.md
- Add positive + negative test fixtures
- Add test cases to run-tests.sh
- Remove duplicate standalone skills/vault-package-dependencies/ skill
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Tessl Plugin Lint

⚠️ edge-delivery-services — 2 warning(s)
⚠ Skill 'code-review': SKILL.md is approximately 10352 tokens (recommended maximum: 5000). Consider moving detailed content to separate reference files.
⚠ Skill 'figma-to-content': SKILL.md is approximately 14744 tokens (recommended maximum: 5000). Consider moving detailed content to separate reference files.

✔ Plugin adobe/aem-edge-delivery-services@0.1.0 is valid
⚠️ app-management — 1 warning(s)
⚠ Skill 'commerce-app-admin-ui': SKILL.md is approximately 5265 tokens (recommended maximum: 5000). Consider moving detailed content to separate reference files.

✔ Plugin adobe/commerce-app-management@1.3.2 is valid

app-migration — clean

app-review — clean

run-workflow — clean

⚠️ stardust — 9 warning(s)
⚠ Skill 'extract': SKILL.md is approximately 9459 tokens (recommended maximum: 5000). Consider moving detailed content to separate reference files.
⚠ Skill 'direct': SKILL.md is approximately 11694 tokens (recommended maximum: 5000). Consider moving detailed content to separate reference files.
⚠ Skill 'prototype': SKILL.md is approximately 17875 tokens (recommended maximum: 5000). Consider moving detailed content to separate reference files.
⚠ Skill 'migrate': SKILL.md is approximately 6375 tokens (recommended maximum: 5000). Consider moving detailed content to separate reference files.
⚠ Skill 'uplift': SKILL.md is approximately 6515 tokens (recommended maximum: 5000). Consider moving detailed content to separate reference files.
⚠ Skill 'audit': SKILL.md is approximately 5269 tokens (recommended maximum: 5000). Consider moving detailed content to separate reference files.
⚠ Skill 'reskin': SKILL.md is approximately 5906 tokens (recommended maximum: 5000). Consider moving detailed content to separate reference files.
⚠ Skill 'deploy': SKILL.md is approximately 38193 tokens (recommended maximum: 5000). Consider moving detailed content to separate reference files.
⚠ Skill 'rollout': SKILL.md is approximately 6779 tokens (recommended maximum: 5000). Consider moving detailed content to separate reference files.

✔ Plugin adobe/stardust@0.18.1 is valid

✅ All 6 plugin(s) lint passed with 12 warning(s) total.

Updated by tessl-lint for commit 3122e4d.

…core

Address tessl-review content-judge feedback (was 3/5, target 3.5+):
- Inline analyze.sh invocations under Findings sources for actionability.
- Add a 5-step inline checkpoint loop (detect/plan/apply/validate/retry) to
  the Routing section for workflow clarity.
- Remove the third restatement of the remove-deprecated-api / Maven-Central
  exception in Critical rules — cross-reference the first bullet instead
  of restating the preflight detail.

No semantic change; the runbook still owns the full flow.
…ration

"Package install fails on AEMaaCS" is a migration blocker, but the pattern
was only reachable via code-assessment directly — migration's analyzer
cascade silently dropped its findings because analyzer-runner.js's
ANALYZER_TO_CANONICAL allowlist didn't include it (same bucket as
inject-in-sling-model/outdated-dependencies, which are correctly excluded
since they're not migration-relevant).

Unlike every other cascade pattern, there is no BPA subtype for this at all —
day/cq60/product Vault install-time dependencies live in pom.xml, which a
deployed-artifact BPA scan can never see (confirmed against a real 64k-row
BPA report: zero hits). So this is wired as `strategy: 'cascade'` with an
empty `bpaSlugs` — the BPA tier is skipped entirely, straight to the
analyzer, same model as htlLint being BPA-less but still migration-routed.

- Add to ANALYZER_TO_CANONICAL so the migration cascade's analyzer tier
  stops silently dropping these findings.
- Add PATTERN_META entry, Quick start row, Branch B routing bullet, "When to
  Use This Skill" bullet, and Step 0 runbook table row in migration/SKILL.md.
- Verified end-to-end against the real analyzer + real fixture: gatherFindings
  now correctly sources it via 'analyzer' (not needsLlmScan).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Same reasoning as guava-cache: day/cq60/product Vault install-time
dependencies never occur in native AEMaaCS code, only in pom.xml carried
over from legacy AEM 6.x — this is a migration-only concern, not a
code-assessment pattern, even though the previous commit gave it a full
analyzer detector + expert-skill folder there.

- Remove the expert skill, Java detector (Registry.java), and fixtures from
  code-assessment; revert SKILL.md/patterns.md/run-tests.sh hooks.
- Add migration/references/vault-package-dependencies.md (merged from the
  old SKILL.md + recipe.md content).
- Replace the analyzer detector with a pure-Node heuristic pom.xml scan
  (migration/scripts/vault-package-scan-runner.js), mirroring htlLint's
  html-scan model — no analyzer, no BPA subtype (confirmed against a real
  64k-row BPA report: zero hits for day/cq60/vault/content-package-maven-plugin).
  Verified byte-for-byte identical output to the removed Java detector
  against both real fixtures (antipattern + clean), plus new edge-case
  coverage (legacy group under an unrelated plugin correctly not flagged).
- Wire PATTERN_META (new 'pom-scan' strategy) + gatherFindings dispatch +
  migration/SKILL.md (Quick start, Branch B, Step 0 table). Removed the
  now-redundant "Vault deploy blocker" doc-only stub row that existed before
  this branch (never wired to any code) in favor of one real, wired entry.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adding the vault-package-dependencies mention pushed the frontmatter
description to 1033 chars, over skills-ref's 1024 limit. This broke both
the `validate` CI check and `tessl-review` (tessl validates the skill
before reviewing it, so it errored out rather than scoring it — "tooling
failure", not a low score). Trimmed redundant wording to 972 chars;
verified locally with `npx skills-ref validate`.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Per explicit request: reverts the tessl-review score fix from earlier in
this session (Findings-sources rewording, Inline checkpoint loop,
remove-deprecated-api sentence tweak). This file had zero vault-package-
dependencies content — the revert removes unrelated content from this PR,
not anything about the pattern move.

Note: this was the fix for tessl-review's below-threshold score (77%,
needed 80%+) on this PR. Reverting it will likely reintroduce that failure
until it's fixed again, separately.

Co-Authored-By: Claude Sonnet 5 <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.

1 participant