-
-
Notifications
You must be signed in to change notification settings - Fork 480
Description
I did not see the notes/copilot-instructions.md elsewhere
Is your feature request related to a problem?
Yes. As AI-assisted coding tools (GitHub Copilot, Cursor, Windsurf) become standard in development workflows, contributors are increasingly using "agentic" help to draft PRs and manage environments.
However, standard LLMs lack awareness of:
- Strict OCA Conventions: They frequently miss mandatory manifest keys, use correct but banned Odoo API methods, or violate strict linting rules (flake8, pylint, isort), causing immediate CI failures.
- Doodba Workflows: They often hallucinate standard
odoo-bincommands or incorrect paths instead of using theinv(invoke) command structure required by Doodba environments.
This results in contributors spending excessive time debugging AI-generated code to fit OCA standards, rather than the AI helping them adhere to those standards from the start.
Describe the solution you'd like
I propose adding a standardized copilot-instructions.md (or .github/copilot-instructions.md) file to the repository structure (potentially via OCA/maintainer-tools).
This file would serve as a system prompt/context anchor for AI agents, containing:
- OCA Coding Standards: Rules for imports, XML IDs, migration specificities, and license headers.
- Doodba Specifics: Instructions to prefer
invcommands (e.g.,inv odoo-test) and correct container path contexts. - Structure: Guidelines on the expected module directory tree.
Describe alternatives you've considered
- Manual Context: Developers manually pasting guidelines into their AI prompt window every session (inefficient and prone to error).
- Local Rules: Developers maintaining personal
.cursorrulesfiles, leading to inconsistent contributions across the community. - Reactive Fixes: Relying solely on pre-commit hooks and Runbot CI to catch errors after the fact, rather than preventing them during generation.
Additional context
GitHub Copilot and similar tools now explicitly look for files like copilot-instructions.md to ground their responses.
Standardizing this would:
- Lower the barrier to entry for new contributors using AI.
- Reduce "noise" in PR reviews regarding basic formatting/con