docs: add code-design principles and link from AGENTS.md (#199)

Add docs/code-design.md with seven cross-cutting principles for
avoiding overengineering (one way to say one thing, behavior follows
from inputs, failures must reach a decision-maker, no seams without a
second consumer, spec-and-behavior drift, verify the path you fixed,
naming asymmetries). Reference it from AGENTS.md with the same weight
as in-file MUST/MUST NOT rules, mirroring the docs/terminology.md
pattern.
This commit is contained in:
Andrey Avtomonov 2026-05-21 14:33:27 +02:00 committed by GitHub
parent 1c7131c6c2
commit a1cfb03d73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 102 additions and 0 deletions

View file

@ -145,6 +145,17 @@ file instead of rerunning to apply different filters:
pnpm run test 2>&1 | tee /tmp/ktx-test-output.log
```
## Avoiding Overengineering
For the code-design principles agents must apply when writing or changing
behavior — one way to say one thing, behavior follows from inputs (not
from which path the caller took), failures must reach a decision-maker,
don't build seams without a second piece on the other side, specification
and behavior are one artifact, verify the path you claim to have fixed,
and naming asymmetries are bugs in waiting — see
[`docs/code-design.md`](docs/code-design.md). Treat the `MUST` / `MUST NOT`
rules there with the same weight as the ones in this file.
## TypeScript Standards
- Use Node 22+ and pnpm workspace commands.