@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.
Files changed (178) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/antigravity/.agents/rules/jahia.md +51 -0
  3. package/dist/antigravity/.agents/skills/jahia-cnd-author/SKILL.md +94 -0
  4. package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-area-types.md +55 -0
  5. package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-authoring-experience.md +92 -0
  6. package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-child-nodes.md +74 -0
  7. package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-jahia-mixins.md +510 -0
  8. package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-modeling-decisions.md +87 -0
  9. package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-numbers-dates.md +92 -0
  10. package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-string-selectors.md +133 -0
  11. package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-syntax.md +119 -0
  12. package/dist/antigravity/.agents/skills/jahia-cnd-author/references/types-ts-mapping.md +73 -0
  13. package/dist/antigravity/.agents/skills/jahia-dev-accessibility/SKILL.md +11 -0
  14. package/dist/antigravity/.agents/skills/jahia-dev-build-component/SKILL.md +133 -0
  15. package/dist/antigravity/.agents/skills/jahia-dev-create-page-template/SKILL.md +341 -0
  16. package/dist/antigravity/.agents/skills/jahia-dev-create-template-set/SKILL.md +205 -0
  17. package/dist/antigravity/.agents/skills/jahia-dev-create-view/SKILL.md +896 -0
  18. package/dist/antigravity/.agents/skills/jahia-dev-debug/SKILL.md +176 -0
  19. package/dist/antigravity/.agents/skills/jahia-dev-import-from/SKILL.md +244 -0
  20. package/dist/antigravity/.agents/skills/jahia-dev-jexperience/SKILL.md +269 -0
  21. package/dist/antigravity/.agents/skills/jahia-dev-ops/SKILL.md +50 -0
  22. package/dist/antigravity/.agents/skills/jahia-dev-ops/references/docker.md +151 -0
  23. package/dist/antigravity/.agents/skills/jahia-dev-ops/references/monitoring.md +195 -0
  24. package/dist/antigravity/.agents/skills/jahia-dev-ops/references/provisioning.md +269 -0
  25. package/dist/antigravity/.agents/skills/jahia-dev-properties/SKILL.md +147 -0
  26. package/dist/antigravity/.agents/skills/jahia-dev-properties/references/all-properties.md +231 -0
  27. package/dist/antigravity/.agents/skills/jahia-dev-query-content/SKILL.md +204 -0
  28. package/dist/antigravity/.agents/skills/jahia-dev-review-cnd/SKILL.md +79 -0
  29. package/dist/antigravity/.agents/skills/jahia-dev-review-cnd/scripts/check-cnd.d.mts +13 -0
  30. package/dist/antigravity/.agents/skills/jahia-dev-review-cnd/scripts/check-cnd.mjs +198 -0
  31. package/dist/antigravity/.agents/skills/jahia-dev-screenshot/SKILL.md +177 -0
  32. package/dist/antigravity/.agents/skills/jahia-dev-start-local/SKILL.md +121 -0
  33. package/dist/antigravity/.agents/skills/jahia-jcr-sql2/SKILL.md +257 -0
  34. package/dist/antigravity/.agents/skills/jahia-review/SKILL.md +63 -0
  35. package/dist/{claude/.claude/skills/jahia-dev-review → antigravity/.agents/skills/jahia-review-code}/SKILL.md +3 -3
  36. package/dist/antigravity/.agents/skills/jahia-review-site/SKILL.md +52 -0
  37. package/dist/antigravity/.agents/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
  38. package/dist/antigravity/AGENTS.md +62 -0
  39. package/dist/claude/.claude/rules/jahia.md +1 -1
  40. package/dist/claude/.claude/skills/jahia-dev-build-component/SKILL.md +2 -2
  41. package/dist/claude/.claude/skills/jahia-dev-create-view/SKILL.md +2 -2
  42. package/dist/claude/.claude/skills/jahia-dev-import-from/SKILL.md +1 -1
  43. package/dist/claude/.claude/skills/jahia-dev-properties/SKILL.md +1 -1
  44. package/dist/claude/.claude/skills/jahia-dev-query-content/SKILL.md +1 -1
  45. package/dist/claude/.claude/skills/jahia-jcr-sql2/SKILL.md +1 -2
  46. package/dist/claude/.claude/skills/jahia-review/SKILL.md +63 -0
  47. package/dist/{copilot/.agents/skills/jahia-dev-review → claude/.claude/skills/jahia-review-code}/SKILL.md +3 -3
  48. package/dist/claude/.claude/skills/jahia-review-site/SKILL.md +52 -0
  49. package/dist/claude/.claude/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
  50. package/dist/claude/.mcp.json +11 -0
  51. package/dist/claude/CLAUDE.md +2 -2
  52. package/dist/codex/.agents/skills/jahia-dev-build-component/SKILL.md +2 -2
  53. package/dist/codex/.agents/skills/jahia-dev-create-view/SKILL.md +2 -2
  54. package/dist/codex/.agents/skills/jahia-dev-import-from/SKILL.md +1 -1
  55. package/dist/codex/.agents/skills/jahia-dev-properties/SKILL.md +1 -1
  56. package/dist/codex/.agents/skills/jahia-dev-query-content/SKILL.md +1 -1
  57. package/dist/codex/.agents/skills/jahia-jcr-sql2/SKILL.md +1 -2
  58. package/dist/codex/.agents/skills/jahia-review/SKILL.md +63 -0
  59. package/dist/{cursor/.agents/skills/jahia-dev-review → codex/.agents/skills/jahia-review-code}/SKILL.md +3 -3
  60. package/dist/codex/.agents/skills/jahia-review-site/SKILL.md +52 -0
  61. package/dist/codex/.agents/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
  62. package/dist/codex/AGENTS.md +2 -2
  63. package/dist/copilot/.agents/skills/jahia-dev-build-component/SKILL.md +2 -2
  64. package/dist/copilot/.agents/skills/jahia-dev-create-view/SKILL.md +2 -2
  65. package/dist/copilot/.agents/skills/jahia-dev-import-from/SKILL.md +1 -1
  66. package/dist/copilot/.agents/skills/jahia-dev-properties/SKILL.md +1 -1
  67. package/dist/copilot/.agents/skills/jahia-dev-query-content/SKILL.md +1 -1
  68. package/dist/copilot/.agents/skills/jahia-jcr-sql2/SKILL.md +1 -2
  69. package/dist/copilot/.agents/skills/jahia-review/SKILL.md +63 -0
  70. package/dist/{codex/.agents/skills/jahia-dev-review → copilot/.agents/skills/jahia-review-code}/SKILL.md +3 -3
  71. package/dist/copilot/.agents/skills/jahia-review-site/SKILL.md +52 -0
  72. package/dist/copilot/.agents/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
  73. package/dist/copilot/AGENTS.md +2 -2
  74. package/dist/cursor/.agents/skills/jahia-dev-build-component/SKILL.md +2 -2
  75. package/dist/cursor/.agents/skills/jahia-dev-create-view/SKILL.md +2 -2
  76. package/dist/cursor/.agents/skills/jahia-dev-import-from/SKILL.md +1 -1
  77. package/dist/cursor/.agents/skills/jahia-dev-properties/SKILL.md +1 -1
  78. package/dist/cursor/.agents/skills/jahia-dev-query-content/SKILL.md +1 -1
  79. package/dist/cursor/.agents/skills/jahia-jcr-sql2/SKILL.md +1 -2
  80. package/dist/cursor/.agents/skills/jahia-review/SKILL.md +63 -0
  81. package/dist/cursor/.agents/skills/jahia-review-code/SKILL.md +228 -0
  82. package/dist/cursor/.agents/skills/jahia-review-site/SKILL.md +52 -0
  83. package/dist/cursor/.agents/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
  84. package/dist/cursor/.cursor/mcp.json +11 -0
  85. package/dist/cursor/.cursor/rules/jahia.mdc +1 -1
  86. package/dist/gemini/.agents/skills/jahia-dev-build-component/SKILL.md +2 -2
  87. package/dist/gemini/.agents/skills/jahia-dev-create-view/SKILL.md +2 -2
  88. package/dist/gemini/.agents/skills/jahia-dev-import-from/SKILL.md +1 -1
  89. package/dist/gemini/.agents/skills/jahia-dev-properties/SKILL.md +1 -1
  90. package/dist/gemini/.agents/skills/jahia-dev-query-content/SKILL.md +1 -1
  91. package/dist/gemini/.agents/skills/jahia-jcr-sql2/SKILL.md +1 -2
  92. package/dist/gemini/.agents/skills/jahia-review/SKILL.md +63 -0
  93. package/dist/gemini/.agents/skills/jahia-review-code/SKILL.md +228 -0
  94. package/dist/gemini/.agents/skills/jahia-review-site/SKILL.md +52 -0
  95. package/dist/gemini/.agents/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
  96. package/dist/gemini/.gemini/settings.json +10 -0
  97. package/dist/gemini/AGENTS.md +2 -2
  98. package/dist/index.js +14 -2
  99. package/dist/kiro/.kiro/settings/mcp.json +10 -0
  100. package/dist/kiro/.kiro/skills/jahia-cnd-author/SKILL.md +94 -0
  101. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-area-types.md +55 -0
  102. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-authoring-experience.md +92 -0
  103. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-child-nodes.md +74 -0
  104. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-jahia-mixins.md +510 -0
  105. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-modeling-decisions.md +87 -0
  106. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-numbers-dates.md +92 -0
  107. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-string-selectors.md +133 -0
  108. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-syntax.md +119 -0
  109. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/types-ts-mapping.md +73 -0
  110. package/dist/kiro/.kiro/skills/jahia-dev-accessibility/SKILL.md +11 -0
  111. package/dist/kiro/.kiro/skills/jahia-dev-build-component/SKILL.md +133 -0
  112. package/dist/kiro/.kiro/skills/jahia-dev-create-page-template/SKILL.md +341 -0
  113. package/dist/kiro/.kiro/skills/jahia-dev-create-template-set/SKILL.md +205 -0
  114. package/dist/kiro/.kiro/skills/jahia-dev-create-view/SKILL.md +896 -0
  115. package/dist/kiro/.kiro/skills/jahia-dev-debug/SKILL.md +176 -0
  116. package/dist/kiro/.kiro/skills/jahia-dev-import-from/SKILL.md +244 -0
  117. package/dist/kiro/.kiro/skills/jahia-dev-jexperience/SKILL.md +269 -0
  118. package/dist/kiro/.kiro/skills/jahia-dev-ops/SKILL.md +50 -0
  119. package/dist/kiro/.kiro/skills/jahia-dev-ops/references/docker.md +151 -0
  120. package/dist/kiro/.kiro/skills/jahia-dev-ops/references/monitoring.md +195 -0
  121. package/dist/kiro/.kiro/skills/jahia-dev-ops/references/provisioning.md +269 -0
  122. package/dist/kiro/.kiro/skills/jahia-dev-properties/SKILL.md +147 -0
  123. package/dist/kiro/.kiro/skills/jahia-dev-properties/references/all-properties.md +231 -0
  124. package/dist/kiro/.kiro/skills/jahia-dev-query-content/SKILL.md +204 -0
  125. package/dist/kiro/.kiro/skills/jahia-dev-review-cnd/SKILL.md +79 -0
  126. package/dist/kiro/.kiro/skills/jahia-dev-review-cnd/scripts/check-cnd.d.mts +13 -0
  127. package/dist/kiro/.kiro/skills/jahia-dev-review-cnd/scripts/check-cnd.mjs +198 -0
  128. package/dist/kiro/.kiro/skills/jahia-dev-screenshot/SKILL.md +177 -0
  129. package/dist/kiro/.kiro/skills/jahia-dev-start-local/SKILL.md +121 -0
  130. package/dist/kiro/.kiro/skills/jahia-jcr-sql2/SKILL.md +257 -0
  131. package/dist/kiro/.kiro/skills/jahia-review/SKILL.md +63 -0
  132. package/dist/kiro/.kiro/skills/jahia-review-code/SKILL.md +228 -0
  133. package/dist/kiro/.kiro/skills/jahia-review-site/SKILL.md +52 -0
  134. package/dist/kiro/.kiro/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
  135. package/dist/kiro/.kiro/steering/jahia.md +55 -0
  136. package/dist/kiro/AGENTS.md +62 -0
  137. package/dist/opencode/.agents/skills/jahia-dev-build-component/SKILL.md +2 -2
  138. package/dist/opencode/.agents/skills/jahia-dev-create-view/SKILL.md +2 -2
  139. package/dist/opencode/.agents/skills/jahia-dev-import-from/SKILL.md +1 -1
  140. package/dist/opencode/.agents/skills/jahia-dev-properties/SKILL.md +1 -1
  141. package/dist/opencode/.agents/skills/jahia-dev-query-content/SKILL.md +1 -1
  142. package/dist/opencode/.agents/skills/jahia-jcr-sql2/SKILL.md +1 -2
  143. package/dist/opencode/.agents/skills/jahia-review/SKILL.md +63 -0
  144. package/dist/opencode/.agents/skills/jahia-review-code/SKILL.md +228 -0
  145. package/dist/opencode/.agents/skills/jahia-review-site/SKILL.md +52 -0
  146. package/dist/opencode/.agents/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
  147. package/dist/opencode/AGENTS.md +2 -2
  148. package/dist/opencode/opencode.json +12 -0
  149. package/dist/windsurf/.windsurf/rules/jahia.md +1 -1
  150. package/dist/windsurf/.windsurf/skills/jahia-dev-build-component/SKILL.md +2 -2
  151. package/dist/windsurf/.windsurf/skills/jahia-dev-create-view/SKILL.md +2 -2
  152. package/dist/windsurf/.windsurf/skills/jahia-dev-import-from/SKILL.md +1 -1
  153. package/dist/windsurf/.windsurf/skills/jahia-dev-properties/SKILL.md +1 -1
  154. package/dist/windsurf/.windsurf/skills/jahia-dev-query-content/SKILL.md +1 -1
  155. package/dist/windsurf/.windsurf/skills/jahia-jcr-sql2/SKILL.md +1 -2
  156. package/dist/windsurf/.windsurf/skills/jahia-review/SKILL.md +63 -0
  157. package/dist/windsurf/.windsurf/skills/jahia-review-code/SKILL.md +228 -0
  158. package/dist/windsurf/.windsurf/skills/jahia-review-site/SKILL.md +52 -0
  159. package/dist/windsurf/.windsurf/skills/jahia-review-site/scripts/review-pages.mjs +74 -0
  160. package/dist/windsurf/AGENTS.md +2 -2
  161. package/package.json +1 -1
  162. package/dist/claude/.claude/skills/jahia-dev-site-review/SKILL.md +0 -70
  163. package/dist/claude/.claude/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
  164. package/dist/codex/.agents/skills/jahia-dev-site-review/SKILL.md +0 -70
  165. package/dist/codex/.agents/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
  166. package/dist/copilot/.agents/skills/jahia-dev-site-review/SKILL.md +0 -70
  167. package/dist/copilot/.agents/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
  168. package/dist/cursor/.agents/skills/jahia-dev-site-review/SKILL.md +0 -70
  169. package/dist/cursor/.agents/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
  170. package/dist/gemini/.agents/skills/jahia-dev-review/SKILL.md +0 -228
  171. package/dist/gemini/.agents/skills/jahia-dev-site-review/SKILL.md +0 -70
  172. package/dist/gemini/.agents/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
  173. package/dist/opencode/.agents/skills/jahia-dev-review/SKILL.md +0 -228
  174. package/dist/opencode/.agents/skills/jahia-dev-site-review/SKILL.md +0 -70
  175. package/dist/opencode/.agents/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
  176. package/dist/windsurf/.windsurf/skills/jahia-dev-review/SKILL.md +0 -228
  177. package/dist/windsurf/.windsurf/skills/jahia-dev-site-review/SKILL.md +0 -70
  178. package/dist/windsurf/.windsurf/skills/jahia-dev-site-review/scripts/review-pages.mjs +0 -85
package/dist/index.js CHANGED
@@ -861,11 +861,13 @@ ${Nt}${r.trimStart()}`), s = 3 + stripVTControlCharacters(r.trimStart()).length)
861
861
  //#endregion
862
862
  //#region cli/index.ts
863
863
  const targets = [
864
+ "antigravity",
864
865
  "claude",
865
866
  "copilot",
866
867
  "cursor",
867
868
  "codex",
868
869
  "gemini",
870
+ "kiro",
869
871
  "opencode",
870
872
  "windsurf"
871
873
  ];
@@ -874,7 +876,7 @@ const interactive = !target;
874
876
  ge("@jahia/agentic");
875
877
  R.message("The goal of this CLI is to provide a fully functional harness for agentic development of Jahia modules.");
876
878
  if (!target) {
877
- R.info(`You skip this prompt by running ${styleText("blueBright", "npx @jahia/agentic@latest <agent>")}`);
879
+ R.info(`You can skip this prompt by running ${styleText("blueBright", "npx @jahia/agentic@latest <agent>")}`);
878
880
  const gitStatus = spawnSync("git", ["status", "--porcelain"], { encoding: "utf-8" });
879
881
  if (gitStatus.error) R.error(`Failed to check git status: ${gitStatus.error.message}`);
880
882
  if (gitStatus.stdout.trim() !== "") {
@@ -888,6 +890,11 @@ if (!target) {
888
890
  target = await xe({
889
891
  message: "Which agent do you use?",
890
892
  options: [
893
+ {
894
+ value: "antigravity",
895
+ label: "Antigravity",
896
+ hint: "Will create AGENTS.md and .agents/"
897
+ },
891
898
  {
892
899
  value: "claude",
893
900
  label: "Claude",
@@ -913,6 +920,11 @@ if (!target) {
913
920
  label: "Gemini",
914
921
  hint: "Will create AGENTS.md, GEMINI.md and .agents/"
915
922
  },
923
+ {
924
+ value: "kiro",
925
+ label: "Kiro",
926
+ hint: "Will create AGENTS.md and .kiro/"
927
+ },
916
928
  {
917
929
  value: "opencode",
918
930
  label: "OpenCode",
@@ -961,7 +973,7 @@ for (const { src, dst } of filesToCopy) try {
961
973
  if (readFileSync(dst, "utf-8") !== readFileSync(src, "utf-8")) overwriteCount++;
962
974
  } catch {}
963
975
  if (interactive && overwriteCount > 0) {
964
- const confirm = await ue({ message: `There are ${overwriteCount} file${overwriteCount >= 2 ? "s" : ""} that will be overwritten. Do you want to continue?` });
976
+ const confirm = await ue({ message: overwriteCount > 1 ? `There are ${overwriteCount} files that will be overwritten. Do you want to continue?` : "There is 1 file that will be overwritten. Do you want to continue?" });
965
977
  if (!confirm || q$1(confirm)) {
966
978
  me("Come back soon!");
967
979
  process.exit(0);
@@ -0,0 +1,10 @@
1
+ {
2
+ "mcpServers": {
3
+ "jahia": {
4
+ "url": "http://localhost:8080/modules/mcp",
5
+ "headers": {
6
+ "Authorization": "Basic cm9vdDpyb290MTIzNA=="
7
+ }
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: jahia-cnd-author
3
+ description: Use when you need to write a Jahia CND content type definition and its TypeScript props interface. Receives a component spec and produces definition.cnd + types.ts + .properties labels with correct Jahia-specific syntax. Self-validates output before returning.
4
+ context: fork
5
+ argument-hint: "[business need]"
6
+ ---
7
+
8
+ You are a Jahia content modeling specialist. You receive a business need, e.g. "I want to model a blog post". If used in interactive mode, you may ask for clarifications. Your job is to write correct `definition.cnd`, `types.ts`, and `.properties` files for Jahia components.
9
+
10
+ ## Content Modeling 101
11
+
12
+ Jahia stores content in a tree structure. Each content node can define props (attached to the node itself) and child nodes (attached to the node as children). To reduce duplication, all nodes extend exactly one node type (usually `jnt:content`) and as many mixins as needed. Mixins are reusable sets of props and child nodes. Jahia ships with many native mixins, and you can define your own.
13
+
14
+ The content model is pushed to Jahia as CND files. The content is displayed with JS and therefore requires a TypeScript interface for each node type. For each component, you need to provide a `definition.cnd` and a `types.ts` file.
15
+
16
+ Unless told otherwise, the practice is to create one component per file, colocated with the type definition: `src/components/<name>/definition.cnd` and `./types.ts`.
17
+
18
+ Project-wide mixins are declared in `settings/definitions.cnd`. Read this file first to see which mixins are already defined. Unless told otherwise, in an existing project, read all existing `.cnd` files to infer practices. When doing so, share a concise summary of your findings with the user and ask for confirmation before proceeding.
19
+
20
+ ## Step 1: establish the component requirements
21
+
22
+ Understanding the needs correctly is mandatory to provide a good editing experience. The component may be contributed directly in pages, with the visual editor named Page Builder, or from content folders (content collections).
23
+
24
+ If invoked as a sub-agent with a structured spec, skip to Step 2.
25
+
26
+ In interactive mode, ask the user to confirm using this template:
27
+
28
+ ```
29
+ Component: [PascalCase name]
30
+ Description: [what it represents and how editors use it]
31
+ Fields:
32
+ - name: type / i18n? / mandatory?
33
+ Views: [default, card, fullPage, small — list all needed]
34
+ Used where: [page area / content folder / child of <Parent>]
35
+ Has repeatable children: [no / yes: describe them]
36
+ ```
37
+
38
+ For decisions that aren't obvious — semantic vs. generic type, weakreference vs. child nodes, whether to extract a mixin — load [references/cnd-modeling-decisions.md].
39
+
40
+ ## Step 2: survey the project
41
+
42
+ Before writing anything, understand the project context:
43
+
44
+ ```bash
45
+ grep -h "^<" settings/definitions.cnd | head -1 # namespace prefix
46
+ grep "nsmix:pageComponent" settings/definitions.cnd # two-tier mixin?
47
+ grep -rh "^\[" settings/definitions.cnd src/components/ 2>/dev/null | sort # existing types
48
+ ```
49
+
50
+ Note the namespace prefix. Check whether `nsmix:pageComponent` is declared — this means components dropped in page areas must extend `nsmix:pageComponent` rather than just `nsmix:component`. Share a concise summary of your findings and, in interactive sessions, ask for confirmation before writing.
51
+
52
+ ## Step 3: write `definition.cnd`
53
+
54
+ Load reference files as needed for the syntax you require:
55
+
56
+ - **File structure, namespace declarations, property anatomy** → [references/cnd-syntax.md]
57
+ - **Which Jahia native mixins to extend** (`mix:title`, `jmix:mainResource`, etc.) → [references/cnd-jahia-mixins.md]
58
+ - **String properties, choicelists, link pickers, richtext** → [references/cnd-string-selectors.md]
59
+ - **Numeric, boolean, and date properties** → [references/cnd-numbers-dates.md]
60
+ - **Child nodes, CTAs, orderable containers** → [references/cnd-child-nodes.md]
61
+ - **Custom area types** (only relevant for page template types) → [references/cnd-area-types.md]
62
+
63
+ Write component-level definitions to `src/components/<Category>/<Name>/definition.cnd`. Module-level mixins belong in `settings/definitions.cnd`.
64
+
65
+ ## Step 4: write `types.ts`
66
+
67
+ Every CND property needs a corresponding TypeScript entry. Load [references/types-ts-mapping.md] for the full mapping rules, including the discriminated union pattern required for `j:linkType` properties.
68
+
69
+ Write to `src/components/<Category>/<Name>/types.ts`.
70
+
71
+ ## Step 5: write `.properties` labels
72
+
73
+ Editors see these labels in the content editor — every type name and every field needs an entry. Load [references/cnd-authoring-experience.md] for the naming conventions and icon patterns.
74
+
75
+ Write to:
76
+ - `settings/resources/<module>_en.properties`
77
+ - `settings/resources/<module>_fr.properties` (use the English label as a placeholder if no translation is available)
78
+
79
+ ## Step 6: validate and report
80
+
81
+ Before returning, verify:
82
+
83
+ - [ ] Namespace prefix matches `settings/definitions.cnd`
84
+ - [ ] All component types extend `nsmix:component` (or `nsmix:pageComponent` if page-area only)
85
+ - [ ] No `- title (string) i18n mandatory` — use `mix:title` instead
86
+ - [ ] No `imageAlt (string)` — the image node's `jcr:title` serves as alt text
87
+ - [ ] Links use `choicelist[linkTypeInitializer]`, not a plain string
88
+ - [ ] No declared `j:linknode` or `j:url` — Jahia injects these automatically
89
+ - [ ] Every `autocreated` property has a `= 'value'` default
90
+ - [ ] `jmix:hiddenType` used for structural types (never `jmix:studioOnly`)
91
+ - [ ] Every CND property has a matching entry in `types.ts`
92
+ - [ ] `.properties` labels written for every type and field
93
+
94
+ Return **PASS** or **FAIL** with a list of specific issues.
@@ -0,0 +1,55 @@
1
+ # CND Area Types — Quick Reference
2
+
3
+ ## Two-tier mixin system
4
+
5
+ Define in `settings/definitions.cnd`:
6
+
7
+ ```cnd
8
+ [nsmix:component] > jmix:droppableContent, jmix:accessControllableContent mixin
9
+ [nsmix:pageComponent] > nsmix:component mixin
10
+ ```
11
+
12
+ | Component placement | Extend |
13
+ |---|---|
14
+ | Dropped in page areas (top-level) | `nsmix:pageComponent` |
15
+ | Child of another component | `nsmix:component` |
16
+
17
+ A component extending only `nsmix:component` cannot be dropped in areas that restrict to `nsmix:pageComponent`.
18
+
19
+ ## Custom area type
20
+
21
+ Restricts what editors can drop into a given area:
22
+
23
+ ```cnd
24
+ [nsnt:pageArea] > jnt:content, jmix:list, jmix:studioOnly orderable
25
+ + * (nsmix:pageComponent)
26
+ ```
27
+
28
+ Use in a page template view:
29
+
30
+ ```tsx
31
+ <Area name="main" nodeType="nsnt:pageArea" />
32
+ ```
33
+
34
+ `jmix:studioOnly` on the area type prevents it from appearing in the content picker. Use `jmix:hiddenType` for regular component types that should be hidden.
35
+
36
+ ## Escape hatch component
37
+
38
+ One component that accepts any droppable content, for advanced editors:
39
+
40
+ ```cnd
41
+ [nsnt:contentStack] > jnt:content, nsmix:pageComponent
42
+ + * (jmix:droppableContent)
43
+ ```
44
+
45
+ Editors add this to a page area, then drop any content type inside it.
46
+
47
+ ## Page templates vs sectioning components
48
+
49
+ | Page templates | Sectioning components |
50
+ |---|---|
51
+ | Fixed vertical sections per template | Editor builds sections freely |
52
+ | Simpler for less experienced editors | More flexible, preferred for evolving integrations |
53
+ | Use when mockups define clear distinct layouts | Use for a single free-form template |
54
+
55
+ Reuse area names across templates (e.g. always `main` and `sidebar`) so content is not lost when editors switch templates.
@@ -0,0 +1,92 @@
1
+ # CND Authoring Experience Reference
2
+
3
+ ## .properties labels and icons
4
+
5
+ Required files for every content type:
6
+ - `settings/resources/<module>_en.properties`
7
+ - `settings/resources/<module>_fr.properties`
8
+
9
+ ```ini
10
+ # Node type label
11
+ ns_heroSection.label=Hero Section
12
+
13
+ # Field labels
14
+ ns_heroSection.subtitle.label=Subtitle
15
+ ns_heroSection.backgroundImage.label=Background Image
16
+
17
+ # Field tooltip
18
+ ns_heroSection.subtitle.ui.tooltip=Optional subtitle text displayed below the heading.
19
+
20
+ # Choicelist item labels (for resourceBundle choicelist)
21
+ ns_heroSection.variant.primary=Primary
22
+ ns_heroSection.variant.secondary=Secondary
23
+ ```
24
+
25
+ Icon file: `settings/content-types-icons/<ns>_<typeName>.png`
26
+ Free icons: https://www.flaticon.com/
27
+
28
+ **Rules:**
29
+ - Every node type must have a `.label` entry.
30
+ - Every field must have a `.label` entry.
31
+ - Choicelist options using `resourceBundle` must have a label per value.
32
+ - Replace special characters (e.g. `:`) with `_` in the `.properties` key.
33
+
34
+ ---
35
+
36
+ ## Editor hints in views
37
+
38
+ Use `renderContext.isEditMode()` to show a flat, non-interactive layout and hints in edit mode.
39
+
40
+ ```tsx
41
+ ({ slides }: Props, { renderContext }) => {
42
+ const isEdit = renderContext.isEditMode();
43
+ return isEdit ? (
44
+ <div>
45
+ <RenderChildren />
46
+ <p className={classes.hint}>Carousel — add or reorder slides here</p>
47
+ </div>
48
+ ) : (
49
+ <div className={classes.carousel}><RenderChildren /></div>
50
+ );
51
+ };
52
+ ```
53
+
54
+ Show inline validation hints:
55
+
56
+ ```tsx
57
+ {renderContext.isEditMode() && value % 2 !== 0 && (
58
+ <p className="editor-hint">Value should be even for best visual result.</p>
59
+ )}
60
+ ```
61
+
62
+ ---
63
+
64
+ ## import.xml recommendations
65
+
66
+ Provide `import.xml` in every template set to pre-populate new sites:
67
+
68
+ - A homepage with `j:isHomePage="true"` — required for sitemap and nav generation.
69
+ - Offline folder structure with `jmix:systemNameReadonly` + `jmix:nolive`:
70
+ - "Offline pages/Models"
71
+ - "Offline pages/Drafts"
72
+ - "Offline pages/Archive"
73
+ - Content folders matching your types (e.g. "Blog/Authors", "Blog/Posts").
74
+ - Content restrictions on folders:
75
+ ```xml
76
+ jcr:mixinTypes="jmix:contributeMode" j:contributeTypes="ns:blogPost"
77
+ ```
78
+
79
+ > `import.xml` only applies at site creation — changes do NOT update existing sites.
80
+
81
+ ---
82
+
83
+ ## jmix:visibleInContentTree
84
+
85
+ Enables Page Builder visual editing inside content folders (not just list view).
86
+
87
+ ```cnd
88
+ [ns:authorCollection] > jnt:content, jmix:visibleInContentTree
89
+ + * (ns:author)
90
+ ```
91
+
92
+ Use when editors benefit from visual layout while editing content folder items.
@@ -0,0 +1,74 @@
1
+ # CND Child Nodes
2
+
3
+ ## Syntax
4
+
5
+ ```cnd
6
+ + childName (ns:type) // named child — exactly one
7
+ + childName (ns:type) multiple // named child — list
8
+ + * (ns:type) // any-name child of a specific type
9
+ + * (jmix:droppableContent) // open container — any droppable component
10
+ ```
11
+
12
+ ## When to use child nodes vs `weakreference multiple`
13
+
14
+ | Use child nodes when… | Use `weakreference multiple` when… |
15
+ |---|---|
16
+ | Each item has multiple properties (label + link) | Each item is just a reference (a page, an image) |
17
+ | Items have no life outside the parent | Items are managed elsewhere and reused |
18
+ | You always create them together | Editors need to pick from existing content |
19
+
20
+ ## Repeatable CTA pattern
21
+
22
+ **NEVER put `ctaText + ctaLink/ctaUrl` on the parent type as flat properties.**
23
+ Model CTAs as child nodes — editors can then add multiple CTAs.
24
+
25
+ ```cnd
26
+ // ✅ Correct — supports multiple CTAs
27
+ [ns:heroSection] > jnt:content, nsmix:component, mix:title
28
+ - subtitle (string, richtext) i18n
29
+ - backgroundImage (weakreference, picker[type='image']) < jmix:image
30
+ + * (ns:heroCallToAction)
31
+
32
+ [ns:heroCallToAction] > jnt:content, nsmix:component
33
+ - label (string) i18n mandatory
34
+ - j:linkType (string, choicelist[linkTypeInitializer]) mandatory
35
+
36
+ // ❌ Wrong — forces exactly one CTA, editors can't add more
37
+ [ns:heroSection] > jnt:content, nsmix:component
38
+ - ctaText (string) i18n
39
+ - ctaLink (string) i18n // also wrong type for links
40
+ ```
41
+
42
+ ## Ordering
43
+
44
+ Add `orderable` to the parent type when editors need to reorder children:
45
+
46
+ ```cnd
47
+ [ns:featureList] > jnt:content, nsmix:component orderable
48
+ + * (ns:featureItem)
49
+ ```
50
+
51
+ ## Hidden structural nodes
52
+
53
+ Child nodes that editors should never add manually (structural containers, auto-created nodes):
54
+
55
+ ```cnd
56
+ [ns:heroSection] > jnt:content, nsmix:component, mix:title
57
+ + ctaContainer (ns:ctaContainer) autocreated
58
+
59
+ [ns:ctaContainer] > jnt:content, jmix:hiddenType orderable
60
+ + * (ns:callToAction)
61
+ ```
62
+
63
+ `jmix:hiddenType` hides a type from the Page Builder component picker.
64
+ **Never use `jmix:studioOnly`** — it causes silent rendering issues.
65
+
66
+ ## Open container (accept any droppable)
67
+
68
+ ```cnd
69
+ [ns:gridRow] > jnt:content, nsmix:component
70
+ - columns (long) = '3' autocreated mandatory < '1', '2', '3', '4'
71
+ + * (jmix:droppableContent)
72
+ ```
73
+
74
+ `+ * (jmix:droppableContent)` accepts any component the editor can drop.