{
  "slug": "modules/feature-flags",
  "title": "Feature Flags module",
  "description": "Rollout rules, cohort targeting, kill switches, and SDK-side local evaluation.",
  "url": "https://cuitty.com/docs/modules/feature-flags",
  "markdown_url": "https://cuitty.com/docs/modules/feature-flags.md",
  "json_url": "https://cuitty.com/docs/modules/feature-flags.json",
  "frontmatter": {
    "title": "Feature Flags module",
    "description": "Rollout rules, cohort targeting, kill switches, and SDK-side local evaluation.",
    "order": 11,
    "section": "Modules",
    "updatedAt": "2026-05-07"
  },
  "headings": [
    {
      "depth": 1,
      "slug": "feature-flags-module",
      "text": "Feature Flags module"
    },
    {
      "depth": 2,
      "slug": "evaluation",
      "text": "Evaluation"
    },
    {
      "depth": 2,
      "slug": "api",
      "text": "API"
    }
  ],
  "body_markdown": "# Feature Flags module\n\nThe feature-flags module manages flag definitions, rollout percentages, cohort gates, kill switches, and transactional history.\n\n## Evaluation\n\nSDK helpers evaluate locally using the same rule as the server:\n\n1. Killed flags return false.\n2. Disabled flags return false.\n3. Non-empty cohort dimensions must match the evaluation context.\n4. Percentage rollouts use SHA-256 of `flagKey:userId`, bucketed into 0-99.\n\n## API\n\n| Endpoint | Returns |\n| --- | --- |\n| `GET /api/flags/status` | Module health |\n| `GET /api/flags?project_id=...` | Flags for a project |\n| `GET /api/flags/{key}?project_id=...` | A single flag |\n| `GET /api/flags/stream?project_id=...` | Server-sent update stream |\n\nProduct page: [Feature Flags](/product/modules/feature-flags).",
  "body_html": "<h1 id=\"feature-flags-module\">Feature Flags module</h1>\n<p>The feature-flags module manages flag definitions, rollout percentages, cohort gates, kill switches, and transactional history.</p>\n<h2 id=\"evaluation\">Evaluation</h2>\n<p>SDK helpers evaluate locally using the same rule as the server:</p>\n<ol>\n<li>Killed flags return false.</li>\n<li>Disabled flags return false.</li>\n<li>Non-empty cohort dimensions must match the evaluation context.</li>\n<li>Percentage rollouts use SHA-256 of <code>flagKey:userId</code>, bucketed into 0-99.</li>\n</ol>\n<h2 id=\"api\">API</h2>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<table><thead><tr><th>Endpoint</th><th>Returns</th></tr></thead><tbody><tr><td><code>GET /api/flags/status</code></td><td>Module health</td></tr><tr><td><code>GET /api/flags?project_id=...</code></td><td>Flags for a project</td></tr><tr><td><code>GET /api/flags/{key}?project_id=...</code></td><td>A single flag</td></tr><tr><td><code>GET /api/flags/stream?project_id=...</code></td><td>Server-sent update stream</td></tr></tbody></table>\n<p>Product page: <a href=\"/product/modules/feature-flags\">Feature Flags</a>.</p>",
  "links_out": [
    "/product/modules/feature-flags"
  ]
}