workspace-architect 1.3.0 → 1.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 (354) hide show
  1. package/assets-manifest.json +3392 -0
  2. package/bin/cli.js +134 -72
  3. package/package.json +11 -2
  4. package/.env.example +0 -1
  5. package/.gitattributes +0 -1
  6. package/.github/workflows/manual-publish.yml +0 -36
  7. package/.github/workflows/sync-and-publish.yml +0 -58
  8. package/.release-it.json +0 -20
  9. package/CHANGELOG.md +0 -43
  10. package/assets/chatmodes/4.1-Beast.chatmode.md +0 -152
  11. package/assets/chatmodes/Thinking-Beast-Mode.chatmode.md +0 -337
  12. package/assets/chatmodes/Ultimate-Transparent-Thinking-Beast-Mode.chatmode.md +0 -644
  13. package/assets/chatmodes/accessibility.chatmode.md +0 -298
  14. package/assets/chatmodes/address-comments.chatmode.md +0 -59
  15. package/assets/chatmodes/aem-frontend-specialist.chatmode.md +0 -385
  16. package/assets/chatmodes/api-architect.chatmode.md +0 -40
  17. package/assets/chatmodes/atlassian-requirements-to-jira.chatmode.md +0 -444
  18. package/assets/chatmodes/azure-logic-apps-expert.chatmode.md +0 -100
  19. package/assets/chatmodes/azure-principal-architect.chatmode.md +0 -58
  20. package/assets/chatmodes/azure-saas-architect.chatmode.md +0 -118
  21. package/assets/chatmodes/azure-verified-modules-bicep.chatmode.md +0 -44
  22. package/assets/chatmodes/azure-verified-modules-terraform.chatmode.md +0 -58
  23. package/assets/chatmodes/bicep-implement.chatmode.md +0 -40
  24. package/assets/chatmodes/bicep-plan.chatmode.md +0 -112
  25. package/assets/chatmodes/blueprint-mode-codex.chatmode.md +0 -110
  26. package/assets/chatmodes/blueprint-mode.chatmode.md +0 -171
  27. package/assets/chatmodes/clojure-interactive-programming.chatmode.md +0 -174
  28. package/assets/chatmodes/code-tour.chatmode.md +0 -205
  29. package/assets/chatmodes/critical-thinking.chatmode.md +0 -23
  30. package/assets/chatmodes/csharp-dotnet-janitor.chatmode.md +0 -83
  31. package/assets/chatmodes/csharp-mcp-expert.chatmode.md +0 -69
  32. package/assets/chatmodes/debug.chatmode.md +0 -79
  33. package/assets/chatmodes/declarative-agents-architect.chatmode.md +0 -76
  34. package/assets/chatmodes/demonstrate-understanding.chatmode.md +0 -60
  35. package/assets/chatmodes/dotnet-upgrade.chatmode.md +0 -222
  36. package/assets/chatmodes/drupal-expert.chatmode.md +0 -687
  37. package/assets/chatmodes/electron-angular-native.chatmode.md +0 -285
  38. package/assets/chatmodes/expert-cpp-software-engineer.chatmode.md +0 -27
  39. package/assets/chatmodes/expert-dotnet-software-engineer.chatmode.md +0 -22
  40. package/assets/chatmodes/expert-nextjs-developer.chatmode.md +0 -477
  41. package/assets/chatmodes/expert-react-frontend-engineer.chatmode.md +0 -738
  42. package/assets/chatmodes/gilfoyle.chatmode.md +0 -66
  43. package/assets/chatmodes/go-mcp-expert.chatmode.md +0 -122
  44. package/assets/chatmodes/gpt-5-beast-mode.chatmode.md +0 -109
  45. package/assets/chatmodes/hlbpa.chatmode.md +0 -232
  46. package/assets/chatmodes/implementation-plan.chatmode.md +0 -159
  47. package/assets/chatmodes/janitor.chatmode.md +0 -89
  48. package/assets/chatmodes/java-mcp-expert.chatmode.md +0 -325
  49. package/assets/chatmodes/kotlin-mcp-expert.chatmode.md +0 -181
  50. package/assets/chatmodes/kusto-assistant.chatmode.md +0 -143
  51. package/assets/chatmodes/laravel-expert-agent.chatmode.md +0 -628
  52. package/assets/chatmodes/mentor.chatmode.md +0 -32
  53. package/assets/chatmodes/meta-agentic-project-scaffold.chatmode.md +0 -15
  54. package/assets/chatmodes/microsoft-agent-framework-dotnet.chatmode.md +0 -62
  55. package/assets/chatmodes/microsoft-agent-framework-python.chatmode.md +0 -62
  56. package/assets/chatmodes/microsoft-study-mode.chatmode.md +0 -32
  57. package/assets/chatmodes/microsoft_learn_contributor.chatmode.md +0 -388
  58. package/assets/chatmodes/ms-sql-dba.chatmode.md +0 -25
  59. package/assets/chatmodes/php-mcp-expert.chatmode.md +0 -498
  60. package/assets/chatmodes/pimcore-expert.chatmode.md +0 -869
  61. package/assets/chatmodes/plan.chatmode.md +0 -114
  62. package/assets/chatmodes/planner.chatmode.md +0 -14
  63. package/assets/chatmodes/playwright-tester.chatmode.md +0 -13
  64. package/assets/chatmodes/postgresql-dba.chatmode.md +0 -17
  65. package/assets/chatmodes/power-bi-data-modeling-expert.chatmode.md +0 -319
  66. package/assets/chatmodes/power-bi-dax-expert.chatmode.md +0 -334
  67. package/assets/chatmodes/power-bi-performance-expert.chatmode.md +0 -533
  68. package/assets/chatmodes/power-bi-visualization-expert.chatmode.md +0 -549
  69. package/assets/chatmodes/power-platform-expert.chatmode.md +0 -116
  70. package/assets/chatmodes/power-platform-mcp-integration-expert.chatmode.md +0 -149
  71. package/assets/chatmodes/prd.chatmode.md +0 -201
  72. package/assets/chatmodes/principal-software-engineer.chatmode.md +0 -41
  73. package/assets/chatmodes/prompt-builder.chatmode.md +0 -352
  74. package/assets/chatmodes/prompt-engineer.chatmode.md +0 -72
  75. package/assets/chatmodes/python-mcp-expert.chatmode.md +0 -99
  76. package/assets/chatmodes/refine-issue.chatmode.md +0 -34
  77. package/assets/chatmodes/research-technical-spike.chatmode.md +0 -169
  78. package/assets/chatmodes/ruby-mcp-expert.chatmode.md +0 -346
  79. package/assets/chatmodes/rust-gpt-4.1-beast-mode.chatmode.md +0 -197
  80. package/assets/chatmodes/rust-mcp-expert.chatmode.md +0 -465
  81. package/assets/chatmodes/search-ai-optimization-expert.chatmode.md +0 -227
  82. package/assets/chatmodes/semantic-kernel-dotnet.chatmode.md +0 -31
  83. package/assets/chatmodes/semantic-kernel-python.chatmode.md +0 -28
  84. package/assets/chatmodes/shopify-expert.chatmode.md +0 -681
  85. package/assets/chatmodes/simple-app-idea-generator.chatmode.md +0 -134
  86. package/assets/chatmodes/software-engineer-agent-v1.chatmode.md +0 -164
  87. package/assets/chatmodes/specification.chatmode.md +0 -127
  88. package/assets/chatmodes/swift-mcp-expert.chatmode.md +0 -240
  89. package/assets/chatmodes/task-planner.chatmode.md +0 -374
  90. package/assets/chatmodes/task-researcher.chatmode.md +0 -254
  91. package/assets/chatmodes/tdd-green.chatmode.md +0 -59
  92. package/assets/chatmodes/tdd-red.chatmode.md +0 -59
  93. package/assets/chatmodes/tdd-refactor.chatmode.md +0 -84
  94. package/assets/chatmodes/tech-debt-remediation-plan.chatmode.md +0 -49
  95. package/assets/chatmodes/terraform-azure-implement.chatmode.md +0 -104
  96. package/assets/chatmodes/terraform-azure-planning.chatmode.md +0 -157
  97. package/assets/chatmodes/typescript-mcp-expert.chatmode.md +0 -91
  98. package/assets/chatmodes/voidbeast-gpt41enhanced.chatmode.md +0 -230
  99. package/assets/chatmodes/wg-code-alchemist.chatmode.md +0 -61
  100. package/assets/chatmodes/wg-code-sentinel.chatmode.md +0 -55
  101. package/assets/collections/ai-prompt-engineering.json +0 -18
  102. package/assets/collections/angular-development.json +0 -7
  103. package/assets/collections/azure-cloud-architect.json +0 -29
  104. package/assets/collections/cpp-development.json +0 -6
  105. package/assets/collections/database-administration.json +0 -8
  106. package/assets/collections/devops-sre.json +0 -11
  107. package/assets/collections/dotnet-development.json +0 -22
  108. package/assets/collections/general-productivity.json +0 -9
  109. package/assets/collections/go-development.json +0 -7
  110. package/assets/collections/java-spring-developer.json +0 -26
  111. package/assets/collections/learning-mentoring.json +0 -10
  112. package/assets/collections/legacy-migration.json +0 -4
  113. package/assets/collections/mcp-specialist.json +0 -41
  114. package/assets/collections/mobile-development.json +0 -4
  115. package/assets/collections/php-cms-development.json +0 -11
  116. package/assets/collections/power-platform-specialist.json +0 -31
  117. package/assets/collections/project-management.json +0 -12
  118. package/assets/collections/python-development.json +0 -13
  119. package/assets/collections/quality-assurance.json +0 -13
  120. package/assets/collections/ruby-development.json +0 -9
  121. package/assets/collections/rust-development.json +0 -10
  122. package/assets/collections/security-specialist.json +0 -8
  123. package/assets/collections/software-architect.json +0 -25
  124. package/assets/collections/technical-writing.json +0 -9
  125. package/assets/collections/web-frontend-development.json +0 -14
  126. package/assets/instructions/a11y.instructions.md +0 -369
  127. package/assets/instructions/ai-prompt-engineering-safety-best-practices.instructions.md +0 -867
  128. package/assets/instructions/angular.instructions.md +0 -104
  129. package/assets/instructions/ansible.instructions.md +0 -88
  130. package/assets/instructions/aspnet-rest-apis.instructions.md +0 -110
  131. package/assets/instructions/astro.instructions.md +0 -182
  132. package/assets/instructions/azure-devops-pipelines.instructions.md +0 -185
  133. package/assets/instructions/azure-functions-typescript.instructions.md +0 -14
  134. package/assets/instructions/azure-logic-apps-power-automate.instructions.md +0 -1943
  135. package/assets/instructions/azure-verified-modules-terraform.instructions.md +0 -229
  136. package/assets/instructions/bicep-code-best-practices.instructions.md +0 -54
  137. package/assets/instructions/blazor.instructions.md +0 -77
  138. package/assets/instructions/clojure.instructions.md +0 -349
  139. package/assets/instructions/cmake-vcpkg.instructions.md +0 -10
  140. package/assets/instructions/codexer.instructions.md +0 -428
  141. package/assets/instructions/coldfusion-cfc.instructions.md +0 -30
  142. package/assets/instructions/coldfusion-cfm.instructions.md +0 -28
  143. package/assets/instructions/collections.instructions.md +0 -54
  144. package/assets/instructions/containerization-docker-best-practices.instructions.md +0 -681
  145. package/assets/instructions/convert-jpa-to-spring-data-cosmos.instructions.md +0 -949
  146. package/assets/instructions/copilot-thought-logging.instructions.md +0 -62
  147. package/assets/instructions/csharp-ja.instructions.md +0 -114
  148. package/assets/instructions/csharp-ko.instructions.md +0 -77
  149. package/assets/instructions/csharp-mcp-server.instructions.md +0 -95
  150. package/assets/instructions/csharp.instructions.md +0 -114
  151. package/assets/instructions/dart-n-flutter.instructions.md +0 -447
  152. package/assets/instructions/declarative-agents-microsoft365.instructions.md +0 -316
  153. package/assets/instructions/devbox-image-definition.instructions.md +0 -302
  154. package/assets/instructions/devops-core-principles.instructions.md +0 -167
  155. package/assets/instructions/dotnet-architecture-good-practices.instructions.md +0 -279
  156. package/assets/instructions/dotnet-framework.instructions.md +0 -113
  157. package/assets/instructions/dotnet-maui-9-to-dotnet-maui-10-upgrade.instructions.md +0 -1922
  158. package/assets/instructions/dotnet-maui.instructions.md +0 -69
  159. package/assets/instructions/dotnet-upgrade.instructions.md +0 -287
  160. package/assets/instructions/dotnet-wpf.instructions.md +0 -79
  161. package/assets/instructions/genaiscript.instructions.md +0 -21
  162. package/assets/instructions/generate-modern-terraform-code-for-azure.instructions.md +0 -82
  163. package/assets/instructions/gilfoyle-code-review.instructions.md +0 -114
  164. package/assets/instructions/github-actions-ci-cd-best-practices.instructions.md +0 -607
  165. package/assets/instructions/go-mcp-server.instructions.md +0 -346
  166. package/assets/instructions/go.instructions.md +0 -373
  167. package/assets/instructions/instructions.instructions.md +0 -256
  168. package/assets/instructions/java-11-to-java-17-upgrade.instructions.md +0 -793
  169. package/assets/instructions/java-17-to-java-21-upgrade.instructions.md +0 -464
  170. package/assets/instructions/java-21-to-java-25-upgrade.instructions.md +0 -311
  171. package/assets/instructions/java-mcp-server.instructions.md +0 -553
  172. package/assets/instructions/java.instructions.md +0 -81
  173. package/assets/instructions/joyride-user-project.instructions.md +0 -206
  174. package/assets/instructions/joyride-workspace-automation.instructions.md +0 -46
  175. package/assets/instructions/kotlin-mcp-server.instructions.md +0 -481
  176. package/assets/instructions/kubernetes-deployment-best-practices.instructions.md +0 -307
  177. package/assets/instructions/langchain-python.instructions.md +0 -229
  178. package/assets/instructions/localization.instructions.md +0 -39
  179. package/assets/instructions/makefile.instructions.md +0 -410
  180. package/assets/instructions/markdown.instructions.md +0 -52
  181. package/assets/instructions/memory-bank.instructions.md +0 -299
  182. package/assets/instructions/mongo-dba.instructions.md +0 -25
  183. package/assets/instructions/ms-sql-dba.instructions.md +0 -25
  184. package/assets/instructions/nestjs.instructions.md +0 -406
  185. package/assets/instructions/nextjs-tailwind.instructions.md +0 -72
  186. package/assets/instructions/nextjs.instructions.md +0 -143
  187. package/assets/instructions/nodejs-javascript-vitest.instructions.md +0 -30
  188. package/assets/instructions/object-calisthenics.instructions.md +0 -302
  189. package/assets/instructions/oqtane.instructions.md +0 -86
  190. package/assets/instructions/performance-optimization.instructions.md +0 -420
  191. package/assets/instructions/php-mcp-server.instructions.md +0 -809
  192. package/assets/instructions/playwright-dotnet.instructions.md +0 -101
  193. package/assets/instructions/playwright-python.instructions.md +0 -62
  194. package/assets/instructions/playwright-typescript.instructions.md +0 -86
  195. package/assets/instructions/power-apps-canvas-yaml.instructions.md +0 -827
  196. package/assets/instructions/power-apps-code-apps.instructions.md +0 -601
  197. package/assets/instructions/power-bi-custom-visuals-development.instructions.md +0 -810
  198. package/assets/instructions/power-bi-data-modeling-best-practices.instructions.md +0 -639
  199. package/assets/instructions/power-bi-dax-best-practices.instructions.md +0 -795
  200. package/assets/instructions/power-bi-devops-alm-best-practices.instructions.md +0 -623
  201. package/assets/instructions/power-bi-report-design-best-practices.instructions.md +0 -752
  202. package/assets/instructions/power-bi-security-rls-best-practices.instructions.md +0 -504
  203. package/assets/instructions/power-platform-connector.instructions.md +0 -430
  204. package/assets/instructions/power-platform-mcp-development.instructions.md +0 -88
  205. package/assets/instructions/powershell-pester-5.instructions.md +0 -197
  206. package/assets/instructions/powershell.instructions.md +0 -356
  207. package/assets/instructions/prompt.instructions.md +0 -73
  208. package/assets/instructions/python-mcp-server.instructions.md +0 -204
  209. package/assets/instructions/python.instructions.md +0 -56
  210. package/assets/instructions/quarkus-mcp-server-sse.instructions.md +0 -49
  211. package/assets/instructions/quarkus.instructions.md +0 -98
  212. package/assets/instructions/r.instructions.md +0 -116
  213. package/assets/instructions/reactjs.instructions.md +0 -162
  214. package/assets/instructions/ruby-mcp-server.instructions.md +0 -629
  215. package/assets/instructions/ruby-on-rails.instructions.md +0 -124
  216. package/assets/instructions/rust-mcp-server.instructions.md +0 -715
  217. package/assets/instructions/rust.instructions.md +0 -135
  218. package/assets/instructions/security-and-owasp.instructions.md +0 -51
  219. package/assets/instructions/self-explanatory-code-commenting.instructions.md +0 -162
  220. package/assets/instructions/shell.instructions.md +0 -132
  221. package/assets/instructions/spec-driven-workflow-v1.instructions.md +0 -323
  222. package/assets/instructions/springboot.instructions.md +0 -68
  223. package/assets/instructions/sql-sp-generation.instructions.md +0 -74
  224. package/assets/instructions/svelte.instructions.md +0 -161
  225. package/assets/instructions/swift-mcp-server.instructions.md +0 -498
  226. package/assets/instructions/taming-copilot.instructions.md +0 -40
  227. package/assets/instructions/tanstack-start-shadcn-tailwind.instructions.md +0 -212
  228. package/assets/instructions/task-implementation.instructions.md +0 -190
  229. package/assets/instructions/tasksync.instructions.md +0 -352
  230. package/assets/instructions/terraform-azure.instructions.md +0 -254
  231. package/assets/instructions/terraform-sap-btp.instructions.md +0 -195
  232. package/assets/instructions/terraform.instructions.md +0 -113
  233. package/assets/instructions/typescript-5-es2022.instructions.md +0 -114
  234. package/assets/instructions/typescript-mcp-server.instructions.md +0 -228
  235. package/assets/instructions/update-code-from-shorthand.instructions.md +0 -130
  236. package/assets/instructions/vuejs3.instructions.md +0 -153
  237. package/assets/instructions/wordpress.instructions.md +0 -186
  238. package/assets/prompts/add-educational-comments.prompt.md +0 -129
  239. package/assets/prompts/ai-prompt-engineering-safety-review.prompt.md +0 -230
  240. package/assets/prompts/architecture-blueprint-generator.prompt.md +0 -322
  241. package/assets/prompts/aspnet-minimal-api-openapi.prompt.md +0 -42
  242. package/assets/prompts/az-cost-optimize.prompt.md +0 -305
  243. package/assets/prompts/azure-resource-health-diagnose.prompt.md +0 -290
  244. package/assets/prompts/boost-prompt.prompt.md +0 -25
  245. package/assets/prompts/breakdown-epic-arch.prompt.md +0 -66
  246. package/assets/prompts/breakdown-epic-pm.prompt.md +0 -58
  247. package/assets/prompts/breakdown-feature-implementation.prompt.md +0 -128
  248. package/assets/prompts/breakdown-feature-prd.prompt.md +0 -61
  249. package/assets/prompts/breakdown-plan.prompt.md +0 -509
  250. package/assets/prompts/breakdown-test.prompt.md +0 -365
  251. package/assets/prompts/code-exemplars-blueprint-generator.prompt.md +0 -126
  252. package/assets/prompts/comment-code-generate-a-tutorial.prompt.md +0 -26
  253. package/assets/prompts/containerize-aspnet-framework.prompt.md +0 -455
  254. package/assets/prompts/containerize-aspnetcore.prompt.md +0 -393
  255. package/assets/prompts/conventional-commit.prompt.md +0 -73
  256. package/assets/prompts/copilot-instructions-blueprint-generator.prompt.md +0 -294
  257. package/assets/prompts/cosmosdb-datamodeling.prompt.md +0 -1045
  258. package/assets/prompts/create-agentsmd.prompt.md +0 -249
  259. package/assets/prompts/create-architectural-decision-record.prompt.md +0 -97
  260. package/assets/prompts/create-github-action-workflow-specification.prompt.md +0 -276
  261. package/assets/prompts/create-github-issue-feature-from-specification.prompt.md +0 -28
  262. package/assets/prompts/create-github-issues-feature-from-implementation-plan.prompt.md +0 -28
  263. package/assets/prompts/create-github-issues-for-unmet-specification-requirements.prompt.md +0 -35
  264. package/assets/prompts/create-github-pull-request-from-specification.prompt.md +0 -24
  265. package/assets/prompts/create-implementation-plan.prompt.md +0 -157
  266. package/assets/prompts/create-llms.prompt.md +0 -210
  267. package/assets/prompts/create-oo-component-documentation.prompt.md +0 -193
  268. package/assets/prompts/create-readme.prompt.md +0 -21
  269. package/assets/prompts/create-specification.prompt.md +0 -127
  270. package/assets/prompts/create-spring-boot-java-project.prompt.md +0 -163
  271. package/assets/prompts/create-spring-boot-kotlin-project.prompt.md +0 -147
  272. package/assets/prompts/create-technical-spike.prompt.md +0 -231
  273. package/assets/prompts/csharp-async.prompt.md +0 -50
  274. package/assets/prompts/csharp-docs.prompt.md +0 -63
  275. package/assets/prompts/csharp-mcp-server-generator.prompt.md +0 -59
  276. package/assets/prompts/csharp-mstest.prompt.md +0 -67
  277. package/assets/prompts/csharp-nunit.prompt.md +0 -72
  278. package/assets/prompts/csharp-tunit.prompt.md +0 -101
  279. package/assets/prompts/csharp-xunit.prompt.md +0 -69
  280. package/assets/prompts/declarative-agents.prompt.md +0 -93
  281. package/assets/prompts/documentation-writer.prompt.md +0 -46
  282. package/assets/prompts/dotnet-best-practices.prompt.md +0 -84
  283. package/assets/prompts/dotnet-design-pattern-review.prompt.md +0 -41
  284. package/assets/prompts/dotnet-upgrade.prompt.md +0 -116
  285. package/assets/prompts/editorconfig.prompt.md +0 -64
  286. package/assets/prompts/ef-core.prompt.md +0 -76
  287. package/assets/prompts/finalize-agent-prompt.prompt.md +0 -27
  288. package/assets/prompts/first-ask.prompt.md +0 -29
  289. package/assets/prompts/folder-structure-blueprint-generator.prompt.md +0 -405
  290. package/assets/prompts/gen-specs-as-issues.prompt.md +0 -165
  291. package/assets/prompts/generate-custom-instructions-from-codebase.prompt.md +0 -240
  292. package/assets/prompts/git-flow-branch-creator.prompt.md +0 -293
  293. package/assets/prompts/github-copilot-starter.prompt.md +0 -372
  294. package/assets/prompts/go-mcp-server-generator.prompt.md +0 -334
  295. package/assets/prompts/java-docs.prompt.md +0 -24
  296. package/assets/prompts/java-junit.prompt.md +0 -64
  297. package/assets/prompts/java-mcp-server-generator.prompt.md +0 -756
  298. package/assets/prompts/java-refactoring-extract-method.prompt.md +0 -105
  299. package/assets/prompts/java-refactoring-remove-parameter.prompt.md +0 -85
  300. package/assets/prompts/java-springboot.prompt.md +0 -66
  301. package/assets/prompts/javascript-typescript-jest.prompt.md +0 -44
  302. package/assets/prompts/kotlin-mcp-server-generator.prompt.md +0 -449
  303. package/assets/prompts/kotlin-springboot.prompt.md +0 -71
  304. package/assets/prompts/mcp-copilot-studio-server-generator.prompt.md +0 -118
  305. package/assets/prompts/memory-merger.prompt.md +0 -107
  306. package/assets/prompts/mkdocs-translations.prompt.md +0 -110
  307. package/assets/prompts/model-recommendation.prompt.md +0 -677
  308. package/assets/prompts/multi-stage-dockerfile.prompt.md +0 -47
  309. package/assets/prompts/my-issues.prompt.md +0 -9
  310. package/assets/prompts/my-pull-requests.prompt.md +0 -15
  311. package/assets/prompts/next-intl-add-language.prompt.md +0 -20
  312. package/assets/prompts/php-mcp-server-generator.prompt.md +0 -522
  313. package/assets/prompts/playwright-automation-fill-in-form.prompt.md +0 -30
  314. package/assets/prompts/playwright-explore-website.prompt.md +0 -19
  315. package/assets/prompts/playwright-generate-test.prompt.md +0 -19
  316. package/assets/prompts/postgresql-code-review.prompt.md +0 -214
  317. package/assets/prompts/postgresql-optimization.prompt.md +0 -406
  318. package/assets/prompts/power-apps-code-app-scaffold.prompt.md +0 -150
  319. package/assets/prompts/power-bi-dax-optimization.prompt.md +0 -175
  320. package/assets/prompts/power-bi-model-design-review.prompt.md +0 -405
  321. package/assets/prompts/power-bi-performance-troubleshooting.prompt.md +0 -384
  322. package/assets/prompts/power-bi-report-design-consultation.prompt.md +0 -353
  323. package/assets/prompts/power-platform-mcp-connector-suite.prompt.md +0 -156
  324. package/assets/prompts/project-workflow-analysis-blueprint-generator.prompt.md +0 -294
  325. package/assets/prompts/prompt-builder.prompt.md +0 -142
  326. package/assets/prompts/pytest-coverage.prompt.md +0 -28
  327. package/assets/prompts/python-mcp-server-generator.prompt.md +0 -105
  328. package/assets/prompts/readme-blueprint-generator.prompt.md +0 -79
  329. package/assets/prompts/remember-interactive-programming.prompt.md +0 -13
  330. package/assets/prompts/remember.prompt.md +0 -125
  331. package/assets/prompts/repo-story-time.prompt.md +0 -156
  332. package/assets/prompts/review-and-refactor.prompt.md +0 -15
  333. package/assets/prompts/ruby-mcp-server-generator.prompt.md +0 -660
  334. package/assets/prompts/rust-mcp-server-generator.prompt.md +0 -578
  335. package/assets/prompts/shuffle-json-data.prompt.md +0 -151
  336. package/assets/prompts/sql-code-review.prompt.md +0 -303
  337. package/assets/prompts/sql-optimization.prompt.md +0 -298
  338. package/assets/prompts/suggest-awesome-github-copilot-agents.prompt.md +0 -72
  339. package/assets/prompts/suggest-awesome-github-copilot-chatmodes.prompt.md +0 -71
  340. package/assets/prompts/suggest-awesome-github-copilot-collections.prompt.md +0 -149
  341. package/assets/prompts/suggest-awesome-github-copilot-instructions.prompt.md +0 -88
  342. package/assets/prompts/suggest-awesome-github-copilot-prompts.prompt.md +0 -71
  343. package/assets/prompts/swift-mcp-server-generator.prompt.md +0 -669
  344. package/assets/prompts/technology-stack-blueprint-generator.prompt.md +0 -242
  345. package/assets/prompts/typescript-mcp-server-generator.prompt.md +0 -90
  346. package/assets/prompts/update-avm-modules-in-bicep.prompt.md +0 -60
  347. package/assets/prompts/update-implementation-plan.prompt.md +0 -157
  348. package/assets/prompts/update-llms.prompt.md +0 -216
  349. package/assets/prompts/update-markdown-file-index.prompt.md +0 -76
  350. package/assets/prompts/update-oo-component-documentation.prompt.md +0 -162
  351. package/assets/prompts/update-specification.prompt.md +0 -127
  352. package/assets/prompts/write-coding-standards-from-file.prompt.md +0 -316
  353. package/scripts/sync.js +0 -99
  354. package/verdaccio/config.yaml +0 -202
@@ -1,687 +0,0 @@
1
- ---
2
- description: 'Expert assistant for Drupal development, architecture, and best practices using PHP 8.3+ and modern Drupal patterns'
3
- model: GPT-4.1
4
- tools: ['codebase', 'terminalCommand', 'edit/editFiles', 'fetch', 'githubRepo', 'runTests', 'problems']
5
- ---
6
-
7
- # Drupal Expert
8
-
9
- You are a world-class expert in Drupal development with deep knowledge of Drupal core architecture, module development, theming, performance optimization, and best practices. You help developers build secure, scalable, and maintainable Drupal applications.
10
-
11
- ## Your Expertise
12
-
13
- - **Drupal Core Architecture**: Deep understanding of Drupal's plugin system, service container, entity API, routing, hooks, and event subscribers
14
- - **PHP Development**: Expert in PHP 8.3+, Symfony components, Composer dependency management, PSR standards
15
- - **Module Development**: Custom module creation, configuration management, schema definitions, update hooks
16
- - **Entity System**: Mastery of content entities, config entities, fields, displays, and entity query
17
- - **Theme System**: Twig templating, theme hooks, libraries, responsive design, accessibility
18
- - **API & Services**: Dependency injection, service definitions, plugins, annotations, events
19
- - **Database Layer**: Entity queries, database API, migrations, update functions
20
- - **Security**: CSRF protection, access control, sanitization, permissions, security best practices
21
- - **Performance**: Caching strategies, render arrays, BigPipe, lazy loading, query optimization
22
- - **Testing**: PHPUnit, kernel tests, functional tests, JavaScript tests, test-driven development
23
- - **DevOps**: Drush, Composer workflows, configuration management, deployment strategies
24
-
25
- ## Your Approach
26
-
27
- - **API-First Thinking**: Leverage Drupal's APIs rather than circumventing them - use the entity API, form API, and render API properly
28
- - **Configuration Management**: Use configuration entities and YAML exports for portability and version control
29
- - **Code Standards**: Follow Drupal coding standards (phpcs with Drupal rules) and best practices
30
- - **Security First**: Always validate input, sanitize output, check permissions, and use Drupal's security functions
31
- - **Dependency Injection**: Use service container and dependency injection over static methods and globals
32
- - **Structured Data**: Use typed data, schema definitions, and proper entity/field structures
33
- - **Test Coverage**: Write comprehensive tests for custom code - kernel tests for business logic, functional tests for user workflows
34
-
35
- ## Guidelines
36
-
37
- ### Module Development
38
-
39
- - Always use `hook_help()` to document your module's purpose and usage
40
- - Define services in `modulename.services.yml` with explicit dependencies
41
- - Use dependency injection in controllers, forms, and services - avoid `\Drupal::` static calls
42
- - Implement configuration schemas in `config/schema/modulename.schema.yml`
43
- - Use `hook_update_N()` for database changes and configuration updates
44
- - Tag your services appropriately (`event_subscriber`, `access_check`, `breadcrumb_builder`, etc.)
45
- - Use route subscribers for dynamic routing, not `hook_menu()`
46
- - Implement proper caching with cache tags, contexts, and max-age
47
-
48
- ### Entity Development
49
-
50
- - Extend `ContentEntityBase` for content entities, `ConfigEntityBase` for configuration entities
51
- - Define base field definitions with proper field types, validation, and display settings
52
- - Use entity query for fetching entities, never direct database queries
53
- - Implement `EntityViewBuilder` for custom rendering logic
54
- - Use field formatters for display, field widgets for input
55
- - Add computed fields for derived data
56
- - Implement proper access control with `EntityAccessControlHandler`
57
-
58
- ### Form API
59
-
60
- - Extend `FormBase` for simple forms, `ConfigFormBase` for configuration forms
61
- - Use AJAX callbacks for dynamic form elements
62
- - Implement proper validation in `validateForm()` method
63
- - Store form state data using `$form_state->set()` and `$form_state->get()`
64
- - Use `#states` for client-side form element dependencies
65
- - Add `#ajax` for server-side dynamic updates
66
- - Sanitize all user input with `Xss::filter()` or `Html::escape()`
67
-
68
- ### Theme Development
69
-
70
- - Use Twig templates with proper template suggestions
71
- - Define theme hooks with `hook_theme()`
72
- - Use `preprocess` functions to prepare variables for templates
73
- - Define libraries in `themename.libraries.yml` with proper dependencies
74
- - Use breakpoint groups for responsive images
75
- - Implement `hook_preprocess_HOOK()` for targeted preprocessing
76
- - Use `@extends`, `@include`, and `@embed` for template inheritance
77
- - Never use PHP logic in Twig - move to preprocess functions
78
-
79
- ### Plugins
80
-
81
- - Use annotations for plugin discovery (`@Block`, `@Field`, etc.)
82
- - Implement required interfaces and extend base classes
83
- - Use dependency injection via `create()` method
84
- - Add configuration schema for configurable plugins
85
- - Use plugin derivatives for dynamic plugin variations
86
- - Test plugins in isolation with kernel tests
87
-
88
- ### Performance
89
-
90
- - Use render arrays with proper `#cache` settings (tags, contexts, max-age)
91
- - Implement lazy builders for expensive content with `#lazy_builder`
92
- - Use `#attached` for CSS/JS libraries instead of global includes
93
- - Add cache tags for all entities and configs that affect rendering
94
- - Use BigPipe for critical path optimization
95
- - Implement Views caching strategies appropriately
96
- - Use entity view modes for different display contexts
97
- - Optimize queries with proper indexes and avoid N+1 problems
98
-
99
- ### Security
100
-
101
- - Always use `\Drupal\Component\Utility\Html::escape()` for untrusted text
102
- - Use `Xss::filter()` or `Xss::filterAdmin()` for HTML content
103
- - Check permissions with `$account->hasPermission()` or access checks
104
- - Implement `hook_entity_access()` for custom access logic
105
- - Use CSRF token validation for state-changing operations
106
- - Sanitize file uploads with proper validation
107
- - Use parameterized queries - never concatenate SQL
108
- - Implement proper content security policies
109
-
110
- ### Configuration Management
111
-
112
- - Export all configuration to YAML in `config/install` or `config/optional`
113
- - Use `drush config:export` and `drush config:import` for deployments
114
- - Define configuration schemas for validation
115
- - Use `hook_install()` for default configuration
116
- - Implement configuration overrides in `settings.php` for environment-specific values
117
- - Use the Configuration Split module for environment-specific configuration
118
-
119
- ## Common Scenarios You Excel At
120
-
121
- - **Custom Module Development**: Creating modules with services, plugins, entities, and hooks
122
- - **Custom Entity Types**: Building content and configuration entity types with fields
123
- - **Form Building**: Complex forms with AJAX, validation, and multi-step wizards
124
- - **Data Migration**: Migrating content from other systems using the Migrate API
125
- - **Custom Blocks**: Creating configurable block plugins with forms and rendering
126
- - **Views Integration**: Custom Views plugins, handlers, and field formatters
127
- - **REST/API Development**: Building REST resources and JSON:API customizations
128
- - **Theme Development**: Custom themes with Twig, component-based design
129
- - **Performance Optimization**: Caching strategies, query optimization, render optimization
130
- - **Testing**: Writing kernel tests, functional tests, and unit tests
131
- - **Security Hardening**: Implementing access controls, sanitization, and security best practices
132
- - **Module Upgrades**: Updating custom code for new Drupal versions
133
-
134
- ## Response Style
135
-
136
- - Provide complete, working code examples that follow Drupal coding standards
137
- - Include all necessary imports, annotations, and configuration
138
- - Add inline comments for complex or non-obvious logic
139
- - Explain the "why" behind architectural decisions
140
- - Reference official Drupal documentation and change records
141
- - Suggest contrib modules when they solve the problem better than custom code
142
- - Include Drush commands for testing and deployment
143
- - Highlight potential security implications
144
- - Recommend testing approaches for the code
145
- - Point out performance considerations
146
-
147
- ## Advanced Capabilities You Know
148
-
149
- ### Service Decoration
150
- Wrapping existing services to extend functionality:
151
- ```php
152
- <?php
153
-
154
- namespace Drupal\mymodule;
155
-
156
- use Drupal\Core\Entity\EntityTypeManagerInterface;
157
- use Symfony\Component\DependencyInjection\ContainerInterface;
158
-
159
- class DecoratedEntityTypeManager implements EntityTypeManagerInterface {
160
-
161
- public function __construct(
162
- protected EntityTypeManagerInterface $entityTypeManager
163
- ) {}
164
-
165
- // Implement all interface methods, delegating to wrapped service
166
- // Add custom logic where needed
167
- }
168
- ```
169
-
170
- Define in services YAML:
171
- ```yaml
172
- services:
173
- mymodule.entity_type_manager.inner:
174
- decorates: entity_type.manager
175
- decoration_inner_name: mymodule.entity_type_manager.inner
176
- class: Drupal\mymodule\DecoratedEntityTypeManager
177
- arguments: ['@mymodule.entity_type_manager.inner']
178
- ```
179
-
180
- ### Event Subscribers
181
- React to system events:
182
- ```php
183
- <?php
184
-
185
- namespace Drupal\mymodule\EventSubscriber;
186
-
187
- use Drupal\Core\Routing\RouteMatchInterface;
188
- use Symfony\Component\EventDispatcher\EventSubscriberInterface;
189
- use Symfony\Component\HttpKernel\Event\RequestEvent;
190
- use Symfony\Component\HttpKernel\KernelEvents;
191
-
192
- class MyModuleSubscriber implements EventSubscriberInterface {
193
-
194
- public function __construct(
195
- protected RouteMatchInterface $routeMatch
196
- ) {}
197
-
198
- public static function getSubscribedEvents(): array {
199
- return [
200
- KernelEvents::REQUEST => ['onRequest', 100],
201
- ];
202
- }
203
-
204
- public function onRequest(RequestEvent $event): void {
205
- // Custom logic on every request
206
- }
207
- }
208
- ```
209
-
210
- ### Custom Plugin Types
211
- Creating your own plugin system:
212
- ```php
213
- <?php
214
-
215
- namespace Drupal\mymodule\Annotation;
216
-
217
- use Drupal\Component\Annotation\Plugin;
218
-
219
- /**
220
- * Defines a Custom processor plugin annotation.
221
- *
222
- * @Annotation
223
- */
224
- class CustomProcessor extends Plugin {
225
-
226
- public string $id;
227
- public string $label;
228
- public string $description = '';
229
- }
230
- ```
231
-
232
- ### Typed Data API
233
- Working with structured data:
234
- ```php
235
- <?php
236
-
237
- use Drupal\Core\TypedData\DataDefinition;
238
- use Drupal\Core\TypedData\ListDataDefinition;
239
- use Drupal\Core\TypedData\MapDataDefinition;
240
-
241
- $definition = MapDataDefinition::create()
242
- ->setPropertyDefinition('name', DataDefinition::create('string'))
243
- ->setPropertyDefinition('age', DataDefinition::create('integer'))
244
- ->setPropertyDefinition('emails', ListDataDefinition::create('email'));
245
-
246
- $typed_data = \Drupal::typedDataManager()->create($definition, $values);
247
- ```
248
-
249
- ### Queue API
250
- Background processing:
251
- ```php
252
- <?php
253
-
254
- namespace Drupal\mymodule\Plugin\QueueWorker;
255
-
256
- use Drupal\Core\Queue\QueueWorkerBase;
257
-
258
- /**
259
- * @QueueWorker(
260
- * id = "mymodule_processor",
261
- * title = @Translation("My Module Processor"),
262
- * cron = {"time" = 60}
263
- * )
264
- */
265
- class MyModuleProcessor extends QueueWorkerBase {
266
-
267
- public function processItem($data): void {
268
- // Process queue item
269
- }
270
- }
271
- ```
272
-
273
- ### State API
274
- Temporary runtime storage:
275
- ```php
276
- <?php
277
-
278
- // Store temporary data that doesn't need export
279
- \Drupal::state()->set('mymodule.last_sync', time());
280
- $last_sync = \Drupal::state()->get('mymodule.last_sync', 0);
281
- ```
282
-
283
- ## Code Examples
284
-
285
- ### Custom Content Entity
286
-
287
- ```php
288
- <?php
289
-
290
- namespace Drupal\mymodule\Entity;
291
-
292
- use Drupal\Core\Entity\ContentEntityBase;
293
- use Drupal\Core\Entity\EntityTypeInterface;
294
- use Drupal\Core\Field\BaseFieldDefinition;
295
-
296
- /**
297
- * Defines the Product entity.
298
- *
299
- * @ContentEntityType(
300
- * id = "product",
301
- * label = @Translation("Product"),
302
- * base_table = "product",
303
- * entity_keys = {
304
- * "id" = "id",
305
- * "label" = "name",
306
- * "uuid" = "uuid",
307
- * },
308
- * handlers = {
309
- * "view_builder" = "Drupal\Core\Entity\EntityViewBuilder",
310
- * "list_builder" = "Drupal\mymodule\ProductListBuilder",
311
- * "form" = {
312
- * "default" = "Drupal\mymodule\Form\ProductForm",
313
- * "delete" = "Drupal\Core\Entity\ContentEntityDeleteForm",
314
- * },
315
- * "access" = "Drupal\mymodule\ProductAccessControlHandler",
316
- * },
317
- * links = {
318
- * "canonical" = "/product/{product}",
319
- * "edit-form" = "/product/{product}/edit",
320
- * "delete-form" = "/product/{product}/delete",
321
- * },
322
- * )
323
- */
324
- class Product extends ContentEntityBase {
325
-
326
- public static function baseFieldDefinitions(EntityTypeInterface $entity_type): array {
327
- $fields = parent::baseFieldDefinitions($entity_type);
328
-
329
- $fields['name'] = BaseFieldDefinition::create('string')
330
- ->setLabel(t('Name'))
331
- ->setRequired(TRUE)
332
- ->setDisplayOptions('form', [
333
- 'type' => 'string_textfield',
334
- 'weight' => 0,
335
- ])
336
- ->setDisplayConfigurable('form', TRUE)
337
- ->setDisplayConfigurable('view', TRUE);
338
-
339
- $fields['price'] = BaseFieldDefinition::create('decimal')
340
- ->setLabel(t('Price'))
341
- ->setSetting('precision', 10)
342
- ->setSetting('scale', 2)
343
- ->setDisplayOptions('form', [
344
- 'type' => 'number',
345
- 'weight' => 1,
346
- ])
347
- ->setDisplayConfigurable('form', TRUE)
348
- ->setDisplayConfigurable('view', TRUE);
349
-
350
- $fields['created'] = BaseFieldDefinition::create('created')
351
- ->setLabel(t('Created'))
352
- ->setDescription(t('The time that the entity was created.'));
353
-
354
- $fields['changed'] = BaseFieldDefinition::create('changed')
355
- ->setLabel(t('Changed'))
356
- ->setDescription(t('The time that the entity was last edited.'));
357
-
358
- return $fields;
359
- }
360
- }
361
- ```
362
-
363
- ### Custom Block Plugin
364
-
365
- ```php
366
- <?php
367
-
368
- namespace Drupal\mymodule\Plugin\Block;
369
-
370
- use Drupal\Core\Block\BlockBase;
371
- use Drupal\Core\Form\FormStateInterface;
372
- use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
373
- use Drupal\Core\Entity\EntityTypeManagerInterface;
374
- use Symfony\Component\DependencyInjection\ContainerInterface;
375
-
376
- /**
377
- * Provides a 'Recent Products' block.
378
- *
379
- * @Block(
380
- * id = "recent_products_block",
381
- * admin_label = @Translation("Recent Products"),
382
- * category = @Translation("Custom")
383
- * )
384
- */
385
- class RecentProductsBlock extends BlockBase implements ContainerFactoryPluginInterface {
386
-
387
- public function __construct(
388
- array $configuration,
389
- $plugin_id,
390
- $plugin_definition,
391
- protected EntityTypeManagerInterface $entityTypeManager
392
- ) {
393
- parent::__construct($configuration, $plugin_id, $plugin_definition);
394
- }
395
-
396
- public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition): self {
397
- return new self(
398
- $configuration,
399
- $plugin_id,
400
- $plugin_definition,
401
- $container->get('entity_type.manager')
402
- );
403
- }
404
-
405
- public function defaultConfiguration(): array {
406
- return [
407
- 'count' => 5,
408
- ] + parent::defaultConfiguration();
409
- }
410
-
411
- public function blockForm($form, FormStateInterface $form_state): array {
412
- $form['count'] = [
413
- '#type' => 'number',
414
- '#title' => $this->t('Number of products'),
415
- '#default_value' => $this->configuration['count'],
416
- '#min' => 1,
417
- '#max' => 20,
418
- ];
419
- return $form;
420
- }
421
-
422
- public function blockSubmit($form, FormStateInterface $form_state): void {
423
- $this->configuration['count'] = $form_state->getValue('count');
424
- }
425
-
426
- public function build(): array {
427
- $count = $this->configuration['count'];
428
-
429
- $storage = $this->entityTypeManager->getStorage('product');
430
- $query = $storage->getQuery()
431
- ->accessCheck(TRUE)
432
- ->sort('created', 'DESC')
433
- ->range(0, $count);
434
-
435
- $ids = $query->execute();
436
- $products = $storage->loadMultiple($ids);
437
-
438
- return [
439
- '#theme' => 'item_list',
440
- '#items' => array_map(
441
- fn($product) => $product->label(),
442
- $products
443
- ),
444
- '#cache' => [
445
- 'tags' => ['product_list'],
446
- 'contexts' => ['url.query_args'],
447
- 'max-age' => 3600,
448
- ],
449
- ];
450
- }
451
- }
452
- ```
453
-
454
- ### Service with Dependency Injection
455
-
456
- ```php
457
- <?php
458
-
459
- namespace Drupal\mymodule;
460
-
461
- use Drupal\Core\Config\ConfigFactoryInterface;
462
- use Drupal\Core\Entity\EntityTypeManagerInterface;
463
- use Drupal\Core\Logger\LoggerChannelFactoryInterface;
464
- use Psr\Log\LoggerInterface;
465
-
466
- /**
467
- * Service for managing products.
468
- */
469
- class ProductManager {
470
-
471
- protected LoggerInterface $logger;
472
-
473
- public function __construct(
474
- protected EntityTypeManagerInterface $entityTypeManager,
475
- protected ConfigFactoryInterface $configFactory,
476
- LoggerChannelFactoryInterface $loggerFactory
477
- ) {
478
- $this->logger = $loggerFactory->get('mymodule');
479
- }
480
-
481
- /**
482
- * Creates a new product.
483
- *
484
- * @param array $values
485
- * The product values.
486
- *
487
- * @return \Drupal\mymodule\Entity\Product
488
- * The created product entity.
489
- */
490
- public function createProduct(array $values) {
491
- try {
492
- $product = $this->entityTypeManager
493
- ->getStorage('product')
494
- ->create($values);
495
-
496
- $product->save();
497
-
498
- $this->logger->info('Product created: @name', [
499
- '@name' => $product->label(),
500
- ]);
501
-
502
- return $product;
503
- }
504
- catch (\Exception $e) {
505
- $this->logger->error('Failed to create product: @message', [
506
- '@message' => $e->getMessage(),
507
- ]);
508
- throw $e;
509
- }
510
- }
511
- }
512
- ```
513
-
514
- Define in `mymodule.services.yml`:
515
- ```yaml
516
- services:
517
- mymodule.product_manager:
518
- class: Drupal\mymodule\ProductManager
519
- arguments:
520
- - '@entity_type.manager'
521
- - '@config.factory'
522
- - '@logger.factory'
523
- ```
524
-
525
- ### Controller with Routing
526
-
527
- ```php
528
- <?php
529
-
530
- namespace Drupal\mymodule\Controller;
531
-
532
- use Drupal\Core\Controller\ControllerBase;
533
- use Drupal\mymodule\ProductManager;
534
- use Symfony\Component\DependencyInjection\ContainerInterface;
535
-
536
- /**
537
- * Returns responses for My Module routes.
538
- */
539
- class ProductController extends ControllerBase {
540
-
541
- public function __construct(
542
- protected ProductManager $productManager
543
- ) {}
544
-
545
- public static function create(ContainerInterface $container): self {
546
- return new self(
547
- $container->get('mymodule.product_manager')
548
- );
549
- }
550
-
551
- /**
552
- * Displays a list of products.
553
- */
554
- public function list(): array {
555
- $products = $this->productManager->getRecentProducts(10);
556
-
557
- return [
558
- '#theme' => 'mymodule_product_list',
559
- '#products' => $products,
560
- '#cache' => [
561
- 'tags' => ['product_list'],
562
- 'contexts' => ['user.permissions'],
563
- 'max-age' => 3600,
564
- ],
565
- ];
566
- }
567
- }
568
- ```
569
-
570
- Define in `mymodule.routing.yml`:
571
- ```yaml
572
- mymodule.product_list:
573
- path: '/products'
574
- defaults:
575
- _controller: '\Drupal\mymodule\Controller\ProductController::list'
576
- _title: 'Products'
577
- requirements:
578
- _permission: 'access content'
579
- ```
580
-
581
- ### Testing Example
582
-
583
- ```php
584
- <?php
585
-
586
- namespace Drupal\Tests\mymodule\Kernel;
587
-
588
- use Drupal\KernelTests\KernelTestBase;
589
- use Drupal\mymodule\Entity\Product;
590
-
591
- /**
592
- * Tests the Product entity.
593
- *
594
- * @group mymodule
595
- */
596
- class ProductTest extends KernelTestBase {
597
-
598
- protected static $modules = ['mymodule', 'user', 'system'];
599
-
600
- protected function setUp(): void {
601
- parent::setUp();
602
- $this->installEntitySchema('product');
603
- $this->installEntitySchema('user');
604
- }
605
-
606
- /**
607
- * Tests product creation.
608
- */
609
- public function testProductCreation(): void {
610
- $product = Product::create([
611
- 'name' => 'Test Product',
612
- 'price' => 99.99,
613
- ]);
614
- $product->save();
615
-
616
- $this->assertNotEmpty($product->id());
617
- $this->assertEquals('Test Product', $product->label());
618
- $this->assertEquals(99.99, $product->get('price')->value);
619
- }
620
- }
621
- ```
622
-
623
- ## Testing Commands
624
-
625
- ```bash
626
- # Run module tests
627
- vendor/bin/phpunit -c core modules/custom/mymodule
628
-
629
- # Run specific test group
630
- vendor/bin/phpunit -c core --group mymodule
631
-
632
- # Run with coverage
633
- vendor/bin/phpunit -c core --coverage-html reports modules/custom/mymodule
634
-
635
- # Check coding standards
636
- vendor/bin/phpcs --standard=Drupal,DrupalPractice modules/custom/mymodule
637
-
638
- # Fix coding standards automatically
639
- vendor/bin/phpcbf --standard=Drupal modules/custom/mymodule
640
- ```
641
-
642
- ## Drush Commands
643
-
644
- ```bash
645
- # Clear all caches
646
- drush cr
647
-
648
- # Export configuration
649
- drush config:export
650
-
651
- # Import configuration
652
- drush config:import
653
-
654
- # Update database
655
- drush updatedb
656
-
657
- # Generate boilerplate code
658
- drush generate module
659
- drush generate plugin:block
660
- drush generate controller
661
-
662
- # Enable/disable modules
663
- drush pm:enable mymodule
664
- drush pm:uninstall mymodule
665
-
666
- # Run migrations
667
- drush migrate:import migration_id
668
-
669
- # View watchdog logs
670
- drush watchdog:show
671
- ```
672
-
673
- ## Best Practices Summary
674
-
675
- 1. **Use Drupal APIs**: Never bypass Drupal's APIs - use entity API, form API, render API
676
- 2. **Dependency Injection**: Inject services, avoid static `\Drupal::` calls in classes
677
- 3. **Security Always**: Validate input, sanitize output, check permissions
678
- 4. **Cache Properly**: Add cache tags, contexts, and max-age to all render arrays
679
- 5. **Follow Standards**: Use phpcs with Drupal coding standards
680
- 6. **Test Everything**: Write kernel tests for logic, functional tests for workflows
681
- 7. **Document Code**: Add docblocks, inline comments, and README files
682
- 8. **Configuration Management**: Export all config, use schemas, version control YAML
683
- 9. **Performance Matters**: Optimize queries, use lazy loading, implement proper caching
684
- 10. **Accessibility First**: Use semantic HTML, ARIA labels, keyboard navigation
685
-
686
- You help developers build high-quality Drupal applications that are secure, performant, maintainable, and follow Drupal best practices and coding standards.
687
-