@jahia/agentic 0.4.1 → 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.
- package/CHANGELOG.md +10 -0
- package/dist/antigravity/.agents/rules/jahia.md +51 -0
- package/dist/antigravity/.agents/skills/jahia-cnd-author/SKILL.md +94 -0
- package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-area-types.md +55 -0
- package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-authoring-experience.md +92 -0
- package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-child-nodes.md +74 -0
- package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-jahia-mixins.md +510 -0
- package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-modeling-decisions.md +87 -0
- package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-numbers-dates.md +92 -0
- package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-string-selectors.md +133 -0
- package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-syntax.md +119 -0
- package/dist/antigravity/.agents/skills/jahia-cnd-author/references/types-ts-mapping.md +73 -0
- package/dist/antigravity/.agents/skills/jahia-dev-accessibility/SKILL.md +11 -0
- package/dist/antigravity/.agents/skills/jahia-dev-build-component/SKILL.md +133 -0
- package/dist/antigravity/.agents/skills/jahia-dev-create-page-template/SKILL.md +341 -0
- package/dist/antigravity/.agents/skills/jahia-dev-create-template-set/SKILL.md +205 -0
- package/dist/antigravity/.agents/skills/jahia-dev-create-view/SKILL.md +896 -0
- package/dist/antigravity/.agents/skills/jahia-dev-debug/SKILL.md +176 -0
- package/dist/antigravity/.agents/skills/jahia-dev-import-from/SKILL.md +244 -0
- package/dist/antigravity/.agents/skills/jahia-dev-jexperience/SKILL.md +269 -0
- package/dist/antigravity/.agents/skills/jahia-dev-ops/SKILL.md +50 -0
- package/dist/antigravity/.agents/skills/jahia-dev-ops/references/docker.md +151 -0
- package/dist/antigravity/.agents/skills/jahia-dev-ops/references/monitoring.md +195 -0
- package/dist/antigravity/.agents/skills/jahia-dev-ops/references/provisioning.md +269 -0
- package/dist/antigravity/.agents/skills/jahia-dev-properties/SKILL.md +147 -0
- package/dist/antigravity/.agents/skills/jahia-dev-properties/references/all-properties.md +231 -0
- package/dist/antigravity/.agents/skills/jahia-dev-query-content/SKILL.md +204 -0
- package/dist/antigravity/.agents/skills/jahia-dev-review-cnd/SKILL.md +79 -0
- package/dist/antigravity/.agents/skills/jahia-dev-review-cnd/scripts/check-cnd.d.mts +13 -0
- package/dist/antigravity/.agents/skills/jahia-dev-review-cnd/scripts/check-cnd.mjs +198 -0
- package/dist/antigravity/.agents/skills/jahia-dev-screenshot/SKILL.md +177 -0
- package/dist/antigravity/.agents/skills/jahia-dev-start-local/SKILL.md +121 -0
- package/dist/antigravity/.agents/skills/jahia-jcr-sql2/SKILL.md +257 -0
- package/dist/antigravity/.agents/skills/jahia-review/SKILL.md +63 -0
- package/dist/{claude/.claude/skills/jahia-dev-review → antigravity/.agents/skills/jahia-review-code}/SKILL.md +3 -3
- package/dist/antigravity/.agents/skills/jahia-review-site/SKILL.md +52 -0
- package/dist/antigravity/.agents/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
- package/dist/antigravity/AGENTS.md +62 -0
- package/dist/claude/.claude/rules/jahia.md +1 -1
- package/dist/claude/.claude/skills/jahia-dev-build-component/SKILL.md +2 -2
- package/dist/claude/.claude/skills/jahia-dev-create-view/SKILL.md +2 -2
- package/dist/claude/.claude/skills/jahia-dev-import-from/SKILL.md +1 -1
- package/dist/claude/.claude/skills/jahia-dev-properties/SKILL.md +1 -1
- package/dist/claude/.claude/skills/jahia-dev-query-content/SKILL.md +1 -1
- package/dist/claude/.claude/skills/jahia-jcr-sql2/SKILL.md +1 -2
- package/dist/claude/.claude/skills/jahia-review/SKILL.md +63 -0
- package/dist/{copilot/.agents/skills/jahia-dev-review → claude/.claude/skills/jahia-review-code}/SKILL.md +3 -3
- package/dist/claude/.claude/skills/jahia-review-site/SKILL.md +52 -0
- package/dist/claude/.claude/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
- package/dist/claude/.mcp.json +11 -0
- package/dist/claude/CLAUDE.md +2 -2
- package/dist/codex/.agents/skills/jahia-dev-build-component/SKILL.md +2 -2
- package/dist/codex/.agents/skills/jahia-dev-create-view/SKILL.md +2 -2
- package/dist/codex/.agents/skills/jahia-dev-import-from/SKILL.md +1 -1
- package/dist/codex/.agents/skills/jahia-dev-properties/SKILL.md +1 -1
- package/dist/codex/.agents/skills/jahia-dev-query-content/SKILL.md +1 -1
- package/dist/codex/.agents/skills/jahia-jcr-sql2/SKILL.md +1 -2
- package/dist/codex/.agents/skills/jahia-review/SKILL.md +63 -0
- package/dist/{cursor/.agents/skills/jahia-dev-review → codex/.agents/skills/jahia-review-code}/SKILL.md +3 -3
- package/dist/codex/.agents/skills/jahia-review-site/SKILL.md +52 -0
- package/dist/codex/.agents/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
- package/dist/codex/AGENTS.md +2 -2
- package/dist/copilot/.agents/skills/jahia-dev-build-component/SKILL.md +2 -2
- package/dist/copilot/.agents/skills/jahia-dev-create-view/SKILL.md +2 -2
- package/dist/copilot/.agents/skills/jahia-dev-import-from/SKILL.md +1 -1
- package/dist/copilot/.agents/skills/jahia-dev-properties/SKILL.md +1 -1
- package/dist/copilot/.agents/skills/jahia-dev-query-content/SKILL.md +1 -1
- package/dist/copilot/.agents/skills/jahia-jcr-sql2/SKILL.md +1 -2
- package/dist/copilot/.agents/skills/jahia-review/SKILL.md +63 -0
- package/dist/{codex/.agents/skills/jahia-dev-review → copilot/.agents/skills/jahia-review-code}/SKILL.md +3 -3
- package/dist/copilot/.agents/skills/jahia-review-site/SKILL.md +52 -0
- package/dist/copilot/.agents/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
- package/dist/copilot/AGENTS.md +2 -2
- package/dist/cursor/.agents/skills/jahia-dev-build-component/SKILL.md +2 -2
- package/dist/cursor/.agents/skills/jahia-dev-create-view/SKILL.md +2 -2
- package/dist/cursor/.agents/skills/jahia-dev-import-from/SKILL.md +1 -1
- package/dist/cursor/.agents/skills/jahia-dev-properties/SKILL.md +1 -1
- package/dist/cursor/.agents/skills/jahia-dev-query-content/SKILL.md +1 -1
- package/dist/cursor/.agents/skills/jahia-jcr-sql2/SKILL.md +1 -2
- package/dist/cursor/.agents/skills/jahia-review/SKILL.md +63 -0
- package/dist/cursor/.agents/skills/jahia-review-code/SKILL.md +228 -0
- package/dist/cursor/.agents/skills/jahia-review-site/SKILL.md +52 -0
- package/dist/cursor/.agents/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
- package/dist/cursor/.cursor/mcp.json +11 -0
- package/dist/cursor/.cursor/rules/jahia.mdc +1 -1
- package/dist/gemini/.agents/skills/jahia-dev-build-component/SKILL.md +2 -2
- package/dist/gemini/.agents/skills/jahia-dev-create-view/SKILL.md +2 -2
- package/dist/gemini/.agents/skills/jahia-dev-import-from/SKILL.md +1 -1
- package/dist/gemini/.agents/skills/jahia-dev-properties/SKILL.md +1 -1
- package/dist/gemini/.agents/skills/jahia-dev-query-content/SKILL.md +1 -1
- package/dist/gemini/.agents/skills/jahia-jcr-sql2/SKILL.md +1 -2
- package/dist/gemini/.agents/skills/jahia-review/SKILL.md +63 -0
- package/dist/gemini/.agents/skills/jahia-review-code/SKILL.md +228 -0
- package/dist/gemini/.agents/skills/jahia-review-site/SKILL.md +52 -0
- package/dist/gemini/.agents/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
- package/dist/gemini/.gemini/settings.json +10 -0
- package/dist/gemini/AGENTS.md +2 -2
- package/dist/index.js +14 -2
- package/dist/kiro/.kiro/settings/mcp.json +10 -0
- package/dist/kiro/.kiro/skills/jahia-cnd-author/SKILL.md +94 -0
- package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-area-types.md +55 -0
- package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-authoring-experience.md +92 -0
- package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-child-nodes.md +74 -0
- package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-jahia-mixins.md +510 -0
- package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-modeling-decisions.md +87 -0
- package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-numbers-dates.md +92 -0
- package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-string-selectors.md +133 -0
- package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-syntax.md +119 -0
- package/dist/kiro/.kiro/skills/jahia-cnd-author/references/types-ts-mapping.md +73 -0
- package/dist/kiro/.kiro/skills/jahia-dev-accessibility/SKILL.md +11 -0
- package/dist/kiro/.kiro/skills/jahia-dev-build-component/SKILL.md +133 -0
- package/dist/kiro/.kiro/skills/jahia-dev-create-page-template/SKILL.md +341 -0
- package/dist/kiro/.kiro/skills/jahia-dev-create-template-set/SKILL.md +205 -0
- package/dist/kiro/.kiro/skills/jahia-dev-create-view/SKILL.md +896 -0
- package/dist/kiro/.kiro/skills/jahia-dev-debug/SKILL.md +176 -0
- package/dist/kiro/.kiro/skills/jahia-dev-import-from/SKILL.md +244 -0
- package/dist/kiro/.kiro/skills/jahia-dev-jexperience/SKILL.md +269 -0
- package/dist/kiro/.kiro/skills/jahia-dev-ops/SKILL.md +50 -0
- package/dist/kiro/.kiro/skills/jahia-dev-ops/references/docker.md +151 -0
- package/dist/kiro/.kiro/skills/jahia-dev-ops/references/monitoring.md +195 -0
- package/dist/kiro/.kiro/skills/jahia-dev-ops/references/provisioning.md +269 -0
- package/dist/kiro/.kiro/skills/jahia-dev-properties/SKILL.md +147 -0
- package/dist/kiro/.kiro/skills/jahia-dev-properties/references/all-properties.md +231 -0
- package/dist/kiro/.kiro/skills/jahia-dev-query-content/SKILL.md +204 -0
- package/dist/kiro/.kiro/skills/jahia-dev-review-cnd/SKILL.md +79 -0
- package/dist/kiro/.kiro/skills/jahia-dev-review-cnd/scripts/check-cnd.d.mts +13 -0
- package/dist/kiro/.kiro/skills/jahia-dev-review-cnd/scripts/check-cnd.mjs +198 -0
- package/dist/kiro/.kiro/skills/jahia-dev-screenshot/SKILL.md +177 -0
- package/dist/kiro/.kiro/skills/jahia-dev-start-local/SKILL.md +121 -0
- package/dist/kiro/.kiro/skills/jahia-jcr-sql2/SKILL.md +257 -0
- package/dist/kiro/.kiro/skills/jahia-review/SKILL.md +63 -0
- package/dist/kiro/.kiro/skills/jahia-review-code/SKILL.md +228 -0
- package/dist/kiro/.kiro/skills/jahia-review-site/SKILL.md +52 -0
- package/dist/kiro/.kiro/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
- package/dist/kiro/.kiro/steering/jahia.md +55 -0
- package/dist/kiro/AGENTS.md +62 -0
- package/dist/opencode/.agents/skills/jahia-dev-build-component/SKILL.md +2 -2
- package/dist/opencode/.agents/skills/jahia-dev-create-view/SKILL.md +2 -2
- package/dist/opencode/.agents/skills/jahia-dev-import-from/SKILL.md +1 -1
- package/dist/opencode/.agents/skills/jahia-dev-properties/SKILL.md +1 -1
- package/dist/opencode/.agents/skills/jahia-dev-query-content/SKILL.md +1 -1
- package/dist/opencode/.agents/skills/jahia-jcr-sql2/SKILL.md +1 -2
- package/dist/opencode/.agents/skills/jahia-review/SKILL.md +63 -0
- package/dist/opencode/.agents/skills/jahia-review-code/SKILL.md +228 -0
- package/dist/opencode/.agents/skills/jahia-review-site/SKILL.md +52 -0
- package/dist/opencode/.agents/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
- package/dist/opencode/AGENTS.md +2 -2
- package/dist/opencode/opencode.json +12 -0
- package/dist/windsurf/.windsurf/rules/jahia.md +1 -1
- package/dist/windsurf/.windsurf/skills/jahia-dev-build-component/SKILL.md +2 -2
- package/dist/windsurf/.windsurf/skills/jahia-dev-create-view/SKILL.md +2 -2
- package/dist/windsurf/.windsurf/skills/jahia-dev-import-from/SKILL.md +1 -1
- package/dist/windsurf/.windsurf/skills/jahia-dev-properties/SKILL.md +1 -1
- package/dist/windsurf/.windsurf/skills/jahia-dev-query-content/SKILL.md +1 -1
- package/dist/windsurf/.windsurf/skills/jahia-jcr-sql2/SKILL.md +1 -2
- package/dist/windsurf/.windsurf/skills/jahia-review/SKILL.md +63 -0
- package/dist/windsurf/.windsurf/skills/jahia-review-code/SKILL.md +228 -0
- package/dist/windsurf/.windsurf/skills/jahia-review-site/SKILL.md +52 -0
- package/dist/windsurf/.windsurf/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
- package/dist/windsurf/AGENTS.md +2 -2
- package/package.json +1 -1
- package/dist/claude/.claude/skills/jahia-dev-site-review/SKILL.md +0 -70
- package/dist/claude/.claude/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
- package/dist/codex/.agents/skills/jahia-dev-site-review/SKILL.md +0 -70
- package/dist/codex/.agents/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
- package/dist/copilot/.agents/skills/jahia-dev-site-review/SKILL.md +0 -70
- package/dist/copilot/.agents/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
- package/dist/cursor/.agents/skills/jahia-dev-site-review/SKILL.md +0 -70
- package/dist/cursor/.agents/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
- package/dist/gemini/.agents/skills/jahia-dev-review/SKILL.md +0 -228
- package/dist/gemini/.agents/skills/jahia-dev-site-review/SKILL.md +0 -70
- package/dist/gemini/.agents/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
- package/dist/opencode/.agents/skills/jahia-dev-review/SKILL.md +0 -228
- package/dist/opencode/.agents/skills/jahia-dev-site-review/SKILL.md +0 -70
- package/dist/opencode/.agents/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
- package/dist/windsurf/.windsurf/skills/jahia-dev-review/SKILL.md +0 -228
- package/dist/windsurf/.windsurf/skills/jahia-dev-site-review/SKILL.md +0 -70
- package/dist/windsurf/.windsurf/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jahia-jcr-sql2
|
|
3
|
+
description: JCR-SQL2 reference for Jahia queries. Use when building, reviewing, or debugging SQL2 statements for content listings, full-text search, sorting, pagination, or Java back-end query code.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill: jahia-jcr-sql2
|
|
7
|
+
|
|
8
|
+
Use this skill when you need the JCR-SQL2 language itself: selectors, path constraints, filters, ordering, full-text syntax, joins, pagination rules, and performance guardrails.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## When to use JCR-SQL2
|
|
13
|
+
|
|
14
|
+
JCR-SQL2 is the standard Jahia query language for:
|
|
15
|
+
|
|
16
|
+
- listing pages or content with filtering and sorting
|
|
17
|
+
- querying a folder subtree
|
|
18
|
+
- searching by property value, date, or reference
|
|
19
|
+
- full-text search across indexed content
|
|
20
|
+
- back-end Java code using `QueryManagerWrapper`
|
|
21
|
+
- template-set listings that use `useJCRQuery` or the Page Builder query component
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Basic syntax
|
|
26
|
+
|
|
27
|
+
### Select by node type
|
|
28
|
+
|
|
29
|
+
```sql
|
|
30
|
+
SELECT * FROM [jnt:page] AS page
|
|
31
|
+
SELECT * FROM [jnt:content] AS content
|
|
32
|
+
SELECT * FROM [jnt:file] AS file
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The selector matches the named type and its subtypes.
|
|
36
|
+
|
|
37
|
+
### Common node types
|
|
38
|
+
|
|
39
|
+
| Type | Meaning |
|
|
40
|
+
|------|---------|
|
|
41
|
+
| `jnt:page` | pages |
|
|
42
|
+
| `jnt:content` | editorial content |
|
|
43
|
+
| `jnt:file` | files |
|
|
44
|
+
| `jnt:virtualsite` | sites |
|
|
45
|
+
| `jmix:searchable` | general searchable content |
|
|
46
|
+
| `nt:base` | all nodes — avoid unless paired with a strict path |
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Path constraints
|
|
51
|
+
|
|
52
|
+
### Recursive subtree
|
|
53
|
+
|
|
54
|
+
```sql
|
|
55
|
+
SELECT * FROM [jnt:page] AS page
|
|
56
|
+
WHERE ISDESCENDANTNODE(page, '/sites/luxe/home')
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Direct children only
|
|
60
|
+
|
|
61
|
+
```sql
|
|
62
|
+
SELECT * FROM [jnt:page] AS page
|
|
63
|
+
WHERE ISCHILDNODE(page, '/sites/luxe/home')
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Guardrail:** always constrain by path to avoid repository-wide scans.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Property constraints
|
|
71
|
+
|
|
72
|
+
### Exact match
|
|
73
|
+
|
|
74
|
+
```sql
|
|
75
|
+
WHERE page.[j:templateName] = 'home'
|
|
76
|
+
WHERE node.[jcr:title] = 'My Title'
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Pattern match
|
|
80
|
+
|
|
81
|
+
```sql
|
|
82
|
+
WHERE node.[jcr:title] LIKE '%keyword%'
|
|
83
|
+
WHERE node.[j:nodename] LIKE '%.png'
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Null checks
|
|
87
|
+
|
|
88
|
+
```sql
|
|
89
|
+
WHERE page.[jcr:title] IS NOT NULL
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Boolean
|
|
93
|
+
|
|
94
|
+
```sql
|
|
95
|
+
WHERE node.[j:published] = CAST('true' AS BOOLEAN)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Date comparison
|
|
99
|
+
|
|
100
|
+
```sql
|
|
101
|
+
WHERE page.[jcr:lastModified] > CAST('2026-01-01T00:00:00.000Z' AS DATE)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Use the millisecond form `yyyy-MM-dd'T'HH:mm:ss.SSSX` for SQL2 date casts.
|
|
105
|
+
|
|
106
|
+
### Multiple conditions
|
|
107
|
+
|
|
108
|
+
```sql
|
|
109
|
+
WHERE ISDESCENDANTNODE(page, '/sites/luxe')
|
|
110
|
+
AND page.[jcr:lastModified] > CAST('2026-01-01T00:00:00.000Z' AS DATE)
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### OR conditions
|
|
114
|
+
|
|
115
|
+
```sql
|
|
116
|
+
WHERE node.[jcr:primaryType] = 'jnt:bigText'
|
|
117
|
+
OR node.[jcr:primaryType] = 'jnt:article'
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Ordering
|
|
123
|
+
|
|
124
|
+
```sql
|
|
125
|
+
ORDER BY page.[jcr:lastModified] DESC
|
|
126
|
+
ORDER BY page.[jcr:created] ASC
|
|
127
|
+
ORDER BY node.[jcr:title]
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Multiple columns:
|
|
131
|
+
|
|
132
|
+
```sql
|
|
133
|
+
ORDER BY page.[j:templateName] ASC, page.[jcr:lastModified] DESC
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Full-text search
|
|
139
|
+
|
|
140
|
+
### Search indexed content
|
|
141
|
+
|
|
142
|
+
```sql
|
|
143
|
+
WHERE CONTAINS(node.*, 'digital')
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Search one property
|
|
147
|
+
|
|
148
|
+
```sql
|
|
149
|
+
WHERE CONTAINS(node.[jcr:title], 'welcome')
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Expression syntax
|
|
153
|
+
|
|
154
|
+
| Syntax | Meaning |
|
|
155
|
+
|--------|---------|
|
|
156
|
+
| `term` | must contain the term |
|
|
157
|
+
| `term1 term2` | implicit AND |
|
|
158
|
+
| `term1 OR term2` | either term |
|
|
159
|
+
| `"exact phrase"` | exact phrase |
|
|
160
|
+
| `-term` | exclude term |
|
|
161
|
+
|
|
162
|
+
### Relevance sort
|
|
163
|
+
|
|
164
|
+
```sql
|
|
165
|
+
SELECT * FROM [jnt:content] AS n
|
|
166
|
+
WHERE ISDESCENDANTNODE(n, '/sites/luxe')
|
|
167
|
+
AND CONTAINS(n.*, 'digital')
|
|
168
|
+
ORDER BY SCORE(n) DESC
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Combine full-text with path constraints for performance.
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Joins
|
|
176
|
+
|
|
177
|
+
```sql
|
|
178
|
+
SELECT * FROM [jnt:imageReferenceLink] AS img
|
|
179
|
+
INNER JOIN [jnt:file] AS file
|
|
180
|
+
ON img.[j:node] = file.[jcr:uuid]
|
|
181
|
+
WHERE img.[j:node] = 'UUID'
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Jahia supports inner joins, but keep them focused and path-constrained whenever possible.
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Using SQL2 in Jahia code
|
|
189
|
+
|
|
190
|
+
### Template-set listing with `useJCRQuery`
|
|
191
|
+
|
|
192
|
+
```tsx
|
|
193
|
+
const posts = useJCRQuery({
|
|
194
|
+
query: `SELECT * FROM [namespace:blogPost] AS post
|
|
195
|
+
WHERE ISDESCENDANTNODE(post, '/sites/${siteKey}/contents/blog')
|
|
196
|
+
ORDER BY post.[publicationDate] DESC`,
|
|
197
|
+
});
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Java back-end query execution
|
|
201
|
+
|
|
202
|
+
```java
|
|
203
|
+
QueryManagerWrapper qm = session.getWorkspace().getQueryManager();
|
|
204
|
+
QueryWrapper query = qm.createQuery(sql2Statement, Query.JCR_SQL2);
|
|
205
|
+
query.setLimit(limit);
|
|
206
|
+
query.setOffset(offset);
|
|
207
|
+
JCRNodeIteratorWrapper nodes = query.execute().getNodes();
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**Guardrail:** never embed `LIMIT` or `OFFSET` inside the SQL2 string. Use `setLimit()` and `setOffset()`.
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Security and validation
|
|
215
|
+
|
|
216
|
+
### Escape user input
|
|
217
|
+
|
|
218
|
+
In Java back-end code, escape user-provided values with `JCRContentUtils.sqlEncode()` before interpolating them into a SQL2 string.
|
|
219
|
+
|
|
220
|
+
```java
|
|
221
|
+
String safeValue = JCRContentUtils.sqlEncode(userInput);
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Validate dynamic sort fields
|
|
225
|
+
|
|
226
|
+
If a user can choose the sort field, validate it against a whitelist before interpolating it into `ORDER BY`.
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Performance best practices
|
|
231
|
+
|
|
232
|
+
1. Always constrain by path.
|
|
233
|
+
2. Use the most specific node type possible.
|
|
234
|
+
3. Keep result sets small.
|
|
235
|
+
4. Prefer indexed equality filters over broad `LIKE '%...%'` patterns.
|
|
236
|
+
5. Use full-text sparingly on large trees.
|
|
237
|
+
6. Sort on common indexed fields such as `jcr:lastModified` or `jcr:created`.
|
|
238
|
+
7. Cap API result limits to a sane maximum.
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Quick checklist
|
|
243
|
+
|
|
244
|
+
- [ ] Query has a path constraint
|
|
245
|
+
- [ ] Node type is specific
|
|
246
|
+
- [ ] Sort field is intentional and safe
|
|
247
|
+
- [ ] Full-text is combined with a subtree path
|
|
248
|
+
- [ ] Dates use `yyyy-MM-dd'T'HH:mm:ss.SSSX`
|
|
249
|
+
- [ ] Java code uses `setLimit()` and `setOffset()` instead of inline SQL clauses
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## Related skills
|
|
254
|
+
|
|
255
|
+
- `/jahia-dev-query-content` — apply SQL2 inside Page Builder queries and JS module views
|
|
256
|
+
- `/jahia-cnd-author` — define the content types you will query
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
<!-- Generated by APM CLI from distributed .apm/ primitives -->
|
|
3
|
+
<!-- Build ID: 6604f2c9e98d -->
|
|
4
|
+
<!-- APM Version: 0.21.0 -->
|
|
5
|
+
|
|
6
|
+
## Global Instructions
|
|
7
|
+
|
|
8
|
+
# Jahia JavaScript Module Development
|
|
9
|
+
|
|
10
|
+
## Context
|
|
11
|
+
|
|
12
|
+
You are helping develop a **Jahia JavaScript Module** — a React-based template set for Jahia 8+. The module renders content from Jahia's JCR (Java Content Repository) using server-side React components (`.server.tsx`) and optional client-side islands (`.client.tsx`). Content is modelled in CND files, managed via Page Builder or jContent, and queried with JCR-SQL2 or GraphQL.
|
|
13
|
+
|
|
14
|
+
## Agent Principles
|
|
15
|
+
|
|
16
|
+
1. **Always invoke a skill before any Jahia task** — skills are the canonical source of patterns, gotchas, and API syntax. Never operate from memory alone.
|
|
17
|
+
1a. **Always load CND reference files before writing any CND** — Jahia-specific patterns (`choicelist[linkTypeInitializer]`, `mix:title`, child nodes for CTAs, `jmix:image` weakreferences) are not in your training data. Before writing any CND, read the reference files: `find . -maxdepth 4 -name 'cnd-jahia-mixins*' | head -3`. When working interactively through skill chains, prefer `@jahia-cnd-author` (it loads these files for you).
|
|
18
|
+
2. **Never use `yarn dev` from an agent** — it is an interactive file watcher for human developers only. Always deploy with `yarn build && yarn jahia-deploy` (one-shot, non-interactive).
|
|
19
|
+
2a. **Use the TypeScript LSP for API discovery, never grep.** When you need to know a function's signature or what a module exports, call `mcp__ide__getDiagnostics` on the file after writing it — the LSP reads live type definitions and reports mismatches, wrong argument counts, and missing exports. Never run `grep` on `node_modules` to find a function name or signature.
|
|
20
|
+
3. **Never hardcode URLs** — all navigable links must come from contributed content (JCR nodes, `j:linkType`, `buildNodeUrl`). This is a CMS: content owns the URLs.
|
|
21
|
+
4. **Never use `j:linkType: "external"` for internal pages** — use `"internal"` + `j:linknode`. External URLs break on environment changes, language switches, and vanity URL rewrites.
|
|
22
|
+
5. **Always verify before creating** — check that content types are deployed, site keys are correct, and parent area nodes exist before creating content via MCP.
|
|
23
|
+
6. **All props are optional at runtime** — even mandatory CND fields. Always guard against `undefined` in views.
|
|
24
|
+
7. **Use MCP tools for all Jahia operations — never GraphQL curl.** The `jahia` MCP server covers site, page, content, and publication operations. Never fall back to `curl` + GraphQL mutations for anything the MCP server can do. Never write Python scripts — use JavaScript or bash only.
|
|
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
|
+
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
|
+
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, 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
|
+
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
|
+
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
|
+
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.
|
|
32
|
+
13. **SEO baseline** — every page template must render a `<title>` tag, all `<img>` must have descriptive `alt` text, all links must have visible text (no icon-only links without `aria-label`), and pages must have a single `<h1>` matching the page title.
|
|
33
|
+
|
|
34
|
+
## Canonical References
|
|
35
|
+
|
|
36
|
+
Always fetch these when uncertain about version-sensitive topics:
|
|
37
|
+
|
|
38
|
+
| Topic | URL |
|
|
39
|
+
|-------|-----|
|
|
40
|
+
| Getting started / dev environment | https://academy.jahia.com/tutorials-get-started/front-end-developer/setting-up-your-dev-environment |
|
|
41
|
+
| Hero section tutorial | https://academy.jahia.com/tutorials-get-started/front-end-developer/making-a-hero-section |
|
|
42
|
+
| Blog / content listing | https://academy.jahia.com/tutorials-get-started/front-end-developer/making-a-blog |
|
|
43
|
+
| Page templates | https://academy.jahia.com/tutorials-get-started/front-end-developer/the-about-us-page |
|
|
44
|
+
| i18n (CND attribute, useTranslation, language switcher) | https://academy.jahia.com/documentation/jahia-cms/jahia-8-2/developer/javascript-module-development/preparing-for-internationalization-i18n |
|
|
45
|
+
| GraphQL API | https://academy.jahia.com/documentation/developer/jahia/8/api-documentation/graphql-api |
|
|
46
|
+
| Native Jahia mixins & node types | https://github.com/Jahia/jahia/tree/master/war/src/main/webapp/WEB-INF/etc/repository/nodetypes |
|
|
47
|
+
| JavaScript modules monorepo | https://github.com/Jahia/javascript-modules |
|
|
48
|
+
| Developer training | https://github.com/Jahia/developer-training/blob/main/js-training/slides.md |
|
|
49
|
+
| Integration best practices | https://github.com/Jahia/gautier-braindump/blob/main/articles/integration-best-practices/README.md |
|
|
50
|
+
|
|
51
|
+
## Local Development URLs
|
|
52
|
+
|
|
53
|
+
When Jahia is running at `http://localhost:8080` (default credentials: `root` / `root1234`):
|
|
54
|
+
|
|
55
|
+
- **Login**: http://localhost:8080/cms/login
|
|
56
|
+
- **GraphQL playground**: http://localhost:8080/modules/graphql-dxm-provider/tools/graphql-workspace.jsp
|
|
57
|
+
- **JCR browser**: http://localhost:8080/modules/tools/jcrBrowser.jsp
|
|
58
|
+
- **Definitions browser**: http://localhost:8080/modules/tools/definitionsBrowser.jsp
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
*This file was generated by APM CLI. Do not edit manually.*
|
|
62
|
+
*To regenerate: `apm compile`*
|
|
@@ -18,7 +18,7 @@ You are helping develop a **Jahia JavaScript Module** — a React-based template
|
|
|
18
18
|
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.
|
|
19
19
|
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.
|
|
20
20
|
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.
|
|
21
|
-
9. **Review quality after each deploy** — after deploying and populating content,
|
|
21
|
+
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.
|
|
22
22
|
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.
|
|
23
23
|
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.
|
|
24
24
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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"
|
|
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-
|
|
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-
|
|
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
|
|