Ctrl K
ComunidadGuías…

AI_POLICY.md

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
# AI-assisted contributions to Grafana

## Purpose

Grafana is grateful to everyone who contributes their time, knowledge, and experience to our open source projects. These contributions improve Grafana and help sustain the community around it.

AI tools can make contributing faster and more accessible. However, Grafana's maintainers depend on contributors using these tools responsibly and with consideration for the people who review and maintain their work.

This guidance explains how to use AI while maintaining contribution quality, keeping authors accountable, and ensuring a healthy level of collaboration with maintainers and other community members.

## When AI assistance is welcome

AI tools can support many parts of the contribution process. Common uses include:

- Writing or refactoring code
- Improving documentation
- Generating tests
- Explaining existing code
- Brainstorming solutions
- Writing commit messages
- Creating examples
- Handling repetitive maintenance work

AI should help contributors become more productive. It should not replace understanding.

## You own your contribution

Anything submitted through your account is your responsibility, whether or not AI helped create it.

Before submitting, you must:

- Review the complete contribution
- Test it where appropriate, preferably on a Grafana instance
- Understand how it works
- Verify that it is technically correct
- Check that it meets the repository's contribution requirements

You must be able to explain your changes during review.

Saying that content was generated by AI does not remove your responsibility for it. Your AI-assisted work can strengthen or damage your reputation in the same way as any other contribution.

## Respect maintainers and the community

AI can create code and content much faster than people can review it. Used without care, that speed can consume volunteer time at scale. Aim at having no more than 3 PRs open at any given time.

Before submitting, consider the effect of your contribution on the people who must review, discuss, test, and maintain it:

- Keep changes focused and of manageable size. (maximum 500 lines of code)
- Provide enough context while staying succinct.
- Respond thoughtfully to feedback.

Follow the spirit, not only the checklist: A contribution may still be inappropriate if it damages community relationships or misuses other people's time, even when it does not break a specific rule.

## Review standards do not change

AI-assisted contributions are reviewed using the same standards as any other contribution.

Maintainers may reject work that:

- Adds unnecessary complexity
- Introduces security or privacy risks
- Contains incorrect or fabricated information
- Copies code or content without compatible licensing
- Changes behaviour without adequate tests
- Cannot be adequately explained by the contributor
- Is too large or unfocused to review effectively

Maintainers may also ask for:

- Additional testing, replication steps or example dashboards
- Changes that improve readability or maintainability
- A large contribution to be split into smaller pull requests
- More explanation of the approach or implementation

Maintainers have the final say on whether a contribution is ready to merge.

## Examples

### Good uses of AI

- ✅ Ask AI to explain an unfamiliar part of the Grafana codebase before creating your own implementation.
- ✅ Draft documentation, then fact-check it against the product and official sources.
- ✅ Refactor repetitive code, review every change, and verify that behaviour is preserved.
- ✅ Generate tests, then confirm that the tests cover the intended behaviour and fail for the right reasons.
- ✅ Work with AI to plan and implement a new feature, then review, test, and adjust the proposed changes before submitting the pull request.

### Unacceptable uses of AI

- ❌ Submit code that you have not read, do not understand, or cannot explain.
- ❌ Open a 3,000-line AI-generated pull request that maintainers cannot review effectively.
- ❌ Accept suggestions that introduce security issues, regressions, or broken behaviour.
- ❌ Copy AI-generated code without considering its origin or licence compatibility.
- ❌ Use AI in a way that compromises community relationships or misuses volunteers' time.