isolating-product-facade-contracts
БесплатноБез исполняемых скриптовНе проверенPlan and execute product isolation migrations to a facade plus contract layer in PostHog, following the Visual review architecture. Use when a product still…
от PostHog★ 41 278 звёзд на GitHubОб этом скилле
Isolating a product with facade and contracts
Before you choose a product to isolate, check things already tried. It records which product was the first candidate, and why the field test moved to another one.
Use this skill to migrate an existing product to the isolated architecture used by Visual review. Optimize for short calendar exposure, not small diffs: authoring is cheap and the verification chain catches mechanical breakage, while human review latency and a fast-moving master are the real bottlenecks. Default to one PR structured in reviewable commits; a separate facade-first PR exists only as the merge base for team-sliced sweeps — per the PR strategy below.
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.
Core docs to load first
Read these before changing code:
- products/architecture.md
- products/README.md
- docs/internal/monorepo-layout.md
- posthog/models/team/README.md (team extension model rule)
- docs/published/handbook/engineering/type-system.md (serializer/OpenAPI type flow)
- docs/published/handbook/engineering/ai/implementing-mcp-tools.md (schema quality and team isolation expectations)
- .agents/security.md (SQL/HogQL security guidelines)
Use Visual review as the concrete reference implementation:
- products/visual_review/backend/facade/contracts.py
- products/visual_review/backend/facade/api.py
- products/visual_review/backend/presentation/views.py
- products/visual_review/backend/presentation/serializers.py
- products/visual_review/backend/logic/
- products/visual_review/backend/tests/test_api.py
- products/visual_review/backend/tests/test_presentation.py
Before changing code, get the baseline:
hogli product:maturity <name> # scores models and codegen
hogli product:lint <name> # structural lint: product.yaml, root files, markers, backend:test
hogli product:isolate:scan <name> # the recon: import map, coupling gate, preflight (see below)
rg -F 'products.<name>.' hoglint.ledger # the product's blocking boundary debt, one line per finding
hoglint check --all --rule public-surface | rg -F 'products.<name>.' # crossings into it (report only)
First, read the baseline to learn which migration phase you're in — you don't start
knowing whether this is untouched or mid-flight, and that decides where you pick up.
The signals are all in the output above; there is no status file to consult (a hand-kept
one would drift). The product's rows are the status: its public-surface rows, which
only report and so live in Hoglint's output rather than the ledger, and its lines in
hoglint.ledger. Both shrink as modules finish:
- Fresh — no
backend/facade/, andpublic-surfacereports code that reaches the product's internals. Start at step 1. - Mid-sweep —
facade/contracts.py+facade/api.pyexist but core still imports internals (scan still lists model-access/etc., orpublic-surfacestill reports rows into the product). The facade design is settled; continue migrating callers (step 4) — don't redesign it. - Mid presentation-wave — the sweep is done, but the ledger still holds
presentation-uses-facadelines for the product. Resume the presentation wave on exactly those deferred modules. - Effectively done — no
public-surfacerows into the product and nopresentation-uses-facadelines left for it. Verify against the done criteria instead of changing anything.
The scan does the recon that would otherwise cost a dozen ad-hoc greps, and is the source of truth for the rest of the flow:
- References by kind — every cross-boundary reference to the product's internals,
classified (model-access, query-runner, celery-task, temporal-wiring, test-fixture,
string-reference) with the facade pattern each kind maps to. This is the sweep
checklist; string references (
@patch(...)mock paths, dotted names in config) are included, which import-oriented grepping misses. - Core-coupling count — picks the PR strategy below: near zero means the
Установить isolating-product-facade-contracts в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл isolating-product-facade-contracts?
Plan and execute product isolation migrations to a facade plus contract layer in PostHog, following the Visual review architecture. Use when a product still exposes internals (models/logic/views) across boundaries and needs migration toward contracts.py + facade/api.py + presentation separation, with a PR strategy that minimizes review latency and conflicts with parallel work.
Как установить скилл isolating-product-facade-contracts?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл isolating-product-facade-contracts запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic