Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore: tighten AGENTS.md comment rules (#60147)

Arno Hillen45c6551576cd
diff --git a/AGENTS.md b/AGENTS.md
index ba4655b8b8f3..cd518a306e0d 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -123,7 +123,8 @@ See [.agents/security.md](.agents/security.md) for SQL, HogQL, and semgrep secur
- CSS: Use tailwind utility classes instead of inline styles
- Error handling: Prefer explicit error handling with typed errors
- Naming: Use descriptive names, camelCase for JS/TS, snake_case for Python
-- Comments: explain _why_, not _what_ — if the reason isn't important, skip the comment
+- Comments: default to short or 1-line comments. Explain _why_, not _what_, and only when a future reader (with no access to this PR or chat) would otherwise be confused
+- Comments: never log change history or chat context in code — no "previously did X, now does Y", "per <task/PR>", "changed because…", or "AI:"/"agent:" notes. That goes in the commit message and PR description
- Comments: when refactoring or moving code, preserve existing comments unless they are explicitly made obsolete by the change
- Python tests: do not add doc comments
- Python: do not create empty `__init__.py` files