Skip to content

Commit c4bedbd

Browse files
committed
changelog rules
1 parent a47ec92 commit c4bedbd

2 files changed

Lines changed: 26 additions & 2 deletions

File tree

AGENT_REQUIREMENTS.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,27 @@ Its machine-readable counterpart [`docs/openapi.yaml`](docs/openapi.yaml) is **g
2626

2727
README files are entry points only: keep a short service definition, links to canonical specs, config locations/variables, and maintenance commands such as run/test/deploy. Do not put implementation details in README files. Functional requirements belong in `docs/api-spec.md`; implementation details belong in `docs/tech-specs/` (`read-api.md`, `write-api.md`, `indexer.md`, `auth.md`); schema details belong in `docs/tech-specs/data-schema.md`.
2828

29+
## Changelog
30+
31+
Every branch opened as a pull request into `dev` must describe its diff against `dev` in [`CHANGELOG.md`](CHANGELOG.md). No PR is complete without it.
32+
33+
Entries are **date-based, newest first** — add yours under today's date, creating the `## [YYYY-MM-DD]` heading if it is not there yet, grouped under `Breaking Changes` / `Added` / `Changed` / `Fixed` / `Removed`. Dates, not release numbers, are the unit here precisely because nobody knows at merge time which release the change ships in. Do not invent a version heading and do not bump `version` in any `Cargo.toml` — if a release number is ever assigned, a human does it at release time. Entries under a past date are history: do not rewrite them or append to them.
34+
35+
### Write for the reader, not for the author
36+
37+
The reader is a devops engineer or a developer who runs DEX.DO and integrates with it. They did not write the code and will not read it. Describe the surface they can observe, briefly — a few lines, not a commit dump:
38+
39+
- **REST API**: routes, query/body parameters, response DTOs, pagination and filter semantics, error codes. (The contract itself lives in [`docs/api-spec.md`](docs/api-spec.md); the changelog says what moved.)
40+
- **On-chain behaviour**: contract entrypoints, events and their external ids, ABI changes, renamed getters/errors, code-hash re-pins.
41+
- **Indexer behaviour**: what is ingested and what is not, projectors, cursors, backfill and reconciliation semantics.
42+
- **Storage**: Postgres schema, indexes, migrations — and whether a migration has to be run.
43+
- **Operations**: config files and environment variables, `docker-compose*.yml`, `deploy/`, `Makefile` targets, exported metrics, dashboards and alerts an operator would page on.
44+
- **SDK**: the public surface under `sdk/`.
45+
46+
Say what changed and what the reader has to do about it — run a migration, carry a setting over by hand, switch to a new field, redeploy a contract, re-pin a code hash. Name routes, fields, events, tables and options exactly as they appear in the product.
47+
48+
Leave out internal refactors, private renames, test-only changes and implementation detail. If nothing observable changed, there is nothing to write.
49+
2950
## Before every `git commit`
3051

3152
Re-read **every** file under `docs/`, the root [`README.md`](README.md), and the `README.md` of every touched component, then update each one the staged diff invalidates. Default is "check all"; only skip a doc after re-reading it and confirming it is unaffected.

CONTRIBUTING.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,9 @@ not optional and not narrowable to "the obviously relevant doc."
334334
2. Keep the change **scoped to what was asked** — a focused PR beats a sprawling
335335
one ([`AGENT_REQUIREMENTS.md`](AGENT_REQUIREMENTS.md#avoid-perfectionism)).
336336
3. Green locally: fmt, clippy, tests, doctests, and OpenAPI drift (above).
337-
4. Add a [`CHANGELOG.md`](CHANGELOG.md) entry under today's date if the change is
338-
user-visible.
337+
4. Add a [`CHANGELOG.md`](CHANGELOG.md) entry under today's date describing the
338+
branch's diff against `dev` — written for a devops engineer or a developer who
339+
runs DEX.DO, not for the author. What counts as observable, and what to leave
340+
out, is in
341+
[`AGENT_REQUIREMENTS.md`](AGENT_REQUIREMENTS.md#write-for-the-reader-not-for-the-author).
339342
5. Run the doc sweep and commit doc updates **in the same commit** as the code.

0 commit comments

Comments
 (0)