musubix 3.4.1 → 3.4.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 (95) hide show
  1. package/README.md +50 -315
  2. package/bin/musubix.js +1 -9
  3. package/dist/index.d.ts +25 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +74 -0
  6. package/dist/index.js.map +1 -0
  7. package/package.json +51 -57
  8. package/.github/AGENTS.md +0 -949
  9. package/.github/prompts/sdd-change-apply.prompt.md +0 -283
  10. package/.github/prompts/sdd-change-archive.prompt.md +0 -241
  11. package/.github/prompts/sdd-change-init.prompt.md +0 -269
  12. package/.github/prompts/sdd-design.prompt.md +0 -250
  13. package/.github/prompts/sdd-implement.prompt.md +0 -387
  14. package/.github/prompts/sdd-requirements.prompt.md +0 -193
  15. package/.github/prompts/sdd-review.prompt.md +0 -155
  16. package/.github/prompts/sdd-security.prompt.md +0 -228
  17. package/.github/prompts/sdd-steering.prompt.md +0 -269
  18. package/.github/prompts/sdd-tasks.prompt.md +0 -255
  19. package/.github/prompts/sdd-test.prompt.md +0 -230
  20. package/.github/prompts/sdd-validate.prompt.md +0 -304
  21. package/.github/skills/musubix-adr-generation/SKILL.md +0 -209
  22. package/.github/skills/musubix-best-practices/SKILL.md +0 -315
  23. package/.github/skills/musubix-c4-design/SKILL.md +0 -162
  24. package/.github/skills/musubix-code-generation/SKILL.md +0 -237
  25. package/.github/skills/musubix-domain-inference/SKILL.md +0 -196
  26. package/.github/skills/musubix-ears-validation/SKILL.md +0 -161
  27. package/.github/skills/musubix-sdd-workflow/SKILL.md +0 -217
  28. package/.github/skills/musubix-technical-writing/SKILL.md +0 -444
  29. package/.github/skills/musubix-test-generation/SKILL.md +0 -212
  30. package/.github/skills/musubix-traceability/SKILL.md +0 -141
  31. package/AGENTS.md +0 -1134
  32. package/LICENSE +0 -21
  33. package/README.ja.md +0 -313
  34. package/bin/musubix-mcp.js +0 -15
  35. package/docs/API-REFERENCE.md +0 -1425
  36. package/docs/GITHUB-ACTIONS-NPM-SETUP.md +0 -132
  37. package/docs/INSTALL-GUIDE.ja.md +0 -459
  38. package/docs/INSTALL-GUIDE.md +0 -459
  39. package/docs/MIGRATION-v3.0.md +0 -324
  40. package/docs/MUSUBI-enhancement_roadmap_20260105.md +0 -651
  41. package/docs/MUSUBIX-v3.0-User-Guide.md +0 -1357
  42. package/docs/MUSUBIXv2.2.0-Manual-outline.md +0 -136
  43. package/docs/MUSUBIXv2.2.0-Manual.md +0 -3123
  44. package/docs/MUSUBIXv2.3.5-Refactering.md +0 -1310
  45. package/docs/MUSUBIv1.6.1-enhancement_roadmap_20260105.md +0 -291
  46. package/docs/MUSUBIv2.2.0-USERGUIDE.md +0 -2079
  47. package/docs/ROADMAP-v1.5.md +0 -116
  48. package/docs/SwarmCoding.md +0 -1284
  49. package/docs/Test-prompt.md +0 -105
  50. package/docs/USER-GUIDE-v1.8.0.md +0 -2371
  51. package/docs/USER-GUIDE.ja.md +0 -2147
  52. package/docs/USER-GUIDE.md +0 -3022
  53. package/docs/YATA-GLOBAL-GUIDE.ja.md +0 -750
  54. package/docs/YATA-GLOBAL-GUIDE.md +0 -595
  55. package/docs/YATA-LOCAL-GUIDE.ja.md +0 -989
  56. package/docs/YATA-LOCAL-GUIDE.md +0 -730
  57. package/docs/adr/0001-real-time-pattern-learning-architecture-for-v1-5-0.md +0 -75
  58. package/docs/adr/0002-pattern-sharing-protocol-for-cross-team-collaborat.md +0 -79
  59. package/docs/adr/0003-owl-2-rl-implementation-strategy-for-advanced-infe.md +0 -90
  60. package/docs/adr/ADR-v3.4.0-001-deep-research-architecture.md +0 -217
  61. package/docs/adr/ADR-v3.4.0-002-search-provider-selection.md +0 -308
  62. package/docs/adr/ADR-v3.4.0-003-lm-api-integration.md +0 -475
  63. package/docs/enterprise-knowledge-management.md +0 -1737
  64. package/docs/evolution-from-musubi-to-musubix.md +0 -2170
  65. package/docs/getting-started-with-sdd.md +0 -1602
  66. package/docs/moodle-refactering-codegraph-musubix.md +0 -391
  67. package/docs/moodle-refactering-codegraph.md +0 -278
  68. package/docs/overview/MUSUBIX-CodeGraph.md +0 -322
  69. package/docs/overview/MUSUBIX-Core.md +0 -671
  70. package/docs/overview/MUSUBIX-Decisions.md +0 -494
  71. package/docs/overview/MUSUBIX-FormalVerify.md +0 -566
  72. package/docs/overview/MUSUBIX-Knowledge.md +0 -1231
  73. package/docs/overview/MUSUBIX-Learning.md +0 -837
  74. package/docs/overview/MUSUBIX-MCP-Server.md +0 -535
  75. package/docs/overview/MUSUBIX-Overview.md +0 -264
  76. package/docs/overview/MUSUBIX-Phase1-Complete.md +0 -271
  77. package/docs/overview/MUSUBIX-Phase2-Complete.md +0 -310
  78. package/docs/overview/MUSUBIX-Policy.md +0 -477
  79. package/docs/overview/MUSUBIX-Roadmap-v2.md +0 -399
  80. package/docs/overview/MUSUBIX-Security-Plan.md +0 -939
  81. package/docs/overview/MUSUBIX-Security-v2.1.md +0 -668
  82. package/docs/overview/MUSUBIX-Security.md +0 -891
  83. package/docs/overview/MUSUBIX-YATA.md +0 -666
  84. package/docs/overview/MUSUBIX-v2.2.0-Advanced-Learning.md +0 -513
  85. package/docs/overview/Neuro-SymbolicAI.md +0 -159
  86. package/docs/packages/knowledge.md +0 -594
  87. package/docs/qiita-linux-kernel-knowledge-graph.md +0 -596
  88. package/scripts/generate-quality-gate-report.ts +0 -106
  89. package/scripts/postinstall.js +0 -94
  90. package/steering/.musubi-version +0 -1
  91. package/steering/product.ja.md +0 -572
  92. package/steering/project.yml +0 -66
  93. package/steering/rules/constitution.md +0 -491
  94. package/steering/structure.ja.md +0 -503
  95. package/steering/tech.ja.md +0 -208
@@ -1,255 +0,0 @@
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
@@ -1,230 +0,0 @@
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
- ```