musubix 1.6.0 → 1.7.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/AGENTS.md CHANGED
@@ -8,13 +8,13 @@
8
8
 
9
9
  | 項目 | 詳細 |
10
10
  |------|------|
11
- | **バージョン** | 1.6.0 (開発中) |
11
+ | **バージョン** | 1.7.0 (YATA Platform Enhancements) |
12
12
  | **言語** | TypeScript |
13
13
  | **ランタイム** | Node.js >= 20.0.0 |
14
14
  | **パッケージマネージャ** | npm >= 10.0.0 |
15
15
  | **ビルドシステム** | モノレポ(npm workspaces) |
16
16
  | **テストフレームワーク** | Vitest |
17
- | **テスト数** | 1208 (全合格) |
17
+ | **テスト数** | 1386 (全合格) |
18
18
  | **コンポーネント数** | 249 (62ドメイン対応) |
19
19
  | **Agent Skills** | 12 (Claude Code対応) |
20
20
 
@@ -29,10 +29,13 @@ packages/
29
29
  ├── core/ # @nahisaho/musubix-core
30
30
  ├── mcp-server/ # @nahisaho/musubix-mcp-server
31
31
  ├── yata-client/ # @nahisaho/musubix-yata-client
32
- ├── pattern-mcp/ # @nahisaho/musubix-pattern-mcp (NEW!)
33
- ├── ontology-mcp/ # @nahisaho/musubix-ontology-mcp (NEW!)
34
- ├── wake-sleep/ # @nahisaho/musubix-wake-sleep (NEW!)
35
- └── sdd-ontology/ # @nahisaho/musubix-sdd-ontology (NEW!)
32
+ ├── yata-local/ # @nahisaho/yata-local
33
+ ├── yata-global/ # @nahisaho/yata-global
34
+ ├── yata-ui/ # @nahisaho/yata-ui (NEW!)
35
+ ├── pattern-mcp/ # @nahisaho/musubix-pattern-mcp
36
+ ├── ontology-mcp/ # @nahisaho/musubix-ontology-mcp
37
+ ├── wake-sleep/ # @nahisaho/musubix-wake-sleep
38
+ └── sdd-ontology/ # @nahisaho/musubix-sdd-ontology
36
39
  ```
37
40
 
38
41
  | パッケージ | npm | 役割 |
@@ -40,6 +43,9 @@ packages/
40
43
  | `packages/core/` | `@nahisaho/musubix-core` | コアライブラリ - CLI、EARS検証、コード生成、設計パターン |
41
44
  | `packages/mcp-server/` | `@nahisaho/musubix-mcp-server` | MCPサーバー - 19ツール、3プロンプト |
42
45
  | `packages/yata-client/` | `@nahisaho/musubix-yata-client` | YATAクライアント - 知識グラフ連携 |
46
+ | `packages/yata-local/` | `@nahisaho/yata-local` | **YATA Local** - SQLiteベースローカル知識グラフ |
47
+ | `packages/yata-global/` | `@nahisaho/yata-global` | **YATA Global** - 分散型知識グラフプラットフォーム |
48
+ | `packages/yata-ui/` | `@nahisaho/yata-ui` | **YATA UI** - Web可視化・管理インターフェース (NEW!) |
43
49
  | `packages/pattern-mcp/` | `@nahisaho/musubix-pattern-mcp` | パターン学習 - 抽出・圧縮・ライブラリ |
44
50
  | `packages/ontology-mcp/` | `@nahisaho/musubix-ontology-mcp` | オントロジー - N3Store・推論エンジン |
45
51
  | `packages/wake-sleep/` | `@nahisaho/musubix-wake-sleep` | Wake-Sleep学習サイクル |
@@ -96,8 +102,11 @@ npx musubix test coverage <dir> # カバレッジ測定
96
102
 
97
103
  # トレーサビリティ
98
104
  npx musubix trace matrix # トレーサビリティマトリクス
105
+ npx musubix trace matrix -p <project> # 指定プロジェクトのマトリクス
99
106
  npx musubix trace impact <id> # 影響分析
100
107
  npx musubix trace validate # リンク検証
108
+ npx musubix trace sync # トレースマトリクス自動更新 (v1.6.7 NEW!)
109
+ npx musubix trace sync --dry-run # プレビューのみ
101
110
 
102
111
  # 説明生成
103
112
  npx musubix explain why <id> # 決定理由の説明
@@ -126,6 +135,21 @@ npx musubix repl # 対話的シェルを起動
126
135
  npx musubix repl --history <file> # カスタム履歴ファイル
127
136
  npx musubix repl --no-color # 色なしモード
128
137
 
138
+ # KGPR - Knowledge Graph Pull Request (v1.6.4 NEW!)
139
+ npx musubix kgpr create -t "title" # KGPR作成
140
+ npx musubix kgpr diff # 差分プレビュー
141
+ npx musubix kgpr list # KGPR一覧
142
+ npx musubix kgpr submit <id> # KGPR送信
143
+ npx musubix kgpr show <id> # KGPR詳細表示
144
+ npx musubix kgpr close <id> # KGPRクローズ
145
+ # オプション: --namespace <ns>, --entity-types <types>, --privacy <strict|moderate|none>
146
+
147
+ # SDDプロジェクトスキャフォールド (v1.6.7 NEW!)
148
+ npx musubix scaffold domain-model <name> # DDDプロジェクト生成
149
+ npx musubix scaffold domain-model <name> -e "Entity1,Entity2" # エンティティ指定
150
+ npx musubix scaffold domain-model <name> -d DOMAIN # ドメイン接頭辞指定
151
+ npx musubix scaffold minimal <name> # 最小構成プロジェクト
152
+
129
153
  # ヘルプ
130
154
  npx musubix --help
131
155
  npx musubix help <command>
@@ -142,7 +166,7 @@ npx @nahisaho/musubix-mcp-server
142
166
  npx musubix-mcp --transport stdio
143
167
  ```
144
168
 
145
- ### ツール一覧(19ツール)
169
+ ### ツール一覧(24ツール)
146
170
 
147
171
  #### SDD基本ツール(9ツール)
148
172
 
@@ -178,6 +202,16 @@ npx musubix-mcp --transport stdio
178
202
  | `validate_triple` | 単一トリプルの事前検証 |
179
203
  | `check_circular` | 循環依存の検出 |
180
204
 
205
+ #### KGPRツール(5ツール)- v1.6.4 NEW!
206
+
207
+ | ツール名 | 説明 |
208
+ |---------|------|
209
+ | `kgpr_create` | KGPR作成(ローカルKGからドラフト作成) |
210
+ | `kgpr_diff` | 差分プレビュー |
211
+ | `kgpr_list` | KGPR一覧表示 |
212
+ | `kgpr_submit` | KGPR送信(レビュー用) |
213
+ | `kgpr_review` | KGPRレビュー(approve/changes_requested/commented) |
214
+
181
215
  ### プロンプト一覧(3プロンプト)
182
216
 
183
217
  | プロンプト名 | 説明 |
@@ -488,5 +522,4 @@ npx musubix learn best-practices --format markdown
488
522
 
489
523
  **Agent**: GitHub Copilot / Claude
490
524
  **Last Updated**: 2026-01-06
491
- **Version**: 1.5.0
492
- **Repository**: https://github.com/nahisaho/MUSUBIX
525
+ **Version**: 1.6.4
package/README.ja.md CHANGED
@@ -6,11 +6,11 @@
6
6
  [![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen)](https://nodejs.org/)
7
7
  [![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
8
8
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue)](https://www.typescriptlang.org/)
9
- [![Tests](https://img.shields.io/badge/tests-1208%20passing-brightgreen)](https://github.com/nahisaho/MUSUBIX)
9
+ [![Tests](https://img.shields.io/badge/tests-1429%20passing-brightgreen)](https://github.com/nahisaho/MUSUBIX)
10
10
 
11
11
  > MUSUBI × YATA 統合による次世代AIコーディングシステム
12
12
  >
13
- > **v1.6.0** - REPLテスト実装&CLI統合
13
+ > **v1.7.0** - YATAプラットフォーム拡張
14
14
 
15
15
  ## 概要
16
16
 
@@ -32,6 +32,10 @@ MUSUBIXは、**ニューラル(LLM)** と **シンボリック(知識グ
32
32
  - ⚙️ **品質ゲート** - フェーズ移行前の自動品質検証
33
33
  - 🔮 **高度推論** - OWL 2 RL推論とDatalog評価 *(v1.4.5)*
34
34
  - 🖥️ **対話的REPL** - コマンド補完、履歴管理、セッション変数 *(v1.6.0)*
35
+ - 🗄️ **YATA Local** - SQLiteベースローカル知識グラフ (BFS/DFS、推論) *(v1.6.3)*
36
+ - 🌐 **YATA Global** - オフライン同期対応分散型知識プラットフォーム *(v1.6.3)*
37
+ - 📤 **KGPR** - 安全な知識共有のためのKnowledge Graph Pull Request *(v1.6.4)*
38
+ - 🚀 **YATAプラットフォーム拡張** - インデックス最適化、拡張エクスポート、グローバル同期、コード生成、Web UI *(v1.7.0)*
35
39
 
36
40
  ## アーキテクチャ
37
41
 
@@ -75,7 +79,7 @@ flowchart TB
75
79
  | `packages/core/types/` | 型定義 |
76
80
  | `packages/core/utils/` | ユーティリティ |
77
81
  | `packages/core/validators/` | EARS検証 |
78
- | `packages/mcp-server/` | MCPサーバー(19 tools, 3 prompts) |
82
+ | `packages/mcp-server/` | MCPサーバー(24 tools, 3 prompts) |
79
83
  | `packages/yata-client/` | YATA クライアント |
80
84
  | `packages/pattern-mcp/` | **パターン学習(NEW!)** |
81
85
  | `packages/ontology-mcp/` | **オントロジーエンジン(NEW!)** |
package/README.md CHANGED
@@ -7,11 +7,11 @@
7
7
  [![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen)](https://nodejs.org/)
8
8
  [![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
9
9
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue)](https://www.typescriptlang.org/)
10
- [![Tests](https://img.shields.io/badge/tests-1208%20passing-brightgreen)](https://github.com/nahisaho/MUSUBIX)
10
+ [![Tests](https://img.shields.io/badge/tests-1429%20passing-brightgreen)](https://github.com/nahisaho/MUSUBIX)
11
11
 
12
12
  > Next-generation AI Coding System powered by MUSUBI × YATA Integration
13
13
  >
14
- > **v1.6.0** - REPL Test Implementation & CLI Enhancement
14
+ > **v1.7.0** - YATA Platform Enhancements
15
15
 
16
16
  **[日本語版 README](README.ja.md)**
17
17
 
@@ -35,6 +35,10 @@ MUSUBIX is an innovative AI coding system that integrates **Neural (LLM)** and *
35
35
  - ⚙️ **Quality Gates** - Automated quality validation before phase transitions
36
36
  - 🔮 **Advanced Inference** - OWL 2 RL reasoning and Datalog evaluation *(v1.4.5)*
37
37
  - 🖥️ **Interactive REPL** - Command completion, history, session variables *(v1.6.0)*
38
+ - 🗄️ **YATA Local** - SQLite-based local knowledge graph (BFS/DFS, reasoning) *(v1.6.3)*
39
+ - 🌐 **YATA Global** - Distributed knowledge platform with offline sync *(v1.6.3)*
40
+ - 📤 **KGPR** - Knowledge Graph Pull Request for safe knowledge sharing *(v1.6.4)*
41
+ - 🚀 **YATA Platform Enhancements** - Index optimization, enhanced export, global sync, code generation, web UI *(v1.7.0)*
38
42
 
39
43
  ## Architecture
40
44
 
@@ -78,12 +82,14 @@ flowchart TB
78
82
  | `packages/core/types/` | Type Definitions |
79
83
  | `packages/core/utils/` | Utilities |
80
84
  | `packages/core/validators/` | EARS Validation |
81
- | `packages/mcp-server/` | MCP Server (19 tools, 3 prompts) |
85
+ | `packages/mcp-server/` | MCP Server (24 tools, 3 prompts) |
82
86
  | `packages/yata-client/` | YATA Client |
83
87
  | `packages/pattern-mcp/` | **Pattern Learning (NEW!)** |
84
88
  | `packages/ontology-mcp/` | **Ontology Engine (NEW!)** |
85
89
  | `packages/wake-sleep/` | **Wake-Sleep Learning (NEW!)** |
86
90
  | `packages/sdd-ontology/` | **SDD Ontology (NEW!)** |
91
+ | `packages/yata-local/` | **YATA Local - SQLite Knowledge Graph (NEW!)** |
92
+ | `packages/yata-global/` | **YATA Global - Distributed Knowledge Platform (NEW!)** |
87
93
  | `steering/` | Project Memory |
88
94
  | `storage/` | Specifications & Artifacts |
89
95
  | `templates/` | Templates |
@@ -171,7 +177,7 @@ npm run type-check
171
177
 
172
178
  ### MCP Server
173
179
 
174
- Provides 16 tools (9 SDD + 7 Pattern) and 3 prompts:
180
+ Provides 24 tools (9 SDD + 7 Pattern + 3 Ontology + 5 KGPR) and 3 prompts:
175
181
 
176
182
  ```bash
177
183
  # Start MCP Server
@@ -14,6 +14,10 @@
14
14
  - [Symbolic](#symbolic)
15
15
  - [Inference](#inference) *(v1.4.5)*
16
16
  - [REPL](#repl) *(v1.5.0)*
17
+ - [YATA Local](#yata-local) *(v1.6.3)*
18
+ - [YATA Global](#yata-global) *(v1.6.3)*
19
+ - [KGPR](#kgpr) *(v1.6.4)*
20
+ - [YATA Platform](#yata-platform) *(v1.7.0)*
17
21
  - [Validation](#validation)
18
22
  - [Utils](#utils)
19
23
  - [MCP Server](#mcp-server)
@@ -681,6 +685,206 @@ await reasoner.reason(store, { progressReporter: reporter });
681
685
 
682
686
  ---
683
687
 
688
+ ### YATA Platform (v1.7.0)
689
+
690
+ Version 1.7.0 introduces enhanced YATA platform APIs.
691
+
692
+ #### IndexOptimizer
693
+
694
+ Optimizes database indexes for improved query performance.
695
+
696
+ ```typescript
697
+ import { IndexOptimizer } from '@nahisaho/yata-local';
698
+
699
+ const optimizer = new IndexOptimizer(database);
700
+
701
+ // Analyze query patterns
702
+ const analysis = await optimizer.analyzeQueryPatterns();
703
+
704
+ // Create optimal indexes
705
+ const created = await optimizer.createOptimalIndexes();
706
+
707
+ // Check index health
708
+ const health = await optimizer.checkIndexHealth();
709
+ ```
710
+
711
+ **Methods:**
712
+
713
+ | Method | Parameters | Returns | Description |
714
+ |--------|------------|---------|-------------|
715
+ | `analyzeQueryPatterns()` | - | `QueryAnalysis` | Analyze query patterns |
716
+ | `createOptimalIndexes()` | - | `IndexCreationResult` | Create composite indexes |
717
+ | `checkIndexHealth()` | - | `IndexHealthReport` | Check fragmentation |
718
+ | `rebuildIndex(name)` | `name: string` | `void` | Rebuild specific index |
719
+
720
+ ---
721
+
722
+ #### ExportPipeline
723
+
724
+ Exports knowledge graph data with transformation support.
725
+
726
+ ```typescript
727
+ import { ExportPipeline } from '@nahisaho/yata-local';
728
+
729
+ const pipeline = new ExportPipeline(database);
730
+
731
+ // Full export
732
+ const data = await pipeline.exportFull({ namespace: 'myproject' });
733
+
734
+ // Incremental export
735
+ const changes = await pipeline.exportIncremental({
736
+ since: lastExportTime,
737
+ format: 'json'
738
+ });
739
+ ```
740
+
741
+ **Methods:**
742
+
743
+ | Method | Parameters | Returns | Description |
744
+ |--------|------------|---------|-------------|
745
+ | `exportFull(options)` | `ExportOptions` | `ExportData` | Full data export |
746
+ | `exportIncremental(options)` | `IncrementalOptions` | `ExportData` | Export changes since timestamp |
747
+ | `exportWithTransform(options)` | `TransformOptions` | `ExportData` | Export with format transformation |
748
+
749
+ **Export Formats:**
750
+
751
+ | Format | Description |
752
+ |--------|-------------|
753
+ | `json` | JSON format (default) |
754
+ | `rdf` | RDF/Turtle format |
755
+ | `ntriples` | N-Triples format |
756
+
757
+ ---
758
+
759
+ #### GlobalSyncClient
760
+
761
+ Synchronizes local knowledge graph with YATA Global.
762
+
763
+ ```typescript
764
+ import { GlobalSyncClient } from '@nahisaho/yata-global';
765
+
766
+ const client = new GlobalSyncClient({
767
+ endpoint: 'https://yata-global.example.com',
768
+ offlineMode: true
769
+ });
770
+
771
+ await client.initialize();
772
+
773
+ const result = await client.sync({
774
+ namespace: 'myproject',
775
+ direction: 'push'
776
+ });
777
+ ```
778
+
779
+ **Methods:**
780
+
781
+ | Method | Parameters | Returns | Description |
782
+ |--------|------------|---------|-------------|
783
+ | `initialize()` | - | `Promise<void>` | Initialize client |
784
+ | `sync(options)` | `SyncOptions` | `SyncResult` | Synchronize data |
785
+ | `getStatus()` | - | `SyncStatus` | Get sync status |
786
+ | `resolveConflict(id, resolution)` | `id: string, resolution: Resolution` | `void` | Resolve conflict |
787
+
788
+ ---
789
+
790
+ #### SyncEngine
791
+
792
+ Core synchronization engine with conflict resolution.
793
+
794
+ ```typescript
795
+ import { SyncEngine } from '@nahisaho/yata-global';
796
+
797
+ const engine = new SyncEngine({
798
+ conflictStrategy: 'server-wins',
799
+ batchSize: 100
800
+ });
801
+
802
+ const result = await engine.sync(localData, remoteData);
803
+ ```
804
+
805
+ **Conflict Strategies:**
806
+
807
+ | Strategy | Description |
808
+ |----------|-------------|
809
+ | `server-wins` | Server data takes precedence |
810
+ | `client-wins` | Client data takes precedence |
811
+ | `merge` | Attempt automatic merge |
812
+ | `manual` | Require manual resolution |
813
+
814
+ ---
815
+
816
+ #### CacheManager
817
+
818
+ Manages local caching for offline support.
819
+
820
+ ```typescript
821
+ import { CacheManager } from '@nahisaho/yata-global';
822
+
823
+ const cache = new CacheManager({
824
+ maxSize: 100 * 1024 * 1024, // 100MB
825
+ ttl: 24 * 60 * 60 * 1000 // 24 hours
826
+ });
827
+
828
+ await cache.set('key', data);
829
+ const cached = await cache.get('key');
830
+ ```
831
+
832
+ **Methods:**
833
+
834
+ | Method | Parameters | Returns | Description |
835
+ |--------|------------|---------|-------------|
836
+ | `get(key)` | `key: string` | `T \| undefined` | Get cached item |
837
+ | `set(key, value)` | `key: string, value: T` | `void` | Cache item |
838
+ | `has(key)` | `key: string` | `boolean` | Check if exists |
839
+ | `clearAll()` | - | `void` | Clear all cache |
840
+ | `getStats()` | - | `CacheStats` | Get cache statistics |
841
+
842
+ ---
843
+
844
+ #### YataUIServer
845
+
846
+ Web-based visualization server for knowledge graphs.
847
+
848
+ ```typescript
849
+ import { YataUIServer, createYataUIServer } from '@nahisaho/yata-ui';
850
+
851
+ const server = createYataUIServer({
852
+ port: 3000,
853
+ host: 'localhost',
854
+ cors: true,
855
+ enableRealtime: true
856
+ });
857
+
858
+ server.setDataProvider(async () => ({
859
+ nodes: await getEntities(),
860
+ edges: await getRelationships()
861
+ }));
862
+
863
+ await server.start();
864
+ ```
865
+
866
+ **Methods:**
867
+
868
+ | Method | Parameters | Returns | Description |
869
+ |--------|------------|---------|-------------|
870
+ | `start()` | - | `Promise<void>` | Start server |
871
+ | `stop()` | - | `Promise<void>` | Stop server |
872
+ | `isRunning()` | - | `boolean` | Check if running |
873
+ | `getUrl()` | - | `string` | Get server URL |
874
+ | `setDataProvider(fn)` | `DataProvider` | `void` | Set data provider |
875
+ | `broadcastUpdate(event, data)` | `event: string, data: any` | `void` | Broadcast to clients |
876
+
877
+ **Configuration:**
878
+
879
+ | Option | Type | Default | Description |
880
+ |--------|------|---------|-------------|
881
+ | `port` | `number` | `3000` | Server port |
882
+ | `host` | `string` | `localhost` | Server host |
883
+ | `cors` | `boolean` | `true` | Enable CORS |
884
+ | `enableRealtime` | `boolean` | `true` | Enable WebSocket |
885
+
886
+ ---
887
+
684
888
  ### Utils
685
889
 
686
890
  #### I18nManager
@@ -978,6 +1182,6 @@ MIT License - see [LICENSE](./LICENSE) for details.
978
1182
 
979
1183
  ---
980
1184
 
981
- **Version:** 1.4.5
982
- **Generated:** 2026-01-05
1185
+ **Version:** 1.7.0
1186
+ **Generated:** 2026-01-06
983
1187
  **MUSUBIX Core Package**
@@ -1,7 +1,7 @@
1
1
  # MUSUBIX インストールガイド
2
2
 
3
3
  **文書ID**: INSTALL-GUIDE
4
- **バージョン**: 1.6.0
4
+ **バージョン**: 1.7.0
5
5
  **最終更新**: 2026-01-06
6
6
 
7
7
  ---
@@ -1,7 +1,7 @@
1
1
  # MUSUBIX Installation Guide
2
2
 
3
3
  **Document ID**: INSTALL-GUIDE
4
- **Version**: 1.6.0
4
+ **Version**: 1.7.0
5
5
  **Last Updated**: 2026-01-06
6
6
 
7
7
  ---