# posthog - Doramagic AI Context Pack

> Positioning: a pre-install experience and judgment asset. It helps the host AI get off to a good start, but it does not mean the project has already been installed, run, or validated.

## Sufficiency Principle

- **Sufficiency over compression**: The AI Context Pack should be sufficient for the host AI to understand the project's value, capability boundaries, entrypoints, risks, and evidence sources before starting work; it may be layered, but it does not aim for the shortest possible summary.
- **Compression policy**: Compress only noise and duplication, never context that affects judgment or the quality of the work.

## How the Host AI Should Use This

You are reading the AI Context Pack that Doramagic compiled for posthog. Treat it as pre-work context: help the user understand who it fits, what it can do, how to start, what must be verified after install, and where the risks are. Do not claim that you have already installed, run, or executed the target project.

## Claim Consumption Rules

- **Fact source**: Repo Evidence + Claim/Evidence Graph; the Human Wiki only supplies salience, terminology, and narrative structure.
- **Minimum status for a fact**: `supported`
- `supported`: May be used as a project fact, but the answer must cite the claim_id and evidence path.
- `weak`: Usable only as a low-confidence lead; the user must be asked to keep verifying.
- `inferred`: Usable only for risk notes or open questions; must not be packaged as a project fact.
- `unverified`: Must not be used as fact; state clearly that evidence is insufficient.
- `contradicted`: Must show the conflicting sources and must not force a single version on the user's behalf.

## Who It Fits Best

- **Developers already using host AIs such as Claude/Codex/Cursor/Gemini**: The README or plugin config mentions multiple host AIs. Evidence: `README.md` Claim: `clm_0004` supported 0.86
- **Users who want to bring professional workflows into a host AI**: The repo contains Skill documents. Evidence: `.agents/skills/adding-inbox-sources/SKILL.md`, `.agents/skills/adding-ingestion-warnings/SKILL.md`, `.agents/skills/adding-mcp-store-servers/SKILL.md`, `.agents/skills/adding-personhog-rpc/SKILL.md` et al. Claim: `clm_0005` supported 0.86

## What It Can Do

- **AI Skill / Agent Instruction Asset Library** (Previewable before install): The project contains Skill or Agent instruction files that a host AI can read, useful for bringing professional workflows into hosts like Claude, Codex, or Cursor. Evidence: `.agents/skills/adding-inbox-sources/SKILL.md`, `.agents/skills/adding-ingestion-warnings/SKILL.md`, `.agents/skills/adding-mcp-store-servers/SKILL.md`, `.agents/skills/adding-personhog-rpc/SKILL.md` et al. Claim: `clm_0001` supported 0.86
- **Multi-Host Install and Distribution** (Verify after install): The project contains plugin or marketplace configuration, indicating it targets install and distribution across one or more AI hosts. Evidence: `nodejs/src/cdp/legacy-plugins/_destinations/customerio/plugin.json`, `nodejs/src/cdp/legacy-plugins/_destinations/hubspot/plugin.json`, `nodejs/src/cdp/legacy-plugins/_destinations/intercom/plugin.json`, `nodejs/src/cdp/legacy-plugins/_destinations/pace-posthog-integration/plugin.json` et al. Claim: `clm_0002` unverified 0.25
- **Command-Line Startup or Install Flow** (Verify after install): The project documentation contains runnable commands; real use requires running them in a local or host environment. Evidence: `packages/quill/README.md`, `packages/quill/packages/quill/README.md` Claim: `clm_0003` supported 0.86

## How to Start

- `pnpm add @posthog/quill` Evidence: `packages/quill/packages/quill/README.md` Claim: `clm_0006` supported 0.86, `clm_0008` supported 0.86
- `pnpm add -D tailwindcss @tailwindcss/vite` Evidence: `packages/quill/README.md` Claim: `clm_0007` supported 0.86
- `pnpm add @posthog/quill-tokens` Evidence: `packages/quill/README.md` Claim: `clm_0008` supported 0.86

## Continue-or-Stop Decision Card

- **Current recommendation**: Sandbox-trial permissions first
- **Why**: The project has signals of install commands, host configuration, or local writes; do not go straight into your primary environment—trial it in isolation first.

### 30-Second Read

- **What to do now**: Sandbox-trial permissions first
- **Minimum safe next step**: Run Prompt Preview first; if you still want to install, trial only in an isolated environment
- **Do not trust yet**: Tool permission boundaries cannot be trusted before install.
- **Continuing will touch**: Command execution, Host AI configuration, Local environment or project files

### What You Can Trust Now

- **Target-audience signal: Developers already using host AIs such as Claude/Codex/Cursor/Gemini** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `README.md` Claim: `clm_0004` supported 0.86
- **Target-audience signal: Users who want to bring professional workflows into a host AI** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `.agents/skills/adding-inbox-sources/SKILL.md`, `.agents/skills/adding-ingestion-warnings/SKILL.md`, `.agents/skills/adding-mcp-store-servers/SKILL.md`, `.agents/skills/adding-personhog-rpc/SKILL.md` et al. Claim: `clm_0005` supported 0.86
- **Capability exists: AI Skill / Agent Instruction Asset Library** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `.agents/skills/adding-inbox-sources/SKILL.md`, `.agents/skills/adding-ingestion-warnings/SKILL.md`, `.agents/skills/adding-mcp-store-servers/SKILL.md`, `.agents/skills/adding-personhog-rpc/SKILL.md` et al. Claim: `clm_0001` supported 0.86
- **Capability exists: Command-Line Startup or Install Flow** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `packages/quill/README.md`, `packages/quill/packages/quill/README.md` Claim: `clm_0003` supported 0.86
- **There are Quick Start / install-command signals** (supported): You can trust that the docs mention a startup or install entrypoint; do not run it directly in your primary environment because of that. Evidence: `packages/quill/packages/quill/README.md` Claim: `clm_0006` supported 0.86, `clm_0008` supported 0.86

### What You Cannot Trust Yet

- **Tool permission boundaries cannot be trusted before install.** (unverified): MCP/tool projects usually touch files, the network, the browser, or external APIs, so permissions and logs must be checked for real.
- **Real output quality cannot be trusted before install.** (unverified): Prompt Preview can only show how it guides you; it cannot prove result quality in the real project.
- **Host AI version compatibility cannot be trusted before install.** (unverified): Host loading rules and version differences across Claude, Cursor, Codex, Gemini, and others must be verified in a real environment.
- **That it will not pollute your existing host AI's behavior cannot be trusted directly.** (inferred): Skill, plugin, and AGENTS/CLAUDE/GEMINI instructions may change the host AI's default behavior. Evidence: `.agents/skills/adding-inbox-sources/SKILL.md`, `.agents/skills/adding-ingestion-warnings/SKILL.md`, `.agents/skills/adding-mcp-store-servers/SKILL.md`, `.agents/skills/adding-personhog-rpc/SKILL.md` et al.
- **Safe rollback cannot be assumed by default.** (unverified): Unless the project clearly provides uninstall and recovery instructions, verify in an isolated environment first.
- **After a real install, is it compatible with the user's current host AI version?** (unverified): Compatibility can only be verified in the actual host environment. Evidence: `nodejs/src/cdp/legacy-plugins/_destinations/customerio/plugin.json`, `nodejs/src/cdp/legacy-plugins/_destinations/hubspot/plugin.json`, `nodejs/src/cdp/legacy-plugins/_destinations/intercom/plugin.json`, `nodejs/src/cdp/legacy-plugins/_destinations/pace-posthog-integration/plugin.json` et al.
- **Does the project's output quality meet the user's specific task?** (unverified): The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **Do the install commands require network access, permissions, or global writes?** (unverified): This affects install risk in both enterprise and personal environments. Evidence: `packages/quill/packages/quill/README.md`

### What Continuing Will Touch

- **Command execution**: Package managers, network downloads, the local plugin directory, project config, or the user's home directory. Why: Running the very first command can already change your environment; decide whether it is worth running first. Evidence: `packages/quill/README.md`, `packages/quill/packages/quill/README.md`
- **Host AI configuration**: The plugin, Skill, or rule-loading config of hosts like Claude/Codex/Cursor/Gemini/OpenCode. Why: Host configuration changes how the AI works afterward and may conflict with the user's existing rules. Evidence: `.agents/skills/adding-inbox-sources/SKILL.md`, `.agents/skills/adding-ingestion-warnings/SKILL.md`, `.agents/skills/adding-mcp-store-servers/SKILL.md`, `.agents/skills/adding-personhog-rpc/SKILL.md` et al.
- **Local environment or project files**: Install results, plugin caches, project config, or local dependency directories. Why: The write scope and rollback path cannot be proven before install and need isolated verification. Evidence: `nodejs/src/cdp/legacy-plugins/_destinations/customerio/plugin.json`, `nodejs/src/cdp/legacy-plugins/_destinations/hubspot/plugin.json`, `nodejs/src/cdp/legacy-plugins/_destinations/intercom/plugin.json`, `nodejs/src/cdp/legacy-plugins/_destinations/pace-posthog-integration/plugin.json` et al.
- **Host AI context**: The AI Context Pack, Prompt Preview, Skill routing, risk rules, and project facts. Why: Importing context affects the host AI's later judgment, so avoid packaging unverified items as facts.

### Minimum Safe Next Steps

- **Run Prompt Preview first**: Use a pre-install interactive trial to judge whether the way of working fits; it needs no authorization or environment change. (applies when: Applies to any project, especially when output quality is unknown.)
- **Trial-install only in an isolated directory or a test account**: Avoid letting install commands pollute your primary host AI, real projects, or home directory. (applies when: When there are signals of command execution, plugin config, or local writes.)
- **Back up your host AI configuration first**: Skill, plugin, and rule files may change the default behavior of Claude/Cursor/Codex. (applies when: When there is a plugin manifest, a Skill, or a host rule entrypoint.)
- **After install, verify just one minimal task**: Verify loading, compatibility, output quality, and rollback first, then decide whether to use it deeply. (applies when: When moving from a trial into a real workflow.)

### Exit Plan

- **Preserve the pre-install state**: Record the original host config and project state so you can later judge whether it is recoverable.
- **Be ready to remove the host plugin / Skill / rule entrypoint**: If behavior is off after the trial install, you can restore the host AI to its pre-trial state.
- **Record the install commands and written paths**: Without clear uninstall instructions, you at least need to know which directories or configs to clean up manually.
- **If there is no rollback path, do not enter your primary environment**: No rollback is a blocker before continuing; do not proceed on trust or luck.

## What Can Only Be Previewed

- Explain who the project fits and what it can do
- Demonstrate a typical conversation flow based on project docs
- Help the user decide whether it is worth installing or researching further

## What Must Be Verified After Install

- Actually installing the Skill, plugin, or CLI
- Running scripts, modifying local files, or accessing external services
- Verifying real output quality, performance, and compatibility

## Boundary & Risk Decision Card

- **Mistaking the pre-install preview for a real run**: The user may overestimate how much configuration, permission, and compatibility verification the project has already done. Mitigation: Clearly separate prompt_preview_can_do from runtime_required. Claim: `clm_0009` inferred 0.45
- **Host AI plugin or Skill rule conflicts**: New rules may change how the user's existing host AI behaves. Mitigation: Inspect the plugin manifest and Skill files before installing, and test in isolation if needed. Evidence: `nodejs/src/cdp/legacy-plugins/_destinations/customerio/plugin.json`, `nodejs/src/cdp/legacy-plugins/_destinations/hubspot/plugin.json`, `nodejs/src/cdp/legacy-plugins/_destinations/intercom/plugin.json`, `nodejs/src/cdp/legacy-plugins/_destinations/pace-posthog-integration/plugin.json` et al. Claim: `clm_0010` inferred 0.45
- **Command execution will modify the local environment**: Install commands may write to the user's home directory, the host plugin directory, or project configuration. Mitigation: Run in an isolated environment or a test account first. Evidence: `packages/quill/README.md`, `packages/quill/packages/quill/README.md` Claim: `clm_0011` supported 0.86
- **To confirm**: After a real install, is it compatible with the user's current host AI version?. Why: Compatibility can only be verified in the actual host environment.
- **To confirm**: Does the project's output quality meet the user's specific task?. Why: The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **To confirm**: Do the install commands require network access, permissions, or global writes?. Why: This affects install risk in both enterprise and personal environments.

## Pre-Work Working Context

### Loading Order

- First read how_to_use.host_ai_instruction to establish the boundaries of this pre-install judgment asset.
- Read claim_graph_summary to confirm facts come from the Claim/Evidence Graph, not the Human Wiki narrative.
- Then read intended_users, capabilities, and quick_start_candidates to judge whether the user is a match.
- When you need to carry out a concrete task, check role_skill_index first, then evidence_index.
- For real install, file modification, network access, performance, or compatibility questions, turn to risk_card and boundaries.runtime_required.

### Task Routes

- **AI Skill / Agent Instruction Asset Library**: Use role_skill_index / evidence_index to help the user pick a usable role, Skill, or workflow first. Boundary: Can be experienced via a pre-install Prompt. Evidence: `.agents/skills/adding-inbox-sources/SKILL.md`, `.agents/skills/adding-ingestion-warnings/SKILL.md`, `.agents/skills/adding-mcp-store-servers/SKILL.md`, `.agents/skills/adding-personhog-rpc/SKILL.md` et al. Claim: `clm_0001` supported 0.86
- **Multi-Host Install and Distribution**: State that this is an after-install capability first, then give a pre-install checklist. Boundary: Must be verified after a real install or run. Evidence: `nodejs/src/cdp/legacy-plugins/_destinations/customerio/plugin.json`, `nodejs/src/cdp/legacy-plugins/_destinations/hubspot/plugin.json`, `nodejs/src/cdp/legacy-plugins/_destinations/intercom/plugin.json`, `nodejs/src/cdp/legacy-plugins/_destinations/pace-posthog-integration/plugin.json` et al.
- **Command-Line Startup or Install Flow**: State that this is an after-install capability first, then give a pre-install checklist. Boundary: Must be verified after a real install or run. Evidence: `packages/quill/README.md`, `packages/quill/packages/quill/README.md` Claim: `clm_0003` supported 0.86

### Context Scale

- Total files: 29184
- Important-file coverage: 40/29184
- Evidence index entries: 180
- Role / Skill entries: 209

### Handling Insufficient Evidence

- **missing_evidence**: State that evidence is insufficient and ask the user for the target file, a README section, or after-install verification records; do not fill in facts.
- **out_of_scope_request**: State that the task is beyond the current AI Context Pack's evidence scope and suggest the user check the Human Manual or verify after a real install.
- **runtime_request**: Provide a pre-install checklist and command sources, but do not run commands for the user or claim they have been run.
- **source_conflict**: Show the conflicting sources side by side, mark them as unverified, and do not force a single version.

## Prompt Recipes

### Fit assessment

- Goal: Judge whether this project fits the user's current task.
- Expected output: A fit conclusion, key reasons, evidence citations, what can be previewed before install, what must be verified after install, and a next-step recommendation.

```text
Based on the AI Context Pack for posthog, ask me 3 necessary questions first, then judge whether it fits my task. The answer must cover: who it fits, what it can do, what it cannot do, whether it is worth installing, and where the evidence comes from. Every project fact must cite evidence_refs, source_paths, or a claim_id.
```

### Pre-install experience

- Goal: Let the user feel the core workflow before installing, while avoiding packaging the preview as real capability or a marketing promise.
- Expected output: An experience script with boundary labels, an after-install verification checklist, and a cautious recommendation; with no real-run promises or strong marketing language.

```text
Treat posthog as a pre-install experience asset, not an already-installed tool or a real runtime environment.

Output exactly four parts:
1. Ask me 3 necessary questions first.
2. Give an "experience script": use the three labels [Previewable before install], [Must verify after install], and [Insufficient evidence] to show how it might guide the workflow.
3. Give an after-install verification checklist: list which capabilities can only be confirmed after a real install, real host loading, and a real project run.
4. Give a cautious recommendation: only "worth researching/trialing further", "add information before deciding", or "not recommended to continue"; do not endorse the project.

Hard boundaries:
- Do not claim you have installed, run, executed tests, modified files, or produced real results.
- Do not write promise-like phrasing such as "auto-adapts", "guarantees passing", "perfect fit", or "strongly recommend installing".
- If you describe how it works after install, you must use a conditional such as "if installed successfully and the host loads the Skill correctly, it might...".
- The experience script may only be written as "example lines / hypothetical flow": use "might ask / might suggest / might show", not "has written, has generated, has passed, is running, is generating".
- Prompt Preview does not hand out install commands; if the user is ready to trial, only prompt them to read Quick Start and the Risk Card first and to verify in an isolated environment.
- Every project fact must come from a supported claim, evidence_refs, or source_paths; inferred/unverified items can only be risks or open questions.

```

### Role / Skill selection

- Goal: Pick the best-matching asset from the project's roles or Skills.
- Expected output: A list of candidate roles or Skills, each with an applicable scenario, evidence paths, risk boundary, and whether after-install verification is needed.

```text
Read role_skill_index and recommend 3-5 of the most relevant roles or Skills for my target task. For each recommendation, state the applicable scenario, likely output, risk boundary, and evidence_refs.
```

### Risk pre-check

- Goal: Identify environment, permission, rule-conflict, and quality risks before installing or adopting.
- Expected output: A checklist of environment, permission, dependency, license, host-conflict, quality risk, and unknown items.

```text
Based on risk_card, boundaries, and quick_start_candidates, give me a pre-install risk pre-check list. Do not run commands for me; only explain what I should check, why, and what impact a failure would have.
```

### Host AI kickoff instruction

- Goal: Turn the project context into a host AI instruction for the start of a conversation.
- Expected output: A pre-work instruction with clear boundaries and clear evidence citations, suitable to copy to a host AI.

```text
Based on the AI Context Pack for posthog, generate a pre-work instruction I can paste to my host AI. This instruction must obey not_runtime=true and must not claim the project has been installed, run, or produced real results.
```

## Role / Skill Index

- Indexed 209 role / Skill / project-doc entries.

- **adding-inbox-sources** (skill): Add a new warehouse-backed source to the PostHog Code Self-driving Inbox the feature that ships GitHub, Linear, Zendesk, pganalyze, Jira . A source syncs one warehouse table issues/tickets/conversations and a cloud "signals scout" watches it and emits findings. Use when asked to "add a new inbox/self-driving source", "wire up as a signal source", or to extend the source-toggle grid. Covers all three surfaces posthog… Activation hint: When the user's task is highly relevant to the workflow described by “adding-inbox-sources”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/adding-inbox-sources/SKILL.md`
- **adding-ingestion-warnings** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “adding-ingestion-warnings”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/adding-ingestion-warnings/SKILL.md`
- **adding-mcp-store-servers** (skill): Add a third-party MCP server Linear, Notion, GitHub, ... to the PostHog MCP store catalog. Use when asked to "add X to the MCP store", expand the MCP server marketplace, or fix a broken catalog entry. Covers finding the vendor's remote MCP endpoint, probing it handshake, OAuth discovery, DCR , authoring the catalog entry in products/mcp store/backend/catalog.py, verification tiers, and the operator handoff for serve… Activation hint: When the user's task is highly relevant to the workflow described by “adding-mcp-store-servers”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/adding-mcp-store-servers/SKILL.md`
- **adding-personhog-rpc** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “adding-personhog-rpc”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/adding-personhog-rpc/SKILL.md`
- **adding-product-alerting** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “adding-product-alerting”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/adding-product-alerting/SKILL.md`
- **adding-project-secret-api-key-auth** (skill): How to gate a PostHog API endpoint with project secret API key PSAK auth — a project-scoped, user-less service credential. Use when adding PSAK support to a viewset action, allowing a new scope for PSAKs, handling synthetic users ProjectSecretAPIKeyUser , or choosing PSAK-aware rate throttles. Trigger terms: PSAK, ProjectSecretAPIKey, project secret API key, phs token, service auth, programmatic endpoint auth. Activation hint: When the user's task is highly relevant to the workflow described by “adding-project-secret-api-key-auth”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/adding-project-secret-api-key-auth/SKILL.md`
- **adopting-generated-api-types** (skill): Use when migrating frontend code from manual API client calls api.get , api.create , api.surveys.get , api.dashboards.list , new ApiRequest and handwritten TypeScript interfaces to generated API functions and types. Triggers on files importing from lib/api , files with api.get . , manual interface definitions that duplicate backend serializers, or any frontend file that constructs API URLs by hand. Covers the full r… Activation hint: When the user's task is highly relevant to the workflow described by “adopting-generated-api-types”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/adopting-generated-api-types/SKILL.md`
- **analyzing-experiment-query-performance** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “analyzing-experiment-query-performance”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/analyzing-experiment-query-performance/SKILL.md`
- **analyzing-insights-across-teams** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “analyzing-insights-across-teams”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/analyzing-insights-across-teams/SKILL.md`
- **authoring-ci-workflows** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “authoring-ci-workflows”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/authoring-ci-workflows/SKILL.md`
- **clickhouse-migrations** (skill): ClickHouse migration patterns and rules. Use when creating or modifying ClickHouse migrations. Activation hint: When the user's task is highly relevant to the workflow described by “clickhouse-migrations”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/clickhouse-migrations/SKILL.md`
- **debugging-ci-failures** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “debugging-ci-failures”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/debugging-ci-failures/SKILL.md`
- **debugging-local-task-agent-runs** (skill): Debug the output of local PostHog task runs — the wizard cloud-run path that executes inside a Docker sandbox under the local Temporal process-task workflow the wizard that integrates PostHog, then the coding agent that commits and opens the PR . Use when a local run looks stuck, failed, or silent, or when you need to read the wizard or agent logs. Covers the .env.local keys + ai features intent required for cloud r… Activation hint: When the user's task is highly relevant to the workflow described by “debugging-local-task-agent-runs”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/debugging-local-task-agent-runs/SKILL.md`
- **depot-container-builds** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “depot-container-builds”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/depot-container-builds/SKILL.md`
- **depot-github-runners** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “depot-github-runners”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/depot-github-runners/SKILL.md`
- **django-migrations** (skill): Django migration patterns and safety workflow for PostHog. Use when creating, adjusting, or reviewing Django/Postgres migrations, including non-blocking index/constraint changes, multi-phase schema changes, data backfills, migration conflict rebasing, and product model moves that require SeparateDatabaseAndState. Also use for any deletion or removal of a model, table, column, product, or app — including deleting mig… Activation hint: When the user's task is highly relevant to the workflow described by “django-migrations”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/django-migrations/SKILL.md`
- **django-startup-time** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “django-startup-time”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/django-startup-time/SKILL.md`
- **documenting-warehouse-sources** (skill): Write or update the user-facing posthog.com documentation for a PostHog Data warehouse import source. Use when adding a new source doc, fixing an inconsistent or stub source doc, or standardizing the docs at contents/docs/cdp/sources. Covers the canonical template, shared snippets, the auto-rendered and components, frontmatter, and the docsUrl/slug rule that prevents 404s. Activation hint: When the user's task is highly relevant to the workflow described by “documenting-warehouse-sources”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/documenting-warehouse-sources/SKILL.md`
- **establishing-code-ownership** (skill): Determine which PostHog team owns a file, directory, or code path, or enumerate all code a team owns via distributed owners.yaml , products/ /product.yaml , and .github/CODEOWNERS . Use when assigning a reviewer, attributing a bug or slow query to a team, routing work, scoping a team-wide audit, or answering "who owns X" / "what does team Y own". Activation hint: When the user's task is highly relevant to the workflow described by “establishing-code-ownership”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/establishing-code-ownership/SKILL.md`
- **extending-personhog-test-harness** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “extending-personhog-test-harness”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/extending-personhog-test-harness/SKILL.md`
- **fixing-flaky-tests** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “fixing-flaky-tests”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/fixing-flaky-tests/SKILL.md`
- **gating-production-deploys** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “gating-production-deploys”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/gating-production-deploys/SKILL.md`
- **generating-clickhouse-query-performance-reports** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “generating-clickhouse-query-performance-reports”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/generating-clickhouse-query-performance-reports/SKILL.md`
- **hogli** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “hogli”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/hogli/SKILL.md`
- **implementing-agent-modes** (skill): Guidelines to create/update a new mode for PostHog AI agent. Modes are a way to limit what tools, prompts, and prompt injections are applied and under what conditions. Achieve better results using your plan mode. Activation hint: When the user's task is highly relevant to the workflow described by “implementing-agent-modes”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/implementing-agent-modes/SKILL.md`
- **implementing-mcp-tools** (skill): Guide for exposing PostHog product endpoints as MCP tools. Use when creating new or updating API endpoints, adding MCP tool definitions, scaffolding YAML configs, or writing serializers with good descriptions. Covers the full pipeline from Django serializer to generated TypeScript tool handler. Activation hint: When the user's task is highly relevant to the workflow described by “implementing-mcp-tools”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/implementing-mcp-tools/SKILL.md`
- **implementing-mcp-ui-apps** (skill): Guide for adding MCP UI apps — interactive visualizations that render tool results in MCP clients like Claude Desktop. Use when adding a new detail or list view for an MCP tool, creating view components in products/ /mcp/apps/, or linking tools to UI apps via YAML. Activation hint: When the user's task is highly relevant to the workflow described by “implementing-mcp-ui-apps”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/implementing-mcp-ui-apps/SKILL.md`
- **implementing-warehouse-sources** (skill): Implement and extend PostHog Data warehouse import sources. Use when adding a new source under products/warehouse sources/backend/temporal/data imports/sources, adding datasets/endpoints to an existing source, or adding incremental sync, resumable imports, webhook ingestion, pagination, credentials validation, and source tests. Activation hint: When the user's task is highly relevant to the workflow described by “implementing-warehouse-sources”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/implementing-warehouse-sources/SKILL.md`
- **improving-drf-endpoints** (skill): Use when editing, reviewing, or auditing DRF viewsets and serializers in PostHog. Triggers on files in posthog/api/, products/ /backend/api/, products/ /backend/presentation/, or any file importing rest framework. Covers field typing, schema annotations, enum collision fixes, and OpenAPI spec quality — everything that flows downstream into generated TypeScript types and MCP tools. Activation hint: When the user's task is highly relevant to the workflow described by “improving-drf-endpoints”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/improving-drf-endpoints/SKILL.md`
- **ingestion-pipeline-doctor-nodejs** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “ingestion-pipeline-doctor-nodejs”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/ingestion-pipeline-doctor-nodejs/SKILL.md`
- **isolating-product-facade-contracts** (skill): Plan and execute product isolation migrations to a facade plus contract layer in PostHog, following the Visual review architecture. Use when a product still exposes internals models/logic/views across boundaries and needs migration toward contracts.py + facade/api.py + presentation separation, with a PR strategy that minimizes review latency and conflicts with parallel work. Activation hint: When the user's task is highly relevant to the workflow described by “isolating-product-facade-contracts”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/isolating-product-facade-contracts/SKILL.md`
- **manage-dashboard-widgets** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “manage-dashboard-widgets”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/manage-dashboard-widgets/SKILL.md`
- **managing-github-actions-secrets** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “managing-github-actions-secrets”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/managing-github-actions-secrets/SKILL.md`
- **modifying-taxonomic-filter** (skill): Guides safe modification of the TaxonomicFilter — PostHog's multi-tab picker for events, actions, properties, cohorts, and more. Front-loads the empirical product reality what users actually pick and search for plus the three live variants legacy-control, legacy-pill behind TAXONOMIC FILTER CATEGORY DROPDOWN, and the opt-in rebuild menu behind TAXONOMIC FILTER MENU REBUILD so changes are judged against real behavior… Activation hint: When the user's task is highly relevant to the workflow described by “modifying-taxonomic-filter”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/modifying-taxonomic-filter/SKILL.md`
- **monitoring-capture-service** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “monitoring-capture-service”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/monitoring-capture-service/SKILL.md`
- **monitoring-ingestion-pipeline** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “monitoring-ingestion-pipeline”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/monitoring-ingestion-pipeline/SKILL.md`
- **optimizing-clickhouse-and-hogql-queries** (skill): Workflow for optimizing ClickHouse and HogQL queries. Use when a HogQL query, query runner, insight, or report is too slow; when a hand-written ClickHouse query via sync execute or in a migration is too slow; when ClickHouse times out or hits memory limits; when investigating a slow system.query log row; or when reviewing a proposed HogQL printer change for performance. Covers extracting the ClickHouse SQL, common s… Activation hint: When the user's task is highly relevant to the workflow described by “optimizing-clickhouse-and-hogql-queries”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/optimizing-clickhouse-and-hogql-queries/SKILL.md`
- **playwright-test** (skill): Write a playwright test, make sure it runs, and is not flaky. Activation hint: When the user's task is highly relevant to the workflow described by “playwright-test”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/playwright-test/SKILL.md`
- **qa-team** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “qa-team”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/qa-team/SKILL.md`
- **query-clickhouse-via-metabase** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “query-clickhouse-via-metabase”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/query-clickhouse-via-metabase/SKILL.md`
- **querying-tophog** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “querying-tophog”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/querying-tophog/SKILL.md`
- **react-doctor** (skill): Diagnose and fix React codebase health issues. Use when reviewing React code, fixing performance problems, auditing security, or improving code quality. Activation hint: When the user's task is highly relevant to the workflow described by “react-doctor”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/react-doctor/SKILL.md`
- **run-posthog** (skill): Start, inspect, and drive the PostHog dev stack. Use for /run and /verify on this repo — when asked to launch PostHog, check whether the stack is healthy, inspect a running process, or verify a UI change against the live app. Activation hint: When the user's task is highly relevant to the workflow described by “run-posthog”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/run-posthog/SKILL.md`
- **running-ci-preflight** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “running-ci-preflight”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/running-ci-preflight/SKILL.md`
- **scene-menu-bar** (skill): Conventions for adding or editing the SceneMenuBar above a scene's . Use when adding new menu items, moving items between menus, gating behind feature flags, building a new scene's menubar, or wiring rich inputs tags, combobox into the bar. Activation hint: When the user's task is highly relevant to the workflow described by “scene-menu-bar”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/scene-menu-bar/SKILL.md`
- **security-audit** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “security-audit”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/security-audit/SKILL.md`
- **sending-notifications** (skill): How to send real-time in-app notifications from PostHog backend code. Use when integrating notifications into a new feature, wiring up a notification source alerts, comments, approvals, pipelines, issues , or choosing the right target type and priority for a notification. Activation hint: When the user's task is highly relevant to the workflow described by “sending-notifications”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/sending-notifications/SKILL.md`
- **setting-feature-flags-in-storybook** (skill): Use when writing a Storybook story for a component gated on a feature flag — boolean flags or multivariate/experiment-arm variants. Covers the featureFlags story parameter and why imperatively setting flags renders the flag-off branch in visual-regression snapshots while passing in jest. Activation hint: When the user's task is highly relevant to the workflow described by “setting-feature-flags-in-storybook”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/setting-feature-flags-in-storybook/SKILL.md`
- **setting-up-devbox** (skill): Guide a PostHog engineer through spinning up, connecting to, running commands on, and mirroring local code to a remote devbox a Coder workspace running the full PostHog stack . Use when asked to set up a devbox, start or connect to a devbox, configure remote dev, get gh CLI / Claude Code authed on a devbox, run a command on a devbox, sync a local checkout so you can edit locally while the stack runs remotely devbox:… Activation hint: When the user's task is highly relevant to the workflow described by “setting-up-devbox”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/setting-up-devbox/SKILL.md`
- **setup-web-tests** (skill): Set up Python test environment in Claude Code for web where flox is unavailable. Use when you need to run backend tests and uv sync fails due to Python version mismatch. Activation hint: When the user's task is highly relevant to the workflow described by “setup-web-tests”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/setup-web-tests/SKILL.md`
- **survey-sdk-audit** (skill): Audit PostHog survey SDK features and version requirements Activation hint: When the user's task is highly relevant to the workflow described by “survey-sdk-audit”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/survey-sdk-audit/SKILL.md`
- **using-kea-disposables** (skill): Use when adding timers setInterval , setTimeout , event listeners window.addEventListener , document.addEventListener , MediaQueryList.addEventListener , or any other resource that needs cleanup inside a kea logic. Every logic has cache.disposables.add setup, key?, options? and cache.disposables.dispose key available via the globally registered disposablesPlugin frontend/src/kea-disposables.ts . Replaces the bare ca… Activation hint: When the user's task is highly relevant to the workflow described by “using-kea-disposables”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/using-kea-disposables/SKILL.md`
- **visualizing-change-over-time** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “visualizing-change-over-time”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/visualizing-change-over-time/SKILL.md`
- **warehouse-source-new-version** (skill): Add support for a new vendor API version to an existing Data warehouse import source, or deprecate an old one. Use when a vendor ships a new API version Stripe date versions, Shopify quarterly versions, header-pinned revisions, /vN/ URL bumps , when implementing a version-update or deprecation task for a source under products/warehouse sources/backend/temporal/data imports/sources, or when repinning an ExternalDataS… Activation hint: When the user's task is highly relevant to the workflow described by “warehouse-source-new-version”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/warehouse-source-new-version/SKILL.md`
- **writing-clickhouse-queries** (skill): Guide for writing performant ClickHouse queries in PostHog product code. Use when writing HogQL query runners, designing a ClickHouse table for a new product, adding materialized columns or skip indexes, or choosing a row ID format. For optimizing an existing query that is already too slow, use /optimizing-clickhouse-and-hogql-queries instead. Activation hint: When the user's task is highly relevant to the workflow described by “writing-clickhouse-queries”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/writing-clickhouse-queries/SKILL.md`
- **writing-evals** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “writing-evals”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/writing-evals/SKILL.md`
- **writing-kea-logics** (skill): Guide for writing or reviewing PostHog kea logic files Logic.ts / Logic.tsx . Use when creating a new logic, adding actions/reducers/selectors/listeners/loaders/forms/router bindings, choosing between reducer vs selector vs cache, deciding between listeners and kea-subscriptions , wiring React with useValues / useActions / BindLogic , or onboarding to kea conventions. Read keajs.org for upstream API; this skill capt… Activation hint: When the user's task is highly relevant to the workflow described by “writing-kea-logics”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/writing-kea-logics/SKILL.md`
- **writing-skills** (skill): Guide for writing PostHog agent skills — job-to-be-done templates that teach agents how to use MCP tools to achieve a goal. Use when adding new product functionality that agents should know how to work with, creating a new skill, or updating existing skills in products/ /skills/. Activation hint: When the user's task is highly relevant to the workflow described by “writing-skills”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/writing-skills/SKILL.md`
- **writing-tests** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “writing-tests”, use it for a pre-install experience first, then decide whether to install. Evidence: `.agents/skills/writing-tests/SKILL.md`
- **auditing-the-fleet** (skill): The fleet-wide audit — sweep every agent, mine recent sessions for failures/anomalies, classify root causes, and branch a DRAFT proposal per fix never freeze/promote ; write a report to memory. Load when asked to audit all agents or what's underperforming. Activation hint: When the user's task is highly relevant to the workflow described by “auditing-the-fleet”, use it for a pre-install experience first, then decide whether to install. Evidence: `products/agent_platform/backend/kernel_skills/auditing-the-fleet/SKILL.md`
- **safety-and-boundaries** (skill): Hard rules — what the Agent Builder MUST NOT do regardless of user request. Load IMMEDIATELY if a request feels like it crosses into raw-secret handling, unprompted promotion, irreversible deletion, or impersonation of another user. Activation hint: When the user's task is highly relevant to the workflow described by “safety-and-boundaries”, use it for a pre-install experience first, then decide whether to install. Evidence: `products/agent_platform/backend/kernel_skills/safety-and-boundaries/SKILL.md`
- **using-the-console-ui** (skill): How to drive PostHog Code's read panel as the user works with you — focus etiquette, when to call toast, how to handle 'follow mode' being off. Load when the session client kind is posthog-code . Activation hint: When the user's task is highly relevant to the workflow described by “using-the-console-ui”, use it for a pre-install experience first, then decide whether to install. Evidence: `products/agent_platform/backend/kernel_skills/using-the-console-ui/SKILL.md`
- **working-outside-the-console** (skill): Operating without a UI — MCP / IDE / Slack mode. How to compensate for missing client tools, how to be useful in a text-only chat. Load when the session client kind is NOT posthog-code . Activation hint: When the user's task is highly relevant to the workflow described by “working-outside-the-console”, use it for a pre-install experience first, then decide whether to install. Evidence: `products/agent_platform/backend/kernel_skills/working-outside-the-console/SKILL.md`
- **Proposing changes through an approval gate** (skill): Proposing changes through an approval gate Activation hint: When the user's task is highly relevant to the workflow described by “Proposing changes through an approval gate”, use it for a pre-install experience first, then decide whether to install. Evidence: `products/agent_platform/services/agent-tests/src/examples/agent-approval-demo/skills/proposing-changes/SKILL.md`
- **incident-io-playbook** (skill): How to work incident.io through its connected MCP — list active incidents, fetch context for an incoming webhook, post triage updates, and rare open a new incident. Load when an incident.io webhook fires the agent, when an alert correlates to an active incident, or when recording a resolved outcome. Activation hint: When the user's task is highly relevant to the workflow described by “incident-io-playbook”, use it for a pre-install experience first, then decide whether to install. Evidence: `products/agent_platform/services/agent-tests/src/examples/sre-slack-bot/skills/incident-io-playbook/SKILL.md`
- **Runbook memory — read, curate, propose** (skill): Runbook memory — read, curate, propose Activation hint: When the user's task is highly relevant to the workflow described by “Runbook memory — read, curate, propose”, use it for a pre-install experience first, then decide whether to install. Evidence: `products/agent_platform/services/agent-tests/src/examples/sre-slack-bot/skills/runbook-memory/SKILL.md`
- **slack-thread-protocol** (skill): Conventions for replying in Slack — TL;DR first, evidence next, who to tag, when to start a new top-level message. Load before posting any reply. Activation hint: When the user's task is highly relevant to the workflow described by “slack-thread-protocol”, use it for a pre-install experience first, then decide whether to install. Evidence: `products/agent_platform/services/agent-tests/src/examples/sre-slack-bot/skills/slack-thread-protocol/SKILL.md`
- **triage-playbook** (skill): Structured triage flow — phases for context gathering, hypothesis, and reporting. Load when starting an investigation. Activation hint: When the user's task is highly relevant to the workflow described by “triage-playbook”, use it for a pre-install experience first, then decide whether to install. Evidence: `products/agent_platform/services/agent-tests/src/examples/sre-slack-bot/skills/triage-playbook/SKILL.md`
- **Briefing template** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “Briefing template”, use it for a pre-install experience first, then decide whether to install. Evidence: `products/agent_platform/services/agent-tests/src/examples/wake-me-up/skills/briefing-template/SKILL.md`
- **Carry-over** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “Carry-over”, use it for a pre-install experience first, then decide whether to install. Evidence: `products/agent_platform/services/agent-tests/src/examples/wake-me-up/skills/carry-over/SKILL.md`
- **Slack post format** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “Slack post format”, use it for a pre-install experience first, then decide whether to install. Evidence: `products/agent_platform/services/agent-tests/src/examples/wake-me-up/skills/slack-post-format/SKILL.md`
- **analyzing-expensive-users** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “analyzing-expensive-users”, use it for a pre-install experience first, then decide whether to install. Evidence: `products/ai_observability/skills/analyzing-expensive-users/SKILL.md`
- **creating-online-evaluations** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “creating-online-evaluations”, use it for a pre-install experience first, then decide whether to install. Evidence: `products/ai_observability/skills/creating-online-evaluations/SKILL.md`
- **exploring-ai-failures** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “exploring-ai-failures”, use it for a pre-install experience first, then decide whether to install. Evidence: `products/ai_observability/skills/exploring-ai-failures/SKILL.md`
- **exploring-llm-clusters** (skill): Investigate AI observability clusters — understand usage patterns in AI/LLM traffic, compare cluster behavior, compute cost/latency metrics, and drill into individual traces within clusters. Activation hint: When the user's task is highly relevant to the workflow described by “exploring-llm-clusters”, use it for a pre-install experience first, then decide whether to install. Evidence: `products/ai_observability/skills/exploring-llm-clusters/SKILL.md`
- **exploring-llm-costs** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “exploring-llm-costs”, use it for a pre-install experience first, then decide whether to install. Evidence: `products/ai_observability/skills/exploring-llm-costs/SKILL.md`
- **exploring-llm-evaluations** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “exploring-llm-evaluations”, use it for a pre-install experience first, then decide whether to install. Evidence: `products/ai_observability/skills/exploring-llm-evaluations/SKILL.md`
- **exploring-llm-traces** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “exploring-llm-traces”, use it for a pre-install experience first, then decide whether to install. Evidence: `products/ai_observability/skills/exploring-llm-traces/SKILL.md`
- **feature-usage-feed** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “feature-usage-feed”, use it for a pre-install experience first, then decide whether to install. Evidence: `products/ai_observability/skills/feature-usage-feed/SKILL.md`
- **downloading-batch-export-files** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “downloading-batch-export-files”, use it for a pre-install experience first, then decide whether to install. Evidence: `products/batch_exports/skills/downloading-batch-export-files/SKILL.md`
- The remaining 129 entries are in `AI_CONTEXT_PACK.json`.

## Evidence Index

- Indexed 180 evidence entries.

- **PostHog Documentation** (documentation): Developer-focused documentation alongside code. Update docs in the same PR as your code changes. Evidence: `docs/README.md`
- **Dashboard scene troubleshooting** (documentation): Symptom-driven notes for the dashboard scene frontend/src/scenes/dashboard/ . Evidence: `frontend/src/scenes/dashboard/docs/troubleshooting/README.md`
- **Agent platform docs** (documentation): Concise, diagram-led docs for the v2 agent platform. Want the 30-second map? Start with overview.md overview.md — one diagram of the whole platform. Want the whole picture on one page? Read full-overview.md full-overview.md — an annotated single-page tour of both planes, the request lifecycle, identity, and tool dispatch. Then read the targeted docs in this order: Evidence: `products/agent_platform/docs/README.md`
- **.stamphog** (documentation): Declarative policy for the stamphog PR-approval merge gate tools/pr-approval-agent/ . The engine loads these files from the checked-out working tree at run time. Engine and policy are vendored into other repos see the note in tools/pr-approval-agent/README.md , so format changes here need those copies re-synced too. Evidence: `.stamphog/README.md`
- **PostHog Development Guide** (documentation): - Key entry points: posthog/api/ init .py API URL routing skeleton; products register their own routes in products/ /backend/routes.py via register routes routers , posthog/settings/web.py Django settings, INSTALLED APPS , products/ product apps - Monorepo layout docs/internal/monorepo-layout.md - high-level directory structure products, services, common, tools - Products README products/README.md - how to create and structure products - Products architecture products/architecture.md - DTOs, facades, isolated testing Evidence: `AGENTS.md`
- **PostHog is the open source platform for building self-driving products** (documentation): Docs - Community - Roadmap - Why PostHog? - Changelog - Bug reports Evidence: `README.md`
- **The Posthog CLI** (documentation): The command line interface for PostHog. Exposes PostHog's MCP tool catalog through a shell-friendly interface, handles debug symbol uploads for error tracking, and more. For full documentation, see our CLI docs https://posthog.com/docs/cli . Evidence: `cli/README.md`
- **common/ — read before adding code here** (documentation): common/ — read before adding code here Evidence: `common/AGENTS.md`
- **Common** (documentation): Shared libraries, tools, and utilities that predate a better home. Evidence: `common/README.md`
- **Developer Environment** (documentation): Configuration for the local developer environment, driving hogli dev:setup and the phrocs-based process manager. Evidence: `devenv/README.md`
- **Funnel UDFs** (documentation): - Building the binaries: - Exit flox: exit - Switch to the subfolder: cd funnel-udf - Execute the build script: ./build.sh - Restart the clickhouse docker container Evidence: `funnel-udf/README.md`
- **RealTime Hog 3000** (documentation): Hog 3000 powers live event stream on PostHog: https://us.posthog.com/project/0/activity/live Evidence: `livestream/README.md`
- **PostHog Node.js services** (documentation): Node.js services for PostHog: ingestion pipeline, CDP, session recording, and more. Evidence: `nodejs/README.md`
- **Products** (documentation): Each product in PostHog is a vertical slice : it contains its backend Django app , frontend React/TypeScript , and optionally shared code. This structure ensures product features are self-contained and can evolve independently. Evidence: `products/README.md`
- **Proto definitions** (documentation): When you add or modify an RPC or message type in personhog/ protos, you must update all downstream consumers before considering the change complete: Evidence: `proto/AGENTS.md`
- **Proto Definitions** (documentation): Language-agnostic protobuf definitions for PostHog services. Evidence: `proto/README.md`
- **Rust crates** (documentation): When emitting metrics via the metrics crate histogram! , counter! , gauge! , dynamic label values method names, client names, etc. must use Arc , never String or .to string . Evidence: `rust/AGENTS.md`
- **PostHog Rust Workspace** (documentation): The posthog/rust directory serves as PostHog's "Rust monorepo" hosting Rust libraries and service implementations. This is not the Rust client library for PostHog. Evidence: `rust/README.md`
- **Services** (documentation): Independently deployed services with their own domain logic. Evidence: `services/README.md`
- **Share folder** (documentation): Put here any resources that should be shared across all projects events, web, worker, plugins, etc. . Most likely this will be things like small static databases or other resources. Evidence: `share/README.md`
- **Devex semgrep rules** (documentation): Devex / hygiene rules for the PostHog codebase. Run by the semgrep-devex job in ci-security.yaml in two passes: Evidence: `.semgrep/rules/devex/README.md`
- **PostHog Hobby Installer** (documentation): A TUI Terminal User Interface and CI-compatible installer for PostHog self-hosted hobby deployments. Built with Go using Bubbletea https://github.com/charmbracelet/bubbletea . Evidence: `bin/hobby-installer/README.md`
- **Sampo** (documentation): This directory stores pending release changesets for posthog-cli . Evidence: `cli/.sampo/README.md`
- **HogQL Parser** (documentation): ANTLR4-based parser for HogQL https://posthog.com/docs/hogql and Hog https://posthog.com/docs/hog , available as both a Python C++ extension and a WebAssembly module for JavaScript/TypeScript. Evidence: `common/hogql_parser/README.md`
- **HogVM** (documentation): A HogVM is a 🦔 that runs Hog bytecode. It's purpose is to locally evaluate Hog/QL expressions against any object. Evidence: `common/hogvm/README.md`
- **Plugin Transpiler** (documentation): This project transpiles frontend plugins and site apps. Evidence: `common/plugin_transpiler/README.md`
- **Storybook** (documentation): Tailwind is compiled by @tailwindcss/postcss on the initial build. Webpack's HMR does not re-run PostCSS when story content changes, so a newly used Tailwind utility e.g. bg- rebeccapurple won't appear until you restart Storybook. Classes already present in the codebase hot-reload fine. Evidence: `common/storybook/.storybook/README.md`
- **Readme** (documentation): Use docker.yaml file to override the default dynamic config value they are specified when creating the service config . Evidence: `docker/temporal/dynamicconfig/README.md`
- **SCIM Implementation Spike Summary** (documentation): SCIM 2.0 System for Cross-domain Identity Management enables automated user provisioning and deprovisioning from identity providers Okta, Azure AD, etc. into PostHog. Evidence: `ee/api/scim/README.md`
- **Vercel SSO + ngrok Local Development Setup** (documentation): Vercel SSO + ngrok Local Development Setup Evidence: `ee/api/vercel/README.md`
- **Clickhouse query benchmarks** (documentation): This is the benchmark suite for PostHog clickhouse queries. It tracks performance improvements to clickhouse queries over time. Evidence: `ee/benchmarks/README.md`
- **PostHog AI** (documentation): This directory contains the PostHog AI platform and its core features. Evidence: `ee/hogai/README.md`
- **AI evals** (documentation): We use AI evaluations evals to test our AI outputs against a curated set of inputs. Evals allow us to verify prompt performance, spot regressions, or compare different model versions. Evidence: `ee/hogai/eval/README.md`
- **PostHog Lemon UI** (documentation): ! npm package https://img.shields.io/npm/v/@posthog/lemon-ui?style=flat-square https://www.npmjs.com/package/@posthog/lemon-ui ! MIT License https://img.shields.io/badge/License-MIT-red.svg?style=flat-square https://opensource.org/licenses/MIT Evidence: `frontend/@posthog/lemon-ui/README.md`
- **Frontend agent guide frontend/src** (documentation): Applies to any change under frontend/src . This is a discovery + cadence guide: the rules below exist because agents tend to generate before they look. The root AGENTS.md and the quill package guides remain authoritative — this file does not repeat them, it points at them. Evidence: `frontend/src/AGENTS.md`
- **Scene chrome agent guide frontend/src/layout/scenes** (documentation): Scene chrome agent guide frontend/src/layout/scenes Evidence: `frontend/src/layout/scenes/AGENTS.md`
- **Domain Connect** (documentation): Automates DNS configuration for PostHog features that require users to add DNS records email sending, managed reverse proxy . Instead of manually copy-pasting records at their DNS provider, users click a button and get redirected to approve pre-filled records. Evidence: `frontend/src/lib/components/DomainConnect/README.md`
- **MarkdownNotebook** (documentation): A notebook editor that uses markdown as its storage format. The document model is parsed from and serialized back to markdown on every edit, so the markdown string is always the source of truth. Evidence: `frontend/src/lib/components/MarkdownNotebook/README.md`
- **Queries** (documentation): - Query/ - Generic component that routes internally to the right node. - - QueryEditor/ - Generic JSON editor - - nodes/ - The folders in this directory EventsNode/ , DataTable/ , etc contain React components that display queries of that specific kind . - Basically everything in nodes/DataTable/ expects your query to be of kind DataTable . - The top level component, DataTable.tsx , always exports the component DataTable { query, setQuery } - There are various sub-components as needed, e.g. , . Some of them depend on a logic, likely dataNodeLogic , being in a BindLogic context, so read the source. - examples.ts - Various examples used in storybook - query.ts - make API calls to fetch data fo… Evidence: `frontend/src/queries/README.md`
- **PostHog AI scene — agent guide** (documentation): This is the scene for PostHog AI , PostHog's agent. It hosts two coexisting runtimes , chosen per conversation by conversation.agent runtime 'langgraph' 'sandbox' : Evidence: `frontend/src/scenes/max/AGENTS.md`
- **Max Context** (documentation): Scene logics can expose a maxContext selector to provide relevant context to MaxAI. Evidence: `frontend/src/scenes/max/README.md`
- **Cyclotron Node** (documentation): TypeScript job queue backed by PostgreSQL, using pg directly. Evidence: `nodejs/src/cdp/services/cyclotron-v2/README.md`
- **Ingestion Outputs** (documentation): Ingestion pipelines need to produce messages to Kafka — events, heatmaps, ingestion warnings, etc. Each of these destinations is an output . An output has one or more targets each a topic + producer pair , all configurable at deploy time without code changes. Evidence: `nodejs/src/common/outputs/README.md`
- **Pipeline Doctor** (documentation): Convention-checking agents for the PostHog ingestion pipeline. The agents use the doc-test chapters in framework/docs/ as their source of truth and review code for adherence to framework patterns. Evidence: `nodejs/src/ingestion/doctor/README.md`
- **TopHog** (documentation): TopHog is an in-process metric aggregation system that tracks the top contributors for named metrics across pipeline steps. It accumulates counts and timings keyed by arbitrary dimensions e.g. team id , keeps only the top N entries per metric, and periodically flushes results to Kafka. Evidence: `nodejs/src/ingestion/framework/tophog/README.md`
- **Session Recording Ingestion** (documentation): This module handles ingestion of session recording data, processing it, and storing it for later playback. Evidence: `nodejs/src/ingestion/pipelines/sessionreplay/README.md`
- **Replay Vision ML Mirror Image Scrub Sidecar** (documentation): Replay Vision ML Mirror Image Scrub Sidecar Evidence: `nodejs/src/ingestion/pipelines/sessionreplay/ml-mirror-image-scrub-sidecar/README.md`
- **Recording API** (documentation): This module provides the HTTP API for serving session recording playback data and handling recording deletions. Evidence: `nodejs/src/session-replay/recording-api/README.md`
- **Session replay rasterizer** (documentation): Temporal worker that converts session replays into MP4 videos using puppeteer-capture's HeadlessExperimental.beginFrame for deterministic virtual-time frame capture. Runs on a dedicated rasterization-task-queue . Evidence: `nodejs/src/session-replay/recording-rasterizer/README.md`
- **Quill Primitives — Agent Guide** (documentation): Quill is PostHog's design system built on React, TypeScript, Base UI, and Tailwind v4. It follows a layered architecture: tokens primitives components blocks . Evidence: `packages/quill/AGENTS.md`
- **Quill — PostHog's unified design system** (documentation): Quill — PostHog's unified design system Evidence: `packages/quill/README.md`
- **Quill story screenshots** (documentation): Visual regression baseline for the quill refactor Tailwind → CSS/BEM migration . Evidence: `packages/quill/apps/storybook/__screenshots__/README.md`
- **Blocks — Agent Reference** (documentation): @posthog/quill-blocks is the product-level patterns layer of quill tokens primitives components blocks . It is currently an empty placeholder — src/index.ts exports nothing so downstream export re-exports keep working while the layer is unimplemented. Evidence: `packages/quill/packages/blocks/AGENTS.md`
- **Charts — Agent Reference** (documentation): Quick-reference for AI agents using @posthog/quill-charts . Canvas-rendered charts, themed via quill design tokens. Ships no CSS — colors come from CSS variables at runtime. Evidence: `packages/quill/packages/charts/AGENTS.md`
- **hog-charts** (documentation): PostHog's canvas-based charting library, used for trends, dashboards, and any in-app chart that needs to render thousands of points smoothly. D3 powers the scales; the canvas does the drawing; React handles overlays. Evidence: `packages/quill/packages/charts/src/README.md`
- **Components — Agent Reference** (documentation): Quick-reference for AI agents using @posthog/quill-components — composed components built on quill primitives. For primitive-level guidance choosing a component, spacing, the render prop , read ../primitives/AGENTS.md first. Evidence: `packages/quill/packages/components/AGENTS.md`
- **Primitives — Agent Reference** (documentation): Quick-reference for AI agents using @posthog/quill-primitives . Show composition, not API docs. Evidence: `packages/quill/packages/primitives/AGENTS.md`
- **@posthog/quill** (documentation): PostHog's UI primitives, components, and design tokens, bundled as one publishable package. Built on base-ui https://base-ui.com/ , Tailwind v4 https://tailwindcss.com/ , and a shared token layer. Evidence: `packages/quill/packages/quill/README.md`
- **Quill Tokens — Agent Guide** (documentation): @posthog/quill-tokens is the source of truth for quill's design tokens. Tokens are authored in TypeScript under src/ and generated into CSS in dist/ . Never hand-edit dist/ .css — every file is stamped Auto-generated by @posthog/quill-tokens — do not edit manually . Evidence: `packages/quill/packages/tokens/AGENTS.md`
- **GitHub integration setup** (documentation): How the GitHub App integration works and what you need to configure to get it running — both the GitHub App side and your local env . This package posthog/api/github callback/ handles the install/OAuth callbacks that create the integration records. Evidence: `posthog/api/github_callback/README.md`
- The remaining 120 evidence entries are in `AI_CONTEXT_PACK.json` or `EVIDENCE_INDEX.json`.

## Rules the Host AI Must Follow

- **Treat this asset as pre-work context, not a runtime environment.**: The AI Context Pack contains only an evidence-backed understanding of the project, not the project's executable state. Evidence: `docs/README.md`, `frontend/src/scenes/dashboard/docs/troubleshooting/README.md`, `products/agent_platform/docs/README.md`
- **When answering the user, distinguish what can be previewed from what can only be verified after install.**: The consumer value of the pre-install experience comes from reducing bad installs and misjudgments, not from pretending to be a real run. Evidence: `docs/README.md`, `frontend/src/scenes/dashboard/docs/troubleshooting/README.md`, `products/agent_platform/docs/README.md`

## Questions the User Should Answer First

- Which host AI or local environment do you plan to use it in?
- Do you just want to experience the workflow first, or are you ready to actually install?
- What matters most to you: install cost, output quality, or conflicts with your existing rules?

## Acceptance Checks

- Every capability claim can be traced back to a file path in evidence_refs.
- AI_CONTEXT_PACK.md does not package previews as a real run.
- The user can understand who it fits, what it can do, how to start, and the risk boundaries within 3 minutes.

---

## Doramagic Context Augmentation

The following sections strengthen the repository context for a host AI. Human Manual data is a reading route, and pitfall notes become operating constraints.

## Human Manual Outline

Usage rule: this is only a reading route and salience signal, not factual authority. Concrete claims must still return to repo evidence or Claim Graph.

Host AI hard rules:
- Do not treat page titles, section order, summaries, or importance values as factual project evidence.
- When explaining the Human Manual outline, state that it is only a reading route or salience signal.
- Capability, installation, compatibility, runtime state, and risk claims must cite repo evidence, source paths, or Claim Graph.

- **PostHog Overview and Monorepo Architecture**: importance `high`
  - source_paths: README.md, docs/internal/monorepo-layout.md, AGENTS.md
- **AI Agents, Max AI, and Self-Driving Mode**: importance `high`
  - source_paths: ee/hogai/README.md, ee/hogai/chat_agent/graph.py, ee/hogai/core/agent_modes/factory.py, .agents/skills/implementing-mcp-tools/SKILL.md, ee/hogai/tools/execute_sql/tool.py
- **Data Ingestion, HogQL, and ClickHouse Backend**: importance `high`
  - source_paths: common/hogql_parser/README.md, common/ingestion/acceptance_tests/run_tests.py, docs/internal/feature-flags/flag-evaluation-engine.md, products/README.md
- **Frontend Application, LemonUI, and Product Features**: importance `high`
  - source_paths: frontend/src/index.tsx, frontend/src/lib/lemon-ui/LemonButton/LemonButton.tsx, frontend/src/scenes/dashboard/Dashboard.tsx, frontend/src/layout/scenes/SceneLayout.tsx

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `ced1a6aff121ad56f99164a6a1b600845eb778da`
- inspected_files: `Dockerfile`, `README.md`, `package.json`, `pnpm-lock.yaml`, `pyproject.toml`, `uv.lock`, `docs/README.md`, `docs/internal/coder-workspaces.md`, `docs/internal/dev-env-vars.md`, `docs/internal/django-startup-time.md`, `docs/internal/feature-flags/billing.md`, `docs/internal/feature-flags/database-interaction-patterns.md`, `docs/internal/feature-flags/django-api-endpoints.md`, `docs/internal/feature-flags/evaluation-threading-architecture.md`, `docs/internal/feature-flags/experience-continuity.md`, `docs/internal/feature-flags/flag-evaluation-engine.md`, `docs/internal/feature-flags/holdout-groups.md`, `docs/internal/feature-flags/hypercache-system.md`, `docs/internal/feature-flags/rate-limiting.md`, `docs/internal/feature-flags/rust-service-overview.md`

Host AI hard rules:
- Without repo_clone_verified=true, do not claim that the source code has been read.
- Without repo_inspection_verified=true, do not write README, docs, or package-file conclusions as facts.
- Without quick_start_verified=true, do not claim that the Quick Start path has run successfully.

## Doramagic Pitfall Constraints

These rules come from Doramagic discovery, validation, or compilation findings. The host AI must treat them as operating constraints, not background notes.

### Constraint 1: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: 0.7.24 — 2026-06-16
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: 0.7.24 — 2026-06-16. Context: Observed when using node, windows, macos, linux
- Why it matters: Upgrade or migration may change expected behavior: 0.7.24 — 2026-06-16
- Evidence: failure_mode_cluster:github_release | https://github.com/PostHog/posthog/releases/tag/posthog-cli/v0.7.24
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 2: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: Renovate: Dependency Status
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Renovate: Dependency Status. Context: Observed when using node
- Why it matters: Developers may fail before the first successful local run: Renovate: Dependency Status
- Evidence: failure_mode_cluster:github_issue | https://github.com/PostHog/posthog/issues/54967
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 3: Capability evidence risk requires verification

- Trigger: README/documentation is current enough for a first validation pass.
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: capability.assumptions | https://github.com/PostHog/posthog
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 4: Security or permission risk requires verification

- Trigger: no_demo
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: downstream_validation.risk_items | https://github.com/PostHog/posthog
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 5: Security or permission risk requires verification

- Trigger: no_demo
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: risks.scoring_risks | https://github.com/PostHog/posthog
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 6: Maintenance risk requires verification

- Trigger: issue_or_pr_quality=unknown。
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: evidence.maintainer_signals | https://github.com/PostHog/posthog
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 7: Maintenance risk requires verification

- Trigger: release_recency=unknown。
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: evidence.maintainer_signals | https://github.com/PostHog/posthog
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 8: Maintenance risk requires verification

- Trigger: Developers should check this maintenance risk before relying on the project: Agent skills agent-skills-v0.183.0
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Agent skills agent-skills-v0.183.0. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Upgrade or migration may change expected behavior: Agent skills agent-skills-v0.183.0
- Evidence: failure_mode_cluster:github_release | https://github.com/PostHog/posthog/releases/tag/agent-skills-v0.183.0
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.
