docs: update AGENTS.md and dev docs (#39976)

Agents rarely read the `docs` guides when AGENTS.md only asks for
relevant ones. AGENTS.md now names the guide for each area, and rules
agents kept missing go into those guides.

- AGENTS.md maps Go, TS, CSS, Vue, templates, tests, config options,
migrations and refactors to their guide
- The backend guide lists XORM pitfalls behind recent bugs
(https://gitea.com/xorm/xorm/issues/2615): zero-valued struct
conditions, `Cols` and `updated` columns on updates, soft-delete values,
index drops by `SyncAllTables`, MSSQL limits and pagination order
- The development guide requires a `WIP:` companion docs PR copying the
ini text verbatim for `app.example.ini` changes, and says to avoid
migrations unless the alternative is a workaround
This commit is contained in:
silverwind authored and GitHub committed 2026-10-24 22:36:27 +00:00
1 parent 8abda62312
commit ff68b39c93
3 files changed
+18 -2

No files matched your search

+4 -1
View File
@@ -105,10 +105,13 @@ When adding configuration options it is not enough to add them to the
[`custom/conf/app.example.ini`](../custom/conf/app.example.ini), and document them in
the [configuration cheat sheet](https://docs.gitea.com/administration/config-cheat-sheet),
which lives in the [documentation repository](https://gitea.com/gitea/docs).
Every `app.example.ini` change needs a companion PR there that copies the ini text
verbatim into every affected version's cheat sheet, translated where feasible, with a
`WIP:` title prefix until the Gitea PR merges.
## Database migrations
If you make breaking changes to a database-persisted struct under `models/`, add a
Avoid migrations unless the alternative is a workaround. If you make breaking changes to a database-persisted struct under `models/`, add a
new migration in `modelmigration/`. See [testing.md](testing.md#migration-tests)
for running the migration tests.