Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

63.2 KB
Raw Blame
# Product-scoped guards against calling a product's own endpoints through the
# `api` singleton in frontend/src/lib/api.ts instead of the product's generated
# client.
#
# DO NOT EDIT THE GENERATED BLOCK BY HAND. It is the mechanical output of
# `hogli lint:api-ratchet --write-semgrep`, which derives each product's
# namespaces from api.ts and the generated clients. `hogli lint:api-ratchet`
# fails when the block here disagrees with that output.
#
# One rule per product, rather than one rule listing every namespace: a call on
# another product's namespace, such as conversations calling api.comments, is
# legitimate, and a global list would block it. Each rule also covers core code
# under frontend/src, which owns no product namespace. A scene that moves into its
# product keeps the same rule id, so the baseline diff does not report it as new.
# A namespace several products share gets one shared rule over those products and
# core instead, so a call on it is reported once, not once per owner.
#
# WARNING severity, so the backlog prints without failing and the devex job's
# --baseline-commit pass blocks only the calls a pull request adds. See
# .semgrep/rules/devex/README.md.
rules:
    # --- generated by `hogli lint:api-ratchet --write-semgrep` ---
    - id: prefer-codegen-api-namespaced-actions
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a actions namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/actions/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen actions` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-actions`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.actions.$METHOD(...)
          - pattern: api.actions.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/actions/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-ai_observability
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a ai_observability namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/ai_observability/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen ai_observability` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-ai_observability`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.aiObservability.$METHOD(...)
          - pattern: api.aiObservability.$MEMBER.$METHOD(...)
          - pattern: api.evaluationRuns.$METHOD(...)
          - pattern: api.evaluationRuns.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/ai_observability/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-alerts
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a alerts namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/alerts/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen alerts` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-alerts`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.alerts.$METHOD(...)
          - pattern: api.alerts.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/alerts/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-annotations
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a annotations namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/annotations/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen annotations` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-annotations`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.annotations.$METHOD(...)
          - pattern: api.annotations.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/annotations/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-batch_exports
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a batch_exports namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/batch_exports/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen batch_exports` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-batch_exports`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.batchExports.$METHOD(...)
          - pattern: api.batchExports.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/batch_exports/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-cdp
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a cdp namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/cdp/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen cdp` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-cdp`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.hogFunctions.$METHOD(...)
          - pattern: api.hogFunctions.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/cdp/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-cohorts
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a cohorts namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/cohorts/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen cohorts` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-cohorts`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.cohorts.$METHOD(...)
          - pattern: api.cohorts.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/cohorts/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-conversations
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a conversations namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/conversations/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen conversations` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-conversations`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.conversationsTickets.$METHOD(...)
          - pattern: api.conversationsTickets.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/conversations/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-customer_analytics
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a customer_analytics namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/customer_analytics/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen customer_analytics` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-customer_analytics`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.customerJourneys.$METHOD(...)
          - pattern: api.customerJourneys.$MEMBER.$METHOD(...)
          - pattern: api.customerProfileConfigs.$METHOD(...)
          - pattern: api.customerProfileConfigs.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/customer_analytics/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-dashboards
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a dashboards namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/dashboards/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen dashboards` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-dashboards`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.dashboardTemplates.$METHOD(...)
          - pattern: api.dashboardTemplates.$MEMBER.$METHOD(...)
          - pattern: api.dashboards.$METHOD(...)
          - pattern: api.dashboards.$MEMBER.$METHOD(...)
          - pattern: api.dataColorThemes.$METHOD(...)
          - pattern: api.dataColorThemes.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/dashboards/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-data_modeling
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a data_modeling namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/data_modeling/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen data_modeling` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-data_modeling`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.dataModelingEdges.$METHOD(...)
          - pattern: api.dataModelingEdges.$MEMBER.$METHOD(...)
          - pattern: api.dataModelingNodes.$METHOD(...)
          - pattern: api.dataModelingNodes.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/data_modeling/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-data_warehouse
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a data_warehouse namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/data_warehouse/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen data_warehouse` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-data_warehouse`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.dataModelingJobs.$METHOD(...)
          - pattern: api.dataModelingJobs.$MEMBER.$METHOD(...)
          - pattern: api.dataWarehouseManagedViewsets.$METHOD(...)
          - pattern: api.dataWarehouseManagedViewsets.$MEMBER.$METHOD(...)
          - pattern: api.dataWarehouseSavedQueries.$METHOD(...)
          - pattern: api.dataWarehouseSavedQueries.$MEMBER.$METHOD(...)
          - pattern: api.dataWarehouseSavedQueryDrafts.$METHOD(...)
          - pattern: api.dataWarehouseSavedQueryDrafts.$MEMBER.$METHOD(...)
          - pattern: api.dataWarehouseSavedQueryFolders.$METHOD(...)
          - pattern: api.dataWarehouseSavedQueryFolders.$MEMBER.$METHOD(...)
          - pattern: api.dataWarehouseTables.$METHOD(...)
          - pattern: api.dataWarehouseTables.$MEMBER.$METHOD(...)
          - pattern: api.dataWarehouseViewLinks.$METHOD(...)
          - pattern: api.dataWarehouseViewLinks.$MEMBER.$METHOD(...)
          - pattern: api.fixHogQLErrors.$METHOD(...)
          - pattern: api.fixHogQLErrors.$MEMBER.$METHOD(...)
          - pattern: api.insightVariables.$METHOD(...)
          - pattern: api.insightVariables.$MEMBER.$METHOD(...)
          - pattern: api.queryTabState.$METHOD(...)
          - pattern: api.queryTabState.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/data_warehouse/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-early_access_features
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a early_access_features namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/early_access_features/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen early_access_features` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-early_access_features`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.earlyAccessFeatures.$METHOD(...)
          - pattern: api.earlyAccessFeatures.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/early_access_features/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-endpoints
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a endpoints namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/endpoints/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen endpoints` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-endpoints`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.endpoint.$METHOD(...)
          - pattern: api.endpoint.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/endpoints/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-error_tracking
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a error_tracking namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/error_tracking/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen error_tracking` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-error_tracking`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.errorTracking.$METHOD(...)
          - pattern: api.errorTracking.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/error_tracking/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-event_definitions
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a event_definitions namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/event_definitions/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen event_definitions` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-event_definitions`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.eventDefinitions.$METHOD(...)
          - pattern: api.eventDefinitions.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/event_definitions/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-experiments
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a experiments namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/experiments/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen experiments` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-experiments`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.experiments.$METHOD(...)
          - pattern: api.experiments.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/experiments/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-exports
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a exports namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/exports/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen exports` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-exports`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.exports.$METHOD(...)
          - pattern: api.exports.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/exports/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-feature_flags
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a feature_flags namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/feature_flags/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen feature_flags` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-feature_flags`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.featureFlags.$METHOD(...)
          - pattern: api.featureFlags.$MEMBER.$METHOD(...)
          - pattern: api.organizationFeatureFlags.$METHOD(...)
          - pattern: api.organizationFeatureFlags.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/feature_flags/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-groups
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a groups namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/groups/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen groups` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-groups`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.groups.$METHOD(...)
          - pattern: api.groups.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/groups/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-integrations
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a integrations namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/integrations/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen integrations` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-integrations`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.integrations.$METHOD(...)
          - pattern: api.integrations.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/integrations/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-logs
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a logs namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/logs/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen logs` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-logs`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.logs.$METHOD(...)
          - pattern: api.logs.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/logs/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-messaging
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a messaging namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/messaging/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen messaging` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-messaging`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.messaging.$METHOD(...)
          - pattern: api.messaging.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/messaging/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-notebooks
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a notebooks namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/notebooks/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen notebooks` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-notebooks`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.notebooks.$METHOD(...)
          - pattern: api.notebooks.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/notebooks/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-persons
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a persons namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/persons/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen persons` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-persons`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.persons.$METHOD(...)
          - pattern: api.persons.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/persons/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-platform_features
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a platform_features namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/platform_features/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen platform_features` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-platform_features`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.comments.$METHOD(...)
          - pattern: api.comments.$MEMBER.$METHOD(...)
          - pattern: api.organizationMembers.$METHOD(...)
          - pattern: api.organizationMembers.$MEMBER.$METHOD(...)
          - pattern: api.roles.$METHOD(...)
          - pattern: api.roles.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/platform_features/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-posthog_ai
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a posthog_ai namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/posthog_ai/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen posthog_ai` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-posthog_ai`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.conversations.$METHOD(...)
          - pattern: api.conversations.$MEMBER.$METHOD(...)
          - pattern: api.coreMemory.$METHOD(...)
          - pattern: api.coreMemory.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/posthog_ai/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-product_analytics
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a product_analytics namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/product_analytics/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen product_analytics` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-product_analytics`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.columnConfigurations.$METHOD(...)
          - pattern: api.columnConfigurations.$MEMBER.$METHOD(...)
          - pattern: api.insights.$METHOD(...)
          - pattern: api.insights.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/product_analytics/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-product_tours
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a product_tours namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/product_tours/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen product_tours` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-product_tours`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.productTours.$METHOD(...)
          - pattern: api.productTours.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/product_tours/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-replay
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a replay namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/replay/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen replay` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-replay`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.recordings.$METHOD(...)
          - pattern: api.recordings.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/replay/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-revenue_analytics
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a revenue_analytics namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/revenue_analytics/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen revenue_analytics` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-revenue_analytics`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.revenueAnalyticsJoins.$METHOD(...)
          - pattern: api.revenueAnalyticsJoins.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/revenue_analytics/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-signals
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a signals namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/signals/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen signals` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-signals`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.signalReports.$METHOD(...)
          - pattern: api.signalReports.$MEMBER.$METHOD(...)
          - pattern: api.signalSourceConfigs.$METHOD(...)
          - pattern: api.signalSourceConfigs.$MEMBER.$METHOD(...)
          - pattern: api.signalTeamConfig.$METHOD(...)
          - pattern: api.signalTeamConfig.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/signals/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-subscriptions
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a subscriptions namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/subscriptions/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen subscriptions` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-subscriptions`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.subscriptions.$METHOD(...)
          - pattern: api.subscriptions.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/subscriptions/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-surveys
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a surveys namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/surveys/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen surveys` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-surveys`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.surveys.$METHOD(...)
          - pattern: api.surveys.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/surveys/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-tasks
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a tasks namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/tasks/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen tasks` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-tasks`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.tasks.$METHOD(...)
          - pattern: api.tasks.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/tasks/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-warehouse_sources
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a warehouse_sources namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/warehouse_sources/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen warehouse_sources` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-warehouse_sources`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.externalDataSchemas.$METHOD(...)
          - pattern: api.externalDataSchemas.$MEMBER.$METHOD(...)
          - pattern: api.externalDataSources.$METHOD(...)
          - pattern: api.externalDataSources.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/warehouse_sources/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-web_analytics
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a web_analytics namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/web_analytics/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen web_analytics` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-web_analytics`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.savedHeatmaps.$METHOD(...)
          - pattern: api.savedHeatmaps.$MEMBER.$METHOD(...)
          - pattern: api.webAnalyticsFilterPresets.$METHOD(...)
          - pattern: api.webAnalyticsFilterPresets.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/web_analytics/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-workflows
      message: >-
          Manual `api.<namespace>.<method>(...)` call on a workflows namespace. The namespace
          builds its URL in `frontend/src/lib/api.ts`, and this product's generated client
          already covers that URL. Use `products/workflows/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job. `hogli product:maturity --codegen workflows` lists the call sites.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-workflows`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.hogFlowTemplates.$METHOD(...)
          - pattern: api.hogFlowTemplates.$MEMBER.$METHOD(...)
          - pattern: api.hogFlows.$METHOD(...)
          - pattern: api.hogFlows.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/workflows/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'

    - id: prefer-codegen-api-namespaced-shared-activity
      message: >-
          Manual `api.activity.<method>(...)` call on a namespace several products build
          routes on: data_warehouse, experiments, feature_flags, groups, notebooks, persons, platform_features, product_analytics, surveys.

          The namespace builds its URL in `frontend/src/lib/api.ts`. Use the generated
          client of whichever product's route this call reaches, from
          `products/<product>/frontend/generated/api.ts`.

          Informational while the backlog is worked down, but a call this pull request adds
          fails the job.

          Agents: invoke the `adopting-generated-api-types` skill
          (`.agents/skills/adopting-generated-api-types/SKILL.md`) for the migration
          workflow.

          If no generated equivalent is available yet (endpoint missing OpenAPI tags,
          dynamic URL, etc.), add `// nosemgrep: prefer-codegen-api-namespaced-shared-activity`
          above this line - the maturity tooling continues to track tagged sites.
      severity: WARNING
      languages: [typescript, javascript]
      pattern-either:
          - pattern: api.activity.$METHOD(...)
          - pattern: api.activity.$MEMBER.$METHOD(...)
      paths:
          include:
              - '/products/data_warehouse/frontend/'
              - '/products/experiments/frontend/'
              - '/products/feature_flags/frontend/'
              - '/products/groups/frontend/'
              - '/products/notebooks/frontend/'
              - '/products/persons/frontend/'
              - '/products/platform_features/frontend/'
              - '/products/product_analytics/frontend/'
              - '/products/surveys/frontend/'
              - '/frontend/src/'
          exclude:
              - '/frontend/src/lib/api.ts'
              - '**/generated/**'
              - '**/*.test.ts'
              - '**/*.test.tsx'
              - '**/*.stories.tsx'
              - '**/__mocks__/**'
              - '**/mocks/**'
    # --- end generated ---