docs(glossary): widen control and define review, aspirational, scheduled merge and the role terms
The held-by lines in AGENTS.md and the contributor docs hold rules by a control, by review or aspirationally, and SECURITY.md's Accepted risks count repository settings such as branch protection and code-owner approval, but the glossary defined only control and limited it to hooks and CI jobs. Define all three, the merge and role terms, and replace the avoided gate, guard and enforce wording. Assisted-by: Claude Code
This commit is contained in:
1 parent
db237569b2
commit
a052713aa1
11 files changed
+45
-17
No files matched your search
@@ -10,7 +10,7 @@ held: by a control (a named hook or check), by review, or aspirational (checked
|
|||||||
1. **Accountability**: every change has a human author who understands it and answers for it; an agent is a tool.
|
1. **Accountability**: every change has a human author who understands it and answers for it; an agent is a tool.
|
||||||
2. **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 in `renovate.json`.
|
2. **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 in `renovate.json`.
|
||||||
3. **Secrets and supply chain**: no secret in the repository, a prompt or a log; dependencies and images are pinned and change through review.
|
3. **Secrets and supply chain**: no secret in the repository, a prompt or a log; dependencies and images are pinned and change through review.
|
||||||
4. **Enforced, not trusted**: a rule that matters gets a control; one without is labelled as such.
|
4. **Controlled, not trusted**: a rule that matters gets a control; one without is labelled as such.
|
||||||
5. **Honest reporting**: a pull request says what was verified and what was not.
|
5. **Honest reporting**: a pull request says what was verified and what was not.
|
||||||
6. **Simple enough to review**: see the code-style rules below.
|
6. **Simple enough to review**: see the code-style rules below.
|
||||||
7. **Openness and licence**: AI assistance is disclosed; contributions are GPL-compatible and REUSE-clean.
|
7. **Openness and licence**: AI assistance is disclosed; contributions are GPL-compatible and REUSE-clean.
|
||||||
|
|||||||
+27
-1
@@ -6,6 +6,8 @@ The language of contributing to the `mortis.kamino` Ansible Collection: how its
|
|||||||
|
|
||||||
### Guidance
|
### Guidance
|
||||||
|
|
||||||
|
A rule is held in exactly one of three ways: by a control (naming the check), by review, or aspirationally; an agent instruction is a place a rule lives, not a way it is held.
|
||||||
|
|
||||||
**Principle**:
|
**Principle**:
|
||||||
A commitment that holds across the whole repository, stated with its reason.
|
A commitment that holds across the whole repository, stated with its reason.
|
||||||
_Avoid_: Value, guideline, philosophy
|
_Avoid_: Value, guideline, philosophy
|
||||||
@@ -15,9 +17,17 @@ What a principle requires of a contributor, human or agent, in one area of the r
|
|||||||
_Avoid_: Convention, policy, standard
|
_Avoid_: Convention, policy, standard
|
||||||
|
|
||||||
**Control**:
|
**Control**:
|
||||||
A mechanical check, a hook or a CI job, that holds a rule without depending on anyone's attention.
|
A mechanical check (a hook, a CI job or a repository setting) that holds a rule without depending on anyone's attention. Something that only proposes a change, such as a Renovate pull request, is not one: a human or another control still decides.
|
||||||
_Avoid_: Gate, guard, guardrail, enforcement
|
_Avoid_: Gate, guard, guardrail, enforcement
|
||||||
|
|
||||||
|
**Review**:
|
||||||
|
A person other than the one acting sees the change before it takes effect, such as a pull request reviewer or a code-owner approval.
|
||||||
|
_Avoid_: Sign-off
|
||||||
|
|
||||||
|
**Aspirational**:
|
||||||
|
Written down and relied on, but checked by nothing and nobody, so a breach is found only by chance.
|
||||||
|
_Avoid_: Best effort, honour system
|
||||||
|
|
||||||
### People
|
### People
|
||||||
|
|
||||||
There are two positions, each held per repository: a trusted contributor of another repository in the organisation is an outsider here unless given write access here.
|
There are two positions, each held per repository: a trusted contributor of another repository in the organisation is an outsider here unless given write access here.
|
||||||
@@ -43,3 +53,19 @@ _Avoid_: Bot, autonomous agent, AFK agent
|
|||||||
**Agent account**:
|
**Agent account**:
|
||||||
A Gitea account used only by agents, with exactly one accountable person.
|
A Gitea account used only by agents, with exactly one accountable person.
|
||||||
_Avoid_: Bot account, service account
|
_Avoid_: Bot account, service account
|
||||||
|
|
||||||
|
### Merging
|
||||||
|
|
||||||
|
**Scheduled merge**:
|
||||||
|
A merge set to run once the required checks pass; it merges whatever head the branch has at that moment, as the person who set it. Renovate's automerge is one.
|
||||||
|
_Avoid_: Automerge (for the general case), merge when checks succeed
|
||||||
|
|
||||||
|
### Roles
|
||||||
|
|
||||||
|
**Role interface**:
|
||||||
|
What a consumer of a role may depend on: its inputs, supported entry points, documented output facts and documented tags.
|
||||||
|
_Avoid_: API, public surface
|
||||||
|
|
||||||
|
**Internal role**:
|
||||||
|
A role that only other roles of the Collection call; its interface is not part of the Collection's versioning promise.
|
||||||
|
_Avoid_: Private role, helper role
|
||||||
@@ -35,7 +35,7 @@ input carries the role name as a prefix (`<role>_<name>`).
|
|||||||
|
|
||||||
Roles are extracted from the author's private environment repository in waves
|
Roles are extracted from the author's private environment repository in waves
|
||||||
(tracked in that repository's epic #486 and its ADR 0001). The order inside a wave is
|
(tracked in that repository's epic #486 and its ADR 0001). The order inside a wave is
|
||||||
not a promise, and a role arrives only when its own gates (tests, a safe cutover of
|
not a promise, and a role arrives only when its own prerequisites (tests, a safe cutover of
|
||||||
the environment that uses it) are met.
|
the environment that uses it) are met.
|
||||||
|
|
||||||
Still to come:
|
Still to come:
|
||||||
|
|||||||
+3
-3
@@ -93,8 +93,8 @@ reduction. A later decision that accepts a risk adds an entry here.
|
|||||||
|
|
||||||
- **Risk:** a writer can add a version-shaped change to such a pull request, and it merges as
|
- **Risk:** a writer can add a version-shaped change to such a pull request, and it merges as
|
||||||
the Renovate bot.
|
the Renovate bot.
|
||||||
- **Why accepted:** bounded by the bot-diff gate (shape, not value) and by code-owner
|
- **Why accepted:** bounded by the bot-diff check (`scripts/check_bot_pr_diff.py`: shape, not
|
||||||
approval, which a push dismisses; every account that can push there already reaches every
|
value) and by code-owner approval, which a push dismisses; every account that can push there
|
||||||
secret. There is no `renovate/*` push allowlist.
|
already reaches every secret. There is no `renovate/*` push allowlist.
|
||||||
- **Trigger:** a token that can push here but cannot reach the secrets.
|
- **Trigger:** a token that can push here but cannot reach the secrets.
|
||||||
- **Planned reduction:** none for now.
|
- **Planned reduction:** none for now.
|
||||||
@@ -45,7 +45,8 @@ contributor docs are held by review until an offline link check exists. Terms su
|
|||||||
[SECURITY.md](../../SECURITY.md)).
|
[SECURITY.md](../../SECURITY.md)).
|
||||||
*Held by:* aspirational.
|
*Held by:* aspirational.
|
||||||
- **No agent approves or merges a pull request, driven or unattended.**
|
- **No agent approves or merges a pull request, driven or unattended.**
|
||||||
*Reason:* approval by a code owner is the gate, and an agent that approves passes its own gate.
|
*Reason:* approval by a code owner is the review, and an agent's approval is not a review by a
|
||||||
|
person other than the one acting.
|
||||||
*Held by:* control for agent accounts (they are outside the merge and approvals allowlists of the
|
*Held by:* control for agent accounts (they are outside the merge and approvals allowlists of the
|
||||||
branch protection); review for an agent acting with a contributor's own token.
|
branch protection); review for an agent acting with a contributor's own token.
|
||||||
- **Every agent account has exactly one accountable person, named in its Gitea profile.**
|
- **Every agent account has exactly one accountable person, named in its Gitea profile.**
|
||||||
|
|||||||
@@ -91,7 +91,8 @@ The rules for these live next to the files they govern: [scripts/AGENTS.md](../.
|
|||||||
(scripts, their tests, tool pins and their lock, hook SHA pins),
|
(scripts, their tests, tool pins and their lock, hook SHA pins),
|
||||||
[images/AGENTS.md](../../images/AGENTS.md) (image inputs, version bumps, pin pull requests, the layer
|
[images/AGENTS.md](../../images/AGENTS.md) (image inputs, version bumps, pin pull requests, the layer
|
||||||
limit), [.gitea/workflows/AGENTS.md](../../.gitea/workflows/AGENTS.md) (workflows, secrets, the
|
limit), [.gitea/workflows/AGENTS.md](../../.gitea/workflows/AGENTS.md) (workflows, secrets, the
|
||||||
bot-diff gate) and [docs/adr/AGENTS.md](../adr/AGENTS.md) (decision records).
|
bot-diff check `scripts/check_bot_pr_diff.py`) and [docs/adr/AGENTS.md](../adr/AGENTS.md) (decision
|
||||||
|
records).
|
||||||
|
|
||||||
- **Test a change to `renovate.json` before the merge with `renovate --platform=local`** (the version
|
- **Test a change to `renovate.json` before the merge with `renovate --platform=local`** (the version
|
||||||
in `.gitea/workflows/renovate.yml`), which reads your checkout.
|
in `.gitea/workflows/renovate.yml`), which reads your checkout.
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ held by review until an offline link check exists.
|
|||||||
*Reason:* it is the one visible sign that the agent loaded the guidance.
|
*Reason:* it is the one visible sign that the agent loaded the guidance.
|
||||||
*Held by:* aspirational.
|
*Held by:* aspirational.
|
||||||
- **The tracked `.claude/settings.json` never holds `permissions.allow`; `deny` and `ask` rules are
|
- **The tracked `.claude/settings.json` never holds `permissions.allow`; `deny` and `ask` rules are
|
||||||
allowed. Your own allowlist and personal guards go in `.claude/settings.local.json`, which is never
|
allowed. Your own allowlist, hooks and any other rules you do not want shared go in
|
||||||
committed.**
|
`.claude/settings.local.json`, which is never committed.**
|
||||||
*Reason:* a branch's settings take effect for whoever opens it with an agent, so an `allow` rule
|
*Reason:* a branch's settings take effect for whoever opens it with an agent, so an `allow` rule
|
||||||
pushed on an unmerged branch lets that branch's commands run without a prompt before anyone has
|
pushed on an unmerged branch lets that branch's commands run without a prompt before anyone has
|
||||||
reviewed it, while a `deny` or `ask` rule can only add prompts.
|
reviewed it, while a `deny` or `ask` rule can only add prompts.
|
||||||
|
|||||||
+2
-2
@@ -67,7 +67,7 @@ real consumers.
|
|||||||
|
|
||||||
- `<version>` is semver, independent of the Collection's version. A published version is never moved or
|
- `<version>` is semver, independent of the Collection's version. A published version is never moved or
|
||||||
rebuilt, so one digest belongs to exactly one version. `latest` is the newest version, for looking only.
|
rebuilt, so one digest belongs to exactly one version. `latest` is the newest version, for looking only.
|
||||||
- Pin `ci:<version>@sha256:<digest>`; the digest is what is enforced. Consumers: `lint.yml`, `build.yml` and
|
- Pin `ci:<version>@sha256:<digest>`; the digest decides what is pulled. Consumers: `lint.yml`, `build.yml` and
|
||||||
`gitea-release-key.yml`.
|
`gitea-release-key.yml`.
|
||||||
- Renovate is configured to move the pins to a new version after the image is built on `main` (the rule is in
|
- Renovate is configured to move the pins to a new version after the image is built on `main` (the rule is in
|
||||||
`renovate.json`; the first pin of a brand-new image is made by hand).
|
`renovate.json`; the first pin of a brand-new image is made by hand).
|
||||||
@@ -78,7 +78,7 @@ real consumers.
|
|||||||
files are copied in). The workflow runs on pushes to `main` that touch `images/**`, `requirements-dev.txt`, `requirements-dev.lock`, `requirements.yml`,
|
files are copied in). The workflow runs on pushes to `main` that touch `images/**`, `requirements-dev.txt`, `requirements-dev.lock`, `requirements.yml`,
|
||||||
`.pre-commit-config.yaml` or the workflow itself, never on a pull request, and builds an image only when its
|
`.pre-commit-config.yaml` or the workflow itself, never on a pull request, and builds an image only when its
|
||||||
`version:` in the workflow's matrix is not yet published. A change to the image's inputs therefore needs a new
|
`version:` in the workflow's matrix is not yet published. A change to the image's inputs therefore needs a new
|
||||||
`version:` (Lint enforces it, and Renovate's bump step does it for dependency updates), and the merge builds
|
`version:` (Lint checks it, and Renovate's bump step does it for dependency updates), and the merge builds
|
||||||
the image. Each pushed layer stays below 100 MB (Cloudflare's request limit), which is why the Go toolchains
|
the image. Each pushed layer stays below 100 MB (Cloudflare's request limit), which is why the Go toolchains
|
||||||
and the unused Go binaries are deleted from the hook cache, and why the build prints the compressed size of each layer
|
and the unused Go binaries are deleted from the hook cache, and why the build prints the compressed size of each layer
|
||||||
directory.
|
directory.
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ systemd, packages, the `dbus` and `ssh` units, the Python bindings, `NET_ADMIN`)
|
|||||||
- `<version>` is semver (`MAJOR.MINOR.PATCH`), independent of the Collection's version. A published
|
- `<version>` is semver (`MAJOR.MINOR.PATCH`), independent of the Collection's version. A published
|
||||||
version is never moved or rebuilt, so one digest belongs to exactly one version. `latest` is the
|
version is never moved or rebuilt, so one digest belongs to exactly one version. `latest` is the
|
||||||
newest version and is for looking, not for pinning.
|
newest version and is for looking, not for pinning.
|
||||||
- Pin `molecule-ubuntu2404:<version>@sha256:<digest>`; the digest is what is enforced. Consumers here:
|
- Pin `molecule-ubuntu2404:<version>@sha256:<digest>`; the digest decides what is pulled. Consumers here:
|
||||||
`.gitea/workflows/molecule.yml`.
|
`.gitea/workflows/molecule.yml`.
|
||||||
- Renovate is configured to move the pin to a new version after the image is built on `main` (the rule is in
|
- Renovate is configured to move the pin to a new version after the image is built on `main` (the rule is in
|
||||||
`renovate.json`; the first pin of a brand-new image is made by hand).
|
`renovate.json`; the first pin of a brand-new image is made by hand).
|
||||||
@@ -68,7 +68,7 @@ systemd, packages, the `dbus` and `ssh` units, the Python bindings, `NET_ADMIN`)
|
|||||||
`.gitea/workflows/image.yml` builds it with kaniko. The workflow runs on pushes to `main` that touch `images/**`,
|
`.gitea/workflows/image.yml` builds it with kaniko. The workflow runs on pushes to `main` that touch `images/**`,
|
||||||
`requirements-dev.txt`, `requirements-dev.lock`, `requirements.yml`, `.pre-commit-config.yaml` or the workflow itself, never on a pull request, and builds an
|
`requirements-dev.txt`, `requirements-dev.lock`, `requirements.yml`, `.pre-commit-config.yaml` or the workflow itself, never on a pull request, and builds an
|
||||||
image only when its `version:` in the workflow's matrix is not yet published. A change under
|
image only when its `version:` in the workflow's matrix is not yet published. A change under
|
||||||
`images/molecule-ubuntu2404/` therefore needs a new `version:` (Lint enforces it) and the merge builds the image. The
|
`images/molecule-ubuntu2404/` therefore needs a new `version:` (Lint checks it) and the merge builds the image. The
|
||||||
Ubuntu release is fixed by the name: a new Ubuntu release is a new image (`molecule-ubuntuNNNN`), and the roles
|
Ubuntu release is fixed by the name: a new Ubuntu release is a new image (`molecule-ubuntuNNNN`), and the roles
|
||||||
are tested on every release the hosts run or are moving to.
|
are tested on every release the hosts run or are moving to.
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ systemd, packages, the `dbus` and `ssh` units, the Python bindings, `NET_ADMIN`)
|
|||||||
- `<version>` is semver (`MAJOR.MINOR.PATCH`), independent of the Collection's version. A published
|
- `<version>` is semver (`MAJOR.MINOR.PATCH`), independent of the Collection's version. A published
|
||||||
version is never moved or rebuilt, so one digest belongs to exactly one version. `latest` is the
|
version is never moved or rebuilt, so one digest belongs to exactly one version. `latest` is the
|
||||||
newest version and is for looking, not for pinning.
|
newest version and is for looking, not for pinning.
|
||||||
- Pin `molecule-ubuntu2604:<version>@sha256:<digest>`; the digest is what is enforced. Consumers here:
|
- Pin `molecule-ubuntu2604:<version>@sha256:<digest>`; the digest decides what is pulled. Consumers here:
|
||||||
`.gitea/workflows/molecule.yml`.
|
`.gitea/workflows/molecule.yml`.
|
||||||
- Renovate is configured to move the pin to a new version after the image is built on `main` (the rule is in
|
- Renovate is configured to move the pin to a new version after the image is built on `main` (the rule is in
|
||||||
`renovate.json`; the first pin of a brand-new image is made by hand).
|
`renovate.json`; the first pin of a brand-new image is made by hand).
|
||||||
@@ -67,7 +67,7 @@ systemd, packages, the `dbus` and `ssh` units, the Python bindings, `NET_ADMIN`)
|
|||||||
`.gitea/workflows/image.yml` builds it with kaniko. The workflow runs on pushes to `main` that touch `images/**`,
|
`.gitea/workflows/image.yml` builds it with kaniko. The workflow runs on pushes to `main` that touch `images/**`,
|
||||||
`requirements-dev.txt`, `requirements-dev.lock`, `requirements.yml`, `.pre-commit-config.yaml` or the workflow itself, never on a pull request, and builds an
|
`requirements-dev.txt`, `requirements-dev.lock`, `requirements.yml`, `.pre-commit-config.yaml` or the workflow itself, never on a pull request, and builds an
|
||||||
image only when its `version:` in the workflow's matrix is not yet published. A change under
|
image only when its `version:` in the workflow's matrix is not yet published. A change under
|
||||||
`images/molecule-ubuntu2604/` therefore needs a new `version:` (Lint enforces it) and the merge builds the image. The
|
`images/molecule-ubuntu2604/` therefore needs a new `version:` (Lint checks it) and the merge builds the image. The
|
||||||
Ubuntu release is fixed by the name: a new Ubuntu release is a new image (`molecule-ubuntuNNNN`), and the roles
|
Ubuntu release is fixed by the name: a new Ubuntu release is a new image (`molecule-ubuntuNNNN`), and the roles
|
||||||
are tested on every release the hosts run or are moving to.
|
are tested on every release the hosts run or are moving to.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ names a check that does not exist yet and its backlog issue.
|
|||||||
*Why:* a consumer finds the same thing in the same place. *Held:* review.
|
*Why:* a consumer finds the same thing in the same place. *Held:* review.
|
||||||
- **Complexity.** A task file stays within ansible-lint's `complexity` limit, `max_tasks` 100
|
- **Complexity.** A task file stays within ansible-lint's `complexity` limit, `max_tasks` 100
|
||||||
(40 once ansible-lint accepts the key). *Why:* a long task file is hard to review. *Held:*
|
(40 once ansible-lint accepts the key). *Why:* a long task file is hard to review. *Held:*
|
||||||
review until the Lint job enables and gates `complexity` (#138).
|
review until the Lint job enables `complexity` and fails on it (#138).
|
||||||
- **Roadmap.** The pull request that adds a role removes it from the README "Roadmap" list, and
|
- **Roadmap.** The pull request that adds a role removes it from the README "Roadmap" list, and
|
||||||
the section goes when the list is empty. *Why:* the list is useful only if true. *Held:* review.
|
the section goes when the list is empty. *Why:* the list is useful only if true. *Held:* review.
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user