CONTRIBUTING.md becomes a short entry point: the two positions and an index. The rules move to one file per trigger in docs/contributing/ (setup, making a change, AI assistance, code style, reviewing), each written as the rule, its reason and how it is held. GLOSSARY.md gains Driver, Unattended agent and Agent account. CLAUDE.md's bot-branch note now points to the new rule against pushing to someone else's branch. Closes #189 Assisted-by: Claude Code:claude-opus-5-5
8.0 KiB
Making a change
Read this before starting a branch, committing, filing an issue or opening a pull request.
Every rule below gives its reason and how it is held: by a control (a named hook or check), by review, or aspirational (checked by nothing and nobody). Links between the contributor docs are held by review until an offline link check exists. Rules for roles are in roles/AGENTS.md; rules for working with an agent, including commit trailers, are in ai-assistance.md.
Branches and pull requests
- Work on a branch of your own and open a pull request against
main; never push tomain. Reason: every change reachesmainthrough the Lint and Build checks and a reviewer. Held by: control: branch protection onmain. - Do not push to someone else's branch or to a bot's branch; put your change in a pull request of
your own. Updating a branch from
mainwith Gitea's update button is allowed. Reason: a push changes a head its author already reviewed or scheduled to merge, and a hand-made commit on arenovate/branch makes Renovate stop rebasing it. Held by: aspirational. - File an issue or open a pull request with the headings of the matching template in
.gitea/, also when you file through the API,teaor an MCP server. Reason: those routes skip the templates, and an agent's built-in body leaves out what review needs. Held by: review. - A pull request says under Verified what you ran (commands, linked CI runs) and under Not verified what you did not. Reason: a reviewer can only judge a change by what was actually checked. Held by: review.
Commits
- Commit messages follow Conventional Commits (
feat:,fix:,docs:,ci:...). Reason: the type tells a reviewer and the changelog what kind of change it is. Held by: control: theconventional-pre-commitcommit-msg hook, and the Lint check on every commit of a pull request. - Never commit credentials, tokens or key material.
Reason: a pushed secret has leaked, whatever later commits do.
Held by: control: the
gitleakshook, and the Lint check's scan of a pull request's commits.
Changelog, versions and dependencies
-
A change a consumer can see needs a changelog fragment in
changelogs/fragments/: an antsibull-changelog YAML file with one section. A pure CI or docs change needs none, or atrivial:one. Pick the section by the release it calls for:- major:
breaking_changes,removed_features; - minor:
minor_changes,deprecated_features; - patch:
bugfixes,security_fixes,known_issues; - never
major_changes(its title reads like a major release; usebreaking_changesorminor_changes).
Reason: the changelog is built from the fragments, and the next version follows from their sections. Held by: control for the format (the
antsibull-changelog-linthook); review for whether one is needed and which section. - major:
-
Write a fragment, never the version. The maintainer sets
versioningalaxy.ymland tags the release. Reason: the version follows from all fragments since the last release, not from one change. Held by: review (galaxy.ymlis underCODEOWNERS). -
A new Collection dependency states its reason in the pull request and has a version floor. Reason: every consumer has to install it, and without a floor an old version nobody tested satisfies it. Held by: review (
galaxy.ymlis underCODEOWNERS).
Third-party material
- Third-party material carries an SPDX header, a
REUSE.tomlannotation (which overrides file headers) and an entry inNOTICE. Reason: the Collection is GPL-licensed and REUSE-compliant, so each file's licence and origin must be recorded. Held by: review, prompted by the pull request template's checkbox; thereuse-linthook catches a file with no licence at all.
Content from other repositories
- No tracked file, issue or pull request text or comment, release note or job output refers to another repository of the maintainer's, its documents, hosts, network or namespaces, or states host sizing. This instruction has no expiry. Reason: this repository is public and stands alone; a reader without an account must not learn the private environment from it. Held by: aspirational (no check is cheap for issue text or job logs).
- When you bring content in from another repository, search the incoming diff before committing for mentions of the source repository, its documents, hostnames, addresses, account namespaces and sibling paths; rewrite comments so they stand alone; say in the pull request what you searched for. Reason: copied comments and paths are where private references slip in. Held by: review.
Dependency and image updates
Interim section: it moves to images/AGENTS.md and scripts/AGENTS.md.
- A pin in
requirements-dev.txtchanges together with its lockrequirements-dev.lock. Renovate does both; by hand, runscripts/lock-requirements.sh(--upgradealso moves transitive packages; it needs PyPI and the Python of.python-version) and commit the lock in the same pull request. Reason: installs usepip install --require-hashes -r requirements-dev.lock -r requirements-dev.txt, which refuses an unhashed package and any disagreement between the two files. Held by: control: the Lint and Build checks install that way when a pin file changes. - Hook repositories in
.pre-commit-config.yamlare pinned by commit SHA, with the release in a# frozen: vX.Y.Zcomment. Find the SHA withgit ls-remote <repo> "refs/tags/<tag>" "refs/tags/<tag>^{}"(the^{}line, when there is one). Reason: a tag can be moved; a commit SHA cannot. Held by: review (.pre-commit-config.yamlis underCODEOWNERS). - A pull request that changes an image input (
requirements-dev.txt,requirements-dev.lock,requirements.yml,.pre-commit-config.yaml,images/**) raises that image'sversion:in.gitea/workflows/image.yml(python3 scripts/bump_image_versions.pymakes the edit). Reason: a published image version is never rebuilt, so a changed input needs a new version. Held by: control: the Lint check'sCheck image versions were bumpedstep. - After the merge builds the image on
main, a second pull request moves theimage:<version>@sha256:<digest>pins inlint.yml,build.ymlandmolecule.ymlto the printed digest. It touches noimage.ymltrigger path, so it rebuilds nothing. Reason: consumers run exactly the digest a reviewer saw. Held by: review; Renovate opens these pull requests for the repository's own images. - These tooling files are in
galaxy.ymlbuild_ignore, so their bumps change neither the Collection nor its version. - A pull request from a
renovate/branch changes only version, tag, digest and pin lines. Reason: the bot's pull requests automerge, so they must not be able to change anything else. Held by: control:scripts/check_bot_pr_diff.pyin the Lint check, run frommain's copy. - Workflows never mention the image namespace this repository's CI must not use (the string is in
scripts/check_image_versions.py). Reason: this repository's images are built and pulled only under its own organisation's namespace. Held by: control: the Lint check'sCheck image pinsstep. renovate.jsonconfigures the bumps (minor and patch automerge, majors by hand). Renovate runs in.gitea/workflows/renovate.yml(daily cron on this repository's runner, as a bot user of this repository only). Test a config change before the merge withrenovate --platform=local(the version inrenovate.yml), which reads your checkout; a dry run in Actions (Run workflow withdry_run=true) readsrenovate.jsonfrommainand proves reads only. Open item: no live run has yet shown that the bot can push and open a pull request, and that its pull requests get the Lint and Build checks.