repo-conventions

What every repository must contain, how it is laid out, how its tools are pinned and how its scripts are placed. Use when creating a repository, auditing one against the baseline, or deciding where a

SKILL.md

GitHub

Repository conventions

The baseline every repository follows, independent of language.

When to use

  • Creating a repository, or bringing an existing one up to the baseline.
  • Deciding where a file, a script or a document belongs.
  • A tool version differs between a machine and CI.

Rules

Required files

  • README.md: what the repository is, quick start, configuration, development, releasing.
  • AGENTS.md: layout, the commands that verify a change, and this repository's own constraints. Repository specific only, the baseline already applies. Deviations from this baseline go under ## Deviations, one line each with the reason. A CLAUDE.md holding @AGENTS.md sits next to it until every agent reads AGENTS.md on its own. Size limits and placement: agents-md.
  • LICENSE: Apache-2.0 for a new repository, with a license header in every source file.
  • .editorconfig and .gitignore, kept current by hand until a shared generator exists.
  • mise.toml pinning every tool. .agent-skills.json is optional, absent means defaults.
  • Taskfile.yaml over a Makefile. One task target per check, lint:<tool>, test:<suite>, validate, plus fmt and build where they apply. A check target may aggregate the small targets and holds no command of its own. CI calls the small targets, never check. An existing repository keeps whatever task runner it already has.
  • renovate.json, referencing the organisation's shared preset where one exists.
  • release-me.yaml for anything that is released, release-please-config.json and .release-please-manifest.json where a repository still runs release-please instead. CHANGELOG.md is generated by the release tool and never hand edited.
  • .github/workflows/ with one file per purpose, named after what it checks or releases, for example lint.yaml and test.yaml rather than one ci.yaml. See ci-conventions.
  • Every YAML file ends in .yaml wherever the tool reading it accepts that extension. Known exceptions: .github/FUNDING.yml and .github/dependabot.yml, where GitHub reads only that exact name.

Layout

  • docs/adr/NNNN-title.md for decision records, docs/concepts/<feature>.md for concept docs. Neither directory exists ahead of time. A skill creates it with the first record it writes, not as part of repository setup.
  • docs/ for everything else a user or an operator needs to read.
  • No generated artifact in git unless a consumer needs it there, and then it is marked generated and checked in CI.

Deviations

  • One line per ## Deviations entry in AGENTS.md: the convention it drops or changes, then the reason.
  • Read that heading before creating files the baseline describes. An entry that drops a convention skips the step, and the skill says so. No entry means the baseline applies in full.

Tooling (development environment)

  • mise.toml is the only source of tool versions. Pin to the minor version the repository is tested with. No latest. Pin to the patch where one tool is coupled to another's version.
  • mise is the only installer. Never go install, go get -tool, npx, pipx or curl | sh, in a task, in CI or by hand. A tool missing from the mise registry is named, with an alternative proposed instead of reaching for another installer.
  • A tool needed on every machine rather than in one repository is Homebrew's job, installed by a human, not by an agent.
  • mise install is the single setup command. It is documented in the README.

CI

  • CI installs the same tool versions from the same mise.toml, through the mise GitHub Action, so no tool version is duplicated into a workflow file.
  • CI runs the same task targets a human runs locally. No logic exists only in the workflow.
  • A missing tool fails the job with a clear message instead of being installed ad hoc.

Scripts

  • Ask the generic question every time a script is touched: could another repository use it with different inputs. If yes it belongs in the organisation's shared scripts repository, not here.
  • A script needed only by this repository, for example one reading this repository's own output, stays in its scripts/ and is documented in the README. Never copy a script between repositories, move it and point the caller at the moved one.
  • Scripts only where they earn it: run repeatedly, complex logic, or needed by CI.
  • A throwaway script deleted in the same task lives in the session's scratch directory, outside every repository and worktree. Never in scripts/ or the shared scripts repository.
  • No inline interpreter one liner that will run again, and never one that spans lines.
  • A check that only asserts a convention is not a script. See conformance-checks.
  • A check script past one screen means the wrong tool, or none was searched for. Search for an existing tool before building anything that checks, validates or lints.

Settings and labels

  • Repository and organisation settings, rulesets, secrets and labels are infrastructure as code in the organisation's infrastructure repository. Never change them with a CLI or a web interface. See github-as-code for turning a setting into committed configuration.
  • A label missing on the tracker is reported. Skills never create one.

Scope

  • One repository has one purpose. A part that grows its own features, documentation and release cycle gets extracted into its own repository.

Guardrails

  • Never hand edit CHANGELOG.md or a release tool's own state file.
  • Never add a second task runner next to an existing one.
  • Never change a repository or organisation setting outside its infrastructure repository.
  • Never create docs/adr or docs/concepts ahead of a record.
  • Never override a ## Deviations entry.

Config

  • verify: command that proves a change is good. Default: task check when a Taskfile exists, else detected.
  • iac: infrastructure as code tool. Default: opentofu.
  • docs.adr: path for decision records. Default: docs/adr.
  • docs.concepts: path for concept docs. Default: docs/concepts.

References

  • conformance-checks for a rule that belongs in a declarative suite rather than a script.
  • secrets-handling for what never belongs in any of these files.
  • github-as-code for repository and organisation settings as committed configuration.
  • ci-conventions for how a workflow file inside .github/workflows/ is named and shaped.