PostHog / PostHog/context-mill

Migrate 'PostHog SDK defaults' agent guidance from wizard commandment to shared skill doc

Open
#175 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
60
Forks
17
Avg merge
1d 7h
Merged PRs (30d)
36

Description

Why

The wizard currently carries an agent commandment in src/lib/agent/commandments.ts telling the agent not to disable PostHog data-capture defaults (autocapture, session_recording, opt_out_capturing in init config). That's product-specific guidance baked into wizard infrastructure — the wizard's design rule says product knowledge lives in skills.

This is distinct from PostHog/context-mill#173 (which tracks the L2 scanner rules). This issue is about the L0 agent guidance — the textual rule the agent reads before it writes anything.

What needs to happen

  1. Add a shared doc (working name: libraries/js/defaults.md or similar) covering:
    • autocapture: false — only legitimate with explicit user opt-in
    • disable_session_recording: true / disableSessionRecording: true — same
    • opt_out_capturing: true / opted_out: true in init config — disallowed
    • Legitimate runtime form posthog.opt_out_capturing() for GDPR consent — clearly OK
  2. Have the skills that touch init config (posthog-integration, pii-bouncer, possibly others) pull it via shared_docs
  3. Once the skill-side guidance is live, remove the commandment from the wizard's commandments.ts

Related

  • wizard PR (the warlock migration) restored this commandment as a transitional L0 fix
  • PostHog/context-mill#173 — L2 scanner skill
  • PostHog/wizard#592 — wizard-owned L2 ruleset

🤖 Generated with Claude Code

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/lib/agent/commandments.ts and inspect the posthog-integration and pii-bouncer skills for their shared_docs configuration. Add the shared defaults document with the listed init-config and runtime consent guidance, wire the relevant skills to it, and remove the migrated commandment once the skill-side guidance is in place.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
developer-experience, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.