Skip to content

chore: add AI contribution policy#138

Merged
dustinbyrne merged 2 commits into
mainfrom
chore/add-ai-policy-agent-context-20260615
Jun 15, 2026
Merged

chore: add AI contribution policy#138
dustinbyrne merged 2 commits into
mainfrom
chore/add-ai-policy-agent-context-20260615

Conversation

@dustinbyrne

Copy link
Copy Markdown
Contributor

Problem

PostHog's main repo has an AI contributions policy and PR-template agent context section. The SDK and agent-extension repos should set the same expectations so AI-assisted contributions are easier to review consistently.

Changes

  • Add AI_POLICY.md at the repository root.
  • Add an Agent context section to the PR template.
  • Adapt the proof-of-work guidance for SDK and agent-extension projects by using repo-neutral testing guidance and calling out example-project smoke tests where applicable.

How did you test this code?

  • Verified the markdown changes locally.
  • Ran git diff --check.
  • Verified the PR template contains exactly one ## 🤖 Agent context section.

Checklist

  • Accounted for backwards compatibility of any changes (no breaking changes!)
  • Documentation-only change

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Pi was used to apply the same policy/template update across the SDK and agent-extension repositories. The change was prepared in isolated git worktrees to avoid disturbing existing local branches, then reviewed for duplicate Agent context sections and markdown whitespace issues.

@dustinbyrne dustinbyrne requested a review from a team as a code owner June 15, 2026 21:00
@dustinbyrne dustinbyrne self-assigned this Jun 15, 2026
@greptile-apps

greptile-apps Bot commented Jun 15, 2026

Copy link
Copy Markdown

Reviews (1): Last reviewed commit: "chore: add AI contribution policy" | Re-trigger Greptile

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

posthog-elixir Compliance Report

Date: 2026-06-15 21:05:42 UTC
Duration: 107472ms

⚠️ Some Tests Failed

42/45 tests passed, 3 failed


Capture Tests

29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields 610ms
Format Validation.Event Has Uuid 610ms
Format Validation.Event Has Lib Properties 610ms
Format Validation.Distinct Id Is String 610ms
Format Validation.Token Is Present 610ms
Format Validation.Custom Properties Preserved 611ms
Format Validation.Event Has Timestamp 610ms
Retry Behavior.Retries On 503 5615ms
Retry Behavior.Does Not Retry On 400 2613ms
Retry Behavior.Does Not Retry On 401 2614ms
Retry Behavior.Respects Retry After Header 5616ms
Retry Behavior.Implements Backoff 15626ms
Retry Behavior.Retries On 500 5617ms
Retry Behavior.Retries On 502 5615ms
Retry Behavior.Retries On 504 5617ms
Retry Behavior.Max Retries Respected 15622ms
Deduplication.Generates Unique Uuids 622ms
Deduplication.Preserves Uuid On Retry 5617ms
Deduplication.Preserves Uuid And Timestamp On Retry 10621ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 5618ms
Deduplication.No Duplicate Events In Batch 616ms
Deduplication.Different Events Have Different Uuids 613ms
Compression.Sends Gzip When Enabled 609ms
Batch Format.Uses Proper Batch Structure 611ms
Batch Format.Flush With No Events Sends Nothing 607ms
Batch Format.Multiple Events Batched Together 615ms
Error Handling.Does Not Retry On 403 2614ms
Error Handling.Does Not Retry On 413 2612ms
Error Handling.Retries On 408 5616ms

Feature_Flags Tests

⚠️ 13/16 tests passed, 3 failed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id 9ms
Request Payload.Flags Request Uses V2 Query Param 10ms
Request Payload.Flags Request Hits Flags Path Not Decide 8ms
Request Payload.Flags Request Omits Authorization Header 9ms
Request Payload.Token In Flags Body Matches Init 8ms
Request Payload.Groups Round Trip 9ms
Request Payload.Groups Default To Empty Object 9ms
Request Payload.Person Properties Distinct Id Auto Populated When Caller Omits It 8ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False 8ms
Request Payload.Disable Geoip Omitted Defaults To False 8ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key 9ms
Request Lifecycle.No Flags Request On Init Alone 3ms
Request Lifecycle.No Flags Request On Normal Capture 610ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests 13ms
Request Lifecycle.Mock Response Value Is Returned To Caller 8ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event 612ms

Failures

request_payload.disable_geoip_omitted_defaults_to_false

Field 'geoip_disable' not found in /flags request body at path 'geoip_disable'. Available keys: ['groups', 'api_key', 'distinct_id', 'flag_keys_to_evaluate', 'group_properties', 'person_properties']

request_lifecycle.mock_response_value_is_returned_to_caller

Last action result missing field 'value'. Keys: ['error', 'success']

side_effect_events.get_feature_flag_captures_feature_flag_called_event

Expected 1 events with name '$feature_flag_called', got 0

@dustinbyrne dustinbyrne merged commit c94218e into main Jun 15, 2026
28 checks passed
@dustinbyrne dustinbyrne deleted the chore/add-ai-policy-agent-context-20260615 branch June 15, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants