Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -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)).
1 change: 1 addition & 0 deletions CLAUDE.md