musubix 1.0.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 nahisaho
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.ja.md ADDED
@@ -0,0 +1,201 @@
1
+ # MUSUBIX - ニューロシンボリックAI統合システム
2
+
3
+ [![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen)](https://nodejs.org/)
4
+ [![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
5
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue)](https://www.typescriptlang.org/)
6
+ [![Build](https://img.shields.io/badge/build-passing-brightgreen)](https://github.com/nahisaho/MUSUBIX)
7
+ [![Tests](https://img.shields.io/badge/tests-16%20passed-brightgreen)](https://github.com/nahisaho/MUSUBIX)
8
+
9
+ > MUSUBI × YATA 統合による次世代AIコーディングシステム
10
+
11
+ ## 概要
12
+
13
+ MUSUBIXは、**ニューラル(LLM)** と **シンボリック(知識グラフ)** 推論を統合した革新的なAIコーディングシステムです。MUSUBI SDDの方法論とYATAの知識グラフ推論を組み合わせ、高品質なソフトウェア開発を支援します。
14
+
15
+ ### 特徴
16
+
17
+ - 🧠 **ニューロシンボリック統合** - LLMの創造性とYATA知識グラフの厳密性を融合
18
+ - 📋 **EARS形式要件分析** - 自然言語から正式な要件への変換・検証
19
+ - 🎨 **設計パターン推奨** - コンテキストに基づくC4モデル・ADR生成
20
+ - ✅ **テスト駆動開発** - Test-First原則による品質保証
21
+ - 🔗 **完全なトレーサビリティ** - 要件からコードまでの追跡可能性
22
+ - 💬 **一問一答形式ヒアリング** - 対話的な要件定義サポート
23
+ - 🌐 **多言語対応(i18n)** - 日本語・英語対応
24
+ - 🔒 **セキュリティスキャン** - 脆弱性検出・認証管理
25
+
26
+ ## アーキテクチャ
27
+
28
+ ```mermaid
29
+ flowchart TB
30
+ subgraph MUSUBIX["MUSUBIX System"]
31
+ subgraph Packages["Packages"]
32
+ Core["@nahisaho/musubix-core"]
33
+ MCP["@nahisaho/musubix-mcp-server"]
34
+ YATA["@nahisaho/musubix-yata-client"]
35
+ end
36
+
37
+ Core <--> MCP
38
+ MCP <--> YATA
39
+
40
+ subgraph Integration["Neuro-Symbolic Integration"]
41
+ NSI["LLM Creativity + Knowledge Graph Precision"]
42
+ end
43
+
44
+ Core --> Integration
45
+ MCP --> Integration
46
+ YATA --> Integration
47
+ end
48
+ ```
49
+
50
+ ## プロジェクト構造
51
+
52
+ | パス | 説明 |
53
+ |------|------|
54
+ | `packages/core/` | コアライブラリ(56モジュール) |
55
+ | `packages/core/auth/` | 認証・認可 |
56
+ | `packages/core/cli/` | CLIインターフェース |
57
+ | `packages/core/codegen/` | コード生成・解析 |
58
+ | `packages/core/design/` | 設計パターン・C4モデル |
59
+ | `packages/core/error/` | エラーハンドリング |
60
+ | `packages/core/explanation/` | 説明生成・可視化 |
61
+ | `packages/core/requirements/` | 要件分析・分解 |
62
+ | `packages/core/traceability/` | トレーサビリティ |
63
+ | `packages/core/types/` | 型定義 |
64
+ | `packages/core/utils/` | ユーティリティ |
65
+ | `packages/core/validators/` | EARS検証 |
66
+ | `packages/mcp-server/` | MCPサーバー(34 tools, 3 prompts) |
67
+ | `packages/yata-client/` | YATA クライアント |
68
+ | `steering/` | プロジェクトメモリ |
69
+ | `storage/` | 仕様書・成果物 |
70
+ | `templates/` | テンプレート |
71
+ | `docs/` | ドキュメント |
72
+
73
+ ## 要件
74
+
75
+ - Node.js >= 20.0.0
76
+ - npm >= 10.0.0
77
+ - TypeScript >= 5.3
78
+
79
+ ## インストール
80
+
81
+ ### npm/npx(推奨)
82
+
83
+ ```bash
84
+ # グローバルインストール
85
+ npm install -g musubix
86
+
87
+ # npx で直接実行
88
+ npx musubix init
89
+ npx musubix --help
90
+
91
+ # MCPサーバー起動
92
+ npx @nahisaho/musubix-mcp-server
93
+ npx musubix-mcp --transport stdio
94
+ ```
95
+
96
+ ### スコープ付きパッケージ
97
+
98
+ ```bash
99
+ # 個別パッケージのインストール
100
+ npm install @nahisaho/musubix-core
101
+ npm install @nahisaho/musubix-mcp-server
102
+ npm install @nahisaho/musubix-yata-client
103
+ ```
104
+
105
+ ### ソースからビルド
106
+
107
+ ```bash
108
+ git clone https://github.com/nahisaho/MUSUBIX.git
109
+ cd MUSUBIX
110
+ npm install
111
+ npm run build
112
+ ```
113
+
114
+ ## 開発
115
+
116
+ \`\`\`bash
117
+ # ビルド
118
+ npm run build
119
+
120
+ # テスト実行
121
+ npm test
122
+
123
+ # リント
124
+ npm run lint
125
+
126
+ # 型チェック
127
+ npm run type-check
128
+ \`\`\`
129
+
130
+ ## 主要機能
131
+
132
+ ### 要件定義(Article II準拠)
133
+
134
+ - **EARS検証**: Easy Approach to Requirements Syntax パターン検証
135
+ - **一問一答ヒアリング**: 対話形式での要件収集
136
+ - **要件分解**: 大きな要件を実装単位に分解
137
+ - **関連要件検索**: 類似・依存要件の自動検出
138
+
139
+ ### 設計生成(Article III準拠)
140
+
141
+ - **C4モデル生成**: Context/Container/Component/Code図
142
+ - **ADR生成**: Architecture Decision Records
143
+ - **パターン検出**: デザインパターンの自動検出・推奨
144
+ - **SOLID検証**: SOLID原則準拠チェック
145
+
146
+ ### コード生成・検証
147
+
148
+ - **静的解析**: 品質メトリクス・複雑度計算
149
+ - **セキュリティスキャン**: 脆弱性検出
150
+ - **テスト生成**: ユニット・統合テスト生成
151
+ - **カバレッジレポート**: テストカバレッジ計測
152
+
153
+ ### MCPサーバー
154
+
155
+ 34個のツールと3つのプロンプトを提供:
156
+
157
+ \`\`\`bash
158
+ # MCPサーバー起動
159
+ npx @nahisaho/musubix-mcp-server
160
+ \`\`\`
161
+
162
+ ## ドキュメント
163
+
164
+ | 文書 | 説明 |
165
+ |------|------|
166
+ | [要件定義書](storage/specs/REQ-MUSUBIX-001.md) | EARS形式の機能・非機能要件 |
167
+ | [設計書](storage/specs/DES-MUSUBIX-001.md) | C4モデル・ADRベースの設計 |
168
+ | [タスク定義書](storage/specs/TSK-MUSUBIX-001.md) | 56タスクのスプリント計画 |
169
+ | [APIリファレンス](docs/API-REFERENCE.md) | 公開API仕様 |
170
+
171
+ ## 憲法(9条)
172
+
173
+ MUSUBIXは以下の9条の憲法に準拠しています:
174
+
175
+ 1. **Specification First** - 要件が先、実装は後
176
+ 2. **Design Before Code** - 設計が先、コードは後
177
+ 3. **Single Source of Truth** - プロジェクトメモリが正
178
+ 4. **Traceability** - 要件〜コードの追跡可能性
179
+ 5. **Incremental Progress** - 小さく頻繁にデリバリー
180
+ 6. **Decision Documentation** - 決定はADRで記録
181
+ 7. **Quality Gates** - フェーズ検証必須
182
+ 8. **User-Centric** - ユーザー価値を文書化
183
+ 9. **Continuous Learning** - 振り返りと改善
184
+
185
+ ## ライセンス
186
+
187
+ MIT License - 詳細は [LICENSE](LICENSE) を参照
188
+
189
+ ## 作者
190
+
191
+ nahisaho
192
+
193
+ ## 変更履歴
194
+
195
+ [CHANGELOG.md](CHANGELOG.md) を参照
196
+
197
+ ---
198
+
199
+ **文書ID**: README
200
+ **バージョン**: 1.0.0
201
+ **最終更新**: 2026-01-02
package/README.md ADDED
@@ -0,0 +1,203 @@
1
+ # MUSUBIX - Neuro-Symbolic AI Integration System
2
+
3
+ [![CI](https://github.com/nahisaho/MUSUBIX/actions/workflows/ci.yml/badge.svg)](https://github.com/nahisaho/MUSUBIX/actions/workflows/ci.yml)
4
+ [![npm version](https://img.shields.io/npm/v/@nahisaho/musubix-core.svg)](https://www.npmjs.com/package/@nahisaho/musubix-core)
5
+ [![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen)](https://nodejs.org/)
6
+ [![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
7
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue)](https://www.typescriptlang.org/)
8
+
9
+ > Next-generation AI Coding System powered by MUSUBI × YATA Integration
10
+
11
+ **[日本語版 README](README.ja.md)**
12
+
13
+ ## Overview
14
+
15
+ MUSUBIX is an innovative AI coding system that integrates **Neural (LLM)** and **Symbolic (Knowledge Graph)** reasoning. It combines MUSUBI SDD methodology with YATA knowledge graph reasoning to support high-quality software development.
16
+
17
+ ### Features
18
+
19
+ - 🧠 **Neuro-Symbolic Integration** - Fusion of LLM creativity and YATA knowledge graph precision
20
+ - 📋 **EARS Requirements Analysis** - Conversion and validation from natural language to formal requirements
21
+ - 🎨 **Design Pattern Recommendations** - Context-based C4 model and ADR generation
22
+ - ✅ **Test-Driven Development** - Quality assurance through Test-First principles
23
+ - 🔗 **Complete Traceability** - Tracking from requirements to code
24
+ - 💬 **Interactive Q&A Hearing** - Dialogue-based requirements gathering support
25
+ - 🌐 **Internationalization (i18n)** - Japanese and English support
26
+ - 🔒 **Security Scanning** - Vulnerability detection and authentication management
27
+
28
+ ## Architecture
29
+
30
+ ```mermaid
31
+ flowchart TB
32
+ subgraph MUSUBIX["MUSUBIX System"]
33
+ subgraph Packages["Packages"]
34
+ Core["@nahisaho/musubix-core"]
35
+ MCP["@nahisaho/musubix-mcp-server"]
36
+ YATA["@nahisaho/musubix-yata-client"]
37
+ end
38
+
39
+ Core <--> MCP
40
+ MCP <--> YATA
41
+
42
+ subgraph Integration["Neuro-Symbolic Integration"]
43
+ NSI["LLM Creativity + Knowledge Graph Precision"]
44
+ end
45
+
46
+ Core --> Integration
47
+ MCP --> Integration
48
+ YATA --> Integration
49
+ end
50
+ ```
51
+
52
+ ## Project Structure
53
+
54
+ | Path | Description |
55
+ |------|-------------|
56
+ | `packages/core/` | Core library (56 modules) |
57
+ | `packages/core/auth/` | Authentication & Authorization |
58
+ | `packages/core/cli/` | CLI Interface |
59
+ | `packages/core/codegen/` | Code Generation & Analysis |
60
+ | `packages/core/design/` | Design Patterns & C4 Models |
61
+ | `packages/core/error/` | Error Handling |
62
+ | `packages/core/explanation/` | Explanation Generation & Visualization |
63
+ | `packages/core/requirements/` | Requirements Analysis & Decomposition |
64
+ | `packages/core/traceability/` | Traceability |
65
+ | `packages/core/types/` | Type Definitions |
66
+ | `packages/core/utils/` | Utilities |
67
+ | `packages/core/validators/` | EARS Validation |
68
+ | `packages/mcp-server/` | MCP Server (34 tools, 3 prompts) |
69
+ | `packages/yata-client/` | YATA Client |
70
+ | `steering/` | Project Memory |
71
+ | `storage/` | Specifications & Artifacts |
72
+ | `templates/` | Templates |
73
+ | `docs/` | Documentation |
74
+
75
+ ## Requirements
76
+
77
+ - Node.js >= 20.0.0
78
+ - npm >= 10.0.0
79
+ - TypeScript >= 5.3
80
+
81
+ ## Installation
82
+
83
+ ### npm/npx (Recommended)
84
+
85
+ ```bash
86
+ # Global installation
87
+ npm install -g musubix
88
+
89
+ # Run directly with npx
90
+ npx musubix init
91
+ npx musubix --help
92
+
93
+ # Start MCP Server
94
+ npx @nahisaho/musubix-mcp-server
95
+ npx musubix-mcp --transport stdio
96
+ ```
97
+
98
+ ### Scoped Packages
99
+
100
+ ```bash
101
+ # Install individual packages
102
+ npm install @nahisaho/musubix-core
103
+ npm install @nahisaho/musubix-mcp-server
104
+ npm install @nahisaho/musubix-yata-client
105
+ ```
106
+
107
+ ### Build from Source
108
+
109
+ ```bash
110
+ git clone https://github.com/nahisaho/MUSUBIX.git
111
+ cd MUSUBIX
112
+ npm install
113
+ npm run build
114
+ ```
115
+
116
+ ## Development
117
+
118
+ ```bash
119
+ # Build
120
+ npm run build
121
+
122
+ # Run tests
123
+ npm test
124
+
125
+ # Lint
126
+ npm run lint
127
+
128
+ # Type check
129
+ npm run type-check
130
+ ```
131
+
132
+ ## Key Features
133
+
134
+ ### Requirements Definition (Article II Compliant)
135
+
136
+ - **EARS Validation**: Easy Approach to Requirements Syntax pattern validation
137
+ - **Interactive Q&A Hearing**: Dialogue-based requirements gathering
138
+ - **Requirements Decomposition**: Breaking down large requirements into implementation units
139
+ - **Related Requirements Search**: Automatic detection of similar and dependent requirements
140
+
141
+ ### Design Generation (Article III Compliant)
142
+
143
+ - **C4 Model Generation**: Context/Container/Component/Code diagrams
144
+ - **ADR Generation**: Architecture Decision Records
145
+ - **Pattern Detection**: Automatic detection and recommendation of design patterns
146
+ - **SOLID Validation**: SOLID principle compliance checking
147
+
148
+ ### Code Generation & Verification
149
+
150
+ - **Static Analysis**: Quality metrics and complexity calculation
151
+ - **Security Scanning**: Vulnerability detection
152
+ - **Test Generation**: Unit and integration test generation
153
+ - **Coverage Reporting**: Test coverage measurement
154
+
155
+ ### MCP Server
156
+
157
+ Provides 34 tools and 3 prompts:
158
+
159
+ ```bash
160
+ # Start MCP Server
161
+ npx @nahisaho/musubix-mcp-server
162
+ ```
163
+
164
+ ## Documentation
165
+
166
+ | Document | Description |
167
+ |----------|-------------|
168
+ | [Requirements Specification](storage/specs/REQ-MUSUBIX-001.md) | EARS format functional/non-functional requirements |
169
+ | [Design Document](storage/specs/DES-MUSUBIX-001.md) | C4 model and ADR-based design |
170
+ | [Task Definition](storage/specs/TSK-MUSUBIX-001.md) | 56 tasks sprint plan |
171
+ | [API Reference](docs/API-REFERENCE.md) | Public API specification |
172
+
173
+ ## Constitutional Articles (9 Articles)
174
+
175
+ MUSUBIX adheres to the following 9 constitutional articles:
176
+
177
+ 1. **Specification First** - Requirements before implementation
178
+ 2. **Design Before Code** - Design before coding
179
+ 3. **Single Source of Truth** - Project memory is authoritative
180
+ 4. **Traceability** - Tracking from requirements to code
181
+ 5. **Incremental Progress** - Small, frequent deliveries
182
+ 6. **Decision Documentation** - Decisions recorded as ADRs
183
+ 7. **Quality Gates** - Phase validation required
184
+ 8. **User-Centric** - Document user value
185
+ 9. **Continuous Learning** - Retrospectives and improvements
186
+
187
+ ## License
188
+
189
+ MIT License - See [LICENSE](LICENSE) for details
190
+
191
+ ## Author
192
+
193
+ nahisaho
194
+
195
+ ## Changelog
196
+
197
+ See [CHANGELOG.md](CHANGELOG.md)
198
+
199
+ ---
200
+
201
+ **Document ID**: README
202
+ **Version**: 1.0.0
203
+ **Last Updated**: 2026-01-02
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "musubix",
3
+ "version": "1.0.0",
4
+ "description": "Neuro-Symbolic AI Coding System - MUSUBI × YATA Integration",
5
+ "type": "module",
6
+ "workspaces": [
7
+ "packages/*"
8
+ ],
9
+ "bin": {
10
+ "musubix": "./packages/core/bin/musubix.js",
11
+ "musubix-mcp": "./packages/mcp-server/bin/musubix-mcp.js"
12
+ },
13
+ "files": [
14
+ "packages/*/dist",
15
+ "packages/*/bin",
16
+ "README.md",
17
+ "LICENSE"
18
+ ],
19
+ "scripts": {
20
+ "build": "npm run build --workspaces --if-present",
21
+ "test": "vitest run",
22
+ "test:unit": "vitest run --dir packages/*/src/__tests__",
23
+ "test:integration": "vitest run --dir packages/*/__tests__",
24
+ "test:coverage": "vitest run --coverage",
25
+ "lint": "eslint packages/*/src --ext .ts",
26
+ "lint:fix": "eslint packages/*/src --ext .ts --fix",
27
+ "clean": "npm run clean --workspaces --if-present",
28
+ "typecheck": "npm run typecheck --workspaces --if-present",
29
+ "prepublishOnly": "npm run build"
30
+ },
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "https://github.com/nahisaho/MUSUBIX.git"
34
+ },
35
+ "keywords": [
36
+ "ai",
37
+ "neuro-symbolic",
38
+ "coding-assistant",
39
+ "mcp",
40
+ "musubi",
41
+ "yata"
42
+ ],
43
+ "author": "nahisaho",
44
+ "license": "MIT",
45
+ "engines": {
46
+ "node": ">=20.0.0"
47
+ },
48
+ "devDependencies": {
49
+ "@types/node": "^20.10.0",
50
+ "@typescript-eslint/eslint-plugin": "^6.13.0",
51
+ "@typescript-eslint/parser": "^6.13.0",
52
+ "eslint": "^8.55.0",
53
+ "typescript": "^5.3.0",
54
+ "vitest": "^4.0.16"
55
+ },
56
+ "dependencies": {
57
+ "@modelcontextprotocol/sdk": "1.25.1",
58
+ "@nahisaho/musubix-core": "^1.0.0",
59
+ "@nahisaho/musubix-mcp-server": "^1.0.0",
60
+ "@nahisaho/musubix-yata-client": "^1.0.0"
61
+ }
62
+ }
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * MUSUBIX CLI Entry Point
4
+ *
5
+ * @see REQ-ARC-002 - CLI Interface
6
+ *
7
+ * Usage:
8
+ * npx @musubix/core
9
+ * npx musubix
10
+ * musubix <command> [options]
11
+ */
12
+
13
+ import { createProgram } from '../dist/cli/base.js';
14
+ import { registerCommands } from '../dist/cli/commands/index.js';
15
+
16
+ const program = createProgram();
17
+ registerCommands(program);
18
+ program.parse();
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * MUSUBIX MCP Server Entry Point
4
+ *
5
+ * Starts the MCP server for AI platform integration.
6
+ *
7
+ * @see REQ-INT-102 - MCP Server
8
+ *
9
+ * Usage:
10
+ * npx @musubix/mcp-server
11
+ * musubix-mcp --transport stdio
12
+ * musubix-mcp --transport sse --port 8080
13
+ */
14
+
15
+ import { startServer, VERSION } from '../dist/index.js';
16
+ import { parseArgs } from 'node:util';
17
+
18
+ const options = {
19
+ transport: {
20
+ type: 'string',
21
+ short: 't',
22
+ default: 'stdio'
23
+ },
24
+ port: {
25
+ type: 'string',
26
+ short: 'p',
27
+ default: '3000'
28
+ },
29
+ help: {
30
+ type: 'boolean',
31
+ short: 'h',
32
+ default: false
33
+ },
34
+ version: {
35
+ type: 'boolean',
36
+ short: 'v',
37
+ default: false
38
+ }
39
+ };
40
+
41
+ const { values } = parseArgs({ options, allowPositionals: true });
42
+
43
+ if (values.help) {
44
+ console.log(`
45
+ MUSUBIX MCP Server - Model Context Protocol Server for AI Platforms
46
+
47
+ Usage:
48
+ musubix-mcp [options]
49
+
50
+ Options:
51
+ -t, --transport <type> Transport type: stdio | sse (default: stdio)
52
+ -p, --port <port> Port for SSE transport (default: 3000)
53
+ -h, --help Show this help message
54
+ -v, --version Show version
55
+
56
+ Examples:
57
+ musubix-mcp # Start with stdio transport
58
+ musubix-mcp -t sse -p 8080 # Start SSE server on port 8080
59
+ npx @musubix/mcp-server # Run via npx
60
+ `);
61
+ process.exit(0);
62
+ }
63
+
64
+ if (values.version) {
65
+ console.log(`@musubix/mcp-server v${VERSION}`);
66
+ process.exit(0);
67
+ }
68
+
69
+ // Start the MCP server
70
+ startServer({
71
+ transport: values.transport,
72
+ port: parseInt(values.port, 10)
73
+ });