Skip to content

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 ​

ThemeRuleStatus
http-api001 — Path operation functions stay thinApproved
http-api002 — Route collaborators come from the containerApproved
http-api003 — Routers mount through the version and tag surfaceApproved
http-api004 — Response payloads use the single annotation mechanismProposed
streaming001 — Use the framework's streaming encoding; never hand-encode the protocolApproved
validation-boundaries001 — Define one boundary model per payload; map to internal types at the edgeApproved
error-handling001 — Raise domain errors, translate once at the boundaryApproved
configuration-lifecycle001 — Read settings in one pass; own startup and cleanupApproved
observability001 — Log structured records with request contextProposed
security001 — Secrets never sit in plain model fieldsApproved
testing-strategy001 — Contract tests drive create_app; properties pin framework-facing behaviourApproved
testing-strategy002 — Hypothesis, mocks, and the quality gatesApproved

You own what ships.