Command Palette

Search for a command to run...

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

domain-architect

БесплатноБез исполняемых скриптовНе проверен

Discovers business domains in a Swift codebase by tracing what users can DO — not by reading folder names or architecture docs. Maps each domain's vertical…

pproencaот pproenca★ 231 звезда на GitHub

Об этом скилле

Domain Architect

You discover business domains by tracing what users can DO — the product's capabilities — and mapping each capability to a vertical slice through the architecture.

You do NOT start from folder names, architecture docs, or file counts. You start from the product.

What You Produce

A domain map — the single artifact that drives everything else:

Domain Map
├── Business Domains (vertical slices the user would recognize)
│   └── Per domain: Types, Config clients, Service reducers, UI views
├── Providers (external SDK bridges)
├── Cross-Cutting Concerns (Infra, Utils)
└── Questions (ambiguous boundaries to discuss with the team)

Once the domain map is right, folder structure, SPM targets, enforcement specs, and migration plans all follow mechanically. Get the domains wrong and everything downstream is wrong.

How Domains Work

Read references/architecture.md for the full layer spec. Read references/architecture.als for the formally verifiable model.

A domain is a user capability

Litmus test: Can you describe it to a non-engineer in one sentence?

  • "Scheduling appointments" — domain (Calendar)
  • "Collecting payments" — domain (Payments)
  • "Browsing available treatments" — domain (Treatments)
  • "Handling HTTP requests" — NOT a domain (infrastructure)
  • "Formatting dates" — NOT a domain (utils)

Each domain owns a vertical slice

Types    → pure data definitions for this domain's nouns
Config   → @DependencyClient interfaces (what you can ask for)
Repo     → implementations (how it's done — API, persistence, sync)
Service  → @Reducer state machines (business decisions)
Runtime  → dependency wiring (Config interfaces → Repo implementations)
UI       → SwiftUI views (pixels)

Not every domain needs every layer. A thin domain might only have Config + Service + UI. But Types, Config, and Service are the minimum for something to be a real domain.

Domains don't import each other's internals

Cross-domain communication happens through:

  • Delegate actions to a parent reducer
  • Shared Types (the universal vocabulary)
  • Shared Config interfaces (when two domains use the same client)

Never by importing another domain's Service or Repo.

What's NOT a domain

Thing What it is Where it lives
Error handling Cross-cutting Infra
Logging/telemetry Cross-cutting Infra
Formatters, constants Cross-cutting Utils
Sentry, Stripe SDK, APNS Provider (SDK bridge) Providers
HTTP transport, persistence engine Shared infrastructure Repo
Design system tokens Shared UI DesignSystem
Background task scheduling Platform integration Runtime

The Process

Step 1: What can users DO?

Start from the entry point. Read @main, the root reducer, the tab structure. Every child scope or tab is a candidate domain.

grep -r "@main" <project-root> --include="*.swift" -l

Read the root reducer. Trace its Scope and CombineReducers to find every child feature. Trace the tab enum to find every top-level capability.

For multi-app products (e.g., patient app + clinic app), do this for EACH app. The same business domain often appears in both apps with different verbs.

Step 2: What verbs exist?

Every @DependencyClient is a verb — a capability the system can perform.

grep -r "@DependencyClient" <project-root> --include="*.swift" -l

Read each client file. For each client, note:

  • The verbs (closure names: fetch, create, cancel, observe)
  • The nouns (types flowing through: Appointment, Treatment, Patient)
  • Which domain it belongs to (infer from the nouns)

Group clients by domain. This gives you the Config layer map.

Step 3: What nouns exist?

The nouns are in the Types layer — the universal vocabulary.

find <project-root> -name "Package.swift" -not -path "*/.build/*"

Read Package.swift files to find the Types target. Read its source files to understand the domain language: what entities exist, what IDs are typed, what operations are defined.

Step 4: Map each domain's vertical slice

For each domain discovered in Steps 1-2, trace its full vertical:

Layer Question How to find it
Types What nouns does this domain speak? Grep for domain nouns in Types package
Config What can you ask for? The @DependencyClient files from Step 2
Repo How is data fetched/stored? Grep for DataService, Repository, Store + domain nouns
Service What decisions are made? Grep for @Reducer + domain name
Runtime Where is it wired? Grep for Registration + domain name
UI What does the user see? Grep for View + domain name

Read at least one file per layer per domain. Don't guess from names.

Step 5: Identify providers

Providers wrap external SDKs. They're NOT domains — they're bridges.

L

Полный SKILL.md на GitHub

Установить domain-architect в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Glob
Grep
Write
Edit
Bash

Вложенные файлы

metadata.jsonreferences/architecture.alsreferences/architecture.mdreferences/principles.md

FAQ

Что делает скилл domain-architect?

Discovers business domains in a Swift codebase by tracing what users can DO — not by reading folder names or architecture docs. Maps each domain's vertical slice (Types → Config → Repo → Service → Runtime → UI), identifies providers (external SDK bridges), and separates cross-cutting concerns. Produces a domain map that drives all downstream decisions: folder structure, SPM targets, enforcement specs, migration plans. Use this skill whenever the user wants to understand their codebase domains, find what's cross-cutting vs domain-specific, restructure a Swift project, figure out where code belongs, or map a product's capabilities to architectural boundaries. Triggers on "what are my domains", "where does this belong", "map this codebase", "what's cross-cutting", "organize this project", "is this a domain or infra", "restructure this", "architecture review", or any request to understand the business domain structure of a Swift codebase.

Как установить скилл domain-architect?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл domain-architect запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

Сравнить domain-architect с