Note · October 2026

Declared: an AI contribution policy you can check

Portolan·3 min

Maintainers of open-source projects are drowning in pull requests written with AI tools and not declared as such. Companies have AI policies nobody can enforce. declared is a small open-source tool from Portolan that turns one short policy file into three things that cannot drift apart: a plain-language AI policy page, an AI-disclosure section in the pull-request template, and a check that runs on every pull request.

It never tries to detect AI-written code. Detection is unreliable and unfair to the people it gets wrong. declared reads what contributors declare, and checks that the declaration is complete and consistent with what their own tools left behind.

How it works

The policy lives in one file in the repository. From it, declared writes the policy document and the template section, and a GitHub Action with no dependencies reads it on every pull request. Contributors state their AI use in the pull-request description, using the W3C disclosure vocabulary (none, ai-assisted, ai-generated, autonomous) and the Linux kernel's Assisted-by line to name the tool.

The check reads the description and the commits. Many AI tools add a co-author line to the commits they make. If the description says none and the commits say otherwise, the check points it out, without blocking. When something is missing it posts one comment, pre-filled from what it already knows, and keeps editing that same comment rather than adding new ones. Four presets cover the usual positions: open, disclose, strict and human-only. Every setting can be overridden.

Three rules keep it safe. No code from the pull request is ever checked out or run; the check reads descriptions, commit messages and file names through GitHub's interface. The policy is read from the base branch, so a pull request cannot relax the rules it is judged by. And any text echoed back into a comment is neutralised, so a crafted description cannot inject markup or mention people.

A report command reads the merged pull requests of a repository and rolls their disclosures into one report: coverage, levels, tools named, and the detail per pull request. Nothing is stored anywhere. The repository is the ledger; the report is derived from it on demand.

What it is for

  • An open-source maintainer who wants disclosure without playing detective.
  • A company with an AI policy on paper and no way to enforce it in its repositories.
  • An evidence trail for an ISO 42001 management system, drawn from the repositories themselves.
  • A straight answer to a due-diligence question about how AI is used in a codebase.

Where it stands

Version 0.3, open source under the MIT licence, with the code public on GitHub. It runs from the repository itself; publication of the package is pending. The check is only as honest as the people filling in the template, and that is the point. It asks. It does not accuse.

Roots