🌾 Context mill

Contents

The context mill packages PostHog knowledge for AI agents. It turns docs, prompts, and example apps into skills that the wizard, the PostHog MCP server, and the AI plugin load.

Context mill

What goes in the context mill

Knowledge about PostHog goes in the context mill. Code that runs the agent goes in the wizard.

RepoWhat goes there
Context millSkills, agent prompts, example apps, and the cli: blocks that make skills into commands
WizardThe agent, programs, TUI, CLI, and any new top-level command
WarlockSecurity rules that scan what the agent writes

If a change touches both repos, ship the context mill PR first.

How a skill gets built

  1. Sourcing. A skill pulls docs from posthog.com as Markdown, plus hand-written prompts and example apps.
  2. Assembly. The build packages each skill into a ZIP, and writes menus that list every skill and command.
  3. Delivery. A release publishes the ZIPs and menus to GitHub, with a mirror at context-mill.posthog.com.

A skill can be docs only. Some docs pages already hold everything an agent needs, so the skill just points at them, like the logs skill.

Each skill is a folder in context/skills/ with a config.yaml. Expect to iterate on a skill until the wizard's output looks right.

Orchestrator flows

Some programs run as an orchestrator flow instead of one long conversation. Each flow is a folder in context/agents/. Every file in it is one task, with the model and effort it runs at, and a dependsOn field that says which tasks must finish first. A planner, the seed, starts the flow. Tasks with nothing left to wait on run in parallel, each as a focused conversation with only the skills and tools it needs.

This is the replay vision flow:

The replay vision orchestrator flow: a planner, then install and init in parallel, then enable replay, then three scanners in parallel, then the report

To see every flow, run this in the context mill repo. It writes the page to your temp folder and opens it in a browser.

Terminal
npm run visual-dags

Releases reach users right away

No wizard release needed

The wizard always loads the latest context mill release. When a release merges, every wizard run uses it right away. Test a skill change in the workbench before you merge it.

Who owns which skill

Each product team owns the skills for its product. The Wizard & Docs mini crestWizard & Docs Team owns the build and every skill without a product owner.

Skills in context/skills/Owner
integration, integration-v2Growth mini crestGrowth Team
migrate, audit, audit-*, events-auditForward Deployed Engineering mini crestForward Deployed Engineering Team
error-tracking, error-tracking-upload-source-maps, error-tracking-link-releasesError Tracking mini crestError Tracking Team
revenue-analytics, web-analyticsWeb Analytics mini crestWeb Analytics Team
data-warehouse-sourceWarehouse Sources mini crestWarehouse Sources Team
self-drivingSelf-Driving mini crestSelf-Driving Team
mcp-analyticsMCP Analytics mini crestMCP Analytics Team
metricsAPM mini crestAPM Team
replay-vision, replay-vision-*Replay mini crestReplay Team
ai-observability, llm-analyticsAI Observability mini crestAI Observability Team
Every other skill, like feature-flags, logs, and tracingWizard & Docs mini crestWizard & Docs Team

CODEOWNERS requests reviews from these owners.

Future work

The context mill is a band-aid. We built it when it was unclear where skills should live, and what context would still be useful for humans if everyone codes with agents. The goal is to retire it, so the docs themselves package cleanly into skills.

Go deeper

Was this page useful?