Update `AGENTS.md`
1968b7e7bdb3792556eafe3c50e92b3f5d5f46cf
1 parent
28fe7a9e
AGENTS.md
+8 -0
| 14 | 14 | do not run the Rust formatting, linting, test, or documentation-generation |
|
| 15 | 15 | commands. |
|
| 16 | 16 | ||
| 17 | 17 | When modifying code: |
|
| 18 | 18 | ||
| 19 | + | * Understand that adding lots of new code to fix an issue is almost always wrong. |
|
| 20 | + | * Understand that removing code to fix an issue is almost always right. |
|
| 21 | + | * Understand that code has a cost of maintenance and prefer changing existing |
|
| 22 | + | code rather than adding new code. |
|
| 23 | + | * Understand that all code added should be written in the most performant way, if |
|
| 24 | + | that doesn't result in more code. |
|
| 25 | + | ||
| 19 | 26 | * NEVER add a new dependency to Cargo.toml without first asking me. |
|
| 20 | 27 | * ALWAYS document top-level symbols, even the private ones. |
|
| 21 | 28 | * ALWAYS document struct fields and enum variants, even the private ones. |
|
| 22 | 29 | * ALWAYS structure human-facing terminal output with the existing UI primitives |
|
| 23 | 30 | (`Table`, `VStack`, `HStack`, `Line`, labels, and related renderable types) |
|
| 24 | 31 | instead of hand-aligning text with ad hoc spacing. |
|
| 25 | 32 | * Always do things the proper, idiomatic, robust way. NO HACKS. |
|
| 33 | + | * After the tests pass, run the benchmarks for the crate to ensure no regressions. |
|
| 26 | 34 | ||
| 27 | 35 | When modifying tests: |
|
| 28 | 36 | ||
| 29 | 37 | * NEVER add assertions whose purpose is to reject a previous implementation's |
|
| 30 | 38 | output or behavior. Tests should assert the current required behavior and |