@jahia/agentic 0.4.0 → 0.5.0

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 (451) 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-jahia-mixins.md +510 -0
  7. package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-modeling-decisions.md +87 -0
  8. package/dist/{opencode/.opencode/agents → antigravity/.agents/skills/jahia-cnd-author/references}/cnd-numbers-dates.md +32 -1
  9. package/dist/{opencode/.opencode/agents → antigravity/.agents/skills/jahia-cnd-author/references}/cnd-string-selectors.md +49 -10
  10. package/dist/antigravity/.agents/skills/jahia-cnd-author/references/cnd-syntax.md +119 -0
  11. package/dist/antigravity/.agents/skills/jahia-cnd-author/references/types-ts-mapping.md +73 -0
  12. package/dist/antigravity/.agents/skills/jahia-dev-accessibility/SKILL.md +11 -0
  13. package/dist/antigravity/.agents/skills/jahia-dev-build-component/SKILL.md +133 -0
  14. package/dist/antigravity/.agents/skills/jahia-dev-create-page-template/SKILL.md +341 -0
  15. package/dist/antigravity/.agents/skills/jahia-dev-create-template-set/SKILL.md +205 -0
  16. package/dist/antigravity/.agents/skills/jahia-dev-create-view/SKILL.md +896 -0
  17. package/dist/antigravity/.agents/skills/jahia-dev-debug/SKILL.md +176 -0
  18. package/dist/antigravity/.agents/skills/jahia-dev-import-from/SKILL.md +244 -0
  19. package/dist/antigravity/.agents/skills/jahia-dev-jexperience/SKILL.md +269 -0
  20. package/dist/antigravity/.agents/skills/jahia-dev-ops/SKILL.md +50 -0
  21. package/dist/antigravity/.agents/skills/jahia-dev-ops/references/docker.md +151 -0
  22. package/dist/antigravity/.agents/skills/jahia-dev-ops/references/monitoring.md +195 -0
  23. package/dist/antigravity/.agents/skills/jahia-dev-ops/references/provisioning.md +269 -0
  24. package/dist/antigravity/.agents/skills/jahia-dev-properties/SKILL.md +147 -0
  25. package/dist/antigravity/.agents/skills/jahia-dev-properties/references/all-properties.md +231 -0
  26. package/dist/antigravity/.agents/skills/jahia-dev-query-content/SKILL.md +204 -0
  27. package/dist/antigravity/.agents/skills/jahia-dev-review/SKILL.md +228 -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-site-review/SKILL.md +70 -0
  33. package/dist/antigravity/.agents/skills/jahia-dev-site-review/scripts/review-pages.mjs +85 -0
  34. package/dist/antigravity/.agents/skills/jahia-dev-start-local/SKILL.md +121 -0
  35. package/dist/antigravity/.agents/skills/jahia-jcr-sql2/SKILL.md +258 -0
  36. package/dist/antigravity/AGENTS.md +62 -0
  37. package/dist/claude/.claude/rules/jahia.md +1 -37
  38. package/dist/claude/.claude/skills/jahia-cnd-author/SKILL.md +94 -0
  39. package/dist/claude/.claude/skills/jahia-cnd-author/references/cnd-area-types.md +55 -0
  40. package/dist/claude/.claude/skills/jahia-cnd-author/references/cnd-authoring-experience.md +92 -0
  41. package/dist/claude/.claude/skills/jahia-cnd-author/references/cnd-jahia-mixins.md +510 -0
  42. package/dist/claude/.claude/skills/jahia-cnd-author/references/cnd-modeling-decisions.md +87 -0
  43. package/dist/claude/.claude/{agents → skills/jahia-cnd-author/references}/cnd-numbers-dates.md +32 -1
  44. package/dist/{cursor/.cursor/agents → claude/.claude/skills/jahia-cnd-author/references}/cnd-string-selectors.md +49 -10
  45. package/dist/claude/.claude/skills/jahia-cnd-author/references/cnd-syntax.md +119 -0
  46. package/dist/claude/.claude/skills/jahia-cnd-author/references/types-ts-mapping.md +73 -0
  47. package/dist/claude/.claude/skills/jahia-dev-accessibility/SKILL.md +5 -265
  48. package/dist/claude/.claude/skills/jahia-dev-build-component/SKILL.md +13 -8
  49. package/dist/claude/.mcp.json +11 -0
  50. package/dist/claude/CLAUDE.md +2 -38
  51. package/dist/codex/.agents/skills/jahia-cnd-author/SKILL.md +94 -0
  52. package/dist/codex/.agents/skills/jahia-cnd-author/references/cnd-area-types.md +55 -0
  53. package/dist/codex/.agents/skills/jahia-cnd-author/references/cnd-authoring-experience.md +92 -0
  54. package/dist/codex/.agents/skills/jahia-cnd-author/references/cnd-jahia-mixins.md +510 -0
  55. package/dist/codex/.agents/skills/jahia-cnd-author/references/cnd-modeling-decisions.md +87 -0
  56. package/dist/{cursor/.cursor/agents → codex/.agents/skills/jahia-cnd-author/references}/cnd-numbers-dates.md +32 -1
  57. package/dist/{claude/.claude/agents → codex/.agents/skills/jahia-cnd-author/references}/cnd-string-selectors.md +49 -10
  58. package/dist/codex/.agents/skills/jahia-cnd-author/references/cnd-syntax.md +119 -0
  59. package/dist/codex/.agents/skills/jahia-cnd-author/references/types-ts-mapping.md +73 -0
  60. package/dist/codex/.agents/skills/jahia-dev-accessibility/SKILL.md +5 -265
  61. package/dist/codex/.agents/skills/jahia-dev-build-component/SKILL.md +13 -8
  62. package/dist/codex/AGENTS.md +2 -38
  63. package/dist/copilot/.agents/skills/jahia-cnd-author/SKILL.md +94 -0
  64. package/dist/copilot/.agents/skills/jahia-cnd-author/references/cnd-area-types.md +55 -0
  65. package/dist/copilot/.agents/skills/jahia-cnd-author/references/cnd-authoring-experience.md +92 -0
  66. package/dist/copilot/.agents/skills/jahia-cnd-author/references/cnd-child-nodes.md +74 -0
  67. package/dist/copilot/.agents/skills/jahia-cnd-author/references/cnd-jahia-mixins.md +510 -0
  68. package/dist/copilot/.agents/skills/jahia-cnd-author/references/cnd-modeling-decisions.md +87 -0
  69. package/dist/copilot/.agents/skills/jahia-cnd-author/references/cnd-numbers-dates.md +92 -0
  70. package/dist/copilot/.agents/skills/jahia-cnd-author/references/cnd-string-selectors.md +133 -0
  71. package/dist/copilot/.agents/skills/jahia-cnd-author/references/cnd-syntax.md +119 -0
  72. package/dist/copilot/.agents/skills/jahia-cnd-author/references/types-ts-mapping.md +73 -0
  73. package/dist/copilot/.agents/skills/jahia-dev-accessibility/SKILL.md +5 -265
  74. package/dist/copilot/.agents/skills/jahia-dev-build-component/SKILL.md +13 -8
  75. package/dist/copilot/AGENTS.md +2 -38
  76. package/dist/cursor/.agents/skills/jahia-cnd-author/SKILL.md +94 -0
  77. package/dist/cursor/.agents/skills/jahia-cnd-author/references/cnd-area-types.md +55 -0
  78. package/dist/cursor/.agents/skills/jahia-cnd-author/references/cnd-authoring-experience.md +92 -0
  79. package/dist/cursor/.agents/skills/jahia-cnd-author/references/cnd-child-nodes.md +74 -0
  80. package/dist/cursor/.agents/skills/jahia-cnd-author/references/cnd-jahia-mixins.md +510 -0
  81. package/dist/cursor/.agents/skills/jahia-cnd-author/references/cnd-modeling-decisions.md +87 -0
  82. package/dist/cursor/.agents/skills/jahia-cnd-author/references/cnd-numbers-dates.md +92 -0
  83. package/dist/cursor/.agents/skills/jahia-cnd-author/references/cnd-string-selectors.md +133 -0
  84. package/dist/cursor/.agents/skills/jahia-cnd-author/references/cnd-syntax.md +119 -0
  85. package/dist/cursor/.agents/skills/jahia-cnd-author/references/types-ts-mapping.md +73 -0
  86. package/dist/cursor/.agents/skills/jahia-dev-accessibility/SKILL.md +5 -265
  87. package/dist/cursor/.agents/skills/jahia-dev-build-component/SKILL.md +13 -8
  88. package/dist/cursor/.cursor/mcp.json +11 -0
  89. package/dist/cursor/.cursor/rules/jahia.mdc +1 -37
  90. package/dist/gemini/.agents/skills/jahia-cnd-author/SKILL.md +94 -0
  91. package/dist/gemini/.agents/skills/jahia-cnd-author/references/cnd-area-types.md +55 -0
  92. package/dist/gemini/.agents/skills/jahia-cnd-author/references/cnd-authoring-experience.md +92 -0
  93. package/dist/gemini/.agents/skills/jahia-cnd-author/references/cnd-child-nodes.md +74 -0
  94. package/dist/gemini/.agents/skills/jahia-cnd-author/references/cnd-jahia-mixins.md +510 -0
  95. package/dist/gemini/.agents/skills/jahia-cnd-author/references/cnd-modeling-decisions.md +87 -0
  96. package/dist/gemini/.agents/skills/jahia-cnd-author/references/cnd-numbers-dates.md +92 -0
  97. package/dist/gemini/.agents/skills/jahia-cnd-author/references/cnd-string-selectors.md +133 -0
  98. package/dist/gemini/.agents/skills/jahia-cnd-author/references/cnd-syntax.md +119 -0
  99. package/dist/gemini/.agents/skills/jahia-cnd-author/references/types-ts-mapping.md +73 -0
  100. package/dist/gemini/.agents/skills/jahia-dev-accessibility/SKILL.md +5 -265
  101. package/dist/gemini/.agents/skills/jahia-dev-build-component/SKILL.md +13 -8
  102. package/dist/gemini/.gemini/settings.json +10 -0
  103. package/dist/gemini/AGENTS.md +2 -38
  104. package/dist/index.js +12 -0
  105. package/dist/kiro/.kiro/settings/mcp.json +10 -0
  106. package/dist/kiro/.kiro/skills/jahia-cnd-author/SKILL.md +94 -0
  107. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-area-types.md +55 -0
  108. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-authoring-experience.md +92 -0
  109. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-child-nodes.md +74 -0
  110. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-jahia-mixins.md +510 -0
  111. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-modeling-decisions.md +87 -0
  112. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-numbers-dates.md +92 -0
  113. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-string-selectors.md +133 -0
  114. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/cnd-syntax.md +119 -0
  115. package/dist/kiro/.kiro/skills/jahia-cnd-author/references/types-ts-mapping.md +73 -0
  116. package/dist/kiro/.kiro/skills/jahia-dev-accessibility/SKILL.md +11 -0
  117. package/dist/kiro/.kiro/skills/jahia-dev-build-component/SKILL.md +133 -0
  118. package/dist/kiro/.kiro/skills/jahia-dev-create-page-template/SKILL.md +341 -0
  119. package/dist/kiro/.kiro/skills/jahia-dev-create-template-set/SKILL.md +205 -0
  120. package/dist/kiro/.kiro/skills/jahia-dev-create-view/SKILL.md +896 -0
  121. package/dist/kiro/.kiro/skills/jahia-dev-debug/SKILL.md +176 -0
  122. package/dist/kiro/.kiro/skills/jahia-dev-import-from/SKILL.md +244 -0
  123. package/dist/kiro/.kiro/skills/jahia-dev-jexperience/SKILL.md +269 -0
  124. package/dist/kiro/.kiro/skills/jahia-dev-ops/SKILL.md +50 -0
  125. package/dist/kiro/.kiro/skills/jahia-dev-ops/references/docker.md +151 -0
  126. package/dist/kiro/.kiro/skills/jahia-dev-ops/references/monitoring.md +195 -0
  127. package/dist/kiro/.kiro/skills/jahia-dev-ops/references/provisioning.md +269 -0
  128. package/dist/kiro/.kiro/skills/jahia-dev-properties/SKILL.md +147 -0
  129. package/dist/kiro/.kiro/skills/jahia-dev-properties/references/all-properties.md +231 -0
  130. package/dist/kiro/.kiro/skills/jahia-dev-query-content/SKILL.md +204 -0
  131. package/dist/kiro/.kiro/skills/jahia-dev-review/SKILL.md +228 -0
  132. package/dist/kiro/.kiro/skills/jahia-dev-review-cnd/SKILL.md +79 -0
  133. package/dist/kiro/.kiro/skills/jahia-dev-review-cnd/scripts/check-cnd.d.mts +13 -0
  134. package/dist/kiro/.kiro/skills/jahia-dev-review-cnd/scripts/check-cnd.mjs +198 -0
  135. package/dist/kiro/.kiro/skills/jahia-dev-screenshot/SKILL.md +177 -0
  136. package/dist/kiro/.kiro/skills/jahia-dev-site-review/SKILL.md +70 -0
  137. package/dist/kiro/.kiro/skills/jahia-dev-site-review/scripts/review-pages.mjs +85 -0
  138. package/dist/kiro/.kiro/skills/jahia-dev-start-local/SKILL.md +121 -0
  139. package/dist/kiro/.kiro/skills/jahia-jcr-sql2/SKILL.md +258 -0
  140. package/dist/kiro/.kiro/steering/jahia.md +55 -0
  141. package/dist/kiro/AGENTS.md +62 -0
  142. package/dist/opencode/.agents/skills/jahia-cnd-author/SKILL.md +94 -0
  143. package/dist/opencode/.agents/skills/jahia-cnd-author/references/cnd-area-types.md +55 -0
  144. package/dist/opencode/.agents/skills/jahia-cnd-author/references/cnd-authoring-experience.md +92 -0
  145. package/dist/opencode/.agents/skills/jahia-cnd-author/references/cnd-child-nodes.md +74 -0
  146. package/dist/opencode/.agents/skills/jahia-cnd-author/references/cnd-jahia-mixins.md +510 -0
  147. package/dist/opencode/.agents/skills/jahia-cnd-author/references/cnd-modeling-decisions.md +87 -0
  148. package/dist/opencode/.agents/skills/jahia-cnd-author/references/cnd-numbers-dates.md +92 -0
  149. package/dist/opencode/.agents/skills/jahia-cnd-author/references/cnd-string-selectors.md +133 -0
  150. package/dist/opencode/.agents/skills/jahia-cnd-author/references/cnd-syntax.md +119 -0
  151. package/dist/opencode/.agents/skills/jahia-cnd-author/references/types-ts-mapping.md +73 -0
  152. package/dist/opencode/.agents/skills/jahia-dev-accessibility/SKILL.md +5 -265
  153. package/dist/opencode/.agents/skills/jahia-dev-build-component/SKILL.md +13 -8
  154. package/dist/opencode/AGENTS.md +2 -38
  155. package/dist/opencode/opencode.json +12 -0
  156. package/dist/windsurf/.windsurf/rules/jahia.md +1 -37
  157. package/dist/windsurf/.windsurf/skills/jahia-cnd-author/SKILL.md +94 -0
  158. package/dist/windsurf/.windsurf/skills/jahia-cnd-author/references/cnd-area-types.md +55 -0
  159. package/dist/windsurf/.windsurf/skills/jahia-cnd-author/references/cnd-authoring-experience.md +92 -0
  160. package/dist/windsurf/.windsurf/skills/jahia-cnd-author/references/cnd-child-nodes.md +74 -0
  161. package/dist/windsurf/.windsurf/skills/jahia-cnd-author/references/cnd-jahia-mixins.md +510 -0
  162. package/dist/windsurf/.windsurf/skills/jahia-cnd-author/references/cnd-modeling-decisions.md +87 -0
  163. package/dist/windsurf/.windsurf/skills/jahia-cnd-author/references/cnd-numbers-dates.md +92 -0
  164. package/dist/windsurf/.windsurf/skills/jahia-cnd-author/references/cnd-string-selectors.md +133 -0
  165. package/dist/windsurf/.windsurf/skills/jahia-cnd-author/references/cnd-syntax.md +119 -0
  166. package/dist/windsurf/.windsurf/skills/jahia-cnd-author/references/types-ts-mapping.md +73 -0
  167. package/dist/windsurf/.windsurf/skills/jahia-dev-accessibility/SKILL.md +5 -265
  168. package/dist/windsurf/.windsurf/skills/jahia-dev-build-component/SKILL.md +13 -8
  169. package/dist/windsurf/AGENTS.md +2 -38
  170. package/package.json +1 -1
  171. package/dist/claude/.claude/agents/cnd-jahia-mixins.md +0 -113
  172. package/dist/claude/.claude/agents/jahia-cnd-author.md +0 -130
  173. package/dist/claude/.claude/agents/jahia-dev-worker.md +0 -264
  174. package/dist/claude/.claude/agents/jahia-reviewer.md +0 -105
  175. package/dist/claude/.claude/skills/jahia/SKILL.md +0 -148
  176. package/dist/claude/.claude/skills/jahia-content/SKILL.md +0 -157
  177. package/dist/claude/.claude/skills/jahia-content-create-content/SKILL.md +0 -359
  178. package/dist/claude/.claude/skills/jahia-content-explore-structure/SKILL.md +0 -255
  179. package/dist/claude/.claude/skills/jahia-content-media-upload/SKILL.md +0 -197
  180. package/dist/claude/.claude/skills/jahia-content-move-content/SKILL.md +0 -231
  181. package/dist/claude/.claude/skills/jahia-content-organize/SKILL.md +0 -209
  182. package/dist/claude/.claude/skills/jahia-content-publish/SKILL.md +0 -181
  183. package/dist/claude/.claude/skills/jahia-content-query-content/SKILL.md +0 -174
  184. package/dist/claude/.claude/skills/jahia-content-translate-content/SKILL.md +0 -226
  185. package/dist/claude/.claude/skills/jahia-dev/SKILL.md +0 -124
  186. package/dist/claude/.claude/skills/jahia-dev-apis/SKILL.md +0 -52
  187. package/dist/claude/.claude/skills/jahia-dev-apis/references/authentication.md +0 -484
  188. package/dist/claude/.claude/skills/jahia-dev-apis/references/graphql.md +0 -657
  189. package/dist/claude/.claude/skills/jahia-dev-apis/references/jcr-api.md +0 -465
  190. package/dist/claude/.claude/skills/jahia-dev-apis/references/security.md +0 -541
  191. package/dist/claude/.claude/skills/jahia-dev-cypress/SKILL.md +0 -265
  192. package/dist/claude/.claude/skills/jahia-dev-define-content-type/SKILL.md +0 -93
  193. package/dist/claude/.claude/skills/jahia-dev-define-content-type/references/modeling-decisions.md +0 -52
  194. package/dist/claude/.claude/skills/jahia-dev-java/SKILL.md +0 -110
  195. package/dist/claude/.claude/skills/jahia-dev-java/references/backend.md +0 -331
  196. package/dist/claude/.claude/skills/jahia-dev-java/references/content-types.md +0 -273
  197. package/dist/claude/.claude/skills/jahia-dev-java/references/modules.md +0 -218
  198. package/dist/claude/.claude/skills/jahia-dev-java/references/osgi.md +0 -208
  199. package/dist/claude/.claude/skills/jahia-dev-java/references/rendering.md +0 -191
  200. package/dist/claude/.claude/skills/jahia-dev-java/references/ui-extensions.md +0 -344
  201. package/dist/claude/.claude/skills/jahia-dev-osgi-module/SKILL.md +0 -297
  202. package/dist/claude/.claude/skills/jahia-dev-ui-extension/SKILL.md +0 -559
  203. package/dist/claude/.claude/skills/jahia-java-concurrency/SKILL.md +0 -308
  204. package/dist/claude/.claude/skills/jahia-java-jcr/SKILL.md +0 -153
  205. package/dist/claude/.claude/skills/jahia-java-osgi/SKILL.md +0 -134
  206. package/dist/claude/.claude/skills/jahia-java-persistence/SKILL.md +0 -177
  207. package/dist/claude/.claude/skills/jahia-java-security/SKILL.md +0 -84
  208. package/dist/claude/.claude/skills/jahia-orchestrate/SKILL.md +0 -148
  209. package/dist/claude/.claude/skills/jahia-orchestrate/scripts/verify-pages.mjs +0 -59
  210. package/dist/claude/.claude/skills/jahia-review-java/SKILL.md +0 -131
  211. package/dist/claude/.claude/skills/jahia-review-java/references/code-review-output.md +0 -121
  212. package/dist/codex/.agents/skills/jahia/SKILL.md +0 -148
  213. package/dist/codex/.agents/skills/jahia-content/SKILL.md +0 -157
  214. package/dist/codex/.agents/skills/jahia-content-create-content/SKILL.md +0 -359
  215. package/dist/codex/.agents/skills/jahia-content-explore-structure/SKILL.md +0 -255
  216. package/dist/codex/.agents/skills/jahia-content-media-upload/SKILL.md +0 -197
  217. package/dist/codex/.agents/skills/jahia-content-move-content/SKILL.md +0 -231
  218. package/dist/codex/.agents/skills/jahia-content-organize/SKILL.md +0 -209
  219. package/dist/codex/.agents/skills/jahia-content-publish/SKILL.md +0 -181
  220. package/dist/codex/.agents/skills/jahia-content-query-content/SKILL.md +0 -174
  221. package/dist/codex/.agents/skills/jahia-content-translate-content/SKILL.md +0 -226
  222. package/dist/codex/.agents/skills/jahia-dev/SKILL.md +0 -124
  223. package/dist/codex/.agents/skills/jahia-dev-apis/SKILL.md +0 -52
  224. package/dist/codex/.agents/skills/jahia-dev-apis/references/authentication.md +0 -484
  225. package/dist/codex/.agents/skills/jahia-dev-apis/references/graphql.md +0 -657
  226. package/dist/codex/.agents/skills/jahia-dev-apis/references/jcr-api.md +0 -465
  227. package/dist/codex/.agents/skills/jahia-dev-apis/references/security.md +0 -541
  228. package/dist/codex/.agents/skills/jahia-dev-cypress/SKILL.md +0 -265
  229. package/dist/codex/.agents/skills/jahia-dev-define-content-type/SKILL.md +0 -93
  230. package/dist/codex/.agents/skills/jahia-dev-define-content-type/references/modeling-decisions.md +0 -52
  231. package/dist/codex/.agents/skills/jahia-dev-java/SKILL.md +0 -110
  232. package/dist/codex/.agents/skills/jahia-dev-java/references/backend.md +0 -331
  233. package/dist/codex/.agents/skills/jahia-dev-java/references/content-types.md +0 -273
  234. package/dist/codex/.agents/skills/jahia-dev-java/references/modules.md +0 -218
  235. package/dist/codex/.agents/skills/jahia-dev-java/references/osgi.md +0 -208
  236. package/dist/codex/.agents/skills/jahia-dev-java/references/rendering.md +0 -191
  237. package/dist/codex/.agents/skills/jahia-dev-java/references/ui-extensions.md +0 -344
  238. package/dist/codex/.agents/skills/jahia-dev-osgi-module/SKILL.md +0 -297
  239. package/dist/codex/.agents/skills/jahia-dev-ui-extension/SKILL.md +0 -559
  240. package/dist/codex/.agents/skills/jahia-java-concurrency/SKILL.md +0 -308
  241. package/dist/codex/.agents/skills/jahia-java-jcr/SKILL.md +0 -153
  242. package/dist/codex/.agents/skills/jahia-java-osgi/SKILL.md +0 -134
  243. package/dist/codex/.agents/skills/jahia-java-persistence/SKILL.md +0 -177
  244. package/dist/codex/.agents/skills/jahia-java-security/SKILL.md +0 -84
  245. package/dist/codex/.agents/skills/jahia-orchestrate/SKILL.md +0 -148
  246. package/dist/codex/.agents/skills/jahia-orchestrate/scripts/verify-pages.mjs +0 -59
  247. package/dist/codex/.agents/skills/jahia-review-java/SKILL.md +0 -131
  248. package/dist/codex/.agents/skills/jahia-review-java/references/code-review-output.md +0 -121
  249. package/dist/codex/.codex/agents/cnd-child-nodes.toml +0 -3
  250. package/dist/codex/.codex/agents/cnd-jahia-mixins.toml +0 -3
  251. package/dist/codex/.codex/agents/cnd-numbers-dates.toml +0 -3
  252. package/dist/codex/.codex/agents/cnd-string-selectors.toml +0 -3
  253. package/dist/codex/.codex/agents/jahia-cnd-author.toml +0 -3
  254. package/dist/codex/.codex/agents/jahia-dev-worker.toml +0 -3
  255. package/dist/codex/.codex/agents/jahia-reviewer.toml +0 -3
  256. package/dist/copilot/.agents/skills/jahia/SKILL.md +0 -148
  257. package/dist/copilot/.agents/skills/jahia-content/SKILL.md +0 -157
  258. package/dist/copilot/.agents/skills/jahia-content-create-content/SKILL.md +0 -359
  259. package/dist/copilot/.agents/skills/jahia-content-explore-structure/SKILL.md +0 -255
  260. package/dist/copilot/.agents/skills/jahia-content-media-upload/SKILL.md +0 -197
  261. package/dist/copilot/.agents/skills/jahia-content-move-content/SKILL.md +0 -231
  262. package/dist/copilot/.agents/skills/jahia-content-organize/SKILL.md +0 -209
  263. package/dist/copilot/.agents/skills/jahia-content-publish/SKILL.md +0 -181
  264. package/dist/copilot/.agents/skills/jahia-content-query-content/SKILL.md +0 -174
  265. package/dist/copilot/.agents/skills/jahia-content-translate-content/SKILL.md +0 -226
  266. package/dist/copilot/.agents/skills/jahia-dev/SKILL.md +0 -124
  267. package/dist/copilot/.agents/skills/jahia-dev-apis/SKILL.md +0 -52
  268. package/dist/copilot/.agents/skills/jahia-dev-apis/references/authentication.md +0 -484
  269. package/dist/copilot/.agents/skills/jahia-dev-apis/references/graphql.md +0 -657
  270. package/dist/copilot/.agents/skills/jahia-dev-apis/references/jcr-api.md +0 -465
  271. package/dist/copilot/.agents/skills/jahia-dev-apis/references/security.md +0 -541
  272. package/dist/copilot/.agents/skills/jahia-dev-cypress/SKILL.md +0 -265
  273. package/dist/copilot/.agents/skills/jahia-dev-define-content-type/SKILL.md +0 -93
  274. package/dist/copilot/.agents/skills/jahia-dev-define-content-type/references/modeling-decisions.md +0 -52
  275. package/dist/copilot/.agents/skills/jahia-dev-java/SKILL.md +0 -110
  276. package/dist/copilot/.agents/skills/jahia-dev-java/references/backend.md +0 -331
  277. package/dist/copilot/.agents/skills/jahia-dev-java/references/content-types.md +0 -273
  278. package/dist/copilot/.agents/skills/jahia-dev-java/references/modules.md +0 -218
  279. package/dist/copilot/.agents/skills/jahia-dev-java/references/osgi.md +0 -208
  280. package/dist/copilot/.agents/skills/jahia-dev-java/references/rendering.md +0 -191
  281. package/dist/copilot/.agents/skills/jahia-dev-java/references/ui-extensions.md +0 -344
  282. package/dist/copilot/.agents/skills/jahia-dev-osgi-module/SKILL.md +0 -297
  283. package/dist/copilot/.agents/skills/jahia-dev-ui-extension/SKILL.md +0 -559
  284. package/dist/copilot/.agents/skills/jahia-java-concurrency/SKILL.md +0 -308
  285. package/dist/copilot/.agents/skills/jahia-java-jcr/SKILL.md +0 -153
  286. package/dist/copilot/.agents/skills/jahia-java-osgi/SKILL.md +0 -134
  287. package/dist/copilot/.agents/skills/jahia-java-persistence/SKILL.md +0 -177
  288. package/dist/copilot/.agents/skills/jahia-java-security/SKILL.md +0 -84
  289. package/dist/copilot/.agents/skills/jahia-orchestrate/SKILL.md +0 -148
  290. package/dist/copilot/.agents/skills/jahia-orchestrate/scripts/verify-pages.mjs +0 -59
  291. package/dist/copilot/.agents/skills/jahia-review-java/SKILL.md +0 -131
  292. package/dist/copilot/.agents/skills/jahia-review-java/references/code-review-output.md +0 -121
  293. package/dist/cursor/.agents/skills/jahia/SKILL.md +0 -148
  294. package/dist/cursor/.agents/skills/jahia-content/SKILL.md +0 -157
  295. package/dist/cursor/.agents/skills/jahia-content-create-content/SKILL.md +0 -359
  296. package/dist/cursor/.agents/skills/jahia-content-explore-structure/SKILL.md +0 -255
  297. package/dist/cursor/.agents/skills/jahia-content-media-upload/SKILL.md +0 -197
  298. package/dist/cursor/.agents/skills/jahia-content-move-content/SKILL.md +0 -231
  299. package/dist/cursor/.agents/skills/jahia-content-organize/SKILL.md +0 -209
  300. package/dist/cursor/.agents/skills/jahia-content-publish/SKILL.md +0 -181
  301. package/dist/cursor/.agents/skills/jahia-content-query-content/SKILL.md +0 -174
  302. package/dist/cursor/.agents/skills/jahia-content-translate-content/SKILL.md +0 -226
  303. package/dist/cursor/.agents/skills/jahia-dev/SKILL.md +0 -124
  304. package/dist/cursor/.agents/skills/jahia-dev-apis/SKILL.md +0 -52
  305. package/dist/cursor/.agents/skills/jahia-dev-apis/references/authentication.md +0 -484
  306. package/dist/cursor/.agents/skills/jahia-dev-apis/references/graphql.md +0 -657
  307. package/dist/cursor/.agents/skills/jahia-dev-apis/references/jcr-api.md +0 -465
  308. package/dist/cursor/.agents/skills/jahia-dev-apis/references/security.md +0 -541
  309. package/dist/cursor/.agents/skills/jahia-dev-cypress/SKILL.md +0 -265
  310. package/dist/cursor/.agents/skills/jahia-dev-define-content-type/SKILL.md +0 -93
  311. package/dist/cursor/.agents/skills/jahia-dev-define-content-type/references/modeling-decisions.md +0 -52
  312. package/dist/cursor/.agents/skills/jahia-dev-java/SKILL.md +0 -110
  313. package/dist/cursor/.agents/skills/jahia-dev-java/references/backend.md +0 -331
  314. package/dist/cursor/.agents/skills/jahia-dev-java/references/content-types.md +0 -273
  315. package/dist/cursor/.agents/skills/jahia-dev-java/references/modules.md +0 -218
  316. package/dist/cursor/.agents/skills/jahia-dev-java/references/osgi.md +0 -208
  317. package/dist/cursor/.agents/skills/jahia-dev-java/references/rendering.md +0 -191
  318. package/dist/cursor/.agents/skills/jahia-dev-java/references/ui-extensions.md +0 -344
  319. package/dist/cursor/.agents/skills/jahia-dev-osgi-module/SKILL.md +0 -297
  320. package/dist/cursor/.agents/skills/jahia-dev-ui-extension/SKILL.md +0 -559
  321. package/dist/cursor/.agents/skills/jahia-java-concurrency/SKILL.md +0 -308
  322. package/dist/cursor/.agents/skills/jahia-java-jcr/SKILL.md +0 -153
  323. package/dist/cursor/.agents/skills/jahia-java-osgi/SKILL.md +0 -134
  324. package/dist/cursor/.agents/skills/jahia-java-persistence/SKILL.md +0 -177
  325. package/dist/cursor/.agents/skills/jahia-java-security/SKILL.md +0 -84
  326. package/dist/cursor/.agents/skills/jahia-orchestrate/SKILL.md +0 -148
  327. package/dist/cursor/.agents/skills/jahia-orchestrate/scripts/verify-pages.mjs +0 -59
  328. package/dist/cursor/.agents/skills/jahia-review-java/SKILL.md +0 -131
  329. package/dist/cursor/.agents/skills/jahia-review-java/references/code-review-output.md +0 -121
  330. package/dist/cursor/.cursor/agents/cnd-jahia-mixins.md +0 -113
  331. package/dist/cursor/.cursor/agents/jahia-cnd-author.md +0 -130
  332. package/dist/cursor/.cursor/agents/jahia-dev-worker.md +0 -264
  333. package/dist/cursor/.cursor/agents/jahia-reviewer.md +0 -105
  334. package/dist/gemini/.agents/skills/jahia/SKILL.md +0 -148
  335. package/dist/gemini/.agents/skills/jahia-content/SKILL.md +0 -157
  336. package/dist/gemini/.agents/skills/jahia-content-create-content/SKILL.md +0 -359
  337. package/dist/gemini/.agents/skills/jahia-content-explore-structure/SKILL.md +0 -255
  338. package/dist/gemini/.agents/skills/jahia-content-media-upload/SKILL.md +0 -197
  339. package/dist/gemini/.agents/skills/jahia-content-move-content/SKILL.md +0 -231
  340. package/dist/gemini/.agents/skills/jahia-content-organize/SKILL.md +0 -209
  341. package/dist/gemini/.agents/skills/jahia-content-publish/SKILL.md +0 -181
  342. package/dist/gemini/.agents/skills/jahia-content-query-content/SKILL.md +0 -174
  343. package/dist/gemini/.agents/skills/jahia-content-translate-content/SKILL.md +0 -226
  344. package/dist/gemini/.agents/skills/jahia-dev/SKILL.md +0 -124
  345. package/dist/gemini/.agents/skills/jahia-dev-apis/SKILL.md +0 -52
  346. package/dist/gemini/.agents/skills/jahia-dev-apis/references/authentication.md +0 -484
  347. package/dist/gemini/.agents/skills/jahia-dev-apis/references/graphql.md +0 -657
  348. package/dist/gemini/.agents/skills/jahia-dev-apis/references/jcr-api.md +0 -465
  349. package/dist/gemini/.agents/skills/jahia-dev-apis/references/security.md +0 -541
  350. package/dist/gemini/.agents/skills/jahia-dev-cypress/SKILL.md +0 -265
  351. package/dist/gemini/.agents/skills/jahia-dev-define-content-type/SKILL.md +0 -93
  352. package/dist/gemini/.agents/skills/jahia-dev-define-content-type/references/modeling-decisions.md +0 -52
  353. package/dist/gemini/.agents/skills/jahia-dev-java/SKILL.md +0 -110
  354. package/dist/gemini/.agents/skills/jahia-dev-java/references/backend.md +0 -331
  355. package/dist/gemini/.agents/skills/jahia-dev-java/references/content-types.md +0 -273
  356. package/dist/gemini/.agents/skills/jahia-dev-java/references/modules.md +0 -218
  357. package/dist/gemini/.agents/skills/jahia-dev-java/references/osgi.md +0 -208
  358. package/dist/gemini/.agents/skills/jahia-dev-java/references/rendering.md +0 -191
  359. package/dist/gemini/.agents/skills/jahia-dev-java/references/ui-extensions.md +0 -344
  360. package/dist/gemini/.agents/skills/jahia-dev-osgi-module/SKILL.md +0 -297
  361. package/dist/gemini/.agents/skills/jahia-dev-ui-extension/SKILL.md +0 -559
  362. package/dist/gemini/.agents/skills/jahia-java-concurrency/SKILL.md +0 -308
  363. package/dist/gemini/.agents/skills/jahia-java-jcr/SKILL.md +0 -153
  364. package/dist/gemini/.agents/skills/jahia-java-osgi/SKILL.md +0 -134
  365. package/dist/gemini/.agents/skills/jahia-java-persistence/SKILL.md +0 -177
  366. package/dist/gemini/.agents/skills/jahia-java-security/SKILL.md +0 -84
  367. package/dist/gemini/.agents/skills/jahia-orchestrate/SKILL.md +0 -148
  368. package/dist/gemini/.agents/skills/jahia-orchestrate/scripts/verify-pages.mjs +0 -59
  369. package/dist/gemini/.agents/skills/jahia-review-java/SKILL.md +0 -131
  370. package/dist/gemini/.agents/skills/jahia-review-java/references/code-review-output.md +0 -121
  371. package/dist/opencode/.agents/skills/jahia/SKILL.md +0 -148
  372. package/dist/opencode/.agents/skills/jahia-content/SKILL.md +0 -157
  373. package/dist/opencode/.agents/skills/jahia-content-create-content/SKILL.md +0 -359
  374. package/dist/opencode/.agents/skills/jahia-content-explore-structure/SKILL.md +0 -255
  375. package/dist/opencode/.agents/skills/jahia-content-media-upload/SKILL.md +0 -197
  376. package/dist/opencode/.agents/skills/jahia-content-move-content/SKILL.md +0 -231
  377. package/dist/opencode/.agents/skills/jahia-content-organize/SKILL.md +0 -209
  378. package/dist/opencode/.agents/skills/jahia-content-publish/SKILL.md +0 -181
  379. package/dist/opencode/.agents/skills/jahia-content-query-content/SKILL.md +0 -174
  380. package/dist/opencode/.agents/skills/jahia-content-translate-content/SKILL.md +0 -226
  381. package/dist/opencode/.agents/skills/jahia-dev/SKILL.md +0 -124
  382. package/dist/opencode/.agents/skills/jahia-dev-apis/SKILL.md +0 -52
  383. package/dist/opencode/.agents/skills/jahia-dev-apis/references/authentication.md +0 -484
  384. package/dist/opencode/.agents/skills/jahia-dev-apis/references/graphql.md +0 -657
  385. package/dist/opencode/.agents/skills/jahia-dev-apis/references/jcr-api.md +0 -465
  386. package/dist/opencode/.agents/skills/jahia-dev-apis/references/security.md +0 -541
  387. package/dist/opencode/.agents/skills/jahia-dev-cypress/SKILL.md +0 -265
  388. package/dist/opencode/.agents/skills/jahia-dev-define-content-type/SKILL.md +0 -93
  389. package/dist/opencode/.agents/skills/jahia-dev-define-content-type/references/modeling-decisions.md +0 -52
  390. package/dist/opencode/.agents/skills/jahia-dev-java/SKILL.md +0 -110
  391. package/dist/opencode/.agents/skills/jahia-dev-java/references/backend.md +0 -331
  392. package/dist/opencode/.agents/skills/jahia-dev-java/references/content-types.md +0 -273
  393. package/dist/opencode/.agents/skills/jahia-dev-java/references/modules.md +0 -218
  394. package/dist/opencode/.agents/skills/jahia-dev-java/references/osgi.md +0 -208
  395. package/dist/opencode/.agents/skills/jahia-dev-java/references/rendering.md +0 -191
  396. package/dist/opencode/.agents/skills/jahia-dev-java/references/ui-extensions.md +0 -344
  397. package/dist/opencode/.agents/skills/jahia-dev-osgi-module/SKILL.md +0 -297
  398. package/dist/opencode/.agents/skills/jahia-dev-ui-extension/SKILL.md +0 -559
  399. package/dist/opencode/.agents/skills/jahia-java-concurrency/SKILL.md +0 -308
  400. package/dist/opencode/.agents/skills/jahia-java-jcr/SKILL.md +0 -153
  401. package/dist/opencode/.agents/skills/jahia-java-osgi/SKILL.md +0 -134
  402. package/dist/opencode/.agents/skills/jahia-java-persistence/SKILL.md +0 -177
  403. package/dist/opencode/.agents/skills/jahia-java-security/SKILL.md +0 -84
  404. package/dist/opencode/.agents/skills/jahia-orchestrate/SKILL.md +0 -148
  405. package/dist/opencode/.agents/skills/jahia-orchestrate/scripts/verify-pages.mjs +0 -59
  406. package/dist/opencode/.agents/skills/jahia-review-java/SKILL.md +0 -131
  407. package/dist/opencode/.agents/skills/jahia-review-java/references/code-review-output.md +0 -121
  408. package/dist/opencode/.opencode/agents/cnd-jahia-mixins.md +0 -113
  409. package/dist/opencode/.opencode/agents/jahia-cnd-author.md +0 -130
  410. package/dist/opencode/.opencode/agents/jahia-dev-worker.md +0 -264
  411. package/dist/opencode/.opencode/agents/jahia-reviewer.md +0 -105
  412. package/dist/windsurf/.windsurf/skills/jahia/SKILL.md +0 -148
  413. package/dist/windsurf/.windsurf/skills/jahia-content/SKILL.md +0 -157
  414. package/dist/windsurf/.windsurf/skills/jahia-content-create-content/SKILL.md +0 -359
  415. package/dist/windsurf/.windsurf/skills/jahia-content-explore-structure/SKILL.md +0 -255
  416. package/dist/windsurf/.windsurf/skills/jahia-content-media-upload/SKILL.md +0 -197
  417. package/dist/windsurf/.windsurf/skills/jahia-content-move-content/SKILL.md +0 -231
  418. package/dist/windsurf/.windsurf/skills/jahia-content-organize/SKILL.md +0 -209
  419. package/dist/windsurf/.windsurf/skills/jahia-content-publish/SKILL.md +0 -181
  420. package/dist/windsurf/.windsurf/skills/jahia-content-query-content/SKILL.md +0 -174
  421. package/dist/windsurf/.windsurf/skills/jahia-content-translate-content/SKILL.md +0 -226
  422. package/dist/windsurf/.windsurf/skills/jahia-dev/SKILL.md +0 -124
  423. package/dist/windsurf/.windsurf/skills/jahia-dev-apis/SKILL.md +0 -52
  424. package/dist/windsurf/.windsurf/skills/jahia-dev-apis/references/authentication.md +0 -484
  425. package/dist/windsurf/.windsurf/skills/jahia-dev-apis/references/graphql.md +0 -657
  426. package/dist/windsurf/.windsurf/skills/jahia-dev-apis/references/jcr-api.md +0 -465
  427. package/dist/windsurf/.windsurf/skills/jahia-dev-apis/references/security.md +0 -541
  428. package/dist/windsurf/.windsurf/skills/jahia-dev-cypress/SKILL.md +0 -265
  429. package/dist/windsurf/.windsurf/skills/jahia-dev-define-content-type/SKILL.md +0 -93
  430. package/dist/windsurf/.windsurf/skills/jahia-dev-define-content-type/references/modeling-decisions.md +0 -52
  431. package/dist/windsurf/.windsurf/skills/jahia-dev-java/SKILL.md +0 -110
  432. package/dist/windsurf/.windsurf/skills/jahia-dev-java/references/backend.md +0 -331
  433. package/dist/windsurf/.windsurf/skills/jahia-dev-java/references/content-types.md +0 -273
  434. package/dist/windsurf/.windsurf/skills/jahia-dev-java/references/modules.md +0 -218
  435. package/dist/windsurf/.windsurf/skills/jahia-dev-java/references/osgi.md +0 -208
  436. package/dist/windsurf/.windsurf/skills/jahia-dev-java/references/rendering.md +0 -191
  437. package/dist/windsurf/.windsurf/skills/jahia-dev-java/references/ui-extensions.md +0 -344
  438. package/dist/windsurf/.windsurf/skills/jahia-dev-osgi-module/SKILL.md +0 -297
  439. package/dist/windsurf/.windsurf/skills/jahia-dev-ui-extension/SKILL.md +0 -559
  440. package/dist/windsurf/.windsurf/skills/jahia-java-concurrency/SKILL.md +0 -308
  441. package/dist/windsurf/.windsurf/skills/jahia-java-jcr/SKILL.md +0 -153
  442. package/dist/windsurf/.windsurf/skills/jahia-java-osgi/SKILL.md +0 -134
  443. package/dist/windsurf/.windsurf/skills/jahia-java-persistence/SKILL.md +0 -177
  444. package/dist/windsurf/.windsurf/skills/jahia-java-security/SKILL.md +0 -84
  445. package/dist/windsurf/.windsurf/skills/jahia-orchestrate/SKILL.md +0 -148
  446. package/dist/windsurf/.windsurf/skills/jahia-orchestrate/scripts/verify-pages.mjs +0 -59
  447. package/dist/windsurf/.windsurf/skills/jahia-review-java/SKILL.md +0 -131
  448. package/dist/windsurf/.windsurf/skills/jahia-review-java/references/code-review-output.md +0 -121
  449. /package/dist/{claude/.claude/agents → antigravity/.agents/skills/jahia-cnd-author/references}/cnd-child-nodes.md +0 -0
  450. /package/dist/{cursor/.cursor/agents → claude/.claude/skills/jahia-cnd-author/references}/cnd-child-nodes.md +0 -0
  451. /package/dist/{opencode/.opencode/agents → codex/.agents/skills/jahia-cnd-author/references}/cnd-child-nodes.md +0 -0
@@ -0,0 +1,228 @@
1
+ ---
2
+ name: jahia-dev-review
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
+ allowed-tools: Bash, Read
5
+ ---
6
+
7
+ # Skill: jahia-dev-review
8
+
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
+
11
+ ---
12
+
13
+ ## Step 1 — Locate the module
14
+
15
+ Find the module root: look for `package.json` with `@jahia/javascript-modules-library`. Determine the `src/` directory.
16
+
17
+ ```bash
18
+ find . -name "package.json" -not -path "*/node_modules/*" | xargs grep -l "javascript-modules-library" 2>/dev/null | head -1
19
+ ```
20
+
21
+ ---
22
+
23
+ ## Step 2 — Collect files to review
24
+
25
+ ```bash
26
+ find src/ -name "definition.cnd" | sort
27
+ find src/ -name "*.server.tsx" | sort
28
+ find src/ -name "*.client.tsx" | sort
29
+ find src/ -name "types.ts" | sort
30
+ find src/templates/ -name "*.server.tsx" | sort
31
+ cat settings/definitions.cnd
32
+ ```
33
+
34
+ Read ALL collected files before starting the review.
35
+
36
+ ---
37
+
38
+ ## Step 3 — Run checks in order of severity
39
+
40
+ ### 🔴 CRITICAL — Will cause broken editor UX, broken pages, or security issues
41
+
42
+ **C1 — `jmix:droppableContent` used directly**
43
+ Check: any CND type (not mixin declarations in settings/definitions.cnd) extending `jmix:droppableContent` directly.
44
+ Fix: extend the module's custom component mixin (e.g. `namespacemix:component`) instead.
45
+
46
+ **C2 — `fullPage` view uses `componentType: "template"`**
47
+ Check: any `name: "fullPage"` view that also has `componentType: "template"`.
48
+ Fix: change to `componentType: "view"`. The `src/templates/MainResource/default.server.tsx` template already routes `jmix:mainResource` nodes to the `fullPage` view.
49
+
50
+ **C3 — `j:linknode` or `j:url` explicitly declared in CND**
51
+ Check: any CND type that explicitly declares `j:linknode` or `j:url` fields alongside `choicelist[linkTypeInitializer]`.
52
+ Fix: remove those two fields from the CND. They are injected automatically by Jahia's mixins at runtime. Only declare `- j:linkType (string, choicelist[linkTypeInitializer])`. The fields remain available in `types.ts` and in the view.
53
+
54
+ **C4 — `j:linkType` used as a URL in a view**
55
+ Check: any `.server.tsx` or `.client.tsx` file that uses `props["j:linkType"]` or `j:linkType` directly as an `href`.
56
+ Fix: use a `switch (props["j:linkType"])` with `buildNodeUrl(props["j:linknode"])` for internal and `props["j:url"]` for external.
57
+
58
+ **C5 — Weakreference node properties read directly in a view (cache issue)**
59
+ Check: views that access `.getPropertyAsString()`, `.getProperty(...)`, or property destructuring from a weakreference prop (other than `buildNodeUrl`).
60
+ Fix: render the referenced node via `<Render node={refNode} view="..." />` to get proper cache invalidation.
61
+
62
+ **C6 — Client component imports server-only APIs**
63
+ Check: any `.client.tsx` file that imports from `@jahia/javascript-modules-library` (except `Island` which is re-exported).
64
+ Fix: move server-side logic to the `.server.tsx` wrapper and pass results as serializable props to the Island.
65
+
66
+ **C7 — Cache explicitly disabled (`cache.expiration="0"`)**
67
+ Check: any `jahiaComponent` call with `properties: { "cache.expiration": "0" }`.
68
+ Fix: never set expiration to 0. If truly fresh data is needed, use a small value like `"5"` (5 seconds) to still protect under load.
69
+
70
+ **C8 — Generic area type used for every Area**
71
+ Check: page templates where every `<Area>` uses the same generic area type (e.g. `nodeType="namespace:pageArea"` everywhere). This means editors see ALL `pageComponent` types as droppable options in every area — a hero section will appear as an option in a feature card grid.
72
+ Fix: create **one typed area node per section** in `settings/definitions.cnd`, each with a tight child constraint:
73
+ ```cnd
74
+ [namespace:heroArea] > jnt:content, jmix:list, jmix:hiddenType orderable
75
+ + * (namespace:heroSection)
76
+
77
+ [namespace:featuresArea] > jnt:content, jmix:list, jmix:hiddenType orderable
78
+ + * (namespace:featureCard)
79
+ ```
80
+ Only use a generic `pageArea` for flexible areas (e.g. footer) where any component is valid.
81
+
82
+ ---
83
+
84
+ ### 🟡 WARNING — Will likely cause editor confusion, stale content, or runtime errors
85
+
86
+ **W1 — User-facing string fields without `i18n`**
87
+ Check: CND string/textarea/richtext properties that don't have `i18n` (exclude system properties like `j:linkType`, `j:url`, non-user-facing fields).
88
+ Fix: add `i18n` to all user-visible text properties.
89
+
90
+ **W2 — `jmix:mainResource` on non-content types**
91
+ Check: CND types that have `jmix:mainResource` but no richtext body or no obvious "detail page" use case (e.g. a visual composition type like a card or hero).
92
+ Fix: only use `jmix:mainResource` for content that genuinely needs both a listing card AND a full-page detail view.
93
+
94
+ **W3 — Structural container types missing `jmix:hiddenType`**
95
+ Check: CND types that have no `namespacemix:component` mixin (so they can't be dropped as components) but also don't have `jmix:hiddenType` — editors would never see them but they don't show up with a clear "hidden" intent.
96
+ Fix: add `jmix:hiddenType` to structural/container types. Do NOT use `jmix:studioOnly` — it can interfere with area rendering.
97
+
98
+ **W4 — Props not typed as optional (`?:`) / not guarded in views**
99
+ Check: (a) `types.ts` props typed as required (`title: string`) — all props must use `?:` because Jahia does not guarantee values are present at render time. (b) Views that use props without null/undefined guards, especially `buildNodeUrl(prop)` — passing `undefined` throws `"Expected a node in buildNodeUrl, received undefined"`.
100
+ Fix: use `?:` for all props in `types.ts`. Add conditional rendering (`{prop && <span>{prop}</span>}`) and guard node URLs (`prop ? { backgroundImage: \`url(${buildNodeUrl(prop)})\` } : undefined`).
101
+
102
+ **W5 — `weakreference multiple` not null-filtered before `.map()`**
103
+ Check: views mapping over a `weakreference multiple` prop without `.filter(x => x !== null)`.
104
+ Fix: `items?.filter(item => item !== null).map(...)`.
105
+
106
+ **W6 — Cache not configured for views using external/dynamic data**
107
+ Check: views that call external functions, use `Date.now()`, or fetch data, without `properties: { "cache.expiration": "..." }`.
108
+ Fix: add `cache.expiration` to the `jahiaComponent` properties.
109
+
110
+ **W7 — Missing `import.xml` or no homepage defined**
111
+ Check: look for `import.xml` at the module root. If absent or if it doesn't contain `j:isHomePage="true"`, editors won't have a default homepage.
112
+ Fix: add an `import.xml` with a homepage node (`j:isHomePage="true"`). Also add "Offline pages/Models", "Offline pages/Drafts", "Offline pages/Archive" folders with `jmix:systemNameReadonly` and `jmix:nolive` mixins. Add content folders with `jmix:contributeMode` restrictions where appropriate.
113
+
114
+ **W8 — Node type extends something other than `jnt:content`**
115
+ Check: CND types that extend anything other than `jnt:content`, `jnt:page`, `jmix:*`, or standard Jahia base types.
116
+ Fix: extend only `jnt:content` (or `jnt:page` for page types). To add fields to a type you don't control, use a mixin with `extends=<targetType>`. Unusual inheritance chains break edition interfaces in unpredictable ways.
117
+
118
+ **W9 — Hardcoded link URLs in views**
119
+ Check: any `.server.tsx`, `.client.tsx`, or template file containing a literal `href="http`, `href="/"`, or `href="/en/` (except in edit-mode chrome helpers). Also flag plain string `src="http` for non-bundled assets. Also flag any content data with `j:linkType: "external"` pointing to a path that looks like an internal Jahia URL (e.g. `/sites/`, `/cms/`, `/en/`).
120
+ Fix: **All navigable URLs must come from contributed content.** Use `j:linkType`/`j:linknode`/`j:url` props for editorial links, `buildNodeUrl(node)` for JCR node links.
121
+ 🚫 **NEVER use `j:linkType: "external"` to link to an internal Jahia page** — use `"internal"` + `j:linknode`. An external URL pointing internally breaks on environment changes, language switches, live/preview workspace toggling, and vanity URL rewrites. If no target page exists yet, omit the link; do not substitute an external workaround.
122
+
123
+ ---
124
+
125
+ ### 🔵 SUGGESTION — Quality improvements
126
+
127
+ **S1 — Non-semantic HTML**
128
+ Check: views that use `<div>` where `<article>`, `<section>`, `<nav>`, `<header>`, or `<footer>` would be more appropriate.
129
+ Fix: use semantic HTML for better accessibility and SEO.
130
+
131
+ **S2 — Images without meaningful alt text**
132
+ Check: `<img>` tags with `alt=""` or no `alt` attribute (unless there's a comment saying it's decorative).
133
+ Fix: add descriptive alt text. Decorative images should have `alt=""` with a comment.
134
+
135
+ **S3 — Accessibility violations (axe-core audit)**
136
+ Check: run `/jahia-dev-accessibility` against all live pages. A clean module has zero `critical` or `serious` violations.
137
+ Common issues in Jahia modules:
138
+ - `color-contrast`: hardcoded colours with insufficient contrast ratio — check with https://webaim.org/resources/contrastchecker/
139
+ - `image-alt`: `<img>` missing a meaningful `alt` prop sourced from CND
140
+ - `button-name`: icon-only `<button>` or `<a>` without `aria-label`
141
+ - `landmark-one-main`: page template missing a `<main>` wrapper
142
+ - `page-has-heading-one`: no `<h1>` rendered on any page
143
+ - `heading-order`: skipped heading levels between components (e.g. h1 → h3)
144
+ - `html-has-lang`: template not setting `lang` via `useServerContext().currentLanguage`
145
+ - `focus-visible` suppressed: global `* { outline: none }` in CSS kills keyboard navigation
146
+
147
+ Fix: identify each violating component by matching the axe target selector to a `.server.tsx` file, apply the fix, rebuild, and re-run the audit.
148
+
149
+ **S4 — Types using `any`**
150
+ Check: `types.ts` files or view files using TypeScript `any`.
151
+ Fix: use `JCRNodeWrapper` for node references, `string` / `number` / `boolean` for primitives.
152
+
153
+ **S5 — Bare `<Area>` without a `nodeType`**
154
+ Check: page templates using `<Area name="..." />` without a `nodeType` prop.
155
+ Fix: create a custom area type with `jmix:list`, `jmix:hiddenType`, and `orderable`, and reference it with `nodeType="namespace:areaType"`.
156
+
157
+ **S6 — `mix:title` inherited but `jcr:title` not in `types.ts`**
158
+ Check: CND types that extend `mix:title` but whose `types.ts` doesn't include `"jcr:title": string`.
159
+ Fix: add `"jcr:title"?: string` to the Props type.
160
+
161
+ **S7 — Missing `.properties` file entries or icon for new content types**
162
+ Check: for each node type found in `definition.cnd` files, verify that `settings/resources/<module>.properties` has a label (`cndNamespace_typeName=...`) and a corresponding icon exists at `settings/content-types-icons/<cndNamespace>_<typeName>.png`. The prefix must be the CND namespace (e.g. `ns_heroSection.png`), **not** the module name with hyphens (e.g. `my-module_heroSection.png` is wrong — the archetype generates wrong names that must be manually corrected).
163
+ Fix: add labels (and optionally `ui.tooltip` for fields) to the properties files. Rename any icons that use the module name with hyphens to use the CND namespace. Create a 32×32 PNG icon (free source: [flaticon.com](https://www.flaticon.com/)). Without these, editors see raw technical names and blank icon squares in the content picker.
164
+
165
+ **S8 — Hardcoded user-visible strings in views**
166
+ Check: `.server.tsx` / `.client.tsx` files with JSX string literals that are not coming from props or i18n functions (e.g. `<p>Learn more</p>`, `<button>Submit</button>`).
167
+ Fix: move UI labels to `settings/locales/en.json` and `fr.json` and resolve them with `useTranslation()`. Hardcoded strings break multilingual sites.
168
+
169
+ **S9 — Content list queries not using `ISDESCENDANTNODE` (non-recursive)**
170
+ Check: JCR-SQL2 queries using `jcr:path LIKE '/sites/.../content/%'` or a fixed path to limit results, instead of `ISDESCENDANTNODE(node, '/sites/.../content')`.
171
+ Fix: use `ISDESCENDANTNODE` to ensure queries work correctly even if editors reorganize content into sub-folders.
172
+
173
+ **S10 — No escape hatch when using a custom component mixin**
174
+ Check: a custom section type that restricts children to a custom mixin (e.g. `+ * (namespacemix:component)`) but the module provides no "content stack" escape hatch type that itself accepts `jmix:droppableContent`.
175
+ Fix: add a `namespace:contentStack > jnt:content, namespacemix:component + * (jmix:droppableContent)` type so power editors can still add arbitrary content when needed.
176
+
177
+ **S11 — Scaffold/boilerplate components still present**
178
+ Check: components under `src/components/Hello/` (or any other archetype-generated boilerplate) that are no longer referenced in `settings/import.xml` and no longer used by any view or page template.
179
+ ```bash
180
+ # Check if Hello components are still referenced anywhere
181
+ grep -r "helloWorld\|helloCard\|Hello/" src/templates/ settings/ --include="*.tsx" --include="*.xml" --include="*.cnd"
182
+ ```
183
+ Fix: once `import.xml` no longer provisions Hello World content and no template uses them, delete the entire `src/components/Hello/` directory, remove their entries from `.properties` files, and delete their icons from `settings/content-types-icons/`. Keeping dead components inflates the content picker and confuses editors.
184
+
185
+ ---
186
+
187
+ ## Step 4 — Report results
188
+
189
+ Format the output as:
190
+
191
+ ```
192
+ ## Jahia Module Review — <module name>
193
+
194
+ ### 🔴 Critical (N issues)
195
+ [C1] src/components/Hero/Section/definition.cnd — `jmix:droppableContent` used directly
196
+ Fix: extend `namespacemix:component` instead
197
+
198
+ ### 🟡 Warnings (N issues)
199
+ ...
200
+
201
+ ### 🔵 Suggestions (N issues)
202
+ ...
203
+
204
+ ### ✅ Summary
205
+ - N critical issues (must fix before shipping)
206
+ - N warnings (fix before sharing with editors)
207
+ - N suggestions (improve when time allows)
208
+ ```
209
+
210
+ If no issues found in a category, print `✅ None`.
211
+
212
+ ---
213
+
214
+ ## Step 5 — Ask to fix
215
+
216
+ After the report, ask: **"Would you like me to fix any of these issues?"**
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.
219
+
220
+ ---
221
+
222
+ ## References
223
+
224
+ - Native Jahia mixins & node types: https://github.com/Jahia/jahia/tree/master/war/src/main/webapp/WEB-INF/etc/repository/nodetypes
225
+ - Integration best practices: https://github.com/Jahia/gautier-braindump/blob/main/articles/integration-best-practices/README.md
226
+ - Developer training: https://github.com/Jahia/developer-training/blob/main/js-training/slides.md
227
+
228
+ > If a check result is uncertain (e.g. "does this mixin exist?"), fetch the nodetypes directory above before reporting.
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: jahia-dev-review-cnd
3
+ description: Use after writing any CND file to validate it against Jahia best practices. Runs the deterministic cnd-checker script and reports PASS / FAIL with file:line citations and fixes. Run /jahia-dev-review-cnd <path> to check a specific file or directory, or without arguments to check all CND files in the current module.
4
+ allowed-tools: Bash
5
+ ---
6
+
7
+ ## Step 1 — Run the checker
8
+
9
+ ```bash
10
+ CND_SCRIPT=$(find .claude .agents -name "check-cnd.mjs" 2>/dev/null | head -1)
11
+ node "$CND_SCRIPT" <path-to-file-or-directory>
12
+ # or, to check all CND files in the module:
13
+ node "$CND_SCRIPT" src/
14
+ ```
15
+
16
+ The script exits with code 0 for PASS and code 1 for FAIL.
17
+
18
+ ## Step 2 — Fix and repeat until clean
19
+
20
+ This is a loop. Run the checker, fix every issue reported, run it again. Repeat until the result is `PASS`.
21
+
22
+ - **FAIL** — fix every issue, re-run. Do not proceed until exit code is 0.
23
+ - **PASS** — clean. Continue.
24
+
25
+ ---
26
+
27
+ ## Antipattern reference
28
+
29
+ The checker enforces these patterns. Use this as a guide when interpreting output or fixing issues manually.
30
+
31
+ ### `rawStringLink`
32
+ Property whose name contains `link`, `url`, `href`, or `path` declared as `(string)`.
33
+ **Fix**: Use the link picker:
34
+ ```cnd
35
+ - j:linkType (string, choicelist[linkTypeInitializer]) mandatory
36
+ ```
37
+
38
+ ### `singleHardcodedCta`
39
+ A type with both a CTA label (`ctaText`, `ctaLabel`, `buttonText`, `buttonLabel`) and a CTA link (`ctaLink`, `ctaUrl`, `ctaHref`, `buttonLink`) as flat properties, with no child node.
40
+ **Fix**: Replace with a child node:
41
+ ```cnd
42
+ + * (ns:cta)
43
+
44
+ [ns:cta] > jnt:content, nsmix:component
45
+ - label (string) i18n mandatory
46
+ - j:linkType (string, choicelist[linkTypeInitializer]) mandatory
47
+ ```
48
+
49
+ ### `directDroppable`
50
+ A concrete type extending `jmix:droppableContent` directly.
51
+ **Fix**: Extend the module mixin: `[ns:hero] > jnt:content, nsmix:component`
52
+
53
+ ### `missingRatingConstraint`
54
+ `rating (long)` without a range constraint — unconstrained ratings cause data integrity issues.
55
+ **Fix**: Add `< "[1,5]"`
56
+
57
+ ### `redundantImageAlt`
58
+ `imageAlt (string)` alongside an image weakreference. The image node already has `jcr:title`.
59
+ **Fix**: Remove `imageAlt`. In the view: `image.getPropertyAsString("jcr:title") ?? ""`
60
+
61
+ ### `rawTitleProp`
62
+ Property named `title`, `heroTitle`, `pageTitle`, or `sectionTitle` typed as `(string)`.
63
+ **Fix**: Remove it, extend `mix:title`. Access as `props["jcr:title"]`.
64
+
65
+ ### `weakrefNoConstraint`
66
+ `(weakreference)` with no `< ` type constraint.
67
+ **Fix**: Add constraint — `< jmix:image` for images, `< jnt:file` for files.
68
+
69
+ ### `weakrefWrongConstraint`
70
+ `< 'jnt:file'` (quoted form).
71
+ **Fix**: `< jmix:image` (unquoted).
72
+
73
+ ### `missingI18n`
74
+ User-visible string (`title`, `text`, `label`, `description`, `subtitle`, `caption`, `alt`, `heading`, `summary`, `excerpt`, `body`) without `i18n`.
75
+ **Fix**: Add `i18n` after the type declaration.
76
+
77
+ ### `studioOnly`
78
+ Any use of `jmix:studioOnly`.
79
+ **Fix**: Replace with `jmix:hiddenType`.
@@ -0,0 +1,13 @@
1
+ export interface CndIssue {
2
+ file: string;
3
+ line?: number;
4
+ pattern: string;
5
+ message: string;
6
+ fix: string;
7
+ }
8
+
9
+ export function checkCndFiles(projectDir: string): {
10
+ score: number;
11
+ issues: CndIssue[];
12
+ filesChecked: number;
13
+ };
@@ -0,0 +1,198 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync, readdirSync, statSync } from "node:fs";
3
+ import { join, resolve } from "node:path";
4
+
5
+ function findCndFiles(dir) {
6
+ const results = [];
7
+ function walk(current) {
8
+ try {
9
+ const stat = statSync(current);
10
+ if (stat.isFile()) {
11
+ if (current.endsWith(".cnd")) results.push(current);
12
+ return;
13
+ }
14
+ for (const entry of readdirSync(current, { withFileTypes: true })) {
15
+ if (entry.isDirectory() && entry.name !== "node_modules" && entry.name !== ".git") {
16
+ walk(join(current, entry.name));
17
+ } else if (entry.isFile() && entry.name.endsWith(".cnd")) {
18
+ results.push(join(current, entry.name));
19
+ }
20
+ }
21
+ } catch {
22
+ // skip unreadable paths
23
+ }
24
+ }
25
+ walk(dir);
26
+ return results;
27
+ }
28
+
29
+ function checkFile(filePath, content) {
30
+ const issues = [];
31
+ const lines = content.split("\n");
32
+
33
+ lines.forEach((line, i) => {
34
+ const lineNum = i + 1;
35
+ const trimmed = line.trim();
36
+ if (trimmed.startsWith("//") || trimmed.startsWith("<")) return;
37
+
38
+ // rawStringLink
39
+ if (
40
+ /^-\s+\w*(Url|Href|Link)\s+\(string[,)]/i.test(trimmed) &&
41
+ !/choicelist\[linkTypeInitializer\]/.test(trimmed)
42
+ ) {
43
+ const propName = trimmed.match(/^-\s+(\w+)/)?.[1] ?? "unknown";
44
+ issues.push({
45
+ file: filePath, line: lineNum,
46
+ pattern: "rawStringLink",
47
+ message: `"${propName}" uses (string) for a link/url — use choicelist[linkTypeInitializer]`,
48
+ fix: "Replace with: - j:linkType (string, choicelist[linkTypeInitializer]) mandatory",
49
+ });
50
+ }
51
+
52
+ // rawTitleProp
53
+ if (/^-\s+(title|heroTitle|pageTitle|sectionTitle)\s+\(string[,)]/i.test(trimmed)) {
54
+ const propName = trimmed.match(/^-\s+(\w+)/)?.[1] ?? "unknown";
55
+ issues.push({
56
+ file: filePath, line: lineNum,
57
+ pattern: "rawTitleProp",
58
+ message: `"${propName}" is a plain string — extend mix:title instead`,
59
+ fix: "Add mix:title to the type declaration and remove this property",
60
+ });
61
+ }
62
+
63
+ // weakrefNoConstraint: (weakreference) with no < constraint on same line
64
+ if (/\(weakreference[,)]/.test(trimmed) && !/<\s*\S/.test(trimmed)) {
65
+ issues.push({
66
+ file: filePath, line: lineNum,
67
+ pattern: "weakrefNoConstraint",
68
+ message: "Unconstrained weakreference — add a type constraint",
69
+ fix: "Add e.g. (weakreference, picker[type='image']) < jmix:image",
70
+ });
71
+ }
72
+
73
+ // weakrefWrongConstraint
74
+ if (/< ['"]jnt:file['"]/.test(trimmed)) {
75
+ issues.push({
76
+ file: filePath, line: lineNum,
77
+ pattern: "weakrefWrongConstraint",
78
+ message: "< 'jnt:file' (quoted) does not enforce image type",
79
+ fix: "Replace with < jmix:image for images",
80
+ });
81
+ }
82
+
83
+ // missingI18n: user-visible string without i18n
84
+ if (
85
+ /^-\s+\w+\s+\(string(,\s*(textarea|richtext))?[,)]/.test(trimmed) &&
86
+ !/ i18n/.test(trimmed) &&
87
+ !/^-\s+j:/.test(trimmed) &&
88
+ /(title|text|label|description|subtitle|caption|alt|heading|summary|excerpt|body)/i.test(trimmed)
89
+ ) {
90
+ issues.push({
91
+ file: filePath, line: lineNum,
92
+ pattern: "missingI18n",
93
+ message: "User-visible string property missing i18n",
94
+ fix: "Add i18n keyword after the type declaration",
95
+ });
96
+ }
97
+
98
+ // directDroppable: concrete type (not mixin) extending jmix:droppableContent
99
+ if (trimmed.startsWith("[") && /jmix:droppableContent/.test(trimmed) && !/\bmixin\b/.test(trimmed)) {
100
+ issues.push({
101
+ file: filePath, line: lineNum,
102
+ pattern: "directDroppable",
103
+ message: "Extends jmix:droppableContent directly — always extend the module component mixin",
104
+ fix: "Replace jmix:droppableContent with nsmix:component (or your module's equivalent)",
105
+ });
106
+ }
107
+
108
+ // studioOnly
109
+ if (/jmix:studioOnly/.test(trimmed)) {
110
+ issues.push({
111
+ file: filePath, line: lineNum,
112
+ pattern: "studioOnly",
113
+ message: "jmix:studioOnly causes silent rendering issues",
114
+ fix: "Replace with jmix:hiddenType",
115
+ });
116
+ }
117
+
118
+ // redundantImageAlt: imageAlt as plain string — image node already has jcr:title
119
+ if (/^-\s+imageAlt\s+\(string[,)]/i.test(trimmed)) {
120
+ issues.push({
121
+ file: filePath, line: lineNum,
122
+ pattern: "redundantImageAlt",
123
+ message: '"imageAlt" is redundant — the image node\'s jcr:title (mix:title) serves as alt text',
124
+ fix: 'Remove imageAlt. In the view, use image.getPropertyAsString("jcr:title") for alt text',
125
+ });
126
+ }
127
+
128
+ // missingRatingConstraint: rating (long) without a range constraint
129
+ if (/^-\s+rating\s+\(long[,)]/i.test(trimmed) && !/<\s*"?\[/.test(trimmed)) {
130
+ issues.push({
131
+ file: filePath, line: lineNum,
132
+ pattern: "missingRatingConstraint",
133
+ message: '"rating" (long) has no range constraint — unconstrained ratings cause data integrity issues',
134
+ fix: 'Add: < "[1,5]"',
135
+ });
136
+ }
137
+ });
138
+
139
+ // singleHardcodedCta: check whole-file type blocks
140
+ const typeBlocks = content.split(/(?=^\[)/m);
141
+ for (const block of typeBlocks) {
142
+ if (!block.trim().startsWith("[")) continue;
143
+ const hasCtaLabel = /^\s*-\s+cta(Text|Label|ButtonText|ButtonLabel)\s+\(/im.test(block);
144
+ const hasCtaLink = /^\s*-\s+cta(Link|Url|Href|ButtonLink|ButtonUrl)\s+\(/im.test(block);
145
+ const hasChildNodes = /^\s*\+\s+/.test(block);
146
+ if (hasCtaLabel && hasCtaLink && !hasChildNodes) {
147
+ const typeName = block.match(/^\[(\S+)\]/m)?.[1] ?? "unknown";
148
+ const typeLineIdx = lines.findIndex((l) => l.includes(`[${typeName}]`));
149
+ issues.push({
150
+ file: filePath,
151
+ ...(typeLineIdx >= 0 ? { line: typeLineIdx + 1 } : {}),
152
+ pattern: "singleHardcodedCta",
153
+ message: `${typeName}: flat ctaText+ctaLink forces a single CTA — model as child nodes`,
154
+ fix: "Remove ctaText and ctaLink. Add: + * (ns:cta). Create a [ns:cta] type with label + j:linkType",
155
+ });
156
+ }
157
+ }
158
+
159
+ return issues;
160
+ }
161
+
162
+ export function checkCndFiles(projectDir) {
163
+ const files = findCndFiles(projectDir);
164
+ const allIssues = [];
165
+
166
+ for (const file of files) {
167
+ try {
168
+ const content = readFileSync(file, "utf-8");
169
+ allIssues.push(...checkFile(file, content));
170
+ } catch {
171
+ // skip unreadable files
172
+ }
173
+ }
174
+
175
+ return { score: Math.exp(-allIssues.length * 0.5), issues: allIssues, filesChecked: files.length };
176
+ }
177
+
178
+ if (import.meta.main) {
179
+ const targetPath = resolve(process.argv[2] ?? ".");
180
+ const { score, issues, filesChecked } = checkCndFiles(targetPath);
181
+
182
+ console.log(`\nCND Review: ${filesChecked} file${filesChecked !== 1 ? "s" : ""} checked\n`);
183
+
184
+ if (issues.length > 0) {
185
+ console.log(`ISSUES (${issues.length}):`);
186
+ for (const issue of issues) {
187
+ const loc = issue.line ? `${issue.file}:${issue.line}` : issue.file;
188
+ console.log(` [${issue.pattern}] ${loc}`);
189
+ console.log(` ${issue.message}`);
190
+ console.log(` Fix: ${issue.fix}`);
191
+ }
192
+ console.log();
193
+ }
194
+
195
+ const verdict = issues.length > 0 ? "FAIL" : "PASS";
196
+ console.log(`Result: ${verdict} (score=${score.toFixed(2)})`);
197
+ process.exit(issues.length > 0 ? 1 : 0);
198
+ }