agentleFS
PostHogKnown publisherPostHog/posthog-foss/proto/AGENTS.md

posthog-foss / proto

AGENTS.md721 starsChanged 56 days agoMITView on GitHub

When you add or modify an RPC or message type in personhog/ protos, you must update all downstream consumers before considering the change complete: Then update: Then update: No codegen step needed (tonic regenerates on cargo build), but you must: When you add or modify an RPC or message type in ingestion/ protos, regenerate the Node.js stubs and commit them (CI rejects stale stubs): Rust bindings (rust/ingestion-worker-proto) regenerate on cargo build.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this AGENTS.md into the rules it gives an agent

5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When you add or modify an RPC or message type in personhog/ protos, you must update all downstream consumers before considering the change …

    line 5
  2. Very specific:

    No codegen step needed (tonic regenerates on cargo build), but you must:

    line 31
  3. Very specific:

    Add the method name to KNOWN_METHODS in rust/personhog-router/src/proxy.rs (the router forwards raw bytes.

    line 34
  4. Very specific:

    Add tests (see Rust test conventions in rust/personhog-replica/AGENTS.md)

    line 35
  5. Very specific:

    When you add or modify an RPC or message type in ingestion/ protos, regenerate the Node.js stubs and commit them (CI rejects stale stubs):

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Proto definitions

Adding or modifying RPCs

When you add or modify an RPC or message type in personhog/ protos, you must update all downstream consumers before considering the change complete:

1. Python generated stubs

bin/generate_personhog_proto.sh

Then update:

  • posthog/personhog_client/proto/__init__.py — add/remove re-exports for any new/removed message types
  • posthog/personhog_client/client.py — add/remove wrapper methods for any new/removed RPCs
  • posthog/personhog_client/fake_client.py — implement the new method for test use

2. Node.js generated stubs

cd nodejs && pnpm run generate:personhog-proto

Then update:

  • nodejs/src/common/personhog/client.test.ts — add a default stub to the SERVICE_DEFAULTS object for any new RPC

3. Rust

No codegen step needed (tonic regenerates on cargo build), but you must:

  • Implement the RPC in rust/personhog-replica/ (storage layer + service handler)
  • Add the method name to KNOWN_METHODS in rust/personhog-router/src/proxy.rs (the router forwards raw bytes; leader-routed methods are matched by name there)
  • Add tests (see Rust test conventions in rust/personhog-replica/AGENTS.md)

Ingestion worker protos

When you add or modify an RPC or message type in ingestion/ protos, regenerate the Node.js stubs and commit them (CI rejects stale stubs):

cd nodejs && pnpm run generate:ingestion-worker-proto

Rust bindings (rust/ingestion-worker-proto) regenerate on cargo build.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.