diff --git a/roles/AGENTS.md b/roles/AGENTS.md index a5df8d9..2e20d12 100644 --- a/roles/AGENTS.md +++ b/roles/AGENTS.md @@ -7,7 +7,7 @@ names a check that does not exist yet and its backlog issue. ## Shape -- **Layout.** `tasks/main.yml`, `defaults/main.yml`, `meta/main.yml`, `meta/argument_specs.yml`, +- **Layout.** Every role has `tasks/main.yml`, `defaults/main.yml`, `meta/main.yml`, `meta/argument_specs.yml`, `README.md` and `molecule/default/`; `vars/` holds only constants a consumer must not override. *Why:* one predictable shape, and `vars/` outranks inventory. *Held:* the scenario by `scripts/select_molecule_scenarios.py` (fails a changed role without one), the rest by review. @@ -24,10 +24,10 @@ names a check that does not exist yet and its backlog issue. ## Interface - **Role interface.** Inputs, supported entry points, documented output facts and documented - tags (README `## Tags`). Renaming or removing one is a `breaking_changes` fragment and a major - release, with no compatibility alias; adding one is `minor_changes`. *Why:* this is what a - consumer may depend on, and with latest-only support an alias costs more than it gives. - *Held:* review (the fragment check, #183, will only see that a fragment exists). + tags (README `## Tags`). Renaming or removing one is a `breaking_changes` fragment (a major + release), for an input with no compatibility alias; adding one is `minor_changes`. *Why:* this + is what a consumer may depend on, and with latest-only support an alias costs more than it + gives. *Held:* review; the fragment check (#183) will require a fragment, not pick its section. - **argument_specs.** Every optional input has a value in `defaults/main.yml` and a spec entry with `type`, `description` and the same `default:`; `choices` for closed sets; a `required: true` input has no default. *Why:* a spec `default:` never sets the variable, but without it @@ -50,13 +50,14 @@ names a check that does not exist yet and its backlog issue. - **Internal variables.** `vars/` constants, `register:` and `set_fact` results are `___`. *Why:* the Red Hat Automation Good Practices convention, and it tells an input from an internal - name. *Held:* ansible-lint `var-naming[no-role-prefix]` for the prefix (not in internal roles, - see below), review for the `__`. + name. *Held:* ansible-lint `var-naming[no-role-prefix]` for the prefix, review for the `__`. + The check misreads a leading `_`, so an internal role's files are listed in + `.ansible-lint-ignore` and its prefix is held by review. - **Validation.** The spec holds `type`, `choices` and `required`; a rule between role variables is an `assert` in `tasks/validate.yml`; cross-input spec keys (`required_if`, `mutually_exclusive` and the like) appear only inside a dict input's suboptions. *Why:* Ansible - does not apply them at entry-point level. *Held:* ansible-lint `schema[role-arg-spec]` for the - misuse, review for the rest. + does not apply them at entry-point level. *Held:* ansible-lint `schema[role-arg-spec]` for + entry-level misuse, review for the rest. - **Validation order.** `validate.yml` runs before any task that changes the host, loaded with `import_tasks` and `tags: always`; only fact-computing tasks run before it, tagged `always` too. *Why:* a bad input fails before any change, and `always` on `include_tasks` does not reach @@ -80,8 +81,9 @@ names a check that does not exist yet and its backlog issue. - **Platforms follow the target hosts.** Ubuntu-targeting roles declare exactly `noble` and `resolute`; Proxmox-targeting roles declare Debian `trixie`; each is tested on its own OS. *Why:* testing on hosts a role never runs on proves nothing. *Held:* review. -- **All three releases.** A role aims at `noble`, `resolute` and `trixie`; one that covers fewer - says why in one README line. *Why:* a wider role serves more hosts. *Held:* aspirational. +- **All three releases.** A role aims to target both Ubuntu and Proxmox hosts, and so to declare + `noble`, `resolute` and `trixie`; one that covers fewer says why in one README line. *Why:* a + wider role serves more hosts. *Held:* aspirational. - **Dropping a platform.** Removing or narrowing a declared platform is `breaking_changes`, tested or not. *Why:* a consumer on it loses support. *Held:* review until the fragment check fails a dropped platform without one (#183).