[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6H46G2A0FDCYNMG0HNWREFQ":3,"skill-same:01M6H46G2A0FDCYNMG0HNWREFQ":79},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":28,"publishedAt":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":57,"commitSha":58,"skillDirectory":59,"forksCount":60,"repositoryHtmlUrl":61,"repositoryHomepageUrl":6,"ownerHtmlUrl":62,"ownerBlogUrl":63,"ownerDescription":64,"updatedAt":65,"install":66,"resources":78},"01M6H46G2A0FDCYNMG0HNWREFQ","dx-scan",null,"Deep project scan — discover conventions from actual code, customize rule files with real values, and generate seed data. Interactive. Run after \u002Fdx-init + \u002Fdx-adapt + \u002Faem-init. Use when setting up a new project or when project structure changes significantly.","easingthemes\u002Fdx-aem-flow","easingthemes","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2750284?v=4","01M6H3XYGJY8QCX9ES36P2WF4H","Dragan Filipović","01M6H3XYMN1XVSGKN7N79SW3RH",7,"MIT","https:\u002F\u002Fgithub.com\u002Feasingthemes\u002Fdx-aem-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fdx-core\u002Fskills\u002Fdx-scan\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"scan","dx scan","dx","structure","init","phase3","phase2","phase1","structural","discover","project","deep","run","project structure","generate","files","up","code","learn","update","2026-11-10 10:12:30",false,"---\nname: dx-scan\ndescription: Deep project scan — discover conventions from actual code, customize rule files with real values, and generate seed data. Interactive. Run after \u002Fdx-init + \u002Fdx-adapt + \u002Faem-init. Use when setting up a new project or when project structure changes significantly.\nwhen_to_use: \"Use when setting up a new project or after significant structural changes. Trigger on 'scan project', 'discover conventions', 'dx-scan', 'update seed data', or 'learn the project structure'.\"\nargument-hint: \"[phase1|phase2|phase3|all]\"\ndisable-model-invocation: true\n---\n\n## Purpose\n\nScan the actual codebase to discover conventions, then interactively customize `.claude\u002Frules\u002F` with real values and generate `.ai\u002Fproject\u002F` seed data files. This is the \"teach the AI about YOUR project\" step.\n\n**Before this skill:** `\u002Fdx-init` scaffolds config, `\u002Fdx-adapt` detects type\u002Ftoolchain, `\u002Faem-init` sets up AEM. After those, rules still have generic placeholders and seed data is empty.\n\n**After this skill:** Rules contain real CSS variables, actual component patterns, discovered naming conventions. Seed data describes the architecture, features, and file patterns. Every AI skill benefits from this context.\n\n## Prerequisites\n\n1. `.ai\u002Fconfig.yaml` must exist (run `\u002Fdx-init` first)\n2. `project.type` must be set (run `\u002Fdx-adapt` first)\n3. For AEM projects: `aem:` section must exist (run `\u002Faem-init` first)\n\nIf any prerequisite is missing, print which skill to run and STOP.\n\n## Argument\n\nOptional phase selector:\n- `phase1` — frontend conventions only\n- `phase2` — backend conventions only\n- `phase3` — seed data only\n- `all` or no argument — run all phases\n\n## Flow\n\n```dot\ndigraph dx_scan {\n    \"Check prerequisites\" [shape=box];\n    \"Prerequisites OK?\" [shape=diamond];\n    \"Read config + detect scope\" [shape=box];\n    \"Phase 1: Frontend conventions\" [shape=box];\n    \"Phase 2: Backend conventions\" [shape=box];\n    \"Phase 3: Seed data\" [shape=box];\n    \"Summary\" [shape=doublecircle];\n    \"STOP — missing prereqs\" [shape=doublecircle];\n\n    \"Check prerequisites\" -> \"Prerequisites OK?\";\n    \"Prerequisites OK?\" -> \"STOP — missing prereqs\" [label=\"no\"];\n    \"Prerequisites OK?\" -> \"Read config + detect scope\" [label=\"yes\"];\n    \"Read config + detect scope\" -> \"Phase 1: Frontend conventions\";\n    \"Phase 1: Frontend conventions\" -> \"Phase 2: Backend conventions\";\n    \"Phase 2: Backend conventions\" -> \"Phase 3: Seed data\";\n    \"Phase 3: Seed data\" -> \"Summary\";\n}\n```\n\n## Node Details\n\n### Check prerequisites\n\nRead `.ai\u002Fconfig.yaml`. Verify:\n- File exists\n- `project.type` is set\n- If type starts with `aem-`: verify `aem:` section exists\n\n### Read config + detect scope\n\nFrom `.ai\u002Fconfig.yaml` read:\n- `project.type` — determines which phases apply\n- `project.role` — `frontend`, `backend`, `fullstack`, `config`\n- `aem.component-path`, `aem.frontend-dir`, `aem.component-prefix` — for AEM scanning\n- `toolchain.*` — build tool, CSS compiler, template engine\n- `build.*` — build commands\n\nDetermine scope:\n- **Has frontend:** type contains `frontend` OR role is `fullstack` OR `aem.frontend-dir` exists\n- **Has backend:** type contains `fullstack` OR role is `backend` OR `aem.component-path` exists\n- **Is AEM:** type starts with `aem-`\n\nPrint: `Project: \u003Cname> | Type: \u003Ctype> | Role: \u003Crole> | FE: yes\u002Fno | BE: yes\u002Fno | AEM: yes\u002Fno`\n\n### Phase 1: Frontend conventions\n\nSkip if project has no frontend. Print: `Phase 1: Scanning frontend conventions...`\n\n#### 1a. CSS\u002FSCSS conventions\n\nScan for:\n- **Variables\u002Ftokens:** Grep `*.scss` and `*.css` files for `$` variables and `--` custom properties. Group by category (colors, spacing, breakpoints, typography, z-index).\n- **Breakpoints:** Search for `@media` queries, `$bp-` or `$breakpoint-` variables, or breakpoint maps.\n- **Naming convention:** Sample 20+ class names from SCSS files. Detect pattern (BEM, utility-first, custom).\n\nPresent discoveries to user:\n\n```\nI found these CSS conventions:\n\n**Breakpoints:**\n  $bp-mobile: 768px\n  $bp-tablet: 1024px\n  $bp-desktop: 1200px\n\n**Color tokens:** 12 variables (e.g., $color-primary: #1a1a1a, $color-accent: #0066cc)\n**Spacing:** $spacing-xs through $spacing-xl (4px–48px scale)\n**Naming:** BEM pattern detected (block__element--modifier)\n\nIs this accurate? Anything to add or correct?\n```\n\nWait for user confirmation. Then update `.claude\u002Frules\u002Ffe-styles.md` with the confirmed values, replacing generic placeholders.\n\n#### 1b. JavaScript\u002Fcomponent conventions\n\nScan for:\n- **Module system:** Check for `import`\u002F`export` (ESM), `require` (CJS), or `define` (AMD)\n- **Component registration:** Search for `customElements.define`, `React.createElement`, component class patterns\n- **Base class:** Find the component base class (extends pattern)\n- **Event handling:** How events are bound (addEventListener, delegation, framework-specific)\n- **Template engine:** Handlebars (`*.hbs`), HTL (`*.html` with `data-sly-*`), JSX, etc.\n\nPresent discoveries, wait for confirmation. Update `.claude\u002Frules\u002Ffe-javascript.md` and `.claude\u002Frules\u002Ffe-components.md`.\n\n#### 1c. Clientlib structure (AEM only)\n\nIf AEM project, scan for:\n- **Clientlib categories:** Grep `*.content.xml` under clientlibs for `categories`\n- **Embed patterns:** Grep for `embed` property in clientlib definitions\n- **JS\u002FCSS organization:** How files map to clientlib categories\n\nPresent discoveries, wait for confirmation. Update `.claude\u002Frules\u002Ffe-clientlibs.md`.\n\n### Phase 2: Backend conventions\n\nSkip if project has no backend. Print: `Phase 2: Scanning backend conventions...`\n\n#### 2a. Sling Model patterns (AEM only)\n\nScan for:\n- **Model annotations:** Grep Java files for `@Model`, `@Inject`, `@ValueMapValue`, `@ChildResource`, `@ScriptVariable`\n- **Exporter pattern:** Search for `@Exporter`, exporter name, selector\n- **Injector usage:** Which injectors are used (ValueMap, Child, Script, OSGi, Self)\n- **Null handling:** `@Default`, `@Optional`, nullable patterns\n\nPresent 2-3 example models with discovered patterns. Wait for confirmation. Update `.claude\u002Frules\u002Fbe-sling-models.md`.\n\n#### 2b. Component structure (AEM only)\n\nScan for:\n- **Component XML patterns:** Read 3-5 `.content.xml` files under component-path. Extract componentGroup, resourceSuperType, decoration patterns\n- **Dialog structure:** Read 2-3 `_cq_dialog\u002F.content.xml` files. Identify tab patterns, multifield usage, custom widgets\n- **HTL patterns:** Scan `*.html` files for `data-sly-use`, `data-sly-template`, `data-sly-call` patterns\n\nPresent discoveries, wait for confirmation. Update `.claude\u002Frules\u002Fbe-components.md`, `.claude\u002Frules\u002Fbe-dialog.md`, `.claude\u002Frules\u002Fbe-htl.md`.\n\n#### 2c. Testing patterns\n\nScan for:\n- **Test framework:** JUnit 4 vs 5, Mockito, AEM Mocks, wcm.io\n- **Test location:** `src\u002Ftest\u002Fjava\u002F` structure\n- **Naming convention:** `*Test.java`, `*IT.java`, `*Spec.java`\n- **Frontend tests:** Jest, Karma, Mocha, Jasmine\n\nPresent discoveries, wait for confirmation. Update `.claude\u002Frules\u002Fbe-testing.md`.\n\n#### 2d. Java conventions (non-AEM or AEM)\n\nScan for:\n- **Package structure:** Scan `src\u002Fmain\u002Fjava\u002F` tree, identify top-level packages\n- **Service patterns:** `@Component`, `@Service`, `@Reference` (OSGi) or Spring annotations\n- **Logging:** SLF4J, Log4j, pattern used\n\nPresent discoveries, wait for confirmation. Update relevant rule files.\n\n### Phase 3: Seed data\n\nPrint: `Phase 3: Generating seed data...`\n\n#### 3a. Architecture overview\n\nScan the project to build `architecture.md`:\n- **Module structure:** List Maven modules (from pom.xml) or npm workspaces\n- **Rendering pipeline:** For AEM: HTL → Sling Model → Exporter → JSON → FE Component chain\n- **Key libraries:** Scan pom.xml\u002Fpackage.json for significant dependencies (not utilities)\n- **Build pipeline:** How code goes from source to deployed artifact\n\nPresent the architecture summary. Wait for user to confirm or enrich with details the code can't reveal (e.g., \"We also use a custom CDN layer\" or \"The FE components talk to a BFF service\").\n\nWrite to `.ai\u002Fproject\u002Farchitecture.md`.\n\n#### 3b. Features inventory\n\nScan the codebase to identify features:\n- **AEM components:** List all components under component-path with their resourceSuperType and componentGroup\n- **Services\u002FAPIs:** List OSGi services, servlets, filters\n- **Frontend features:** List JS components, their registration names, and source paths\n- **Cross-cutting:** Authentication, i18n, analytics integration\n\nPresent feature list grouped by layer. Ask user to confirm and add any domain-specific features.\n\nWrite to `.ai\u002Fproject\u002Ffeatures.md`.\n\n#### 3c. File patterns\n\nGenerate `file-patterns.yaml` — how to find all source files for a given component:\n\n```yaml\n# Auto-generated by \u002Fdx-scan — maps component name to file locations\n# \u003Cname> is replaced with the component name at runtime\n\npatterns:\n  dialog: \"\u003Capps-path>\u002F\u003Cname>\u002F_cq_dialog\u002F.content.xml\"\n  component-xml: \"\u003Capps-path>\u002F\u003Cname>\u002F.content.xml\"\n  htl: \"\u003Capps-path>\u002F\u003Cname>\u002F\u003Cname>.html\"\n  sling-model: \"\u003Cjava-src>\u002F**\u002Fmodels\u002F\u003CName>Model.java\"\n  exporter: \"\u003Cjava-src>\u002F**\u002Fmodels\u002F\u003CName>Exporter.java\"\n  test: \"\u003Cjava-test>\u002F**\u002Fmodels\u002F\u003CName>ModelTest.java\"\n  scss: \"\u003Cfrontend-dir>\u002Fsrc\u002F**\u002Fcomponents\u002F\u003Cname>\u002F**\u002F*.scss\"\n  js: \"\u003Cfrontend-dir>\u002Fsrc\u002F**\u002Fcomponents\u002F\u003Cname>\u002F**\u002F*.js\"\n  template: \"\u003Cfrontend-dir>\u002Fsrc\u002F**\u002Fcomponents\u002F\u003Cname>\u002F**\u002F*.hbs\"\n```\n\nDiscover actual paths from the codebase (don't assume — verify with Glob). Present to user, wait for confirmation.\n\nWrite to `.ai\u002Fproject\u002Ffile-patterns.yaml`.\n\n#### 3d. Content paths (AEM only)\n\nIf AEM and `aem.content-paths` is set in config, use those. Otherwise:\n\n- Search for `jcr_root\u002Fcontent\u002F` directories in the project\n- If AEM MCP is available, use `mcp__plugin_dx-aem_AEM__fetchSites` to discover live content trees\n- List top-level content paths with brand\u002Fmarket structure\n\nPresent to user. Write to `.ai\u002Fproject\u002Fcontent-paths.yaml`.\n\n#### 3e. Component index check\n\nCheck if `.ai\u002Fproject\u002Fcomponent-index.md` already exists (created by `\u002Faem-init`).\n\n- **If exists:** Print `Component index already exists (created by \u002Faem-init). Skipping.`\n- **If missing and AEM MCP available:** Offer to run component discovery now\n- **If missing and no AEM MCP:** Print guidance on how to generate it via `\u002Faem-init`\n\nDo NOT regenerate if it already exists.\n\n#### 3f. Architecture check command\n\nRules in `.claude\u002Frules\u002F` and `.ai\u002Frules\u002F` are checked by a model, which can be argued out of them. If the project already has a deterministic architecture check, `\u002Fdx-step-verify` can run it as a blocking gate (phase 5). Skip if `build.arch-command` is already set.\n\nLook for:\n- **ArchUnit** — `archunit` in a `pom.xml` \u002F `build.gradle`, or test classes importing `com.tngtech.archunit` → propose the command that runs only those tests (e.g. `mvn -q test -Dtest=\u003CArchTestClass>`)\n- **dependency-cruiser** — `.dependency-cruiser.js|cjs|json` → `npx depcruise \u003Csrc-dir> --config \u003Cfile>`\n- **ESLint boundaries** — `eslint-plugin-boundaries`, `import\u002Fno-restricted-paths` or `@nx\u002Fenforce-module-boundaries` in the ESLint config → the project's lint command, scoped to the rule if it has a script for that\n- **A package.json script** named like `arch`, `lint:arch`, `check:architecture` → `npm run \u003Cscript>`\n\nPresent the command and what it checks, ask to confirm, then write it as `build.arch-command` in `.ai\u002Fconfig.yaml`. If nothing is found, print `No architecture check found — \u002Fdx-step-verify phase 5 uses built-in conventions only.` Do not invent a check or add a tool to the project.\n\n### Summary\n\nPrint a summary of everything created\u002Fupdated:\n\n```markdown\n## \u002Fdx-scan Complete\n\n### Rules Updated\n| File | What Changed |\n|------|-------------|\n| fe-styles.md | Added 12 CSS variables, 3 breakpoints, BEM naming |\n| fe-javascript.md | ESM imports, BaseComponent class, CustomElements |\n| ... | ... |\n\n### Seed Data Created\n| File | Content |\n|------|---------|\n| architecture.md | 4 modules, HTL→Model→Exporter pipeline |\n| features.md | 23 components, 8 services, 12 FE features |\n| file-patterns.yaml | 9 pattern templates |\n| content-paths.yaml | 3 content roots, 2 brands |\n\n### Next Steps\n1. Review generated files in `.ai\u002Fproject\u002F`\n2. Run `\u002Fdx-help` to test if AI can answer project questions\n3. Run `\u002Fdx-req \u003Cticket-id>` — AI will now use your project context\n```\n\n## Interactive Protocol\n\nEvery discovery is presented to the user before writing. The format:\n\n1. **Present:** Show what was found with concrete examples from their code\n2. **Ask:** \"Is this accurate? Anything to add or correct?\"\n3. **Wait:** Do not proceed until user responds\n4. **Apply:** Write confirmed values to the target file\n\nIf the user says \"skip\" for any phase, skip it entirely. If they say \"auto\" or \"just do it\", proceed without confirmation for remaining items in that phase.\n\n## Idempotency\n\n- **Rules:** If a rule file already has project-specific values (no placeholders remaining), ask: \"This file appears customized. (A) Keep as-is, (B) Re-scan and update, (C) Show current\"\n- **Seed data:** If a seed data file already exists, ask: \"This file already exists. (A) Keep, (B) Regenerate, (C) Merge new discoveries\"\n\n## Examples\n\n1. `\u002Fdx-scan` — Full interactive scan. Discovers FE conventions (SCSS variables, JS patterns), BE conventions (Sling Model patterns, dialog structure), and generates all seed data files. Each discovery is confirmed interactively.\n\n2. `\u002Fdx-scan phase1` — Frontend conventions only. Scans CSS\u002FSCSS, JavaScript, clientlibs. Updates fe-styles.md, fe-javascript.md, fe-components.md, fe-clientlibs.md.\n\n3. `\u002Fdx-scan phase3` — Seed data only. Generates architecture.md, features.md, file-patterns.yaml, content-paths.yaml. Skips rule customization.\n\n## Error Handling\n\n- **No source files found for a phase:** Print warning, skip that sub-phase. E.g., \"No SCSS files found — skipping CSS convention scan.\"\n- **Rule file doesn't exist:** Print: \"Rule file \u003Cname>.md not found in .claude\u002Frules\u002F. Run \u002Fdx-init or \u002Faem-init first to install rule templates.\"\n- **AEM MCP not available:** Skip AEM-MCP-dependent steps (content-paths from live instance, component discovery). Fall back to filesystem analysis.\n\n## Rules\n\n- **Interactive first** — always present and confirm before writing\n- **Never overwrite silently** — if a file exists with customizations, ask before replacing\n- **Concrete examples** — show actual code snippets from their project, not generic descriptions\n- **Skip gracefully** — if a phase finds nothing relevant, skip it with a clear message\n- **Config-driven** — read project.type, project.role, aem.* to determine what to scan\n","## Purpose\n\nScan the actual codebase to discover conventions, then interactively customize `.claude\u002Frules\u002F` with real values and generate `.ai\u002Fproject\u002F` seed data files. This is the \"teach the AI about YOUR project\" step.\n\n**Before this skill:** `\u002Fdx-init` scaffolds config, `\u002Fdx-adapt` detects type\u002Ftoolchain, `\u002Faem-init` sets up AEM. After those, rules still have generic placeholders and seed data is empty.\n\n**After this skill:** Rules contain real CSS variables, actual component patterns, discovered naming conventions. Seed data describes the architecture, features, and file patterns. Every AI skill benefits from this context.\n\n## Prerequisites\n\n1. `.ai\u002Fconfig.yaml` must exist (run `\u002Fdx-init` first)\n2. `project.type` must be set (run `\u002Fdx-adapt` first)\n3. For AEM projects: `aem:` section must exist (run `\u002Faem-init` first)\n\nIf any prerequisite is missing, print which skill to run and STOP.\n\n## Argument\n\nOptional phase selector:\n- `phase1` — frontend conventions only\n- `phase2` — backend conventions only\n- `phase3` — seed data only\n- `all` or no argument — run all phases\n\n## Flow\n\n```dot\ndigraph dx_scan {\n    \"Check prerequisites\" [shape=box];\n    \"Prerequisites OK?\" [shape=diamond];\n    \"Read config + detect scope\" [shape=box];\n    \"Phase 1: Frontend conventions\" [shape=box];\n    \"Phase 2: Backend conventions\" [shape=box];\n    \"Phase 3: Seed data\" [shape=box];\n    \"Summary\" [shape=doublecircle];\n    \"STOP — missing prereqs\" [shape=doublecircle];\n\n    \"Check prerequisites\" -> \"Prerequisites OK?\";\n    \"Prerequisites OK?\" -> \"STOP — missing prereqs\" [label=\"no\"];\n    \"Prerequisites OK?\" -> \"Read config + detect scope\" [label=\"yes\"];\n    \"Read config + detect scope\" -> \"Phase 1: Frontend conventions\";\n    \"Phase 1: Frontend conventions\" -> \"Phase 2: Backend conventions\";\n    \"Phase 2: Backend conventions\" -> \"Phase 3: Seed data\";\n    \"Phase 3: Seed data\" -> \"Summary\";\n}\n```\n\n## Node Details\n\n### Check prerequisites\n\nRead `.ai\u002Fconfig.yaml`. Verify:\n- File exists\n- `project.type` is set\n- If type starts with `aem-`: verify `aem:` section exists\n\n### Read config + detect scope\n\nFrom `.ai\u002Fconfig.yaml` read:\n- `project.type` — determines which phases apply\n- `project.role` — `frontend`, `backend`, `fullstack`, `config`\n- `aem.component-path`, `aem.frontend-dir`, `aem.component-prefix` — for AEM scanning\n- `toolchain.*` — build tool, CSS compiler, template engine\n- `build.*` — build commands\n\nDetermine scope:\n- **Has frontend:** type contains `frontend` OR role is `fullstack` OR `aem.frontend-dir` exists\n- **Has backend:** type contains `fullstack` OR role is `backend` OR `aem.component-path` exists\n- **Is AEM:** type starts with `aem-`\n\nPrint: `Project: \u003Cname> | Type: \u003Ctype> | Role: \u003Crole> | FE: yes\u002Fno | BE: yes\u002Fno | AEM: yes\u002Fno`\n\n### Phase 1: Frontend conventions\n\nSkip if project has no frontend. Print: `Phase 1: Scanning frontend conventions...`\n\n#### 1a. CSS\u002FSCSS conventions\n\nScan for:\n- **Variables\u002Ftokens:** Grep `*.scss` and `*.css` files for `$` variables and `--` custom properties. Group by category (colors, spacing, breakpoints, typography, z-index).\n- **Breakpoints:** Search for `@media` queries, `$bp-` or `$breakpoint-` variables, or breakpoint maps.\n- **Naming convention:** Sample 20+ class names from SCSS files. Detect pattern (BEM, utility-first, custom).\n\nPresent discoveries to user:\n\n```\nI found these CSS conventions:\n\n**Breakpoints:**\n  $bp-mobile: 768px\n  $bp-tablet: 1024px\n  $bp-desktop: 1200px\n\n**Color tokens:** 12 variables (e.g., $color-primary: #1a1a1a, $color-accent: #0066cc)\n**Spacing:** $spacing-xs through $spacing-xl (4px–48px scale)\n**Naming:** BEM pattern detected (block__element--modifier)\n\nIs this accurate? Anything to add or correct?\n```\n\nWait for user confirmation. Then update `.claude\u002Frules\u002Ffe-styles.md` with the confirmed values, replacing generic placeholders.\n\n#### 1b. JavaScript\u002Fcomponent conventions\n\nScan for:\n- **Module system:** Check for `import`\u002F`export` (ESM), `require` (CJS), or `define` (AMD)\n- **Component registration:** Search for `customElements.define`, `React.createElement`, component class patterns\n- **Base class:** Find the component base class (extends pattern)\n- **Event handling:** How events are bound (addEventListener, delegation, framework-specific)\n- **Template engine:** Handlebars (`*.hbs`), HTL (`*.html` with `data-sly-*`), JSX, etc.\n\nPresent discoveries, wait for confirmation. Update `.claude\u002Frules\u002Ffe-javascript.md` and `.claude\u002Frules\u002Ffe-components.md`.\n\n#### 1c. Clientlib structure (AEM only)\n\nIf AEM project, scan for:\n- **Clientlib categories:** Grep `*.content.xml` under clientlibs for `categories`\n- **Embed patterns:** Grep for `embed` property in clientlib definitions\n- **JS\u002FCSS organization:** How files map to clientlib categories\n\nPresent discoveries, wait for confirmation. Update `.claude\u002Frules\u002Ffe-clientlibs.md`.\n\n### Phase 2: Backend conventions\n\nSkip if project has no backend. Print: `Phase 2: Scanning backend conventions...`\n\n#### 2a. Sling Model patterns (AEM only)\n\nScan for:\n- **Model annotations:** Grep Java files for `@Model`, `@Inject`, `@ValueMapValue`, `@ChildResource`, `@ScriptVariable`\n- **Exporter pattern:** Search for `@Exporter`, exporter name, selector\n- **Injector usage:** Which injectors are used (ValueMap, Child, Script, OSGi, Self)\n- **Null handling:** `@Default`, `@Optional`, nullable patterns\n\nPresent 2-3 example models with discovered patterns. Wait for confirmation. Update `.claude\u002Frules\u002Fbe-sling-models.md`.\n\n#### 2b. Component structure (AEM only)\n\nScan for:\n- **Component XML patterns:** Read 3-5 `.content.xml` files under component-path. Extract componentGroup, resourceSuperType, decoration patterns\n- **Dialog structure:** Read 2-3 `_cq_dialog\u002F.content.xml` files. Identify tab patterns, multifield usage, custom widgets\n- **HTL patterns:** Scan `*.html` files for `data-sly-use`, `data-sly-template`, `data-sly-call` patterns\n\nPresent discoveries, wait for confirmation. Update `.claude\u002Frules\u002Fbe-components.md`, `.claude\u002Frules\u002Fbe-dialog.md`, `.claude\u002Frules\u002Fbe-htl.md`.\n\n#### 2c. Testing patterns\n\nScan for:\n- **Test framework:** JUnit 4 vs 5, Mockito, AEM Mocks, wcm.io\n- **Test location:** `src\u002Ftest\u002Fjava\u002F` structure\n- **Naming convention:** `*Test.java`, `*IT.java`, `*Spec.java`\n- **Frontend tests:** Jest, Karma, Mocha, Jasmine\n\nPresent discoveries, wait for confirmation. Update `.claude\u002Frules\u002Fbe-testing.md`.\n\n#### 2d. Java conventions (non-AEM or AEM)\n\nScan for:\n- **Package structure:** Scan `src\u002Fmain\u002Fjava\u002F` tree, identify top-level packages\n- **Service patterns:** `@Component`, `@Service`, `@Reference` (OSGi) or Spring annotations\n- **Logging:** SLF4J, Log4j, pattern used\n\nPresent discoveries, wait for confirmation. Update relevant rule files.\n\n### Phase 3: Seed data\n\nPrint: `Phase 3: Generating seed data...`\n\n#### 3a. Architecture overview\n\nScan the project to build `architecture.md`:\n- **Module structure:** List Maven modules (from pom.xml) or npm workspaces\n- **Rendering pipeline:** For AEM: HTL → Sling Model → Exporter → JSON → FE Component chain\n- **Key libraries:** Scan pom.xml\u002Fpackage.json for significant dependencies (not utilities)\n- **Build pipeline:** How code goes from source to deployed artifact\n\nPresent the architecture summary. Wait for user to confirm or enrich with details the code can't reveal (e.g., \"We also use a custom CDN layer\" or \"The FE components talk to a BFF service\").\n\nWrite to `.ai\u002Fproject\u002Farchitecture.md`.\n\n#### 3b. Features inventory\n\nScan the codebase to identify features:\n- **AEM components:** List all components under component-path with their resourceSuperType and componentGroup\n- **Services\u002FAPIs:** List OSGi services, servlets, filters\n- **Frontend features:** List JS components, their registration names, and source paths\n- **Cross-cutting:** Authentication, i18n, analytics integration\n\nPresent feature list grouped by layer. Ask user to confirm and add any domain-specific features.\n\nWrite to `.ai\u002Fproject\u002Ffeatures.md`.\n\n#### 3c. File patterns\n\nGenerate `file-patterns.yaml` — how to find all source files for a given component:\n\n```yaml\n# Auto-generated by \u002Fdx-scan — maps component name to file locations\n# \u003Cname> is replaced with the component name at runtime\n\npatterns:\n  dialog: \"\u003Capps-path>\u002F\u003Cname>\u002F_cq_dialog\u002F.content.xml\"\n  component-xml: \"\u003Capps-path>\u002F\u003Cname>\u002F.content.xml\"\n  htl: \"\u003Capps-path>\u002F\u003Cname>\u002F\u003Cname>.html\"\n  sling-model: \"\u003Cjava-src>\u002F**\u002Fmodels\u002F\u003CName>Model.java\"\n  exporter: \"\u003Cjava-src>\u002F**\u002Fmodels\u002F\u003CName>Exporter.java\"\n  test: \"\u003Cjava-test>\u002F**\u002Fmodels\u002F\u003CName>ModelTest.java\"\n  scss: \"\u003Cfrontend-dir>\u002Fsrc\u002F**\u002Fcomponents\u002F\u003Cname>\u002F**\u002F*.scss\"\n  js: \"\u003Cfrontend-dir>\u002Fsrc\u002F**\u002Fcomponents\u002F\u003Cname>\u002F**\u002F*.js\"\n  template: \"\u003Cfrontend-dir>\u002Fsrc\u002F**\u002Fcomponents\u002F\u003Cname>\u002F**\u002F*.hbs\"\n```\n\nDiscover actual paths from the codebase (don't assume — verify with Glob). Present to user, wait for confirmation.\n\nWrite to `.ai\u002Fproject\u002Ffile-patterns.yaml`.\n\n#### 3d. Content paths (AEM only)\n\nIf AEM and `aem.content-paths` is set in config, use those. Otherwise:\n\n- Search for `jcr_root\u002Fcontent\u002F` directories in the project\n- If AEM MCP is available, use `mcp__plugin_dx-aem_AEM__fetchSites` to discover live content trees\n- List top-level content paths with brand\u002Fmarket structure\n\nPresent to user. Write to `.ai\u002Fproject\u002Fcontent-paths.yaml`.\n\n#### 3e. Component index check\n\nCheck if `.ai\u002Fproject\u002Fcomponent-index.md` already exists (created by `\u002Faem-init`).\n\n- **If exists:** Print `Component index already exists (created by \u002Faem-init). Skipping.`\n- **If missing and AEM MCP available:** Offer to run component discovery now\n- **If missing and no AEM MCP:** Print guidance on how to generate it via `\u002Faem-init`\n\nDo NOT regenerate if it already exists.\n\n#### 3f. Architecture check command\n\nRules in `.claude\u002Frules\u002F` and `.ai\u002Frules\u002F` are checked by a model, which can be argued out of them. If the project already has a deterministic architecture check, `\u002Fdx-step-verify` can run it as a blocking gate (phase 5). Skip if `build.arch-command` is already set.\n\nLook for:\n- **ArchUnit** — `archunit` in a `pom.xml` \u002F `build.gradle`, or test classes importing `com.tngtech.archunit` → propose the command that runs only those tests (e.g. `mvn -q test -Dtest=\u003CArchTestClass>`)\n- **dependency-cruiser** — `.dependency-cruiser.js|cjs|json` → `npx depcruise \u003Csrc-dir> --config \u003Cfile>`\n- **ESLint boundaries** — `eslint-plugin-boundaries`, `import\u002Fno-restricted-paths` or `@nx\u002Fenforce-module-boundaries` in the ESLint config → the project's lint command, scoped to the rule if it has a script for that\n- **A package.json script** named like `arch`, `lint:arch`, `check:architecture` → `npm run \u003Cscript>`\n\nPresent the command and what it checks, ask to confirm, then write it as `build.arch-command` in `.ai\u002Fconfig.yaml`. If nothing is found, print `No architecture check found — \u002Fdx-step-verify phase 5 uses built-in conventions only.` Do not invent a check or add a tool to the project.\n\n### Summary\n\nPrint a summary of everything created\u002Fupdated:\n\n```markdown\n## \u002Fdx-scan Complete\n\n### Rules Updated\n| File | What Changed |\n|------|-------------|\n| fe-styles.md | Added 12 CSS variables, 3 breakpoints, BEM naming |\n| fe-javascript.md | ESM imports, BaseComponent class, CustomElements |\n| ... | ... |\n\n### Seed Data Created\n| File | Content |\n|------|---------|\n| architecture.md | 4 modules, HTL→Model→Exporter pipeline |\n| features.md | 23 components, 8 services, 12 FE features |\n| file-patterns.yaml | 9 pattern templates |\n| content-paths.yaml | 3 content roots, 2 brands |\n\n### Next Steps\n1. Review generated files in `.ai\u002Fproject\u002F`\n2. Run `\u002Fdx-help` to test if AI can answer project questions\n3. Run `\u002Fdx-req \u003Cticket-id>` — AI will now use your project context\n```\n\n## Interactive Protocol\n\nEvery discovery is presented to the user before writing. The format:\n\n1. **Present:** Show what was found with concrete examples from their code\n2. **Ask:** \"Is this accurate? Anything to add or correct?\"\n3. **Wait:** Do not proceed until user responds\n4. **Apply:** Write confirmed values to the target file\n\nIf the user says \"skip\" for any phase, skip it entirely. If they say \"auto\" or \"just do it\", proceed without confirmation for remaining items in that phase.\n\n## Idempotency\n\n- **Rules:** If a rule file already has project-specific values (no placeholders remaining), ask: \"This file appears customized. (A) Keep as-is, (B) Re-scan and update, (C) Show current\"\n- **Seed data:** If a seed data file already exists, ask: \"This file already exists. (A) Keep, (B) Regenerate, (C) Merge new discoveries\"\n\n## Examples\n\n1. `\u002Fdx-scan` — Full interactive scan. Discovers FE conventions (SCSS variables, JS patterns), BE conventions (Sling Model patterns, dialog structure), and generates all seed data files. Each discovery is confirmed interactively.\n\n2. `\u002Fdx-scan phase1` — Frontend conventions only. Scans CSS\u002FSCSS, JavaScript, clientlibs. Updates fe-styles.md, fe-javascript.md, fe-components.md, fe-clientlibs.md.\n\n3. `\u002Fdx-scan phase3` — Seed data only. Generates architecture.md, features.md, file-patterns.yaml, content-paths.yaml. Skips rule customization.\n\n## Error Handling\n\n- **No source files found for a phase:** Print warning, skip that sub-phase. E.g., \"No SCSS files found — skipping CSS convention scan.\"\n- **Rule file doesn't exist:** Print: \"Rule file \u003Cname>.md not found in .claude\u002Frules\u002F. Run \u002Fdx-init or \u002Faem-init first to install rule templates.\"\n- **AEM MCP not available:** Skip AEM-MCP-dependent steps (content-paths from live instance, component discovery). Fall back to filesystem analysis.\n\n## Rules\n\n- **Interactive first** — always present and confirm before writing\n- **Never overwrite silently** — if a file exists with customizations, ask before replacing\n- **Concrete examples** — show actual code snippets from their project, not generic descriptions\n- **Skip gracefully** — if a phase finds nothing relevant, skip it with a clear message\n- **Config-driven** — read project.type, project.role, aem.* to determine what to scan\n",{"name":5,"description":7,"when_to_use":54,"argument-hint":55,"disable-model-invocation":56},"Use when setting up a new project or after significant structural changes. Trigger on 'scan project', 'discover conventions', 'dx-scan', 'update seed data', or 'learn the project structure'.","[phase1|phase2|phase3|all]",true,"main","a99cabc3f459fbeaa42b13a1604db1bccb6a364b","plugins\u002Fdx-core\u002Fskills\u002Fdx-scan",3,"https:\u002F\u002Fgithub.com\u002Feasingthemes\u002Fdx-aem-flow","https:\u002F\u002Fgithub.com\u002Feasingthemes","https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fdraganfilipovic\u002F","Agentic SDLC platform in production. I build agent-ready codebases. AEM MCP Server author.","2026-11-11 09:59:48",{"source":8,"skillName":5,"commands":67,"prompt":77,"zipAvailable":56},[68,71,74],{"tool":69,"command":70},"npx","npx skills add easingthemes\u002Fdx-aem-flow --skill dx-scan",{"tool":72,"command":73},"bunx","bunx skills add easingthemes\u002Fdx-aem-flow --skill dx-scan",{"tool":75,"command":76},"pnpm","pnpm dlx skills add easingthemes\u002Fdx-aem-flow --skill dx-scan","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Feasingthemes\u002Fdx-aem-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fdx-core\u002Fskills\u002Fdx-scan\u002FSKILL.md",[],[80,105,125,146,162,176],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":49},"01M6H48W19F46A7B7TSSQAMYRW","dx-hub-status","Show hub dispatch status — which repos are running, done, blocked or failed. Use for 'hub status', 'what's running'.","https:\u002F\u002Fgithub.com\u002Feasingthemes\u002Fdx-aem-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fdx-hub\u002Fskills\u002Fdx-hub-status\u002FSKILL.md",[],[31,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],"dx hub status","hub","status","hub status","which","show","for","ticket","clean","use","done","Bash","id","dispatch","read","write","repos","grep",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":49},"01M6H48R6ZH7YMVPMVWMMWT3RA","dx-hub-init","Initialize a hub directory for multi-repo orchestration. Discovers sibling repos, merges configs, validates CLI compatibility. Use when setting up hub mode for the first time. Trigger on \"init hub\", \"set up hub\", \"multi-repo setup\".","https:\u002F\u002Fgithub.com\u002Feasingthemes\u002Fdx-aem-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fdx-hub\u002Fskills\u002Fdx-hub-init\u002FSKILL.md",[],[33,112,31,113,88,114,115,116,117,45,118,119,120,121,98,122,123,101,102,124],"hub init","dx hub init","SET","time","mode","default","repo setup","orchestration","configure","multi-repo","cli","directory","edit",{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":134,"publishedAt":49},"01M6H48K267CWEF8YNN3Y49BVT","dx-hub-dispatch","Dispatch a ticket to several repos — open an independent Claude session per repo in VS Code terminals. Use for 'hub dispatch', 'work on ticket across repos'.","https:\u002F\u002Fgithub.com\u002Feasingthemes\u002Fdx-aem-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fdx-hub\u002Fskills\u002Fdx-hub-dispatch\u002FSKILL.md",[131],{"categoryNo":132,"categoryName":133,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[31,135,100,88,136,93,137,138,139,94,140,141,96,142,98,143,46,144,99,145],"dx hub dispatch","ado","repo","work on","session","open","MCP","URL","vscode","across","work",{"skillNo":147,"name":148,"nameZh":6,"description":149,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":150,"categories":151,"keywords":152,"publishedAt":49},"01M6H48FAWKTT6AAWT3H80ZKE0","dx-hub-config","View and edit hub configuration — add repos, adjust terminal delay. Use to manage hub settings. Trigger on \"hub config\", \"add repo to hub\", \"terminal delay\".","https:\u002F\u002Fgithub.com\u002Feasingthemes\u002Fdx-aem-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fdx-hub\u002Fskills\u002Fdx-hub-config\u002FSKILL.md",[],[31,153,88,154,92,155,137,156,157,158,159,96,120,98,160,101,161,102,124,103],"dx hub config","config","view","manage","trigger","true","adjust","terminal","settings",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":49},"01M6H48BNMYEJY6CCWPYHNQDAT","dx-discover-repos","Resolve which repos a work item touches (explicit directive → simple block → cross-repo table → LLM). Used by the KAI-HUB router to fan an agent out across repos; 'which repos'.","https:\u002F\u002Fgithub.com\u002Feasingthemes\u002Fdx-aem-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fdx-hub\u002Fskills\u002Fdx-discover-repos\u002FSKILL.md",[],[38,31,169,103,91,137,144,170,99,171,145,172,88,173,174,175],"dx discover repos","router","directive","simple","block","sonnet","table",{"skillNo":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":183,"publishedAt":49},"01M6H487QA1FDSBT1HTZGW4HAQ","dx-upgrade","Upgrade a consumer project to the installed plugin versions — run dx-doctor, fix stale and missing files, list manual actions. Use after upgrading plugins.","https:\u002F\u002Fgithub.com\u002Feasingthemes\u002Fdx-aem-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fdx-core\u002Fskills\u002Fdx-upgrade\u002FSKILL.md",[182],{"categoryNo":132,"categoryName":133,"taxonomyType":21,"taxonomyTypeDesc":22},[184,31,185,39,186,187,188,44,189,41,101,102,124,190,191,192,193,96,194,195],"upgrade","dx upgrade","actions","search","fix","auto","list","doctor","manual","missing","plugin","plugins"]