From cc245bcdd8e8dfec14c58c619754496853ec837d Mon Sep 17 00:00:00 2001 From: Xenolphthalein <21215869+Xenolphthalein@users.noreply.github.com> Date: Thu, 3 Dec 2026 12:45:33 +0100 Subject: [PATCH 1/2] docs: AGENTS.md as the agents' guide, with CLAUDE.md a link to it For overpressure#124. --- AGENTS.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ CLAUDE.md | 1 + 2 files changed, 62 insertions(+) create mode 100644 AGENTS.md create mode 120000 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..81e4bf4 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,61 @@ +# AGENTS.md + +**overpressure/packages** holds the Arch packages that [overpressure](https://github.com/overpressure/overpressure) +builds for its headsets' system images, and each headset's image definition. The packages are arranged in layers: +`common/` (Valve's Frame userspace on any headset), `sm8250/` (the Snapdragon XR2), and one folder per headset +(`phoenix/`, `hollywood/`). Each folder in a layer is one recipe with its patches, files and tests. Releases publish +the built packages, so a headset's image build downloads them instead of compiling them. What it is: +[README.md](README.md); its documents: [docs/README.md](docs/README.md). + +The project's rules for issues, documents, code and changes: +[conventions](https://github.com/overpressure/overpressure/blob/main/docs/develop/conventions.md). + +## Setup and commands + +The checks need Python 3 and [uv](https://docs.astral.sh/uv/); a build needs Docker or Podman and runs as root in +overpressure's build image, pinned by digest ([building](docs/develop/building.md)): + +```sh +python3 -m unittest -v # the layout: layers, names, recipes' local sources, image definitions +python3 build/shellcheck.py # every tracked shell script, the recipes' too, down to its warnings +uvx ruff@0.17.4 format --check . && uvx ruff@0.17.4 check . && uvx ty@0.0.98 check +python3 build/sums.py LAYER/RECIPE # a recipe's checksums, after any change to its files +python3 build/versions.py check # every recipe changed since the release raised its version +python OVERPRESSURE/scripts/check-docs.py --repo . # links, AGENTS.md; OVERPRESSURE: a checkout of it +python OVERPRESSURE/scripts/check-private.py --repo . --history # nothing private in any commit +``` + +A build of a headset's layers is `bash build/packages.sh / WORKDIR OUTDIR` inside the build +image ([a build](docs/develop/building.md#a-build)); from a checkout of overpressure, +`python -m overpressure container run -- bash ...` runs the same image. + +## Layout + +- `common/`, `sm8250/`, `phoenix/`, `hollywood/`: the layers, one folder per recipe (`PKGBUILD` and its files). +- `headsets///`: a headset's image definition (`layers`, `pacman.conf`, `packages.txt`, + `packages.lock`) ([image definitions](docs/reference/image-definitions.md)). +- `build/`: the build (`packages.sh`), CI's plan and keys (`plan.py`), release notes, versions, checksums, + shellcheck. `tests/`: the checks. Every folder: [layout](docs/reference/layout.md). +- `docs/`: [develop](docs/develop/README.md) (building, releasing), [reference](docs/reference/README.md). + `out/`: build output, ignored. + +## Hard rules + +- **Private data.** Never commit vendor files, Valve's or PICO OS's files, device data or identifiers: a headset's + own files reach its system from the owner's headset at the install. Stage files by name, never `git add -A`. +- **The lowest layer that fits:** what any headset needs goes into `common/`, a SoC's into its layer, one headset's + into its folder. Each layer's folders have their own code owners ([CODEOWNERS](.github/CODEOWNERS)). +- **Pinned and checksummed:** a recipe pins its upstream by version and hash or by commit; after any change to its + local files, regenerate its sums (`build/sums.py`). A recipe changed since the newest release raises its + `pkgrel` (or `pkgver`) ([versions](docs/develop/releasing.md#versions)). Files stay LF: the checksums depend on it. +- **One build at a time:** builds share their build roots and caches. +- **Releases only by the workflow** (*Actions*, *Packages*, *Run workflow* on `main`); a tag pushed by hand + releases nothing, and released tags never move ([a release](docs/develop/releasing.md#a-release)). + +## Changes + +A branch and a pull request against `main`, titled as a conventional commit; merged by rebase or squash once `ci` +passes and the code owners of every changed path approved +([conventions](https://github.com/overpressure/overpressure/blob/main/docs/develop/conventions.md#changes)). CI +builds each changed package once, on its pull request ([how CI builds](docs/develop/releasing.md#how-ci-builds)). +A headset uses a release only once it moves its pin. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 120000 index 0000000..47dc3e3 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +AGENTS.md \ No newline at end of file From 91457885f39d626f219d65278cc7ee88d7a95970 Mon Sep 17 00:00:00 2001 From: Xenolphthalein <21215869+Xenolphthalein@users.noreply.github.com> Date: Thu, 3 Dec 2026 12:51:52 +0100 Subject: [PATCH 2/2] ci: AGENTS.md is checked, with CLAUDE.md a link to it, by overpressure's check-docs For overpressure#124. --- .github/workflows/packages.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index 90408b3..ed73b96 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -65,6 +65,12 @@ jobs: uvx ruff@0.17.4 format --check . uvx ruff@0.17.4 check . uvx ty@0.0.98 check + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: overpressure/overpressure + path: .overpressure + - name: The documents' links, and AGENTS.md with CLAUDE.md a link to it (overpressure's check-docs) + run: python3 .overpressure/scripts/check-docs.py --repo . - name: The workflows run: docker run --rm -v "$PWD:/repo" -w /repo rhysd/actionlint:1.7.12@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667 -color - name: The packages to build