musubix 2.3.7 → 2.4.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 (80) hide show
  1. package/.github/AGENTS.md +242 -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 +229 -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 +210 -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 +772 -0
  25. package/LICENSE +21 -0
  26. package/README.ja.md +302 -0
  27. package/README.md +310 -44
  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/MUSUBI-enhancement_roadmap_20260105.md +651 -0
  35. package/docs/MUSUBIXv2.2.0-Manual-outline.md +136 -0
  36. package/docs/MUSUBIXv2.2.0-Manual.md +3123 -0
  37. package/docs/MUSUBIXv2.3.5-Refactering.md +1310 -0
  38. package/docs/MUSUBIv1.6.1-enhancement_roadmap_20260105.md +291 -0
  39. package/docs/MUSUBIv2.2.0-USERGUIDE.md +2079 -0
  40. package/docs/ROADMAP-v1.5.md +116 -0
  41. package/docs/SwarmCoding.md +1284 -0
  42. package/docs/Test-prompt.md +105 -0
  43. package/docs/USER-GUIDE-v1.8.0.md +2371 -0
  44. package/docs/USER-GUIDE.ja.md +2147 -0
  45. package/docs/USER-GUIDE.md +2847 -0
  46. package/docs/adr/0001-real-time-pattern-learning-architecture-for-v1-5-0.md +75 -0
  47. package/docs/adr/0002-pattern-sharing-protocol-for-cross-team-collaborat.md +79 -0
  48. package/docs/adr/0003-owl-2-rl-implementation-strategy-for-advanced-infe.md +90 -0
  49. package/docs/evolution-from-musubi-to-musubix.md +2170 -0
  50. package/docs/getting-started-with-sdd.md +1602 -0
  51. package/docs/moodle-refactering-codegraph-musubix.md +391 -0
  52. package/docs/moodle-refactering-codegraph.md +278 -0
  53. package/docs/overview/MUSUBIX-CodeGraph.md +322 -0
  54. package/docs/overview/MUSUBIX-Core.md +671 -0
  55. package/docs/overview/MUSUBIX-FormalVerify.md +566 -0
  56. package/docs/overview/MUSUBIX-Learning.md +837 -0
  57. package/docs/overview/MUSUBIX-MCP-Server.md +535 -0
  58. package/docs/overview/MUSUBIX-Overview.md +264 -0
  59. package/docs/overview/MUSUBIX-Phase1-Complete.md +271 -0
  60. package/docs/overview/MUSUBIX-Phase2-Complete.md +310 -0
  61. package/docs/overview/MUSUBIX-Roadmap-v2.md +399 -0
  62. package/docs/overview/MUSUBIX-Security-Plan.md +939 -0
  63. package/docs/overview/MUSUBIX-Security-v2.1.md +668 -0
  64. package/docs/overview/MUSUBIX-Security.md +891 -0
  65. package/docs/overview/MUSUBIX-YATA.md +666 -0
  66. package/docs/overview/MUSUBIX-v2.2.0-Advanced-Learning.md +513 -0
  67. package/docs/overview/Neuro-SymbolicAI.md +159 -0
  68. package/package.json +72 -51
  69. package/scripts/generate-quality-gate-report.ts +106 -0
  70. package/scripts/postinstall.js +94 -0
  71. package/steering/.musubi-version +1 -0
  72. package/steering/product.ja.md +572 -0
  73. package/steering/project.yml +66 -0
  74. package/steering/rules/constitution.md +412 -0
  75. package/steering/structure.ja.md +503 -0
  76. package/steering/tech.ja.md +208 -0
  77. package/dist/index.d.ts +0 -26
  78. package/dist/index.d.ts.map +0 -1
  79. package/dist/index.js +0 -75
  80. package/dist/index.js.map +0 -1
@@ -0,0 +1,269 @@
1
+ # MUSUBIX Steering Command
2
+
3
+ Generate or update project memory (steering context).
4
+
5
+ ---
6
+
7
+ ## Instructions for AI Agent
8
+
9
+ You are executing the `musubix steering` command to generate or update the project's steering context.
10
+
11
+ ### What is Steering?
12
+
13
+ Steering provides **project memory** for AI agents. It consists of core files that document:
14
+
15
+ 1. **structure.ja.md** - Architecture patterns, directory structure
16
+ 2. **tech.ja.md** - Technology stack, frameworks
17
+ 3. **product.ja.md** - Business context, product goals
18
+ 4. **rules/constitution.md** - 9 Constitutional Articles
19
+
20
+ ### Your Task
21
+
22
+ **Mode Detection**:
23
+
24
+ 1. **Bootstrap Mode** - No steering files exist → Generate initial files
25
+ 2. **Sync Mode** - Files exist, codebase changed → Update files
26
+ 3. **Review Mode** - User wants to review → Present and suggest improvements
27
+
28
+ ---
29
+
30
+ ## Mode 1: Bootstrap (First Time)
31
+
32
+ ### Detection
33
+
34
+ - `steering/` directory doesn't exist OR
35
+ - Core files missing
36
+
37
+ ### Steps
38
+
39
+ 1. **Analyze Codebase**:
40
+ - Directory structure
41
+ - Package.json files
42
+ - TypeScript configuration
43
+ - Test framework (Vitest)
44
+
45
+ 2. **Generate Steering Files**:
46
+
47
+ **Create `steering/structure.ja.md`**:
48
+
49
+ ```markdown
50
+ # Project Structure
51
+
52
+ **Project**: MUSUBIX
53
+ **Last Updated**: {{DATE}}
54
+
55
+ ## Architecture Pattern
56
+
57
+ **Primary Pattern**: Monorepo (npm workspaces)
58
+
59
+ ## Package Structure
60
+
61
+ \`\`\`
62
+ packages/
63
+ ├── core/ # @nahisaho/musubix-core
64
+ ├── mcp-server/ # @nahisaho/musubix-mcp-server
65
+ └── yata-client/ # @nahisaho/musubix-yata-client
66
+ \`\`\`
67
+
68
+ ## Core Package Modules
69
+
70
+ \`\`\`
71
+ packages/core/src/
72
+ ├── auth/ # Authentication
73
+ ├── cli/ # CLI Interface (Article II)
74
+ ├── codegen/ # Code Generation
75
+ ├── design/ # Design Patterns
76
+ ├── error/ # Error Handling
77
+ ├── explanation/ # Explanations
78
+ ├── requirements/ # Requirements Analysis
79
+ ├── traceability/ # Traceability
80
+ ├── types/ # Type Definitions
81
+ ├── utils/ # Utilities
82
+ └── validators/ # EARS Validation
83
+ \`\`\`
84
+
85
+ ## Naming Conventions
86
+
87
+ - Files: `kebab-case.ts`
88
+ - Classes: `PascalCase`
89
+ - Functions: `camelCase`
90
+ - Constants: `SCREAMING_SNAKE_CASE`
91
+ ```
92
+
93
+ **Create `steering/tech.ja.md`**:
94
+
95
+ ```markdown
96
+ # Technology Stack
97
+
98
+ **Project**: MUSUBIX
99
+ **Last Updated**: {{DATE}}
100
+
101
+ ## Core Technologies
102
+
103
+ | Category | Technology | Version |
104
+ |----------|------------|---------|
105
+ | Language | TypeScript | ^5.3 |
106
+ | Runtime | Node.js | >= 20.0.0 |
107
+ | Package Manager | npm | >= 10.0.0 |
108
+ | Build | npm workspaces | - |
109
+ | Test | Vitest | ^1.0.0 |
110
+ | Lint | ESLint | ^8.0.0 |
111
+
112
+ ## Package Dependencies
113
+
114
+ ### @nahisaho/musubix-core
115
+
116
+ - commander: CLI framework
117
+ - chalk: Terminal styling
118
+
119
+ ### @nahisaho/musubix-mcp-server
120
+
121
+ - MCP protocol support
122
+
123
+ ### @nahisaho/musubix-yata-client
124
+
125
+ - Knowledge graph client
126
+
127
+ ## Development Tools
128
+
129
+ - TypeScript strict mode
130
+ - ESM modules (`"type": "module"`)
131
+ - Vitest for testing
132
+ ```
133
+
134
+ **Create `steering/product.ja.md`**:
135
+
136
+ ```markdown
137
+ # Product Context
138
+
139
+ **Project**: MUSUBIX
140
+ **Last Updated**: {{DATE}}
141
+
142
+ ## Product Vision
143
+
144
+ Neuro-Symbolic AI Integration System that combines:
145
+ - **Neural (LLM)**: Creative code generation
146
+ - **Symbolic (YATA)**: Knowledge graph precision
147
+
148
+ ## Target Users
149
+
150
+ - Software Developers
151
+ - AI/ML Engineers
152
+ - Development Teams
153
+
154
+ ## Core Features
155
+
156
+ 1. EARS Requirements Analysis
157
+ 2. C4 Model Design Generation
158
+ 3. Test-First Development
159
+ 4. Complete Traceability
160
+ 5. MCP Server Integration
161
+ ```
162
+
163
+ ---
164
+
165
+ ## Mode 2: Sync (Update Existing)
166
+
167
+ ### Detection
168
+
169
+ - Steering files exist
170
+ - Codebase has changes
171
+
172
+ ### Steps
173
+
174
+ 1. **Compare Current State**:
175
+ - Read existing steering files
176
+ - Analyze current codebase
177
+ - Identify discrepancies
178
+
179
+ 2. **Update Files**:
180
+ - Add new modules/packages
181
+ - Update technology versions
182
+ - Reflect architecture changes
183
+
184
+ 3. **Generate Diff Report**:
185
+
186
+ ```markdown
187
+ ## Steering Sync Report
188
+
189
+ ### Changes Detected
190
+
191
+ | File | Change | Action |
192
+ |------|--------|--------|
193
+ | structure.ja.md | New module: utils/ | Updated |
194
+ | tech.ja.md | Vitest 1.0 → 2.0 | Updated |
195
+
196
+ ### Files Updated
197
+
198
+ 1. `steering/structure.ja.md` - Added utils module
199
+ 2. `steering/tech.ja.md` - Updated Vitest version
200
+ ```
201
+
202
+ ---
203
+
204
+ ## Mode 3: Review
205
+
206
+ ### Steps
207
+
208
+ 1. **Present Current Steering**:
209
+ - Show structure.ja.md content
210
+ - Show tech.ja.md content
211
+ - Show product.ja.md content
212
+
213
+ 2. **Analyze for Improvements**:
214
+ - Missing documentation
215
+ - Outdated information
216
+ - Inconsistencies
217
+
218
+ 3. **Suggest Improvements**:
219
+
220
+ ```markdown
221
+ ## Steering Review
222
+
223
+ ### Current State
224
+
225
+ ✅ structure.ja.md - Complete
226
+ ✅ tech.ja.md - Complete
227
+ ⚠️ product.ja.md - Missing user personas
228
+
229
+ ### Recommendations
230
+
231
+ 1. Add user personas to product.ja.md
232
+ 2. Update tech stack versions
233
+ 3. Add ADR index
234
+ ```
235
+
236
+ ---
237
+
238
+ ## Constitutional Articles Reference
239
+
240
+ Always include reference to `steering/rules/constitution.md`:
241
+
242
+ | Article | Name | Summary |
243
+ |---------|------|---------|
244
+ | I | Library-First | Features in packages/ |
245
+ | II | CLI Interface | CLI for all libraries |
246
+ | III | Test-First | Red-Green-Blue |
247
+ | IV | EARS Format | Requirements syntax |
248
+ | V | Traceability | 100% tracking |
249
+ | VI | Project Memory | Read steering first |
250
+ | VII | Design Patterns | Document patterns |
251
+ | VIII | Decision Records | ADRs for decisions |
252
+ | IX | Quality Gates | Validate phases |
253
+
254
+ ---
255
+
256
+ ## Output
257
+
258
+ Save steering files to:
259
+
260
+ - `steering/structure.ja.md`
261
+ - `steering/tech.ja.md`
262
+ - `steering/product.ja.md`
263
+ - `steering/rules/constitution.md`
264
+ - `steering/project.yml`
265
+
266
+ ---
267
+
268
+ **MUSUBIX**: https://github.com/nahisaho/MUSUBIX
269
+ **Version**: 1.0.0
@@ -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