From 2b149eab1c53b69ffe8da222981460f0b60e0845 Mon Sep 17 00:00:00 2001 From: dbastrikin Date: Sat, 21 Mar 2026 13:09:56 +0200 Subject: [PATCH] docs: add backend README sync rule to CLAUDE.md Co-Authored-By: Claude Sonnet 4.6 --- CLAUDE.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 80d51b7..80270f6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -92,6 +92,23 @@ This rule applies to all languages in this repo (Go and Dart). In Go, name variables to avoid shadowing the `error` built-in and the `context` package — use descriptive prefixes: `parseError`, `requestContext`, etc. +## Backend Documentation + +**Rule:** `backend/README.md` must stay in sync with the code. When making backend changes, +update the README if the change affects any of the following: + +- **Stack or dependencies** — new or removed libraries +- **Environment variables** — new, renamed, or removed variables +- **API endpoints** — new routes, changed paths or methods, removed endpoints +- **Makefile targets** — new or removed `make` commands +- **Project structure** — new top-level packages under `cmd/`, `internal/domain/`, + `internal/adapters/`, or `internal/infra/` +- **Database schema** — new tables added to the high-level table list +- **Import tools** — changes to `cmd/importoff` flags or behaviour + +The README does **not** need updating for: internal refactoring that doesn't change the +public interface, bug fixes, test changes, or minor logic tweaks inside existing packages. + ## Flutter Client Localisation **Rule:** Every UI string in `client/` must go through `AppLocalizations`.