What problem does it solve? Go backends need cross-cutting concerns like signature verification, API key auth, and session resolution to run before controllers, but inconsistent middleware implementations lead to rejected requests falling through, raw error responses, and misplaced business logic. ## Core Features & Use Cases - Standard Middleware Shape: Generates factory functions returning func(next http.Handler) http.Handler that capture config like secrets or DB clients via closures. - Guard and Enrichment Patterns: Covers rejecting middlewares (HMAC signature, API key) and pass-through enriching middlewares (session cookie to X-Owner-Id header injection). - Wiring and Placement Rules: Attaches middlewares via ControllerMetadata.Middlewares per controller or at router level, with clear shared vs context-local directory conventions. - Use Case: When adding a webhook endpoint that receives transcoder callbacks, generate a VerifyTranscoderSignature middleware that rejects invalid signatures with a typed 401 error before the controller runs. ## Quick Start Ask the agent to create a Go HTTP middleware that validates an API key header and wires it into the controller metadata for your endpoint.