.cargo/
crates/
scripts/
src/
.gitignore
30 B
.gitsigners
198 B
AGENTS.md
1.9 KiB
CONTRIBUTING
1.7 KiB
Cargo.lock
5.4 KiB
Cargo.toml
1.9 KiB
LICENSE
1.1 KiB
README.md
245 B
STYLE
3.7 KiB
clippy.toml
213 B
AGENTS.md
raw
| 1 | # AGENTS |
| 2 | |
| 3 | Before implementing a code change, check the `STYLE` guide. |
| 4 | After you're done implementing a code or test change, run: |
| 5 | |
| 6 | scripts/check |
| 7 | |
| 8 | To ensure that everything's in a good place. |
| 9 | Fix any warnings or errors surfaced by these tools. |
| 10 | |
| 11 | When modifying only documentation files, such as Markdown or plain text files, |
| 12 | do not run the check. |
| 13 | |
| 14 | If asked to commit, check the `CONTRIBUTING` file. In general, don't commit |
| 15 | on the `master` branch, but feel free to commit on other branches. |
| 16 | |
| 17 | When modifying code, keep these things in mind: |
| 18 | |
| 19 | 1. Adding lots of new code to fix an issue is almost always wrong. |
| 20 | 2. Removing code to fix an issue is almost always right. |
| 21 | 3. Code has a cost of maintenance and prefer changing existing |
| 22 | code rather than adding new code. |
| 23 | 4. All code added should be written in the most performant way, if |
| 24 | that doesn't result in more code. |
| 25 | |
| 26 | And follow these rules: |
| 27 | |
| 28 | * NEVER add a new dependency to Cargo.toml without first asking me. |
| 29 | * ALWAYS document top-level symbols, even the private ones. |
| 30 | * ALWAYS document struct fields and enum variants, even the private ones. |
| 31 | * ALWAYS use the existing repository command helper to invoke Git when one is available. |
| 32 | * ALWAYS structure human-facing terminal output with the existing UI primitives |
| 33 | (`Table`, `VStack`, `HStack`, `Line`, labels, and related renderable types) |
| 34 | instead of hand-aligning text with ad hoc spacing. |
| 35 | * Always do things the proper, idiomatic, robust way. NO HACKS. |
| 36 | * After the tests pass, run the benchmarks for the crate to ensure no regressions. |
| 37 | * Don't use unicode characters in comments, outside of diagrams. |
| 38 | * NEVER perform destructive actions if I ask a question that ends in a question |
| 39 | mark `?`. |
| 40 | |
| 41 | When modifying tests: |
| 42 | |
| 43 | * NEVER add assertions whose purpose is to reject a previous implementation's |
| 44 | output or behavior. Tests should assert the current required behavior and |
| 45 | externally meaningful invariants, not historical states. |