Everything in this repository so far was committed through the Gitea API, which skips the pre-commit hooks: four lint failures (a 166-character line, shellcheck SC2155, two --strict yamllint warnings) reached CI after the push instead of being caught at commit time. This sets up the normal way of working: a local clone, where git commit runs the hooks.
Change
scripts/dev-setup.sh: creates .venv with the pinned tools (requirements-dev.txt, the versions CI runs), runs pre-commit install --install-hooks, and puts the virtualenv first on PATH inside the installed pre-commit and commit-msg hook scripts. Without that the language: system hooks (REUSE, changelog lint, ansible-lint) fail on a plain git commit with FileNotFoundError: 'reuse'; found while testing in a fresh clone. Idempotent (a marker line per hook), shellcheck-clean.
CLAUDE.md: the rules of the repository for Claude Code: commit with git so the hooks run, feature branches with protected main and tags, the workflow rules (no pull_request_target, no secrets on pull_request, values through env:), how the images are versioned and pinned (never-moved version tag, image:<version>@sha256:<digest>), and the 100 MB layer limit. Written for a repository that will be public: no addresses, no host names beyond the public Gitea.
CONTRIBUTING.md: points at the script.
Verified
Ran the script in a fresh clone, twice (idempotent). With the virtualenv deliberately not on PATH, a plain git commit ran REUSE and passed it, and rejected a non-conventional message; no commit was created.
This PR's own commit went through the hooks: secrets scan, REUSE and Conventional Commits passed (the other hooks had no matching files).
Not verified
Whether Claude Code loads this CLAUDE.md when working from a parent directory (the documentation says subdirectory CLAUDE.md files load on demand; whether that holds for a nested clone is not documented). I will check once this is merged.
## Why
Everything in this repository so far was committed through the Gitea API, which skips the pre-commit hooks: four lint failures (a 166-character line, shellcheck SC2155, two `--strict` yamllint warnings) reached CI after the push instead of being caught at commit time. This sets up the normal way of working: a local clone, where `git commit` runs the hooks.
## Change
- **`scripts/dev-setup.sh`**: creates `.venv` with the pinned tools (`requirements-dev.txt`, the versions CI runs), runs `pre-commit install --install-hooks`, and puts the virtualenv first on `PATH` inside the installed `pre-commit` and `commit-msg` hook scripts. Without that the `language: system` hooks (REUSE, changelog lint, ansible-lint) fail on a plain `git commit` with `FileNotFoundError: 'reuse'`; found while testing in a fresh clone. Idempotent (a marker line per hook), shellcheck-clean.
- **`CLAUDE.md`**: the rules of the repository for Claude Code: commit with git so the hooks run, feature branches with protected `main` and tags, the workflow rules (no `pull_request_target`, no secrets on `pull_request`, values through `env:`), how the images are versioned and pinned (never-moved version tag, `image:<version>@sha256:<digest>`), and the 100 MB layer limit. Written for a repository that will be public: no addresses, no host names beyond the public Gitea.
- **`CONTRIBUTING.md`**: points at the script.
## Verified
- Ran the script in a fresh clone, twice (idempotent). With the virtualenv deliberately **not** on `PATH`, a plain `git commit` ran REUSE and passed it, and rejected a non-conventional message; no commit was created.
- This PR's own commit went through the hooks: secrets scan, REUSE and Conventional Commits passed (the other hooks had no matching files).
## Not verified
Whether Claude Code loads this `CLAUDE.md` when working from a parent directory (the documentation says subdirectory `CLAUDE.md` files load on demand; whether that holds for a nested clone is not documented). I will check once this is merged.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
dev-setup.sh creates the virtualenv with the pinned tools and installs the git
hooks with the virtualenv first on PATH inside the hook scripts. Without that,
the language: system hooks (REUSE, changelog lint, ansible-lint) fail with
"No such file or directory: 'reuse'" on a plain `git commit`; found while testing
the hooks in a fresh clone.
CLAUDE.md records the rules of the repository for Claude Code: commit with git
so the hooks run (the Gitea API skips them, which let four lint failures reach
CI), feature branches and protected main/tags, the workflow rules, how the
images are versioned and pinned, and the 100 MB layer limit. It is written for
a repository that will be public: no addresses, no host names beyond the
public Gitea.
CONTRIBUTING.md points at the script.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why
Everything in this repository so far was committed through the Gitea API, which skips the pre-commit hooks: four lint failures (a 166-character line, shellcheck SC2155, two
--strictyamllint warnings) reached CI after the push instead of being caught at commit time. This sets up the normal way of working: a local clone, wheregit commitruns the hooks.Change
scripts/dev-setup.sh: creates.venvwith the pinned tools (requirements-dev.txt, the versions CI runs), runspre-commit install --install-hooks, and puts the virtualenv first onPATHinside the installedpre-commitandcommit-msghook scripts. Without that thelanguage: systemhooks (REUSE, changelog lint, ansible-lint) fail on a plaingit commitwithFileNotFoundError: 'reuse'; found while testing in a fresh clone. Idempotent (a marker line per hook), shellcheck-clean.CLAUDE.md: the rules of the repository for Claude Code: commit with git so the hooks run, feature branches with protectedmainand tags, the workflow rules (nopull_request_target, no secrets onpull_request, values throughenv:), how the images are versioned and pinned (never-moved version tag,image:<version>@sha256:<digest>), and the 100 MB layer limit. Written for a repository that will be public: no addresses, no host names beyond the public Gitea.CONTRIBUTING.md: points at the script.Verified
PATH, a plaingit commitran REUSE and passed it, and rejected a non-conventional message; no commit was created.Not verified
Whether Claude Code loads this
CLAUDE.mdwhen working from a parent directory (the documentation says subdirectoryCLAUDE.mdfiles load on demand; whether that holds for a nested clone is not documented). I will check once this is merged.🤖 Generated with Claude Code