{
  "context": "Tests whether the agent understands cf-api route registration ordering, the webhook-before-body-parser requirement, and the middleware stack from the cf-api-endpoints docs.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Four-phase registration order",
      "description": "routes/index.ts registers routes in the correct order: (1) webhook routes, (2) body parser, (3) public routes, (4) protected routes. Webhook routes are explicitly before express.json().",
      "max_score": 30
    },
    {
      "name": "Webhook raw body explanation",
      "description": "A comment or explanation states that webhook routes need raw body access for signature verification (e.g., GitHub Octokit signature verification, Stripe webhook verification), and the JSON body parser would consume/parse the raw body before the webhook handler can access it.",
      "max_score": 20
    },
    {
      "name": "Protected route middleware",
      "description": "Deployment routes are registered in the protected phase (after body parser, with checkForValidAPIKey middleware). Routes use trackEndpointCalls and trackUsage middleware.",
      "max_score": 25
    },
    {
      "name": "Deployment routes structure",
      "description": "deployment.routes.ts exports a Router with POST /deploy/trigger, POST /deploy/status, and POST /deploy/rollback endpoints.",
      "max_score": 25
    }
  ]
}
