Add docs/contributing/maintaining.md with what only the maintainer does: the secret rotation list, granting and withdrawing a trusted contributor, agent and bot accounts, the intended settings and releases. Point to it from the root AGENTS.md and the CONTRIBUTING.md index. The two release rules (red nightly, no release while red) are held by aspirational until their controls exist. Closes #262 Assisted-by: Claude Code
7.4 KiB
7.4 KiB
Agent guidance
mortis.kamino is an Ansible Collection of hardened roles (README.md). This file is
always loaded; it holds what applies to nearly every task. Rules tied to one directory live in that
directory's AGENTS.md, and the pointers below say when to read them. Each rule gives how it is
held: by a control (a named hook or check), by review, or aspirational (checked by nothing).
Principles
- Accountability: every change has a human author who understands it and answers for it; an agent is a tool.
- A human decides what is irreversible or shared: settings, protection, tags, releases, credentials, merges to
main; a merge is decided case by case or by a standing rule a human reviewed, such as Renovate's automerge policy inrenovate.json. - Secrets and supply chain: no secret in the repository, a prompt or a log; dependencies and images are pinned and change through review.
- Controlled, not trusted: a rule that matters gets a control; one without is labelled as such.
- Honest reporting: a pull request says what was verified and what was not.
- Simple enough to review: see the code-style rules below.
- Openness and licence: AI assistance is disclosed; contributions are GPL-compatible and REUSE-clean.
Code style
- Existing tool first: an Ansible module, a lint rule or a tool's own setting before a script.
- One job per file, readable in one sitting.
- A comment gives the reason, in a line or two.
- Write for the next reader, not the record: no incident history, change narration or session notes in code, comments or agent context.
- Change only what the task needs: unrelated cleanup is a separate pull request.
Working rules
- Do not install a container runtime to run molecule; molecule runs in CI. Reason: the scenarios run on the repository's own runner; a local runtime is setup nobody maintains. Held by: aspirational, by the maintainer's choice.
- Every change a consumer can see needs a changelog fragment in
changelogs/fragments/. Reason: the changelog and the next version are built from the fragments. Held by: review; theantsibull-changelog-linthook checks a fragment's format, not its presence. - Content for a public place stands alone: 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 (making-a-change.md). Reason: this repository is public, and 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).
- Without write access you are an outsider: file an issue from a template in
.gitea/; a fork or AGit pull request is closed unmerged and its runs are never approved (CONTRIBUTING.md, reviewing.md). Reason: a fork controls its own workflow files, so an approved run executes its code here. Held by: aspirational. - Agent-written commits and pull requests carry
Assisted-by: <tool>[:<model>], neverCo-Authored-By:for an agent, a session link or any other AI trailer (ai-assistance.md). Reason: AI assistance is disclosed (principle 7), and an agent is not an author (principle 1). Held by: review; the exclusion becomes a control when the commit-msg hook that refuses these trailers lands (#272). - On conflict with a shared rule delivered by apm, this repository's
AGENTS.mdwins. Reason: this repository's rules are reviewed here, for this repository. Held by: aspirational.
Verify a change
- Commit with git, not through the forge's API, so the hooks give feedback before the push (advice: Lint re-runs the commit-stage hooks, the commit-msg check and gitleaks).
pre-commit run --all-files: the commit-stage hooks on every file.python3 -m unittest discover -s tests/scripts: when a script changed.git pushrunsansible-test sanityon HEAD (the pre-push hook).- Molecule runs only in CI.
Repository structure
.gitea/ workflows, issue and pull request templates, actionlint config
changelogs/ antsibull-changelog config and fragments
docs/ contributor docs, agent docs, ADRs, image docs
extensions/ image-smoke molecule scenarios for the test images
images/ Dockerfiles of the CI and molecule images
LICENSES/ licence texts (REUSE)
meta/ runtime.yml: the ansible-core floor
roles/ the Collection's roles, each with its molecule scenarios
scripts/ CI and developer scripts
tests/ sanity ignores and the scripts' unit tests
galaxy.yml Collection metadata and build_ignore
renovate.json dependency automation
- A new role goes in
roles/<role>/with its molecule scenario. - A new script goes in
scripts/with its test intests/scripts/. - A new file outside
roles/<role>/runs every Molecule scenario until it is added to the IGNORED list ofscripts/select_molecule_scenarios.py; it belongs there only if no scenario reads it.
Before you start
- Before your first commit in a clone: docs/contributing/setup.md.
- Before cutting a release, granting or withdrawing access, rotating a secret, or changing repository or organisation settings: docs/contributing/maintaining.md.
- Before filing an issue or opening a pull request: use the headings of the matching template in
.gitea/, never your tool's built-in body; read docs/contributing/making-a-change.md. - Before bringing content in from another repository: docs/contributing/making-a-change.md.
- Before committing or opening a pull request as an agent: docs/contributing/ai-assistance.md.
- Before writing code outside
roles/: docs/contributing/code-style.md. - Before closing a fork pull request, merging someone else's pull request, or running an unmerged branch you did not write: docs/contributing/reviewing.md.
- Before reading an issue, and before filing, labelling or closing one: docs/agents/issue-tracker.md and docs/agents/triage-labels.md.
- Before naming a domain concept or writing an ADR: GLOSSARY.md and docs/agents/domain.md.
- Before adding a new kind of thing (a plugin, a Collection dependency, a workflow, an image, a secret) or changing how CI, releases or access work: read the file names in docs/adr/ and the Accepted risks in SECURITY.md.
- Changing a role: read roles/AGENTS.md first.
- Changing a script or its test: read scripts/AGENTS.md first.
- Changing a workflow: read .gitea/workflows/AGENTS.md first.
- Changing an image or an image-smoke scenario: read images/AGENTS.md first.
- Before writing an ADR: read docs/adr/AGENTS.md first.
- Before changing
renovate.json: read its rule descriptions, and test withrenovate --platform=localat the version in.gitea/workflows/renovate.yml.