Appearance
Engineering rules — Index
Scope: all engineering rules for this project. One table per theme: each rule is one file, one decision.
Themes
- http-api — path operation functions, routers, dependency injection, response payloads
- streaming — streaming responses and the Vercel AI SDK data stream format
- validation-boundaries — request and response validation at the framework boundary
- error-handling — domain failures, structured errors, and HTTP error responses
- configuration-lifecycle — settings sources, application startup, and dependency cleanup
- observability — logging and request tracing through structured output
- security — secret handling and secrets in validation models
- testing-strategy — test layers, external seams, hypothesis properties, and quality gates
Rule index
| Theme | Rule | Status |
|---|---|---|
| http-api | 001 — Path operation functions stay thin | Approved |
| http-api | 002 — Route collaborators come from the container | Approved |
| http-api | 003 — Routers mount through the version and tag surface | Approved |
| http-api | 004 — Response payloads use the single annotation mechanism | Proposed |
| streaming | 001 — Use the framework's streaming encoding; never hand-encode the protocol | Approved |
| validation-boundaries | 001 — Define one boundary model per payload; map to internal types at the edge | Approved |
| error-handling | 001 — Raise domain errors, translate once at the boundary | Approved |
| configuration-lifecycle | 001 — Read settings in one pass; own startup and cleanup | Approved |
| observability | 001 — Log structured records with request context | Proposed |
| security | 001 — Secrets never sit in plain model fields | Approved |
| testing-strategy | 001 — Contract tests drive create_app; properties pin framework-facing behaviour | Approved |
| testing-strategy | 002 — Hypothesis, mocks, and the quality gates | Approved |