Skip to content

Commit da1f3d4

Browse files
authored
docs: extend AGENTS.md backwards-compatibility and commit guidance (#6577)
* mark new classes `@internal` by default * clarify that commit message rules also apply to PR titles * warn against bare `@name` tokens in commit messages
1 parent ace3103 commit da1f3d4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ All core classes use the `rex_` prefix (e.g., `rex_sql`, `rex_addon`, `rex_file`
7373
- PHPStan level 6 + Psalm level 1, both with baselines in `.tools/phpstan/` and `.tools/psalm/`
7474
- PHPUnit strict mode: warnings, notices, deprecations all fail the build
7575
- In YAML files, prefer single quotes when quoting is needed
76-
- Comments and commit messages in English; commits use conventional commits (`feat:`, `fix:`, `refactor:`, `docs:`, `chore:`, `test:`, `style:`, `ci:`)
76+
- Comments and commit messages in English; commits use conventional commits (`feat:`, `fix:`, `refactor:`, `docs:`, `chore:`, `test:`, `style:`, `ci:`). The same rules (English + conventional commit prefix) apply to PR titles, since they become the commit message on squash merge
77+
- Don't write bare `@name` tokens in commit messages (e.g. annotations like `@internal`/`@deprecated`, or anything that looks like a username): GitHub autolinks them into user mentions and pings a random account. Wrap them in backticks (`` `@internal` ``) — GitHub renders code spans in commit messages and doesn't link mentions inside them
7778

7879
### Baselines
7980
The static analysis baselines exist to grandfather pre-existing issues. **New code must not add to the baselines** — fix the issue instead. Only regenerate baselines (`composer baseline`) when intentionally accepting new findings, and call that out in the PR.
@@ -85,4 +86,5 @@ REDAXO has a large addon ecosystem; public APIs are part of the contract:
8586
- Don't change signatures, remove public methods, or rename public classes/constants on the `5.x` branch — deprecate via `@deprecated` and keep a working shim.
8687
- `@internal`-marked symbols may change without notice.
8788
- New parameters on public methods must be optional.
89+
- Mark new classes `@internal` by default. Only omit it when the class is deliberately part of the public API. In that case, review every public property, constant, and method individually and mark `@internal` each one that isn't meant to be a public contract — public visibility alone shouldn't lock you into supporting it.
8890
- DB schema changes belong in the relevant addon's install/update path.

0 commit comments

Comments
 (0)