|
| 1 | +# GitHub Copilot Custom Instructions |
| 2 | + |
| 3 | +This repository is for the Multi-Agent Custom Automation Engine Solution Accelerator. Please follow these instructions to ensure Copilot suggestions align with our architecture, coding standards, and best practices. |
| 4 | + |
| 5 | +## General Guidelines |
| 6 | +- Use Python (3.10+) for backend code, and JavaScript (ES6+) for frontend code. |
| 7 | +- Backend: Prefer FastAPI for web APIs and asynchronous programming. |
| 8 | +- Frontend: Use vanilla JavaScript and Bulma CSS for UI. Avoid introducing new frameworks unless necessary. |
| 9 | +- Follow the existing folder structure: `src/backend` for backend, `src/frontend` for frontend, `infra/` for infrastructure-as-code (Bicep). |
| 10 | +- Use Azure services (Azure OpenAI, Azure Container Apps, Azure Cosmos DB, Azure Container Registry) for cloud components. |
| 11 | +- For infrastructure, prefer Bicep files in `infra/` over scripts. Use managed identity for authentication, never hardcode credentials. |
| 12 | +- Always include error handling, logging, and comments for key logic. |
| 13 | +- Use English for all code, comments, and documentation. |
| 14 | + |
| 15 | +## Security & Compliance |
| 16 | +- Store secrets in Azure Key Vault, not in code or config files. |
| 17 | +- Follow the Microsoft Open Source Code of Conduct and security guidelines. |
| 18 | +- Do not use or suggest deprecated Azure services or insecure patterns. |
| 19 | +- Reference [OpenAI Usage Policies](https://openai.com/policies/usage-policies/) and [Azure OpenAI Code of Conduct](https://learn.microsoft.com/en-us/legal/cognitive-services/openai/code-of-conduct) for responsible AI use. |
| 20 | + |
| 21 | +## Coding Style |
| 22 | +- Use clear, descriptive variable and function names. |
| 23 | +- Write modular, reusable code with separation of concerns. |
| 24 | +- Use async/await for asynchronous operations in both Python and JavaScript. |
| 25 | +- Prefer parameterized queries and proper indexing for database access. |
| 26 | +- Add docstrings (Python) and JSDoc (JavaScript) for public functions. |
| 27 | +- Use consistent indentation (4 spaces for Python, 2 spaces for JS/HTML/CSS). |
| 28 | + |
| 29 | +## Pull Requests & Contributions |
| 30 | +- Ensure all new code includes tests where applicable. |
| 31 | +- Follow the repository's contribution guidelines in `CONTRIBUTING.md`. |
| 32 | +- Reference the `README.md` and `docs/` for architecture and usage patterns. |
| 33 | + |
| 34 | +## Azure Best Practices |
| 35 | +- Use managed identity for Azure SDK authentication. |
| 36 | +- Never hardcode credentials; use Key Vault. |
| 37 | +- Validate deployments with `azd provision --preview` or `az deployment group what-if` before running them. |
| 38 | +- Prefer `azd` for deployments; use Bicep for IaC. |
| 39 | +- Enable logging, monitoring, and error handling for all Azure resources. |
| 40 | + |
| 41 | +## Responsible AI |
| 42 | +- Default to GPT-4o for LLM tasks unless otherwise specified. |
| 43 | +- Enable caching for reliability and cost control. |
| 44 | +- Do not use the system for medical or financial advice. |
| 45 | + |
| 46 | +--- |
| 47 | +For more details, see the `README.md`, `docs/`, and `documentation/` folders. |
0 commit comments