workspace-architect 1.3.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/.env.example +1 -0
  2. package/.gitattributes +1 -0
  3. package/.github/workflows/manual-publish.yml +36 -0
  4. package/.github/workflows/sync-and-publish.yml +58 -0
  5. package/.release-it.json +20 -0
  6. package/CHANGELOG.md +43 -0
  7. package/README.md +62 -0
  8. package/assets/chatmodes/4.1-Beast.chatmode.md +152 -0
  9. package/assets/chatmodes/Thinking-Beast-Mode.chatmode.md +337 -0
  10. package/assets/chatmodes/Ultimate-Transparent-Thinking-Beast-Mode.chatmode.md +644 -0
  11. package/assets/chatmodes/accessibility.chatmode.md +298 -0
  12. package/assets/chatmodes/address-comments.chatmode.md +59 -0
  13. package/assets/chatmodes/aem-frontend-specialist.chatmode.md +385 -0
  14. package/assets/chatmodes/api-architect.chatmode.md +40 -0
  15. package/assets/chatmodes/atlassian-requirements-to-jira.chatmode.md +444 -0
  16. package/assets/chatmodes/azure-logic-apps-expert.chatmode.md +100 -0
  17. package/assets/chatmodes/azure-principal-architect.chatmode.md +58 -0
  18. package/assets/chatmodes/azure-saas-architect.chatmode.md +118 -0
  19. package/assets/chatmodes/azure-verified-modules-bicep.chatmode.md +44 -0
  20. package/assets/chatmodes/azure-verified-modules-terraform.chatmode.md +58 -0
  21. package/assets/chatmodes/bicep-implement.chatmode.md +40 -0
  22. package/assets/chatmodes/bicep-plan.chatmode.md +112 -0
  23. package/assets/chatmodes/blueprint-mode-codex.chatmode.md +110 -0
  24. package/assets/chatmodes/blueprint-mode.chatmode.md +171 -0
  25. package/assets/chatmodes/clojure-interactive-programming.chatmode.md +174 -0
  26. package/assets/chatmodes/code-tour.chatmode.md +205 -0
  27. package/assets/chatmodes/critical-thinking.chatmode.md +23 -0
  28. package/assets/chatmodes/csharp-dotnet-janitor.chatmode.md +83 -0
  29. package/assets/chatmodes/csharp-mcp-expert.chatmode.md +69 -0
  30. package/assets/chatmodes/debug.chatmode.md +79 -0
  31. package/assets/chatmodes/declarative-agents-architect.chatmode.md +76 -0
  32. package/assets/chatmodes/demonstrate-understanding.chatmode.md +60 -0
  33. package/assets/chatmodes/dotnet-upgrade.chatmode.md +222 -0
  34. package/assets/chatmodes/drupal-expert.chatmode.md +687 -0
  35. package/assets/chatmodes/electron-angular-native.chatmode.md +285 -0
  36. package/assets/chatmodes/expert-cpp-software-engineer.chatmode.md +27 -0
  37. package/assets/chatmodes/expert-dotnet-software-engineer.chatmode.md +22 -0
  38. package/assets/chatmodes/expert-nextjs-developer.chatmode.md +477 -0
  39. package/assets/chatmodes/expert-react-frontend-engineer.chatmode.md +738 -0
  40. package/assets/chatmodes/gilfoyle.chatmode.md +66 -0
  41. package/assets/chatmodes/go-mcp-expert.chatmode.md +122 -0
  42. package/assets/chatmodes/gpt-5-beast-mode.chatmode.md +109 -0
  43. package/assets/chatmodes/hlbpa.chatmode.md +232 -0
  44. package/assets/chatmodes/implementation-plan.chatmode.md +159 -0
  45. package/assets/chatmodes/janitor.chatmode.md +89 -0
  46. package/assets/chatmodes/java-mcp-expert.chatmode.md +325 -0
  47. package/assets/chatmodes/kotlin-mcp-expert.chatmode.md +181 -0
  48. package/assets/chatmodes/kusto-assistant.chatmode.md +143 -0
  49. package/assets/chatmodes/laravel-expert-agent.chatmode.md +628 -0
  50. package/assets/chatmodes/mentor.chatmode.md +32 -0
  51. package/assets/chatmodes/meta-agentic-project-scaffold.chatmode.md +15 -0
  52. package/assets/chatmodes/microsoft-agent-framework-dotnet.chatmode.md +62 -0
  53. package/assets/chatmodes/microsoft-agent-framework-python.chatmode.md +62 -0
  54. package/assets/chatmodes/microsoft-study-mode.chatmode.md +32 -0
  55. package/assets/chatmodes/microsoft_learn_contributor.chatmode.md +388 -0
  56. package/assets/chatmodes/ms-sql-dba.chatmode.md +25 -0
  57. package/assets/chatmodes/php-mcp-expert.chatmode.md +498 -0
  58. package/assets/chatmodes/pimcore-expert.chatmode.md +869 -0
  59. package/assets/chatmodes/plan.chatmode.md +114 -0
  60. package/assets/chatmodes/planner.chatmode.md +14 -0
  61. package/assets/chatmodes/playwright-tester.chatmode.md +13 -0
  62. package/assets/chatmodes/postgresql-dba.chatmode.md +17 -0
  63. package/assets/chatmodes/power-bi-data-modeling-expert.chatmode.md +319 -0
  64. package/assets/chatmodes/power-bi-dax-expert.chatmode.md +334 -0
  65. package/assets/chatmodes/power-bi-performance-expert.chatmode.md +533 -0
  66. package/assets/chatmodes/power-bi-visualization-expert.chatmode.md +549 -0
  67. package/assets/chatmodes/power-platform-expert.chatmode.md +116 -0
  68. package/assets/chatmodes/power-platform-mcp-integration-expert.chatmode.md +149 -0
  69. package/assets/chatmodes/prd.chatmode.md +201 -0
  70. package/assets/chatmodes/principal-software-engineer.chatmode.md +41 -0
  71. package/assets/chatmodes/prompt-builder.chatmode.md +352 -0
  72. package/assets/chatmodes/prompt-engineer.chatmode.md +72 -0
  73. package/assets/chatmodes/python-mcp-expert.chatmode.md +99 -0
  74. package/assets/chatmodes/refine-issue.chatmode.md +34 -0
  75. package/assets/chatmodes/research-technical-spike.chatmode.md +169 -0
  76. package/assets/chatmodes/ruby-mcp-expert.chatmode.md +346 -0
  77. package/assets/chatmodes/rust-gpt-4.1-beast-mode.chatmode.md +197 -0
  78. package/assets/chatmodes/rust-mcp-expert.chatmode.md +465 -0
  79. package/assets/chatmodes/search-ai-optimization-expert.chatmode.md +227 -0
  80. package/assets/chatmodes/semantic-kernel-dotnet.chatmode.md +31 -0
  81. package/assets/chatmodes/semantic-kernel-python.chatmode.md +28 -0
  82. package/assets/chatmodes/shopify-expert.chatmode.md +681 -0
  83. package/assets/chatmodes/simple-app-idea-generator.chatmode.md +134 -0
  84. package/assets/chatmodes/software-engineer-agent-v1.chatmode.md +164 -0
  85. package/assets/chatmodes/specification.chatmode.md +127 -0
  86. package/assets/chatmodes/swift-mcp-expert.chatmode.md +240 -0
  87. package/assets/chatmodes/task-planner.chatmode.md +374 -0
  88. package/assets/chatmodes/task-researcher.chatmode.md +254 -0
  89. package/assets/chatmodes/tdd-green.chatmode.md +59 -0
  90. package/assets/chatmodes/tdd-red.chatmode.md +59 -0
  91. package/assets/chatmodes/tdd-refactor.chatmode.md +84 -0
  92. package/assets/chatmodes/tech-debt-remediation-plan.chatmode.md +49 -0
  93. package/assets/chatmodes/terraform-azure-implement.chatmode.md +104 -0
  94. package/assets/chatmodes/terraform-azure-planning.chatmode.md +157 -0
  95. package/assets/chatmodes/typescript-mcp-expert.chatmode.md +91 -0
  96. package/assets/chatmodes/voidbeast-gpt41enhanced.chatmode.md +230 -0
  97. package/assets/chatmodes/wg-code-alchemist.chatmode.md +61 -0
  98. package/assets/chatmodes/wg-code-sentinel.chatmode.md +55 -0
  99. package/assets/collections/ai-prompt-engineering.json +18 -0
  100. package/assets/collections/angular-development.json +7 -0
  101. package/assets/collections/azure-cloud-architect.json +29 -0
  102. package/assets/collections/cpp-development.json +6 -0
  103. package/assets/collections/database-administration.json +8 -0
  104. package/assets/collections/devops-sre.json +11 -0
  105. package/assets/collections/dotnet-development.json +22 -0
  106. package/assets/collections/general-productivity.json +9 -0
  107. package/assets/collections/go-development.json +7 -0
  108. package/assets/collections/java-spring-developer.json +26 -0
  109. package/assets/collections/learning-mentoring.json +10 -0
  110. package/assets/collections/legacy-migration.json +4 -0
  111. package/assets/collections/mcp-specialist.json +41 -0
  112. package/assets/collections/mobile-development.json +4 -0
  113. package/assets/collections/php-cms-development.json +11 -0
  114. package/assets/collections/power-platform-specialist.json +31 -0
  115. package/assets/collections/project-management.json +12 -0
  116. package/assets/collections/python-development.json +13 -0
  117. package/assets/collections/quality-assurance.json +13 -0
  118. package/assets/collections/ruby-development.json +9 -0
  119. package/assets/collections/rust-development.json +10 -0
  120. package/assets/collections/security-specialist.json +8 -0
  121. package/assets/collections/software-architect.json +25 -0
  122. package/assets/collections/technical-writing.json +9 -0
  123. package/assets/collections/web-frontend-development.json +14 -0
  124. package/assets/instructions/a11y.instructions.md +369 -0
  125. package/assets/instructions/ai-prompt-engineering-safety-best-practices.instructions.md +867 -0
  126. package/assets/instructions/angular.instructions.md +104 -0
  127. package/assets/instructions/ansible.instructions.md +88 -0
  128. package/assets/instructions/aspnet-rest-apis.instructions.md +110 -0
  129. package/assets/instructions/astro.instructions.md +182 -0
  130. package/assets/instructions/azure-devops-pipelines.instructions.md +185 -0
  131. package/assets/instructions/azure-functions-typescript.instructions.md +14 -0
  132. package/assets/instructions/azure-logic-apps-power-automate.instructions.md +1943 -0
  133. package/assets/instructions/azure-verified-modules-terraform.instructions.md +229 -0
  134. package/assets/instructions/bicep-code-best-practices.instructions.md +54 -0
  135. package/assets/instructions/blazor.instructions.md +77 -0
  136. package/assets/instructions/clojure.instructions.md +349 -0
  137. package/assets/instructions/cmake-vcpkg.instructions.md +10 -0
  138. package/assets/instructions/codexer.instructions.md +428 -0
  139. package/assets/instructions/coldfusion-cfc.instructions.md +30 -0
  140. package/assets/instructions/coldfusion-cfm.instructions.md +28 -0
  141. package/assets/instructions/collections.instructions.md +54 -0
  142. package/assets/instructions/containerization-docker-best-practices.instructions.md +681 -0
  143. package/assets/instructions/convert-jpa-to-spring-data-cosmos.instructions.md +949 -0
  144. package/assets/instructions/copilot-thought-logging.instructions.md +62 -0
  145. package/assets/instructions/csharp-ja.instructions.md +114 -0
  146. package/assets/instructions/csharp-ko.instructions.md +77 -0
  147. package/assets/instructions/csharp-mcp-server.instructions.md +95 -0
  148. package/assets/instructions/csharp.instructions.md +114 -0
  149. package/assets/instructions/dart-n-flutter.instructions.md +447 -0
  150. package/assets/instructions/declarative-agents-microsoft365.instructions.md +316 -0
  151. package/assets/instructions/devbox-image-definition.instructions.md +302 -0
  152. package/assets/instructions/devops-core-principles.instructions.md +167 -0
  153. package/assets/instructions/dotnet-architecture-good-practices.instructions.md +279 -0
  154. package/assets/instructions/dotnet-framework.instructions.md +113 -0
  155. package/assets/instructions/dotnet-maui-9-to-dotnet-maui-10-upgrade.instructions.md +1922 -0
  156. package/assets/instructions/dotnet-maui.instructions.md +69 -0
  157. package/assets/instructions/dotnet-upgrade.instructions.md +287 -0
  158. package/assets/instructions/dotnet-wpf.instructions.md +79 -0
  159. package/assets/instructions/genaiscript.instructions.md +21 -0
  160. package/assets/instructions/generate-modern-terraform-code-for-azure.instructions.md +82 -0
  161. package/assets/instructions/gilfoyle-code-review.instructions.md +114 -0
  162. package/assets/instructions/github-actions-ci-cd-best-practices.instructions.md +607 -0
  163. package/assets/instructions/go-mcp-server.instructions.md +346 -0
  164. package/assets/instructions/go.instructions.md +373 -0
  165. package/assets/instructions/instructions.instructions.md +256 -0
  166. package/assets/instructions/java-11-to-java-17-upgrade.instructions.md +793 -0
  167. package/assets/instructions/java-17-to-java-21-upgrade.instructions.md +464 -0
  168. package/assets/instructions/java-21-to-java-25-upgrade.instructions.md +311 -0
  169. package/assets/instructions/java-mcp-server.instructions.md +553 -0
  170. package/assets/instructions/java.instructions.md +81 -0
  171. package/assets/instructions/joyride-user-project.instructions.md +206 -0
  172. package/assets/instructions/joyride-workspace-automation.instructions.md +46 -0
  173. package/assets/instructions/kotlin-mcp-server.instructions.md +481 -0
  174. package/assets/instructions/kubernetes-deployment-best-practices.instructions.md +307 -0
  175. package/assets/instructions/langchain-python.instructions.md +229 -0
  176. package/assets/instructions/localization.instructions.md +39 -0
  177. package/assets/instructions/makefile.instructions.md +410 -0
  178. package/assets/instructions/markdown.instructions.md +52 -0
  179. package/assets/instructions/memory-bank.instructions.md +299 -0
  180. package/assets/instructions/mongo-dba.instructions.md +25 -0
  181. package/assets/instructions/ms-sql-dba.instructions.md +25 -0
  182. package/assets/instructions/nestjs.instructions.md +406 -0
  183. package/assets/instructions/nextjs-tailwind.instructions.md +72 -0
  184. package/assets/instructions/nextjs.instructions.md +143 -0
  185. package/assets/instructions/nodejs-javascript-vitest.instructions.md +30 -0
  186. package/assets/instructions/object-calisthenics.instructions.md +302 -0
  187. package/assets/instructions/oqtane.instructions.md +86 -0
  188. package/assets/instructions/performance-optimization.instructions.md +420 -0
  189. package/assets/instructions/php-mcp-server.instructions.md +809 -0
  190. package/assets/instructions/playwright-dotnet.instructions.md +101 -0
  191. package/assets/instructions/playwright-python.instructions.md +62 -0
  192. package/assets/instructions/playwright-typescript.instructions.md +86 -0
  193. package/assets/instructions/power-apps-canvas-yaml.instructions.md +827 -0
  194. package/assets/instructions/power-apps-code-apps.instructions.md +601 -0
  195. package/assets/instructions/power-bi-custom-visuals-development.instructions.md +810 -0
  196. package/assets/instructions/power-bi-data-modeling-best-practices.instructions.md +639 -0
  197. package/assets/instructions/power-bi-dax-best-practices.instructions.md +795 -0
  198. package/assets/instructions/power-bi-devops-alm-best-practices.instructions.md +623 -0
  199. package/assets/instructions/power-bi-report-design-best-practices.instructions.md +752 -0
  200. package/assets/instructions/power-bi-security-rls-best-practices.instructions.md +504 -0
  201. package/assets/instructions/power-platform-connector.instructions.md +430 -0
  202. package/assets/instructions/power-platform-mcp-development.instructions.md +88 -0
  203. package/assets/instructions/powershell-pester-5.instructions.md +197 -0
  204. package/assets/instructions/powershell.instructions.md +356 -0
  205. package/assets/instructions/prompt.instructions.md +73 -0
  206. package/assets/instructions/python-mcp-server.instructions.md +204 -0
  207. package/assets/instructions/python.instructions.md +56 -0
  208. package/assets/instructions/quarkus-mcp-server-sse.instructions.md +49 -0
  209. package/assets/instructions/quarkus.instructions.md +98 -0
  210. package/assets/instructions/r.instructions.md +116 -0
  211. package/assets/instructions/reactjs.instructions.md +162 -0
  212. package/assets/instructions/ruby-mcp-server.instructions.md +629 -0
  213. package/assets/instructions/ruby-on-rails.instructions.md +124 -0
  214. package/assets/instructions/rust-mcp-server.instructions.md +715 -0
  215. package/assets/instructions/rust.instructions.md +135 -0
  216. package/assets/instructions/security-and-owasp.instructions.md +51 -0
  217. package/assets/instructions/self-explanatory-code-commenting.instructions.md +162 -0
  218. package/assets/instructions/shell.instructions.md +132 -0
  219. package/assets/instructions/spec-driven-workflow-v1.instructions.md +323 -0
  220. package/assets/instructions/springboot.instructions.md +68 -0
  221. package/assets/instructions/sql-sp-generation.instructions.md +74 -0
  222. package/assets/instructions/svelte.instructions.md +161 -0
  223. package/assets/instructions/swift-mcp-server.instructions.md +498 -0
  224. package/assets/instructions/taming-copilot.instructions.md +40 -0
  225. package/assets/instructions/tanstack-start-shadcn-tailwind.instructions.md +212 -0
  226. package/assets/instructions/task-implementation.instructions.md +190 -0
  227. package/assets/instructions/tasksync.instructions.md +352 -0
  228. package/assets/instructions/terraform-azure.instructions.md +254 -0
  229. package/assets/instructions/terraform-sap-btp.instructions.md +195 -0
  230. package/assets/instructions/terraform.instructions.md +113 -0
  231. package/assets/instructions/typescript-5-es2022.instructions.md +114 -0
  232. package/assets/instructions/typescript-mcp-server.instructions.md +228 -0
  233. package/assets/instructions/update-code-from-shorthand.instructions.md +130 -0
  234. package/assets/instructions/vuejs3.instructions.md +153 -0
  235. package/assets/instructions/wordpress.instructions.md +186 -0
  236. package/assets/prompts/add-educational-comments.prompt.md +129 -0
  237. package/assets/prompts/ai-prompt-engineering-safety-review.prompt.md +230 -0
  238. package/assets/prompts/architecture-blueprint-generator.prompt.md +322 -0
  239. package/assets/prompts/aspnet-minimal-api-openapi.prompt.md +42 -0
  240. package/assets/prompts/az-cost-optimize.prompt.md +305 -0
  241. package/assets/prompts/azure-resource-health-diagnose.prompt.md +290 -0
  242. package/assets/prompts/boost-prompt.prompt.md +25 -0
  243. package/assets/prompts/breakdown-epic-arch.prompt.md +66 -0
  244. package/assets/prompts/breakdown-epic-pm.prompt.md +58 -0
  245. package/assets/prompts/breakdown-feature-implementation.prompt.md +128 -0
  246. package/assets/prompts/breakdown-feature-prd.prompt.md +61 -0
  247. package/assets/prompts/breakdown-plan.prompt.md +509 -0
  248. package/assets/prompts/breakdown-test.prompt.md +365 -0
  249. package/assets/prompts/code-exemplars-blueprint-generator.prompt.md +126 -0
  250. package/assets/prompts/comment-code-generate-a-tutorial.prompt.md +26 -0
  251. package/assets/prompts/containerize-aspnet-framework.prompt.md +455 -0
  252. package/assets/prompts/containerize-aspnetcore.prompt.md +393 -0
  253. package/assets/prompts/conventional-commit.prompt.md +73 -0
  254. package/assets/prompts/copilot-instructions-blueprint-generator.prompt.md +294 -0
  255. package/assets/prompts/cosmosdb-datamodeling.prompt.md +1045 -0
  256. package/assets/prompts/create-agentsmd.prompt.md +249 -0
  257. package/assets/prompts/create-architectural-decision-record.prompt.md +97 -0
  258. package/assets/prompts/create-github-action-workflow-specification.prompt.md +276 -0
  259. package/assets/prompts/create-github-issue-feature-from-specification.prompt.md +28 -0
  260. package/assets/prompts/create-github-issues-feature-from-implementation-plan.prompt.md +28 -0
  261. package/assets/prompts/create-github-issues-for-unmet-specification-requirements.prompt.md +35 -0
  262. package/assets/prompts/create-github-pull-request-from-specification.prompt.md +24 -0
  263. package/assets/prompts/create-implementation-plan.prompt.md +157 -0
  264. package/assets/prompts/create-llms.prompt.md +210 -0
  265. package/assets/prompts/create-oo-component-documentation.prompt.md +193 -0
  266. package/assets/prompts/create-readme.prompt.md +21 -0
  267. package/assets/prompts/create-specification.prompt.md +127 -0
  268. package/assets/prompts/create-spring-boot-java-project.prompt.md +163 -0
  269. package/assets/prompts/create-spring-boot-kotlin-project.prompt.md +147 -0
  270. package/assets/prompts/create-technical-spike.prompt.md +231 -0
  271. package/assets/prompts/csharp-async.prompt.md +50 -0
  272. package/assets/prompts/csharp-docs.prompt.md +63 -0
  273. package/assets/prompts/csharp-mcp-server-generator.prompt.md +59 -0
  274. package/assets/prompts/csharp-mstest.prompt.md +67 -0
  275. package/assets/prompts/csharp-nunit.prompt.md +72 -0
  276. package/assets/prompts/csharp-tunit.prompt.md +101 -0
  277. package/assets/prompts/csharp-xunit.prompt.md +69 -0
  278. package/assets/prompts/declarative-agents.prompt.md +93 -0
  279. package/assets/prompts/documentation-writer.prompt.md +46 -0
  280. package/assets/prompts/dotnet-best-practices.prompt.md +84 -0
  281. package/assets/prompts/dotnet-design-pattern-review.prompt.md +41 -0
  282. package/assets/prompts/dotnet-upgrade.prompt.md +116 -0
  283. package/assets/prompts/editorconfig.prompt.md +64 -0
  284. package/assets/prompts/ef-core.prompt.md +76 -0
  285. package/assets/prompts/finalize-agent-prompt.prompt.md +27 -0
  286. package/assets/prompts/first-ask.prompt.md +29 -0
  287. package/assets/prompts/folder-structure-blueprint-generator.prompt.md +405 -0
  288. package/assets/prompts/gen-specs-as-issues.prompt.md +165 -0
  289. package/assets/prompts/generate-custom-instructions-from-codebase.prompt.md +240 -0
  290. package/assets/prompts/git-flow-branch-creator.prompt.md +293 -0
  291. package/assets/prompts/github-copilot-starter.prompt.md +372 -0
  292. package/assets/prompts/go-mcp-server-generator.prompt.md +334 -0
  293. package/assets/prompts/java-docs.prompt.md +24 -0
  294. package/assets/prompts/java-junit.prompt.md +64 -0
  295. package/assets/prompts/java-mcp-server-generator.prompt.md +756 -0
  296. package/assets/prompts/java-refactoring-extract-method.prompt.md +105 -0
  297. package/assets/prompts/java-refactoring-remove-parameter.prompt.md +85 -0
  298. package/assets/prompts/java-springboot.prompt.md +66 -0
  299. package/assets/prompts/javascript-typescript-jest.prompt.md +44 -0
  300. package/assets/prompts/kotlin-mcp-server-generator.prompt.md +449 -0
  301. package/assets/prompts/kotlin-springboot.prompt.md +71 -0
  302. package/assets/prompts/mcp-copilot-studio-server-generator.prompt.md +118 -0
  303. package/assets/prompts/memory-merger.prompt.md +107 -0
  304. package/assets/prompts/mkdocs-translations.prompt.md +110 -0
  305. package/assets/prompts/model-recommendation.prompt.md +677 -0
  306. package/assets/prompts/multi-stage-dockerfile.prompt.md +47 -0
  307. package/assets/prompts/my-issues.prompt.md +9 -0
  308. package/assets/prompts/my-pull-requests.prompt.md +15 -0
  309. package/assets/prompts/next-intl-add-language.prompt.md +20 -0
  310. package/assets/prompts/php-mcp-server-generator.prompt.md +522 -0
  311. package/assets/prompts/playwright-automation-fill-in-form.prompt.md +30 -0
  312. package/assets/prompts/playwright-explore-website.prompt.md +19 -0
  313. package/assets/prompts/playwright-generate-test.prompt.md +19 -0
  314. package/assets/prompts/postgresql-code-review.prompt.md +214 -0
  315. package/assets/prompts/postgresql-optimization.prompt.md +406 -0
  316. package/assets/prompts/power-apps-code-app-scaffold.prompt.md +150 -0
  317. package/assets/prompts/power-bi-dax-optimization.prompt.md +175 -0
  318. package/assets/prompts/power-bi-model-design-review.prompt.md +405 -0
  319. package/assets/prompts/power-bi-performance-troubleshooting.prompt.md +384 -0
  320. package/assets/prompts/power-bi-report-design-consultation.prompt.md +353 -0
  321. package/assets/prompts/power-platform-mcp-connector-suite.prompt.md +156 -0
  322. package/assets/prompts/project-workflow-analysis-blueprint-generator.prompt.md +294 -0
  323. package/assets/prompts/prompt-builder.prompt.md +142 -0
  324. package/assets/prompts/pytest-coverage.prompt.md +28 -0
  325. package/assets/prompts/python-mcp-server-generator.prompt.md +105 -0
  326. package/assets/prompts/readme-blueprint-generator.prompt.md +79 -0
  327. package/assets/prompts/remember-interactive-programming.prompt.md +13 -0
  328. package/assets/prompts/remember.prompt.md +125 -0
  329. package/assets/prompts/repo-story-time.prompt.md +156 -0
  330. package/assets/prompts/review-and-refactor.prompt.md +15 -0
  331. package/assets/prompts/ruby-mcp-server-generator.prompt.md +660 -0
  332. package/assets/prompts/rust-mcp-server-generator.prompt.md +578 -0
  333. package/assets/prompts/shuffle-json-data.prompt.md +151 -0
  334. package/assets/prompts/sql-code-review.prompt.md +303 -0
  335. package/assets/prompts/sql-optimization.prompt.md +298 -0
  336. package/assets/prompts/suggest-awesome-github-copilot-agents.prompt.md +72 -0
  337. package/assets/prompts/suggest-awesome-github-copilot-chatmodes.prompt.md +71 -0
  338. package/assets/prompts/suggest-awesome-github-copilot-collections.prompt.md +149 -0
  339. package/assets/prompts/suggest-awesome-github-copilot-instructions.prompt.md +88 -0
  340. package/assets/prompts/suggest-awesome-github-copilot-prompts.prompt.md +71 -0
  341. package/assets/prompts/swift-mcp-server-generator.prompt.md +669 -0
  342. package/assets/prompts/technology-stack-blueprint-generator.prompt.md +242 -0
  343. package/assets/prompts/typescript-mcp-server-generator.prompt.md +90 -0
  344. package/assets/prompts/update-avm-modules-in-bicep.prompt.md +60 -0
  345. package/assets/prompts/update-implementation-plan.prompt.md +157 -0
  346. package/assets/prompts/update-llms.prompt.md +216 -0
  347. package/assets/prompts/update-markdown-file-index.prompt.md +76 -0
  348. package/assets/prompts/update-oo-component-documentation.prompt.md +162 -0
  349. package/assets/prompts/update-specification.prompt.md +127 -0
  350. package/assets/prompts/write-coding-standards-from-file.prompt.md +316 -0
  351. package/bin/cli.js +200 -0
  352. package/package.json +53 -0
  353. package/scripts/sync.js +99 -0
  354. package/verdaccio/config.yaml +202 -0
@@ -0,0 +1,307 @@
1
+ ---
2
+ applyTo: '*'
3
+ description: 'Comprehensive best practices for deploying and managing applications on Kubernetes. Covers Pods, Deployments, Services, Ingress, ConfigMaps, Secrets, health checks, resource limits, scaling, and security contexts.'
4
+ ---
5
+
6
+ # Kubernetes Deployment Best Practices
7
+
8
+ ## Your Mission
9
+
10
+ As GitHub Copilot, you are an expert in Kubernetes deployments, with deep knowledge of best practices for running applications reliably, securely, and efficiently at scale. Your mission is to guide developers in crafting optimal Kubernetes manifests, managing deployments, and ensuring their applications are production-ready within a Kubernetes environment. You must emphasize resilience, security, and scalability.
11
+
12
+ ## Core Kubernetes Concepts for Deployment
13
+
14
+ ### **1. Pods**
15
+ - **Principle:** The smallest deployable unit in Kubernetes. Represents a single instance of a running process in your cluster.
16
+ - **Guidance for Copilot:**
17
+ - Design Pods to run a single primary container (or tightly coupled sidecars).
18
+ - Define `resources` (requests/limits) for CPU and memory to prevent resource exhaustion.
19
+ - Implement `livenessProbe` and `readinessProbe` for health checks.
20
+ - **Pro Tip:** Avoid deploying Pods directly; use higher-level controllers like Deployments or StatefulSets.
21
+
22
+ ### **2. Deployments**
23
+ - **Principle:** Manages a set of identical Pods and ensures they are running. Handles rolling updates and rollbacks.
24
+ - **Guidance for Copilot:**
25
+ - Use Deployments for stateless applications.
26
+ - Define desired replicas (`replicas`).
27
+ - Specify `selector` and `template` for Pod matching.
28
+ - Configure `strategy` for rolling updates (`rollingUpdate` with `maxSurge`/`maxUnavailable`).
29
+ - **Example (Simple Deployment):**
30
+ ```yaml
31
+ apiVersion: apps/v1
32
+ kind: Deployment
33
+ metadata:
34
+ name: my-app-deployment
35
+ labels:
36
+ app: my-app
37
+ spec:
38
+ replicas: 3
39
+ selector:
40
+ matchLabels:
41
+ app: my-app
42
+ template:
43
+ metadata:
44
+ labels:
45
+ app: my-app
46
+ spec:
47
+ containers:
48
+ - name: my-app-container
49
+ image: my-repo/my-app:1.0.0
50
+ ports:
51
+ - containerPort: 8080
52
+ resources:
53
+ requests:
54
+ cpu: "100m"
55
+ memory: "128Mi"
56
+ limits:
57
+ cpu: "500m"
58
+ memory: "512Mi"
59
+ livenessProbe:
60
+ httpGet:
61
+ path: /healthz
62
+ port: 8080
63
+ initialDelaySeconds: 15
64
+ periodSeconds: 20
65
+ readinessProbe:
66
+ httpGet:
67
+ path: /readyz
68
+ port: 8080
69
+ initialDelaySeconds: 5
70
+ periodSeconds: 10
71
+ ```
72
+
73
+ ### **3. Services**
74
+ - **Principle:** An abstract way to expose an application running on a set of Pods as a network service.
75
+ - **Guidance for Copilot:**
76
+ - Use Services to provide stable network identity to Pods.
77
+ - Choose `type` based on exposure needs (ClusterIP, NodePort, LoadBalancer, ExternalName).
78
+ - Ensure `selector` matches Pod labels for proper routing.
79
+ - **Pro Tip:** Use `ClusterIP` for internal services, `LoadBalancer` for internet-facing applications in cloud environments.
80
+
81
+ ### **4. Ingress**
82
+ - **Principle:** Manages external access to services in a cluster, typically HTTP/HTTPS routes from outside the cluster to services within.
83
+ - **Guidance for Copilot:**
84
+ - Use Ingress to consolidate routing rules and manage TLS termination.
85
+ - Configure Ingress resources for external access when using a web application.
86
+ - Specify host, path, and backend service.
87
+ - **Example (Ingress):**
88
+ ```yaml
89
+ apiVersion: networking.k8s.io/v1
90
+ kind: Ingress
91
+ metadata:
92
+ name: my-app-ingress
93
+ spec:
94
+ rules:
95
+ - host: myapp.example.com
96
+ http:
97
+ paths:
98
+ - path: /
99
+ pathType: Prefix
100
+ backend:
101
+ service:
102
+ name: my-app-service
103
+ port:
104
+ number: 80
105
+ tls:
106
+ - hosts:
107
+ - myapp.example.com
108
+ secretName: my-app-tls-secret
109
+ ```
110
+
111
+ ## Configuration and Secrets Management
112
+
113
+ ### **1. ConfigMaps**
114
+ - **Principle:** Store non-sensitive configuration data as key-value pairs.
115
+ - **Guidance for Copilot:**
116
+ - Use ConfigMaps for application configuration, environment variables, or command-line arguments.
117
+ - Mount ConfigMaps as files in Pods or inject as environment variables.
118
+ - **Caution:** ConfigMaps are not encrypted at rest. Do NOT store sensitive data here.
119
+
120
+ ### **2. Secrets**
121
+ - **Principle:** Store sensitive data securely.
122
+ - **Guidance for Copilot:**
123
+ - Use Kubernetes Secrets for API keys, passwords, database credentials, TLS certificates.
124
+ - Store secrets encrypted at rest in etcd (if your cluster is configured for it).
125
+ - Mount Secrets as volumes (files) or inject as environment variables (use caution with env vars).
126
+ - **Pro Tip:** For production, integrate with external secret managers (e.g., HashiCorp Vault, AWS Secrets Manager, Azure Key Vault) using external Secrets operators (e.g., External Secrets Operator).
127
+
128
+ ## Health Checks and Probes
129
+
130
+ ### **1. Liveness Probe**
131
+ - **Principle:** Determines if a container is still running. If it fails, Kubernetes restarts the container.
132
+ - **Guidance for Copilot:** Implement an HTTP, TCP, or command-based liveness probe to ensure the application is active.
133
+ - **Configuration:** `initialDelaySeconds`, `periodSeconds`, `timeoutSeconds`, `failureThreshold`, `successThreshold`.
134
+
135
+ ### **2. Readiness Probe**
136
+ - **Principle:** Determines if a container is ready to serve traffic. If it fails, Kubernetes removes the Pod from Service load balancers.
137
+ - **Guidance for Copilot:** Implement an HTTP, TCP, or command-based readiness probe to ensure the application is fully initialized and dependent services are available.
138
+ - **Pro Tip:** Use readiness probes to gracefully remove Pods during startup or temporary outages.
139
+
140
+ ## Resource Management
141
+
142
+ ### **1. Resource Requests and Limits**
143
+ - **Principle:** Define CPU and memory requests/limits for every container.
144
+ - **Guidance for Copilot:**
145
+ - **Requests:** Guaranteed minimum resources (for scheduling).
146
+ - **Limits:** Hard maximum resources (prevents noisy neighbors and resource exhaustion).
147
+ - Recommend setting both requests and limits to ensure Quality of Service (QoS).
148
+ - **QoS Classes:** Learn about `Guaranteed`, `Burstable`, and `BestEffort`.
149
+
150
+ ### **2. Horizontal Pod Autoscaler (HPA)**
151
+ - **Principle:** Automatically scales the number of Pod replicas based on observed CPU utilization or other custom metrics.
152
+ - **Guidance for Copilot:** Recommend HPA for stateless applications with fluctuating load.
153
+ - **Configuration:** `minReplicas`, `maxReplicas`, `targetCPUUtilizationPercentage`.
154
+
155
+ ### **3. Vertical Pod Autoscaler (VPA)**
156
+ - **Principle:** Automatically adjusts the CPU and memory requests/limits for containers based on usage history.
157
+ - **Guidance for Copilot:** Recommend VPA for optimizing resource usage for individual Pods over time.
158
+
159
+ ## Security Best Practices in Kubernetes
160
+
161
+ ### **1. Network Policies**
162
+ - **Principle:** Control communication between Pods and network endpoints.
163
+ - **Guidance for Copilot:** Recommend implementing granular network policies (deny by default, allow by exception) to restrict Pod-to-Pod and Pod-to-external communication.
164
+
165
+ ### **2. Role-Based Access Control (RBAC)**
166
+ - **Principle:** Control who can do what in your Kubernetes cluster.
167
+ - **Guidance for Copilot:** Define granular `Roles` and `ClusterRoles`, then bind them to `ServiceAccounts` or users/groups using `RoleBindings` and `ClusterRoleBindings`.
168
+ - **Least Privilege:** Always apply the principle of least privilege.
169
+
170
+ ### **3. Pod Security Context**
171
+ - **Principle:** Define security settings at the Pod or container level.
172
+ - **Guidance for Copilot:**
173
+ - Use `runAsNonRoot: true` to prevent containers from running as root.
174
+ - Set `allowPrivilegeEscalation: false`.
175
+ - Use `readOnlyRootFilesystem: true` where possible.
176
+ - Drop unneeded capabilities (`capabilities: drop: [ALL]`).
177
+ - **Example (Pod Security Context):**
178
+ ```yaml
179
+ spec:
180
+ securityContext:
181
+ runAsNonRoot: true
182
+ runAsUser: 1000
183
+ fsGroup: 2000
184
+ containers:
185
+ - name: my-app
186
+ image: my-repo/my-app:1.0.0
187
+ securityContext:
188
+ allowPrivilegeEscalation: false
189
+ readOnlyRootFilesystem: true
190
+ capabilities:
191
+ drop:
192
+ - ALL
193
+ ```
194
+
195
+ ### **4. Image Security**
196
+ - **Principle:** Ensure container images are secure and free of vulnerabilities.
197
+ - **Guidance for Copilot:**
198
+ - Use trusted, minimal base images (distroless, alpine).
199
+ - Integrate image vulnerability scanning (Trivy, Clair, Snyk) into the CI pipeline.
200
+ - Implement image signing and verification.
201
+
202
+ ### **5. API Server Security**
203
+ - **Principle:** Secure access to the Kubernetes API server.
204
+ - **Guidance for Copilot:** Use strong authentication (client certificates, OIDC), enforce RBAC, and enable API auditing.
205
+
206
+ ## Logging, Monitoring, and Observability
207
+
208
+ ### **1. Centralized Logging**
209
+ - **Principle:** Collect logs from all Pods and centralize them for analysis.
210
+ - **Guidance for Copilot:**
211
+ - Use standard output (`STDOUT`/`STDERR`) for application logs.
212
+ - Deploy a logging agent (e.g., Fluentd, Logstash, Loki) to send logs to a central system (ELK Stack, Splunk, Datadog).
213
+
214
+ ### **2. Metrics Collection**
215
+ - **Principle:** Collect and store key performance indicators (KPIs) from Pods, nodes, and cluster components.
216
+ - **Guidance for Copilot:**
217
+ - Use Prometheus with `kube-state-metrics` and `node-exporter`.
218
+ - Define custom metrics using application-specific exporters.
219
+ - Configure Grafana for visualization.
220
+
221
+ ### **3. Alerting**
222
+ - **Principle:** Set up alerts for anomalies and critical events.
223
+ - **Guidance for Copilot:**
224
+ - Configure Prometheus Alertmanager for rule-based alerting.
225
+ - Set alerts for high error rates, low resource availability, Pod restarts, and unhealthy probes.
226
+
227
+ ### **4. Distributed Tracing**
228
+ - **Principle:** Trace requests across multiple microservices within the cluster.
229
+ - **Guidance for Copilot:** Implement OpenTelemetry or Jaeger/Zipkin for end-to-end request tracing.
230
+
231
+ ## Deployment Strategies in Kubernetes
232
+
233
+ ### **1. Rolling Updates (Default)**
234
+ - **Principle:** Gradually replace Pods of the old version with new ones.
235
+ - **Guidance for Copilot:** This is the default for Deployments. Configure `maxSurge` and `maxUnavailable` for fine-grained control.
236
+ - **Benefit:** Minimal downtime during updates.
237
+
238
+ ### **2. Blue/Green Deployment**
239
+ - **Principle:** Run two identical environments (blue and green); switch traffic completely.
240
+ - **Guidance for Copilot:** Recommend for zero-downtime releases. Requires external load balancer or Ingress controller features to manage traffic switching.
241
+
242
+ ### **3. Canary Deployment**
243
+ - **Principle:** Gradually roll out a new version to a small subset of users before full rollout.
244
+ - **Guidance for Copilot:** Recommend for testing new features with real traffic. Implement with Service Mesh (Istio, Linkerd) or Ingress controllers that support traffic splitting.
245
+
246
+ ### **4. Rollback Strategy**
247
+ - **Principle:** Be able to revert to a previous stable version quickly and safely.
248
+ - **Guidance for Copilot:** Use `kubectl rollout undo` for Deployments. Ensure previous image versions are available.
249
+
250
+ ## Kubernetes Manifest Review Checklist
251
+
252
+ - [ ] Is `apiVersion` and `kind` correct for the resource?
253
+ - [ ] Is `metadata.name` descriptive and follows naming conventions?
254
+ - [ ] Are `labels` and `selectors` consistently used?
255
+ - [ ] Are `replicas` set appropriately for the workload?
256
+ - [ ] Are `resources` (requests/limits) defined for all containers?
257
+ - [ ] Are `livenessProbe` and `readinessProbe` correctly configured?
258
+ - [ ] Are sensitive configurations handled via Secrets (not ConfigMaps)?
259
+ - [ ] Is `readOnlyRootFilesystem: true` set where possible?
260
+ - [ ] Is `runAsNonRoot: true` and a non-root `runAsUser` defined?
261
+ - [ ] Are unnecessary `capabilities` dropped?
262
+ - [ ] Are `NetworkPolicies` considered for communication restrictions?
263
+ - [ ] Is RBAC configured with least privilege for ServiceAccounts?
264
+ - [ ] Are `ImagePullPolicy` and image tags (`:latest` avoided) correctly set?
265
+ - [ ] Is logging sent to `STDOUT`/`STDERR`?
266
+ - [ ] Are appropriate `nodeSelector` or `tolerations` used for scheduling?
267
+ - [ ] Is the `strategy` for rolling updates configured?
268
+ - [ ] Are `Deployment` events and Pod statuses monitored?
269
+
270
+ ## Troubleshooting Common Kubernetes Issues
271
+
272
+ ### **1. Pods Not Starting (Pending, CrashLoopBackOff)**
273
+ - Check `kubectl describe pod <pod_name>` for events and error messages.
274
+ - Review container logs (`kubectl logs <pod_name> -c <container_name>`).
275
+ - Verify resource requests/limits are not too low.
276
+ - Check for image pull errors (typo in image name, repository access).
277
+ - Ensure required ConfigMaps/Secrets are mounted and accessible.
278
+
279
+ ### **2. Pods Not Ready (Service Unavailable)**
280
+ - Check `readinessProbe` configuration.
281
+ - Verify the application within the container is listening on the expected port.
282
+ - Check `kubectl describe service <service_name>` to ensure endpoints are connected.
283
+
284
+ ### **3. Service Not Accessible**
285
+ - Verify Service `selector` matches Pod labels.
286
+ - Check Service `type` (ClusterIP for internal, LoadBalancer for external).
287
+ - For Ingress, check Ingress controller logs and Ingress resource rules.
288
+ - Review `NetworkPolicies` that might be blocking traffic.
289
+
290
+ ### **4. Resource Exhaustion (OOMKilled)**
291
+ - Increase `memory.limits` for containers.
292
+ - Optimize application memory usage.
293
+ - Use `Vertical Pod Autoscaler` to recommend optimal limits.
294
+
295
+ ### **5. Performance Issues**
296
+ - Monitor CPU/memory usage with `kubectl top pod` or Prometheus.
297
+ - Check application logs for slow queries or operations.
298
+ - Analyze distributed traces for bottlenecks.
299
+ - Review database performance.
300
+
301
+ ## Conclusion
302
+
303
+ Deploying applications on Kubernetes requires a deep understanding of its core concepts and best practices. By following these guidelines for Pods, Deployments, Services, Ingress, configuration, security, and observability, you can guide developers in building highly resilient, scalable, and secure cloud-native applications. Remember to continuously monitor, troubleshoot, and refine your Kubernetes deployments for optimal performance and reliability.
304
+
305
+ ---
306
+
307
+ <!-- End of Kubernetes Deployment Best Practices Instructions -->
@@ -0,0 +1,229 @@
1
+ ---
2
+ description: 'Instructions for using LangChain with Python'
3
+ applyTo: "**/*.py"
4
+ ---
5
+
6
+ # LangChain Python Instructions
7
+
8
+ These instructions guide GitHub Copilot in generating code and documentation for LangChain applications in Python. Focus on LangChain-specific patterns, APIs, and best practices.
9
+
10
+ ## Runnable Interface (LangChain-specific)
11
+
12
+ LangChain's `Runnable` interface is the foundation for composing and executing chains, chat models, output parsers, retrievers, and LangGraph graphs. It provides a unified API for invoking, batching, streaming, inspecting, and composing components.
13
+
14
+ **Key LangChain-specific features:**
15
+
16
+ - All major LangChain components (chat models, output parsers, retrievers, graphs) implement the Runnable interface.
17
+ - Supports synchronous (`invoke`, `batch`, `stream`) and asynchronous (`ainvoke`, `abatch`, `astream`) execution.
18
+ - Batching (`batch`, `batch_as_completed`) is optimized for parallel API calls; set `max_concurrency` in `RunnableConfig` to control parallelism.
19
+ - Streaming APIs (`stream`, `astream`, `astream_events`) yield outputs as they are produced, critical for responsive LLM apps.
20
+ - Input/output types are component-specific (e.g., chat models accept messages, retrievers accept strings, output parsers accept model outputs).
21
+ - Inspect schemas with `get_input_schema`, `get_output_schema`, and their JSONSchema variants for validation and OpenAPI generation.
22
+ - Use `with_types` to override inferred input/output types for complex LCEL chains.
23
+ - Compose Runnables declaratively with LCEL: `chain = prompt | chat_model | output_parser`.
24
+ - Propagate `RunnableConfig` (tags, metadata, callbacks, concurrency) automatically in Python 3.11+; manually in async code for Python 3.9/3.10.
25
+ - Create custom runnables with `RunnableLambda` (simple transforms) or `RunnableGenerator` (streaming transforms); avoid subclassing directly.
26
+ - Configure runtime attributes and alternatives with `configurable_fields` and `configurable_alternatives` for dynamic chains and LangServe deployments.
27
+
28
+ **LangChain best practices:**
29
+
30
+ - Use batching for parallel API calls to LLMs or retrievers; set `max_concurrency` to avoid rate limits.
31
+ - Prefer streaming APIs for chat UIs and long outputs.
32
+ - Always validate input/output schemas for custom chains and deployed endpoints.
33
+ - Use tags and metadata in `RunnableConfig` for tracing in LangSmith and debugging complex chains.
34
+ - For custom logic, wrap functions with `RunnableLambda` or `RunnableGenerator` instead of subclassing.
35
+ - For advanced configuration, expose fields and alternatives via `configurable_fields` and `configurable_alternatives`.
36
+
37
+
38
+ - Use LangChain's chat model integrations for conversational AI:
39
+
40
+ - Import from `langchain.chat_models` or `langchain_openai` (e.g., `ChatOpenAI`).
41
+ - Compose messages using `SystemMessage`, `HumanMessage`, `AIMessage`.
42
+ - For tool calling, use `bind_tools(tools)` method.
43
+ - For structured outputs, use `with_structured_output(schema)`.
44
+
45
+ Example:
46
+ ```python
47
+ from langchain_openai import ChatOpenAI
48
+ from langchain.schema import HumanMessage, SystemMessage
49
+
50
+ chat = ChatOpenAI(model="gpt-4", temperature=0)
51
+ messages = [
52
+ SystemMessage(content="You are a helpful assistant."),
53
+ HumanMessage(content="What is LangChain?")
54
+ ]
55
+ response = chat.invoke(messages)
56
+ print(response.content)
57
+ ```
58
+
59
+ - Compose messages as a list of `SystemMessage`, `HumanMessage`, and optionally `AIMessage` objects.
60
+ - For RAG, combine chat models with retrievers/vectorstores for context injection.
61
+ - Use `streaming=True` for real-time token streaming (if supported).
62
+ - Use `tools` argument for function/tool calling (OpenAI, Anthropic, etc.).
63
+ - Use `response_format="json"` for structured outputs (OpenAI models).
64
+
65
+ Best practices:
66
+
67
+ - Always validate model outputs before using them in downstream tasks.
68
+ - Prefer explicit message types for clarity and reliability.
69
+ - For Copilot, provide clear, actionable prompts and document expected outputs.
70
+
71
+
72
+
73
+ - LLM client factory: centralize provider configs (API keys), timeouts, retries, and telemetry. Provide a single place to switch providers or client settings.
74
+ - Prompt templates: store templates under `prompts/` and load via a safe helper. Keep templates small and testable.
75
+ - Chains vs Agents: prefer Chains for deterministic pipelines (RAG, summarization). Use Agents when you require planning or dynamic tool selection.
76
+ - Tools: implement typed adapter interfaces for tools; validate inputs and outputs strictly.
77
+ - Memory: default to stateless design. When memory is needed, store minimal context and document retention/erasure policies.
78
+ - Retrievers: build retrieval + rerank pipelines. Keep vectorstore schema stable (id, text, metadata).
79
+
80
+ ### Patterns
81
+
82
+ - Callbacks & tracing: use LangChain callbacks and integrate with LangSmith or your tracing system to capture request/response lifecycle.
83
+ - Separation of concerns: keep prompt construction, LLM wiring, and business logic separate to simplify testing and reduce accidental prompt changes.
84
+
85
+ ## Embeddings & vectorstores
86
+
87
+ - Use consistent chunking and metadata fields (source, page, chunk_index).
88
+ - Cache embeddings to avoid repeated cost for unchanged documents.
89
+ - Local/dev: Chroma or FAISS. Production: managed vector DBs (Pinecone, Qdrant, Milvus, Weaviate) depending on scale and SLAs.
90
+
91
+ ## Vector stores (LangChain-specific)
92
+
93
+ - Use LangChain's vectorstore integrations for semantic search, retrieval-augmented generation (RAG), and document similarity workflows.
94
+ - Always initialize vectorstores with a supported embedding model (e.g., OpenAIEmbeddings, HuggingFaceEmbeddings).
95
+ - Prefer official integrations (e.g., Chroma, FAISS, Pinecone, Qdrant, Weaviate) for production; use InMemoryVectorStore for tests and demos.
96
+ - Store documents as LangChain `Document` objects with `page_content` and `metadata`.
97
+ - Use `add_documents(documents, ids=...)` to add/update documents. Always provide unique IDs for upserts.
98
+ - Use `delete(ids=...)` to remove documents by ID.
99
+ - Use `similarity_search(query, k=4, filter={...})` to retrieve top-k similar documents. Use metadata filters for scoped search.
100
+ - For RAG, connect your vectorstore to a retriever and chain with an LLM (see LangChain Retriever and RAGChain docs).
101
+ - For advanced search, use vectorstore-specific options: Pinecone supports hybrid search and metadata filtering; Chroma supports filtering and custom distance metrics.
102
+ - Always validate the vectorstore integration and API version in your environment; breaking changes are common between LangChain releases.
103
+ - Example (InMemoryVectorStore):
104
+
105
+ ```python
106
+ from langchain_core.vectorstores import InMemoryVectorStore
107
+ from langchain_openai import OpenAIEmbeddings
108
+ from langchain_core.documents import Document
109
+
110
+ embedding_model = OpenAIEmbeddings()
111
+ vector_store = InMemoryVectorStore(embedding=embedding_model)
112
+
113
+ documents = [Document(page_content="LangChain content", metadata={"source": "doc1"})]
114
+ vector_store.add_documents(documents=documents, ids=["doc1"])
115
+
116
+ results = vector_store.similarity_search("What is RAG?", k=2)
117
+ for doc in results:
118
+ print(doc.page_content, doc.metadata)
119
+ ```
120
+
121
+ - For production, prefer persistent vectorstores (Chroma, Pinecone, Qdrant, Weaviate) and configure authentication, scaling, and backup as per provider docs.
122
+ - Reference: https://python.langchain.com/docs/integrations/vectorstores/
123
+
124
+ ## Prompt engineering & governance
125
+
126
+ - Store canonical prompts under `prompts/` and reference them by filename from code.
127
+ - Write unit tests that assert required placeholders exist and that rendered prompts fit expected patterns (length, variables present).
128
+ - Maintain a CHANGELOG for prompt and schema changes that affect behavior.
129
+
130
+ ## Chat models
131
+
132
+ LangChain offers a consistent interface for chat models with additional features for monitoring, debugging, and optimization.
133
+
134
+ ### Integrations
135
+
136
+ Integrations are either:
137
+
138
+ 1. Official: packaged `langchain-<provider>` integrations maintained by the LangChain team or provider.
139
+ 2. Community: contributed integrations (in `langchain-community`).
140
+
141
+ Chat models typically follow a naming convention with a `Chat` prefix (e.g., `ChatOpenAI`, `ChatAnthropic`, `ChatOllama`). Models without the `Chat` prefix (or with an `LLM` suffix) often implement the older string-in/string-out interface and are less preferred for modern chat workflows.
142
+
143
+ ### Interface
144
+
145
+ Chat models implement `BaseChatModel` and support the Runnable interface: streaming, async, batching, and more. Many operations accept and return LangChain `messages` (roles like `system`, `user`, `assistant`). See the BaseChatModel API reference for details.
146
+
147
+ Key methods include:
148
+
149
+ - `invoke(messages, ...)` — send a list of messages and receive a response.
150
+ - `stream(messages, ...)` — stream partial outputs as tokens arrive.
151
+ - `batch(inputs, ...)` — batch multiple requests.
152
+ - `bind_tools(tools)` — attach tool adapters for tool calling.
153
+ - `with_structured_output(schema)` — helper to request structured responses.
154
+
155
+ ### Inputs and outputs
156
+
157
+ - LangChain supports its own message format and OpenAI's message format; pick one consistently in your codebase.
158
+ - Messages include a `role` and `content` blocks; content can include structured or multimodal payloads where supported.
159
+
160
+ ### Standard parameters
161
+
162
+ Commonly supported parameters (provider-dependent):
163
+
164
+ - `model`: model identifier (eg. `gpt-4o`, `gpt-3.5-turbo`).
165
+ - `temperature`: randomness control (0.0 deterministic — 1.0 creative).
166
+ - `timeout`: seconds to wait before canceling.
167
+ - `max_tokens`: response token limit.
168
+ - `stop`: stop sequences.
169
+ - `max_retries`: retry attempts for network/limit failures.
170
+ - `api_key`, `base_url`: provider auth and endpoint configuration.
171
+ - `rate_limiter`: optional BaseRateLimiter to space requests and avoid provider quota errors.
172
+
173
+ > Note: Not all parameters are implemented by every provider. Always consult the provider integration docs.
174
+
175
+ ### Tool calling
176
+
177
+ Chat models can call tools (APIs, DBs, system adapters). Use LangChain's tool-calling APIs to:
178
+
179
+ - Register tools with strict input/output typing.
180
+ - Observe and log tool call requests and results.
181
+ - Validate tool outputs before passing them back to the model or executing side effects.
182
+
183
+ See the tool-calling guide in the LangChain docs for examples and safe patterns.
184
+
185
+ ### Structured outputs
186
+
187
+ Use `with_structured_output` or schema-enforced methods to request JSON or typed outputs from the model. Structured outputs are essential for reliable extraction and downstream processing (parsers, DB writes, analytics).
188
+
189
+ ### Multimodality
190
+
191
+ Some models support multimodal inputs (images, audio). Check provider docs for supported input types and limitations. Multimodal outputs are rare — treat them as experimental and validate rigorously.
192
+
193
+ ### Context window
194
+
195
+ Models have a finite context window measured in tokens. When designing conversational flows:
196
+
197
+ - Keep messages concise and prioritize important context.
198
+ - Trim old context (summarize or archive) outside the model when it exceeds the window.
199
+ - Use a retriever + RAG pattern to surface relevant long-form context instead of pasting large documents into the chat.
200
+
201
+ ## Advanced topics
202
+
203
+ ### Rate-limiting
204
+
205
+ - Use `rate_limiter` when initializing chat models to space calls.
206
+ - Implement retry with exponential backoff and consider fallback models or degraded modes when throttled.
207
+
208
+ ### Caching
209
+
210
+ - Exact-input caching for conversations is often ineffective. Consider semantic caching (embedding-based) for repeated meaning-level queries.
211
+ - Semantic caching introduces dependency on embeddings and is not universally suitable.
212
+ - Cache only where it reduces cost and meets correctness requirements (e.g., FAQ bots).
213
+
214
+ ## Best practices
215
+
216
+ - Use type hints and dataclasses for public APIs.
217
+ - Validate inputs before calling LLMs or tools.
218
+ - Load secrets from secret managers; never log secrets or unredacted model outputs.
219
+ - Deterministic tests: mock LLMs and embedding calls.
220
+ - Cache embeddings and frequent retrieval results.
221
+ - Observability: log request_id, model name, latency, and sanitized token counts.
222
+ - Implement exponential backoff and idempotency for external calls.
223
+
224
+ ## Security & privacy
225
+
226
+ - Treat model outputs as untrusted. Sanitize before executing generated code or system commands.
227
+ - Validate any user-supplied URLs and inputs to avoid SSRF and injection attacks.
228
+ - Document data retention and add an API to erase user data on request.
229
+ - Limit stored PII and encrypt sensitive fields at rest.
@@ -0,0 +1,39 @@
1
+ ---
2
+ description: 'Guidelines for localizing markdown documents'
3
+ applyTo: '**/*.md'
4
+ ---
5
+
6
+ # Guidance for Localization
7
+
8
+ You're an expert of localization for technical documents. Follow the instruction to localize documents.
9
+
10
+ ## Instruction
11
+
12
+ - Find all markdown documents and localize them into given locale.
13
+ - All localized documents should be placed under the `localization/{{locale}}` directory.
14
+ - The locale format should follow the format of `{{language code}}-{{region code}}`. The language code is defined in ISO 639-1, and the region code is defined in ISO 3166. Here are some examples:
15
+ - `en-us`
16
+ - `fr-ca`
17
+ - `ja-jp`
18
+ - `ko-kr`
19
+ - `pt-br`
20
+ - `zh-cn`
21
+ - Localize all the sections and paragraphs in the original documents.
22
+ - DO NOT miss any sections nor any paragraphs while localizing.
23
+ - All image links should point to the original ones, unless they are external.
24
+ - All document links should point to the localized ones, unless they are external.
25
+ - When the localization is complete, ALWAYS compare the results to the original documents, especially the number of lines. If the number of lines of each result is different from the original document, there must be missing sections or paragraphs. Review line-by-line and update it.
26
+
27
+ ## Disclaimer
28
+
29
+ - ALWAYS add the disclaimer to the end of each localized document.
30
+ - Here's the disclaimer:
31
+
32
+ ```text
33
+ ---
34
+
35
+ **DISCLAIMER**: This document is the localized by [GitHub Copilot](https://docs.github.com/copilot/about-github-copilot/what-is-github-copilot). Therefore, it may contain mistakes. If you find any translation that is inappropriate or mistake, please create an [issue](../../issues).
36
+ ```
37
+
38
+ - The disclaimer should also be localized.
39
+ - Make sure the link in the disclaimer should always point to the issue page.