{
  "context": "Tests whether the agent correctly follows cf-api conventions for webhook registration order relative to body parser and uses the dependency injection testing pattern",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Webhook before body parser",
      "description": "The Stripe webhook route is registered in the Express app BEFORE the body parser middleware, so the raw body is available for signature verification. This is the most critical requirement from the code-style rules.",
      "max_score": 35
    },
    {
      "name": "DI testing pattern",
      "description": "Tests use setStripeDependencies() to inject mocks and resetStripeDependencies() in teardown, following the cf-api dependency injection convention rather than jest.mock() or similar",
      "max_score": 30
    },
    {
      "name": "Correct service architecture",
      "description": "Code is placed in js/cf-api/routes/, uses Prisma from common/ with require-style imports for the CommonJS module, and follows Express routing conventions",
      "max_score": 20
    },
    {
      "name": "ESLint and Prettier compliance",
      "description": "Code follows JS/TS style: ESLint + Prettier formatting, 100-char width without semicolons (cf-api config, not VSC-Extension config which uses 80 + semicolons)",
      "max_score": 15
    }
  ]
}
