MUSUBIX Domain Inference Skill
This skill guides you through automatic domain detection and component recommendations.
Overview
MUSUBIX supports 62 domains with 224 predefined components. The domain inference system automatically:
- Detects project domain from requirements/descriptions
- Recommends optimal components for that domain
- Suggests architecture patterns
Supported Domains (62)
Business (8)
| Domain |
Description |
Key Components |
| ecommerce |
EC・通販 |
CartService, ProductCatalog, OrderProcessor |
| finance |
金融 |
AccountService, TransactionManager, LedgerService |
| crm |
顧客管理 |
CustomerService, LeadManager, OpportunityTracker |
| hr |
人事 |
EmployeeService, PayrollCalculator, AttendanceTracker |
| marketing |
マーケティング |
CampaignManager, AudienceSegmenter, AnalyticsService |
| inventory |
在庫管理 |
StockManager, ReorderService, WarehouseController |
| payment |
決済 |
PaymentGateway, RefundProcessor, InvoiceGenerator |
| subscription |
サブスク |
PlanManager, BillingService, RenewalProcessor |
Healthcare (3)
| Domain |
Description |
Key Components |
| healthcare |
ヘルスケア |
PatientService, DiagnosticService, AppointmentManager |
| pharmacy |
薬局 |
PrescriptionManager, MedicineInventory, DosageCalculator |
| veterinary |
動物病院 |
PetService, VetScheduleService, VaccinationTracker |
Service (20+)
| Domain |
Description |
Key Components |
| booking |
予約 |
ReservationService, SlotManager, AvailabilityChecker |
| hotel |
ホテル |
RoomService, CheckInManager, HousekeepingScheduler |
| restaurant |
飲食店 |
MenuManager, TableService, KitchenOrderSystem |
| gym |
フィットネス |
MembershipService, ClassScheduler, TrainerAssignment |
| delivery |
配送 |
DeliveryService, RouteOptimizer, TrackingManager |
| parking |
駐車場 |
SpaceManager, EntryExitController, FeeCalculator |
Technology (8)
| Domain |
Description |
Key Components |
| iot |
IoT |
DeviceManager, TelemetryProcessor, AlertService |
| security |
セキュリティ |
AuthService, PermissionManager, AuditLogger |
| ai |
AI |
ModelService, InferenceEngine, TrainingPipeline |
| analytics |
分析 |
ReportGenerator, MetricsCollector, DashboardService |
Domain Detection
Automatic Detection
MUSUBIX analyzes text for domain keywords:
import { domainDetector } from '@nahisaho/musubix-core';
const result = domainDetector.detect(`
ペットの予約管理システムを作りたい。
獣医師のスケジュール管理と、ワクチン接種記録も必要。
`);
// Result:
// {
// primaryDomain: { id: 'veterinary', name: 'Veterinary', nameJa: '動物病院' },
// confidence: 0.92,
// matchedKeywords: ['ペット', '獣医', 'ワクチン', '予約'],
// suggestedComponents: ['PetService', 'ReservationService', 'VetScheduleService']
// }
CLI Usage
# Analyze requirements file
npx musubix design patterns --detect-domain storage/specs/REQ-001.md
# Get component recommendations
npx musubix design generate storage/specs/REQ-001.md --infer-components
Component Inference
Domain-Specific Components
Each domain has predefined components with:
- Type: Service, Repository, Controller, Factory, etc.
- Layer: Presentation, Application, Domain, Infrastructure
- Dependencies: Required collaborators
- Patterns: Recommended design patterns
- Methods: Domain-specific operations
Example: Veterinary Domain
const veterinaryComponents = [
{
name: 'PetService',
type: 'service',
layer: 'application',
description: 'ペット管理のビジネスロジック',
dependencies: ['PetRepository', 'PetHistoryRepository'],
patterns: ['Service'],
methods: [
{ name: 'register', returnType: 'Promise<Pet>' },
{ name: 'update', returnType: 'Promise<Pet>' },
{ name: 'getByOwner', returnType: 'Promise<Pet[]>' },
{ name: 'getHistory', returnType: 'Promise<PetHistory[]>' },
]
},
{
name: 'ReservationService',
type: 'service',
layer: 'application',
methods: [
{ name: 'create', returnType: 'Promise<Reservation>' },
{ name: 'confirm', returnType: 'Promise<Reservation>' },
{ name: 'cancel', returnType: 'Promise<Reservation>' },
{ name: 'getAvailableSlots', returnType: 'Promise<TimeSlot[]>' },
]
},
// ...more components
];
Architecture Recommendations
Based on domain, MUSUBIX recommends:
| Domain Category |
Architecture Style |
Scaling Strategy |
| Business |
Layered + DDD |
Vertical with caching |
| Technology |
Microservices |
Horizontal scaling |
| Healthcare |
Layered + Audit |
Vertical with compliance |
| Service |
Layered |
Vertical with caching |
Multi-Domain Projects
For projects spanning multiple domains:
const result = domainDetector.detect(`
ECサイトで商品を販売し、配送追跡も行いたい。
在庫管理とサブスクリプション機能も必要。
`);
// Result:
// {
// primaryDomain: { id: 'ecommerce' },
// secondaryDomains: [
// { id: 'delivery' },
// { id: 'inventory' },
// { id: 'subscription' }
// ]
// }
Using in Design Documents
# DES-SHOP-001: ECサイト設計
## ドメイン分析
- **主ドメイン**: ecommerce
- **副ドメイン**: inventory, payment, delivery
## 推奨コンポーネント
### ecommerce ドメイン
| コンポーネント | 種別 | 責務 |
|---------------|------|------|
| CartService | Service | カート管理 |
| ProductCatalog | Service | 商品カタログ |
| OrderProcessor | Service | 注文処理 |
### inventory ドメイン
| コンポーネント | 種別 | 責務 |
|---------------|------|------|
| StockManager | Service | 在庫管理 |
| ReorderService | Service | 発注管理 |
Related Skills
musubix-c4-design - Create architecture with inferred components
musubix-code-generation - Generate code for components
musubix-sdd-workflow - Full workflow with domain awareness
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: musubix-domain-inference3description: Guide for automatic domain detection and component inference. Use this when asked to identify the domain of a project and get recommended components for that domain. Use when this capability is needed.4---56# MUSUBIX Domain Inference Skill78This skill guides you through automatic domain detection and component recommendations.910## Overview1112MUSUBIX supports **62 domains** with **224 predefined components**. The domain inference system automatically:13141. Detects project domain from requirements/descriptions152. Recommends optimal components for that domain163. Suggests architecture patterns1718## Supported Domains (62)1920### Business (8)21| Domain | Description | Key Components |22|--------|-------------|----------------|23| ecommerce | EC・通販 | CartService, ProductCatalog, OrderProcessor |24| finance | 金融 | AccountService, TransactionManager, LedgerService |25| crm | 顧客管理 | CustomerService, LeadManager, OpportunityTracker |26| hr | 人事 | EmployeeService, PayrollCalculator, AttendanceTracker |27| marketing | マーケティング | CampaignManager, AudienceSegmenter, AnalyticsService |28| inventory | 在庫管理 | StockManager, ReorderService, WarehouseController |29| payment | 決済 | PaymentGateway, RefundProcessor, InvoiceGenerator |30| subscription | サブスク | PlanManager, BillingService, RenewalProcessor |3132### Healthcare (3)33| Domain | Description | Key Components |34|--------|-------------|----------------|35| healthcare | ヘルスケア | PatientService, DiagnosticService, AppointmentManager |36| pharmacy | 薬局 | PrescriptionManager, MedicineInventory, DosageCalculator |37| veterinary | 動物病院 | PetService, VetScheduleService, VaccinationTracker |3839### Service (20+)40| Domain | Description | Key Components |41|--------|-------------|----------------|42| booking | 予約 | ReservationService, SlotManager, AvailabilityChecker |43| hotel | ホテル | RoomService, CheckInManager, HousekeepingScheduler |44| restaurant | 飲食店 | MenuManager, TableService, KitchenOrderSystem |45| gym | フィットネス | MembershipService, ClassScheduler, TrainerAssignment |46| delivery | 配送 | DeliveryService, RouteOptimizer, TrackingManager |47| parking | 駐車場 | SpaceManager, EntryExitController, FeeCalculator |4849### Technology (8)50| Domain | Description | Key Components |51|--------|-------------|----------------|52| iot | IoT | DeviceManager, TelemetryProcessor, AlertService |53| security | セキュリティ | AuthService, PermissionManager, AuditLogger |54| ai | AI | ModelService, InferenceEngine, TrainingPipeline |55| analytics | 分析 | ReportGenerator, MetricsCollector, DashboardService |5657## Domain Detection5859### Automatic Detection6061MUSUBIX analyzes text for domain keywords:6263```typescript64import { domainDetector } from '@nahisaho/musubix-core';6566const result = domainDetector.detect(`67 ペットの予約管理システムを作りたい。68 獣医師のスケジュール管理と、ワクチン接種記録も必要。69`);7071// Result:72// {73// primaryDomain: { id: 'veterinary', name: 'Veterinary', nameJa: '動物病院' },74// confidence: 0.92,75// matchedKeywords: ['ペット', '獣医', 'ワクチン', '予約'],76// suggestedComponents: ['PetService', 'ReservationService', 'VetScheduleService']77// }78```7980### CLI Usage8182```bash83# Analyze requirements file84npx musubix design patterns --detect-domain storage/specs/REQ-001.md8586# Get component recommendations87npx musubix design generate storage/specs/REQ-001.md --infer-components88```8990## Component Inference9192### Domain-Specific Components9394Each domain has predefined components with:95- **Type**: Service, Repository, Controller, Factory, etc.96- **Layer**: Presentation, Application, Domain, Infrastructure97- **Dependencies**: Required collaborators98- **Patterns**: Recommended design patterns99- **Methods**: Domain-specific operations100101### Example: Veterinary Domain102103```typescript104const veterinaryComponents = [105 {106 name: 'PetService',107 type: 'service',108 layer: 'application',109 description: 'ペット管理のビジネスロジック',110 dependencies: ['PetRepository', 'PetHistoryRepository'],111 patterns: ['Service'],112 methods: [113 { name: 'register', returnType: 'Promise<Pet>' },114 { name: 'update', returnType: 'Promise<Pet>' },115 { name: 'getByOwner', returnType: 'Promise<Pet[]>' },116 { name: 'getHistory', returnType: 'Promise<PetHistory[]>' },117 ]118 },119 {120 name: 'ReservationService',121 type: 'service',122 layer: 'application',123 methods: [124 { name: 'create', returnType: 'Promise<Reservation>' },125 { name: 'confirm', returnType: 'Promise<Reservation>' },126 { name: 'cancel', returnType: 'Promise<Reservation>' },127 { name: 'getAvailableSlots', returnType: 'Promise<TimeSlot[]>' },128 ]129 },130 // ...more components131];132```133134## Architecture Recommendations135136Based on domain, MUSUBIX recommends:137138| Domain Category | Architecture Style | Scaling Strategy |139|-----------------|-------------------|------------------|140| Business | Layered + DDD | Vertical with caching |141| Technology | Microservices | Horizontal scaling |142| Healthcare | Layered + Audit | Vertical with compliance |143| Service | Layered | Vertical with caching |144145## Multi-Domain Projects146147For projects spanning multiple domains:148149```typescript150const result = domainDetector.detect(`151 ECサイトで商品を販売し、配送追跡も行いたい。152 在庫管理とサブスクリプション機能も必要。153`);154155// Result:156// {157// primaryDomain: { id: 'ecommerce' },158// secondaryDomains: [159// { id: 'delivery' },160// { id: 'inventory' },161// { id: 'subscription' }162// ]163// }164```165166## Using in Design Documents167168```markdown169# DES-SHOP-001: ECサイト設計170171## ドメイン分析172- **主ドメイン**: ecommerce173- **副ドメイン**: inventory, payment, delivery174175## 推奨コンポーネント176177### ecommerce ドメイン178| コンポーネント | 種別 | 責務 |179|---------------|------|------|180| CartService | Service | カート管理 |181| ProductCatalog | Service | 商品カタログ |182| OrderProcessor | Service | 注文処理 |183184### inventory ドメイン185| コンポーネント | 種別 | 責務 |186|---------------|------|------|187| StockManager | Service | 在庫管理 |188| ReorderService | Service | 発注管理 |189```190191## Related Skills192193- `musubix-c4-design` - Create architecture with inferred components194- `musubix-code-generation` - Generate code for components195- `musubix-sdd-workflow` - Full workflow with domain awareness196197---198> Converted and distributed by [TomeVault](https://tomevault.io/claim/nahisaho) — claim your Tome and manage your conversions.199<!-- tomevault:4.0:skill_md:2026-04-11 -->