Skip to content

Update AI Policy - #664

Open
Yaswant Pradhan (yaswant) wants to merge 7 commits into
MetOffice:mainfrom
yaswant:tidy
Open

Yaswant Pradhan (yaswant) wants to merge 7 commits into
MetOffice:mainfrom
yaswant:tidy

Conversation

@yaswant

@yaswant Yaswant Pradhan (yaswant) commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

PR Summary

Update AI policy and tidy some typographical errors.

Code Reviewer: Pierre Siddall (@Pierre-siddall)

Code Quality Checklist

Code Review

  • The changes are coherent and valid

Comment thread source/FurtherDetails/ai.rst Outdated
indemnity or legal protection for generated code. Its use is *strictly
prohibited* for any contributions to our simulation systems.
* **Contributor Liability**: Under all circumstances, individual *contributors bear
full legal and professional responsibility* for the integrity of the code they

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have been challenged by a contributor on the wording "bear full [] legal responsibility". Is this backed up by guidance from the legal team or a wider corporate guidance on Gen AI ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Certainly in the ancillary space we've been advised in past (in a ever and rapidly evolving set of opinions and guidance) that it is the submitter's responsibility to ensure they're not violating someone else's IPR and that they've taken appropriate steps to avoid that. We ask the question explicitly regarding IPR in our submission templates, at which point the ANTS team is "acting in good faith" based on the information provided by the submitter who has confirmed that they've taken steps to avoid IPR violations, so the legal question would ultimately fall on the developer.

Our wider (Met Office) guidance only seems to consider the Met Office scope though. It's been somewhat grey in terms of how we interact with external bodies and international partners.

Something to take to the Science Codes Owner and Legal though.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My question was precisely if this guidance is written down somewhere and approved by legal. If yes, maybe let's refer to it in the text.

Another point is that for me "integrity of the code" can be construed as wider than IPR issues.

@arjclark Andrew Clark (arjclark) Aug 5, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another point is that for me "integrity of the code" can be construed as wider than IPR issues.

Indeed. On that point, if this policy addition applies to the repositories you're using this license across: https://github.com/MetOffice/simulation-systems/blob/main/LICENSE then integrity itself probably needs defining very clearly. That license is a BSD 3-clause that says:

"THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."

A contributor would not be able to be made liable by anyone accepting and running codebases with that license for quite a lot of things, regardless of whether they used generative AI or otherwise.

Comment thread source/FurtherDetails/ai.rst Outdated
| 1 | Check file header | Explicitly names an approved | Reject immediately if |
| | and commit message | enterprise-tier tool | free/personal tier |
+------+--------------------+------------------------------+------------------------+
| 2 | Check licence | Code contains no proprietary | Request rewrite/proof |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exactly is the responsibility of the reviewer here ? How can they assert that a code hasn't been plagiarised ? It is not necessarily obvious.

Should we change the text to code contains no obvious proprietary or restrictively licensed snippet.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's a good point. Slightly rewarded the content in the table.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the text cleaning is fine but I have added two comments in the code changes

  • one about legal responsibility
  • one about reviewer responsibility

@arjclark Andrew Clark (arjclark) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these look sensible adjustments to me.

@jamesp

Copy link
Copy Markdown

Thanks Yaswant Pradhan (@yaswant) for tagging me on the PR and raising its awareness. I think the wording looks like a sensible and pragmatic approach. I agree with Andrew Clark (@arjclark) suggestion above and would welcome further advice from our legal team on whether the stronger wording of previous iterations helps in any potential liability. From my reading of it I don't think you are expecting any greater level of responsibility from contributors than in any other open source code contribution context, only reminding them of their existing obligations to not violate IPR and license stipulations, and adding a requirement to attribute AI usage. It would be good to ensure that agrees with legal view.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am happy with the current iteration. It's important that we get this right so thank you for leading on this. I think we have to accept that it's an evolving picture and that there are still some grey zones.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had a look at this, some changes that I think streamline the wording and some comments that I think we still need to think about regarding how we manage such a complex topic.

Comment thread source/FurtherDetails/ai.rst Outdated
Comment thread source/FurtherDetails/ai.rst Outdated
* source code
* tests
* scripts and configuration
* documentation files containing code examples

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about documentation in general not just those containing code examples, that is something people are quite likely to use AI for, I do.

Comment thread source/FurtherDetails/ai.rst Outdated
Comment thread source/FurtherDetails/ai.rst Outdated
Comment on lines +35 to +46
* **Risk of Public-Domain AI**: AI tools trained on public repositories can emit
code that violates open-source licences or copyrights.
* **No Free/Personal-Tier Tools**: Use of free or personal-tier AI coding tools
is *strictly prohibited* for project contributions.
* **Approved Enterprise-Tier Tools Only**: Contributors may only use
enterprise-tier AI tools approved by their employing organisation or the
repository maintainers.
* **AI Agents Cannot Commit**: AI tools and agents are not permitted to directly
commit code, open pull requests, or perform repository operations. All
AI-generated or AI-assisted content must be reviewed, validated, and committed
by a human contributor with explicit intent and accountability.
* **Contributor Responsibility**: The human contributor is responsible for all

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like the bold parts should be able to stand on their own grammatically and understandable. e.g. Use approved Enterprise-Tier Tools Only

Comment on lines +60 to +63
* enterprise-tier licence with auditable terms of use
* terms that allow open source contribution workflows
* explicit organisational approval by employer or project maintainers
* controls appropriate to institutional IPR and data handling requirements

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* enterprise-tier licence with auditable terms of use
* terms that allow open source contribution workflows
* explicit organisational approval by employer or project maintainers
* controls appropriate to institutional IPR and data handling requirements
* Enterprise-tier licence with auditable terms of use.
* Terms that allow open source contribution workflows.
* Explicit organisational approval by employer or project maintainers.
* Controls appropriate to institutional IPR and data handling requirements.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its fine in its current format. The bullet points are are not complete sentences, so standard punctuation rules do not strictly require a capital letter or a period.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They may not need the a full stop but they do need capitalising.

Comment thread source/FurtherDetails/ai.rst Outdated
Attribution Requirements
------------------------

If an approved Generative AI tool is used, you must provide attribution in two

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If an approved Generative AI tool is used, you must provide attribution in two
If an approved Generative AI tool is used, you **must** provide attribution in two

Comment thread source/FurtherDetails/ai.rst Outdated
Comment on lines +111 to +112
Do not repeat attribution or the tool name in the file header if it is already
included. If you use a new tool, add it to the file header list.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Do not repeat attribution or the tool name in the file header if it is already
included. If you use a new tool, add it to the file header list.
Do not repeat attribution or the tool name in the file header if it is already
included. If you use a new tool or version, append it to the list.

Add a comment near the top of the file. Use the native comment style for the
language, for example:

.. tab-set::

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we actually need a per language example? I would say people should know how to comment in what ever language they are working in. More useful would be examples of different situations. Like when adding an new version of model or adding a new site/tool. Make it obvious what the expected end outcome would be after multiple people have used different models on a single file.

Oliver Lomax (@odlomax) made the observation that we could use a AI skills file to automatically add the header when appropriate if Agentic AI is used to edit a file. This doesn't account for use of inline suggestions where it is very easy to not realise you are even using AI at all. How we catch things like this I don't know but I suspect we are adding a lot of burden that may not catch the things we are trying to catch.

Comment thread source/FurtherDetails/ai.rst Outdated
Comment on lines +90 to +109
.. tab-item:: Fortran

.. code-block:: f90

! Some content in this file was generated or refactored with assistance from
! - [Tool Name] ([Model/Version]).

.. tab-item:: Python

.. code-block:: python

# Some content in this file was generated or refactored with assistance from
# - [Tool Name] ([Model/Version]).

.. tab-item:: C++

.. code-block:: cpp

// Some content in this file was generated or refactored with assistance from
// - [Tool Name] ([Model/Version]).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps an example of how a file might change over time like the following:

Suggested change
.. tab-item:: Fortran
.. code-block:: f90
! Some content in this file was generated or refactored with assistance from
! - [Tool Name] ([Model/Version]).
.. tab-item:: Python
.. code-block:: python
# Some content in this file was generated or refactored with assistance from
# - [Tool Name] ([Model/Version]).
.. tab-item:: C++
.. code-block:: cpp
// Some content in this file was generated or refactored with assistance from
// - [Tool Name] ([Model/Version]).
.. code-block:: f90
! Some content in this file was generated or refactored with assistance from
! - Met Office Github Copilot Enterprise (Claude Haiku 4.7)
.. code-block:: f90
! Some content in this file was generated or refactored with assistance from
! - Met Office Github Copilot Enterprise (Claude Haiku 4.7/4.8)
.. code-block:: f90
! Some content in this file was generated or refactored with assistance from
! - Met Office Github Copilot Enterprise (Claude Haiku 4.7/4.8)
! - Bureau of Meteorology Github Copilot Enterprise (Claude Opus 4.8)

Comment thread source/FurtherDetails/ai.rst Outdated
Comment on lines +114 to +127
**2. the commit message**

Your git commit message must identify the tool and what it assisted with, for
example:

.. code-block:: text

Refactor spatial interpolation routines to improve performance.

- Assisted-by: [Tool Name] ([Model/Version])
for spatial interpolation optimisation.

Attribution must be specific enough for later audit. Include tool name,
model/version where available, and date in the source file header.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can still see people genuinely forgetting to do this when developing. It is more important I believe to have this in the PR commit if it is needed. I'm not sure how enforceable it will be doing this unless we have a pre-commit hook that somehow checks (and possibly even adds the required message).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Andrew Coughtrie (@andrewcoughtrie), for the thought-provoking comments. They all make very good sense, and I’ve tried to address each one in ec4e1b6

This will continue to evolve.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants