live-voice-practice
Copilot instructions3 starsChanged 8 months agoMITView on GitHub
Repository coding conventions and contribution guidance for the voice practice app
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
43 rules. About 0 are common, 29 are distinctive, and 14 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈29
Distinctive · estimate
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
When generating or modifying code, keep changes focused, minimal, and aligned with existing patterns in the target folder.
- Distinctive: line 17
Prefer small, scoped changes over large refactors.
- Distinctive: line 18
Follow existing naming and module boundaries.
- Distinctive: line 19
Keep public behavior and API shapes stable unless explicitly asked to change them.
- Distinctive: line 20
Do not introduce new dependencies unless they are clearly required.
- Distinctive: line 25
All implementations in this repository should follow clean code best practices.
- Distinctive: line 28
Keep files focused on a single responsibility.
- Distinctive: line 30
Prefer small, cohesive functions and components over long procedures with many branches or mixed concerns.
- Distinctive: line 31
Use clear names for modules, functions, variables, props, and types so the intent is obvious without excessive comments.
- Distinctive: line 32
Avoid duplication. Search for existing services, hooks, helpers, constants, and types before adding new logic.
- Distinctive: line 40
Avoid speculative abstractions, but extract code when a file or function is growing because it is handling multiple responsibilities.
- Distinctive: line 42
Prefer typed, explicit data shapes over loosely structured dictionaries/objects where practical.
- Distinctive: line 44
When modifying a large file, consider whether the change should include a small extraction that improves cohesion while keeping the …
- Distinctive: line 46
Add or update tests for behavior changes and for extracted logic that becomes independently testable.
- Distinctive: line 58
When an agent is asked to update the solution and run tests in Azure, it should prefer this environment and avoid creating or switching to …
- Very specific: line 60
If using AZD, use/select the live-voice environment before provisioning/deploying/testing (for example: azd env select live-voice).
- Very specific: line 66
After changing backend, frontend, container configuration, deployment hooks, or app runtime settings that affect the deployed app, prefer …
- Very specific: line 67
Treat azd deploy as the expected happy path for incremental application delivery.
- Very specific: line 68
Before any AZD deploy/provision operation, select the live-voice environment and keep the deploy scoped to the default subscription and …
- Very specific: line 69
If azd deploy fails, treat that as a blocker to resolve rather than something to work around.
- Very specific: line 71
When making changes that are meant to be exercised in Azure, prefer validating them with azd deploy before finishing whenever credentials …
- Distinctive: line 77
Follow PEP 8 style with project-specific line length of 120.
- Distinctive: line 78
Use type hints on function signatures, especially for new or changed functions.
- Distinctive: line 79
Add clear docstrings for new public functions/classes and tests where useful.
- Very specific: line 80
Keep route handlers thin; move non-trivial logic into backend/src/services/.
- Very specific: line 82
Use structured logging via logging (avoid ad-hoc print).
- Distinctive: line 84
Prefer async-friendly patterns already used by services and handlers.
- Distinctive: line 93
Before finishing backend changes, run (from repository root when possible):
- Very specific: line 102
Keep TypeScript strict compatibility.
- Distinctive: line 103
Prefer functional React components and hooks.
- Very specific: line 104
Place reusable UI in frontend/src/components/ and shared behavior in frontend/src/hooks/.
- Very specific: line 105
Keep API/network logic in frontend/src/services/.
- Distinctive: line 106
Use Fluent UI tokens/components for styling consistency.
- Very specific: line 107
Avoid any; if unavoidable, isolate and narrow quickly.
- Very specific: line 108
Follow existing state patterns (useState, useCallback) and avoid unnecessary abstractions.
- Distinctive: line 116
Before finishing frontend changes:
- Very specific: line 123
Add or update tests for behavior changes, especially in backend/tests/unit/.
- Distinctive: line 125
Keep tests deterministic and mock external services/network calls.
- Distinctive: line 129
If changing request/response payloads, update both backend and frontend call sites.
- Distinctive: line 136
Avoid mixing infrastructure refactors with feature work unless required.
- Distinctive: line 140
Do not add unrelated refactors in the same change.
- Distinctive: line 141
Do not introduce new architecture patterns unless current ones are insufficient.
- Distinctive: line 142
Do not hardcode secrets, keys, or environment-specific values.
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Live Voice Practice - Copilot Instructions
This repository contains:
backend/: Python Flask API + WebSocket voice proxy + scenario/analysis servicesfrontend/: React + TypeScript + Fluent UI clientinfra/: Azure Bicep infrastructure
When generating or modifying code, keep changes focused, minimal, and aligned with existing patterns in the target folder.
General Guidelines
- Prefer small, scoped changes over large refactors.
- Follow existing naming and module boundaries.
- Keep public behavior and API shapes stable unless explicitly asked to change them.
- Do not introduce new dependencies unless they are clearly required.
- Reuse existing services/hooks/components before creating new ones.
Clean Code and Modularity Expectations
All implementations in this repository should follow clean code best practices. Optimize for code that is easy to read, easy to review, and safe to change later.
- Keep files focused on a single responsibility. Avoid adding more code to already-large files when the behavior can be extracted into a service, hook, component, helper, or module that matches the existing project structure.
- Prefer small, cohesive functions and components over long procedures with many branches or mixed concerns.
- Use clear names for modules, functions, variables, props, and types so the intent is obvious without excessive comments.
- Avoid duplication. Search for existing services, hooks, helpers, constants, and types before adding new logic.
- Separate orchestration from business logic: route handlers, React screen components, and deployment scripts should stay thin and delegate non-trivial work to focused modules.
- Keep boundaries explicit:
- backend API routes in
backend/src/app.pyshould delegate domain logic tobackend/src/services/. - frontend screens should delegate reusable UI to
frontend/src/components/, behavior tofrontend/src/hooks/, and network calls tofrontend/src/services/. - infrastructure changes should preserve the module/parameter pattern under
infra/.
- backend API routes in
- Avoid speculative abstractions, but extract code when a file or function is growing because it is handling multiple responsibilities.
- Prefer typed, explicit data shapes over loosely structured dictionaries/objects where practical.
- Surface errors clearly and consistently; do not hide failures with silent fallbacks or broad catch-all handling.
- When modifying a large file, consider whether the change should include a small extraction that improves cohesion while keeping the behavior stable.
- Add or update tests for behavior changes and for extracted logic that becomes independently testable.
Azure Dev Environment Targeting
For any Azure-related build, deploy, validation, or test operation in this repository, target this development environment by default:
- Subscription:
9788a92c-2f71-4629-8173-7ad449cb50e1 - Resource group:
rg-live-voice - Full scope:
/subscriptions/9788a92c-2f71-4629-8173-7ad449cb50e1/resourceGroups/rg-live-voice - AZD environment name:
live-voice - JSON setting:
"azd-env-name": "live-voice"
When an agent is asked to update the solution and run tests in Azure, it should prefer this environment and avoid creating or switching to a different subscription/resource group unless explicitly requested.
If using AZD, use/select the live-voice environment before provisioning/deploying/testing (for example: azd env select live-voice).
AZD Deployment Workflow
For Azure-related application changes in this repository, prefer azd deploy as the default deployment path.
- After changing backend, frontend, container configuration, deployment hooks, or app runtime settings that affect the deployed app, prefer running
azd deployfrom the repository root instead of ad-hoc Azure CLI, portal, or one-off container deployment commands. - Treat
azd deployas the expected happy path for incremental application delivery. Useazd provisiononly when infrastructure changes require it, then follow withazd deploy. Useazd uponly when the task explicitly needs the full provision-and-deploy flow. - Before any AZD deploy/provision operation, select the
live-voiceenvironment and keep the deploy scoped to the default subscription and resource group unless the user explicitly asks otherwise. - If
azd deployfails, treat that as a blocker to resolve rather than something to work around. Investigate the root cause, fix the relevant code, configuration, script, or environment issue, and rerunazd deploy. - Do not claim Azure work is complete if the intended deployment path is
azd deployand it is still broken, unless an external blocker remains that cannot be resolved from the repository or current environment. In that case, report the exact blocker and the next required action. - When making changes that are meant to be exercised in Azure, prefer validating them with
azd deploybefore finishing whenever credentials and environment access are available.
Backend (Python) Conventions
Applies to files under backend/**/*.py.
- Follow PEP 8 style with project-specific line length of 120.
- Use type hints on function signatures, especially for new or changed functions.
- Add clear docstrings for new public functions/classes and tests where useful.
- Keep route handlers thin; move non-trivial logic into
backend/src/services/. - Reuse constants for endpoint paths, status codes, and repeated messages (as in
backend/src/app.py). - Use structured logging via
logging(avoid ad-hocprint). - Handle exceptions explicitly and return meaningful API error payloads.
- Prefer async-friendly patterns already used by services and handlers.
Backend Tooling Expectations
- Formatting:
black(configured inbackend/pyproject.toml, line length 120) - Linting:
flake8,pylint,ruff - Type checking:
mypy(non-strict, use pragmatic typing) - Testing:
pytestwith tests underbackend/tests/
Before finishing backend changes, run (from repository root when possible):
./scripts/format.sh(orcd backend && black . --config pyproject.toml)./scripts/lint.sh(orcd backend && flake8 . --config=.flake8)cd backend && pytest
Frontend (TypeScript/React) Conventions
Applies to files under frontend/src/**/*.{ts,tsx}.
- Keep TypeScript
strictcompatibility; avoid weakening compiler settings. - Prefer functional React components and hooks.
- Place reusable UI in
frontend/src/components/and shared behavior infrontend/src/hooks/. - Keep API/network logic in
frontend/src/services/. - Use Fluent UI tokens/components for styling consistency.
- Avoid
any; if unavoidable, isolate and narrow quickly. - Follow existing state patterns (
useState,useCallback) and avoid unnecessary abstractions.
Frontend Tooling Expectations
- Linting: ESLint (
frontend/eslint.config.js) - Formatting: Prettier
- Build/type check:
npm run build
Before finishing frontend changes:
cd frontend && npm run formatcd frontend && npm run lintcd frontend && npm run build
Testing Guidance
- Add or update tests for behavior changes, especially in
backend/tests/unit/. - Cover critical paths and common edge cases (invalid payloads, missing fields, error flows).
- Keep tests deterministic and mock external services/network calls.
API and Contract Safety
- If changing request/response payloads, update both backend and frontend call sites.
- Preserve existing endpoint routes unless explicitly requested.
- Validate user input at API boundaries and return consistent JSON errors.
Infrastructure Notes
- Infra is Bicep-based under
infra/; keep infra changes separate from app logic when possible. - Avoid mixing infrastructure refactors with feature work unless required.
What to Avoid
- Do not add unrelated refactors in the same change.
- Do not introduce new architecture patterns unless current ones are insufficient.
- Do not hardcode secrets, keys, or environment-specific values.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

