.agents/skills/isolating-product-facade-contracts/SKILL.md
Use this skill to migrate an existing product to the isolated architecture used by Visual review. Keep migrations incremental, with narrow PRs that avoid broad breakage.
Prerequisite: the product must already live under products/<name>/. This skill does not cover moving code out of posthog/, ee/, or other shared directories — do that first.
Read these before changing code:
Use Visual review as the concrete reference implementation:
For detailed sequencing, load references/phased-migration-plan.md.
logic.py.team_id in querysets.Team; use a Team Extension model.@validated_request or @extend_schema).hogli build:openapi) when serializer/view changes affect API schema.models, logic, presentation, non-facade modules).backend/facade/contracts.py.backend/facade/api.py.
tach.toml interfaces/dependencies when applicable.Default to several PRs instead of one big migration:
If a product has many endpoints, migrate in this order:
Treat migration as complete only when:
backend/facade only.