diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..59cda9b --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,53 @@ +# AGENTS.md + +**overpressure/matrix** holds the settings of [overpressure](https://github.com/overpressure/overpressure)'s Matrix +space and its rooms, as YAML in `config/`, and the tool (`matrix_space/`) that makes the space match them. Merged +changes are applied by the Space workflow; the Announce workflow posts each release and each new headset to the +Announcements room, once. Both run as the project's bot account. How it works: [README.md](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 + +Python 3.12 or newer through [uv](https://docs.astral.sh/uv/), from the repository root: + +```sh +uv sync # the tool, PyYAML, ruff and ty +uv run python -m matrix_space --check # every settings file valid, every icon in overpressure/brand +uv run python -m unittest # the tests, against a fake server +uv run ruff format --check . && uv run ruff check . && uv run ty check +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 +``` + +Talking to Matrix needs the bot's token (`MATRIX_ACCESS_TOKEN`): a run without `--apply` is a dry run +([running it locally](README.md#running-it-locally)). + +## Layout + +- `config/`: `space.yaml` (the space and its rooms in order), `defaults.yaml`, `people.yaml`, `rooms/` (one file + per room), `announcements.yaml`, `texts/` (pinned texts and the announcements' words) + ([the settings](README.md#the-settings)). +- `matrix_space/`: the tool (`__main__.py`, `plan.py`, `api.py`, `config.py`, `announce.py`, `login.py`, ...). + `tests/`: unittest with a fake server (`tests/fake.py`). +- `.github/workflows/`: `ci.yml` (checks), `space.yml` (applies the settings), `announce.yml` (posts) + ([the workflows](README.md#the-workflows)). + +## Hard rules + +- **The space changes only through this repository.** Never change it by hand or run `--apply` or `--create` + yourself unless a maintainer asks: merged settings are applied by the workflow, and the Monday check fails on + drift. +- **Rooms are never created blindly:** `--create` only after a dry run showed nothing was found (a room may exist + under another name). The tool never deletes, redacts, kicks or bans. +- **The token stays secret:** it is the `matrix` environment's secret, which only `main` deploys; never print, + log or commit it. +- A new headset's room needs its icon in [overpressure/brand](https://github.com/overpressure/brand) first + ([a new headset's room](README.md#a-new-headsets-room)). + +## Changes + +A branch and a pull request against `main`, titled as a conventional commit; merged by rebase or squash once `ci` +(settings, tests, lint, links and private data) passes and the code owners approved +([conventions](https://github.com/overpressure/overpressure/blob/main/docs/develop/conventions.md#changes)). 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