musubix 3.6.1 → 3.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/.github/skills/build-fix/SKILL.md +124 -0
  2. package/.github/skills/checkpoint/SKILL.md +131 -0
  3. package/.github/skills/codemap/SKILL.md +120 -0
  4. package/.github/skills/codemap/templates/codemap-index.md +142 -0
  5. package/.github/skills/codemap/templates/package-codemap.md +160 -0
  6. package/.github/skills/context-optimizer/SKILL.md +109 -0
  7. package/.github/skills/context-optimizer/contexts/dev.md +40 -0
  8. package/.github/skills/context-optimizer/contexts/research.md +55 -0
  9. package/.github/skills/context-optimizer/contexts/review.md +49 -0
  10. package/.github/skills/e2e-runner/SKILL.md +145 -0
  11. package/.github/skills/eval-harness/SKILL.md +111 -0
  12. package/.github/skills/eval-harness/examples/capability-eval.md +158 -0
  13. package/.github/skills/eval-harness/examples/human-grader-template.md +326 -0
  14. package/.github/skills/eval-harness/examples/regression-eval.md +228 -0
  15. package/.github/skills/learning-hooks/SKILL.md +101 -0
  16. package/.github/skills/learning-hooks/templates/learned-skill-template.md +79 -0
  17. package/.github/skills/musubix-adr-generation/SKILL.md +33 -168
  18. package/.github/skills/musubix-best-practices/SKILL.md +46 -276
  19. package/.github/skills/musubix-c4-design/SKILL.md +48 -124
  20. package/.github/skills/musubix-code-generation/SKILL.md +46 -193
  21. package/.github/skills/musubix-domain-inference/SKILL.md +54 -168
  22. package/.github/skills/musubix-ears-validation/SKILL.md +49 -136
  23. package/.github/skills/musubix-sdd-workflow/SKILL.md +56 -178
  24. package/.github/skills/musubix-technical-writing/SKILL.md +45 -381
  25. package/.github/skills/musubix-test-generation/SKILL.md +52 -176
  26. package/.github/skills/musubix-traceability/SKILL.md +52 -99
  27. package/.github/skills/refactor-cleaner/SKILL.md +105 -0
  28. package/.github/skills/session-manager/SKILL.md +119 -0
  29. package/.github/skills/session-manager/scripts/session-end.sh +175 -0
  30. package/.github/skills/session-manager/scripts/session-start.sh +87 -0
  31. package/.github/skills/verification-loop/SKILL.md +111 -0
  32. package/.github/skills/verification-loop/scripts/verify.sh +305 -0
  33. package/AGENTS.md +231 -1034
  34. package/docs/CODEMAPS/CODEMAP.md +1 -0
  35. package/docs/adr/ADR-v3.7.0-001-everything-claude-code-integration.md +102 -0
  36. package/package.json +2 -2
@@ -1,196 +1,82 @@
1
1
  ---
2
2
  name: musubix-domain-inference
3
- description: 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.
3
+ description: 自動ドメイン検出・コンポーネント推論ガイド。プロジェクトドメイン特定に使用。
4
4
  license: MIT
5
5
  ---
6
6
 
7
- # MUSUBIX Domain Inference Skill
7
+ # Domain Inference Skill
8
8
 
9
- This skill guides you through automatic domain detection and component recommendations.
9
+ **62ドメイン**・**224コンポーネント**を自動検出・推奨。
10
10
 
11
- ## Overview
11
+ ## Domain Categories
12
12
 
13
- MUSUBIX supports **62 domains** with **224 predefined components**. The domain inference system automatically:
13
+ | カテゴリ | ドメイン数 | |
14
+ |---------|-----------|-----|
15
+ | **Business** | 8 | ecommerce, finance, crm, hr |
16
+ | **Healthcare** | 3 | healthcare, pharmacy, veterinary |
17
+ | **Service** | 20+ | booking, hotel, restaurant, gym |
18
+ | **Technology** | 8 | iot, security, ai, analytics |
14
19
 
15
- 1. Detects project domain from requirements/descriptions
16
- 2. Recommends optimal components for that domain
17
- 3. Suggests architecture patterns
20
+ ## Key Domains
18
21
 
19
- ## Supported Domains (62)
20
-
21
- ### Business (8)
22
- | Domain | Description | Key Components |
23
- |--------|-------------|----------------|
22
+ | Domain | 名称 | Key Components |
23
+ |--------|------|----------------|
24
24
  | ecommerce | EC・通販 | CartService, ProductCatalog, OrderProcessor |
25
- | finance | 金融 | AccountService, TransactionManager, LedgerService |
26
- | crm | 顧客管理 | CustomerService, LeadManager, OpportunityTracker |
27
- | hr | 人事 | EmployeeService, PayrollCalculator, AttendanceTracker |
28
- | marketing | マーケティング | CampaignManager, AudienceSegmenter, AnalyticsService |
29
- | inventory | 在庫管理 | StockManager, ReorderService, WarehouseController |
30
- | payment | 決済 | PaymentGateway, RefundProcessor, InvoiceGenerator |
31
- | subscription | サブスク | PlanManager, BillingService, RenewalProcessor |
32
-
33
- ### Healthcare (3)
34
- | Domain | Description | Key Components |
35
- |--------|-------------|----------------|
36
- | healthcare | ヘルスケア | PatientService, DiagnosticService, AppointmentManager |
37
- | pharmacy | 薬局 | PrescriptionManager, MedicineInventory, DosageCalculator |
38
- | veterinary | 動物病院 | PetService, VetScheduleService, VaccinationTracker |
39
-
40
- ### Service (20+)
41
- | Domain | Description | Key Components |
42
- |--------|-------------|----------------|
43
- | booking | 予約 | ReservationService, SlotManager, AvailabilityChecker |
44
- | hotel | ホテル | RoomService, CheckInManager, HousekeepingScheduler |
45
- | restaurant | 飲食店 | MenuManager, TableService, KitchenOrderSystem |
46
- | gym | フィットネス | MembershipService, ClassScheduler, TrainerAssignment |
47
- | delivery | 配送 | DeliveryService, RouteOptimizer, TrackingManager |
48
- | parking | 駐車場 | SpaceManager, EntryExitController, FeeCalculator |
49
-
50
- ### Technology (8)
51
- | Domain | Description | Key Components |
52
- |--------|-------------|----------------|
53
- | iot | IoT | DeviceManager, TelemetryProcessor, AlertService |
54
- | security | セキュリティ | AuthService, PermissionManager, AuditLogger |
55
- | ai | AI | ModelService, InferenceEngine, TrainingPipeline |
56
- | analytics | 分析 | ReportGenerator, MetricsCollector, DashboardService |
57
-
58
- ## Domain Detection
59
-
60
- ### Automatic Detection
61
-
62
- MUSUBIX analyzes text for domain keywords:
63
-
64
- ```typescript
65
- import { domainDetector } from '@nahisaho/musubix-core';
66
-
67
- const result = domainDetector.detect(`
68
- ペットの予約管理システムを作りたい。
69
- 獣医師のスケジュール管理と、ワクチン接種記録も必要。
70
- `);
71
-
72
- // Result:
73
- // {
74
- // primaryDomain: { id: 'veterinary', name: 'Veterinary', nameJa: '動物病院' },
75
- // confidence: 0.92,
76
- // matchedKeywords: ['ペット', '獣医', 'ワクチン', '予約'],
77
- // suggestedComponents: ['PetService', 'ReservationService', 'VetScheduleService']
78
- // }
79
- ```
80
-
81
- ### CLI Usage
82
-
83
- ```bash
84
- # Analyze requirements file
85
- npx musubix design patterns --detect-domain storage/specs/REQ-001.md
86
-
87
- # Get component recommendations
88
- npx musubix design generate storage/specs/REQ-001.md --infer-components
89
- ```
25
+ | finance | 金融 | AccountService, TransactionManager |
26
+ | veterinary | 動物病院 | PetService, VetScheduleService |
27
+ | booking | 予約 | ReservationService, SlotManager |
28
+ | iot | IoT | DeviceManager, TelemetryProcessor |
90
29
 
91
- ## Component Inference
30
+ ## WHEN → DO
92
31
 
93
- ### Domain-Specific Components
32
+ | WHEN | DO |
33
+ |------|-----|
34
+ | 新規プロジェクト開始 | 要件テキストからドメイン検出 |
35
+ | 複数ドメインの場合 | primaryとsecondaryを特定 |
36
+ | コンポーネント設計 | 推奨コンポーネントを適用 |
94
37
 
95
- Each domain has predefined components with:
96
- - **Type**: Service, Repository, Controller, Factory, etc.
97
- - **Layer**: Presentation, Application, Domain, Infrastructure
98
- - **Dependencies**: Required collaborators
99
- - **Patterns**: Recommended design patterns
100
- - **Methods**: Domain-specific operations
101
-
102
- ### Example: Veterinary Domain
103
-
104
- ```typescript
105
- const veterinaryComponents = [
106
- {
107
- name: 'PetService',
108
- type: 'service',
109
- layer: 'application',
110
- description: 'ペット管理のビジネスロジック',
111
- dependencies: ['PetRepository', 'PetHistoryRepository'],
112
- patterns: ['Service'],
113
- methods: [
114
- { name: 'register', returnType: 'Promise<Pet>' },
115
- { name: 'update', returnType: 'Promise<Pet>' },
116
- { name: 'getByOwner', returnType: 'Promise<Pet[]>' },
117
- { name: 'getHistory', returnType: 'Promise<PetHistory[]>' },
118
- ]
119
- },
120
- {
121
- name: 'ReservationService',
122
- type: 'service',
123
- layer: 'application',
124
- methods: [
125
- { name: 'create', returnType: 'Promise<Reservation>' },
126
- { name: 'confirm', returnType: 'Promise<Reservation>' },
127
- { name: 'cancel', returnType: 'Promise<Reservation>' },
128
- { name: 'getAvailableSlots', returnType: 'Promise<TimeSlot[]>' },
129
- ]
130
- },
131
- // ...more components
132
- ];
133
- ```
134
-
135
- ## Architecture Recommendations
136
-
137
- Based on domain, MUSUBIX recommends:
138
-
139
- | Domain Category | Architecture Style | Scaling Strategy |
140
- |-----------------|-------------------|------------------|
141
- | Business | Layered + DDD | Vertical with caching |
142
- | Technology | Microservices | Horizontal scaling |
143
- | Healthcare | Layered + Audit | Vertical with compliance |
144
- | Service | Layered | Vertical with caching |
145
-
146
- ## Multi-Domain Projects
147
-
148
- For projects spanning multiple domains:
38
+ ## Detection Example
149
39
 
150
40
  ```typescript
151
41
  const result = domainDetector.detect(`
152
- ECサイトで商品を販売し、配送追跡も行いたい。
153
- 在庫管理とサブスクリプション機能も必要。
42
+ ペットの予約管理システム。
43
+ 獣医師のスケジュール管理とワクチン接種記録。
154
44
  `);
155
-
156
- // Result:
157
45
  // {
158
- // primaryDomain: { id: 'ecommerce' },
159
- // secondaryDomains: [
160
- // { id: 'delivery' },
161
- // { id: 'inventory' },
162
- // { id: 'subscription' }
163
- // ]
46
+ // primaryDomain: { id: 'veterinary' },
47
+ // confidence: 0.92,
48
+ // matchedKeywords: ['ペット', '獣医', 'ワクチン'],
49
+ // suggestedComponents: ['PetService', 'ReservationService']
164
50
  // }
165
51
  ```
166
52
 
167
- ## Using in Design Documents
168
-
169
- ```markdown
170
- # DES-SHOP-001: ECサイト設計
53
+ ## Architecture by Category
171
54
 
172
- ## ドメイン分析
173
- - **主ドメイン**: ecommerce
174
- - **副ドメイン**: inventory, payment, delivery
55
+ | カテゴリ | アーキテクチャ | スケーリング |
56
+ |---------|---------------|-------------|
57
+ | Business | Layered + DDD | Vertical + Cache |
58
+ | Technology | Microservices | Horizontal |
59
+ | Healthcare | Layered + Audit | Vertical + Compliance |
175
60
 
176
- ## 推奨コンポーネント
61
+ ## CLI
177
62
 
178
- ### ecommerce ドメイン
179
- | コンポーネント | 種別 | 責務 |
180
- |---------------|------|------|
181
- | CartService | Service | カート管理 |
182
- | ProductCatalog | Service | 商品カタログ |
183
- | OrderProcessor | Service | 注文処理 |
184
-
185
- ### inventory ドメイン
186
- | コンポーネント | 種別 | 責務 |
187
- |---------------|------|------|
188
- | StockManager | Service | 在庫管理 |
189
- | ReorderService | Service | 発注管理 |
63
+ ```bash
64
+ npx musubix design patterns --detect-domain <file> # ドメイン検出
65
+ npx musubix design generate <file> --infer-components # コンポーネント推論
190
66
  ```
191
67
 
192
- ## Related Skills
68
+ ## 出力例
193
69
 
194
- - `musubix-c4-design` - Create architecture with inferred components
195
- - `musubix-code-generation` - Generate code for components
196
- - `musubix-sdd-workflow` - Full workflow with domain awareness
70
+ ```
71
+ ┌─────────────────────────────────────────┐
72
+ Domain Detected │
73
+ ├─────────────────────────────────────────┤
74
+ │ Primary: veterinary (動物病院) │
75
+ │ Confidence: 92% │
76
+ │ Keywords: ペット, 獣医, ワクチン │
77
+ │ Components: 5 recommended │
78
+ │ - PetService │
79
+ │ - ReservationService │
80
+ │ - VetScheduleService │
81
+ └─────────────────────────────────────────┘
82
+ ```
@@ -1,161 +1,74 @@
1
1
  ---
2
2
  name: musubix-ears-validation
3
- description: Guide for validating and creating EARS-format requirements. Use this when asked to write requirements, validate requirement syntax, or convert natural language to EARS format.
3
+ description: EARS形式要件の検証・作成ガイド。要件記述・構文検証に使用。
4
4
  license: MIT
5
5
  ---
6
6
 
7
- # MUSUBIX EARS Validation Skill
7
+ # EARS Validation Skill
8
8
 
9
- This skill helps you create and validate requirements using EARS (Easy Approach to Requirements Syntax) format.
9
+ EARS (Easy Approach to Requirements Syntax) で要件を形式化・検証。
10
10
 
11
- ## EARS Pattern Reference
11
+ ## EARS Patterns
12
12
 
13
- ### 1. Ubiquitous Pattern
14
- **Use for**: Requirements that must always be satisfied.
13
+ | パターン | 構文 | 用途 |
14
+ |---------|------|------|
15
+ | **Ubiquitous** | `THE [system] SHALL [requirement]` | 常に満たす要件 |
16
+ | **Event-driven** | `WHEN [event], THE [system] SHALL [response]` | イベント発生時 |
17
+ | **State-driven** | `WHILE [state], THE [system] SHALL [behavior]` | 特定状態中 |
18
+ | **Unwanted** | `THE [system] SHALL NOT [behavior]` | 禁止事項 |
19
+ | **Optional** | `IF [cond], THEN THE [system] SHALL [response]` | 条件付き |
15
20
 
16
- **Syntax**:
17
- ```
18
- THE [system name] SHALL [requirement]
19
- ```
20
-
21
- **Example**:
22
- ```markdown
23
- THE AuthService SHALL authenticate users with valid credentials.
24
- ```
25
-
26
- ### 2. Event-Driven Pattern
27
- **Use for**: Requirements triggered by specific events.
28
-
29
- **Syntax**:
30
- ```
31
- WHEN [trigger event], THE [system name] SHALL [response]
32
- ```
33
-
34
- **Example**:
35
- ```markdown
36
- WHEN a user submits login credentials, THE AuthService SHALL validate the credentials within 2 seconds.
37
- ```
38
-
39
- ### 3. State-Driven Pattern
40
- **Use for**: Requirements that apply while in a specific state.
41
-
42
- **Syntax**:
43
- ```
44
- WHILE [system state], THE [system name] SHALL [behavior]
45
- ```
46
-
47
- **Example**:
48
- ```markdown
49
- WHILE the system is in maintenance mode, THE API SHALL return 503 Service Unavailable.
50
- ```
51
-
52
- ### 4. Unwanted Behavior Pattern
53
- **Use for**: Behaviors that must be prevented.
54
-
55
- **Syntax**:
56
- ```
57
- THE [system name] SHALL NOT [unwanted behavior]
58
- ```
59
-
60
- **Example**:
61
- ```markdown
62
- THE AuthService SHALL NOT store passwords in plain text.
63
- ```
64
-
65
- ### 5. Optional Pattern
66
- **Use for**: Conditional requirements.
67
-
68
- **Syntax**:
69
- ```
70
- IF [condition], THEN THE [system name] SHALL [response]
71
- ```
21
+ ## WHEN → DO
72
22
 
73
- **Example**:
74
- ```markdown
75
- IF two-factor authentication is enabled, THEN THE AuthService SHALL require a verification code.
76
- ```
23
+ | WHEN | DO |
24
+ |------|-----|
25
+ | 自然言語の要件 | EARS形式に変換 |
26
+ | 要件レビュー | 6項目チェックリスト実施 |
27
+ | 要件文書作成 | テンプレートに従って記述 |
77
28
 
78
29
  ## Validation Checklist
79
30
 
80
- When validating EARS requirements, check:
81
-
82
- - [ ] **Pattern Compliance**: Does it follow one of the 5 EARS patterns?
83
- - [ ] **System Name**: Is the system/component clearly identified?
84
- - [ ] **SHALL Keyword**: Is "SHALL" used for mandatory requirements?
85
- - [ ] **Measurable**: Is the requirement testable and measurable?
86
- - [ ] **Atomic**: Does it describe a single requirement?
87
- - [ ] **No Ambiguity**: Is the language clear and unambiguous?
88
-
89
- ## CLI Commands
90
-
91
- ```bash
92
- # Validate EARS syntax
93
- npx musubix requirements validate <file>
94
-
95
- # Convert natural language to EARS
96
- npx musubix requirements analyze <file>
97
-
98
- # Map to ontology
99
- npx musubix requirements map <file>
100
- ```
31
+ - [ ] **Pattern Compliance**: 5パターンのいずれかに準拠
32
+ - [ ] **System Name**: システム名が明確
33
+ - [ ] **SHALL Keyword**: 必須要件に「SHALL」使用
34
+ - [ ] **Measurable**: テスト可能・測定可能
35
+ - [ ] **Atomic**: 単一の要件を記述
36
+ - [ ] **No Ambiguity**: 曖昧な表現がない
101
37
 
102
38
  ## Conversion Examples
103
39
 
104
- ### Natural Language EARS
40
+ | 自然言語 | EARS形式 |
41
+ |---------|---------|
42
+ | ユーザーがログインできる | `THE AuthModule SHALL authenticate users with valid credentials.` |
43
+ | パスワードが間違っている時エラー表示 | `WHEN invalid credentials are provided, THE AuthModule SHALL display an error.` |
44
+ | SQLインジェクションを許可しない | `THE InputValidator SHALL NOT accept SQL injection patterns.` |
105
45
 
106
- **Input**: "Users should be able to login"
46
+ ## Priority Levels
107
47
 
108
- **Output**:
109
- ```markdown
110
- THE AuthenticationModule SHALL authenticate users with valid credentials.
111
- ```
48
+ | 優先度 | 説明 | 用途 |
49
+ |--------|------|------|
50
+ | **P0** | 必須 | リリースブロッカー |
51
+ | **P1** | 重要 | 可能な限り実装 |
52
+ | **P2** | 任意 | 時間があれば |
112
53
 
113
- **Input**: "Show error when password is wrong"
54
+ ## CLI
114
55
 
115
- **Output**:
116
- ```markdown
117
- WHEN invalid credentials are provided, THE AuthenticationModule SHALL display an error message.
56
+ ```bash
57
+ npx musubix requirements validate <file> # EARS検証
58
+ npx musubix requirements analyze <file> # 自然言語→EARS変換
59
+ npx musubix requirements map <file> # オントロジーマッピング
118
60
  ```
119
61
 
120
- **Input**: "Don't allow SQL injection"
62
+ ## 出力例
121
63
 
122
- **Output**:
123
- ```markdown
124
- THE InputValidator SHALL NOT accept input containing SQL injection patterns.
125
64
  ```
126
-
127
- ## Priority Levels
128
-
129
- | Priority | Description | Usage |
130
- |----------|-------------|-------|
131
- | **P0** | 必須 (Must Have) | Release blocker |
132
- | **P1** | 重要 (Should Have) | Implement if possible |
133
- | **P2** | 任意 (Nice to Have) | Time permitting |
134
-
135
- ## Requirement Document Template
136
-
137
- ```markdown
138
- ### REQ-[CATEGORY]-[NUMBER]: [Title]
139
-
140
- **種別**: [UBIQUITOUS|EVENT-DRIVEN|STATE-DRIVEN|UNWANTED|OPTIONAL]
141
- **優先度**: [P0|P1|P2]
142
-
143
- **要件**:
144
- [EARS形式の要件文]
145
-
146
- **検証方法**: [Unit Test|Integration Test|E2E Test|Manual]
147
- **受入基準**:
148
- - [ ] Criterion 1
149
- - [ ] Criterion 2
150
-
151
- **トレーサビリティ**: DES-XXX, TEST-XXX
152
- **憲法準拠**: Article IV (EARS Format)
65
+ ┌─────────────────────────────────────────┐
66
+ EARS Validation Result │
67
+ ├─────────────────────────────────────────┤
68
+ Requirements: 5 validated │
69
+ │ ✅ Ubiquitous: 2 passed │
70
+ Event-driven: 2 passed │
71
+ Unwanted: 1 passed │
72
+ Issues: 0 │
73
+ └─────────────────────────────────────────┘
153
74
  ```
154
-
155
- ## Common Mistakes to Avoid
156
-
157
- 1. ❌ Using "should" instead of "SHALL"
158
- 2. ❌ Combining multiple requirements in one statement
159
- 3. ❌ Vague or unmeasurable criteria
160
- 4. ❌ Missing system name
161
- 5. ❌ Using implementation details in requirements