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.

13.3 KB
Raw Blame
version: 1
owners: []
# Team slugs below are GitHub teams in this organization.
github_org: PostHog
# Automation that a team can redirect or silence under `notifications:`.
producers: [stamphog, visual_review, flaky_report, mcp_tool_health]
# services/mcp generate-tools reads every YAML file in a product's mcp/ directory.
reserved_dirs: ['products/**/mcp/**']
# A product manifest already lists its owners, so it counts as an ownership file.
alias_files: [product.yaml]
# frontend/ runs the Jest suites of the product frontends, so their JUnit paths start from there.
codeowners:
    jest_root: frontend
    jest_root_tests: 'products/**/frontend/**'
    jest_root_packages: products
# Slack channel per team, declared once for the whole repo (root-only registry).
# A team only needs an entry where the derived '#<slug>' is wrong or missing; the
# other 22 slugs in use derive correctly and are deliberately absent.
teams:
    # GitHub team slugs that predate the 'team-' convention: the slug is right,
    # the channel just doesn't match it.
    ai-research:
        slack: '#team-ai-research'
        # The team keeps bot output out of its own channel, so automation posts here instead.
        notifications: '#bots-ai-research'
    batch-exports:
        slack: '#team-batch-exports'
    clickhouse:
        slack: '#team-clickhouse'
    conversations:
        slack: '#team-conversations'
        notifications: '#support-conversations'
    mcp-analytics:
        slack: '#team-mcp-analytics'
    platform-ux:
        slack: '#team-platform-ux'
    team-data-stack:
        slack: '#group-data-stack'
    # PostHog Desktop's channel kept the name it was created under.
    team-posthog-desktop:
        slack: '#team-desktop'
    # The derived '#team-replay' is right; the entry exists only to drop the daily
    # stamphog digest, which the team reads on the PRs themselves.
    team-replay:
        notifications:
            stamphog: false
    # The entry exists only to drop the daily stamphog digest from the team channel.
    team-warehouse-sources:
        notifications:
            stamphog: false
rules:
    - match: Dockerfile.llm-analytics
      owners: team-ai-observability
    - match:
          - Dockerfile
          - 'docker-compose*.yml'
          - '.prettierrc'
          - '.test_quarantine.json'
          - hogli.yaml
          - tach.toml
          - CLAUDE.md
          - AGENTS.md
          - '/.coderabbit.yaml'
          - '/.greptile/'
      owners: team-devex
    # Every owners.yaml routes to devex (unanchored: matches at any depth)
    # unless a nearer file or rule claims it — ownership-policy edits must
    # never go out for review unassigned. A one-line edit changes who reviews
    # later PRs, so the path is sensitive. Sensitive stays on when a nearer file
    # names other owners, so a product's own owners.yaml goes to that product team.
    - match: owners.yaml
      owners: team-devex
      sensitive: true
    # Anchored: bare 'bin/' also matches Cargo's src/bin/, a crate's own binaries.
    - match:
          - '/bin/'
          - '/ee/bin/'
          - '/frontend/bin/'
          - '/nodejs/bin/'
          - '/rust/bin/'
      owners: team-devex
    - match: '/bin/inject_mcp_intents.py'
      owners: mcp-analytics
    - match: '/.agents/skills/manage-dashboard-widgets/'
      owners: team-product-analytics
    - match: '/.claude/'
      owners: team-devex
    - match: '/.claude/agents/ingestion/'
      owners: team-ingestion
    - match: '/bin/start-llm-gateway'
      owners: [team-devex, team-agent-infrastructure]
      sensitive: true
    - match: '/cli/'
      owners: team-growth
    - match: '/docs/onboarding/ai-observability/'
      owners: team-ai-observability
    - match: '/docs/published/handbook/engineering/developing-locally.md'
      owners: team-devex
    - match:
          - '/frontend/src/lib/lemon-ui/'
          - '/frontend/src/lib/ui/'
      owners: platform-ux
    # Platform UX owns the nav rail and the UI rules file, so every change to them goes to that team, however small.
    - match:
          - '/frontend/src/platform-ux.md'
          - '/frontend/src/layout/today/TodayRail.tsx'
          - '/frontend/src/layout/today/TodayRailTile.tsx'
          - '/frontend/src/layout/today/todayRailItems.tsx'
          - '/frontend/src/layout/today/TodayMoreMenu.tsx'
          - '/frontend/src/layout/today/todayRailSeverity.ts'
          - '/frontend/src/layout/today/todayRailStatusLogic.ts'
      owners: platform-ux
      sensitive: true
    - match: '/hog/'
      owners: team-growth
    - match: '/nodejs/tests/'
      owners: team-ingestion
    - match: '/packages/quill/'
      owners: [platform-ux, '@sampennington']
    # The URL surface and the inbound webhook transport: shared plumbing every product
    # lands on, so a change here reaches further than the product that prompted it.
    - match:
          - '/docs/internal/url-routing.md'
          - '/posthog/api/__init__.py'
          - '/posthog/api/rest_router.py'
          - '/posthog/api/routing.py'
          - '/posthog/ee_urls.py'
          - '/posthog/frontend_views.py'
          - '/posthog/github/'
          - '/posthog/ingress/'
          - '/posthog/urls.py'
      owners: team-devex
    - match: '/posthog/helpers/email_utils.py'
      owners: team-platform-features
    - match: '/posthog/test/activity_logging/'
      owners: team-platform-features
    - match: '/posthog/api/test/test_playwright_setup.py'
      owners: team-devex
    # The guards behind the house patterns: semgrep rules, ratchet baselines, invariant tests,
    # and the docs that state the rules. A small edit here can quietly reopen what a guard
    # closed, so the paths are sensitive and the reviewer assigner requests devex for every
    # change. Busy files that most PRs touch (lib/api.ts, pyproject.toml, the model crossing,
    # setup receivers and frozen dataclass baselines) stay out, so that the review requests
    # stay rare.
    - match:
          - '/.github/scripts/check-no-new-ee-files.py'
          - '/.github/scripts/migration-deletion-allowlist.txt'
          - '/.semgrep/rules/devex/'
          - '/.semgrep/rules/security/prefer-codegen-api.*'
          - '/docs/internal/django-startup-time.md'
          - '/docs/published/handbook/engineering/type-system.md'
          - '/ee/urls.py'
          - '/frontend/src/lib/api-orval-mutator.ts'
          - '/frontend/src/lib/api-ratchet-baseline.txt'
          - '/frontend/src/lib/api-stream.ts'
          - '/posthog/management/commands/analyze_migration_risk.py'
          - '/posthog/migration_helpers/'
          - '/posthog/openapi/'
          - '/posthog/product_urls.py'
          - '/posthog/settings/nextgensquash.py'
          - '/posthog/test/repo_invariants/dataclass_secret_field_exemptions.txt'
          - '/posthog/test/repo_invariants/setup_import_baseline.txt'
          - '/posthog/test/repo_invariants/test_admin_url_conf.py'
          - '/posthog/test/repo_invariants/test_dataclass_secret_fields.py'
          - '/posthog/test/repo_invariants/test_generated_files_are_registered.py'
          - '/posthog/test/repo_invariants/test_migration_dependencies_share_a_database.py'
          - '/posthog/test/repo_invariants/test_migration_run_before.py'
          - '/posthog/test/repo_invariants/test_model_crossing_uses.py'
          - '/posthog/test/repo_invariants/test_model_enum_defaults.py'
          - '/posthog/test/repo_invariants/test_squash_partial_fallback.py'
          - '/posthog/test/repo_invariants/test_startup_import_budget.py'
          - '/posthog/test/repo_invariants/test_unowned_test_directories.py'
          - '/products/README.md'
          - '/products/architecture.md'
          - '/products/isolation_baseline.txt'
          - '/tools/openapi-codegen/'
      owners: team-devex
      sensitive: true
    - match:
          - '/posthog/test/repo_invariants/unowned_test_directories_baseline.txt'
          - '/products/model_crossing_uses_baseline.txt'
      owners: team-devex
    - match: '/posthog/management/commands/find_enum_collisions.py'
      owners: team-devex
    - match: '/posthog/settings/data_warehouse.py'
      owners: team-data-stack
    - match: '/posthog/settings/email.py'
      owners: team-platform-features
    - match:
          - '/docs/internal/web-bot-auth-key-directory.md'
          - '/posthog/settings/web_bot_auth.py'
          - '/posthog/test/test_web_bot_auth.py'
          - '/posthog/web_bot_auth.py'
          - '/posthog/web_bot_auth_keys.py'
      owners: ai-research
    - match: '/posthog/test/test_feature_flag_analytics.py'
      owners: team-feature-flags
    - match:
          - '/packages/owners-yaml/'
          - '/tools/hogli-commands/'
          - '/tools/hogli/'
          - '/tools/phrocs/'
      owners: team-devex
    - match: '/products/stamphog/packages/pr-approval-agent/'
      owners: team-devex
    - match: '/tools/query-performance-ai/'
      owners: team-analytics-platform
    # A new root file or folder, product, provider, domain, or top-level package shapes
    # the monorepo layout. The rule names who owns that decision and claims none of the
    # files inside. '/*' matches only entries directly in the root, because '*' does not
    # cross '/'.
    - match:
          - '/*'
          - '/products/*'
          - '/posthog/ingress/*'
          - '/posthog/egress/*'
          - '/tools/*'
          - '/services/*'
          - '/packages/*'
          - '/cli/*'
          - '/hog/*'
      additions: team-devex
    - match:
          - '/common/hogvm/python/test/test_*.py'
          - '/common/hogvm/typescript/src/__tests__/*.test.*'
      owners: hogql
    - match:
          - '/frontend/src/layout/ErrorBoundary/*.test.*'
          - '/frontend/src/layout/navigation-3000/*.test.*'
          - '/frontend/src/layout/navigation/Breadcrumbs/*.test.*'
          - '/frontend/src/layout/panel-layout/*.test.*'
          - '/frontend/src/layout/panel-layout/ProjectTree/*.test.*'
          - '/frontend/src/layout/panel-layout/ProjectTree/menus/*.test.*'
          - '/frontend/src/layout/panel-layout/navbar/*.test.*'
          - '/frontend/src/lib/charts/*.test.*'
          - '/frontend/src/lib/forms/*.test.*'
          - '/frontend/src/lib/hooks/*.test.*'
          - '/frontend/src/lib/logic/scenes/*.test.*'
          - '/frontend/src/lib/memory/*.test.*'
          - '/frontend/src/taxonomy/*.test.*'
      owners: platform-ux
    - match:
          - '/packages/llm-normalizer/src/*.test.*'
          - '/packages/llm-normalizer/src/normalizer/recipe/*.test.*'
          - '/packages/llm-normalizer/src/normalizer/recipe/ast/expr/*.test.*'
          - '/packages/llm-normalizer/src/normalizer/recipe/ast/predicate/*.test.*'
          - '/packages/llm-normalizer/src/normalizer/recipe/ast/rule/*.test.*'
          - '/packages/llm-normalizer/src/normalizer/recipe/compile/*.test.*'
          - '/packages/llm-normalizer/src/normalizer/recipe/runtime/*.test.*'
      owners: team-ai-observability
    - match:
          - '/frontend/src/lib/monaco/languages/*.test.*'
      owners: team-apm
    - match:
          - '/frontend/src/queries/nodes/HogQLX/*.test.*'
      owners: team-data-tools
    - match:
          - '/common/esbuilder/*.test.*'
          - '/frontend/src/mocks/*.test.*'
          - '/frontend/src/test/*.test.*'
          - '/tools/hogbox-preview/tests/test_*.py'
          - '/tools/test_*.py'
          - '/tools/workflow-plan/tests/*.test.*'
      owners: team-devex
    - match:
          - '/playwright/e2e/experiments/*.spec.*'
      owners: team-experiments
    - match:
          - '/common/ingestion/acceptance_tests/test_*.py'
      owners: team-ingestion
    - match:
          - '/frontend/src/layout/navigation-3000/sidepanel/panels/access_control/ResourceAccessControlsV2/*.test.*'
          - '/frontend/src/layout/navigation-3000/sidepanel/panels/activity/*.test.*'
          - '/frontend/src/layout/navigation/ImpersonationNotice/*.test.*'
      owners: team-platform-features
    - match:
          - '/frontend/src/exporter/ExportedInsight/*.test.*'
          - '/frontend/src/exporter/scenes/*.test.*'
          - '/frontend/src/queries/nodes/DataTable/*.test.*'
          - '/frontend/src/queries/nodes/DataTable/ColumnConfigurator/*.test.*'
          - '/frontend/src/queries/nodes/DataTable/TableView/*.test.*'
          - '/frontend/src/queries/nodes/DataVisualization/*.test.*'
          - '/frontend/src/queries/nodes/DataVisualization/Components/Charts/*.test.*'
          - '/frontend/src/queries/nodes/DataVisualization/Components/Heatmap/*.test.*'
          - '/frontend/src/queries/nodes/DataVisualization/Components/Variables/*.test.*'
          - '/frontend/src/queries/nodes/InsightQuery/utils/*.test.*'
          - '/frontend/src/queries/nodes/InsightViz/*.test.*'
          - '/playwright/e2e/persons/*.spec.*'
          - '/playwright/e2e/product-analytics/insights/*.spec.*'
      owners: team-product-analytics
    - match:
          - '/common/replay-headless/src/__tests__/*.test.*'
          - '/common/replay-shared/src/*.test.*'
          - '/common/replay-shared/src/canvas/*.test.*'
          - '/common/replay-shared/src/rrweb-plugins/*.test.*'
          - '/common/replay-shared/src/snapshot-processing/*.test.*'
      owners: team-replay
    - match:
          - '/frontend/src/lib/signals/*.test.*'
      owners: team-self-driving
    - match:
          - '/frontend/src/layout/navigation-3000/sidepanel/panels/max/*.test.*'
      owners: team-surfaces