Skip to content

Generative AI Policy โ€‹

This page explains how Leaf uses generative AI (GenAI): large language models, code assistants and similar tools. It covers what we have done in the past, what we do now, and what we expect from contributors.

Our stance โ€‹

AI is a tool, and the people who use it stay responsible for the result. Anything that lands in a Leaf repository has to be understood, reviewed and owned by a human maintainer, however it was produced. If you cannot explain a change, it does not get merged.

How AI has been used in Leaf โ€‹

  • Leaf 5 development. Maintainers used AI assistants (mostly Claude) as a pair programmer while building Leaf 5. All of that work was directed by a maintainer, and every change was reviewed by a maintainer before it was merged.
  • Reviews and security checks. We use AI to help review external contributions and to flag possible bugs and security issues.
  • Tests and docs. Some tests and documentation in the current codebase were drafted with AI help and then reviewed and edited by maintainers.

AI features in Leaf โ€‹

Some Leaf features use AI on the user's side, such as the Leaf skill for coding assistants and the crash screen's Open with AI handoff. These are optional features of the framework. They are separate from how Leaf itself is built, and they do nothing unless you use them.

Rules for contributors โ€‹

  1. Disclose it. If AI helped with a contribution, say so in the pull request: which tool and model, which version if you know it, and what it did.
  2. Understand it. You must be able to explain every line you submit. "The AI wrote it" is not an answer in review.
  3. Check licences. Do not submit AI output that reproduces code you could not otherwise contribute under Leaf's licence.
  4. No unreviewed bulk changes. Large AI-generated pull requests (mass refactors, auto-generated test suites) will be closed unless discussed with a maintainer first.
  5. Reviewers are human. AI can point out issues in a review. A maintainer decides what gets merged.

Commit disclosure โ€‹

We ask contributors to add a trailer to commits where AI helped, so the history stays machine-readable:

Assisted-by: Claude Code (review only, flagged an unchecked null)

Use one line per tool. Leave it out if no AI was involved.

Grant-funded work โ€‹

Some Leaf work is funded by grants with their own rules on AI. For work funded by NLnet, we follow the NLnet Generative AI policy:

  • No code, tests, documentation or design delivered under the grant is generated by AI.
  • AI is only used read-only, for example to review code or flag security issues. Maintainers write all fixes themselves.
  • AI usage costs are not charged to the grant.

Issues and pull requests that are part of grant-funded work are labelled so contributors know these stricter rules apply.

Questions โ€‹

If you are unsure whether your use of AI is okay, ask in the issue or pull request before you start.