Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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:

  1. products/architecture.md
  2. products/README.md
  3. docs/internal/monorepo-layout.md
  4. posthog/models/team/README.md (team extension model rule)
  5. docs/published/handbook/engineering/type-system.md (serializer/OpenAPI type flow)
  6. docs/published/handbook/engineering/ai/implementing-mcp-tools.md (schema quality and team isolation expectations)
  7. .agents/security.md (SQL/HogQL security guidelines)

Use Visual review as the concrete reference implementation:

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/, and public-surface reports code that reaches the product's internals. Start at step 1.
  • Mid-sweep — facade/contracts.py + facade/api.py exist but core still imports internals (scan still lists model-access/etc., or public-surface still 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-facade lines for the product. Resume the presentation wave on exactly those deferred modules.
  • Effectively done — no public-surface rows into the product and no presentation-uses-facade lines 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
Полный SKILL.md на GitHub

Установить 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), без исполняемых скриптов.

Похожие скиллы

Сравнить isolating-product-facade-contracts с