Agent skill · posthog
placing-product-frontend-code
Decide which tree a frontend file belongs in — `products/<name>/frontend/` or `frontend/src/scenes/<name>/` — and explain why the boundary is real rather than stylistic. Use when adding a new scene, component, or logic file for a product; when creating a new directory under `frontend/src/scenes/`; when a product has UI in both trees and you need to know which side to extend; or when moving a scene into its product. Covers the merge-queue lane cost of the split, the measurement showing a dependency graph cannot substitute for the path signal, and a report script that shows how far each product's move has gone.
What it needs
About 3k tokens when loaded.
What this skill does
Placing product frontend code A product's UI belongs in products/<name>/frontend/, not frontend/src/scenes/<name>/. About 18 products still have UI in both trees, so "there's already a folder in scenes/" is not evidence that a new file belongs there. Check before you add. The script is advisory and read-only — no baseline, no exit code to satisfy. It counts hand-written .ts/.tsx on each side, skipping generated/ (orval writes those, so they are not migration progress). Deciding where a file goes Situation Where it goes ------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------ products/<name>/frontend/ holds as much or more than scenes/<name>/ products/<name>/frontend/ — the scenes copy is a remnant The move is under way but early products/<name>/frontend/, and move the files the new code touches if that is cheap products/<name>/ exists, no scenes/<name>/ yet products/<name>/frontend/ — never create the scenes directory No product directory at all, and the feature is product-shaped Bootstrap the product: bin/hogli product:bootstrap <name>, see products/README.md App-level scene — settings, onboarding, billing, max, error-tracking shells frontend/src/scenes/ is correct; these have nowhere else to go The last row is the reason this is a skill and not a lint rule: deciding whether a new directory is a product or an app-level scene is a judgment call, and a check script that guesses gets it wrong on onboarding and settings. Migrating an existing scene wholesale is welcome and is the point of the convention. Expect that PR to report every merge-queue target once, because scenes register in products/<name>/manifest.tsx — a one-time cost per migration. Why the directory is a real boundary .github/scripts/trunk-impacted-targets.js assigns merge-queue lanes by path. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills posthog/placing-product-frontend-code