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.
- package/.env.example +1 -0
- package/.gitattributes +1 -0
- package/.github/workflows/manual-publish.yml +36 -0
- package/.github/workflows/sync-and-publish.yml +58 -0
- package/.release-it.json +20 -0
- package/CHANGELOG.md +43 -0
- package/README.md +62 -0
- package/assets/chatmodes/4.1-Beast.chatmode.md +152 -0
- package/assets/chatmodes/Thinking-Beast-Mode.chatmode.md +337 -0
- package/assets/chatmodes/Ultimate-Transparent-Thinking-Beast-Mode.chatmode.md +644 -0
- package/assets/chatmodes/accessibility.chatmode.md +298 -0
- package/assets/chatmodes/address-comments.chatmode.md +59 -0
- package/assets/chatmodes/aem-frontend-specialist.chatmode.md +385 -0
- package/assets/chatmodes/api-architect.chatmode.md +40 -0
- package/assets/chatmodes/atlassian-requirements-to-jira.chatmode.md +444 -0
- package/assets/chatmodes/azure-logic-apps-expert.chatmode.md +100 -0
- package/assets/chatmodes/azure-principal-architect.chatmode.md +58 -0
- package/assets/chatmodes/azure-saas-architect.chatmode.md +118 -0
- package/assets/chatmodes/azure-verified-modules-bicep.chatmode.md +44 -0
- package/assets/chatmodes/azure-verified-modules-terraform.chatmode.md +58 -0
- package/assets/chatmodes/bicep-implement.chatmode.md +40 -0
- package/assets/chatmodes/bicep-plan.chatmode.md +112 -0
- package/assets/chatmodes/blueprint-mode-codex.chatmode.md +110 -0
- package/assets/chatmodes/blueprint-mode.chatmode.md +171 -0
- package/assets/chatmodes/clojure-interactive-programming.chatmode.md +174 -0
- package/assets/chatmodes/code-tour.chatmode.md +205 -0
- package/assets/chatmodes/critical-thinking.chatmode.md +23 -0
- package/assets/chatmodes/csharp-dotnet-janitor.chatmode.md +83 -0
- package/assets/chatmodes/csharp-mcp-expert.chatmode.md +69 -0
- package/assets/chatmodes/debug.chatmode.md +79 -0
- package/assets/chatmodes/declarative-agents-architect.chatmode.md +76 -0
- package/assets/chatmodes/demonstrate-understanding.chatmode.md +60 -0
- package/assets/chatmodes/dotnet-upgrade.chatmode.md +222 -0
- package/assets/chatmodes/drupal-expert.chatmode.md +687 -0
- package/assets/chatmodes/electron-angular-native.chatmode.md +285 -0
- package/assets/chatmodes/expert-cpp-software-engineer.chatmode.md +27 -0
- package/assets/chatmodes/expert-dotnet-software-engineer.chatmode.md +22 -0
- package/assets/chatmodes/expert-nextjs-developer.chatmode.md +477 -0
- package/assets/chatmodes/expert-react-frontend-engineer.chatmode.md +738 -0
- package/assets/chatmodes/gilfoyle.chatmode.md +66 -0
- package/assets/chatmodes/go-mcp-expert.chatmode.md +122 -0
- package/assets/chatmodes/gpt-5-beast-mode.chatmode.md +109 -0
- package/assets/chatmodes/hlbpa.chatmode.md +232 -0
- package/assets/chatmodes/implementation-plan.chatmode.md +159 -0
- package/assets/chatmodes/janitor.chatmode.md +89 -0
- package/assets/chatmodes/java-mcp-expert.chatmode.md +325 -0
- package/assets/chatmodes/kotlin-mcp-expert.chatmode.md +181 -0
- package/assets/chatmodes/kusto-assistant.chatmode.md +143 -0
- package/assets/chatmodes/laravel-expert-agent.chatmode.md +628 -0
- package/assets/chatmodes/mentor.chatmode.md +32 -0
- package/assets/chatmodes/meta-agentic-project-scaffold.chatmode.md +15 -0
- package/assets/chatmodes/microsoft-agent-framework-dotnet.chatmode.md +62 -0
- package/assets/chatmodes/microsoft-agent-framework-python.chatmode.md +62 -0
- package/assets/chatmodes/microsoft-study-mode.chatmode.md +32 -0
- package/assets/chatmodes/microsoft_learn_contributor.chatmode.md +388 -0
- package/assets/chatmodes/ms-sql-dba.chatmode.md +25 -0
- package/assets/chatmodes/php-mcp-expert.chatmode.md +498 -0
- package/assets/chatmodes/pimcore-expert.chatmode.md +869 -0
- package/assets/chatmodes/plan.chatmode.md +114 -0
- package/assets/chatmodes/planner.chatmode.md +14 -0
- package/assets/chatmodes/playwright-tester.chatmode.md +13 -0
- package/assets/chatmodes/postgresql-dba.chatmode.md +17 -0
- package/assets/chatmodes/power-bi-data-modeling-expert.chatmode.md +319 -0
- package/assets/chatmodes/power-bi-dax-expert.chatmode.md +334 -0
- package/assets/chatmodes/power-bi-performance-expert.chatmode.md +533 -0
- package/assets/chatmodes/power-bi-visualization-expert.chatmode.md +549 -0
- package/assets/chatmodes/power-platform-expert.chatmode.md +116 -0
- package/assets/chatmodes/power-platform-mcp-integration-expert.chatmode.md +149 -0
- package/assets/chatmodes/prd.chatmode.md +201 -0
- package/assets/chatmodes/principal-software-engineer.chatmode.md +41 -0
- package/assets/chatmodes/prompt-builder.chatmode.md +352 -0
- package/assets/chatmodes/prompt-engineer.chatmode.md +72 -0
- package/assets/chatmodes/python-mcp-expert.chatmode.md +99 -0
- package/assets/chatmodes/refine-issue.chatmode.md +34 -0
- package/assets/chatmodes/research-technical-spike.chatmode.md +169 -0
- package/assets/chatmodes/ruby-mcp-expert.chatmode.md +346 -0
- package/assets/chatmodes/rust-gpt-4.1-beast-mode.chatmode.md +197 -0
- package/assets/chatmodes/rust-mcp-expert.chatmode.md +465 -0
- package/assets/chatmodes/search-ai-optimization-expert.chatmode.md +227 -0
- package/assets/chatmodes/semantic-kernel-dotnet.chatmode.md +31 -0
- package/assets/chatmodes/semantic-kernel-python.chatmode.md +28 -0
- package/assets/chatmodes/shopify-expert.chatmode.md +681 -0
- package/assets/chatmodes/simple-app-idea-generator.chatmode.md +134 -0
- package/assets/chatmodes/software-engineer-agent-v1.chatmode.md +164 -0
- package/assets/chatmodes/specification.chatmode.md +127 -0
- package/assets/chatmodes/swift-mcp-expert.chatmode.md +240 -0
- package/assets/chatmodes/task-planner.chatmode.md +374 -0
- package/assets/chatmodes/task-researcher.chatmode.md +254 -0
- package/assets/chatmodes/tdd-green.chatmode.md +59 -0
- package/assets/chatmodes/tdd-red.chatmode.md +59 -0
- package/assets/chatmodes/tdd-refactor.chatmode.md +84 -0
- package/assets/chatmodes/tech-debt-remediation-plan.chatmode.md +49 -0
- package/assets/chatmodes/terraform-azure-implement.chatmode.md +104 -0
- package/assets/chatmodes/terraform-azure-planning.chatmode.md +157 -0
- package/assets/chatmodes/typescript-mcp-expert.chatmode.md +91 -0
- package/assets/chatmodes/voidbeast-gpt41enhanced.chatmode.md +230 -0
- package/assets/chatmodes/wg-code-alchemist.chatmode.md +61 -0
- package/assets/chatmodes/wg-code-sentinel.chatmode.md +55 -0
- package/assets/collections/ai-prompt-engineering.json +18 -0
- package/assets/collections/angular-development.json +7 -0
- package/assets/collections/azure-cloud-architect.json +29 -0
- package/assets/collections/cpp-development.json +6 -0
- package/assets/collections/database-administration.json +8 -0
- package/assets/collections/devops-sre.json +11 -0
- package/assets/collections/dotnet-development.json +22 -0
- package/assets/collections/general-productivity.json +9 -0
- package/assets/collections/go-development.json +7 -0
- package/assets/collections/java-spring-developer.json +26 -0
- package/assets/collections/learning-mentoring.json +10 -0
- package/assets/collections/legacy-migration.json +4 -0
- package/assets/collections/mcp-specialist.json +41 -0
- package/assets/collections/mobile-development.json +4 -0
- package/assets/collections/php-cms-development.json +11 -0
- package/assets/collections/power-platform-specialist.json +31 -0
- package/assets/collections/project-management.json +12 -0
- package/assets/collections/python-development.json +13 -0
- package/assets/collections/quality-assurance.json +13 -0
- package/assets/collections/ruby-development.json +9 -0
- package/assets/collections/rust-development.json +10 -0
- package/assets/collections/security-specialist.json +8 -0
- package/assets/collections/software-architect.json +25 -0
- package/assets/collections/technical-writing.json +9 -0
- package/assets/collections/web-frontend-development.json +14 -0
- package/assets/instructions/a11y.instructions.md +369 -0
- package/assets/instructions/ai-prompt-engineering-safety-best-practices.instructions.md +867 -0
- package/assets/instructions/angular.instructions.md +104 -0
- package/assets/instructions/ansible.instructions.md +88 -0
- package/assets/instructions/aspnet-rest-apis.instructions.md +110 -0
- package/assets/instructions/astro.instructions.md +182 -0
- package/assets/instructions/azure-devops-pipelines.instructions.md +185 -0
- package/assets/instructions/azure-functions-typescript.instructions.md +14 -0
- package/assets/instructions/azure-logic-apps-power-automate.instructions.md +1943 -0
- package/assets/instructions/azure-verified-modules-terraform.instructions.md +229 -0
- package/assets/instructions/bicep-code-best-practices.instructions.md +54 -0
- package/assets/instructions/blazor.instructions.md +77 -0
- package/assets/instructions/clojure.instructions.md +349 -0
- package/assets/instructions/cmake-vcpkg.instructions.md +10 -0
- package/assets/instructions/codexer.instructions.md +428 -0
- package/assets/instructions/coldfusion-cfc.instructions.md +30 -0
- package/assets/instructions/coldfusion-cfm.instructions.md +28 -0
- package/assets/instructions/collections.instructions.md +54 -0
- package/assets/instructions/containerization-docker-best-practices.instructions.md +681 -0
- package/assets/instructions/convert-jpa-to-spring-data-cosmos.instructions.md +949 -0
- package/assets/instructions/copilot-thought-logging.instructions.md +62 -0
- package/assets/instructions/csharp-ja.instructions.md +114 -0
- package/assets/instructions/csharp-ko.instructions.md +77 -0
- package/assets/instructions/csharp-mcp-server.instructions.md +95 -0
- package/assets/instructions/csharp.instructions.md +114 -0
- package/assets/instructions/dart-n-flutter.instructions.md +447 -0
- package/assets/instructions/declarative-agents-microsoft365.instructions.md +316 -0
- package/assets/instructions/devbox-image-definition.instructions.md +302 -0
- package/assets/instructions/devops-core-principles.instructions.md +167 -0
- package/assets/instructions/dotnet-architecture-good-practices.instructions.md +279 -0
- package/assets/instructions/dotnet-framework.instructions.md +113 -0
- package/assets/instructions/dotnet-maui-9-to-dotnet-maui-10-upgrade.instructions.md +1922 -0
- package/assets/instructions/dotnet-maui.instructions.md +69 -0
- package/assets/instructions/dotnet-upgrade.instructions.md +287 -0
- package/assets/instructions/dotnet-wpf.instructions.md +79 -0
- package/assets/instructions/genaiscript.instructions.md +21 -0
- package/assets/instructions/generate-modern-terraform-code-for-azure.instructions.md +82 -0
- package/assets/instructions/gilfoyle-code-review.instructions.md +114 -0
- package/assets/instructions/github-actions-ci-cd-best-practices.instructions.md +607 -0
- package/assets/instructions/go-mcp-server.instructions.md +346 -0
- package/assets/instructions/go.instructions.md +373 -0
- package/assets/instructions/instructions.instructions.md +256 -0
- package/assets/instructions/java-11-to-java-17-upgrade.instructions.md +793 -0
- package/assets/instructions/java-17-to-java-21-upgrade.instructions.md +464 -0
- package/assets/instructions/java-21-to-java-25-upgrade.instructions.md +311 -0
- package/assets/instructions/java-mcp-server.instructions.md +553 -0
- package/assets/instructions/java.instructions.md +81 -0
- package/assets/instructions/joyride-user-project.instructions.md +206 -0
- package/assets/instructions/joyride-workspace-automation.instructions.md +46 -0
- package/assets/instructions/kotlin-mcp-server.instructions.md +481 -0
- package/assets/instructions/kubernetes-deployment-best-practices.instructions.md +307 -0
- package/assets/instructions/langchain-python.instructions.md +229 -0
- package/assets/instructions/localization.instructions.md +39 -0
- package/assets/instructions/makefile.instructions.md +410 -0
- package/assets/instructions/markdown.instructions.md +52 -0
- package/assets/instructions/memory-bank.instructions.md +299 -0
- package/assets/instructions/mongo-dba.instructions.md +25 -0
- package/assets/instructions/ms-sql-dba.instructions.md +25 -0
- package/assets/instructions/nestjs.instructions.md +406 -0
- package/assets/instructions/nextjs-tailwind.instructions.md +72 -0
- package/assets/instructions/nextjs.instructions.md +143 -0
- package/assets/instructions/nodejs-javascript-vitest.instructions.md +30 -0
- package/assets/instructions/object-calisthenics.instructions.md +302 -0
- package/assets/instructions/oqtane.instructions.md +86 -0
- package/assets/instructions/performance-optimization.instructions.md +420 -0
- package/assets/instructions/php-mcp-server.instructions.md +809 -0
- package/assets/instructions/playwright-dotnet.instructions.md +101 -0
- package/assets/instructions/playwright-python.instructions.md +62 -0
- package/assets/instructions/playwright-typescript.instructions.md +86 -0
- package/assets/instructions/power-apps-canvas-yaml.instructions.md +827 -0
- package/assets/instructions/power-apps-code-apps.instructions.md +601 -0
- package/assets/instructions/power-bi-custom-visuals-development.instructions.md +810 -0
- package/assets/instructions/power-bi-data-modeling-best-practices.instructions.md +639 -0
- package/assets/instructions/power-bi-dax-best-practices.instructions.md +795 -0
- package/assets/instructions/power-bi-devops-alm-best-practices.instructions.md +623 -0
- package/assets/instructions/power-bi-report-design-best-practices.instructions.md +752 -0
- package/assets/instructions/power-bi-security-rls-best-practices.instructions.md +504 -0
- package/assets/instructions/power-platform-connector.instructions.md +430 -0
- package/assets/instructions/power-platform-mcp-development.instructions.md +88 -0
- package/assets/instructions/powershell-pester-5.instructions.md +197 -0
- package/assets/instructions/powershell.instructions.md +356 -0
- package/assets/instructions/prompt.instructions.md +73 -0
- package/assets/instructions/python-mcp-server.instructions.md +204 -0
- package/assets/instructions/python.instructions.md +56 -0
- package/assets/instructions/quarkus-mcp-server-sse.instructions.md +49 -0
- package/assets/instructions/quarkus.instructions.md +98 -0
- package/assets/instructions/r.instructions.md +116 -0
- package/assets/instructions/reactjs.instructions.md +162 -0
- package/assets/instructions/ruby-mcp-server.instructions.md +629 -0
- package/assets/instructions/ruby-on-rails.instructions.md +124 -0
- package/assets/instructions/rust-mcp-server.instructions.md +715 -0
- package/assets/instructions/rust.instructions.md +135 -0
- package/assets/instructions/security-and-owasp.instructions.md +51 -0
- package/assets/instructions/self-explanatory-code-commenting.instructions.md +162 -0
- package/assets/instructions/shell.instructions.md +132 -0
- package/assets/instructions/spec-driven-workflow-v1.instructions.md +323 -0
- package/assets/instructions/springboot.instructions.md +68 -0
- package/assets/instructions/sql-sp-generation.instructions.md +74 -0
- package/assets/instructions/svelte.instructions.md +161 -0
- package/assets/instructions/swift-mcp-server.instructions.md +498 -0
- package/assets/instructions/taming-copilot.instructions.md +40 -0
- package/assets/instructions/tanstack-start-shadcn-tailwind.instructions.md +212 -0
- package/assets/instructions/task-implementation.instructions.md +190 -0
- package/assets/instructions/tasksync.instructions.md +352 -0
- package/assets/instructions/terraform-azure.instructions.md +254 -0
- package/assets/instructions/terraform-sap-btp.instructions.md +195 -0
- package/assets/instructions/terraform.instructions.md +113 -0
- package/assets/instructions/typescript-5-es2022.instructions.md +114 -0
- package/assets/instructions/typescript-mcp-server.instructions.md +228 -0
- package/assets/instructions/update-code-from-shorthand.instructions.md +130 -0
- package/assets/instructions/vuejs3.instructions.md +153 -0
- package/assets/instructions/wordpress.instructions.md +186 -0
- package/assets/prompts/add-educational-comments.prompt.md +129 -0
- package/assets/prompts/ai-prompt-engineering-safety-review.prompt.md +230 -0
- package/assets/prompts/architecture-blueprint-generator.prompt.md +322 -0
- package/assets/prompts/aspnet-minimal-api-openapi.prompt.md +42 -0
- package/assets/prompts/az-cost-optimize.prompt.md +305 -0
- package/assets/prompts/azure-resource-health-diagnose.prompt.md +290 -0
- package/assets/prompts/boost-prompt.prompt.md +25 -0
- package/assets/prompts/breakdown-epic-arch.prompt.md +66 -0
- package/assets/prompts/breakdown-epic-pm.prompt.md +58 -0
- package/assets/prompts/breakdown-feature-implementation.prompt.md +128 -0
- package/assets/prompts/breakdown-feature-prd.prompt.md +61 -0
- package/assets/prompts/breakdown-plan.prompt.md +509 -0
- package/assets/prompts/breakdown-test.prompt.md +365 -0
- package/assets/prompts/code-exemplars-blueprint-generator.prompt.md +126 -0
- package/assets/prompts/comment-code-generate-a-tutorial.prompt.md +26 -0
- package/assets/prompts/containerize-aspnet-framework.prompt.md +455 -0
- package/assets/prompts/containerize-aspnetcore.prompt.md +393 -0
- package/assets/prompts/conventional-commit.prompt.md +73 -0
- package/assets/prompts/copilot-instructions-blueprint-generator.prompt.md +294 -0
- package/assets/prompts/cosmosdb-datamodeling.prompt.md +1045 -0
- package/assets/prompts/create-agentsmd.prompt.md +249 -0
- package/assets/prompts/create-architectural-decision-record.prompt.md +97 -0
- package/assets/prompts/create-github-action-workflow-specification.prompt.md +276 -0
- package/assets/prompts/create-github-issue-feature-from-specification.prompt.md +28 -0
- package/assets/prompts/create-github-issues-feature-from-implementation-plan.prompt.md +28 -0
- package/assets/prompts/create-github-issues-for-unmet-specification-requirements.prompt.md +35 -0
- package/assets/prompts/create-github-pull-request-from-specification.prompt.md +24 -0
- package/assets/prompts/create-implementation-plan.prompt.md +157 -0
- package/assets/prompts/create-llms.prompt.md +210 -0
- package/assets/prompts/create-oo-component-documentation.prompt.md +193 -0
- package/assets/prompts/create-readme.prompt.md +21 -0
- package/assets/prompts/create-specification.prompt.md +127 -0
- package/assets/prompts/create-spring-boot-java-project.prompt.md +163 -0
- package/assets/prompts/create-spring-boot-kotlin-project.prompt.md +147 -0
- package/assets/prompts/create-technical-spike.prompt.md +231 -0
- package/assets/prompts/csharp-async.prompt.md +50 -0
- package/assets/prompts/csharp-docs.prompt.md +63 -0
- package/assets/prompts/csharp-mcp-server-generator.prompt.md +59 -0
- package/assets/prompts/csharp-mstest.prompt.md +67 -0
- package/assets/prompts/csharp-nunit.prompt.md +72 -0
- package/assets/prompts/csharp-tunit.prompt.md +101 -0
- package/assets/prompts/csharp-xunit.prompt.md +69 -0
- package/assets/prompts/declarative-agents.prompt.md +93 -0
- package/assets/prompts/documentation-writer.prompt.md +46 -0
- package/assets/prompts/dotnet-best-practices.prompt.md +84 -0
- package/assets/prompts/dotnet-design-pattern-review.prompt.md +41 -0
- package/assets/prompts/dotnet-upgrade.prompt.md +116 -0
- package/assets/prompts/editorconfig.prompt.md +64 -0
- package/assets/prompts/ef-core.prompt.md +76 -0
- package/assets/prompts/finalize-agent-prompt.prompt.md +27 -0
- package/assets/prompts/first-ask.prompt.md +29 -0
- package/assets/prompts/folder-structure-blueprint-generator.prompt.md +405 -0
- package/assets/prompts/gen-specs-as-issues.prompt.md +165 -0
- package/assets/prompts/generate-custom-instructions-from-codebase.prompt.md +240 -0
- package/assets/prompts/git-flow-branch-creator.prompt.md +293 -0
- package/assets/prompts/github-copilot-starter.prompt.md +372 -0
- package/assets/prompts/go-mcp-server-generator.prompt.md +334 -0
- package/assets/prompts/java-docs.prompt.md +24 -0
- package/assets/prompts/java-junit.prompt.md +64 -0
- package/assets/prompts/java-mcp-server-generator.prompt.md +756 -0
- package/assets/prompts/java-refactoring-extract-method.prompt.md +105 -0
- package/assets/prompts/java-refactoring-remove-parameter.prompt.md +85 -0
- package/assets/prompts/java-springboot.prompt.md +66 -0
- package/assets/prompts/javascript-typescript-jest.prompt.md +44 -0
- package/assets/prompts/kotlin-mcp-server-generator.prompt.md +449 -0
- package/assets/prompts/kotlin-springboot.prompt.md +71 -0
- package/assets/prompts/mcp-copilot-studio-server-generator.prompt.md +118 -0
- package/assets/prompts/memory-merger.prompt.md +107 -0
- package/assets/prompts/mkdocs-translations.prompt.md +110 -0
- package/assets/prompts/model-recommendation.prompt.md +677 -0
- package/assets/prompts/multi-stage-dockerfile.prompt.md +47 -0
- package/assets/prompts/my-issues.prompt.md +9 -0
- package/assets/prompts/my-pull-requests.prompt.md +15 -0
- package/assets/prompts/next-intl-add-language.prompt.md +20 -0
- package/assets/prompts/php-mcp-server-generator.prompt.md +522 -0
- package/assets/prompts/playwright-automation-fill-in-form.prompt.md +30 -0
- package/assets/prompts/playwright-explore-website.prompt.md +19 -0
- package/assets/prompts/playwright-generate-test.prompt.md +19 -0
- package/assets/prompts/postgresql-code-review.prompt.md +214 -0
- package/assets/prompts/postgresql-optimization.prompt.md +406 -0
- package/assets/prompts/power-apps-code-app-scaffold.prompt.md +150 -0
- package/assets/prompts/power-bi-dax-optimization.prompt.md +175 -0
- package/assets/prompts/power-bi-model-design-review.prompt.md +405 -0
- package/assets/prompts/power-bi-performance-troubleshooting.prompt.md +384 -0
- package/assets/prompts/power-bi-report-design-consultation.prompt.md +353 -0
- package/assets/prompts/power-platform-mcp-connector-suite.prompt.md +156 -0
- package/assets/prompts/project-workflow-analysis-blueprint-generator.prompt.md +294 -0
- package/assets/prompts/prompt-builder.prompt.md +142 -0
- package/assets/prompts/pytest-coverage.prompt.md +28 -0
- package/assets/prompts/python-mcp-server-generator.prompt.md +105 -0
- package/assets/prompts/readme-blueprint-generator.prompt.md +79 -0
- package/assets/prompts/remember-interactive-programming.prompt.md +13 -0
- package/assets/prompts/remember.prompt.md +125 -0
- package/assets/prompts/repo-story-time.prompt.md +156 -0
- package/assets/prompts/review-and-refactor.prompt.md +15 -0
- package/assets/prompts/ruby-mcp-server-generator.prompt.md +660 -0
- package/assets/prompts/rust-mcp-server-generator.prompt.md +578 -0
- package/assets/prompts/shuffle-json-data.prompt.md +151 -0
- package/assets/prompts/sql-code-review.prompt.md +303 -0
- package/assets/prompts/sql-optimization.prompt.md +298 -0
- package/assets/prompts/suggest-awesome-github-copilot-agents.prompt.md +72 -0
- package/assets/prompts/suggest-awesome-github-copilot-chatmodes.prompt.md +71 -0
- package/assets/prompts/suggest-awesome-github-copilot-collections.prompt.md +149 -0
- package/assets/prompts/suggest-awesome-github-copilot-instructions.prompt.md +88 -0
- package/assets/prompts/suggest-awesome-github-copilot-prompts.prompt.md +71 -0
- package/assets/prompts/swift-mcp-server-generator.prompt.md +669 -0
- package/assets/prompts/technology-stack-blueprint-generator.prompt.md +242 -0
- package/assets/prompts/typescript-mcp-server-generator.prompt.md +90 -0
- package/assets/prompts/update-avm-modules-in-bicep.prompt.md +60 -0
- package/assets/prompts/update-implementation-plan.prompt.md +157 -0
- package/assets/prompts/update-llms.prompt.md +216 -0
- package/assets/prompts/update-markdown-file-index.prompt.md +76 -0
- package/assets/prompts/update-oo-component-documentation.prompt.md +162 -0
- package/assets/prompts/update-specification.prompt.md +127 -0
- package/assets/prompts/write-coding-standards-from-file.prompt.md +316 -0
- package/bin/cli.js +200 -0
- package/package.json +53 -0
- package/scripts/sync.js +99 -0
- package/verdaccio/config.yaml +202 -0
|
@@ -0,0 +1,498 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 'Best practices and patterns for building Model Context Protocol (MCP) servers in Swift using the official MCP Swift SDK package.'
|
|
3
|
+
applyTo: "**/*.swift, **/Package.swift, **/Package.resolved"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Swift MCP Server Development Guidelines
|
|
7
|
+
|
|
8
|
+
When building MCP servers in Swift, follow these best practices and patterns using the official Swift SDK.
|
|
9
|
+
|
|
10
|
+
## Server Setup
|
|
11
|
+
|
|
12
|
+
Create an MCP server using the `Server` class with capabilities:
|
|
13
|
+
|
|
14
|
+
```swift
|
|
15
|
+
import MCP
|
|
16
|
+
|
|
17
|
+
let server = Server(
|
|
18
|
+
name: "MyServer",
|
|
19
|
+
version: "1.0.0",
|
|
20
|
+
capabilities: .init(
|
|
21
|
+
prompts: .init(listChanged: true),
|
|
22
|
+
resources: .init(subscribe: true, listChanged: true),
|
|
23
|
+
tools: .init(listChanged: true)
|
|
24
|
+
)
|
|
25
|
+
)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Adding Tools
|
|
29
|
+
|
|
30
|
+
Use `withMethodHandler` to register tool handlers:
|
|
31
|
+
|
|
32
|
+
```swift
|
|
33
|
+
// Register tool list handler
|
|
34
|
+
await server.withMethodHandler(ListTools.self) { _ in
|
|
35
|
+
let tools = [
|
|
36
|
+
Tool(
|
|
37
|
+
name: "search",
|
|
38
|
+
description: "Search for information",
|
|
39
|
+
inputSchema: .object([
|
|
40
|
+
"properties": .object([
|
|
41
|
+
"query": .string("Search query"),
|
|
42
|
+
"limit": .number("Maximum results")
|
|
43
|
+
]),
|
|
44
|
+
"required": .array([.string("query")])
|
|
45
|
+
])
|
|
46
|
+
)
|
|
47
|
+
]
|
|
48
|
+
return .init(tools: tools)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Register tool call handler
|
|
52
|
+
await server.withMethodHandler(CallTool.self) { params in
|
|
53
|
+
switch params.name {
|
|
54
|
+
case "search":
|
|
55
|
+
let query = params.arguments?["query"]?.stringValue ?? ""
|
|
56
|
+
let limit = params.arguments?["limit"]?.intValue ?? 10
|
|
57
|
+
|
|
58
|
+
// Perform search
|
|
59
|
+
let results = performSearch(query: query, limit: limit)
|
|
60
|
+
|
|
61
|
+
return .init(
|
|
62
|
+
content: [.text("Found \(results.count) results")],
|
|
63
|
+
isError: false
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
default:
|
|
67
|
+
return .init(
|
|
68
|
+
content: [.text("Unknown tool")],
|
|
69
|
+
isError: true
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Adding Resources
|
|
76
|
+
|
|
77
|
+
Implement resource handlers for data access:
|
|
78
|
+
|
|
79
|
+
```swift
|
|
80
|
+
// Register resource list handler
|
|
81
|
+
await server.withMethodHandler(ListResources.self) { params in
|
|
82
|
+
let resources = [
|
|
83
|
+
Resource(
|
|
84
|
+
name: "Data File",
|
|
85
|
+
uri: "resource://data/example.txt",
|
|
86
|
+
description: "Example data file",
|
|
87
|
+
mimeType: "text/plain"
|
|
88
|
+
)
|
|
89
|
+
]
|
|
90
|
+
return .init(resources: resources, nextCursor: nil)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Register resource read handler
|
|
94
|
+
await server.withMethodHandler(ReadResource.self) { params in
|
|
95
|
+
switch params.uri {
|
|
96
|
+
case "resource://data/example.txt":
|
|
97
|
+
let content = loadResourceContent(uri: params.uri)
|
|
98
|
+
return .init(contents: [
|
|
99
|
+
Resource.Content.text(
|
|
100
|
+
content,
|
|
101
|
+
uri: params.uri,
|
|
102
|
+
mimeType: "text/plain"
|
|
103
|
+
)
|
|
104
|
+
])
|
|
105
|
+
|
|
106
|
+
default:
|
|
107
|
+
throw MCPError.invalidParams("Unknown resource URI: \(params.uri)")
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Register resource subscribe handler
|
|
112
|
+
await server.withMethodHandler(ResourceSubscribe.self) { params in
|
|
113
|
+
// Track subscription for notifications
|
|
114
|
+
subscriptions.insert(params.uri)
|
|
115
|
+
print("Client subscribed to \(params.uri)")
|
|
116
|
+
return .init()
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Adding Prompts
|
|
121
|
+
|
|
122
|
+
Implement prompt handlers for templated conversations:
|
|
123
|
+
|
|
124
|
+
```swift
|
|
125
|
+
// Register prompt list handler
|
|
126
|
+
await server.withMethodHandler(ListPrompts.self) { params in
|
|
127
|
+
let prompts = [
|
|
128
|
+
Prompt(
|
|
129
|
+
name: "analyze",
|
|
130
|
+
description: "Analyze a topic",
|
|
131
|
+
arguments: [
|
|
132
|
+
.init(name: "topic", description: "Topic to analyze", required: true),
|
|
133
|
+
.init(name: "depth", description: "Analysis depth", required: false)
|
|
134
|
+
]
|
|
135
|
+
)
|
|
136
|
+
]
|
|
137
|
+
return .init(prompts: prompts, nextCursor: nil)
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Register prompt get handler
|
|
141
|
+
await server.withMethodHandler(GetPrompt.self) { params in
|
|
142
|
+
switch params.name {
|
|
143
|
+
case "analyze":
|
|
144
|
+
let topic = params.arguments?["topic"]?.stringValue ?? "general"
|
|
145
|
+
let depth = params.arguments?["depth"]?.stringValue ?? "basic"
|
|
146
|
+
|
|
147
|
+
let description = "Analysis of \(topic) at \(depth) level"
|
|
148
|
+
let messages: [Prompt.Message] = [
|
|
149
|
+
.user("Please analyze this topic: \(topic)"),
|
|
150
|
+
.assistant("I'll provide a \(depth) analysis of \(topic)")
|
|
151
|
+
]
|
|
152
|
+
|
|
153
|
+
return .init(description: description, messages: messages)
|
|
154
|
+
|
|
155
|
+
default:
|
|
156
|
+
throw MCPError.invalidParams("Unknown prompt: \(params.name)")
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Transport Configuration
|
|
162
|
+
|
|
163
|
+
### Stdio Transport
|
|
164
|
+
|
|
165
|
+
For local subprocess communication:
|
|
166
|
+
|
|
167
|
+
```swift
|
|
168
|
+
import MCP
|
|
169
|
+
import Logging
|
|
170
|
+
|
|
171
|
+
let logger = Logger(label: "com.example.mcp-server")
|
|
172
|
+
let transport = StdioTransport(logger: logger)
|
|
173
|
+
|
|
174
|
+
try await server.start(transport: transport)
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### HTTP Transport (Client Side)
|
|
178
|
+
|
|
179
|
+
For remote server connections:
|
|
180
|
+
|
|
181
|
+
```swift
|
|
182
|
+
let transport = HTTPClientTransport(
|
|
183
|
+
endpoint: URL(string: "http://localhost:8080")!,
|
|
184
|
+
streaming: true // Enable Server-Sent Events
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
try await client.connect(transport: transport)
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Concurrency and Actors
|
|
191
|
+
|
|
192
|
+
The server is an actor, ensuring thread-safe access:
|
|
193
|
+
|
|
194
|
+
```swift
|
|
195
|
+
actor ServerState {
|
|
196
|
+
private var subscriptions: Set<String> = []
|
|
197
|
+
private var cache: [String: Any] = [:]
|
|
198
|
+
|
|
199
|
+
func addSubscription(_ uri: String) {
|
|
200
|
+
subscriptions.insert(uri)
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
func getSubscriptions() -> Set<String> {
|
|
204
|
+
return subscriptions
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
let state = ServerState()
|
|
209
|
+
|
|
210
|
+
await server.withMethodHandler(ResourceSubscribe.self) { params in
|
|
211
|
+
await state.addSubscription(params.uri)
|
|
212
|
+
return .init()
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## Error Handling
|
|
217
|
+
|
|
218
|
+
Use Swift's error handling with `MCPError`:
|
|
219
|
+
|
|
220
|
+
```swift
|
|
221
|
+
await server.withMethodHandler(CallTool.self) { params in
|
|
222
|
+
do {
|
|
223
|
+
guard let query = params.arguments?["query"]?.stringValue else {
|
|
224
|
+
throw MCPError.invalidParams("Missing query parameter")
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
let result = try performOperation(query: query)
|
|
228
|
+
|
|
229
|
+
return .init(
|
|
230
|
+
content: [.text(result)],
|
|
231
|
+
isError: false
|
|
232
|
+
)
|
|
233
|
+
} catch let error as MCPError {
|
|
234
|
+
return .init(
|
|
235
|
+
content: [.text(error.localizedDescription)],
|
|
236
|
+
isError: true
|
|
237
|
+
)
|
|
238
|
+
} catch {
|
|
239
|
+
return .init(
|
|
240
|
+
content: [.text("Unexpected error: \(error.localizedDescription)")],
|
|
241
|
+
isError: true
|
|
242
|
+
)
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
## JSON Schema with Value Type
|
|
248
|
+
|
|
249
|
+
Use the `Value` type for JSON schemas:
|
|
250
|
+
|
|
251
|
+
```swift
|
|
252
|
+
let schema = Value.object([
|
|
253
|
+
"type": .string("object"),
|
|
254
|
+
"properties": .object([
|
|
255
|
+
"name": .object([
|
|
256
|
+
"type": .string("string"),
|
|
257
|
+
"description": .string("User's name")
|
|
258
|
+
]),
|
|
259
|
+
"age": .object([
|
|
260
|
+
"type": .string("integer"),
|
|
261
|
+
"minimum": .number(0),
|
|
262
|
+
"maximum": .number(150)
|
|
263
|
+
]),
|
|
264
|
+
"email": .object([
|
|
265
|
+
"type": .string("string"),
|
|
266
|
+
"format": .string("email")
|
|
267
|
+
])
|
|
268
|
+
]),
|
|
269
|
+
"required": .array([.string("name")])
|
|
270
|
+
])
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
## Swift Package Manager Setup
|
|
274
|
+
|
|
275
|
+
Create your `Package.swift`:
|
|
276
|
+
|
|
277
|
+
```swift
|
|
278
|
+
// swift-tools-version: 6.0
|
|
279
|
+
import PackageDescription
|
|
280
|
+
|
|
281
|
+
let package = Package(
|
|
282
|
+
name: "MyMCPServer",
|
|
283
|
+
platforms: [
|
|
284
|
+
.macOS(.v13),
|
|
285
|
+
.iOS(.v16)
|
|
286
|
+
],
|
|
287
|
+
dependencies: [
|
|
288
|
+
.package(
|
|
289
|
+
url: "https://github.com/modelcontextprotocol/swift-sdk.git",
|
|
290
|
+
from: "0.10.0"
|
|
291
|
+
),
|
|
292
|
+
.package(
|
|
293
|
+
url: "https://github.com/apple/swift-log.git",
|
|
294
|
+
from: "1.5.0"
|
|
295
|
+
)
|
|
296
|
+
],
|
|
297
|
+
targets: [
|
|
298
|
+
.executableTarget(
|
|
299
|
+
name: "MyMCPServer",
|
|
300
|
+
dependencies: [
|
|
301
|
+
.product(name: "MCP", package: "swift-sdk"),
|
|
302
|
+
.product(name: "Logging", package: "swift-log")
|
|
303
|
+
]
|
|
304
|
+
)
|
|
305
|
+
]
|
|
306
|
+
)
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
## Graceful Shutdown with ServiceLifecycle
|
|
310
|
+
|
|
311
|
+
Use Swift Service Lifecycle for proper shutdown:
|
|
312
|
+
|
|
313
|
+
```swift
|
|
314
|
+
import MCP
|
|
315
|
+
import ServiceLifecycle
|
|
316
|
+
import Logging
|
|
317
|
+
|
|
318
|
+
struct MCPService: Service {
|
|
319
|
+
let server: Server
|
|
320
|
+
let transport: Transport
|
|
321
|
+
|
|
322
|
+
func run() async throws {
|
|
323
|
+
try await server.start(transport: transport)
|
|
324
|
+
try await Task.sleep(for: .days(365 * 100))
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
func shutdown() async throws {
|
|
328
|
+
await server.stop()
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
let logger = Logger(label: "com.example.mcp-server")
|
|
333
|
+
let transport = StdioTransport(logger: logger)
|
|
334
|
+
let mcpService = MCPService(server: server, transport: transport)
|
|
335
|
+
|
|
336
|
+
let serviceGroup = ServiceGroup(
|
|
337
|
+
services: [mcpService],
|
|
338
|
+
configuration: .init(
|
|
339
|
+
gracefulShutdownSignals: [.sigterm, .sigint]
|
|
340
|
+
),
|
|
341
|
+
logger: logger
|
|
342
|
+
)
|
|
343
|
+
|
|
344
|
+
try await serviceGroup.run()
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
## Async/Await Patterns
|
|
348
|
+
|
|
349
|
+
All server operations use Swift concurrency:
|
|
350
|
+
|
|
351
|
+
```swift
|
|
352
|
+
await server.withMethodHandler(CallTool.self) { params in
|
|
353
|
+
async let result1 = fetchData1()
|
|
354
|
+
async let result2 = fetchData2()
|
|
355
|
+
|
|
356
|
+
let combined = await "\(result1) and \(result2)"
|
|
357
|
+
|
|
358
|
+
return .init(
|
|
359
|
+
content: [.text(combined)],
|
|
360
|
+
isError: false
|
|
361
|
+
)
|
|
362
|
+
}
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
## Logging
|
|
366
|
+
|
|
367
|
+
Use swift-log for structured logging:
|
|
368
|
+
|
|
369
|
+
```swift
|
|
370
|
+
import Logging
|
|
371
|
+
|
|
372
|
+
let logger = Logger(label: "com.example.mcp-server")
|
|
373
|
+
|
|
374
|
+
await server.withMethodHandler(CallTool.self) { params in
|
|
375
|
+
logger.info("Tool called", metadata: [
|
|
376
|
+
"name": .string(params.name),
|
|
377
|
+
"args": .string("\(params.arguments ?? [:])")
|
|
378
|
+
])
|
|
379
|
+
|
|
380
|
+
// Process tool call
|
|
381
|
+
|
|
382
|
+
logger.debug("Tool completed successfully")
|
|
383
|
+
|
|
384
|
+
return .init(content: [.text("Result")], isError: false)
|
|
385
|
+
}
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
## Testing
|
|
389
|
+
|
|
390
|
+
Test your server with async/await:
|
|
391
|
+
|
|
392
|
+
```swift
|
|
393
|
+
import XCTest
|
|
394
|
+
@testable import MyMCPServer
|
|
395
|
+
|
|
396
|
+
final class ServerTests: XCTestCase {
|
|
397
|
+
func testToolCall() async throws {
|
|
398
|
+
let server = createTestServer()
|
|
399
|
+
|
|
400
|
+
// Test tool call logic
|
|
401
|
+
let params = CallTool.Params(
|
|
402
|
+
name: "search",
|
|
403
|
+
arguments: ["query": .string("test")]
|
|
404
|
+
)
|
|
405
|
+
|
|
406
|
+
// Verify behavior
|
|
407
|
+
XCTAssertNoThrow(try await processToolCall(params))
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
## Initialize Hook
|
|
413
|
+
|
|
414
|
+
Validate client connections with an initialize hook:
|
|
415
|
+
|
|
416
|
+
```swift
|
|
417
|
+
try await server.start(transport: transport) { clientInfo, clientCapabilities in
|
|
418
|
+
// Validate client
|
|
419
|
+
guard clientInfo.name != "BlockedClient" else {
|
|
420
|
+
throw MCPError.invalidRequest("Client not allowed")
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
// Check capabilities
|
|
424
|
+
if clientCapabilities.sampling == nil {
|
|
425
|
+
logger.warning("Client doesn't support sampling")
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
logger.info("Client connected", metadata: [
|
|
429
|
+
"name": .string(clientInfo.name),
|
|
430
|
+
"version": .string(clientInfo.version)
|
|
431
|
+
])
|
|
432
|
+
}
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
## Common Patterns
|
|
436
|
+
|
|
437
|
+
### Content Types
|
|
438
|
+
|
|
439
|
+
Handle different content types:
|
|
440
|
+
|
|
441
|
+
```swift
|
|
442
|
+
return .init(
|
|
443
|
+
content: [
|
|
444
|
+
.text("Plain text response"),
|
|
445
|
+
.image(imageData, mimeType: "image/png", metadata: [
|
|
446
|
+
"width": 1024,
|
|
447
|
+
"height": 768
|
|
448
|
+
]),
|
|
449
|
+
.resource(
|
|
450
|
+
uri: "resource://data",
|
|
451
|
+
mimeType: "application/json",
|
|
452
|
+
text: jsonString
|
|
453
|
+
)
|
|
454
|
+
],
|
|
455
|
+
isError: false
|
|
456
|
+
)
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
### Strict Configuration
|
|
460
|
+
|
|
461
|
+
Use strict mode to fail fast on missing capabilities:
|
|
462
|
+
|
|
463
|
+
```swift
|
|
464
|
+
let client = Client(
|
|
465
|
+
name: "StrictClient",
|
|
466
|
+
version: "1.0.0",
|
|
467
|
+
configuration: .strict
|
|
468
|
+
)
|
|
469
|
+
|
|
470
|
+
// Will throw immediately if capability not available
|
|
471
|
+
try await client.listTools()
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
### Request Batching
|
|
475
|
+
|
|
476
|
+
Send multiple requests efficiently:
|
|
477
|
+
|
|
478
|
+
```swift
|
|
479
|
+
var tasks: [Task<CallTool.Result, Error>] = []
|
|
480
|
+
|
|
481
|
+
try await client.withBatch { batch in
|
|
482
|
+
for i in 0..<10 {
|
|
483
|
+
tasks.append(
|
|
484
|
+
try await batch.addRequest(
|
|
485
|
+
CallTool.request(.init(
|
|
486
|
+
name: "process",
|
|
487
|
+
arguments: ["id": .number(Double(i))]
|
|
488
|
+
))
|
|
489
|
+
)
|
|
490
|
+
)
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
for (index, task) in tasks.enumerated() {
|
|
495
|
+
let result = try await task.value
|
|
496
|
+
print("\(index): \(result.content)")
|
|
497
|
+
}
|
|
498
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
applyTo: '**'
|
|
3
|
+
description: 'Prevent Copilot from wreaking havoc across your codebase, keeping it under control.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Core Directives & Hierarchy
|
|
7
|
+
|
|
8
|
+
This section outlines the absolute order of operations. These rules have the highest priority and must not be violated.
|
|
9
|
+
|
|
10
|
+
1. **Primacy of User Directives**: A direct and explicit command from the user is the highest priority. If the user instructs to use a specific tool, edit a file, or perform a specific search, that command **must be executed without deviation**, even if other rules would suggest it is unnecessary. All other instructions are subordinate to a direct user order.
|
|
11
|
+
2. **Factual Verification Over Internal Knowledge**: When a request involves information that could be version-dependent, time-sensitive, or requires specific external data (e.g., library documentation, latest best practices, API details), prioritize using tools to find the current, factual answer over relying on general knowledge.
|
|
12
|
+
3. **Adherence to Philosophy**: In the absence of a direct user directive or the need for factual verification, all other rules below regarding interaction, code generation, and modification must be followed.
|
|
13
|
+
|
|
14
|
+
## General Interaction & Philosophy
|
|
15
|
+
|
|
16
|
+
- **Code on Request Only**: Your default response should be a clear, natural language explanation. Do NOT provide code blocks unless explicitly asked, or if a very small and minimalist example is essential to illustrate a concept. Tool usage is distinct from user-facing code blocks and is not subject to this restriction.
|
|
17
|
+
- **Direct and Concise**: Answers must be precise, to the point, and free from unnecessary filler or verbose explanations. Get straight to the solution without "beating around the bush".
|
|
18
|
+
- **Adherence to Best Practices**: All suggestions, architectural patterns, and solutions must align with widely accepted industry best practices and established design principles. Avoid experimental, obscure, or overly "creative" approaches. Stick to what is proven and reliable.
|
|
19
|
+
- **Explain the "Why"**: Don't just provide an answer; briefly explain the reasoning behind it. Why is this the standard approach? What specific problem does this pattern solve? This context is more valuable than the solution itself.
|
|
20
|
+
|
|
21
|
+
## Minimalist & Standard Code Generation
|
|
22
|
+
|
|
23
|
+
- **Principle of Simplicity**: Always provide the most straightforward and minimalist solution possible. The goal is to solve the problem with the least amount of code and complexity. Avoid premature optimization or over-engineering.
|
|
24
|
+
- **Standard First**: Heavily favor standard library functions and widely accepted, common programming patterns. Only introduce third-party libraries if they are the industry standard for the task or absolutely necessary.
|
|
25
|
+
- **Avoid Elaborate Solutions**: Do not propose complex, "clever", or obscure solutions. Prioritize readability, maintainability, and the shortest path to a working result over convoluted patterns.
|
|
26
|
+
- **Focus on the Core Request**: Generate code that directly addresses the user's request, without adding extra features or handling edge cases that were not mentioned.
|
|
27
|
+
|
|
28
|
+
## Surgical Code Modification
|
|
29
|
+
|
|
30
|
+
- **Preserve Existing Code**: The current codebase is the source of truth and must be respected. Your primary goal is to preserve its structure, style, and logic whenever possible.
|
|
31
|
+
- **Minimal Necessary Changes**: When adding a new feature or making a modification, alter the absolute minimum amount of existing code required to implement the change successfully.
|
|
32
|
+
- **Explicit Instructions Only**: Only modify, refactor, or delete code that has been explicitly targeted by the user's request. Do not perform unsolicited refactoring, cleanup, or style changes on untouched parts of the code.
|
|
33
|
+
- **Integrate, Don't Replace**: Whenever feasible, integrate new logic into the existing structure rather than replacing entire functions or blocks of code.
|
|
34
|
+
|
|
35
|
+
## Intelligent Tool Usage
|
|
36
|
+
|
|
37
|
+
- **Use Tools When Necessary**: When a request requires external information or direct interaction with the environment, use the available tools to accomplish the task. Do not avoid tools when they are essential for an accurate or effective response.
|
|
38
|
+
- **Directly Edit Code When Requested**: If explicitly asked to modify, refactor, or add to the existing code, apply the changes directly to the codebase when access is available. Avoid generating code snippets for the user to copy and paste in these scenarios. The default should be direct, surgical modification as instructed.
|
|
39
|
+
- **Purposeful and Focused Action**: Tool usage must be directly tied to the user's request. Do not perform unrelated searches or modifications. Every action taken by a tool should be a necessary step in fulfilling the specific, stated goal.
|
|
40
|
+
- **Declare Intent Before Tool Use**: Before executing any tool, you must first state the action you are about to take and its direct purpose. This statement must be concise and immediately precede the tool call.
|