@jahia/agentic 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/antigravity/.agents/rules/jahia.md +1 -1
  3. package/dist/antigravity/.agents/skills/jahia-dev-build-component/SKILL.md +2 -2
  4. package/dist/antigravity/.agents/skills/jahia-dev-create-view/SKILL.md +2 -2
  5. package/dist/antigravity/.agents/skills/jahia-dev-import-from/SKILL.md +1 -1
  6. package/dist/antigravity/.agents/skills/jahia-dev-properties/SKILL.md +1 -1
  7. package/dist/antigravity/.agents/skills/jahia-dev-query-content/SKILL.md +1 -1
  8. package/dist/antigravity/.agents/skills/jahia-jcr-sql2/SKILL.md +1 -2
  9. package/dist/antigravity/.agents/skills/jahia-review/SKILL.md +63 -0
  10. package/dist/antigravity/.agents/skills/{jahia-dev-review → jahia-review-code}/SKILL.md +3 -3
  11. package/dist/antigravity/.agents/skills/jahia-review-site/SKILL.md +52 -0
  12. package/dist/antigravity/.agents/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
  13. package/dist/antigravity/AGENTS.md +2 -2
  14. package/dist/claude/.claude/rules/jahia.md +1 -1
  15. package/dist/claude/.claude/skills/jahia-dev-build-component/SKILL.md +2 -2
  16. package/dist/claude/.claude/skills/jahia-dev-create-view/SKILL.md +2 -2
  17. package/dist/claude/.claude/skills/jahia-dev-import-from/SKILL.md +1 -1
  18. package/dist/claude/.claude/skills/jahia-dev-properties/SKILL.md +1 -1
  19. package/dist/claude/.claude/skills/jahia-dev-query-content/SKILL.md +1 -1
  20. package/dist/claude/.claude/skills/jahia-jcr-sql2/SKILL.md +1 -2
  21. package/dist/claude/.claude/skills/jahia-review/SKILL.md +63 -0
  22. package/dist/{codex/.agents/skills/jahia-dev-review → claude/.claude/skills/jahia-review-code}/SKILL.md +3 -3
  23. package/dist/claude/.claude/skills/jahia-review-site/SKILL.md +52 -0
  24. package/dist/claude/.claude/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
  25. package/dist/claude/CLAUDE.md +2 -2
  26. package/dist/codex/.agents/skills/jahia-dev-build-component/SKILL.md +2 -2
  27. package/dist/codex/.agents/skills/jahia-dev-create-view/SKILL.md +2 -2
  28. package/dist/codex/.agents/skills/jahia-dev-import-from/SKILL.md +1 -1
  29. package/dist/codex/.agents/skills/jahia-dev-properties/SKILL.md +1 -1
  30. package/dist/codex/.agents/skills/jahia-dev-query-content/SKILL.md +1 -1
  31. package/dist/codex/.agents/skills/jahia-jcr-sql2/SKILL.md +1 -2
  32. package/dist/codex/.agents/skills/jahia-review/SKILL.md +63 -0
  33. package/dist/{copilot/.agents/skills/jahia-dev-review → codex/.agents/skills/jahia-review-code}/SKILL.md +3 -3
  34. package/dist/codex/.agents/skills/jahia-review-site/SKILL.md +52 -0
  35. package/dist/codex/.agents/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
  36. package/dist/codex/AGENTS.md +2 -2
  37. package/dist/copilot/.agents/skills/jahia-dev-build-component/SKILL.md +2 -2
  38. package/dist/copilot/.agents/skills/jahia-dev-create-view/SKILL.md +2 -2
  39. package/dist/copilot/.agents/skills/jahia-dev-import-from/SKILL.md +1 -1
  40. package/dist/copilot/.agents/skills/jahia-dev-properties/SKILL.md +1 -1
  41. package/dist/copilot/.agents/skills/jahia-dev-query-content/SKILL.md +1 -1
  42. package/dist/copilot/.agents/skills/jahia-jcr-sql2/SKILL.md +1 -2
  43. package/dist/copilot/.agents/skills/jahia-review/SKILL.md +63 -0
  44. package/dist/{claude/.claude/skills/jahia-dev-review → copilot/.agents/skills/jahia-review-code}/SKILL.md +3 -3
  45. package/dist/copilot/.agents/skills/jahia-review-site/SKILL.md +52 -0
  46. package/dist/copilot/.agents/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
  47. package/dist/copilot/AGENTS.md +2 -2
  48. package/dist/cursor/.agents/skills/jahia-dev-build-component/SKILL.md +2 -2
  49. package/dist/cursor/.agents/skills/jahia-dev-create-view/SKILL.md +2 -2
  50. package/dist/cursor/.agents/skills/jahia-dev-import-from/SKILL.md +1 -1
  51. package/dist/cursor/.agents/skills/jahia-dev-properties/SKILL.md +1 -1
  52. package/dist/cursor/.agents/skills/jahia-dev-query-content/SKILL.md +1 -1
  53. package/dist/cursor/.agents/skills/jahia-jcr-sql2/SKILL.md +1 -2
  54. package/dist/cursor/.agents/skills/jahia-review/SKILL.md +63 -0
  55. package/dist/cursor/.agents/skills/jahia-review-code/SKILL.md +228 -0
  56. package/dist/cursor/.agents/skills/jahia-review-site/SKILL.md +52 -0
  57. package/dist/cursor/.agents/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
  58. package/dist/cursor/.cursor/rules/jahia.mdc +1 -1
  59. package/dist/gemini/.agents/skills/jahia-dev-build-component/SKILL.md +2 -2
  60. package/dist/gemini/.agents/skills/jahia-dev-create-view/SKILL.md +2 -2
  61. package/dist/gemini/.agents/skills/jahia-dev-import-from/SKILL.md +1 -1
  62. package/dist/gemini/.agents/skills/jahia-dev-properties/SKILL.md +1 -1
  63. package/dist/gemini/.agents/skills/jahia-dev-query-content/SKILL.md +1 -1
  64. package/dist/gemini/.agents/skills/jahia-jcr-sql2/SKILL.md +1 -2
  65. package/dist/gemini/.agents/skills/jahia-review/SKILL.md +63 -0
  66. package/dist/gemini/.agents/skills/jahia-review-code/SKILL.md +228 -0
  67. package/dist/gemini/.agents/skills/jahia-review-site/SKILL.md +52 -0
  68. package/dist/gemini/.agents/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
  69. package/dist/gemini/AGENTS.md +2 -2
  70. package/dist/index.js +2 -2
  71. package/dist/kiro/.kiro/skills/jahia-dev-build-component/SKILL.md +2 -2
  72. package/dist/kiro/.kiro/skills/jahia-dev-create-view/SKILL.md +2 -2
  73. package/dist/kiro/.kiro/skills/jahia-dev-import-from/SKILL.md +1 -1
  74. package/dist/kiro/.kiro/skills/jahia-dev-properties/SKILL.md +1 -1
  75. package/dist/kiro/.kiro/skills/jahia-dev-query-content/SKILL.md +1 -1
  76. package/dist/kiro/.kiro/skills/jahia-jcr-sql2/SKILL.md +1 -2
  77. package/dist/kiro/.kiro/skills/jahia-review/SKILL.md +63 -0
  78. package/dist/kiro/.kiro/skills/jahia-review-code/SKILL.md +228 -0
  79. package/dist/kiro/.kiro/skills/jahia-review-site/SKILL.md +52 -0
  80. package/dist/kiro/.kiro/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
  81. package/dist/kiro/.kiro/steering/jahia.md +1 -1
  82. package/dist/kiro/AGENTS.md +2 -2
  83. package/dist/opencode/.agents/skills/jahia-dev-build-component/SKILL.md +2 -2
  84. package/dist/opencode/.agents/skills/jahia-dev-create-view/SKILL.md +2 -2
  85. package/dist/opencode/.agents/skills/jahia-dev-import-from/SKILL.md +1 -1
  86. package/dist/opencode/.agents/skills/jahia-dev-properties/SKILL.md +1 -1
  87. package/dist/opencode/.agents/skills/jahia-dev-query-content/SKILL.md +1 -1
  88. package/dist/opencode/.agents/skills/jahia-jcr-sql2/SKILL.md +1 -2
  89. package/dist/opencode/.agents/skills/jahia-review/SKILL.md +63 -0
  90. package/dist/opencode/.agents/skills/jahia-review-code/SKILL.md +228 -0
  91. package/dist/opencode/.agents/skills/jahia-review-site/SKILL.md +52 -0
  92. package/dist/opencode/.agents/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
  93. package/dist/opencode/AGENTS.md +2 -2
  94. package/dist/windsurf/.windsurf/rules/jahia.md +1 -1
  95. package/dist/windsurf/.windsurf/skills/jahia-dev-build-component/SKILL.md +2 -2
  96. package/dist/windsurf/.windsurf/skills/jahia-dev-create-view/SKILL.md +2 -2
  97. package/dist/windsurf/.windsurf/skills/jahia-dev-import-from/SKILL.md +1 -1
  98. package/dist/windsurf/.windsurf/skills/jahia-dev-properties/SKILL.md +1 -1
  99. package/dist/windsurf/.windsurf/skills/jahia-dev-query-content/SKILL.md +1 -1
  100. package/dist/windsurf/.windsurf/skills/jahia-jcr-sql2/SKILL.md +1 -2
  101. package/dist/windsurf/.windsurf/skills/jahia-review/SKILL.md +63 -0
  102. package/dist/windsurf/.windsurf/skills/jahia-review-code/SKILL.md +228 -0
  103. package/dist/windsurf/.windsurf/skills/jahia-review-site/SKILL.md +52 -0
  104. package/dist/windsurf/.windsurf/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
  105. package/dist/windsurf/AGENTS.md +2 -2
  106. package/package.json +1 -1
  107. package/dist/antigravity/.agents/skills/jahia-dev-site-review/SKILL.md +0 -70
  108. package/dist/antigravity/.agents/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
  109. package/dist/claude/.claude/skills/jahia-dev-site-review/SKILL.md +0 -70
  110. package/dist/claude/.claude/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
  111. package/dist/codex/.agents/skills/jahia-dev-site-review/SKILL.md +0 -70
  112. package/dist/codex/.agents/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
  113. package/dist/copilot/.agents/skills/jahia-dev-site-review/SKILL.md +0 -70
  114. package/dist/copilot/.agents/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
  115. package/dist/cursor/.agents/skills/jahia-dev-review/SKILL.md +0 -228
  116. package/dist/cursor/.agents/skills/jahia-dev-site-review/SKILL.md +0 -70
  117. package/dist/cursor/.agents/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
  118. package/dist/gemini/.agents/skills/jahia-dev-review/SKILL.md +0 -228
  119. package/dist/gemini/.agents/skills/jahia-dev-site-review/SKILL.md +0 -70
  120. package/dist/gemini/.agents/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
  121. package/dist/kiro/.kiro/skills/jahia-dev-review/SKILL.md +0 -228
  122. package/dist/kiro/.kiro/skills/jahia-dev-site-review/SKILL.md +0 -70
  123. package/dist/kiro/.kiro/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
  124. package/dist/opencode/.agents/skills/jahia-dev-review/SKILL.md +0 -228
  125. package/dist/opencode/.agents/skills/jahia-dev-site-review/SKILL.md +0 -70
  126. package/dist/opencode/.agents/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
  127. package/dist/windsurf/.windsurf/skills/jahia-dev-review/SKILL.md +0 -228
  128. package/dist/windsurf/.windsurf/skills/jahia-dev-site-review/SKILL.md +0 -70
  129. package/dist/windsurf/.windsurf/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
@@ -1,6 +1,6 @@
1
1
  # CLAUDE.md
2
2
  <!-- Generated by APM CLI -->
3
- <!-- Build ID: 33278bb79af8 -->
3
+ <!-- Build ID: 79513a019b28 -->
4
4
 
5
5
  # Project Standards
6
6
 
@@ -26,7 +26,7 @@ You are helping develop a **Jahia JavaScript Module** — a React-based template
26
26
  7a. **`yarn` and `npx` must be run from the module root** — the module is a standalone project, not part of a monorepo. Running `yarn` from a parent directory fails with a workspace boundary error. Always `cd` to the module directory first.
27
27
  7b. **Use `grep`, not `ugrep`** — `ugrep` is not available on all systems and does not support the same regex syntax. Use `grep -rn` for plain text, `grep -rn -E` for extended regex, or `grep -rn -P` for Perl-compatible patterns (e.g. lookaheads). Never use `ugrep` or `(?m)` flags.
28
28
  8. **Build accessible HTML from the start** — every view must use semantic HTML (`<main>`, `<header>`, `<nav>`, `<footer>`, `<section>`, `<article>`), include exactly one `<h1>` per page (in the template from `jcr:title` — never inside a component), use a strict heading hierarchy (h1 in template → h2 in components → h3 for sub-items), add `alt` text to every `<img>` with a meaningful fallback (`imageAlt || title || 'Image'` — never empty string), ensure sufficient colour contrast (≥ 4.5:1 for body text), include a skip link at the top of the template, and never leave a landmark (`<nav>`, `<footer>`) empty.
29
- 9. **Review quality after each deploy** — after deploying and populating content, run `/jahia-dev-site-review` to get a scored a11y + SEO report. Fix any critical/serious violations before moving on. Do not write `pages.json` until the review passes.
29
+ 9. **Review quality after each deploy** — after deploying and populating content, write the live page URLs to `pages-to-review.json`, then invoke `/jahia-review` to run a full code and site review via subagents. Fix all reported violations and iterate until `/jahia-review-site` exits 0. The review script writes `pages.json` on pass never write it manually.
30
30
  10. **Deploy iteratively** — deploy after each component with `yarn build && yarn jahia-deploy`, verify it renders, then move to the next. Don't accumulate components before deploying; a broken component is easier to diagnose in isolation.
31
31
  11. **Collocate everything per component** — each component lives in `src/components/<Category>/<Name>/` containing its `definition.cnd`, `default.server.tsx`, `component.module.css`, and `types.ts`. Never centralize content types in `settings/definitions.cnd` — that file holds only namespace declarations and the module base mixin.
32
32
  12. **Always build a page template first** — every website needs a root template at `src/templates/<ModuleName>Template/default.server.tsx`. It must include: a skip link, a `<nav>` built inline from children of the site's home node using `getChildNodes(renderContext.getSite().getNode('home'), -1, 0, n => n.isNodeType('jnt:page'))` (pages live under `home`, not directly under the site), a `<main id="main-content">` with `<h1>{title}</h1>` and Areas, and a `<footer>` that is never empty. The `<title>` tag must be `{title} | {siteName}` — never set `jcr:title` to the full `Page | Site` string; `jcr:title` is always just the short page name (e.g. "Car Insurance"). Build and deploy before any page-specific components.
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: jahia-dev-build-component
3
- description: Builds a complete Jahia component (content type + view + CSS) from a description. Meta-skill that orchestrates jahia-dev-define-content-type and jahia-dev-create-view. Use when asked to build a new UI component or section.
3
+ description: Builds a complete Jahia component (content type + view + CSS) from a description. Meta-skill that orchestrates jahia-cnd-author and jahia-dev-create-view. Use when asked to build a new UI component or section.
4
4
  ---
5
5
 
6
6
  ## Overview
7
7
 
8
8
  This meta-skill builds a complete **Single Directory Component (SDC)** — the standard Jahia component pattern — by sequencing two atomic skills:
9
9
 
10
- 1. `jahia-dev-define-content-type` → create the CND definition and `types.ts`
10
+ 1. `jahia-cnd-author` → create the CND definition and `types.ts`
11
11
  2. `jahia-dev-create-view` → implement the React view and CSS Module
12
12
 
13
13
  Run these steps in order. Do not skip to the view before the content type is defined.
@@ -144,7 +144,7 @@ Always import `Props` from `./types.js` (not `./types.ts` — use `.js` extensio
144
144
  import type { Props } from "./types.js";
145
145
  ```
146
146
 
147
- If `types.ts` doesn't exist yet, create it first (see `jahia-dev-define-content-type` skill).
147
+ If `types.ts` doesn't exist yet, create it first (see `jahia-cnd-author` skill).
148
148
 
149
149
  ---
150
150
 
@@ -294,7 +294,7 @@ jahiaComponent(
294
294
  );
295
295
  ```
296
296
 
297
- The `Props` type must be a discriminated union (see `jahia-dev-define-content-type` skill).
297
+ The `Props` type must be a discriminated union (see `jahia-cnd-author` skill).
298
298
 
299
299
  ### Cache properties — controlling fragment caching
300
300
 
@@ -106,7 +106,7 @@ Report findings, then ask: **"Should I import any of these? (yes / no / specific
106
106
 
107
107
  ### Step 5a — CND and view
108
108
 
109
- Using the confirmed field split from Step 3, run the `jahia-dev-define-content-type` and `jahia-dev-create-view` patterns to create:
109
+ Using the confirmed field split from Step 3, run the `jahia-cnd-author` and `jahia-dev-create-view` patterns to create:
110
110
 
111
111
  - `src/components/<Category>/<Name>/definition.cnd`
112
112
  - `src/components/<Category>/<Name>/types.ts`
@@ -143,5 +143,5 @@ See [references/all-properties.md](references/all-properties.md) for all ~90 pro
143
143
 
144
144
  Search tip:
145
145
  ```bash
146
- grep -i "keyword" ~/.claude/skills/jahia-properties/references/all-properties.md
146
+ grep -i "keyword" $(find .claude .agents -name "all-properties.md" 2>/dev/null | head -1)
147
147
  ```
@@ -200,5 +200,5 @@ Use `ISDESCENDANTNODE` to cover nested folder trees automatically. Switch to `IS
200
200
 
201
201
  - `/jahia-jcr-sql2` — SQL2 syntax, full-text, joins, pagination, and performance
202
202
  - `/jahia-dev-build-component` — build the listing component that renders query results
203
- - `/jahia-dev-define-content-type` — create the queried content type and folder types
203
+ - `/jahia-cnd-author` — create the queried content type and folder types
204
204
 
@@ -253,6 +253,5 @@ If a user can choose the sort field, validate it against a whitelist before inte
253
253
  ## Related skills
254
254
 
255
255
  - `/jahia-dev-query-content` — apply SQL2 inside Page Builder queries and JS module views
256
- - `/jahia-dev-define-content-type` — define the content types you will query
257
- - `/jahia-java-jcr` — implement back-end JCR logic around the query
256
+ - `/jahia-cnd-author` — define the content types you will query
258
257
 
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: jahia-review
3
+ description: Full quality review of a Jahia JavaScript module — runs code review and live site review in parallel via subagents. Use after deploying to get a complete pass/fail signal before finalizing work.
4
+ allowed-tools: Agent, Bash, Read
5
+ ---
6
+
7
+ # Skill: jahia-review
8
+
9
+ Runs both `/jahia-review-code` and `/jahia-review-site` in parallel via independent subagents, then consolidates their findings. Use this before writing `pages.json` or marking work complete.
10
+
11
+ ---
12
+
13
+ ## Step 1 — Collect live URLs
14
+
15
+ Read `pages.json` to get the list of live page URLs:
16
+
17
+ ```bash
18
+ cat pages.json
19
+ ```
20
+
21
+ ---
22
+
23
+ ## Step 2 — Spawn review subagents in parallel
24
+
25
+ Invoke two subagents simultaneously:
26
+
27
+ **Subagent A — code review:**
28
+ > Invoke `/jahia-review-code` on this module. Scan all CND files, TypeScript views, and page templates. Report every issue found (critical, warning, suggestion) with file locations and fix guidance.
29
+
30
+ **Subagent B — site review:**
31
+ > Invoke `/jahia-review-site` against the URLs in `pages.json`. Run the review script and report every a11y and SEO violation found.
32
+
33
+ ---
34
+
35
+ ## Step 3 — Consolidate and report
36
+
37
+ Combine findings from both subagents into a single report:
38
+
39
+ ```
40
+ ## Review Results
41
+
42
+ ### Code (jahia-review-code)
43
+ [findings from subagent A]
44
+
45
+ ### Site (jahia-review-site)
46
+ [findings from subagent B]
47
+
48
+ ### Verdict
49
+ ✅ PASS — no violations found.
50
+ ❌ FAIL — N issue(s) must be fixed before finalizing.
51
+ ```
52
+
53
+ ---
54
+
55
+ ## Step 4 — Fix and iterate
56
+
57
+ If any violations were found:
58
+
59
+ 1. Fix every reported issue
60
+ 2. Redeploy: `yarn build && yarn jahia-deploy`
61
+ 3. Re-run `/jahia-review` until the verdict is ✅ PASS
62
+
63
+ Only proceed (write `pages.json`, mark work complete) once the review passes.
@@ -1,10 +1,10 @@
1
1
  ---
2
- name: jahia-dev-review
2
+ name: jahia-review-code
3
3
  description: Reviews a Jahia JavaScript module for generic and Jahia-specific best practices. Scans CND definitions, TypeScript views, and page templates. Reports issues in order of importance with fix suggestions. Covers 8 critical checks, 9 warnings, and 10 suggestions.
4
4
  allowed-tools: Bash, Read
5
5
  ---
6
6
 
7
- # Skill: jahia-dev-review
7
+ # Skill: jahia-review-code
8
8
 
9
9
  Reviews a Jahia JavaScript module for correctness and best practices. Scans real files, reports issues in order of severity (🔴 Critical → 🟡 Warning → 🔵 Suggestion), and proposes fixes.
10
10
 
@@ -215,7 +215,7 @@ If no issues found in a category, print `✅ None`.
215
215
 
216
216
  After the report, ask: **"Would you like me to fix any of these issues?"**
217
217
 
218
- If yes, fix them — use the guidance from the relevant skill (`jahia-dev-define-content-type`, `jahia-dev-create-view`) and run `yarn build && yarn jahia-deploy` to push changes.
218
+ If yes, fix them — use the guidance from the relevant skill (`jahia-cnd-author`, `jahia-dev-create-view`) and run `yarn build && yarn jahia-deploy` to push changes.
219
219
 
220
220
  ---
221
221
 
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: jahia-review-site
3
+ description: Scores live pages for accessibility and SEO.
4
+ allowed-tools: Bash, Read, Write, Edit
5
+ ---
6
+
7
+ # Skill: jahia-review-site
8
+
9
+ Reads URLs from `pages-to-review.json`, runs automated a11y and SEO checks, and — only if all checks pass — writes `pages.json`. Exits non-zero without writing `pages.json` if any violation is found.
10
+
11
+ **A11y:** axe-core full ruleset (WCAG + best-practice) — any violation fails.
12
+
13
+ **SEO:** Lighthouse SEO category — any failing audit fails. Violations reported by audit ID (e.g. `document-title`, `meta-description`, `hreflang`, `is-crawlable`, `link-text`, `image-alt`).
14
+
15
+ ---
16
+
17
+ ## Step 1 — Ensure tooling is installed
18
+
19
+ ```bash
20
+ node -e "require('@axe-core/playwright'); require('playwright')" 2>/dev/null || \
21
+ npm install --no-save @axe-core/playwright playwright && npx playwright install chromium --with-deps
22
+ ```
23
+
24
+ ---
25
+
26
+ ## Step 2 — Run the review
27
+
28
+ ```bash
29
+ SCRIPT=$(find .claude .agents -name "review-pages.mjs" 2>/dev/null | head -1)
30
+ node "$SCRIPT" 2>&1 | tee /tmp/site-review.txt
31
+ ```
32
+
33
+ ---
34
+
35
+ ## Step 3 — Interpret and fix
36
+
37
+ The script exits 1 if any page has any a11y violation or any failing Lighthouse SEO audit.
38
+
39
+ After fixing, redeploy and re-run:
40
+
41
+ ```bash
42
+ yarn build && yarn jahia-deploy
43
+ node "$SCRIPT"
44
+ ```
45
+
46
+ Iterate until the script exits 0 and `pages.json` is written.
47
+
48
+ ---
49
+
50
+ ## Validation checklist
51
+ - [ ] Script exits 0 (zero a11y violations, zero failing SEO audits)
52
+ - [ ] `pages.json` exists (created by the script on pass)
@@ -0,0 +1,74 @@
1
+ #!/usr/bin/env node
2
+ // Reads URLs from pages-to-review.json, runs a11y (axe-core) + SEO (Lighthouse) checks.
3
+ // On pass: writes pages.json and exits 0. On fail: exits 1 without writing pages.json.
4
+ import { chromium } from "playwright";
5
+ import { AxeBuilder } from "@axe-core/playwright";
6
+ import lighthouse from "lighthouse";
7
+ import { readFileSync, writeFileSync } from "fs";
8
+
9
+ const SCORED_MODES = new Set(["binary", "numeric"]);
10
+
11
+ const draft = readFileSync("pages-to-review.json", "utf-8");
12
+ const urls = JSON.parse(draft);
13
+ const port = 9222;
14
+ const browser = await chromium.launch({
15
+ args: ["--no-sandbox", `--remote-debugging-port=${port}`],
16
+ });
17
+ const context = await browser.newContext();
18
+ const page = await context.newPage();
19
+
20
+ const results = [];
21
+
22
+ for (const url of urls) {
23
+ process.stdout.write(`\nChecking ${url} … `);
24
+ await page.goto(url, { waitUntil: "networkidle", timeout: 30_000 });
25
+
26
+ // A11y
27
+ const axe = await new AxeBuilder({ page }).analyze();
28
+
29
+ // SEO — Lighthouse reuses the already-open browser via the debug port
30
+ const lhr = (await lighthouse(url, { port, output: "json", onlyCategories: ["seo"] }))?.lhr;
31
+ const seoViolations = lhr
32
+ ? Object.values(lhr.audits).filter(
33
+ a => SCORED_MODES.has(a.scoreDisplayMode) && a.score !== null && a.score < 1,
34
+ )
35
+ : [];
36
+
37
+ process.stdout.write(`a11y=${axe.violations.length} violation(s) seo=${seoViolations.length} violation(s)\n`);
38
+ results.push({ url, violations: axe.violations, seoViolations });
39
+ }
40
+
41
+ await browser.close();
42
+
43
+ // ── Report ──────────────────────────────────────────────────────────────────
44
+ let failed = false;
45
+
46
+ for (const r of results) {
47
+ const pageOk = r.violations.length === 0 && r.seoViolations.length === 0;
48
+ if (!pageOk) failed = true;
49
+
50
+ console.log(`\n${"─".repeat(70)}`);
51
+ console.log(`${pageOk ? "✅" : "❌"} ${r.url}`);
52
+
53
+ for (const v of r.violations) {
54
+ console.log(` ❌ A11y [${v.id}] — ${v.description} (${v.nodes.length} node${v.nodes.length !== 1 ? "s" : ""})`);
55
+ for (const node of v.nodes.slice(0, 3)) {
56
+ console.log(` ${node.html.slice(0, 100)}`);
57
+ }
58
+ }
59
+
60
+ for (const a of r.seoViolations) {
61
+ console.log(` ❌ SEO [${a.id}] — ${a.title}`);
62
+ if (a.description) console.log(` ${a.description.slice(0, 120)}`);
63
+ }
64
+ }
65
+
66
+ console.log(`\n${"═".repeat(70)}`);
67
+ if (failed) {
68
+ console.log("\n❌ FAIL — fix the issues above, redeploy, and re-run.");
69
+ process.exit(1);
70
+ } else {
71
+ writeFileSync("pages.json", draft);
72
+ console.log("\n✅ PASS — pages.json written.");
73
+ process.exit(0);
74
+ }
@@ -1,6 +1,6 @@
1
1
  # AGENTS.md
2
2
  <!-- Generated by APM CLI from distributed .apm/ primitives -->
3
- <!-- Build ID: f8784ff296c9 -->
3
+ <!-- Build ID: 6604f2c9e98d -->
4
4
  <!-- APM Version: 0.21.0 -->
5
5
 
6
6
  ## Global Instructions
@@ -25,7 +25,7 @@ You are helping develop a **Jahia JavaScript Module** — a React-based template
25
25
  7a. **`yarn` and `npx` must be run from the module root** — the module is a standalone project, not part of a monorepo. Running `yarn` from a parent directory fails with a workspace boundary error. Always `cd` to the module directory first.
26
26
  7b. **Use `grep`, not `ugrep`** — `ugrep` is not available on all systems and does not support the same regex syntax. Use `grep -rn` for plain text, `grep -rn -E` for extended regex, or `grep -rn -P` for Perl-compatible patterns (e.g. lookaheads). Never use `ugrep` or `(?m)` flags.
27
27
  8. **Build accessible HTML from the start** — every view must use semantic HTML (`<main>`, `<header>`, `<nav>`, `<footer>`, `<section>`, `<article>`), include exactly one `<h1>` per page (in the template from `jcr:title` — never inside a component), use a strict heading hierarchy (h1 in template → h2 in components → h3 for sub-items), add `alt` text to every `<img>` with a meaningful fallback (`imageAlt || title || 'Image'` — never empty string), ensure sufficient colour contrast (≥ 4.5:1 for body text), include a skip link at the top of the template, and never leave a landmark (`<nav>`, `<footer>`) empty.
28
- 9. **Review quality after each deploy** — after deploying and populating content, run `/jahia-dev-site-review` to get a scored a11y + SEO report. Fix any critical/serious violations before moving on. Do not write `pages.json` until the review passes.
28
+ 9. **Review quality after each deploy** — after deploying and populating content, write the live page URLs to `pages-to-review.json`, then invoke `/jahia-review` to run a full code and site review via subagents. Fix all reported violations and iterate until `/jahia-review-site` exits 0. The review script writes `pages.json` on pass never write it manually.
29
29
  10. **Deploy iteratively** — deploy after each component with `yarn build && yarn jahia-deploy`, verify it renders, then move to the next. Don't accumulate components before deploying; a broken component is easier to diagnose in isolation.
30
30
  11. **Collocate everything per component** — each component lives in `src/components/<Category>/<Name>/` containing its `definition.cnd`, `default.server.tsx`, `component.module.css`, and `types.ts`. Never centralize content types in `settings/definitions.cnd` — that file holds only namespace declarations and the module base mixin.
31
31
  12. **Always build a page template first** — every website needs a root template at `src/templates/<ModuleName>Template/default.server.tsx`. It must include: a skip link, a `<nav>` built inline from children of the site's home node using `getChildNodes(renderContext.getSite().getNode('home'), -1, 0, n => n.isNodeType('jnt:page'))` (pages live under `home`, not directly under the site), a `<main id="main-content">` with `<h1>{title}</h1>` and Areas, and a `<footer>` that is never empty. The `<title>` tag must be `{title} | {siteName}` — never set `jcr:title` to the full `Page | Site` string; `jcr:title` is always just the short page name (e.g. "Car Insurance"). Build and deploy before any page-specific components.
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: jahia-dev-build-component
3
- description: Builds a complete Jahia component (content type + view + CSS) from a description. Meta-skill that orchestrates jahia-dev-define-content-type and jahia-dev-create-view. Use when asked to build a new UI component or section.
3
+ description: Builds a complete Jahia component (content type + view + CSS) from a description. Meta-skill that orchestrates jahia-cnd-author and jahia-dev-create-view. Use when asked to build a new UI component or section.
4
4
  ---
5
5
 
6
6
  ## Overview
7
7
 
8
8
  This meta-skill builds a complete **Single Directory Component (SDC)** — the standard Jahia component pattern — by sequencing two atomic skills:
9
9
 
10
- 1. `jahia-dev-define-content-type` → create the CND definition and `types.ts`
10
+ 1. `jahia-cnd-author` → create the CND definition and `types.ts`
11
11
  2. `jahia-dev-create-view` → implement the React view and CSS Module
12
12
 
13
13
  Run these steps in order. Do not skip to the view before the content type is defined.
@@ -144,7 +144,7 @@ Always import `Props` from `./types.js` (not `./types.ts` — use `.js` extensio
144
144
  import type { Props } from "./types.js";
145
145
  ```
146
146
 
147
- If `types.ts` doesn't exist yet, create it first (see `jahia-dev-define-content-type` skill).
147
+ If `types.ts` doesn't exist yet, create it first (see `jahia-cnd-author` skill).
148
148
 
149
149
  ---
150
150
 
@@ -294,7 +294,7 @@ jahiaComponent(
294
294
  );
295
295
  ```
296
296
 
297
- The `Props` type must be a discriminated union (see `jahia-dev-define-content-type` skill).
297
+ The `Props` type must be a discriminated union (see `jahia-cnd-author` skill).
298
298
 
299
299
  ### Cache properties — controlling fragment caching
300
300
 
@@ -106,7 +106,7 @@ Report findings, then ask: **"Should I import any of these? (yes / no / specific
106
106
 
107
107
  ### Step 5a — CND and view
108
108
 
109
- Using the confirmed field split from Step 3, run the `jahia-dev-define-content-type` and `jahia-dev-create-view` patterns to create:
109
+ Using the confirmed field split from Step 3, run the `jahia-cnd-author` and `jahia-dev-create-view` patterns to create:
110
110
 
111
111
  - `src/components/<Category>/<Name>/definition.cnd`
112
112
  - `src/components/<Category>/<Name>/types.ts`
@@ -143,5 +143,5 @@ See [references/all-properties.md](references/all-properties.md) for all ~90 pro
143
143
 
144
144
  Search tip:
145
145
  ```bash
146
- grep -i "keyword" ~/.claude/skills/jahia-properties/references/all-properties.md
146
+ grep -i "keyword" $(find .claude .agents -name "all-properties.md" 2>/dev/null | head -1)
147
147
  ```
@@ -200,5 +200,5 @@ Use `ISDESCENDANTNODE` to cover nested folder trees automatically. Switch to `IS
200
200
 
201
201
  - `/jahia-jcr-sql2` — SQL2 syntax, full-text, joins, pagination, and performance
202
202
  - `/jahia-dev-build-component` — build the listing component that renders query results
203
- - `/jahia-dev-define-content-type` — create the queried content type and folder types
203
+ - `/jahia-cnd-author` — create the queried content type and folder types
204
204
 
@@ -253,6 +253,5 @@ If a user can choose the sort field, validate it against a whitelist before inte
253
253
  ## Related skills
254
254
 
255
255
  - `/jahia-dev-query-content` — apply SQL2 inside Page Builder queries and JS module views
256
- - `/jahia-dev-define-content-type` — define the content types you will query
257
- - `/jahia-java-jcr` — implement back-end JCR logic around the query
256
+ - `/jahia-cnd-author` — define the content types you will query
258
257
 
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: jahia-review
3
+ description: Full quality review of a Jahia JavaScript module — runs code review and live site review in parallel via subagents. Use after deploying to get a complete pass/fail signal before finalizing work.
4
+ allowed-tools: Agent, Bash, Read
5
+ ---
6
+
7
+ # Skill: jahia-review
8
+
9
+ Runs both `/jahia-review-code` and `/jahia-review-site` in parallel via independent subagents, then consolidates their findings. Use this before writing `pages.json` or marking work complete.
10
+
11
+ ---
12
+
13
+ ## Step 1 — Collect live URLs
14
+
15
+ Read `pages.json` to get the list of live page URLs:
16
+
17
+ ```bash
18
+ cat pages.json
19
+ ```
20
+
21
+ ---
22
+
23
+ ## Step 2 — Spawn review subagents in parallel
24
+
25
+ Invoke two subagents simultaneously:
26
+
27
+ **Subagent A — code review:**
28
+ > Invoke `/jahia-review-code` on this module. Scan all CND files, TypeScript views, and page templates. Report every issue found (critical, warning, suggestion) with file locations and fix guidance.
29
+
30
+ **Subagent B — site review:**
31
+ > Invoke `/jahia-review-site` against the URLs in `pages.json`. Run the review script and report every a11y and SEO violation found.
32
+
33
+ ---
34
+
35
+ ## Step 3 — Consolidate and report
36
+
37
+ Combine findings from both subagents into a single report:
38
+
39
+ ```
40
+ ## Review Results
41
+
42
+ ### Code (jahia-review-code)
43
+ [findings from subagent A]
44
+
45
+ ### Site (jahia-review-site)
46
+ [findings from subagent B]
47
+
48
+ ### Verdict
49
+ ✅ PASS — no violations found.
50
+ ❌ FAIL — N issue(s) must be fixed before finalizing.
51
+ ```
52
+
53
+ ---
54
+
55
+ ## Step 4 — Fix and iterate
56
+
57
+ If any violations were found:
58
+
59
+ 1. Fix every reported issue
60
+ 2. Redeploy: `yarn build && yarn jahia-deploy`
61
+ 3. Re-run `/jahia-review` until the verdict is ✅ PASS
62
+
63
+ Only proceed (write `pages.json`, mark work complete) once the review passes.
@@ -1,10 +1,10 @@
1
1
  ---
2
- name: jahia-dev-review
2
+ name: jahia-review-code
3
3
  description: Reviews a Jahia JavaScript module for generic and Jahia-specific best practices. Scans CND definitions, TypeScript views, and page templates. Reports issues in order of importance with fix suggestions. Covers 8 critical checks, 9 warnings, and 10 suggestions.
4
4
  allowed-tools: Bash, Read
5
5
  ---
6
6
 
7
- # Skill: jahia-dev-review
7
+ # Skill: jahia-review-code
8
8
 
9
9
  Reviews a Jahia JavaScript module for correctness and best practices. Scans real files, reports issues in order of severity (🔴 Critical → 🟡 Warning → 🔵 Suggestion), and proposes fixes.
10
10
 
@@ -215,7 +215,7 @@ If no issues found in a category, print `✅ None`.
215
215
 
216
216
  After the report, ask: **"Would you like me to fix any of these issues?"**
217
217
 
218
- If yes, fix them — use the guidance from the relevant skill (`jahia-dev-define-content-type`, `jahia-dev-create-view`) and run `yarn build && yarn jahia-deploy` to push changes.
218
+ If yes, fix them — use the guidance from the relevant skill (`jahia-cnd-author`, `jahia-dev-create-view`) and run `yarn build && yarn jahia-deploy` to push changes.
219
219
 
220
220
  ---
221
221
 
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: jahia-review-site
3
+ description: Scores live pages for accessibility and SEO.
4
+ allowed-tools: Bash, Read, Write, Edit
5
+ ---
6
+
7
+ # Skill: jahia-review-site
8
+
9
+ Reads URLs from `pages-to-review.json`, runs automated a11y and SEO checks, and — only if all checks pass — writes `pages.json`. Exits non-zero without writing `pages.json` if any violation is found.
10
+
11
+ **A11y:** axe-core full ruleset (WCAG + best-practice) — any violation fails.
12
+
13
+ **SEO:** Lighthouse SEO category — any failing audit fails. Violations reported by audit ID (e.g. `document-title`, `meta-description`, `hreflang`, `is-crawlable`, `link-text`, `image-alt`).
14
+
15
+ ---
16
+
17
+ ## Step 1 — Ensure tooling is installed
18
+
19
+ ```bash
20
+ node -e "require('@axe-core/playwright'); require('playwright')" 2>/dev/null || \
21
+ npm install --no-save @axe-core/playwright playwright && npx playwright install chromium --with-deps
22
+ ```
23
+
24
+ ---
25
+
26
+ ## Step 2 — Run the review
27
+
28
+ ```bash
29
+ SCRIPT=$(find .claude .agents -name "review-pages.mjs" 2>/dev/null | head -1)
30
+ node "$SCRIPT" 2>&1 | tee /tmp/site-review.txt
31
+ ```
32
+
33
+ ---
34
+
35
+ ## Step 3 — Interpret and fix
36
+
37
+ The script exits 1 if any page has any a11y violation or any failing Lighthouse SEO audit.
38
+
39
+ After fixing, redeploy and re-run:
40
+
41
+ ```bash
42
+ yarn build && yarn jahia-deploy
43
+ node "$SCRIPT"
44
+ ```
45
+
46
+ Iterate until the script exits 0 and `pages.json` is written.
47
+
48
+ ---
49
+
50
+ ## Validation checklist
51
+ - [ ] Script exits 0 (zero a11y violations, zero failing SEO audits)
52
+ - [ ] `pages.json` exists (created by the script on pass)
@@ -0,0 +1,74 @@
1
+ #!/usr/bin/env node
2
+ // Reads URLs from pages-to-review.json, runs a11y (axe-core) + SEO (Lighthouse) checks.
3
+ // On pass: writes pages.json and exits 0. On fail: exits 1 without writing pages.json.
4
+ import { chromium } from "playwright";
5
+ import { AxeBuilder } from "@axe-core/playwright";
6
+ import lighthouse from "lighthouse";
7
+ import { readFileSync, writeFileSync } from "fs";
8
+
9
+ const SCORED_MODES = new Set(["binary", "numeric"]);
10
+
11
+ const draft = readFileSync("pages-to-review.json", "utf-8");
12
+ const urls = JSON.parse(draft);
13
+ const port = 9222;
14
+ const browser = await chromium.launch({
15
+ args: ["--no-sandbox", `--remote-debugging-port=${port}`],
16
+ });
17
+ const context = await browser.newContext();
18
+ const page = await context.newPage();
19
+
20
+ const results = [];
21
+
22
+ for (const url of urls) {
23
+ process.stdout.write(`\nChecking ${url} … `);
24
+ await page.goto(url, { waitUntil: "networkidle", timeout: 30_000 });
25
+
26
+ // A11y
27
+ const axe = await new AxeBuilder({ page }).analyze();
28
+
29
+ // SEO — Lighthouse reuses the already-open browser via the debug port
30
+ const lhr = (await lighthouse(url, { port, output: "json", onlyCategories: ["seo"] }))?.lhr;
31
+ const seoViolations = lhr
32
+ ? Object.values(lhr.audits).filter(
33
+ a => SCORED_MODES.has(a.scoreDisplayMode) && a.score !== null && a.score < 1,
34
+ )
35
+ : [];
36
+
37
+ process.stdout.write(`a11y=${axe.violations.length} violation(s) seo=${seoViolations.length} violation(s)\n`);
38
+ results.push({ url, violations: axe.violations, seoViolations });
39
+ }
40
+
41
+ await browser.close();
42
+
43
+ // ── Report ──────────────────────────────────────────────────────────────────
44
+ let failed = false;
45
+
46
+ for (const r of results) {
47
+ const pageOk = r.violations.length === 0 && r.seoViolations.length === 0;
48
+ if (!pageOk) failed = true;
49
+
50
+ console.log(`\n${"─".repeat(70)}`);
51
+ console.log(`${pageOk ? "✅" : "❌"} ${r.url}`);
52
+
53
+ for (const v of r.violations) {
54
+ console.log(` ❌ A11y [${v.id}] — ${v.description} (${v.nodes.length} node${v.nodes.length !== 1 ? "s" : ""})`);
55
+ for (const node of v.nodes.slice(0, 3)) {
56
+ console.log(` ${node.html.slice(0, 100)}`);
57
+ }
58
+ }
59
+
60
+ for (const a of r.seoViolations) {
61
+ console.log(` ❌ SEO [${a.id}] — ${a.title}`);
62
+ if (a.description) console.log(` ${a.description.slice(0, 120)}`);
63
+ }
64
+ }
65
+
66
+ console.log(`\n${"═".repeat(70)}`);
67
+ if (failed) {
68
+ console.log("\n❌ FAIL — fix the issues above, redeploy, and re-run.");
69
+ process.exit(1);
70
+ } else {
71
+ writeFileSync("pages.json", draft);
72
+ console.log("\n✅ PASS — pages.json written.");
73
+ process.exit(0);
74
+ }
@@ -1,6 +1,6 @@
1
1
  # AGENTS.md
2
2
  <!-- Generated by APM CLI from distributed .apm/ primitives -->
3
- <!-- Build ID: f8784ff296c9 -->
3
+ <!-- Build ID: 6604f2c9e98d -->
4
4
  <!-- APM Version: 0.21.0 -->
5
5
 
6
6
  ## Global Instructions
@@ -25,7 +25,7 @@ You are helping develop a **Jahia JavaScript Module** — a React-based template
25
25
  7a. **`yarn` and `npx` must be run from the module root** — the module is a standalone project, not part of a monorepo. Running `yarn` from a parent directory fails with a workspace boundary error. Always `cd` to the module directory first.
26
26
  7b. **Use `grep`, not `ugrep`** — `ugrep` is not available on all systems and does not support the same regex syntax. Use `grep -rn` for plain text, `grep -rn -E` for extended regex, or `grep -rn -P` for Perl-compatible patterns (e.g. lookaheads). Never use `ugrep` or `(?m)` flags.
27
27
  8. **Build accessible HTML from the start** — every view must use semantic HTML (`<main>`, `<header>`, `<nav>`, `<footer>`, `<section>`, `<article>`), include exactly one `<h1>` per page (in the template from `jcr:title` — never inside a component), use a strict heading hierarchy (h1 in template → h2 in components → h3 for sub-items), add `alt` text to every `<img>` with a meaningful fallback (`imageAlt || title || 'Image'` — never empty string), ensure sufficient colour contrast (≥ 4.5:1 for body text), include a skip link at the top of the template, and never leave a landmark (`<nav>`, `<footer>`) empty.
28
- 9. **Review quality after each deploy** — after deploying and populating content, run `/jahia-dev-site-review` to get a scored a11y + SEO report. Fix any critical/serious violations before moving on. Do not write `pages.json` until the review passes.
28
+ 9. **Review quality after each deploy** — after deploying and populating content, write the live page URLs to `pages-to-review.json`, then invoke `/jahia-review` to run a full code and site review via subagents. Fix all reported violations and iterate until `/jahia-review-site` exits 0. The review script writes `pages.json` on pass never write it manually.
29
29
  10. **Deploy iteratively** — deploy after each component with `yarn build && yarn jahia-deploy`, verify it renders, then move to the next. Don't accumulate components before deploying; a broken component is easier to diagnose in isolation.
30
30
  11. **Collocate everything per component** — each component lives in `src/components/<Category>/<Name>/` containing its `definition.cnd`, `default.server.tsx`, `component.module.css`, and `types.ts`. Never centralize content types in `settings/definitions.cnd` — that file holds only namespace declarations and the module base mixin.
31
31
  12. **Always build a page template first** — every website needs a root template at `src/templates/<ModuleName>Template/default.server.tsx`. It must include: a skip link, a `<nav>` built inline from children of the site's home node using `getChildNodes(renderContext.getSite().getNode('home'), -1, 0, n => n.isNodeType('jnt:page'))` (pages live under `home`, not directly under the site), a `<main id="main-content">` with `<h1>{title}</h1>` and Areas, and a `<footer>` that is never empty. The `<title>` tag must be `{title} | {siteName}` — never set `jcr:title` to the full `Page | Site` string; `jcr:title` is always just the short page name (e.g. "Car Insurance"). Build and deploy before any page-specific components.