musubix 3.6.0 → 3.6.1
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.
- package/.github/AGENTS.md +949 -0
- package/.github/prompts/sdd-change-apply.prompt.md +283 -0
- package/.github/prompts/sdd-change-archive.prompt.md +241 -0
- package/.github/prompts/sdd-change-init.prompt.md +269 -0
- package/.github/prompts/sdd-design.prompt.md +250 -0
- package/.github/prompts/sdd-implement.prompt.md +387 -0
- package/.github/prompts/sdd-requirements.prompt.md +193 -0
- package/.github/prompts/sdd-review.prompt.md +155 -0
- package/.github/prompts/sdd-security.prompt.md +228 -0
- package/.github/prompts/sdd-steering.prompt.md +269 -0
- package/.github/prompts/sdd-tasks.prompt.md +255 -0
- package/.github/prompts/sdd-test.prompt.md +230 -0
- package/.github/prompts/sdd-validate.prompt.md +304 -0
- package/.github/skills/musubix-adr-generation/SKILL.md +209 -0
- package/.github/skills/musubix-best-practices/SKILL.md +315 -0
- package/.github/skills/musubix-c4-design/SKILL.md +162 -0
- package/.github/skills/musubix-code-generation/SKILL.md +237 -0
- package/.github/skills/musubix-domain-inference/SKILL.md +196 -0
- package/.github/skills/musubix-ears-validation/SKILL.md +161 -0
- package/.github/skills/musubix-sdd-workflow/SKILL.md +217 -0
- package/.github/skills/musubix-technical-writing/SKILL.md +444 -0
- package/.github/skills/musubix-test-generation/SKILL.md +212 -0
- package/.github/skills/musubix-traceability/SKILL.md +141 -0
- package/AGENTS.md +1136 -0
- package/LICENSE +21 -0
- package/README.ja.md +313 -0
- package/README.md +315 -50
- package/bin/musubix-mcp.js +15 -0
- package/bin/musubix.js +9 -1
- package/docs/API-REFERENCE.md +1425 -0
- package/docs/GITHUB-ACTIONS-NPM-SETUP.md +132 -0
- package/docs/INSTALL-GUIDE.ja.md +459 -0
- package/docs/INSTALL-GUIDE.md +459 -0
- package/docs/MIGRATION-v3.0.md +324 -0
- package/docs/MUSUBI-enhancement_roadmap_20260105.md +651 -0
- package/docs/MUSUBIX-v3.0-User-Guide.md +1357 -0
- package/docs/MUSUBIXv2.2.0-Manual-outline.md +136 -0
- package/docs/MUSUBIXv2.2.0-Manual.md +3123 -0
- package/docs/MUSUBIXv2.3.5-Refactering.md +1310 -0
- package/docs/MUSUBIv1.6.1-enhancement_roadmap_20260105.md +291 -0
- package/docs/MUSUBIv2.2.0-USERGUIDE.md +2079 -0
- package/docs/ROADMAP-v1.5.md +116 -0
- package/docs/SwarmCoding.md +1284 -0
- package/docs/Test-prompt.md +105 -0
- package/docs/USER-GUIDE-v1.8.0.md +2371 -0
- package/docs/USER-GUIDE.ja.md +2147 -0
- package/docs/USER-GUIDE.md +3022 -0
- package/docs/YATA-GLOBAL-GUIDE.ja.md +750 -0
- package/docs/YATA-GLOBAL-GUIDE.md +595 -0
- package/docs/YATA-LOCAL-GUIDE.ja.md +989 -0
- package/docs/YATA-LOCAL-GUIDE.md +730 -0
- package/docs/adr/0001-real-time-pattern-learning-architecture-for-v1-5-0.md +75 -0
- package/docs/adr/0002-pattern-sharing-protocol-for-cross-team-collaborat.md +79 -0
- package/docs/adr/0003-owl-2-rl-implementation-strategy-for-advanced-infe.md +90 -0
- package/docs/adr/ADR-v3.4.0-001-deep-research-architecture.md +217 -0
- package/docs/adr/ADR-v3.4.0-002-search-provider-selection.md +308 -0
- package/docs/adr/ADR-v3.4.0-003-lm-api-integration.md +475 -0
- package/docs/enterprise-knowledge-management.md +1737 -0
- package/docs/evolution-from-musubi-to-musubix.md +2170 -0
- package/docs/experiments/EXPERIMENT-ASSISTANT-AXIS-DRIFT-DETECTION.md +155 -0
- package/docs/getting-started-with-sdd.md +1602 -0
- package/docs/moodle-refactering-codegraph-musubix.md +391 -0
- package/docs/moodle-refactering-codegraph.md +278 -0
- package/docs/overview/MUSUBIX-CodeGraph.md +322 -0
- package/docs/overview/MUSUBIX-Core.md +671 -0
- package/docs/overview/MUSUBIX-Decisions.md +494 -0
- package/docs/overview/MUSUBIX-FormalVerify.md +566 -0
- package/docs/overview/MUSUBIX-Knowledge.md +1231 -0
- package/docs/overview/MUSUBIX-Learning.md +837 -0
- package/docs/overview/MUSUBIX-MCP-Server.md +535 -0
- package/docs/overview/MUSUBIX-Overview.md +264 -0
- package/docs/overview/MUSUBIX-Phase1-Complete.md +271 -0
- package/docs/overview/MUSUBIX-Phase2-Complete.md +310 -0
- package/docs/overview/MUSUBIX-Policy.md +477 -0
- package/docs/overview/MUSUBIX-Roadmap-v2.md +399 -0
- package/docs/overview/MUSUBIX-Security-Plan.md +939 -0
- package/docs/overview/MUSUBIX-Security-v2.1.md +668 -0
- package/docs/overview/MUSUBIX-Security.md +891 -0
- package/docs/overview/MUSUBIX-YATA.md +666 -0
- package/docs/overview/MUSUBIX-v2.2.0-Advanced-Learning.md +513 -0
- package/docs/overview/Neuro-SymbolicAI.md +159 -0
- package/docs/packages/knowledge.md +594 -0
- package/docs/qiita/musubix-v3.6.0-fastrender-insights.md +625 -0
- package/docs/qiita-linux-kernel-knowledge-graph.md +596 -0
- package/docs/qiita-musubix-assistant-axis.md +380 -0
- package/package.json +58 -52
- package/scripts/generate-quality-gate-report.ts +106 -0
- package/scripts/postinstall.js +94 -0
- package/scripts/register-release-knowledge.ts +127 -0
- package/steering/.musubi-version +1 -0
- package/steering/product.ja.md +572 -0
- package/steering/project.yml +66 -0
- package/steering/rules/constitution.md +491 -0
- package/steering/structure.ja.md +503 -0
- package/steering/tech.ja.md +208 -0
- package/dist/index.d.ts +0 -25
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -74
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
---
|
|
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.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# MUSUBIX Domain Inference Skill
|
|
8
|
+
|
|
9
|
+
This skill guides you through automatic domain detection and component recommendations.
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
MUSUBIX supports **62 domains** with **224 predefined components**. The domain inference system automatically:
|
|
14
|
+
|
|
15
|
+
1. Detects project domain from requirements/descriptions
|
|
16
|
+
2. Recommends optimal components for that domain
|
|
17
|
+
3. Suggests architecture patterns
|
|
18
|
+
|
|
19
|
+
## Supported Domains (62)
|
|
20
|
+
|
|
21
|
+
### Business (8)
|
|
22
|
+
| Domain | Description | Key Components |
|
|
23
|
+
|--------|-------------|----------------|
|
|
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
|
+
```
|
|
90
|
+
|
|
91
|
+
## Component Inference
|
|
92
|
+
|
|
93
|
+
### Domain-Specific Components
|
|
94
|
+
|
|
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:
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
const result = domainDetector.detect(`
|
|
152
|
+
ECサイトで商品を販売し、配送追跡も行いたい。
|
|
153
|
+
在庫管理とサブスクリプション機能も必要。
|
|
154
|
+
`);
|
|
155
|
+
|
|
156
|
+
// Result:
|
|
157
|
+
// {
|
|
158
|
+
// primaryDomain: { id: 'ecommerce' },
|
|
159
|
+
// secondaryDomains: [
|
|
160
|
+
// { id: 'delivery' },
|
|
161
|
+
// { id: 'inventory' },
|
|
162
|
+
// { id: 'subscription' }
|
|
163
|
+
// ]
|
|
164
|
+
// }
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Using in Design Documents
|
|
168
|
+
|
|
169
|
+
```markdown
|
|
170
|
+
# DES-SHOP-001: ECサイト設計
|
|
171
|
+
|
|
172
|
+
## ドメイン分析
|
|
173
|
+
- **主ドメイン**: ecommerce
|
|
174
|
+
- **副ドメイン**: inventory, payment, delivery
|
|
175
|
+
|
|
176
|
+
## 推奨コンポーネント
|
|
177
|
+
|
|
178
|
+
### ecommerce ドメイン
|
|
179
|
+
| コンポーネント | 種別 | 責務 |
|
|
180
|
+
|---------------|------|------|
|
|
181
|
+
| CartService | Service | カート管理 |
|
|
182
|
+
| ProductCatalog | Service | 商品カタログ |
|
|
183
|
+
| OrderProcessor | Service | 注文処理 |
|
|
184
|
+
|
|
185
|
+
### inventory ドメイン
|
|
186
|
+
| コンポーネント | 種別 | 責務 |
|
|
187
|
+
|---------------|------|------|
|
|
188
|
+
| StockManager | Service | 在庫管理 |
|
|
189
|
+
| ReorderService | Service | 発注管理 |
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Related Skills
|
|
193
|
+
|
|
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
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
---
|
|
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.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# MUSUBIX EARS Validation Skill
|
|
8
|
+
|
|
9
|
+
This skill helps you create and validate requirements using EARS (Easy Approach to Requirements Syntax) format.
|
|
10
|
+
|
|
11
|
+
## EARS Pattern Reference
|
|
12
|
+
|
|
13
|
+
### 1. Ubiquitous Pattern
|
|
14
|
+
**Use for**: Requirements that must always be satisfied.
|
|
15
|
+
|
|
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
|
+
```
|
|
72
|
+
|
|
73
|
+
**Example**:
|
|
74
|
+
```markdown
|
|
75
|
+
IF two-factor authentication is enabled, THEN THE AuthService SHALL require a verification code.
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Validation Checklist
|
|
79
|
+
|
|
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
|
+
```
|
|
101
|
+
|
|
102
|
+
## Conversion Examples
|
|
103
|
+
|
|
104
|
+
### Natural Language → EARS
|
|
105
|
+
|
|
106
|
+
**Input**: "Users should be able to login"
|
|
107
|
+
|
|
108
|
+
**Output**:
|
|
109
|
+
```markdown
|
|
110
|
+
THE AuthenticationModule SHALL authenticate users with valid credentials.
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**Input**: "Show error when password is wrong"
|
|
114
|
+
|
|
115
|
+
**Output**:
|
|
116
|
+
```markdown
|
|
117
|
+
WHEN invalid credentials are provided, THE AuthenticationModule SHALL display an error message.
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Input**: "Don't allow SQL injection"
|
|
121
|
+
|
|
122
|
+
**Output**:
|
|
123
|
+
```markdown
|
|
124
|
+
THE InputValidator SHALL NOT accept input containing SQL injection patterns.
|
|
125
|
+
```
|
|
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)
|
|
153
|
+
```
|
|
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
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: musubix-sdd-workflow
|
|
3
|
+
description: Guide for MUSUBIX SDD (Specification-Driven Development) workflow. Use this when asked to develop features using MUSUBIX methodology, create requirements, designs, or implement code following the 9 constitutional articles.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# MUSUBIX SDD Workflow Skill
|
|
8
|
+
|
|
9
|
+
This skill guides you through the complete SDD workflow for MUSUBIX projects.
|
|
10
|
+
|
|
11
|
+
## Prerequisites
|
|
12
|
+
|
|
13
|
+
Before starting any development task:
|
|
14
|
+
|
|
15
|
+
1. Read `steering/` directory for project context
|
|
16
|
+
2. Check `steering/rules/constitution.md` for the 9 constitutional articles
|
|
17
|
+
3. Review existing specs in `storage/specs/`
|
|
18
|
+
|
|
19
|
+
## Complete Workflow
|
|
20
|
+
|
|
21
|
+
### Phase 1: Requirements Definition
|
|
22
|
+
|
|
23
|
+
#### Step 1: Create Requirements Document (Article IV - EARS Format)
|
|
24
|
+
|
|
25
|
+
Create requirements using EARS patterns:
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
# REQ-[CATEGORY]-[NUMBER]
|
|
29
|
+
|
|
30
|
+
**種別**: [UBIQUITOUS|EVENT-DRIVEN|STATE-DRIVEN|UNWANTED|OPTIONAL]
|
|
31
|
+
**優先度**: [P0|P1|P2]
|
|
32
|
+
|
|
33
|
+
**要件**:
|
|
34
|
+
[EARS形式の要件文]
|
|
35
|
+
|
|
36
|
+
**トレーサビリティ**: DES-XXX, TEST-XXX
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
EARS Patterns:
|
|
40
|
+
- **Ubiquitous**: `THE [system] SHALL [requirement]`
|
|
41
|
+
- **Event-driven**: `WHEN [event], THE [system] SHALL [response]`
|
|
42
|
+
- **State-driven**: `WHILE [state], THE [system] SHALL [response]`
|
|
43
|
+
- **Unwanted**: `THE [system] SHALL NOT [behavior]`
|
|
44
|
+
- **Optional**: `IF [condition], THEN THE [system] SHALL [response]`
|
|
45
|
+
|
|
46
|
+
#### Step 2-3: Requirements Review Loop
|
|
47
|
+
|
|
48
|
+
Review requirements for:
|
|
49
|
+
- EARS format compliance
|
|
50
|
+
- Completeness and clarity
|
|
51
|
+
- Testability
|
|
52
|
+
- Traceability readiness
|
|
53
|
+
|
|
54
|
+
**Repeat until no issues remain.**
|
|
55
|
+
|
|
56
|
+
### Phase 2: Design
|
|
57
|
+
|
|
58
|
+
#### Step 4: Create Design Document (Article VII - Design Patterns)
|
|
59
|
+
|
|
60
|
+
Create C4 model design documents:
|
|
61
|
+
|
|
62
|
+
1. **Context Level**: System boundaries and external actors
|
|
63
|
+
2. **Container Level**: Technology choices and container composition
|
|
64
|
+
3. **Component Level**: Internal structure of containers
|
|
65
|
+
4. **Code Level**: Implementation details
|
|
66
|
+
|
|
67
|
+
Design document template:
|
|
68
|
+
```markdown
|
|
69
|
+
# DES-[CATEGORY]-[NUMBER]
|
|
70
|
+
|
|
71
|
+
## トレーサビリティ
|
|
72
|
+
- 要件: REQ-XXX
|
|
73
|
+
|
|
74
|
+
## C4モデル
|
|
75
|
+
### Level 2: Container
|
|
76
|
+
[PlantUML diagram]
|
|
77
|
+
|
|
78
|
+
## コンポーネント設計
|
|
79
|
+
[Component details]
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
#### Step 5-6: Design Review Loop
|
|
83
|
+
|
|
84
|
+
Review design for:
|
|
85
|
+
- Requirement coverage
|
|
86
|
+
- SOLID principles compliance
|
|
87
|
+
- Design pattern appropriateness
|
|
88
|
+
- Traceability to requirements
|
|
89
|
+
|
|
90
|
+
**Repeat until no issues remain.**
|
|
91
|
+
|
|
92
|
+
### Phase 3: Task Decomposition
|
|
93
|
+
|
|
94
|
+
#### Step 7: Generate Tasks
|
|
95
|
+
|
|
96
|
+
Generate implementation tasks from design:
|
|
97
|
+
|
|
98
|
+
```markdown
|
|
99
|
+
# TSK-[CATEGORY]-[NUMBER]
|
|
100
|
+
|
|
101
|
+
## 関連設計: DES-XXX
|
|
102
|
+
## 関連要件: REQ-XXX
|
|
103
|
+
|
|
104
|
+
## タスク内容
|
|
105
|
+
[Implementation task description]
|
|
106
|
+
|
|
107
|
+
## 受入基準
|
|
108
|
+
- [ ] Criterion 1
|
|
109
|
+
- [ ] Criterion 2
|
|
110
|
+
|
|
111
|
+
## 見積もり
|
|
112
|
+
[4時間以内を推奨]
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
#### Step 8-9: Task Review Loop
|
|
116
|
+
|
|
117
|
+
Review tasks for:
|
|
118
|
+
- Appropriate granularity (≤4 hours)
|
|
119
|
+
- Clear acceptance criteria
|
|
120
|
+
- Complete traceability chain
|
|
121
|
+
|
|
122
|
+
**Repeat until no issues remain.**
|
|
123
|
+
|
|
124
|
+
### Phase 4: Implementation
|
|
125
|
+
|
|
126
|
+
#### Step 10: Coding & Unit Testing (Article III - Test-First)
|
|
127
|
+
|
|
128
|
+
For each task, follow Red-Green-Blue cycle:
|
|
129
|
+
|
|
130
|
+
1. **Red**: Write failing test first
|
|
131
|
+
2. **Green**: Write minimal code to pass
|
|
132
|
+
3. **Blue**: Refactor while keeping tests green
|
|
133
|
+
|
|
134
|
+
Add requirement IDs in code comments:
|
|
135
|
+
```typescript
|
|
136
|
+
/**
|
|
137
|
+
* @see REQ-INT-001 - Neuro-Symbolic Integration
|
|
138
|
+
*/
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
#### Step 11: Integration Testing
|
|
142
|
+
|
|
143
|
+
When required by the task:
|
|
144
|
+
- Run integration tests
|
|
145
|
+
- Verify component interactions
|
|
146
|
+
- Ensure end-to-end flows work correctly
|
|
147
|
+
|
|
148
|
+
### Phase 5: Documentation & Completion
|
|
149
|
+
|
|
150
|
+
#### Step 12: Update CHANGELOG.md
|
|
151
|
+
|
|
152
|
+
Document all changes:
|
|
153
|
+
- New features
|
|
154
|
+
- Bug fixes
|
|
155
|
+
- Breaking changes
|
|
156
|
+
- Migration notes
|
|
157
|
+
|
|
158
|
+
#### Step 13: Update Other Documentation
|
|
159
|
+
|
|
160
|
+
If necessary, update:
|
|
161
|
+
- README.md
|
|
162
|
+
- USER-GUIDE.md
|
|
163
|
+
- API-REFERENCE.md
|
|
164
|
+
- AGENTS.md
|
|
165
|
+
|
|
166
|
+
#### Step 14: Git Commit & Push
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
git add .
|
|
170
|
+
git commit -m "feat/fix/chore: description"
|
|
171
|
+
git push
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Traceability Validation (Article V)
|
|
175
|
+
|
|
176
|
+
Ensure 100% traceability throughout:
|
|
177
|
+
```
|
|
178
|
+
REQ-* → DES-* → TSK-* → Code → Test
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## CLI Commands
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
# Requirements
|
|
185
|
+
npx musubix requirements analyze <file>
|
|
186
|
+
npx musubix requirements validate <file>
|
|
187
|
+
|
|
188
|
+
# Design
|
|
189
|
+
npx musubix design generate <file>
|
|
190
|
+
npx musubix design patterns <context>
|
|
191
|
+
npx musubix design traceability # REQ↔DES traceability (v3.1.0)
|
|
192
|
+
|
|
193
|
+
# Code Generation
|
|
194
|
+
npx musubix codegen generate <file>
|
|
195
|
+
npx musubix codegen status <spec> # Status transition code (v3.1.0)
|
|
196
|
+
|
|
197
|
+
# Scaffolding
|
|
198
|
+
npx musubix scaffold domain-model <name>
|
|
199
|
+
npx musubix scaffold domain-model <name> -v "Price,Email" # Value Objects (v3.1.0)
|
|
200
|
+
npx musubix scaffold domain-model <name> -s "Order,Task" # Status machines (v3.1.0)
|
|
201
|
+
|
|
202
|
+
# Traceability
|
|
203
|
+
npx musubix trace matrix
|
|
204
|
+
npx musubix trace validate
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Constitutional Articles Checklist
|
|
208
|
+
|
|
209
|
+
- [ ] **Article I**: Library-First - Is this a standalone library?
|
|
210
|
+
- [ ] **Article II**: CLI Interface - Does it expose CLI?
|
|
211
|
+
- [ ] **Article III**: Test-First - Are tests written first?
|
|
212
|
+
- [ ] **Article IV**: EARS Format - Are requirements in EARS?
|
|
213
|
+
- [ ] **Article V**: Traceability - Is everything traceable?
|
|
214
|
+
- [ ] **Article VI**: Project Memory - Did you check steering/?
|
|
215
|
+
- [ ] **Article VII**: Design Patterns - Are patterns documented?
|
|
216
|
+
- [ ] **Article VIII**: Decision Records - Is ADR created?
|
|
217
|
+
- [ ] **Article IX**: Quality Gates - Are quality checks passed?
|