musubix 3.5.1 → 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.
Files changed (99) hide show
  1. package/.github/AGENTS.md +949 -0
  2. package/.github/prompts/sdd-change-apply.prompt.md +283 -0
  3. package/.github/prompts/sdd-change-archive.prompt.md +241 -0
  4. package/.github/prompts/sdd-change-init.prompt.md +269 -0
  5. package/.github/prompts/sdd-design.prompt.md +250 -0
  6. package/.github/prompts/sdd-implement.prompt.md +387 -0
  7. package/.github/prompts/sdd-requirements.prompt.md +193 -0
  8. package/.github/prompts/sdd-review.prompt.md +155 -0
  9. package/.github/prompts/sdd-security.prompt.md +228 -0
  10. package/.github/prompts/sdd-steering.prompt.md +269 -0
  11. package/.github/prompts/sdd-tasks.prompt.md +255 -0
  12. package/.github/prompts/sdd-test.prompt.md +230 -0
  13. package/.github/prompts/sdd-validate.prompt.md +304 -0
  14. package/.github/skills/musubix-adr-generation/SKILL.md +209 -0
  15. package/.github/skills/musubix-best-practices/SKILL.md +315 -0
  16. package/.github/skills/musubix-c4-design/SKILL.md +162 -0
  17. package/.github/skills/musubix-code-generation/SKILL.md +237 -0
  18. package/.github/skills/musubix-domain-inference/SKILL.md +196 -0
  19. package/.github/skills/musubix-ears-validation/SKILL.md +161 -0
  20. package/.github/skills/musubix-sdd-workflow/SKILL.md +217 -0
  21. package/.github/skills/musubix-technical-writing/SKILL.md +444 -0
  22. package/.github/skills/musubix-test-generation/SKILL.md +212 -0
  23. package/.github/skills/musubix-traceability/SKILL.md +141 -0
  24. package/AGENTS.md +1136 -0
  25. package/LICENSE +21 -0
  26. package/README.ja.md +313 -0
  27. package/README.md +315 -50
  28. package/bin/musubix-mcp.js +15 -0
  29. package/bin/musubix.js +9 -1
  30. package/docs/API-REFERENCE.md +1425 -0
  31. package/docs/GITHUB-ACTIONS-NPM-SETUP.md +132 -0
  32. package/docs/INSTALL-GUIDE.ja.md +459 -0
  33. package/docs/INSTALL-GUIDE.md +459 -0
  34. package/docs/MIGRATION-v3.0.md +324 -0
  35. package/docs/MUSUBI-enhancement_roadmap_20260105.md +651 -0
  36. package/docs/MUSUBIX-v3.0-User-Guide.md +1357 -0
  37. package/docs/MUSUBIXv2.2.0-Manual-outline.md +136 -0
  38. package/docs/MUSUBIXv2.2.0-Manual.md +3123 -0
  39. package/docs/MUSUBIXv2.3.5-Refactering.md +1310 -0
  40. package/docs/MUSUBIv1.6.1-enhancement_roadmap_20260105.md +291 -0
  41. package/docs/MUSUBIv2.2.0-USERGUIDE.md +2079 -0
  42. package/docs/ROADMAP-v1.5.md +116 -0
  43. package/docs/SwarmCoding.md +1284 -0
  44. package/docs/Test-prompt.md +105 -0
  45. package/docs/USER-GUIDE-v1.8.0.md +2371 -0
  46. package/docs/USER-GUIDE.ja.md +2147 -0
  47. package/docs/USER-GUIDE.md +3022 -0
  48. package/docs/YATA-GLOBAL-GUIDE.ja.md +750 -0
  49. package/docs/YATA-GLOBAL-GUIDE.md +595 -0
  50. package/docs/YATA-LOCAL-GUIDE.ja.md +989 -0
  51. package/docs/YATA-LOCAL-GUIDE.md +730 -0
  52. package/docs/adr/0001-real-time-pattern-learning-architecture-for-v1-5-0.md +75 -0
  53. package/docs/adr/0002-pattern-sharing-protocol-for-cross-team-collaborat.md +79 -0
  54. package/docs/adr/0003-owl-2-rl-implementation-strategy-for-advanced-infe.md +90 -0
  55. package/docs/adr/ADR-v3.4.0-001-deep-research-architecture.md +217 -0
  56. package/docs/adr/ADR-v3.4.0-002-search-provider-selection.md +308 -0
  57. package/docs/adr/ADR-v3.4.0-003-lm-api-integration.md +475 -0
  58. package/docs/enterprise-knowledge-management.md +1737 -0
  59. package/docs/evolution-from-musubi-to-musubix.md +2170 -0
  60. package/docs/experiments/EXPERIMENT-ASSISTANT-AXIS-DRIFT-DETECTION.md +155 -0
  61. package/docs/getting-started-with-sdd.md +1602 -0
  62. package/docs/moodle-refactering-codegraph-musubix.md +391 -0
  63. package/docs/moodle-refactering-codegraph.md +278 -0
  64. package/docs/overview/MUSUBIX-CodeGraph.md +322 -0
  65. package/docs/overview/MUSUBIX-Core.md +671 -0
  66. package/docs/overview/MUSUBIX-Decisions.md +494 -0
  67. package/docs/overview/MUSUBIX-FormalVerify.md +566 -0
  68. package/docs/overview/MUSUBIX-Knowledge.md +1231 -0
  69. package/docs/overview/MUSUBIX-Learning.md +837 -0
  70. package/docs/overview/MUSUBIX-MCP-Server.md +535 -0
  71. package/docs/overview/MUSUBIX-Overview.md +264 -0
  72. package/docs/overview/MUSUBIX-Phase1-Complete.md +271 -0
  73. package/docs/overview/MUSUBIX-Phase2-Complete.md +310 -0
  74. package/docs/overview/MUSUBIX-Policy.md +477 -0
  75. package/docs/overview/MUSUBIX-Roadmap-v2.md +399 -0
  76. package/docs/overview/MUSUBIX-Security-Plan.md +939 -0
  77. package/docs/overview/MUSUBIX-Security-v2.1.md +668 -0
  78. package/docs/overview/MUSUBIX-Security.md +891 -0
  79. package/docs/overview/MUSUBIX-YATA.md +666 -0
  80. package/docs/overview/MUSUBIX-v2.2.0-Advanced-Learning.md +513 -0
  81. package/docs/overview/Neuro-SymbolicAI.md +159 -0
  82. package/docs/packages/knowledge.md +594 -0
  83. package/docs/qiita/musubix-v3.6.0-fastrender-insights.md +625 -0
  84. package/docs/qiita-linux-kernel-knowledge-graph.md +596 -0
  85. package/docs/qiita-musubix-assistant-axis.md +380 -0
  86. package/package.json +58 -52
  87. package/scripts/generate-quality-gate-report.ts +106 -0
  88. package/scripts/postinstall.js +94 -0
  89. package/scripts/register-release-knowledge.ts +127 -0
  90. package/steering/.musubi-version +1 -0
  91. package/steering/product.ja.md +572 -0
  92. package/steering/project.yml +66 -0
  93. package/steering/rules/constitution.md +491 -0
  94. package/steering/structure.ja.md +503 -0
  95. package/steering/tech.ja.md +208 -0
  96. package/dist/index.d.ts +0 -25
  97. package/dist/index.d.ts.map +0 -1
  98. package/dist/index.js +0 -74
  99. package/dist/index.js.map +0 -1
@@ -0,0 +1,255 @@
1
+ # MUSUBIX Tasks Command
2
+
3
+ Break down design into actionable implementation tasks.
4
+
5
+ ---
6
+
7
+ ## Instructions for AI Agent
8
+
9
+ You are executing the `musubix tasks [feature-name]` command to create a task breakdown document.
10
+
11
+ ### Command Format
12
+
13
+ ```bash
14
+ npx musubix tasks generate design.md
15
+ ```
16
+
17
+ ### Your Task
18
+
19
+ Generate a comprehensive task breakdown that transforms the design into actionable implementation tasks with full requirements traceability.
20
+
21
+ ---
22
+
23
+ ## Process
24
+
25
+ ### 1. Read Context
26
+
27
+ **CRITICAL**: Read these files first:
28
+
29
+ ```bash
30
+ # Design and Requirements
31
+ storage/specs/DES-{{FEATURE}}-001.md
32
+ storage/specs/REQ-{{FEATURE}}-001.md
33
+
34
+ # Steering Context
35
+ steering/structure.ja.md
36
+ steering/tech.ja.md
37
+ steering/product.ja.md
38
+ ```
39
+
40
+ ---
41
+
42
+ ### 2. Verify Prerequisites
43
+
44
+ **Check design file exists**:
45
+
46
+ ```markdown
47
+ ❌ **Error**: Design document not found
48
+
49
+ Expected: storage/specs/DES-{{FEATURE}}-001.md
50
+
51
+ Please run `npx musubix design generate` first.
52
+
53
+ Tasks cannot be created without design (Article V: Traceability).
54
+ ```
55
+
56
+ ---
57
+
58
+ ### 3. Generate Task Breakdown
59
+
60
+ **Output**: `storage/specs/TSK-{{FEATURE}}-001.md`
61
+
62
+ #### Task Structure
63
+
64
+ ```markdown
65
+ ### TSK-{{FEATURE}}-NNN: [Task Title]
66
+
67
+ **Priority**: P0/P1/P2/P3
68
+ **Story Points**: 1/2/3/5/8/13
69
+ **Estimated Hours**: N
70
+ **Status**: Not Started
71
+
72
+ **Description**:
73
+ [Clear description]
74
+
75
+ **Requirements Coverage**:
76
+ - REQ-{{COMPONENT}}-NNN: [Requirement title]
77
+
78
+ **Package**: packages/core/ | packages/mcp-server/ | packages/yata-client/
79
+
80
+ **Files to Create/Modify**:
81
+ - `packages/core/src/{{feature}}/index.ts`
82
+ - `packages/core/__tests__/unit/{{feature}}.test.ts`
83
+
84
+ **Acceptance Criteria**:
85
+ - [ ] [Criterion 1]
86
+ - [ ] [Criterion 2]
87
+
88
+ **Test-First Checklist** (Article III):
89
+ - [ ] Tests written BEFORE implementation
90
+ - [ ] Red: Failing test committed
91
+ - [ ] Green: Minimal implementation passes
92
+ - [ ] Blue: Refactored with confidence
93
+
94
+ **Dependencies**:
95
+ - TSK-{{FEATURE}}-NNN: [Dependency]
96
+ ```
97
+
98
+ ---
99
+
100
+ ### 4. Task Categories (MUSUBIX-specific)
101
+
102
+ **P0 Tasks (Critical)**:
103
+
104
+ 1. **TSK-001: Set Up Package Structure**
105
+ - Create in `packages/{{package}}/src/{{feature}}/`
106
+ - Follow Article I (Library-First)
107
+
108
+ 2. **TSK-002: Write Tests (RED)**
109
+ - Location: `packages/{{package}}/__tests__/unit/{{feature}}.test.ts`
110
+ - Test all acceptance criteria
111
+
112
+ 3. **TSK-003: Implement Code (GREEN)**
113
+ - Minimal implementation to pass tests
114
+ - Location: `packages/{{package}}/src/{{feature}}/`
115
+
116
+ 4. **TSK-004: Refactor (BLUE)**
117
+ - Improve design while tests pass
118
+ - Apply SOLID principles
119
+
120
+ 5. **TSK-005: Add CLI Command (Article II)**
121
+ - Location: `packages/core/src/cli/commands/{{feature}}.ts`
122
+ - Register in `packages/core/src/cli/index.ts`
123
+
124
+ 6. **TSK-006: Add MCP Tool (if needed)**
125
+ - Location: `packages/mcp-server/src/tools/{{feature}}-tools.ts`
126
+ - Register in `packages/mcp-server/src/server.ts`
127
+
128
+ **P1 Tasks (High)**:
129
+
130
+ 7. **TSK-007: Integration Tests**
131
+ - Location: `packages/{{package}}/__tests__/integration/`
132
+
133
+ 8. **TSK-008: Documentation**
134
+ - Update `docs/USER-GUIDE.md`
135
+ - Update `docs/API-REFERENCE.md`
136
+
137
+ ---
138
+
139
+ ### 5. Test-First Mandate (Article III)
140
+
141
+ For EVERY implementation task, create 3 separate tasks:
142
+
143
+ ```markdown
144
+ ### TSK-002: Write Tests for REQ-{{COMPONENT}}-001 (RED) 🔴
145
+
146
+ **Priority**: P0
147
+ **Story Points**: 2
148
+
149
+ **Description**:
150
+ Write failing tests for requirement REQ-{{COMPONENT}}-001
151
+
152
+ **Test File**: `packages/core/__tests__/unit/{{feature}}.test.ts`
153
+
154
+ **Acceptance Criteria**:
155
+ - [ ] Tests compile successfully
156
+ - [ ] Tests FAIL (no implementation yet)
157
+ - [ ] Tests cover all acceptance criteria
158
+
159
+ ---
160
+
161
+ ### TSK-003: Implement REQ-{{COMPONENT}}-001 (GREEN) 💚
162
+
163
+ **Priority**: P0
164
+ **Story Points**: 3
165
+ **Depends On**: TSK-002
166
+
167
+ **Description**:
168
+ Implement minimal code to pass tests
169
+
170
+ **Acceptance Criteria**:
171
+ - [ ] All tests from TSK-002 pass
172
+ - [ ] No extra functionality added
173
+
174
+ ---
175
+
176
+ ### TSK-004: Refactor REQ-{{COMPONENT}}-001 (BLUE) 💙
177
+
178
+ **Priority**: P0
179
+ **Story Points**: 2
180
+ **Depends On**: TSK-003
181
+
182
+ **Description**:
183
+ Refactor while keeping tests green
184
+
185
+ **Acceptance Criteria**:
186
+ - [ ] All tests still pass
187
+ - [ ] SOLID principles applied
188
+ - [ ] Code quality improved
189
+ ```
190
+
191
+ ---
192
+
193
+ ### 6. Task Document Template
194
+
195
+ ```markdown
196
+ # Task Breakdown: {{FEATURE_NAME}}
197
+
198
+ **Document ID**: TSK-{{FEATURE}}-001
199
+ **Version**: 1.0.0
200
+ **Date**: {{DATE}}
201
+ **Design**: DES-{{FEATURE}}-001
202
+ **Requirements**: REQ-{{FEATURE}}-001
203
+
204
+ ## Summary
205
+
206
+ | Priority | Count | Story Points |
207
+ |----------|-------|--------------|
208
+ | P0 | X | XX |
209
+ | P1 | X | XX |
210
+ | Total | X | XX |
211
+
212
+ ## Sprint Plan
213
+
214
+ ### Sprint 1 (Week 1)
215
+ - TSK-{{FEATURE}}-001: Setup
216
+ - TSK-{{FEATURE}}-002: Tests (RED)
217
+ - TSK-{{FEATURE}}-003: Implementation (GREEN)
218
+
219
+ ### Sprint 2 (Week 2)
220
+ - TSK-{{FEATURE}}-004: Refactor (BLUE)
221
+ - TSK-{{FEATURE}}-005: CLI Command
222
+
223
+ ## Task Details
224
+
225
+ ### TSK-{{FEATURE}}-001: [Title]
226
+ ...
227
+
228
+ ## Traceability Matrix
229
+
230
+ | Task | Requirement | Design | Test |
231
+ |------|-------------|--------|------|
232
+ | TSK-001 | REQ-XXX-001 | DES-XXX-001 | xxx.test.ts |
233
+
234
+ ## Definition of Done
235
+
236
+ - [ ] All tests pass
237
+ - [ ] Code reviewed
238
+ - [ ] Documentation updated
239
+ - [ ] Traceability verified
240
+ ```
241
+
242
+ ---
243
+
244
+ ### 7. MCP Tool Integration
245
+
246
+ Use MUSUBIX MCP tools:
247
+
248
+ ```
249
+ sdd_create_tasks - Generate tasks from design
250
+ ```
251
+
252
+ ---
253
+
254
+ **MUSUBIX**: https://github.com/nahisaho/MUSUBIX
255
+ **Version**: 1.0.0
@@ -0,0 +1,230 @@
1
+ # MUSUBIX Test Generation Command
2
+
3
+ Generate comprehensive tests following Test-First (Red-Green-Blue) methodology.
4
+
5
+ ---
6
+
7
+ ## Instructions for AI Agent
8
+
9
+ You are executing the `musubix test [feature-name]` command to generate tests.
10
+
11
+ ### Command Format
12
+
13
+ ```bash
14
+ npx musubix test generate <file>
15
+ npx musubix test coverage <dir>
16
+ ```
17
+
18
+ ### Your Task
19
+
20
+ Generate comprehensive tests following:
21
+
22
+ 1. Test-First (Red-Green-Blue) methodology
23
+ 2. EARS requirements coverage
24
+ 3. Result Type testing patterns
25
+ 4. Status transition testing
26
+
27
+ ---
28
+
29
+ ## Process
30
+
31
+ ### 1. Read Requirements and Design
32
+
33
+ ```bash
34
+ # Requirements (for test cases)
35
+ storage/specs/REQ-{{FEATURE}}-001.md
36
+
37
+ # Design (for component structure)
38
+ storage/specs/DES-{{FEATURE}}-001.md
39
+
40
+ # Existing implementation
41
+ packages/core/src/{{feature}}/**/*.ts
42
+ ```
43
+
44
+ ### 2. Test Categories
45
+
46
+ Generate tests for each category:
47
+
48
+ | Category | Coverage Target | Priority |
49
+ |----------|-----------------|----------|
50
+ | Unit Tests | Functions, Value Objects | P0 |
51
+ | Integration Tests | Services, Repositories | P0 |
52
+ | E2E Tests | Full workflows | P1 |
53
+ | Edge Cases | Boundary conditions | P0 |
54
+ | Error Cases | Error handling | P0 |
55
+
56
+ ### 3. Test Structure
57
+
58
+ ```typescript
59
+ import { describe, it, expect, beforeEach } from 'vitest';
60
+
61
+ describe('FeatureName', () => {
62
+ beforeEach(() => {
63
+ // Reset counters for deterministic IDs
64
+ resetFeatureCounter();
65
+ });
66
+
67
+ describe('creation', () => {
68
+ it('should create valid entity', () => {
69
+ // Arrange
70
+ const input = { ... };
71
+
72
+ // Act
73
+ const result = createEntity(input);
74
+
75
+ // Assert
76
+ expect(result.isOk()).toBe(true);
77
+ if (result.isOk()) {
78
+ expect(result.value.id).toMatch(/^ENT-\d{8}-001$/);
79
+ }
80
+ });
81
+
82
+ it('should reject invalid input', () => {
83
+ // Arrange
84
+ const input = { invalid: true };
85
+
86
+ // Act
87
+ const result = createEntity(input);
88
+
89
+ // Assert
90
+ expect(result.isErr()).toBe(true);
91
+ if (result.isErr()) {
92
+ expect(result.error.message).toContain('validation');
93
+ }
94
+ });
95
+ });
96
+ });
97
+ ```
98
+
99
+ ### 4. EARS Requirements Mapping
100
+
101
+ Each requirement must have corresponding tests:
102
+
103
+ ```typescript
104
+ /**
105
+ * REQ-AUTH-001: WHEN user provides valid credentials,
106
+ * THEN the system SHALL authenticate the user.
107
+ */
108
+ describe('REQ-AUTH-001: User Authentication', () => {
109
+ it('should authenticate user with valid credentials', async () => {
110
+ // Test implementation
111
+ });
112
+ });
113
+ ```
114
+
115
+ ### 5. Result Type Test Patterns
116
+
117
+ ```typescript
118
+ // ✅ Test both success and failure cases
119
+ describe('createPrice', () => {
120
+ it('should create valid price', () => {
121
+ const result = createPrice(1000);
122
+ expect(result.isOk()).toBe(true);
123
+ if (result.isOk()) {
124
+ expect(result.value.amount).toBe(1000);
125
+ }
126
+ });
127
+
128
+ it('should reject price below minimum', () => {
129
+ const result = createPrice(50);
130
+ expect(result.isErr()).toBe(true);
131
+ if (result.isErr()) {
132
+ expect(result.error.message).toContain('100');
133
+ }
134
+ });
135
+ });
136
+ ```
137
+
138
+ ### 6. Status Transition Testing
139
+
140
+ ```typescript
141
+ describe('Status Transitions', () => {
142
+ const validTransitions: [Status, Status][] = [
143
+ ['draft', 'active'],
144
+ ['active', 'completed'],
145
+ ['active', 'cancelled'],
146
+ ];
147
+
148
+ const invalidTransitions: [Status, Status][] = [
149
+ ['completed', 'active'],
150
+ ['cancelled', 'draft'],
151
+ ];
152
+
153
+ validTransitions.forEach(([from, to]) => {
154
+ it(`should allow transition from ${from} to ${to}`, () => {
155
+ const entity = createEntityWithStatus(from);
156
+ const result = entity.transitionTo(to);
157
+ expect(result.isOk()).toBe(true);
158
+ });
159
+ });
160
+
161
+ invalidTransitions.forEach(([from, to]) => {
162
+ it(`should reject transition from ${from} to ${to}`, () => {
163
+ const entity = createEntityWithStatus(from);
164
+ const result = entity.transitionTo(to);
165
+ expect(result.isErr()).toBe(true);
166
+ });
167
+ });
168
+ });
169
+ ```
170
+
171
+ ---
172
+
173
+ ## Output Format
174
+
175
+ ```markdown
176
+ # Test Generation Report: {{FEATURE}}
177
+
178
+ ## Summary
179
+ - **Test Files Created**: X
180
+ - **Test Cases**: X total (X unit, X integration, X e2e)
181
+ - **Requirements Covered**: X/Y (Z%)
182
+
183
+ ## Generated Test Files
184
+
185
+ ### packages/core/__tests__/{{feature}}/entity.test.ts
186
+ - X test cases
187
+ - Covers: REQ-XXX-001, REQ-XXX-002
188
+
189
+ ### packages/core/__tests__/{{feature}}/service.test.ts
190
+ - X test cases
191
+ - Covers: REQ-XXX-003, REQ-XXX-004
192
+
193
+ ## Requirements Coverage Matrix
194
+
195
+ | Requirement | Test File | Test Cases | Status |
196
+ |-------------|-----------|------------|--------|
197
+ | REQ-XXX-001 | entity.test.ts | 3 | ✅ |
198
+ | REQ-XXX-002 | entity.test.ts | 2 | ✅ |
199
+ | REQ-XXX-003 | service.test.ts | 4 | ✅ |
200
+
201
+ ## Run Tests
202
+
203
+ \`\`\`bash
204
+ npm run test -- packages/core/__tests__/{{feature}}/
205
+ npm run test:coverage
206
+ \`\`\`
207
+ ```
208
+
209
+ ---
210
+
211
+ ## Traceability
212
+
213
+ This skill implements:
214
+ - **Article III**: Test-First Imperative (テスト先行開発)
215
+ - **Article V**: Traceability Mandate (要件↔テストの追跡)
216
+
217
+ ---
218
+
219
+ ## Related Commands
220
+
221
+ ```bash
222
+ # Generate tests
223
+ npx musubix test generate <file>
224
+
225
+ # Run tests with coverage
226
+ npm run test:coverage
227
+
228
+ # Validate traceability
229
+ npx musubix trace validate
230
+ ```