: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(agent): make agent config frontmatter parse as YAML (#91631)
Dennisfb243f82646d
diff --git a/.claude/agents/activity-log-expert.md b/.claude/agents/activity-log-expert.mdindex 00239a94d1a0..36486c09b86e 100644--- a/.claude/agents/activity-log-expert.md+++ b/.claude/agents/activity-log-expert.md@@ -1,6 +1,7 @@---name: activity-logging-expert-description: Use this agent proactively when working with PostHog's comprehensive activity logging system, including implementing activity logging for new entities, debugging logging issues, optimizing performance, creating activity describers, extending audit trail functionality, or any activity logging related questions. Use proactively whenever activity logging is mentioned or when implementing models that should track user actions. Examples: <example>Context: User is adding activity logging to a new model. user: 'I need to add activity logging to our new Campaign model' assistant: 'I'll use the activity-logging-expert agent to help you implement comprehensive activity logging for your Campaign model' <commentary>Since the user needs help with activity logging implementation, use the activity-logging-expert agent to provide guidance on ModelActivityMixin integration, scope configuration, and describer creation.</commentary></example> <example>Context: User is experiencing performance issues with activity logs. user: 'Our activity logs are causing performance problems on the dashboard updates' assistant: 'Let me use the activity-logging-expert agent to analyze and optimize the activity logging performance' <commentary>Since this involves activity logging performance optimization, use the activity-logging-expert agent to identify exclusion strategies and batch operation patterns.</commentary></example> <example>Context: User mentions activity logs in any context. user: 'How do I check what activity logs are being generated for my feature flag changes?' assistant: 'I'll use the activity-logging-expert agent to explain the activity logging flow for feature flags' <commentary>Use the activity-logging-expert proactively whenever activity logging is mentioned in any context.</commentary></example>+description: |-+ Use this agent proactively when working with PostHog's comprehensive activity logging system, including implementing activity logging for new entities, debugging logging issues, optimizing performance, creating activity describers, extending audit trail functionality, or any activity logging related questions. Use proactively whenever activity logging is mentioned or when implementing models that should track user actions. Examples: <example>Context: User is adding activity logging to a new model. user: 'I need to add activity logging to our new Campaign model' assistant: 'I'll use the activity-logging-expert agent to help you implement comprehensive activity logging for your Campaign model' <commentary>Since the user needs help with activity logging implementation, use the activity-logging-expert agent to provide guidance on ModelActivityMixin integration, scope configuration, and describer creation.</commentary></example> <example>Context: User is experiencing performance issues with activity logs. user: 'Our activity logs are causing performance problems on the dashboard updates' assistant: 'Let me use the activity-logging-expert agent to analyze and optimize the activity logging performance' <commentary>Since this involves activity logging performance optimization, use the activity-logging-expert agent to identify exclusion strategies and batch operation patterns.</commentary></example> <example>Context: User mentions activity logs in any context. user: 'How do I check what activity logs are being generated for my feature flag changes?' assistant: 'I'll use the activity-logging-expert agent to explain the activity logging flow for feature flags' <commentary>Use the activity-logging-expert proactively whenever activity logging is mentioned in any context.</commentary></example>model: inheritcolor: green---diff --git a/.claude/agents/code-reviewer.md b/.claude/agents/code-reviewer.mdindex b40a55717ecc..3f4fe6a57e9c 100644--- a/.claude/agents/code-reviewer.md+++ b/.claude/agents/code-reviewer.md@@ -1,6 +1,7 @@---name: code-reviewer-description: Use this agent when you need expert code review of recently written or modified code. This agent should be invoked after completing a logical chunk of functionality, implementing a new feature, fixing a bug, or making significant changes to existing code. The agent focuses on collaborative improvement rather than gatekeeping, providing actionable feedback on safety, logic, tests, and maintainability. This agent writes a `CODE_REVIEW.md` report in the project's root folder.\n\nExamples:\n<example>\nContext: The user has just written a new function and wants it reviewed.\nuser: "Please implement a function that calculates user engagement scores"\nassistant: "I've implemented the engagement score calculation function with proper error handling and edge cases."\n<commentary>\nSince a new function was just implemented, use the Task tool to launch the code-reviewer agent to review the recently written code.\n</commentary>\nassistant: "Now let me use the code-reviewer agent to review this implementation for any issues or improvements."\n</example>\n<example>\nContext: The user has made changes to fix a bug.\nuser: "Fix the null pointer exception in the user authentication flow"\nassistant: "I've fixed the NPE by adding proper null checks and defensive programming."\n<commentary>\nAfter fixing a bug, use the code-reviewer agent to ensure the fix is correct and doesn't introduce new issues.\n</commentary>\nassistant: "Let me have the code-reviewer agent review these changes to ensure the fix is robust."\n</example>\n<example>\nContext: The user wants to ensure code quality before committing.\nuser: "I've refactored the payment processing module, can you review it?"\nassistant: "I'll use the code-reviewer agent to provide a thorough review of your refactored payment processing module."\n<commentary>\nThe user explicitly asks for a review, so use the code-reviewer agent.\n</commentary>\n</example>+description: |-+ Use this agent when you need expert code review of recently written or modified code. This agent should be invoked after completing a logical chunk of functionality, implementing a new feature, fixing a bug, or making significant changes to existing code. The agent focuses on collaborative improvement rather than gatekeeping, providing actionable feedback on safety, logic, tests, and maintainability. This agent writes a `CODE_REVIEW.md` report in the project's root folder.\n\nExamples:\n<example>\nContext: The user has just written a new function and wants it reviewed.\nuser: "Please implement a function that calculates user engagement scores"\nassistant: "I've implemented the engagement score calculation function with proper error handling and edge cases."\n<commentary>\nSince a new function was just implemented, use the Task tool to launch the code-reviewer agent to review the recently written code.\n</commentary>\nassistant: "Now let me use the code-reviewer agent to review this implementation for any issues or improvements."\n</example>\n<example>\nContext: The user has made changes to fix a bug.\nuser: "Fix the null pointer exception in the user authentication flow"\nassistant: "I've fixed the NPE by adding proper null checks and defensive programming."\n<commentary>\nAfter fixing a bug, use the code-reviewer agent to ensure the fix is correct and doesn't introduce new issues.\n</commentary>\nassistant: "Let me have the code-reviewer agent review these changes to ensure the fix is robust."\n</example>\n<example>\nContext: The user wants to ensure code quality before committing.\nuser: "I've refactored the payment processing module, can you review it?"\nassistant: "I'll use the code-reviewer agent to provide a thorough review of your refactored payment processing module."\n<commentary>\nThe user explicitly asks for a review, so use the code-reviewer agent.\n</commentary>\n</example>model: opus---diff --git a/.claude/agents/prompt-engineer.md b/.claude/agents/prompt-engineer.mdindex 1073cf82747d..c3d4e4b3468d 100644--- a/.claude/agents/prompt-engineer.md+++ b/.claude/agents/prompt-engineer.md@@ -1,6 +1,7 @@---name: prompt-engineer-description: Use this agent when you need to create, refine, or optimize prompts for LLMs. This includes designing new prompts from scratch, debugging problematic prompts, improving prompt reliability and consistency, establishing prompt patterns for specific domains, or converting vague requirements into structured prompt specifications. The agent excels at systematic prompt iteration, testing strategies, and creating maintainable prompt systems.\n\nExamples:\n- <example>\n Context: User needs help creating a prompt for data extraction\n user: "I need a prompt that can extract key information from customer support tickets"\n assistant: "I'll use the prompt-engineer agent to design a robust extraction prompt with clear specifications and examples"\n <commentary>\n The user needs prompt engineering expertise to create a reliable data extraction prompt, so the prompt-engineer agent should be invoked.\n </commentary>\n</example>\n- <example>\n Context: User has a prompt that's producing inconsistent results\n user: "My prompt sometimes gives great answers but other times completely misses the mark. Here's what I'm using: [prompt text]"\n assistant: "Let me use the prompt-engineer agent to diagnose the issues and create a more reliable version"\n <commentary>\n The user has a problematic prompt that needs systematic debugging and improvement, which is the prompt-engineer agent's specialty.\n </commentary>\n</example>\n- <example>\n Context: User wants to establish prompt patterns for their application\n user: "We're building an AI feature and need consistent prompt patterns across different components"\n assistant: "I'll invoke the prompt-engineer agent to help establish a library of proven prompt patterns for your use cases"\n <commentary>\n The user needs architectural guidance on prompt design patterns, which the prompt-engineer agent can provide.\n </commentary>\n</example>+description: |-+ Use this agent when you need to create, refine, or optimize prompts for LLMs. This includes designing new prompts from scratch, debugging problematic prompts, improving prompt reliability and consistency, establishing prompt patterns for specific domains, or converting vague requirements into structured prompt specifications. The agent excels at systematic prompt iteration, testing strategies, and creating maintainable prompt systems.\n\nExamples:\n- <example>\n Context: User needs help creating a prompt for data extraction\n user: "I need a prompt that can extract key information from customer support tickets"\n assistant: "I'll use the prompt-engineer agent to design a robust extraction prompt with clear specifications and examples"\n <commentary>\n The user needs prompt engineering expertise to create a reliable data extraction prompt, so the prompt-engineer agent should be invoked.\n </commentary>\n</example>\n- <example>\n Context: User has a prompt that's producing inconsistent results\n user: "My prompt sometimes gives great answers but other times completely misses the mark. Here's what I'm using: [prompt text]"\n assistant: "Let me use the prompt-engineer agent to diagnose the issues and create a more reliable version"\n <commentary>\n The user has a problematic prompt that needs systematic debugging and improvement, which is the prompt-engineer agent's specialty.\n </commentary>\n</example>\n- <example>\n Context: User wants to establish prompt patterns for their application\n user: "We're building an AI feature and need consistent prompt patterns across different components"\n assistant: "I'll invoke the prompt-engineer agent to help establish a library of proven prompt patterns for your use cases"\n <commentary>\n The user needs architectural guidance on prompt design patterns, which the prompt-engineer agent can provide.\n </commentary>\n</example>model: sonnet---diff --git a/.claude/agents/systematic-debugger.md b/.claude/agents/systematic-debugger.mdindex 05fc281fcc8d..c0450f710e37 100644--- a/.claude/agents/systematic-debugger.md+++ b/.claude/agents/systematic-debugger.md@@ -1,6 +1,7 @@---name: systematic-debugger-description: Use this agent when you need to diagnose and fix bugs, errors, or unexpected behavior in code. This includes situations where code is failing with error messages, producing incorrect output, exhibiting performance issues, or behaving inconsistently. The agent excels at methodical problem-solving, root cause analysis, and implementing robust fixes that address underlying issues rather than symptoms. This agent writes a `CODE_DEBUGGING_SESSION.md` report in the project's root folder.\n\nExamples:\n<example>\nContext: User encounters an error in their application\nuser: "My function is throwing a TypeError when processing user data"\nassistant: "I'll use the systematic-debugger agent to diagnose and fix this TypeError"\n<commentary>\nSince the user has a specific error that needs debugging, use the systematic-debugger agent to methodically diagnose and resolve the issue.\n</commentary>\n</example>\n<example>\nContext: User reports unexpected behavior\nuser: "The API endpoint returns different results each time I call it with the same parameters"\nassistant: "Let me launch the systematic-debugger agent to investigate this inconsistent behavior"\n<commentary>\nThe user is experiencing non-deterministic behavior that requires systematic debugging to identify the root cause.\n</commentary>\n</example>\n<example>\nContext: After implementing new features\nuser: "I just added a caching layer and now some tests are failing intermittently"\nassistant: "I'll use the systematic-debugger agent to trace through the test failures and identify the issue with the caching implementation"\n<commentary>\nRecent changes have introduced test failures that need systematic debugging to resolve.\n</commentary>\n</example>+description: |-+ Use this agent when you need to diagnose and fix bugs, errors, or unexpected behavior in code. This includes situations where code is failing with error messages, producing incorrect output, exhibiting performance issues, or behaving inconsistently. The agent excels at methodical problem-solving, root cause analysis, and implementing robust fixes that address underlying issues rather than symptoms. This agent writes a `CODE_DEBUGGING_SESSION.md` report in the project's root folder.\n\nExamples:\n<example>\nContext: User encounters an error in their application\nuser: "My function is throwing a TypeError when processing user data"\nassistant: "I'll use the systematic-debugger agent to diagnose and fix this TypeError"\n<commentary>\nSince the user has a specific error that needs debugging, use the systematic-debugger agent to methodically diagnose and resolve the issue.\n</commentary>\n</example>\n<example>\nContext: User reports unexpected behavior\nuser: "The API endpoint returns different results each time I call it with the same parameters"\nassistant: "Let me launch the systematic-debugger agent to investigate this inconsistent behavior"\n<commentary>\nThe user is experiencing non-deterministic behavior that requires systematic debugging to identify the root cause.\n</commentary>\n</example>\n<example>\nContext: After implementing new features\nuser: "I just added a caching layer and now some tests are failing intermittently"\nassistant: "I'll use the systematic-debugger agent to trace through the test failures and identify the issue with the caching implementation"\n<commentary>\nRecent changes have introduced test failures that need systematic debugging to resolve.\n</commentary>\n</example>model: opus---diff --git a/.claude/agents/test-writer.md b/.claude/agents/test-writer.mdindex 2599fc27cf29..929d3cd7cc4f 100644--- a/.claude/agents/test-writer.md+++ b/.claude/agents/test-writer.md@@ -1,6 +1,7 @@---name: test-writer-description: Use this agent when you need to write comprehensive test suites for existing code or when implementing test-driven development. This includes creating unit tests, integration tests, or test scenarios for new features. The agent excels at identifying edge cases, writing clear test descriptions, and ensuring proper test coverage.\n\nExamples:\n<example>\nContext: The user has just implemented a new function and wants to ensure it has proper test coverage.\nuser: "I've written a function to calculate user permissions. Can you write tests for it?"\nassistant: "I'll use the test-writer agent to create comprehensive tests for your permissions function."\n<commentary>\nSince the user needs tests written for their code, use the Task tool to launch the test-writer agent.\n</commentary>\n</example>\n<example>\nContext: The user is practicing TDD and wants tests written before implementation.\nuser: "I need to implement a shopping cart feature. Let's start with the tests first."\nassistant: "I'll use the test-writer agent to create test specifications for the shopping cart feature following TDD principles."\n<commentary>\nThe user wants to follow test-driven development, so use the test-writer agent to write tests first.\n</commentary>\n</example>\n<example>\nContext: The user has identified a bug and wants to ensure it doesn't happen again.\nuser: "We had a bug where negative quantities crashed the system. We need better test coverage."\nassistant: "I'll use the test-writer agent to write tests that specifically cover edge cases like negative quantities and other boundary conditions."\n<commentary>\nThe user needs tests to prevent regression, use the test-writer agent to create targeted test cases.\n</commentary>\n</example>+description: |-+ Use this agent when you need to write comprehensive test suites for existing code or when implementing test-driven development. This includes creating unit tests, integration tests, or test scenarios for new features. The agent excels at identifying edge cases, writing clear test descriptions, and ensuring proper test coverage.\n\nExamples:\n<example>\nContext: The user has just implemented a new function and wants to ensure it has proper test coverage.\nuser: "I've written a function to calculate user permissions. Can you write tests for it?"\nassistant: "I'll use the test-writer agent to create comprehensive tests for your permissions function."\n<commentary>\nSince the user needs tests written for their code, use the Task tool to launch the test-writer agent.\n</commentary>\n</example>\n<example>\nContext: The user is practicing TDD and wants tests written before implementation.\nuser: "I need to implement a shopping cart feature. Let's start with the tests first."\nassistant: "I'll use the test-writer agent to create test specifications for the shopping cart feature following TDD principles."\n<commentary>\nThe user wants to follow test-driven development, so use the test-writer agent to write tests first.\n</commentary>\n</example>\n<example>\nContext: The user has identified a bug and wants to ensure it doesn't happen again.\nuser: "We had a bug where negative quantities crashed the system. We need better test coverage."\nassistant: "I'll use the test-writer agent to write tests that specifically cover edge cases like negative quantities and other boundary conditions."\n<commentary>\nThe user needs tests to prevent regression, use the test-writer agent to create targeted test cases.\n</commentary>\n</example>model: sonnet---