@the-bearded-bear/claude-craft 9.2.0 → 9.2.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 (557) hide show
  1. package/Dev/i18n/base/Angular/rules/00-project-context.md.template +1 -1
  2. package/Dev/i18n/base/Angular/rules/03-coding-standards.md +17 -16
  3. package/Dev/i18n/base/Angular/rules/06-tooling.md +2 -2
  4. package/Dev/i18n/base/CSharp/rules/06-tooling.md +8 -6
  5. package/Dev/i18n/base/Common/hooks/scripts/block-dangerous-commands.sh +93 -48
  6. package/Dev/i18n/base/Common/hooks/scripts/guard-network.sh +58 -0
  7. package/Dev/i18n/base/Common/hooks/scripts/lib/hook-io.sh +181 -0
  8. package/Dev/i18n/base/Common/hooks/scripts/notify-slack.sh +21 -32
  9. package/Dev/i18n/base/Common/hooks/scripts/output-filter.sh +23 -0
  10. package/Dev/i18n/base/Common/hooks/scripts/output-size-hint.sh +19 -0
  11. package/Dev/i18n/base/Common/hooks/scripts/post-edit-lint.sh +29 -53
  12. package/Dev/i18n/base/Common/hooks/scripts/post-tool-failure.sh +50 -0
  13. package/Dev/i18n/base/Common/hooks/scripts/pre-commit-check.sh +59 -63
  14. package/Dev/i18n/base/Common/hooks/scripts/pre-compact.sh +52 -0
  15. package/Dev/i18n/base/Common/hooks/scripts/protect-sensitive-files.sh +16 -0
  16. package/Dev/i18n/base/Common/hooks/scripts/quality-gate.sh +49 -92
  17. package/Dev/i18n/base/Common/hooks/scripts/session-end.sh +51 -0
  18. package/Dev/i18n/base/Common/hooks/scripts/session-init.sh +45 -69
  19. package/Dev/i18n/base/Common/hooks/templates/examples/README.md +59 -0
  20. package/Dev/i18n/base/Common/hooks/templates/examples/auto-format.json +18 -0
  21. package/Dev/i18n/base/Common/hooks/templates/examples/block-dangerous-commands.json +18 -0
  22. package/Dev/i18n/base/Common/hooks/templates/examples/context-reinject.json +28 -0
  23. package/Dev/i18n/base/Common/hooks/templates/examples/output-filter.json +18 -0
  24. package/Dev/i18n/base/Common/hooks/templates/examples/pre-compact.json +18 -0
  25. package/Dev/i18n/base/Common/hooks/templates/examples/protect-files.json +18 -0
  26. package/Dev/i18n/base/Common/hooks/templates/examples/security-block.json +18 -0
  27. package/Dev/i18n/base/Common/hooks/templates/examples/stop-hook.json +16 -0
  28. package/Dev/i18n/base/Common/hooks/templates/examples/user-prompt-submit.json +16 -0
  29. package/Dev/i18n/base/Common/hooks/templates/hooks.default.json +72 -0
  30. package/Dev/i18n/base/Common/hooks/templates/{settings-hooks.json → hooks.full.json} +22 -23
  31. package/Dev/i18n/base/Common/hooks/templates/hooks.memory.json +62 -0
  32. package/Dev/i18n/base/Common/templates/AGENTS.md.template +1 -1
  33. package/Dev/i18n/base/Common/templates/settings.json.template +46 -0
  34. package/Dev/i18n/base/Flutter/rules/00-project-context.md.template +9 -9
  35. package/Dev/i18n/base/Laravel/checks/code-quality.md +1 -1
  36. package/Dev/i18n/base/Laravel/rules/00-project-context.md.template +2 -2
  37. package/Dev/i18n/base/Laravel/rules/06-tooling.md +10 -8
  38. package/Dev/i18n/base/Laravel/rules/07-testing-laravel.md +2 -0
  39. package/Dev/i18n/base/Laravel/rules/08-quality-tools.md +2 -2
  40. package/Dev/i18n/base/PHP/rules/00-project-context.md.template +2 -2
  41. package/Dev/i18n/base/Tauri/rules/02-architecture-tauri.md +1 -0
  42. package/Dev/i18n/base/Vercel/checks/all.md +1 -1
  43. package/Dev/i18n/base/Vercel/checks/architecture.md +1 -1
  44. package/Dev/i18n/base/Vercel/rules/02-architecture-vercel.md +4 -2
  45. package/Dev/i18n/base/Vercel/rules/06-tooling.md +7 -5
  46. package/Dev/i18n/base/Vercel/rules/11-security-vercel.md +1 -1
  47. package/Dev/i18n/base/Vite/rules/06-tooling.md +2 -1
  48. package/Dev/i18n/base/Vite/rules/08-quality-tools.md +1 -1
  49. package/Dev/i18n/base/VueJS/rules/06-tooling.md +3 -3
  50. package/Dev/i18n/base/VueJS/rules/07-testing-vuejs.md +9 -8
  51. package/Dev/i18n/base/VueJS/rules/08-quality-tools.md +1 -1
  52. package/Dev/i18n/base/WordPress/checklists/new-feature.md +59 -0
  53. package/Dev/i18n/base/WordPress/checklists/pre-commit.md +125 -0
  54. package/Dev/i18n/base/WordPress/checks/all.md +257 -0
  55. package/Dev/i18n/base/WordPress/checks/architecture.md +157 -0
  56. package/Dev/i18n/base/WordPress/checks/code-quality.md +158 -0
  57. package/Dev/i18n/base/WordPress/checks/security.md +158 -0
  58. package/Dev/i18n/base/WordPress/checks/testing.md +157 -0
  59. package/Dev/i18n/base/WordPress/commands/check.md +28 -0
  60. package/Dev/i18n/base/WordPress/rules/00-project-context.md.template +169 -0
  61. package/Dev/i18n/base/WordPress/rules/02-architecture-wordpress.md +174 -0
  62. package/Dev/i18n/base/WordPress/rules/03-coding-standards.md +98 -0
  63. package/Dev/i18n/base/WordPress/rules/06-tooling.md +146 -0
  64. package/Dev/i18n/base/WordPress/rules/07-testing-wordpress.md +150 -0
  65. package/Dev/i18n/base/WordPress/rules/08-quality-tools.md +161 -0
  66. package/Dev/i18n/base/WordPress/rules/11-security-wordpress.md +175 -0
  67. package/Dev/i18n/base/WordPress/skills/woocommerce/REFERENCE.md +214 -0
  68. package/Dev/i18n/base/WordPress/skills/woocommerce/SKILL.md +40 -0
  69. package/Dev/i18n/base/WordPress/skills/woocommerce/checklist.md +66 -0
  70. package/Dev/i18n/base/WordPress/templates/block.md +235 -0
  71. package/Dev/i18n/base/WordPress/templates/plugin-bootstrap.md +215 -0
  72. package/Dev/i18n/base/WordPress/templates/rest-endpoint.md +246 -0
  73. package/Dev/i18n/de/Angular/CLAUDE.md.template +2 -1
  74. package/Dev/i18n/de/Angular/agents/angular-reviewer.md +23 -7
  75. package/Dev/i18n/de/Common/agents/devops-engineer.md +1 -1
  76. package/Dev/i18n/de/Common/agents/migration-specialist.md +1 -1
  77. package/Dev/i18n/de/Common/commands/ralph-run.md +3 -3
  78. package/Dev/i18n/de/Common/commands/setup-rtk.md +2 -9
  79. package/Dev/i18n/de/Common/hooks/HOOKS-QUICKSTART.md +33 -45
  80. package/Dev/i18n/de/Common/rules/04-solid-principles.md +2 -2
  81. package/Dev/i18n/de/Common/rules/09-git-workflow.md +7 -1
  82. package/Dev/i18n/de/Common/rules/10-documentation.md +2 -2
  83. package/Dev/i18n/de/Common/rules/11-security.md +12 -12
  84. package/Dev/i18n/de/Common/rules/12-context-management.md +5 -3
  85. package/Dev/i18n/de/Flutter/commands/analyze-performance.md +1 -1
  86. package/Dev/i18n/de/Flutter/rules/06-tooling.md +6 -2
  87. package/Dev/i18n/de/Flutter/rules/11-security-flutter.md +1 -1
  88. package/Dev/i18n/de/PHP/rules/03-coding-standards.md +10 -0
  89. package/Dev/i18n/de/PHP/rules/06-tooling.md +7 -3
  90. package/Dev/i18n/de/Paperclip/CLAUDE.md.template +2 -2
  91. package/Dev/i18n/de/Paperclip/README.md +1 -1
  92. package/Dev/i18n/de/Paperclip/checks/security.md +1 -0
  93. package/Dev/i18n/de/Paperclip/rules/11-security-paperclip.md +3 -1
  94. package/Dev/i18n/de/Python/agents/python-reviewer.md +1 -1
  95. package/Dev/i18n/de/Python/checks/code-quality.md +4 -4
  96. package/Dev/i18n/de/Python/checks/security.md +2 -2
  97. package/Dev/i18n/de/Python/checks/testing.md +2 -2
  98. package/Dev/i18n/de/Python/rules/02-architecture.md +1 -8
  99. package/Dev/i18n/de/Python/rules/03-coding-standards.md +16 -5
  100. package/Dev/i18n/de/Python/templates/repository.md +2 -2
  101. package/Dev/i18n/de/React/rules/02-architecture.md +17 -20
  102. package/Dev/i18n/de/React/rules/03-coding-standards.md +15 -16
  103. package/Dev/i18n/de/React/templates/component.md +11 -9
  104. package/Dev/i18n/de/ReactNative/agents/reactnative-reviewer.md +4 -4
  105. package/Dev/i18n/de/ReactNative/rules/06-tooling.md +15 -14
  106. package/Dev/i18n/de/ReactNative/rules/14-navigation.md +2 -0
  107. package/Dev/i18n/de/Ruby/agents/ruby-reviewer.md +1 -1
  108. package/Dev/i18n/de/Ruby/rules/06-tooling.md +2 -2
  109. package/Dev/i18n/de/Ruby/rules/11-security-ruby.md +13 -1
  110. package/Dev/i18n/de/Rust/rules/03-coding-standards.md +1 -1
  111. package/Dev/i18n/de/Rust/rules/11-security-rust.md +1 -1
  112. package/Dev/i18n/de/Symfony/adr/README.md +1 -1
  113. package/Dev/i18n/de/Symfony/checks/code-quality.md +2 -2
  114. package/Dev/i18n/de/Symfony/rules/03-coding-standards.md +15 -0
  115. package/Dev/i18n/de/Symfony/rules/06-docker-hadolint.md +1 -1
  116. package/Dev/i18n/de/Symfony/rules/08-quality-tools.md +1 -3
  117. package/Dev/i18n/de/Symfony/rules/15-doctrine-extensions.md +5 -5
  118. package/Dev/i18n/de/Symfony/rules/16-i18n.md +1 -1
  119. package/Dev/i18n/de/Symfony/templates/README.md +1 -1
  120. package/Dev/i18n/de/Tauri/agents/tauri-reviewer.md +3 -0
  121. package/Dev/i18n/de/Vercel/agents/vercel-reviewer.md +1 -0
  122. package/Dev/i18n/de/Vercel/checks/all.md +1 -1
  123. package/Dev/i18n/de/Vite/agents/vite-reviewer.md +11 -11
  124. package/Dev/i18n/de/WordPress/CLAUDE.md.template +100 -0
  125. package/Dev/i18n/de/WordPress/agents/wordpress-reviewer.md +350 -0
  126. package/Dev/i18n/de/WordPress/checks/all.md +242 -0
  127. package/Dev/i18n/de/WordPress/commands/check.md +28 -0
  128. package/Dev/i18n/en/Angular/CLAUDE.md.template +3 -2
  129. package/Dev/i18n/en/Angular/agents/angular-reviewer.md +23 -7
  130. package/Dev/i18n/en/Common/agents/devops-engineer.md +1 -1
  131. package/Dev/i18n/en/Common/agents/migration-specialist.md +1 -1
  132. package/Dev/i18n/en/Common/commands/ralph-run.md +3 -3
  133. package/Dev/i18n/en/Common/commands/setup-rtk.md +2 -9
  134. package/Dev/i18n/en/Common/hooks/HOOKS-QUICKSTART.md +31 -43
  135. package/Dev/i18n/en/Common/rules/04-solid-principles.md +2 -2
  136. package/Dev/i18n/en/Common/rules/09-git-workflow.md +7 -1
  137. package/Dev/i18n/en/Common/rules/10-documentation.md +2 -2
  138. package/Dev/i18n/en/Common/rules/11-security.md +12 -12
  139. package/Dev/i18n/en/Common/rules/12-context-management.md +5 -3
  140. package/Dev/i18n/en/Flutter/commands/analyze-performance.md +1 -1
  141. package/Dev/i18n/en/Flutter/rules/06-tooling.md +6 -2
  142. package/Dev/i18n/en/Flutter/rules/11-security-flutter.md +1 -1
  143. package/Dev/i18n/en/Laravel/CLAUDE.md.template +1 -1
  144. package/Dev/i18n/en/Laravel/agents/laravel-reviewer.md +3 -3
  145. package/Dev/i18n/en/PHP/rules/03-coding-standards.md +10 -0
  146. package/Dev/i18n/en/PHP/rules/06-tooling.md +7 -3
  147. package/Dev/i18n/en/Paperclip/CLAUDE.md.template +2 -2
  148. package/Dev/i18n/en/Paperclip/README.md +1 -1
  149. package/Dev/i18n/en/Paperclip/checks/security.md +1 -0
  150. package/Dev/i18n/en/Paperclip/rules/11-security-paperclip.md +3 -1
  151. package/Dev/i18n/en/Python/agents/python-reviewer.md +1 -1
  152. package/Dev/i18n/en/Python/checks/code-quality.md +4 -4
  153. package/Dev/i18n/en/Python/checks/security.md +2 -2
  154. package/Dev/i18n/en/Python/checks/testing.md +2 -2
  155. package/Dev/i18n/en/Python/rules/02-architecture.md +1 -8
  156. package/Dev/i18n/en/Python/rules/03-coding-standards.md +16 -5
  157. package/Dev/i18n/en/Python/templates/repository.md +2 -2
  158. package/Dev/i18n/en/React/rules/02-architecture.md +17 -20
  159. package/Dev/i18n/en/React/rules/03-coding-standards.md +15 -16
  160. package/Dev/i18n/en/React/templates/component.md +11 -9
  161. package/Dev/i18n/en/ReactNative/agents/reactnative-reviewer.md +4 -4
  162. package/Dev/i18n/en/ReactNative/rules/02-architecture.md +4 -4
  163. package/Dev/i18n/en/ReactNative/rules/06-tooling.md +15 -14
  164. package/Dev/i18n/en/ReactNative/rules/07-testing-reactnative.md +1 -1
  165. package/Dev/i18n/en/ReactNative/rules/14-navigation.md +2 -0
  166. package/Dev/i18n/en/Ruby/agents/ruby-reviewer.md +1 -1
  167. package/Dev/i18n/en/Ruby/rules/06-tooling.md +2 -2
  168. package/Dev/i18n/en/Ruby/rules/11-security-ruby.md +13 -1
  169. package/Dev/i18n/en/Rust/rules/03-coding-standards.md +1 -1
  170. package/Dev/i18n/en/Rust/rules/11-security-rust.md +1 -1
  171. package/Dev/i18n/en/Symfony/adr/README.md +1 -1
  172. package/Dev/i18n/en/Symfony/checks/code-quality.md +2 -2
  173. package/Dev/i18n/en/Symfony/rules/03-coding-standards.md +15 -0
  174. package/Dev/i18n/en/Symfony/rules/06-docker-hadolint.md +1 -1
  175. package/Dev/i18n/en/Symfony/rules/08-quality-tools.md +1 -3
  176. package/Dev/i18n/en/Symfony/rules/15-doctrine-extensions.md +5 -5
  177. package/Dev/i18n/en/Symfony/rules/16-i18n.md +1 -1
  178. package/Dev/i18n/en/Symfony/templates/README.md +1 -1
  179. package/Dev/i18n/en/Tauri/agents/tauri-reviewer.md +3 -0
  180. package/Dev/i18n/en/Vercel/agents/vercel-reviewer.md +1 -0
  181. package/Dev/i18n/en/Vercel/checks/all.md +1 -1
  182. package/Dev/i18n/en/Vite/agents/vite-reviewer.md +11 -11
  183. package/Dev/i18n/en/WordPress/CLAUDE.md.template +100 -0
  184. package/Dev/i18n/en/WordPress/agents/wordpress-reviewer.md +350 -0
  185. package/Dev/i18n/en/WordPress/checks/all.md +241 -0
  186. package/Dev/i18n/en/WordPress/commands/check.md +28 -0
  187. package/Dev/i18n/es/Angular/CLAUDE.md.template +3 -2
  188. package/Dev/i18n/es/Angular/agents/angular-reviewer.md +23 -7
  189. package/Dev/i18n/es/Common/agents/devops-engineer.md +1 -1
  190. package/Dev/i18n/es/Common/agents/migration-specialist.md +1 -1
  191. package/Dev/i18n/es/Common/commands/ralph-run.md +3 -3
  192. package/Dev/i18n/es/Common/commands/setup-rtk.md +2 -9
  193. package/Dev/i18n/es/Common/hooks/HOOKS-QUICKSTART.md +33 -45
  194. package/Dev/i18n/es/Common/rules/04-solid-principles.md +2 -2
  195. package/Dev/i18n/es/Common/rules/09-git-workflow.md +7 -1
  196. package/Dev/i18n/es/Common/rules/10-documentation.md +2 -2
  197. package/Dev/i18n/es/Common/rules/11-security.md +12 -12
  198. package/Dev/i18n/es/Common/rules/12-context-management.md +5 -3
  199. package/Dev/i18n/es/Flutter/commands/analyze-performance.md +1 -1
  200. package/Dev/i18n/es/Flutter/rules/06-tooling.md +6 -2
  201. package/Dev/i18n/es/Flutter/rules/11-security-flutter.md +1 -1
  202. package/Dev/i18n/es/Laravel/agents/laravel-reviewer.md +2 -2
  203. package/Dev/i18n/es/PHP/rules/03-coding-standards.md +10 -0
  204. package/Dev/i18n/es/PHP/rules/06-tooling.md +7 -3
  205. package/Dev/i18n/es/Paperclip/CLAUDE.md.template +2 -2
  206. package/Dev/i18n/es/Paperclip/README.md +1 -1
  207. package/Dev/i18n/es/Paperclip/checks/security.md +1 -0
  208. package/Dev/i18n/es/Paperclip/rules/11-security-paperclip.md +3 -1
  209. package/Dev/i18n/es/Python/agents/python-reviewer.md +1 -1
  210. package/Dev/i18n/es/Python/checks/code-quality.md +4 -4
  211. package/Dev/i18n/es/Python/checks/security.md +2 -2
  212. package/Dev/i18n/es/Python/checks/testing.md +2 -2
  213. package/Dev/i18n/es/Python/rules/02-architecture.md +1 -8
  214. package/Dev/i18n/es/Python/rules/03-coding-standards.md +16 -5
  215. package/Dev/i18n/es/Python/templates/repository.md +2 -2
  216. package/Dev/i18n/es/React/rules/03-coding-standards.md +15 -16
  217. package/Dev/i18n/es/React/templates/component.md +11 -9
  218. package/Dev/i18n/es/ReactNative/agents/reactnative-reviewer.md +4 -4
  219. package/Dev/i18n/es/ReactNative/rules/06-tooling.md +15 -14
  220. package/Dev/i18n/es/ReactNative/rules/14-navigation.md +2 -0
  221. package/Dev/i18n/es/Ruby/agents/ruby-reviewer.md +1 -1
  222. package/Dev/i18n/es/Ruby/rules/06-tooling.md +2 -2
  223. package/Dev/i18n/es/Ruby/rules/11-security-ruby.md +13 -1
  224. package/Dev/i18n/es/Rust/rules/03-coding-standards.md +1 -1
  225. package/Dev/i18n/es/Rust/rules/11-security-rust.md +1 -1
  226. package/Dev/i18n/es/Symfony/adr/README.md +1 -1
  227. package/Dev/i18n/es/Symfony/checks/code-quality.md +2 -2
  228. package/Dev/i18n/es/Symfony/rules/03-coding-standards.md +15 -0
  229. package/Dev/i18n/es/Symfony/rules/06-docker-hadolint.md +1 -1
  230. package/Dev/i18n/es/Symfony/rules/08-quality-tools.md +1 -3
  231. package/Dev/i18n/es/Symfony/rules/15-doctrine-extensions.md +5 -5
  232. package/Dev/i18n/es/Symfony/rules/16-i18n.md +1 -1
  233. package/Dev/i18n/es/Symfony/templates/README.md +1 -1
  234. package/Dev/i18n/es/Tauri/agents/tauri-reviewer.md +3 -0
  235. package/Dev/i18n/es/Vercel/agents/vercel-reviewer.md +2 -1
  236. package/Dev/i18n/es/Vercel/checks/all.md +1 -1
  237. package/Dev/i18n/es/Vite/agents/vite-reviewer.md +11 -11
  238. package/Dev/i18n/es/WordPress/CLAUDE.md.template +100 -0
  239. package/Dev/i18n/es/WordPress/agents/wordpress-reviewer.md +350 -0
  240. package/Dev/i18n/es/WordPress/checks/all.md +241 -0
  241. package/Dev/i18n/es/WordPress/commands/check.md +28 -0
  242. package/Dev/i18n/fr/Angular/CLAUDE.md.template +3 -2
  243. package/Dev/i18n/fr/Angular/agents/angular-reviewer.md +23 -7
  244. package/Dev/i18n/fr/Common/agents/devops-engineer.md +1 -1
  245. package/Dev/i18n/fr/Common/agents/migration-specialist.md +1 -1
  246. package/Dev/i18n/fr/Common/commands/ralph-run.md +3 -3
  247. package/Dev/i18n/fr/Common/commands/setup-rtk.md +2 -9
  248. package/Dev/i18n/fr/Common/hooks/HOOKS-QUICKSTART.md +32 -44
  249. package/Dev/i18n/fr/Common/rules/04-solid-principles.md +2 -2
  250. package/Dev/i18n/fr/Common/rules/09-git-workflow.md +7 -1
  251. package/Dev/i18n/fr/Common/rules/10-documentation.md +2 -2
  252. package/Dev/i18n/fr/Common/rules/11-security.md +12 -12
  253. package/Dev/i18n/fr/Common/rules/12-context-management.md +5 -3
  254. package/Dev/i18n/fr/Flutter/commands/analyze-performance.md +1 -1
  255. package/Dev/i18n/fr/Flutter/rules/02-architecture.md +4 -4
  256. package/Dev/i18n/fr/Flutter/rules/06-tooling.md +6 -2
  257. package/Dev/i18n/fr/Flutter/rules/11-security-flutter.md +1 -1
  258. package/Dev/i18n/fr/Laravel/CLAUDE.md.template +1 -1
  259. package/Dev/i18n/fr/Laravel/agents/laravel-reviewer.md +3 -3
  260. package/Dev/i18n/fr/PHP/rules/03-coding-standards.md +10 -0
  261. package/Dev/i18n/fr/PHP/rules/06-tooling.md +7 -3
  262. package/Dev/i18n/fr/Paperclip/CLAUDE.md.template +2 -2
  263. package/Dev/i18n/fr/Paperclip/README.md +1 -1
  264. package/Dev/i18n/fr/Paperclip/checks/security.md +1 -0
  265. package/Dev/i18n/fr/Paperclip/rules/11-security-paperclip.md +3 -1
  266. package/Dev/i18n/fr/Python/agents/python-reviewer.md +1 -1
  267. package/Dev/i18n/fr/Python/checks/code-quality.md +4 -4
  268. package/Dev/i18n/fr/Python/checks/security.md +2 -2
  269. package/Dev/i18n/fr/Python/checks/testing.md +2 -2
  270. package/Dev/i18n/fr/Python/commands/dependency-audit.md +1 -2
  271. package/Dev/i18n/fr/Python/commands/generate-endpoint.md +7 -11
  272. package/Dev/i18n/fr/Python/commands/generate-model.md +6 -6
  273. package/Dev/i18n/fr/Python/rules/02-architecture.md +9 -24
  274. package/Dev/i18n/fr/Python/rules/03-coding-standards.md +19 -7
  275. package/Dev/i18n/fr/Python/templates/repository.md +9 -10
  276. package/Dev/i18n/fr/React/commands/generate-component.md +52 -51
  277. package/Dev/i18n/fr/React/rules/02-architecture.md +17 -20
  278. package/Dev/i18n/fr/React/rules/03-coding-standards.md +15 -16
  279. package/Dev/i18n/fr/React/templates/component.md +11 -9
  280. package/Dev/i18n/fr/ReactNative/agents/reactnative-reviewer.md +4 -4
  281. package/Dev/i18n/fr/ReactNative/rules/06-tooling.md +15 -14
  282. package/Dev/i18n/fr/ReactNative/rules/14-navigation.md +2 -0
  283. package/Dev/i18n/fr/Ruby/agents/ruby-reviewer.md +1 -1
  284. package/Dev/i18n/fr/Ruby/rules/06-tooling.md +2 -2
  285. package/Dev/i18n/fr/Ruby/rules/11-security-ruby.md +13 -1
  286. package/Dev/i18n/fr/Rust/rules/03-coding-standards.md +1 -1
  287. package/Dev/i18n/fr/Rust/rules/11-security-rust.md +1 -1
  288. package/Dev/i18n/fr/Symfony/adr/README.md +1 -1
  289. package/Dev/i18n/fr/Symfony/checks/code-quality.md +2 -2
  290. package/Dev/i18n/fr/Symfony/rules/03-coding-standards.md +15 -0
  291. package/Dev/i18n/fr/Symfony/rules/06-docker-hadolint.md +1 -1
  292. package/Dev/i18n/fr/Symfony/rules/08-quality-tools.md +1 -3
  293. package/Dev/i18n/fr/Symfony/rules/15-doctrine-extensions.md +5 -5
  294. package/Dev/i18n/fr/Symfony/rules/16-i18n.md +1 -1
  295. package/Dev/i18n/fr/Symfony/templates/README.md +1 -1
  296. package/Dev/i18n/fr/Tauri/agents/tauri-reviewer.md +3 -0
  297. package/Dev/i18n/fr/Vercel/agents/vercel-reviewer.md +1 -0
  298. package/Dev/i18n/fr/Vercel/checks/all.md +1 -1
  299. package/Dev/i18n/fr/Vite/agents/vite-reviewer.md +11 -11
  300. package/Dev/i18n/fr/WordPress/CLAUDE.md.template +100 -0
  301. package/Dev/i18n/fr/WordPress/agents/wordpress-reviewer.md +350 -0
  302. package/Dev/i18n/fr/WordPress/checks/all.md +242 -0
  303. package/Dev/i18n/fr/WordPress/commands/check.md +28 -0
  304. package/Dev/i18n/pt/Angular/CLAUDE.md.template +3 -2
  305. package/Dev/i18n/pt/Angular/agents/angular-reviewer.md +23 -7
  306. package/Dev/i18n/pt/Common/agents/devops-engineer.md +1 -1
  307. package/Dev/i18n/pt/Common/agents/migration-specialist.md +1 -1
  308. package/Dev/i18n/pt/Common/commands/ralph-run.md +3 -3
  309. package/Dev/i18n/pt/Common/commands/setup-rtk.md +2 -9
  310. package/Dev/i18n/pt/Common/hooks/HOOKS-QUICKSTART.md +33 -45
  311. package/Dev/i18n/pt/Common/rules/04-solid-principles.md +2 -2
  312. package/Dev/i18n/pt/Common/rules/09-git-workflow.md +7 -1
  313. package/Dev/i18n/pt/Common/rules/10-documentation.md +2 -2
  314. package/Dev/i18n/pt/Common/rules/11-security.md +12 -12
  315. package/Dev/i18n/pt/Common/rules/12-context-management.md +5 -3
  316. package/Dev/i18n/pt/Flutter/commands/analyze-performance.md +1 -1
  317. package/Dev/i18n/pt/Flutter/rules/06-tooling.md +6 -2
  318. package/Dev/i18n/pt/Flutter/rules/11-security-flutter.md +1 -1
  319. package/Dev/i18n/pt/Laravel/agents/laravel-reviewer.md +2 -2
  320. package/Dev/i18n/pt/PHP/rules/03-coding-standards.md +10 -0
  321. package/Dev/i18n/pt/PHP/rules/06-tooling.md +7 -3
  322. package/Dev/i18n/pt/Paperclip/CLAUDE.md.template +2 -2
  323. package/Dev/i18n/pt/Paperclip/README.md +1 -1
  324. package/Dev/i18n/pt/Paperclip/checks/security.md +1 -0
  325. package/Dev/i18n/pt/Paperclip/rules/11-security-paperclip.md +3 -1
  326. package/Dev/i18n/pt/Python/agents/python-reviewer.md +1 -1
  327. package/Dev/i18n/pt/Python/checks/code-quality.md +4 -4
  328. package/Dev/i18n/pt/Python/checks/security.md +2 -2
  329. package/Dev/i18n/pt/Python/checks/testing.md +2 -2
  330. package/Dev/i18n/pt/Python/rules/02-architecture.md +1 -8
  331. package/Dev/i18n/pt/Python/rules/03-coding-standards.md +16 -5
  332. package/Dev/i18n/pt/Python/templates/repository.md +2 -2
  333. package/Dev/i18n/pt/React/rules/02-architecture.md +17 -20
  334. package/Dev/i18n/pt/React/rules/03-coding-standards.md +15 -16
  335. package/Dev/i18n/pt/React/templates/component.md +12 -10
  336. package/Dev/i18n/pt/ReactNative/agents/reactnative-reviewer.md +4 -4
  337. package/Dev/i18n/pt/ReactNative/rules/06-tooling.md +15 -14
  338. package/Dev/i18n/pt/ReactNative/rules/14-navigation.md +2 -0
  339. package/Dev/i18n/pt/Ruby/agents/ruby-reviewer.md +1 -1
  340. package/Dev/i18n/pt/Ruby/rules/06-tooling.md +2 -2
  341. package/Dev/i18n/pt/Ruby/rules/11-security-ruby.md +13 -1
  342. package/Dev/i18n/pt/Rust/rules/03-coding-standards.md +1 -1
  343. package/Dev/i18n/pt/Rust/rules/11-security-rust.md +1 -1
  344. package/Dev/i18n/pt/Symfony/adr/README.md +1 -1
  345. package/Dev/i18n/pt/Symfony/checks/code-quality.md +2 -2
  346. package/Dev/i18n/pt/Symfony/rules/03-coding-standards.md +15 -0
  347. package/Dev/i18n/pt/Symfony/rules/06-docker-hadolint.md +1 -1
  348. package/Dev/i18n/pt/Symfony/rules/08-quality-tools.md +1 -3
  349. package/Dev/i18n/pt/Symfony/rules/15-doctrine-extensions.md +5 -5
  350. package/Dev/i18n/pt/Symfony/rules/16-i18n.md +1 -1
  351. package/Dev/i18n/pt/Symfony/templates/README.md +1 -1
  352. package/Dev/i18n/pt/Tauri/agents/tauri-reviewer.md +3 -0
  353. package/Dev/i18n/pt/Vercel/agents/vercel-reviewer.md +1 -0
  354. package/Dev/i18n/pt/Vercel/checks/all.md +1 -1
  355. package/Dev/i18n/pt/Vite/agents/vite-reviewer.md +11 -11
  356. package/Dev/i18n/pt/WordPress/CLAUDE.md.template +100 -0
  357. package/Dev/i18n/pt/WordPress/agents/wordpress-reviewer.md +350 -0
  358. package/Dev/i18n/pt/WordPress/checks/all.md +241 -0
  359. package/Dev/i18n/pt/WordPress/commands/check.md +28 -0
  360. package/Dev/scripts/check-config.sh +1 -1
  361. package/Dev/scripts/install-common-rules.sh +65 -0
  362. package/Dev/scripts/install-from-config.sh +3 -0
  363. package/Dev/scripts/install-paperclip-rules.sh +1 -1
  364. package/Dev/scripts/install-wordpress-rules.sh +153 -0
  365. package/Dev/scripts/lib/merge-hooks.mjs +110 -0
  366. package/Dev/scripts/memory-lifecycle/README.md +10 -9
  367. package/Dev/scripts/memory-lifecycle/_db.sh +1 -1
  368. package/Dev/scripts/memory-lifecycle/post-tool.sh +1 -1
  369. package/Dev/scripts/memory-lifecycle/pre-compact.sh +5 -5
  370. package/Dev/scripts/memory-lifecycle/prompt-submit.sh +1 -1
  371. package/Dev/scripts/memory-lifecycle/session-end.sh +1 -1
  372. package/Dev/scripts/memory-lifecycle/session-start.sh +5 -4
  373. package/Dev/stack-profiles/wordpress/permissions.txt +10 -0
  374. package/Dev/stack-profiles/wordpress/quality.md +4 -0
  375. package/Dev/stack-profiles/wordpress/stack.txt +2 -0
  376. package/Infra/i18n/de/Ansible/agents/ansible-architect.md +3 -1
  377. package/Infra/i18n/de/Ansible/agents/ansible-debug.md +1 -0
  378. package/Infra/i18n/de/Ansible/agents/ansible-deployment.md +3 -0
  379. package/Infra/i18n/de/Ansible/agents/ansible-security.md +2 -0
  380. package/Infra/i18n/de/Ansible/commands/security-audit.md +1 -1
  381. package/Infra/i18n/de/Coolify/agents/coolify-debug.md +1 -0
  382. package/Infra/i18n/de/Coolify/agents/coolify-deployment.md +5 -1
  383. package/Infra/i18n/de/Coolify/commands/coolify-debug.md +1 -0
  384. package/Infra/i18n/de/Coolify/commands/coolify-deploy.md +1 -0
  385. package/Infra/i18n/de/FrankenPHP/agents/frankenphp-architect.md +4 -2
  386. package/Infra/i18n/de/FrankenPHP/agents/frankenphp-deployment.md +2 -2
  387. package/Infra/i18n/de/FrankenPHP/agents/frankenphp-security.md +1 -1
  388. package/Infra/i18n/de/FrankenPHP/commands/deploy-setup.md +1 -1
  389. package/Infra/i18n/de/Hcloud/agents/hcloud-architect.md +16 -14
  390. package/Infra/i18n/de/Hcloud/agents/hcloud-cost.md +11 -9
  391. package/Infra/i18n/de/Hcloud/agents/hcloud-deployment.md +1 -1
  392. package/Infra/i18n/de/Hcloud/agents/hcloud-security.md +1 -1
  393. package/Infra/i18n/de/Hcloud/commands/architecture.md +2 -2
  394. package/Infra/i18n/de/Hcloud/commands/debug.md +3 -3
  395. package/Infra/i18n/de/Kubernetes/agents/kubernetes-architect.md +4 -0
  396. package/Infra/i18n/de/Kubernetes/agents/kubernetes-deployment.md +31 -0
  397. package/Infra/i18n/de/Kubernetes/agents/kubernetes-security.md +5 -1
  398. package/Infra/i18n/de/OpenTofu/agents/opentofu-architect.md +3 -1
  399. package/Infra/i18n/de/OpenTofu/agents/opentofu-deployment.md +2 -2
  400. package/Infra/i18n/de/OpenTofu/agents/opentofu-security.md +5 -5
  401. package/Infra/i18n/de/OpenTofu/commands/security-audit.md +1 -1
  402. package/Infra/i18n/de/PgBouncer/agents/pgbouncer-architect.md +1 -0
  403. package/Infra/i18n/de/PgBouncer/agents/pgbouncer-deployment.md +3 -3
  404. package/Infra/i18n/de/PgBouncer/agents/pgbouncer-monitoring.md +1 -1
  405. package/Infra/i18n/de/PgBouncer/commands/deploy-setup.md +1 -1
  406. package/Infra/i18n/en/Ansible/agents/ansible-architect.md +3 -1
  407. package/Infra/i18n/en/Ansible/agents/ansible-debug.md +1 -0
  408. package/Infra/i18n/en/Ansible/agents/ansible-deployment.md +3 -0
  409. package/Infra/i18n/en/Ansible/agents/ansible-security.md +2 -0
  410. package/Infra/i18n/en/Ansible/commands/security-audit.md +1 -1
  411. package/Infra/i18n/en/Coolify/agents/coolify-debug.md +1 -0
  412. package/Infra/i18n/en/Coolify/agents/coolify-deployment.md +5 -1
  413. package/Infra/i18n/en/Coolify/commands/coolify-debug.md +1 -0
  414. package/Infra/i18n/en/Coolify/commands/coolify-deploy.md +1 -0
  415. package/Infra/i18n/en/FrankenPHP/agents/frankenphp-architect.md +4 -2
  416. package/Infra/i18n/en/FrankenPHP/agents/frankenphp-deployment.md +2 -2
  417. package/Infra/i18n/en/FrankenPHP/agents/frankenphp-security.md +1 -1
  418. package/Infra/i18n/en/FrankenPHP/commands/deploy-setup.md +1 -1
  419. package/Infra/i18n/en/Hcloud/agents/hcloud-architect.md +10 -8
  420. package/Infra/i18n/en/Hcloud/agents/hcloud-cost.md +11 -9
  421. package/Infra/i18n/en/Hcloud/agents/hcloud-deployment.md +1 -1
  422. package/Infra/i18n/en/Kubernetes/agents/kubernetes-architect.md +4 -0
  423. package/Infra/i18n/en/Kubernetes/agents/kubernetes-deployment.md +31 -0
  424. package/Infra/i18n/en/Kubernetes/agents/kubernetes-security.md +5 -1
  425. package/Infra/i18n/en/OpenTofu/agents/opentofu-architect.md +3 -1
  426. package/Infra/i18n/en/OpenTofu/agents/opentofu-deployment.md +2 -2
  427. package/Infra/i18n/en/OpenTofu/agents/opentofu-security.md +5 -5
  428. package/Infra/i18n/en/OpenTofu/commands/security-audit.md +1 -1
  429. package/Infra/i18n/en/PgBouncer/agents/pgbouncer-architect.md +1 -0
  430. package/Infra/i18n/en/PgBouncer/agents/pgbouncer-deployment.md +3 -3
  431. package/Infra/i18n/en/PgBouncer/agents/pgbouncer-monitoring.md +1 -1
  432. package/Infra/i18n/en/PgBouncer/commands/deploy-setup.md +1 -1
  433. package/Infra/i18n/es/Ansible/agents/ansible-architect.md +3 -1
  434. package/Infra/i18n/es/Ansible/agents/ansible-debug.md +1 -0
  435. package/Infra/i18n/es/Ansible/agents/ansible-deployment.md +3 -0
  436. package/Infra/i18n/es/Ansible/agents/ansible-security.md +2 -0
  437. package/Infra/i18n/es/Ansible/commands/security-audit.md +1 -1
  438. package/Infra/i18n/es/Coolify/agents/coolify-debug.md +1 -0
  439. package/Infra/i18n/es/Coolify/agents/coolify-deployment.md +5 -1
  440. package/Infra/i18n/es/Coolify/commands/coolify-debug.md +1 -0
  441. package/Infra/i18n/es/Coolify/commands/coolify-deploy.md +1 -0
  442. package/Infra/i18n/es/FrankenPHP/agents/frankenphp-architect.md +4 -2
  443. package/Infra/i18n/es/FrankenPHP/agents/frankenphp-deployment.md +2 -2
  444. package/Infra/i18n/es/FrankenPHP/agents/frankenphp-security.md +1 -1
  445. package/Infra/i18n/es/FrankenPHP/commands/deploy-setup.md +1 -1
  446. package/Infra/i18n/es/Hcloud/agents/hcloud-architect.md +11 -9
  447. package/Infra/i18n/es/Hcloud/agents/hcloud-cost.md +11 -9
  448. package/Infra/i18n/es/Hcloud/agents/hcloud-deployment.md +1 -1
  449. package/Infra/i18n/es/Hcloud/commands/debug.md +1 -1
  450. package/Infra/i18n/es/Kubernetes/agents/kubernetes-architect.md +4 -0
  451. package/Infra/i18n/es/Kubernetes/agents/kubernetes-deployment.md +31 -0
  452. package/Infra/i18n/es/Kubernetes/agents/kubernetes-security.md +5 -1
  453. package/Infra/i18n/es/OpenTofu/agents/opentofu-architect.md +3 -1
  454. package/Infra/i18n/es/OpenTofu/agents/opentofu-deployment.md +2 -2
  455. package/Infra/i18n/es/OpenTofu/agents/opentofu-security.md +5 -5
  456. package/Infra/i18n/es/OpenTofu/commands/security-audit.md +1 -1
  457. package/Infra/i18n/es/PgBouncer/agents/pgbouncer-architect.md +1 -0
  458. package/Infra/i18n/es/PgBouncer/agents/pgbouncer-deployment.md +3 -3
  459. package/Infra/i18n/es/PgBouncer/agents/pgbouncer-monitoring.md +1 -1
  460. package/Infra/i18n/es/PgBouncer/commands/deploy-setup.md +1 -1
  461. package/Infra/i18n/fr/Ansible/agents/ansible-architect.md +3 -1
  462. package/Infra/i18n/fr/Ansible/agents/ansible-debug.md +1 -0
  463. package/Infra/i18n/fr/Ansible/agents/ansible-deployment.md +3 -0
  464. package/Infra/i18n/fr/Ansible/agents/ansible-security.md +2 -0
  465. package/Infra/i18n/fr/Ansible/commands/security-audit.md +1 -1
  466. package/Infra/i18n/fr/Coolify/agents/coolify-debug.md +1 -0
  467. package/Infra/i18n/fr/Coolify/agents/coolify-deployment.md +5 -1
  468. package/Infra/i18n/fr/Coolify/commands/coolify-debug.md +1 -0
  469. package/Infra/i18n/fr/Coolify/commands/coolify-deploy.md +1 -0
  470. package/Infra/i18n/fr/FrankenPHP/agents/frankenphp-architect.md +4 -2
  471. package/Infra/i18n/fr/FrankenPHP/agents/frankenphp-deployment.md +2 -2
  472. package/Infra/i18n/fr/FrankenPHP/agents/frankenphp-security.md +1 -1
  473. package/Infra/i18n/fr/FrankenPHP/commands/deploy-setup.md +1 -1
  474. package/Infra/i18n/fr/Hcloud/agents/hcloud-architect.md +7 -5
  475. package/Infra/i18n/fr/Hcloud/agents/hcloud-cost.md +11 -9
  476. package/Infra/i18n/fr/Hcloud/agents/hcloud-deployment.md +1 -1
  477. package/Infra/i18n/fr/Kubernetes/agents/kubernetes-architect.md +4 -0
  478. package/Infra/i18n/fr/Kubernetes/agents/kubernetes-deployment.md +31 -0
  479. package/Infra/i18n/fr/Kubernetes/agents/kubernetes-security.md +5 -1
  480. package/Infra/i18n/fr/OpenTofu/agents/opentofu-architect.md +3 -1
  481. package/Infra/i18n/fr/OpenTofu/agents/opentofu-deployment.md +2 -2
  482. package/Infra/i18n/fr/OpenTofu/agents/opentofu-security.md +5 -5
  483. package/Infra/i18n/fr/OpenTofu/commands/security-audit.md +1 -1
  484. package/Infra/i18n/fr/PgBouncer/agents/pgbouncer-architect.md +1 -0
  485. package/Infra/i18n/fr/PgBouncer/agents/pgbouncer-deployment.md +3 -3
  486. package/Infra/i18n/fr/PgBouncer/agents/pgbouncer-monitoring.md +1 -1
  487. package/Infra/i18n/fr/PgBouncer/commands/deploy-setup.md +1 -1
  488. package/Infra/i18n/pt/Ansible/agents/ansible-architect.md +3 -1
  489. package/Infra/i18n/pt/Ansible/agents/ansible-debug.md +1 -0
  490. package/Infra/i18n/pt/Ansible/agents/ansible-deployment.md +3 -0
  491. package/Infra/i18n/pt/Ansible/agents/ansible-security.md +2 -0
  492. package/Infra/i18n/pt/Ansible/commands/security-audit.md +1 -1
  493. package/Infra/i18n/pt/Coolify/agents/coolify-debug.md +1 -0
  494. package/Infra/i18n/pt/Coolify/agents/coolify-deployment.md +5 -1
  495. package/Infra/i18n/pt/Coolify/commands/coolify-debug.md +1 -0
  496. package/Infra/i18n/pt/Coolify/commands/coolify-deploy.md +1 -0
  497. package/Infra/i18n/pt/FrankenPHP/agents/frankenphp-architect.md +4 -2
  498. package/Infra/i18n/pt/FrankenPHP/agents/frankenphp-deployment.md +2 -2
  499. package/Infra/i18n/pt/FrankenPHP/agents/frankenphp-security.md +1 -1
  500. package/Infra/i18n/pt/FrankenPHP/commands/deploy-setup.md +1 -1
  501. package/Infra/i18n/pt/Hcloud/agents/hcloud-architect.md +9 -7
  502. package/Infra/i18n/pt/Hcloud/agents/hcloud-cost.md +11 -9
  503. package/Infra/i18n/pt/Hcloud/agents/hcloud-deployment.md +1 -1
  504. package/Infra/i18n/pt/Hcloud/commands/architecture.md +1 -1
  505. package/Infra/i18n/pt/Hcloud/commands/debug.md +1 -1
  506. package/Infra/i18n/pt/Kubernetes/agents/kubernetes-architect.md +4 -0
  507. package/Infra/i18n/pt/Kubernetes/agents/kubernetes-deployment.md +31 -0
  508. package/Infra/i18n/pt/Kubernetes/agents/kubernetes-security.md +5 -1
  509. package/Infra/i18n/pt/OpenTofu/agents/opentofu-architect.md +3 -1
  510. package/Infra/i18n/pt/OpenTofu/agents/opentofu-deployment.md +2 -2
  511. package/Infra/i18n/pt/OpenTofu/agents/opentofu-security.md +5 -5
  512. package/Infra/i18n/pt/OpenTofu/commands/security-audit.md +1 -1
  513. package/Infra/i18n/pt/PgBouncer/agents/pgbouncer-architect.md +1 -0
  514. package/Infra/i18n/pt/PgBouncer/agents/pgbouncer-deployment.md +3 -3
  515. package/Infra/i18n/pt/PgBouncer/agents/pgbouncer-monitoring.md +1 -1
  516. package/Infra/i18n/pt/PgBouncer/commands/deploy-setup.md +1 -1
  517. package/README.md +27 -15
  518. package/Tools/PluginExport/export-plugin.sh +15 -17
  519. package/Tools/Ralph/README.md +17 -7
  520. package/Tools/Ralph/hooks/lib/ralph-common.sh +101 -0
  521. package/Tools/Ralph/hooks/pre-tool-context.sh +28 -0
  522. package/Tools/Ralph/hooks/session-restore.sh +94 -0
  523. package/Tools/Ralph/hooks/stop-dod-gate.sh +60 -0
  524. package/Tools/Ralph/lib/hooks-generator.sh +109 -93
  525. package/bundles/cursor/.cursorrules +11 -10
  526. package/bundles/windsurf/.windsurfrules +11 -10
  527. package/cli/index.js +1 -0
  528. package/cli/lib/doctor.js +4 -3
  529. package/cli/lib/help.js +1 -0
  530. package/cli/lib/installer.js +1 -1
  531. package/cli/lib/parse-args.js +12 -0
  532. package/cli/lib/tech-registry.js +15 -5
  533. package/package.json +2 -1
  534. package/Dev/i18n/de/Common/hooks/scripts/post-tool-failure.sh +0 -89
  535. package/Dev/i18n/de/Common/hooks/scripts/pre-compact.sh +0 -53
  536. package/Dev/i18n/de/Common/hooks/scripts/session-end.sh +0 -98
  537. package/Dev/i18n/de/Common/templates/settings.json.template +0 -128
  538. package/Dev/i18n/en/Common/hooks/scripts/post-tool-failure.sh +0 -89
  539. package/Dev/i18n/en/Common/hooks/scripts/pre-compact.sh +0 -53
  540. package/Dev/i18n/en/Common/hooks/scripts/session-end.sh +0 -98
  541. package/Dev/i18n/en/Common/templates/settings.json.template +0 -128
  542. package/Dev/i18n/es/Common/hooks/scripts/post-tool-failure.sh +0 -89
  543. package/Dev/i18n/es/Common/hooks/scripts/pre-compact.sh +0 -53
  544. package/Dev/i18n/es/Common/hooks/scripts/session-end.sh +0 -98
  545. package/Dev/i18n/es/Common/templates/settings.json.template +0 -128
  546. package/Dev/i18n/fr/Common/hooks/scripts/post-tool-failure.sh +0 -88
  547. package/Dev/i18n/fr/Common/hooks/scripts/pre-compact.sh +0 -53
  548. package/Dev/i18n/fr/Common/hooks/scripts/session-end.sh +0 -98
  549. package/Dev/i18n/fr/Common/templates/settings.json.template +0 -128
  550. package/Dev/i18n/pt/Common/hooks/scripts/post-tool-failure.sh +0 -89
  551. package/Dev/i18n/pt/Common/hooks/scripts/pre-compact.sh +0 -53
  552. package/Dev/i18n/pt/Common/hooks/scripts/session-end.sh +0 -98
  553. package/Dev/i18n/pt/Common/templates/settings.json.template +0 -128
  554. package/Tools/Ralph/.ralph/hooks/pre-tool-context.sh +0 -100
  555. package/Tools/Ralph/.ralph/hooks/session-restore.sh +0 -118
  556. package/Tools/Ralph/.ralph/hooks/status-injector.sh +0 -147
  557. package/Tools/Ralph/.ralph/hooks/stop-dod-gate.sh +0 -137
@@ -0,0 +1,161 @@
1
+ # WordPress Quality Tools
2
+
3
+ > Scope: automated quality gates for plugins and block themes (WordPress 7.1 line). Run everything in Docker; the same commands run locally and in CI. Generic PHP quality tooling follows the `php` stack.
4
+
5
+ ## Overview
6
+
7
+ | Tool | Version | Purpose | Gate |
8
+ |------|---------|---------|------|
9
+ | PHPCS + WordPress Coding Standards | WPCS 3.4.1 | Style, security and i18n sniffs | Zero errors |
10
+ | PHPCompatibilityWP | current stable (verify on Packagist) | PHP version compatibility (`testVersion`) | Zero errors |
11
+ | PHPStan + `szepeviktor/phpstan-wordpress` | 2.0.4 | Static analysis with WordPress awareness | Level 6 minimum, target 8+ |
12
+ | `php-stubs/wordpress-stubs` | 7.1.2 | WordPress symbols for analysis | Required by PHPStan setup |
13
+ | `@wordpress/eslint-plugin` via `wp-scripts lint-js` | 28.1.0 | JS and block editor lint | Zero warnings |
14
+ | Stylelint via `wp-scripts lint-style` | bundled with `@wordpress/scripts` 37.1.0 | CSS / SCSS lint | Zero errors |
15
+ | Plugin Check (PCP) | WordPress.org plugin | Guidelines, security, i18n, performance checks | No errors before release |
16
+ | `composer audit`, `npm audit` | n/a | Dependency vulnerabilities | No moderate or higher |
17
+
18
+ ## PHPCS (WordPress Coding Standards)
19
+
20
+ ```xml
21
+ <?xml version="1.0"?>
22
+ <ruleset name="Acme Reports">
23
+ <description>WordPress Coding Standards for Acme Reports.</description>
24
+ <file>.</file>
25
+ <exclude-pattern>/vendor/*</exclude-pattern>
26
+ <exclude-pattern>/node_modules/*</exclude-pattern>
27
+ <exclude-pattern>/build/*</exclude-pattern>
28
+ <arg name="extensions" value="php"/>
29
+ <arg value="ps"/>
30
+ <arg name="colors"/>
31
+
32
+ <rule ref="WordPress"/>
33
+ <config name="minimum_wp_version" value="6.6"/>
34
+ <config name="testVersion" value="7.4-"/>
35
+
36
+ <rule ref="WordPress.WP.I18n">
37
+ <properties><property name="text_domain" type="array"><element value="acme-reports"/></property></properties>
38
+ </rule>
39
+ <rule ref="WordPress.NamingConventions.PrefixAllGlobals">
40
+ <properties><property name="prefixes" type="array"><element value="acme_reports"/><element value="Acme\Reports"/></property></properties>
41
+ </rule>
42
+ </ruleset>
43
+ ```
44
+
45
+ - `WordPress` = Core + Docs + Extra. Add `PHPCompatibilityWP` with `testVersion` equal to your `Requires PHP`
46
+ - `phpcbf` fixes what it can; run `phpcs -s` to show sniff names so exclusions are precise
47
+ - Each `// phpcs:ignore Sniff.Name -- reason` is one line, names the sniff and gives a reason; never disable a whole file for security sniffs (`WordPress.Security.*`, `WordPress.DB.*`)
48
+
49
+ ```bash
50
+ docker compose exec app vendor/bin/phpcs
51
+ docker compose exec app vendor/bin/phpcbf
52
+ ```
53
+
54
+ ## PHPStan
55
+
56
+ ```neon
57
+ # phpstan.neon.dist
58
+ includes:
59
+ - vendor/szepeviktor/phpstan-wordpress/extension.neon
60
+ parameters:
61
+ level: 6
62
+ paths:
63
+ - src
64
+ - my-plugin.php
65
+ excludePaths:
66
+ - vendor
67
+ - node_modules
68
+ - build
69
+ scanDirectories:
70
+ - ../woocommerce # only when extending WooCommerce
71
+ ```
72
+
73
+ - The extension loads `php-stubs/wordpress-stubs` and adds dynamic return types for `get_option()`, `apply_filters()`, `WP_Error` handling and more
74
+ - Raise the level progressively; use a baseline (`phpstan analyse --generate-baseline`) that only shrinks
75
+ - Narrow `mixed` values from options and meta before use; do not silence with `@phpstan-ignore` wholesale
76
+ - For WooCommerce projects add `php-stubs/woocommerce-stubs` (see the `woocommerce` skill)
77
+
78
+ ```bash
79
+ docker compose exec app vendor/bin/phpstan analyse --memory-limit=1G
80
+ ```
81
+
82
+ ## JavaScript Quality
83
+
84
+ ```bash
85
+ docker compose exec app npx wp-scripts lint-js
86
+ docker compose exec app npx wp-scripts lint-style
87
+ docker compose exec app npx wp-scripts format --check # Prettier via @wordpress/prettier-config
88
+ docker compose exec app npx tsc --noEmit # when TypeScript is used
89
+ ```
90
+
91
+ `wp-scripts lint-js` uses `@wordpress/eslint-plugin` recommended rules; keep `.eslintrc.js` (or `eslint.config.js`) minimal and extend `plugin:@wordpress/eslint-plugin/recommended`.
92
+
93
+ ## Plugin Check (PCP)
94
+
95
+ Plugin Check is the official WordPress.org tool that mirrors the plugin review checks: security, i18n, file hygiene, performance, plugin header and readme validation.
96
+
97
+ ```bash
98
+ docker compose exec app npx wp-env run cli wp plugin install plugin-check --activate
99
+ docker compose exec app npx wp-env run cli wp plugin check my-plugin
100
+ ```
101
+
102
+ Run it before each release and in CI against a built ZIP, not the dev tree; fix every error and review warnings.
103
+
104
+ ## Dependency and Supply Chain
105
+
106
+ ```bash
107
+ docker compose exec app composer audit
108
+ docker compose exec app npm audit --omit=dev --audit-level=moderate
109
+ ```
110
+
111
+ - Pin versions through lockfiles; review new dependencies (maintenance, license compatible with GPL)
112
+ - Prefix vendor code (Strauss or PHP-Scoper) when conflicts with other plugins are possible
113
+ - Generate an SBOM (CycloneDX) for release artifacts when the distribution channel requires it
114
+
115
+ ## CI Pipeline (GitHub Actions sketch)
116
+
117
+ ```yaml
118
+ name: ci
119
+ on: [pull_request]
120
+ jobs:
121
+ php:
122
+ runs-on: ubuntu-latest
123
+ strategy:
124
+ matrix:
125
+ php: ['7.4', '8.3']
126
+ steps:
127
+ - uses: actions/checkout@v4
128
+ - uses: shivammathur/setup-php@v2
129
+ with: { php-version: '${{ matrix.php }}', tools: composer }
130
+ - run: composer install --no-progress
131
+ - run: vendor/bin/phpcs
132
+ - run: vendor/bin/phpstan analyse --memory-limit=1G
133
+ - run: composer audit
134
+ js-and-e2e:
135
+ runs-on: ubuntu-latest
136
+ steps:
137
+ - uses: actions/checkout@v4
138
+ - uses: actions/setup-node@v4
139
+ with: { node-version-file: .nvmrc, cache: npm }
140
+ - run: npm ci
141
+ - run: npx wp-scripts lint-js && npx wp-scripts test-unit-js
142
+ - run: npx wp-env start
143
+ - run: npx wp-env run tests-cli --env-cwd=wp-content/plugins/my-plugin vendor/bin/phpunit
144
+ - run: npx playwright install --with-deps chromium && npx playwright test
145
+ ```
146
+
147
+ Adapt action versions and the Node version to your policy; pin third-party actions by commit SHA for supply-chain safety.
148
+
149
+ ## Pre-Commit
150
+
151
+ Use Lefthook or Husky to run `phpcs` and `wp-scripts lint-js` on staged files and the unit suites on push. Hooks are requirements, CLAUDE.md is a suggestion.
152
+
153
+ ## Sources
154
+
155
+ - https://github.com/WordPress/WordPress-Coding-Standards
156
+ - https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/
157
+ - https://github.com/szepeviktor/phpstan-wordpress
158
+ - https://wordpress.org/plugins/plugin-check/
159
+ - https://developer.wordpress.org/block-editor/reference-guides/packages/packages-scripts/
160
+ - https://developer.wordpress.org/block-editor/reference-guides/packages/packages-eslint-plugin/
161
+ - https://packagist.org/ (versions verified 2026-11-10)
@@ -0,0 +1,175 @@
1
+ # WordPress Security
2
+
3
+ > Scope: security of plugins and block themes (WordPress 7.1 line, PHP 7.4 minimum, 8.3+ recommended), mapped to OWASP Top 10:2025. Server hardening, hosting and Bedrock are out of scope. WooCommerce payment and webhook security is in the optional `woocommerce` skill.
4
+
5
+ ## Principle
6
+
7
+ Validate and sanitize input early, escape output late, check a capability and a nonce on every state change, and treat every request, option, meta value and remote response as untrusted. Most WordPress plugin vulnerabilities are missing authorization, missing CSRF protection, SQL injection and unescaped output.
8
+
9
+ ## Authorization (OWASP A01)
10
+
11
+ - Check a **specific capability** with `current_user_can()` before any state change or sensitive read: `manage_options`, `edit_post` with the post id, `delete_user` with the user id. `is_admin()` only says the admin screen is loading; it is not an authorization check. `is_user_logged_in()` alone is not authorization either
12
+ - Per-object capabilities defeat IDOR: always pass the object id from the request to `current_user_can( 'edit_post', $id )`
13
+ - Admin pages declare a capability on `add_menu_page()` / `add_submenu_page()` and the callback checks it again
14
+ - `wp_ajax_nopriv_*` exposes the handler to anonymous visitors: use only when intended, and validate everything
15
+ - Add custom capabilities and roles on activation, remove them on uninstall
16
+
17
+ ```php
18
+ add_action( 'admin_post_acme_delete_report', 'acme_handle_delete_report' );
19
+
20
+ function acme_handle_delete_report(): void {
21
+ $id = isset( $_POST['report_id'] ) ? absint( $_POST['report_id'] ) : 0;
22
+
23
+ if ( ! current_user_can( 'delete_post', $id ) ) {
24
+ wp_die( esc_html__( 'Not allowed.', 'acme-reports' ), '', array( 'response' => 403 ) );
25
+ }
26
+ check_admin_referer( 'acme_delete_report_' . $id );
27
+
28
+ wp_delete_post( $id, true );
29
+ wp_safe_redirect( add_query_arg( 'deleted', 1, admin_url( 'admin.php?page=acme-reports' ) ) );
30
+ exit;
31
+ }
32
+ ```
33
+
34
+ ## Nonces (CSRF)
35
+
36
+ - Create: `wp_nonce_field( 'action', '_wpnonce' )` in forms, `wp_nonce_url()` for links, `wp_create_nonce()` for JavaScript
37
+ - Verify: `check_admin_referer( 'action' )` (forms and links), `check_ajax_referer( 'action', 'nonce' )` (AJAX), or `wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['_wpnonce'] ?? '' ) ), 'action' )`
38
+ - Nonces prove intent, not identity or permission: always pair with `current_user_can()`. Nonces are not single-use secrets and expire (12 to 24 hours); never use them for authentication
39
+ - Cookie-authenticated REST requests carry the `X-WP-Nonce` header (`wp_rest` action); `@wordpress/api-fetch` adds it automatically
40
+
41
+ ## Input: Validate and Sanitize
42
+
43
+ Read superglobals defensively: check existence, `wp_unslash()`, then validate and sanitize for the data type.
44
+
45
+ | Data | Function |
46
+ |------|----------|
47
+ | Text line | `sanitize_text_field()` |
48
+ | Multi-line text | `sanitize_textarea_field()` |
49
+ | Email | `sanitize_email()` + `is_email()` |
50
+ | Slug / key | `sanitize_key()`, `sanitize_title()` |
51
+ | File name | `sanitize_file_name()` |
52
+ | Integer | `absint()`, `(int)` |
53
+ | URL to store | `esc_url_raw()` |
54
+ | HTML subset | `wp_kses( $html, $allowed )`, `wp_kses_post()` |
55
+ | Enumeration | allow-list with `in_array( $v, $allowed, true )` |
56
+
57
+ - Validate before sanitizing when a strict format is required; reject rather than silently fix
58
+ - REST `args` use `type`, `enum`, `format`, `required`, `validate_callback`, `sanitize_callback`; `register_setting()` uses `sanitize_callback`; registered meta uses `sanitize_callback` and `auth_callback`
59
+ - Never `extract( $_POST )` or mass-assign request arrays into options, user meta or post fields; list allowed keys
60
+
61
+ ## Output: Escape Late
62
+
63
+ Escape at the point of output, with the function matching the context.
64
+
65
+ | Context | Function |
66
+ |---------|----------|
67
+ | HTML text | `esc_html()`, `esc_html__()`, `esc_html_e()` |
68
+ | HTML attribute | `esc_attr()`, `esc_attr__()` |
69
+ | URL (href, src, form action) | `esc_url()` |
70
+ | Inline JavaScript data | `wp_json_encode()` or `wp_add_inline_script()` with JSON; `esc_js()` for legacy inline handlers |
71
+ | Textarea content | `esc_textarea()` |
72
+ | Limited HTML | `wp_kses_post()`, `wp_kses( $html, $allowed )` |
73
+
74
+ - Escape values from the database too (options, meta, term names, user fields): stored data is untrusted
75
+ - `$_SERVER['REQUEST_URI']`, `HTTP_HOST` and `add_query_arg()` / `remove_query_arg()` results are escaped with `esc_url()` or `esc_attr()`
76
+ - In block `render.php`, escape each attribute and content value; `get_block_wrapper_attributes()` returns escaped markup that is output directly
77
+ - JavaScript: never assign untrusted strings to `innerHTML`, `dangerouslySetInnerHTML` or `RawHTML`; React text nodes are escaped by default
78
+ - Redirect with `wp_safe_redirect()` and `exit`; validate user-supplied targets with `wp_validate_redirect()`
79
+
80
+ ## Database (OWASP A05)
81
+
82
+ ```php
83
+ global $wpdb;
84
+
85
+ $row = $wpdb->get_row(
86
+ $wpdb->prepare(
87
+ "SELECT * FROM {$wpdb->prefix}acme_reports WHERE owner_id = %d AND status = %s",
88
+ $user_id,
89
+ $status
90
+ )
91
+ );
92
+
93
+ // Identifiers: %i (supported since WordPress 6.2)
94
+ $wpdb->get_results( $wpdb->prepare( 'SELECT %i FROM %i', $column, $table ) );
95
+
96
+ // LIKE
97
+ $like = '%' . $wpdb->esc_like( $term ) . '%';
98
+ $wpdb->get_results( $wpdb->prepare( "SELECT id FROM {$wpdb->prefix}acme_reports WHERE title LIKE %s", $like ) );
99
+ ```
100
+
101
+ - Every query with a variable goes through `$wpdb->prepare()` using `%s`, `%d`, `%f`, and `%i` for identifiers; never concatenate or interpolate user data, including `ORDER BY` and `LIMIT` (allow-list the column and direction, cast the integers)
102
+ - `IN (...)`: build `implode( ',', array_fill( 0, count( $ids ), '%d' ) )` placeholders and spread the values
103
+ - Prefer `$wpdb->insert()`, `update()`, `delete()` with format arrays, `WP_Query` and meta APIs over raw SQL
104
+
105
+ ## REST API and AJAX
106
+
107
+ - Every `register_rest_route()` has a `permission_callback`. Write routes (`POST`, `PUT`, `PATCH`, `DELETE`) must never use `__return_true`; public reads may use it deliberately, with no private fields exposed
108
+ - Check object-level rights inside the permission callback using the id from the request
109
+ - Response schemas decide what leaves the server: never return password hashes, tokens, emails of other users, internal paths or raw option dumps
110
+ - External clients authenticate with Application Passwords (core) or OAuth; do not invent token schemes
111
+ - Do not enable permissive CORS (`Access-Control-Allow-Origin: *`) for authenticated endpoints
112
+
113
+ ## File Handling
114
+
115
+ - Uploads: `wp_handle_upload()` / `media_handle_upload()` with an allow-list of MIME types and extensions (`wp_check_filetype_and_ext()`), a size limit, and the `upload_files` capability; never trust the client name or MIME type; do not store uploads in executable locations
116
+ - Guard direct access: `defined( 'ABSPATH' ) || exit;` at the top of every PHP file that can be requested by URL
117
+ - File paths from user input: allow-list names, resolve with `realpath()` and verify the result stays inside the intended directory; never `include` or `require` a variable path
118
+ - Use `WP_Filesystem` for writes outside uploads when permissions require it; do not write exports to guessable public paths
119
+ - 7.1 client-side media processing (wasm-vips in a Web Worker, on by default in Chromium 137+ with `Document-Isolation-Policy: isolate-and-credentialless`) uploads sub-sizes through `POST /wp/v2/media/{id}/sideload`: keep the `upload_files` capability and MIME allow-list on custom upload paths, make sure your CSP `worker-src` allows `blob:`, and opt out with `add_filter( 'wp_client_side_media_processing_enabled', '__return_false' )` if needed. Source: https://make.wordpress.org/core/2026/07/22/client-side-media-processing-in-wordpress-7-1/
120
+
121
+ ## Data and Object Handling
122
+
123
+ - Never `unserialize()` user-controlled or remote data (PHP object injection); use `json_decode()`; `maybe_unserialize()` is for trusted core storage only
124
+ - No `eval()`, `assert()` with strings, `shell_exec()`, `system()`, `exec()`, `proc_open()` with user data; if a process is unavoidable, use `escapeshellarg()` and fixed commands
125
+ - Passwords, keys and tokens: `wp_generate_password()`, `wp_generate_uuid4()`, `random_bytes()`; compare secrets with `hash_equals()`; never `md5`, `sha1`, `rand` or `mt_rand` for security
126
+
127
+ ## Outbound Requests (SSRF)
128
+
129
+ - Use the HTTP API (`wp_remote_get`, `wp_remote_post`), never raw cURL; for URLs that come from users or settings use `wp_safe_remote_get()` / `wp_safe_remote_post()`, which reject local and private addresses (the `reject_unsafe_urls` argument)
130
+ - Set timeouts, handle `WP_Error`, validate the response, and cache results
131
+ - Webhook receivers verify an HMAC signature with `hash_equals()` and a timestamp window; respond quickly and process asynchronously
132
+
133
+ ## Options, Secrets and Configuration
134
+
135
+ - Store secrets in `wp-config.php` constants or environment variables rather than plain options; if stored, treat as sensitive: `autoload` false, never `show_in_rest`, never logged
136
+ - Options autoload: pass `false` for large, rarely used or sensitive options (`add_option( $name, $value, '', false )`, `update_option( $name, $value, false )`); autoloaded data is read on every request
137
+ - Do not commit credentials, API keys or salts; scan with a secrets detector in CI
138
+ - Never print stack traces or debug output to visitors; `WP_DEBUG_DISPLAY` off in production; log without secrets or personal data
139
+
140
+ ## Privacy
141
+
142
+ When the plugin stores personal data, register exporters and erasers (`wp_privacy_personal_data_exporters`, `wp_privacy_personal_data_erasers`), document what is collected, delete it on uninstall, and add privacy policy text with `wp_add_privacy_policy_content()`.
143
+
144
+ ## Supply Chain (OWASP A03)
145
+
146
+ - `composer audit` and `npm audit --omit=dev --audit-level=moderate` in CI; lockfiles committed
147
+ - Review third-party libraries (maintenance, license compatible with GPL); prefer WordPress core APIs to extra dependencies
148
+ - Build release ZIPs in CI from a clean checkout with production dependencies only; verify with Plugin Check; sign or attest artifacts when the channel supports it
149
+
150
+ ## Pre-Release Security Checklist
151
+
152
+ - [ ] Every state-changing handler has a capability check and a nonce
153
+ - [ ] Every REST route has a real `permission_callback`; writes never `__return_true`
154
+ - [ ] All superglobal reads use `wp_unslash()` and a sanitizer; allow-lists for enumerations
155
+ - [ ] All output escaped late with the right context function
156
+ - [ ] All SQL with variables uses `$wpdb->prepare()`; no concatenation
157
+ - [ ] No `unserialize()` on user data; no `eval`/`exec` with user data; no dynamic `include`
158
+ - [ ] Uploads validated; direct access guards in place
159
+ - [ ] Remote requests to user URLs use `wp_safe_remote_*`; webhooks verify signatures
160
+ - [ ] Secrets absent from the repository; sensitive options not autoloaded or exposed
161
+ - [ ] `composer audit` and `npm audit` clean; Plugin Check passes
162
+ - [ ] Uninstall removes data; privacy exporters and erasers registered if applicable
163
+
164
+ ## Sources
165
+
166
+ - https://developer.wordpress.org/apis/security/
167
+ - https://developer.wordpress.org/apis/security/data-validation/
168
+ - https://developer.wordpress.org/apis/security/sanitizing/
169
+ - https://developer.wordpress.org/apis/security/escaping/
170
+ - https://developer.wordpress.org/apis/security/nonces/
171
+ - https://developer.wordpress.org/apis/security/user-roles-and-capabilities/
172
+ - https://developer.wordpress.org/reference/classes/wpdb/prepare/
173
+ - https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/#permissions-callback
174
+ - https://developer.wordpress.org/plugins/privacy/
175
+ - https://owasp.org/Top10/2025/
@@ -0,0 +1,214 @@
1
+ # WooCommerce Extension Reference
2
+
3
+ > Scope: extending WooCommerce 11.2 (reference 11.2.2; requires WordPress 7.0 and PHP 7.4) from plugins. Complements the WordPress rules; does not repeat them. Out of scope: store operations, hosting, themes for stores beyond block theme basics.
4
+
5
+ ## 1. Dependency and Bootstrap
6
+
7
+ - Plugin header: `Requires Plugins: woocommerce` makes WordPress block activation without WooCommerce
8
+ - Start WooCommerce-dependent code on `plugins_loaded` (after WooCommerce loads) or `woocommerce_loaded` / `woocommerce_init`; guard with `class_exists( 'WooCommerce' )`
9
+ - Declare feature compatibility early, on `before_woocommerce_init`
10
+
11
+ ```php
12
+ add_action(
13
+ 'before_woocommerce_init',
14
+ static function () {
15
+ if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
16
+ \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
17
+ \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'cart_checkout_blocks', __FILE__, true );
18
+ }
19
+ }
20
+ );
21
+ ```
22
+
23
+ Only declare compatibility you have verified; declaring `false` warns merchants who try to enable the feature.
24
+
25
+ ## 2. HPOS (High-Performance Order Storage)
26
+
27
+ Orders live in dedicated tables (`wc_orders`, `wc_orders_meta`, ...), not in `wp_posts` / `wp_postmeta`.
28
+
29
+ | Do | Do not |
30
+ |----|--------|
31
+ | `wc_get_order( $id )`, `wc_get_orders( $args )` | `get_post( $order_id )`, `new WP_Query( array( 'post_type' => 'shop_order' ) )` |
32
+ | `$order->get_meta( 'key' )` | `get_post_meta( $order_id, 'key', true )` |
33
+ | `$order->update_meta_data( 'key', $v ); $order->save();` | `update_post_meta( $order_id, 'key', $v )` |
34
+ | `$order->get_status()`, `$order->update_status()` | `get_post_status( $order_id )` |
35
+ | `OrderUtil::is_order( $id )`, `OrderUtil::get_order_type( $id )` | `get_post_type( $id ) === 'shop_order'` |
36
+ | Raw SQL via the datastore or `wc_get_orders()` with `meta_query` | `$wpdb->posts` joins for orders |
37
+
38
+ ```php
39
+ $order = wc_get_order( $order_id );
40
+ if ( ! $order instanceof WC_Order ) {
41
+ return;
42
+ }
43
+ $order->update_meta_data( '_acme_tracking_ref', sanitize_text_field( $ref ) );
44
+ $order->save();
45
+ ```
46
+
47
+ - Search with `wc_get_orders( array( 'status' => 'processing', 'limit' => 20, 'paginate' => true ) )`; use `return => 'ids'` when only ids are needed
48
+ - Admin screen id for orders: `wc_get_page_screen_id( 'shop-order' )`; compare it with `get_current_screen()->id` when adding meta boxes or enqueuing admin assets (the screen differs between HPOS and legacy storage)
49
+ - Meta boxes on orders: use `add_meta_box( ..., wc_get_page_screen_id( 'shop-order' ), ... )`; the callback receives a `WP_Post` (legacy) or a `WC_Order` (HPOS): normalize with `$order = $post_or_order instanceof WP_Post ? wc_get_order( $post_or_order->ID ) : $post_or_order;`
50
+ - Order list columns and bulk actions: the HPOS orders screen (`wc_get_page_screen_id( 'shop-order' )`) is not the legacy `edit.php?post_type=shop_order` list, so hooks tied to the legacy post list must be audited (see the HPOS recipe book) and the HPOS screen equivalents used.
51
+ - Synchronization (compatibility mode) between HPOS and posts tables exists for migration; code must not rely on legacy posts data being current. Never write to the posts tables directly
52
+ - Test with HPOS enabled (and disabled if you support legacy), using `wp wc hpos enable` through WP-CLI in the test environment (see the WC-CLI HPOS commands)
53
+
54
+ ## 3. WC_Data CRUD
55
+
56
+ `WC_Product`, `WC_Order`, `WC_Order_Item`, `WC_Customer`, `WC_Coupon` extend `WC_Data`: getters/setters change in-memory state, `save()` persists through a data store and fires hooks.
57
+
58
+ ```php
59
+ $product = wc_get_product( $product_id );
60
+ $product->set_regular_price( '19.90' );
61
+ $product->update_meta_data( '_acme_origin', 'FR' );
62
+ $product->save();
63
+
64
+ $customer = new WC_Customer( $user_id );
65
+ $customer->set_billing_phone( sanitize_text_field( $phone ) );
66
+ $customer->save();
67
+ ```
68
+
69
+ - Use `wc_get_products()` / `WC_Product_Query` for lookups, with `limit`, `return => 'ids'` and `paginate`
70
+ - Money: treat prices as strings, use `wc_format_decimal()`, `wc_price()` for display (escaped by WooCommerce), `wc_get_price_decimals()`; never floats for totals
71
+ - Custom product types extend `WC_Product` (or a subclass) with a data store; register via `product_type_selector` and `woocommerce_product_class`
72
+ - Custom order item or data fields use the object meta API (`update_meta_data`) rather than new tables, unless the volume justifies one (then a custom table with its own datastore)
73
+ - Use `wc_get_logger()` with a `source` context instead of `error_log()`; never log payment data
74
+
75
+ ## 4. Hooks You Will Use
76
+
77
+ | Need | Hook |
78
+ |------|------|
79
+ | Order created at checkout | `woocommerce_checkout_order_processed`, or block checkout: `woocommerce_store_api_checkout_order_processed` |
80
+ | Order status changes | `woocommerce_order_status_changed`, `woocommerce_order_status_{status}`, `woocommerce_payment_complete` |
81
+ | Cart totals and fees | `woocommerce_cart_calculate_fees`, `woocommerce_before_calculate_totals` |
82
+ | Product price filters | `woocommerce_product_get_price`, `woocommerce_get_price_html` |
83
+ | Add to cart validation | `woocommerce_add_to_cart_validation` |
84
+ | Emails | `woocommerce_email_classes`, `woocommerce_email_order_meta` |
85
+ | Payment gateways | `woocommerce_payment_gateways` |
86
+ | Shipping methods | `woocommerce_shipping_methods` |
87
+ | Settings tabs | `woocommerce_get_settings_pages`, `woocommerce_settings_tabs_array` |
88
+
89
+ Prefer filters and actions over template overrides; if you must override a template, use `wc_get_template()` with your own path and a `woocommerce_locate_template` filter rather than copying templates into the theme.
90
+
91
+ ## 5. Store API and Cart / Checkout Blocks
92
+
93
+ The Cart and Checkout blocks render through the Store API (`wc/store/v1`), not through classic template hooks. Extend them with the Store API and the blocks extensibility layer.
94
+
95
+ **Add data to an endpoint** (server side, on `woocommerce_blocks_loaded`):
96
+
97
+ ```php
98
+ use Automattic\WooCommerce\StoreApi\Schemas\V1\CartSchema;
99
+
100
+ add_action(
101
+ 'woocommerce_blocks_loaded',
102
+ static function () {
103
+ woocommerce_store_api_register_endpoint_data(
104
+ array(
105
+ 'endpoint' => CartSchema::IDENTIFIER,
106
+ 'namespace' => 'acme_loyalty',
107
+ 'data_callback' => static function () {
108
+ return array( 'points' => 120 );
109
+ },
110
+ 'schema_callback' => static function () {
111
+ return array(
112
+ 'points' => array(
113
+ 'description' => __( 'Loyalty points', 'acme-loyalty' ),
114
+ 'type' => 'integer',
115
+ 'readonly' => true,
116
+ ),
117
+ );
118
+ },
119
+ 'schema_type' => ARRAY_A,
120
+ )
121
+ );
122
+ }
123
+ );
124
+ ```
125
+
126
+ The data appears under `extensions.acme_loyalty` in the Cart response. Use `CheckoutSchema::IDENTIFIER` for the Checkout endpoint; `ExtendSchema::register_endpoint_data()` (obtained from the Store API container) is the underlying API.
127
+
128
+ **Update server state from the front end**: register an update callback with `woocommerce_store_api_register_update_callback()` (namespace plus callback) and call `extensionCartUpdate()` from `@woocommerce/blocks-checkout`.
129
+
130
+ **Render UI**: use slot-fills (for example `ExperimentalOrderMeta`, discount and totals slots) from `@woocommerce/blocks-checkout`, registered with `registerPlugin()` using the `woocommerce-checkout` scope; slots with an `Experimental` prefix may change, so isolate them and test on upgrades. For new inner blocks, register them with `block.json` and the checkout parent (`parent`/`ancestor`).
131
+
132
+ **Server-side integration**: implement `Automattic\WooCommerce\Blocks\Integrations\IntegrationInterface` (`get_name()`, `initialize()`, `get_script_handles()`, `get_editor_script_handles()`, `get_script_data()`) and register it on `woocommerce_blocks_cart_block_registration` / `woocommerce_blocks_checkout_block_registration` through `$integration_registry->register( new My_Integration() )`.
133
+
134
+ **Save checkout field values**: listen to `woocommerce_store_api_checkout_update_order_from_request` (receives `$order` and `$request`), validate and sanitize the extension data, then `$order->update_meta_data()`; the block checkout does not post classic form fields.
135
+
136
+ - Block checkout does not fire many classic hooks (`woocommerce_checkout_fields`, `woocommerce_after_order_notes`, ...): use Additional Checkout Fields (`woocommerce_register_additional_checkout_field()`) or the Store API extension
137
+ - Keep the Store API contract stable: namespaced data only, no changes to core keys
138
+ - Declare `cart_checkout_blocks` compatibility only after testing both blocks and the shortcode fallback
139
+
140
+ ## 6. REST API (wc/v3) and Webhooks
141
+
142
+ - Core REST endpoints are under `wc/v3` (orders, products, customers, coupons, ...): authenticate external clients with API keys (consumer key/secret over HTTPS) or Application Passwords; scopes are read, write, read/write
143
+ - Extend with `woocommerce_rest_prepare_*` filters or register your own namespace (`acme/v1`) following the WordPress REST rules; use `wc_rest_check_post_permissions()` / `wc_rest_check_manager_permissions()` or an explicit capability in your `permission_callback`
144
+ - Webhooks: WooCommerce signs delivery with an HMAC-SHA256 base64 signature in `X-WC-Webhook-Signature` computed with the webhook secret over the raw body; as a receiver verify it with `hash_equals()` before processing
145
+ - Respond quickly to incoming gateway webhooks and process asynchronously (Action Scheduler: `as_enqueue_async_action()`, `as_schedule_single_action()`), with idempotency keys so replays are safe
146
+
147
+ ## 7. Payment Gateways
148
+
149
+ - Extend `WC_Payment_Gateway`; implement `process_payment( $order_id )` returning `array( 'result' => 'success', 'redirect' => ... )`, `init_form_fields()` and `process_admin_options()`; register on `woocommerce_payment_gateways`
150
+ - For block checkout, also provide a payment method integration: extend `AbstractPaymentMethodType` (`Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType`), register it on `woocommerce_blocks_payment_method_type_registration`, and register the client script with `registerPaymentMethod()` from `@woocommerce/blocks-registry`
151
+ - Never handle raw card data on your server; use the provider's hosted fields or redirect; PCI scope stays with the provider
152
+ - Re-compute amounts server-side from the order, never trust client totals; compare webhook amount and currency with the order before marking paid
153
+ - Verify webhook authenticity (provider signature, timestamp tolerance, `hash_equals()`), make handlers idempotent (check the order status/transaction id before `payment_complete()`), log with `wc_get_logger()` without secrets
154
+ - Store provider secrets in constants or encrypted options, never in autoloaded plain options exposed through REST
155
+ - Support refunds with `process_refund()` and declare it in `$this->supports`; declare `supports` for features you implement only
156
+
157
+ ## 8. Admin and Settings
158
+
159
+ - Settings pages: extend `WC_Settings_Page` or use the Settings API fields (`woocommerce_admin_fields()`, `woocommerce_update_options()`) inside WooCommerce's tabs
160
+ - Capabilities: `manage_woocommerce` for settings and reports, `edit_shop_orders` / `edit_shop_order` (HPOS aware via `current_user_can( 'edit_shop_order', $id )`) for orders
161
+ - Do not add heavy queries to the orders list; use HPOS-aware filters and indexes
162
+
163
+ ## 9. Performance
164
+
165
+ - Avoid loading all orders or products; paginate and use `return => 'ids'`
166
+ - Defer heavy work to Action Scheduler (bundled with WooCommerce) instead of WP-Cron for long jobs; chunk batches
167
+ - Cache computed values in transients keyed by cart hash or order id and invalidate on `woocommerce_update_product` / order status changes
168
+ - Load front-end assets only on shop, cart, checkout and account pages (`is_woocommerce()`, `is_cart()`, `is_checkout()`, `is_account_page()`), or when your block is present
169
+
170
+ ## 10. Testing
171
+
172
+ | Surface | Setup |
173
+ |---------|-------|
174
+ | Static analysis | `php-stubs/woocommerce-stubs` 11.2.2 with PHPStan (`szepeviktor/phpstan-wordpress`); add it to `require-dev` and `scanDirectories` or `bootstrapFiles` as needed |
175
+ | Integration | `wp-env` with WooCommerce installed; `WP_UnitTestCase`; create fixtures with the CRUD API (`wc_create_order()`, `WC_Product_Simple`) in small helpers of your own |
176
+ | E2E | Playwright against `wp-env`; seed products through the `wc/v3` REST API or WP-CLI (`wp wc product create`), test classic and block checkout |
177
+
178
+ `.wp-env.json`:
179
+
180
+ ```json
181
+ {
182
+ "plugins": [
183
+ ".",
184
+ "https://downloads.wordpress.org/plugin/woocommerce.latest-stable.zip"
185
+ ],
186
+ "config": { "WP_DEBUG": true, "WP_DEBUG_LOG": true }
187
+ }
188
+ ```
189
+
190
+ Pin a WooCommerce version in CI (for example the minimum you support and the latest) by replacing `latest-stable` with a versioned ZIP; HPOS and legacy storage are both worth a CI job when you declare compatibility.
191
+
192
+ ```php
193
+ class Acme_Order_Test extends WP_UnitTestCase {
194
+
195
+ public function test_tracking_ref_is_saved_on_order(): void {
196
+ $order = wc_create_order();
197
+ $order->update_meta_data( '_acme_tracking_ref', 'REF-1' );
198
+ $order->save();
199
+
200
+ $this->assertSame( 'REF-1', wc_get_order( $order->get_id() )->get_meta( '_acme_tracking_ref' ) );
201
+ }
202
+ }
203
+ ```
204
+
205
+ ## Sources
206
+
207
+ - https://developer.woocommerce.com/docs/features/orders/high-performance-order-storage/recipe-book
208
+ - https://developer.woocommerce.com/docs/block-development/extensible-blocks/cart-and-checkout-blocks
209
+ - https://developer.woocommerce.com/docs/apis/store-api/extending-store-api/extend-store-api-add-data
210
+ - https://developer.woocommerce.com/docs/block-development/reference/slot-fills
211
+ - https://developer.woocommerce.com/docs/wc-cli/wc-cli-commands/wc-hpos
212
+ - https://developer.woocommerce.com/docs/ (REST API, payment gateway API and webhook guides; verify the exact page for your version)
213
+ - https://wordpress.org/plugins/woocommerce/ and https://api.wordpress.org/plugins/info/1.2/ (version 11.2.2, verified 2026-11-10)
214
+ - https://packagist.org/packages/php-stubs/woocommerce-stubs
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: "woocommerce"
3
+ description: "WooCommerce extension development (HPOS, CRUD, Store API, Cart/Checkout blocks). Use when the project extends WooCommerce: Requires Plugins: woocommerce, wc_* APIs, orders, products, checkout."
4
+ allowed-tools:
5
+ - Read
6
+ - Glob
7
+ - Grep
8
+ ---
9
+
10
+ # WooCommerce Extension Development
11
+
12
+ Optional module of the WordPress stack (WooCommerce 11.2 line, WordPress 7.0+, PHP 7.4+). Load it only when the project depends on WooCommerce. The WordPress core rules (hooks, security, i18n, tests) still apply.
13
+
14
+ ## When to Use
15
+
16
+ - Plugin header has `Requires Plugins: woocommerce`, or code calls `wc_*` functions, `WC_Order`, `WC_Product`, `WC()`
17
+ - Work touches orders, products, customers, cart, checkout, payment gateways, shipping, emails or webhooks
18
+ - A `before_woocommerce_init` hook or `FeaturesUtil` call is present or missing
19
+
20
+ ## Key Rules
21
+
22
+ 1. **HPOS first**: orders are not posts. Use `wc_get_order()`, `wc_get_orders()`, `$order->get_meta()` and `$order->update_meta_data()` followed by `$order->save()`. Never `get_post()`, `WP_Query` or `*_post_meta()` on orders
23
+ 2. **Declare compatibility** on `before_woocommerce_init` with `FeaturesUtil::declare_compatibility()` for `custom_order_tables` and `cart_checkout_blocks`, guarded by `class_exists()`
24
+ 3. **Use the CRUD layer** (`WC_Data`, `WC_Product`, `WC_Customer`, `WC_Order`) for reads and writes; avoid direct SQL on WooCommerce tables
25
+ 4. **Blocks-ready checkout**: extend Cart and Checkout through the Store API (`woocommerce_store_api_register_endpoint_data`, `ExtendSchema`) and block integrations (`IntegrationInterface`, slot-fills), not only classic template hooks
26
+ 5. **Security**: verify payment webhooks (signature plus `hash_equals()`), never trust client-sent prices or totals, check capabilities (`manage_woocommerce`, `edit_shop_order`), escape all order data on output
27
+ 6. **Dependency guard**: do not run when WooCommerce is inactive; rely on `Requires Plugins` and check `class_exists( 'WooCommerce' )` for load-order safety
28
+
29
+ ## Where to Look
30
+
31
+ - Detailed APIs, snippets, hooks, Store API, gateways, REST, testing: `REFERENCE.md` (this folder)
32
+ - Auditable items for reviews and `/wordpress:check`: `checklist.md` (this folder)
33
+ - Core WordPress rules: `.claude/references/wordpress/rules/`
34
+
35
+ ## Workflow
36
+
37
+ 1. Read `REFERENCE.md` sections matching the task (HPOS, CRUD, blocks, gateway, REST, tests)
38
+ 2. Write the failing test first (`WP_UnitTestCase` with WooCommerce active in `wp-env`)
39
+ 3. Implement through CRUD and hooks; declare feature compatibility
40
+ 4. Walk `checklist.md` before commit and report findings separately from the core WordPress score