Skip to content

Commit 0ced83d

Browse files
committed
docs: agents keep pull requests small and follow the shared standard
AGENTS.md said little about conventions, validation or pull requests, so agents had to find docs/dev on their own. It now points to the Rust conventions and the shared engineering standard, says what to validate, and asks for small and focused pull requests, which a new pull request template prompts for too.
1 parent e60aae6 commit 0ced83d

3 files changed

Lines changed: 47 additions & 3 deletions

File tree

‎.github/pull_request_template.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!-- Title: a conventional commit that says what changes for whoever uses it, such as
2+
`fix(auth): app logout ends inline sessions and never blocks`. Keep the pull
3+
request to one change; stack dependent ones. -->
4+
5+
## What and why
6+
7+
<!-- What was wrong, what this changes, and the issue it closes ("Closes #123"). -->
8+
9+
## Testing
10+
11+
<!-- How you tested it, including what you didn't test (real devices, live providers). -->
12+
13+
## Checklist
14+
15+
- [ ] Every surface gets the feature: the CLI, settings, developer console, admin dashboard, SDKs and documentation.
16+
- [ ] `just validate` passes, plus `just db test` or the browser suite where the change can affect them.
17+
- [ ] Generated files are regenerated in the same commit.

‎AGENTS.md‎

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,30 @@ it to `None`) only with a documented reason next to its arm, as `PurgeUser` and
3838

3939
Generated files are committed; regenerate them with `just db prepare` (SQLx
4040
cache), `just sdk-vectors`, `just sdk-types` and `just docs reference` (the CLI
41-
and configuration references). `just validate` is the local
42-
check, and `just docs` checks the documentation.
41+
and configuration references).
42+
43+
## Conventions
44+
45+
Follow `docs/dev/rust-conventions.md`, which applies the shared
46+
[engineering standard](https://gist.github.com/PiquelChips/04330e52c03efbe9ce4c889c88673a27)
47+
to SourceOrigin, and `docs/dev/testing.md` for which tests to write.
48+
49+
## Validation
50+
51+
`just validate` (or `just` alone) formats the code and runs every check that
52+
needs no database or browser. Run it before handing work back, plus
53+
`just db test` when a change touches SQL or the database, and the browser
54+
suite when it changes a page, a script or a sign-in flow. While iterating, run
55+
only what you changed, such as `just test -p auth-service`. If a step cannot
56+
run, report the exact command and why.
57+
58+
## Issues, commits & pull requests
59+
60+
Issues live in GitHub Issues. Titles of issues and pull requests follow
61+
Conventional Commits and say what changes for whoever uses it; pull requests
62+
are squash-merged, so the title becomes the commit on `main`.
63+
64+
Keep pull requests small and focused: one change each, which a reviewer can
65+
read in one sitting. Split refactors from behaviour changes, and stack
66+
dependent pull requests, each on the last. Open them as drafts while
67+
iterating. `docs/dev/contributing.md` has the rest.

‎docs/dev/contributing.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ List a new generated file in `.gitattributes`, so GitHub collapses it in diffs.
4444

4545
## Pull requests
4646

47-
- Keep a pull request to one change. Stack dependent ones, each on the last.
47+
- Keep a pull request small and focused: one change, which a reviewer can read
48+
in one sitting. Split refactors from behaviour changes, and stack dependent
49+
ones, each on the last.
4850
- Title it as a [Conventional Commit](https://www.conventionalcommits.org) that
4951
says what changes for whoever uses it, such as
5052
`feat(auth): every account gets an inbox, so notices about it no longer live only in email`.

0 commit comments

Comments
 (0)