Guiding principles for agents and humans #91
Notifications
Due Date
No due date set.
Blocks
#102 Enforcement map for each prose-only rule
Mortis/Kamino
Reference: Mortis/Kamino#91
Reference in new issue
Block a user
Part of #87
Question
What is the short list of principles that guides every contribution, and what concrete test goes with each so a reviewer or a check can apply it?
Candidates from the maintainer: no long comments or prose in code; avoid long and complex custom scripts; keep things simple and understandable.
Context
image.yml,scripts/check_image_versions.pyat roughly 480 lines,renovate.jsondescriptions over 100 words.Resolution
The ticket grew during the session: the maintainer meant "principles" broadly, as the spine of a full guidance set for contributors and their agents, not only a code-style list. Most areas already have tickets, so this one decided what nothing else owned: the cross-cutting principles, the form every rule takes, code style outside roles, and the pattern for what an agent gets in context.
1. Scope of the guidance set
Five areas: governance, contribution, code style, repository structure, architecture. The set stands alone (it depends on nothing outside this repository, the maintainer's own agent configuration included) and is written once, for humans and agents alike. Recorded in the map's Destination and Notes.
2. Terms and form
GLOSSARY.md, drafted, not yet committed.)3. The seven principles
main.The area tickets elaborate these; they do not re-decide them.
4. Code style outside roles (principle 6)
Each is to be written with a counter-example from this repository and a boundary saying what it does not forbid.
How they are held:
ruff(lint and format, complexity and function-size rules at their defaults) andshellcheckas hooks that also run in CI. Neither Python nor shell is linted today. Enable ansible-lint'scomplexityrule; itsmax_tasksnumber is set by the Role standard ticket, which must first confirm withansible-lint -Lthat the rule is active under the production profile.5. What an agent gets in context
AGENTS.md: the seven principles and five code-style rules at one line each, the commands to verify a change, and pointers.AGENTS.mdin each directory with its own way of working (candidates:roles/,scripts/,.gitea/workflows/,images/), so an agent editing there gets those rules without being told to look.docs/for guidance tied to a task rather than a directory, and for the reasons and examples behind the rules.<file>", never a bare link.CLAUDE.md, no.claude/rules, no hook injection for guidance. This reverses the map's earlier note thatCLAUDE.mdbecomes a thin adapter; see the test below.6. No ADR
The principles are easy to change and unsurprising, so they miss the ADR bar. The guidance documents are the record.
Evidence
Test: how Claude Code loads nested
AGENTS.md(version 2.1.323, a throwaway directory, one run per case; each asked a fresh session to read one file insub/and report which planted codewords it could see):AGENTS.mdsub/AGENTS.mdCLAUDE.mdimportingAGENTS.mdsub/each with a one-lineCLAUDE.mdimporting itsAGENTS.mdCLAUDE.mdanywhereA root adapter switches off on-demand loading of nested
AGENTS.md; with noCLAUDE.mdboth load natively. Not established: the oldest Claude Code version that readsAGENTS.mdnatively. Codex, Cursor and Copilot document reading root and nestedAGENTS.md(not tested here).What the maintainer's other repositories show (read-only survey): the same principles are stated there and hold only where a control exists. Content measured by a hook complies; comments and prose, held by instruction alone, run to a quarter or more of many files, with comment blocks of 90 to 160 lines that are mostly incident history. A custom size checker there grew to over 500 lines. This is why rule 4 exists and why no custom checker is written here.
Public sources
complexity(max_tasksdefault 100), yamllintline-length, ruffC901andPLR0915, shellcheck. No standard tool limits consecutive comment lines or file length in YAML or shell.Passed to other tickets
CLAUDE.mdcontent; decide which directories get a nestedAGENTS.md; establish the minimum Claude Code version and state it in the contributor setup; repository structure.complexitynumber, and confirming the rule is active.ruff,shellcheck); the label vocabulary is control, review, aspirational.Review of the map (2026-11-15): corrections to this issue.
CLAUDE.md, no.claude/rules, no hook injection for guidance" and "Skills never carry a rule". Point 5 of the later resolution adopts instructions through apm: they "may carry rules shared across the maintainer's repositories" and "for now they land in.claude/rules/". "No.claude/rules" no longer holds as written; "NoCLAUDE.md" and "every rule is readable without installing anything" for this repository's own rules still stand.AGENTS.md, and whether they may land before the managed-section issue, is open in Making sure an agent actually loads the guidance.Partly superseded by Making sure an agent actually loads the guidance: Codex does not read nested
AGENTS.mdfiles from a session started at the root (it walks from the root down to the working directory), so the root carries a triggered pointer per nested file. "No.claude/rules" holds again until apm instructions move into a managed section of the rootAGENTS.md.