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.

feat(autoresearch): register the product skeleton (1/22) (#88739)

Andrew Maguireb304105cd718
diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx
index 526f8232f82e..7ed6845a0440 100644
--- a/frontend/src/lib/constants.tsx
+++ b/frontend/src/lib/constants.tsx
@@ -267,6 +267,7 @@ export const FEATURE_FLAGS = {
AMPLITUDE_BATCH_IMPORT_OPTIONS: 'amplitude-batch-import-options', // owner: #team-ingestion
ANOMALY_ALERT_GUIDANCE_EXPERIMENT: 'anomaly-alert-guidance',
APPROVALS: 'approvals', // owner: @yasen-posthog #team-platform-features
+ AUTORESEARCH: 'autoresearch', // owner: @andrewm4894 #team-platform-features
AVERAGE_PAGE_VIEW_COLUMN: 'average-page-view-column', // owner: @jordanm-posthog #team-web-analytics
BACKFILL_WORKFLOWS_DESTINATION: 'backfill-workflows-destination', // owner: #team-batch-exports
BILLING_ALERTS: 'billing-alerts', // owner: #team-billing, gates the Billing > Alerts tab
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 5cc79ae4009d..d306c364b6fc 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -2498,6 +2498,49 @@ importers:
products/approvals: {}
+ products/autoresearch:
+ dependencies:
+ '@posthog/brand':
+ specifier: 'catalog:'
+ version: 0.10.0([email protected])
+ '@posthog/icons':
+ specifier: 'catalog:'
+ '@posthog/lemon-ui':
+ specifier: '*'
+ version: 0.0.0([email protected]([email protected])([email protected])([email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected](patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5)([email protected])))([email protected](patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5)([email protected]))([email protected]([email protected]))([email protected])
+ '@types/react':
+ specifier: 18.3.27
+ version: 18.3.27
+ kea:
+ specifier: 'catalog:'
+ version: 4.0.0-pre.6(patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5)([email protected])
+ kea-forms:
+ specifier: 'catalog:'
+ version: 3.2.0([email protected](patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5)([email protected]))
+ kea-loaders:
+ specifier: 'catalog:'
+ version: 3.1.1([email protected](patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5)([email protected]))
+ kea-router:
+ specifier: 'catalog:'
+ version: 3.4.1([email protected](patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5)([email protected]))
+ kea-subscriptions:
+ specifier: 'catalog:'
+ version: 3.0.1([email protected](patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5)([email protected]))
+ react:
+ specifier: 18.3.1
+ version: 18.3.1
+ zod:
+ specifier: ^4.0.0
+ version: 4.3.6
+ devDependencies:
+ '@storybook/react':
+ specifier: 'catalog:'
+ kea-test-utils:
+ specifier: 'catalog:'
+ version: 0.2.4([email protected](patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5)([email protected]))
+
products/batch_exports: {}
products/billing: {}
diff --git a/posthog/settings/web.py b/posthog/settings/web.py
index 4f02ec891b38..c9669fe24dec 100644
--- a/posthog/settings/web.py
+++ b/posthog/settings/web.py
@@ -98,6 +98,7 @@ PRODUCTS_APPS = [
"products.data_tools.backend.apps.DataToolsConfig",
"products.alerts.backend.apps.AlertsConfig",
"products.actions.backend.apps.ActionsConfig",
+ "products.autoresearch.backend.apps.AutoresearchConfig",
"products.product_analytics.backend.apps.ProductAnalyticsConfig",
"products.wizard.backend.apps.WizardConfig",
"products.exports.backend.apps.ExportsConfig",
diff --git a/products/autoresearch/__init__.py b/products/autoresearch/__init__.py
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/products/autoresearch/backend/__init__.py b/products/autoresearch/backend/__init__.py
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/products/autoresearch/backend/apps.py b/products/autoresearch/backend/apps.py
new file mode 100644
index 000000000000..a35f0963a4c5
--- /dev/null
+++ b/products/autoresearch/backend/apps.py
@@ -0,0 +1,7 @@
+from django.apps import AppConfig
+
+
+class AutoresearchConfig(AppConfig):
+ default_auto_field = "django.db.models.BigAutoField"
+ name = "products.autoresearch.backend"
+ label = "autoresearch"
diff --git a/products/autoresearch/backend/facade/__init__.py b/products/autoresearch/backend/facade/__init__.py
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/products/autoresearch/backend/facade/api.py b/products/autoresearch/backend/facade/api.py
new file mode 100644
index 000000000000..b15b91e18c47
--- /dev/null
+++ b/products/autoresearch/backend/facade/api.py
@@ -0,0 +1,17 @@
+"""
+Public facade for autoresearch.
+
+Every consumer — this product's own presentation layer included — reaches autoresearch
+data and behavior through this module. Functions take and return the frozen contracts in
+``contracts.py``; ORM rows never leave.
+
+Scope is set at the entry boundary, so every read and write here takes ``team_id`` and
+filters on it. Business rules live in the modules behind this facade, not in the views.
+"""
+
+AUTORESEARCH_FLAG = "autoresearch"
+
+
+def flag_key() -> str:
+ """The feature flag that gates every autoresearch surface."""
+ return AUTORESEARCH_FLAG
diff --git a/products/autoresearch/backend/facade/contracts.py b/products/autoresearch/backend/facade/contracts.py
new file mode 100644
index 000000000000..4aeed3fe5986
--- /dev/null
+++ b/products/autoresearch/backend/facade/contracts.py
@@ -0,0 +1,7 @@
+"""
+Contract types for autoresearch.
+
+Stable, framework-free frozen dataclasses that define what this product exposes to
+the rest of the codebase, and what its own presentation layer serializes. No Django
+imports.
+"""
diff --git a/products/autoresearch/backend/presentation/__init__.py b/products/autoresearch/backend/presentation/__init__.py
new file mode 100644
index 000000000000..92dd5f4af5c9
--- /dev/null
+++ b/products/autoresearch/backend/presentation/__init__.py
@@ -0,0 +1 @@
+"""HTTP presentation layer of the autoresearch product (DRF viewsets and serializers)."""
diff --git a/products/autoresearch/manifest.tsx b/products/autoresearch/manifest.tsx
new file mode 100644
index 000000000000..8784afc8e693
--- /dev/null
+++ b/products/autoresearch/manifest.tsx
@@ -0,0 +1,7 @@
+import { ProductManifest } from '~/types'
+
+export const manifest: ProductManifest = {
+ name: 'Autoresearch',
+ treeItemsNew: [],
+ treeItemsProducts: [],
+}
diff --git a/products/autoresearch/package.json b/products/autoresearch/package.json
new file mode 100644
index 000000000000..00c6ad6f751b
--- /dev/null
+++ b/products/autoresearch/package.json
@@ -0,0 +1,26 @@
+{
+ "name": "@posthog/products-autoresearch",
+ "scripts": {
+ "backend:contract-check": "echo 'Contract files unchanged'",
+ "backend:test": "pytest -c ../../pytest.ini --rootdir ../.. backend/ -v --tb=short || test $? -eq 5"
+ },
+ "dependencies": {
+ "kea": "catalog:",
+ "kea-forms": "catalog:",
+ "kea-loaders": "catalog:",
+ "kea-router": "catalog:",
+ "kea-subscriptions": "catalog:",
+ "zod": "^4.0.0"
+ },
+ "devDependencies": {
+ "@storybook/react": "catalog:",
+ "kea-test-utils": "catalog:"
+ },
+ "peerDependencies": {
+ "@posthog/brand": "catalog:",
+ "@posthog/icons": "catalog:",
+ "@posthog/lemon-ui": "*",
+ "@types/react": "*",
+ "react": "*"
+ }
+}
diff --git a/products/autoresearch/product.yaml b/products/autoresearch/product.yaml
new file mode 100644
index 000000000000..ef4463614843
--- /dev/null
+++ b/products/autoresearch/product.yaml
@@ -0,0 +1,3 @@
+name: Autoresearch
+owners:
+ - team-platform-features
diff --git a/products/autoresearch/tsconfig.json b/products/autoresearch/tsconfig.json
new file mode 100644
index 000000000000..fe425d6fcba8
--- /dev/null
+++ b/products/autoresearch/tsconfig.json
@@ -0,0 +1,6 @@
+{
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "composite": true
+ }
+}
diff --git a/products/autoresearch/turbo.json b/products/autoresearch/turbo.json
new file mode 100644
index 000000000000..d6c8e16283b9
--- /dev/null
+++ b/products/autoresearch/turbo.json
@@ -0,0 +1,17 @@
+{
+ "extends": ["//"],
+ "tasks": {
+ "backend:contract-check": {
+ "inputs": [
+ "backend/facade/**",
+ "backend/presentation/**",
+ "backend/routes.py",
+ "backend/temporal/**",
+ "backend/models.py",
+ "backend/migrations/**"
+ ],
+ "outputs": [],
+ "cache": true
+ }
+ }
+}
diff --git a/tach.toml b/tach.toml
index 7995153105a2..860135e1ee35 100644
--- a/tach.toml
+++ b/tach.toml
@@ -186,6 +186,11 @@ depends_on = [
]
layer = "modules"
+[[modules]]
+path = "products.autoresearch"
+depends_on = []
+layer = "modules"
+
[[modules]]
path = "products.batch_exports"
depends_on = [
@@ -989,7 +994,7 @@ expose = [
"backend\\.routes.*",
]
from = [
- "products\\.(customer_analytics|data_modeling|data_warehouse|demo|endpoints|error_tracking|experiments|managed_warehouse|mcp_analytics|mcp_store|metrics|notebooks|notifications|streamlit_apps|tasks|tracing|user_interviews|visual_review|warehouse_sources)",
+ "products\\.(autoresearch|customer_analytics|data_modeling|data_warehouse|demo|endpoints|error_tracking|experiments|managed_warehouse|mcp_analytics|mcp_store|metrics|notebooks|notifications|streamlit_apps|tasks|tracing|user_interviews|visual_review|warehouse_sources)",
]
# TODO: Experiments-specific temporary interface