feat: PMM-15088 ai guidelines#5409
Conversation
- Enhanced AGENTS.md with a new section detailing how AI tools interact with the document and emphasized the importance of reading it before making code changes. - Introduced CLAUDE.md as a guide for working with Claude Code, reinforcing the need to consult AGENTS.md. - Added pmm-agents-entrypoint.mdc to define the entry point for PMM agents, ensuring adherence to AGENTS.md. - Updated .gitignore to exclude local AI skills/settings while allowing access to team rules in .cursor/rules/. Signed-off-by: theTibi <tkorocz@gmail.com>
- Added a comprehensive section outlining the workflow and best practices for AI agents, emphasizing the importance of following the AGENTS.md hierarchy as the single source of truth. - Included specific dos and don'ts to guide contributors in maintaining consistency and quality in code changes. - Expanded on testing and linting procedures relevant to AI agents, ensuring clarity on the processes to follow before submitting changes. Signed-off-by: theTibi <tkorocz@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v3 #5409 +/- ##
==========================================
- Coverage 43.22% 43.20% -0.03%
==========================================
Files 413 413
Lines 42279 42279
==========================================
- Hits 18277 18265 -12
- Misses 22134 22146 +12
Partials 1868 1868
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| # Exclude local AI skills/settings; team rules live in .cursor/rules/ | ||
| .claude/ | ||
| .cursor/ | ||
| .cursor/* |
There was a problem hiding this comment.
We have settled on not committing anything other than AGENTS.md to this repo, because it's the only file that almost every AI tool knows about and reads. We can call it an (almost) universally accepted standard.
The reasons are:
- the AI landscape is evolving very rapidly
- the rules, approaches, tools, best practices and everything else changes every day
- given the above, we cannot afford adding custom rules for every possible tool - they will become outdated and abandoned very quickly; hence, we expect the AI tools to read and respect
AGENTS.md - neither Cursor, nor Claude, nor Copilot are used by every team member - we prefer giving the developers the freedom to choose the tools that makes them most productive.
Therefore, I suggest we only contribute and review our AGENTS.md, which should be good for every other AI tool.
There was a problem hiding this comment.
I think we need pointers for these tools to start using Agents.md , because example my cursor was not using it at all without that rule.
|
|
||
| | Area | Backend | UI | Notes | | ||
| |------|---------|-----|-------| | ||
| | **ADRE / AI Assistant** | `managed/services/adre/` | `ui/apps/pmm/src/pages/adre/`, `components/adre/` | HolmesGPT integration, chat, usage | |
There was a problem hiding this comment.
What is ADRE? Where does it come from?
There was a problem hiding this comment.
right I had it in my branch but not committed yet. will remove.
| |------|---------|-----|-------| | ||
| | **ADRE / AI Assistant** | `managed/services/adre/` | `ui/apps/pmm/src/pages/adre/`, `components/adre/` | HolmesGPT integration, chat, usage | | ||
| | **Investigations** | `managed/services/investigations/` | `ui/apps/pmm/src/pages/investigations/` | AI investigation workflows | | ||
| | **OTEL** | `managed/otel/`, `dev/otel/` | Settings → OTEL tab | Log collectors, parser presets | |
There was a problem hiding this comment.
We don't have anything called OTEL in our repo yet.
There was a problem hiding this comment.
right I had it in my branch but not committed yet. will remove.
| | **ADRE / AI Assistant** | `managed/services/adre/` | `ui/apps/pmm/src/pages/adre/`, `components/adre/` | HolmesGPT integration, chat, usage | | ||
| | **Investigations** | `managed/services/investigations/` | `ui/apps/pmm/src/pages/investigations/` | AI investigation workflows | | ||
| | **OTEL** | `managed/otel/`, `dev/otel/` | Settings → OTEL tab | Log collectors, parser presets | | ||
| | **User docs** | — | — | [`documentation/`](documentation/) (MkDocs), not [`docs/process/`](docs/process/) | |
There was a problem hiding this comment.
No, the user-facing documentation is located in "documentation/docs".
|
|
||
| ## Git and pull request checklist | ||
|
|
||
| Full rules: [`docs/process/GIT_AND_GITHUB.md`](docs/process/GIT_AND_GITHUB.md). For commits and PR titles, use **[Conventional Commits](https://www.conventionalcommits.org/)** (`type(scope): summary`) — not the `PMM-XXXX` title style from the process doc. When opening PRs to the upstream Percona repo, confirm with reviewers if they expect conventional titles or `PMM-XXXX` titles from the process doc. |
There was a problem hiding this comment.
We don't follow https://www.conventionalcommits.org, we follow a PMM-specific convention.
| | PR title | Same format as commit title (squash merge uses the PR title) | | ||
| | Types | `feat` (feature), `fix` (bug), `chore` (deps, lint, tooling), `refactor`, `test`, `docs` | | ||
| | Scope | Optional but preferred: `ui`, `managed`, `api`, `agent`, `adre`, `investigations`, `dashboards`, … | | ||
| | Ticket | Put `PMM-XXXX` in the branch name and/or PR body — not required in the title | |
There was a problem hiding this comment.
| | Ticket | Put `PMM-XXXX` in the branch name and/or PR body — not required in the title | | |
| | Ticket | Put `PMM-XXXX` in the branch name and/or PR body, required in the title as well | |
PMM-15088
Link to the Feature Build: SUBMODULES-0
If this PR adds, removes or alters one or more API endpoints, please review and update the relevant API documentation as well:
If this PR is related to other PRs, contributions, or ongoing work in this or other repositories, please reference them here: