Skip to content

docs(desktop): ban Radix in agent instructions - #76809

Merged
trunk-io[bot] merged 1 commit into
masterfrom
claude/remove-radix-agents-aagbdj
Aug 3, 2026
Merged

docs(desktop): ban Radix in agent instructions#76809
trunk-io[bot] merged 1 commit into
masterfrom
claude/remove-radix-agents-aagbdj

Conversation

@charlesvien

Copy link
Copy Markdown
Member

Problem

Ports PostHog/code#4064. Agents keep writing new desktop UI with @radix-ui/themes because ~500 files already do and no instruction file said not to. Every new usage is more legacy to migrate.

Changes

Docs only, under products/desktop/:

  • Root AGENTS.md gains a ## UI Components section banning @radix-ui/* imports outright, with lookup tables (layout primitives to div + Tailwind, everything else to its @posthog/quill equivalent), the replace-as-you-go expectation and two carve-outs (Radix CSS variables and the root <Theme> provider stay).
  • Reinforced in the canvas, browser-tabs and inbox feature guides, docs/conventions.md and the storybook-stories skill.

The source PR also added CLAUDE.md symlinks for the feature guides; those already exist in the monorepo so that part was dropped. The inbox guide had diverged here (Responder/finding terminology), so its two additions were re-applied on top of the monorepo version.

How did you test this code?

N/A, markdown only. Verified the relative links still resolve at the same depth under products/desktop/.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Docs update

N/A

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Claude ported this from PostHog/code#4064 at @charlesvien's direction using /porting-code-prs, applying the source patch with git am --directory=products/desktop/ to keep the original commit authorship. One add/add conflict in the inbox guide was resolved by keeping the monorepo side and re-applying the PR's two additions.

Agents keep reaching for `@radix-ui/themes` because the surrounding code
does and nothing told them not to. Make the ban explicit everywhere an
agent reads instructions.

Root AGENTS.md gains a "UI Components" section: no `@radix-ui/*` import,
ever; layout primitives (Box/Flex/Grid/Section/Container) become `div`s
with Tailwind; everything else maps to its `@posthog/quill` equivalent.
Replace Radix in the code you touch rather than matching it. Two
carve-outs are spelled out so the rule isn't over-applied — the Radix CSS
variables (`--gray-*`, `--radius-*`) stay, and the app/test `<Theme>` root
stays pending a separate migration.

Also reinforced in the feature guides (canvas, browser-tabs, inbox), in
docs/conventions.md — whose canonical component example was itself
teaching `<Box>` — and in the storybook-stories skill.

Feature guides now follow the root convention: content in AGENTS.md with
a CLAUDE.md symlink beside it, so Claude picks them up. Adds the missing
symlinks for canvas and browser-tabs, and flips inbox (CLAUDE.md became
AGENTS.md + symlink).

Docs only — no source or lint-config changes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DEM8aVRU7GGbWjMssYYoTf
@charlesvien charlesvien added the skip-agent-review Save $$$, skip auto agent reviews (Greptile) — use for trivial or chore PRs label Aug 3, 2026
@trunk-io

trunk-io Bot commented Aug 3, 2026

Copy link
Copy Markdown

😎 Merged successfully - details.

@github-actions github-actions Bot added docs Improvements or additions to documentation feature/desktop Feature Tag: Desktop labels Aug 3, 2026
@charlesvien charlesvien added the stamphog Request AI approval (no full review) label Aug 3, 2026
@greptile-apps

greptile-apps Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "docs: ban Radix in agent instructions, a..." | Re-trigger Greptile

@charlesvien
charlesvien enabled auto-merge (squash) August 3, 2026 17:14

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs-only change adding Radix-ban guidance across desktop AGENTS.md/skill files; content matches file extensions, no risky territory, no unresolved concerns.

  • 👍 on the PR from greptile-apps[bot], hex-security-app[bot].
Gate mechanics and policy version
Gate Result
prerequisites all clear
deny-list no deny categories matched
size 0L, 0F substantive, 108L/6F incl. docs/generated/snapshots — within ceiling
tier T0 auto-approve: T0-deterministic (108L, 6F, single-area, docs)
stamphog 2.0.0b4 .stamphog/policy.yml @ b929e92 · reviewed head 28b3b3e

@charlesvien

Copy link
Copy Markdown
Member Author

/trunk merge

@trunk-io
trunk-io Bot merged commit 9747b56 into master Aug 3, 2026
237 of 245 checks passed
@trunk-io
trunk-io Bot deleted the claude/remove-radix-agents-aagbdj branch August 3, 2026 18:45
@deployment-status-posthog

deployment-status-posthog Bot commented Aug 3, 2026

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-08-03 19:59 UTC Run
prod-us ✅ Deployed 2026-08-03 21:07 UTC Run
prod-eu ✅ Deployed 2026-08-03 20:22 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation feature/desktop Feature Tag: Desktop skip-agent-review Save $$$, skip auto agent reviews (Greptile) — use for trivial or chore PRs stamphog Request AI approval (no full review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants