musubix 3.3.8 → 3.3.10

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 (92) hide show
  1. package/README.md +50 -305
  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 +49 -55
  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 -1065
  32. package/LICENSE +0 -21
  33. package/README.ja.md +0 -296
  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/enterprise-knowledge-management.md +0 -1737
  61. package/docs/evolution-from-musubi-to-musubix.md +0 -2170
  62. package/docs/getting-started-with-sdd.md +0 -1602
  63. package/docs/moodle-refactering-codegraph-musubix.md +0 -391
  64. package/docs/moodle-refactering-codegraph.md +0 -278
  65. package/docs/overview/MUSUBIX-CodeGraph.md +0 -322
  66. package/docs/overview/MUSUBIX-Core.md +0 -671
  67. package/docs/overview/MUSUBIX-Decisions.md +0 -494
  68. package/docs/overview/MUSUBIX-FormalVerify.md +0 -566
  69. package/docs/overview/MUSUBIX-Knowledge.md +0 -1231
  70. package/docs/overview/MUSUBIX-Learning.md +0 -837
  71. package/docs/overview/MUSUBIX-MCP-Server.md +0 -535
  72. package/docs/overview/MUSUBIX-Overview.md +0 -264
  73. package/docs/overview/MUSUBIX-Phase1-Complete.md +0 -271
  74. package/docs/overview/MUSUBIX-Phase2-Complete.md +0 -310
  75. package/docs/overview/MUSUBIX-Policy.md +0 -477
  76. package/docs/overview/MUSUBIX-Roadmap-v2.md +0 -399
  77. package/docs/overview/MUSUBIX-Security-Plan.md +0 -939
  78. package/docs/overview/MUSUBIX-Security-v2.1.md +0 -668
  79. package/docs/overview/MUSUBIX-Security.md +0 -891
  80. package/docs/overview/MUSUBIX-YATA.md +0 -666
  81. package/docs/overview/MUSUBIX-v2.2.0-Advanced-Learning.md +0 -513
  82. package/docs/overview/Neuro-SymbolicAI.md +0 -159
  83. package/docs/packages/knowledge.md +0 -594
  84. package/docs/qiita-linux-kernel-knowledge-graph.md +0 -596
  85. package/scripts/generate-quality-gate-report.ts +0 -106
  86. package/scripts/postinstall.js +0 -94
  87. package/steering/.musubi-version +0 -1
  88. package/steering/product.ja.md +0 -572
  89. package/steering/project.yml +0 -66
  90. package/steering/rules/constitution.md +0 -491
  91. package/steering/structure.ja.md +0 -503
  92. package/steering/tech.ja.md +0 -208
@@ -1,322 +0,0 @@
1
- # MUSUBIX CodeGraph v2.3.0
2
-
3
- > **@nahisaho/musubix-codegraph** - コード知識グラフライブラリ
4
-
5
- ## 概要
6
-
7
- CodeGraphは、ソースコードを知識グラフとして構造化し、GraphRAGベースのセマンティック検索を提供するライブラリです。AST解析、依存関係追跡、呼び出しグラフ分析など、コードベース全体を理解するための機能を提供します。
8
-
9
- ## 主要機能
10
-
11
- ### 1. AST解析・エンティティ抽出
12
-
13
- 複数言語のソースコードを解析し、関数、クラス、変数などのエンティティを抽出します。
14
-
15
- ```typescript
16
- import { createCodeGraph } from '@nahisaho/musubix-codegraph';
17
-
18
- const codeGraph = await createCodeGraph({ storage: 'memory' });
19
- const result = await codeGraph.index('/path/to/project');
20
-
21
- console.log(`Entities: ${result.entitiesIndexed}`);
22
- console.log(`Relations: ${result.relationsIndexed}`);
23
- ```
24
-
25
- **対応言語:**
26
- - TypeScript / JavaScript
27
- - Python
28
- - Rust
29
- - Go
30
- - Java
31
- - PHP
32
- - C# / C / C++
33
- - Ruby
34
- - Kotlin / Swift / Scala
35
- - Lua
36
- - HCL (Terraform)
37
-
38
- ### 2. グラフクエリ
39
-
40
- エンティティをさまざまな条件で検索できます。
41
-
42
- ```typescript
43
- // テキスト検索
44
- const result = await codeGraph.query({ textSearch: 'authentication' });
45
-
46
- // 型フィルタ
47
- const classes = await codeGraph.query({ entityTypes: ['class'] });
48
-
49
- // ファイルフィルタ
50
- const entities = await codeGraph.query({ filePath: 'src/auth/' });
51
- ```
52
-
53
- ### 3. 依存関係分析
54
-
55
- エンティティ間の依存関係を追跡します。
56
-
57
- ```typescript
58
- // 依存先を検索
59
- const deps = await codeGraph.findDependencies('UserService');
60
-
61
- // インターフェースの実装を検索
62
- const impls = await codeGraph.findImplementations('IRepository');
63
- ```
64
-
65
- ### 4. 呼び出しグラフ分析
66
-
67
- 関数・メソッドの呼び出し関係を分析します。
68
-
69
- ```typescript
70
- // 呼び出し元を検索
71
- const callers = await codeGraph.findCallers('authenticate');
72
-
73
- // 呼び出し先を検索
74
- const callees = await codeGraph.findCallees('processRequest');
75
- ```
76
-
77
- ### 5. GraphRAGセマンティック検索
78
-
79
- コミュニティ検出とセマンティック検索を組み合わせた高度な検索機能です。
80
-
81
- ```typescript
82
- // グローバル検索(コードベース全体)
83
- const results = await codeGraph.globalSearch('user authentication flow');
84
-
85
- // ローカル検索(特定エンティティ周辺)
86
- const local = await codeGraph.localSearch('validation', {
87
- radius: 2,
88
- limit: 10,
89
- });
90
- ```
91
-
92
- ## アーキテクチャ
93
-
94
- ```
95
- ┌─────────────────────────────────────────────────────────────┐
96
- │ CodeGraph API │
97
- ├─────────────────────────────────────────────────────────────┤
98
- │ │
99
- │ ┌───────────┐ ┌───────────┐ ┌───────────┐ ┌──────────┐ │
100
- │ │ AST Parser│ │Graph Engine│ │ Indexer │ │ GraphRAG │ │
101
- │ └─────┬─────┘ └─────┬─────┘ └─────┬─────┘ └────┬─────┘ │
102
- │ │ │ │ │ │
103
- │ ┌─────▼─────────────▼──────────────▼──────────────▼─────┐ │
104
- │ │ Storage Adapter │ │
105
- │ │ (Memory / SQLite / Custom) │ │
106
- │ └───────────────────────────────────────────────────────┘ │
107
- └─────────────────────────────────────────────────────────────┘
108
- ```
109
-
110
- ### コンポーネント
111
-
112
- | コンポーネント | 役割 |
113
- |---------------|------|
114
- | **AST Parser** | Tree-sitterベースの多言語AST解析 |
115
- | **Graph Engine** | エンティティ・リレーション管理、クエリ処理 |
116
- | **Indexer** | ファイルシステム走査、並列インデックス |
117
- | **GraphRAG** | コミュニティ検出、セマンティック検索 |
118
- | **Storage** | プラグイン可能なストレージバックエンド |
119
-
120
- ## CLI コマンド
121
-
122
- ```bash
123
- # ディレクトリをインデックス
124
- npx musubix cg index <path>
125
-
126
- # エンティティを検索
127
- npx musubix cg query [name] [-t type] [-l limit]
128
-
129
- # 依存関係を検索
130
- npx musubix cg deps <name>
131
-
132
- # 呼び出し元を検索
133
- npx musubix cg callers <name>
134
-
135
- # 呼び出し先を検索
136
- npx musubix cg callees <name>
137
-
138
- # セマンティック検索
139
- npx musubix cg search <query> [-L local] [-c context]
140
-
141
- # 統計を表示
142
- npx musubix cg stats
143
- ```
144
-
145
- ## MCP ツール
146
-
147
- MCPサーバー経由で以下のツールが利用可能です:
148
-
149
- | ツール名 | 説明 |
150
- |---------|------|
151
- | `codegraph_index` | リポジトリ/ディレクトリをインデックス |
152
- | `codegraph_query` | エンティティをクエリ |
153
- | `codegraph_find_dependencies` | 依存関係を検索 |
154
- | `codegraph_find_callers` | 関数の呼び出し元を検索 |
155
- | `codegraph_find_callees` | 関数の呼び出し先を検索 |
156
- | `codegraph_global_search` | GraphRAGセマンティック検索 |
157
- | `codegraph_local_search` | ローカルコンテキスト検索 |
158
- | `codegraph_stats` | グラフ統計を取得 |
159
-
160
- ## 設定オプション
161
-
162
- ```typescript
163
- interface CodeGraphOptions {
164
- // ストレージバックエンド
165
- storage?: 'memory' | 'sqlite' | StorageAdapter;
166
- sqlitePath?: string;
167
-
168
- // パーサー設定
169
- parser?: {
170
- languages?: Language[]; // 対象言語
171
- includeComments?: boolean; // コメント含む
172
- extractDocstrings?: boolean; // docstring抽出
173
- };
174
-
175
- // グラフエンジン設定
176
- graph?: {
177
- maxDepth?: number; // 最大探索深度
178
- enableCaching?: boolean; // キャッシュ有効化
179
- };
180
-
181
- // インデクサー設定
182
- indexer?: {
183
- ignorePatterns?: string[]; // 除外パターン
184
- maxFileSize?: number; // 最大ファイルサイズ
185
- parallelism?: number; // 並列処理数
186
- };
187
-
188
- // GraphRAG設定
189
- graphrag?: {
190
- communityAlgorithm?: 'louvain' | 'label_propagation';
191
- minCommunitySize?: number;
192
- };
193
- }
194
- ```
195
-
196
- ## エンティティタイプ
197
-
198
- | タイプ | 説明 |
199
- |--------|------|
200
- | `function` | 関数・メソッド |
201
- | `class` | クラス |
202
- | `interface` | インターフェース |
203
- | `type` | 型エイリアス |
204
- | `variable` | 変数・定数 |
205
- | `module` | モジュール・名前空間 |
206
- | `enum` | 列挙型 |
207
- | `property` | プロパティ |
208
- | `parameter` | パラメータ |
209
-
210
- ## リレーションタイプ
211
-
212
- | タイプ | 説明 |
213
- |--------|------|
214
- | `calls` | 関数呼び出し |
215
- | `imports` | インポート |
216
- | `extends` | 継承 |
217
- | `implements` | インターフェース実装 |
218
- | `uses` | 使用(変数参照等) |
219
- | `defines` | 定義(クラス→メソッド等) |
220
- | `returns` | 戻り値の型 |
221
- | `parameter_of` | パラメータ関係 |
222
-
223
- ## イベント
224
-
225
- CodeGraphはイベントエミッターとして動作し、処理の進捗を監視できます。
226
-
227
- ```typescript
228
- const codeGraph = await createCodeGraph();
229
-
230
- codeGraph.onIndexingStart((path) => {
231
- console.log(`Indexing started: ${path}`);
232
- });
233
-
234
- codeGraph.onIndexingProgress((processed, total, file) => {
235
- console.log(`Progress: ${processed}/${total} - ${file}`);
236
- });
237
-
238
- codeGraph.onIndexingComplete((result) => {
239
- console.log(`Complete: ${result.entitiesIndexed} entities`);
240
- });
241
-
242
- codeGraph.onIndexingError((error, file) => {
243
- console.error(`Error in ${file}: ${error.message}`);
244
- });
245
- ```
246
-
247
- ## 使用例
248
-
249
- ### プロジェクト分析
250
-
251
- ```typescript
252
- import { createCodeGraph } from '@nahisaho/musubix-codegraph';
253
-
254
- async function analyzeProject(projectPath: string) {
255
- const cg = await createCodeGraph({ storage: 'sqlite', sqlitePath: '.codegraph.db' });
256
-
257
- // インデックス作成
258
- const result = await cg.index(projectPath);
259
- console.log(`Indexed ${result.filesProcessed} files`);
260
-
261
- // 統計取得
262
- const stats = await cg.getStats();
263
- console.log(`Entities: ${stats.entityCount}`);
264
- console.log(`Relations: ${stats.relationCount}`);
265
- console.log(`Languages: ${stats.languages.join(', ')}`);
266
-
267
- // クラス一覧
268
- const classes = await cg.query({ entityTypes: ['class'] });
269
- console.log(`Classes: ${classes.entities.length}`);
270
-
271
- // 依存関係分析
272
- for (const cls of classes.entities.slice(0, 5)) {
273
- const deps = await cg.findDependencies(cls.name);
274
- console.log(`${cls.name} depends on: ${deps.map(d => d.name).join(', ')}`);
275
- }
276
- }
277
- ```
278
-
279
- ### コードナビゲーション
280
-
281
- ```typescript
282
- // 関数の呼び出し関係を可視化
283
- async function traceCallGraph(functionName: string) {
284
- const cg = await createCodeGraph();
285
- await cg.index('./src');
286
-
287
- const callers = await cg.findCallers(functionName);
288
- const callees = await cg.findCallees(functionName);
289
-
290
- console.log(`=== ${functionName} ===`);
291
- console.log('Called by:');
292
- callers.forEach(c => console.log(` <- ${c.from.name}`));
293
- console.log('Calls:');
294
- callees.forEach(c => console.log(` -> ${c.to.name}`));
295
- }
296
- ```
297
-
298
- ## 要件トレーサビリティ
299
-
300
- | 要件ID | 説明 |
301
- |--------|------|
302
- | REQ-CG-API-001 | 独立ライブラリとして動作 |
303
- | REQ-CG-API-002 | プログラマティックAPI提供 |
304
- | REQ-CG-API-003 | CLI統合 |
305
- | REQ-CG-AST-001 | 多言語AST解析 |
306
- | REQ-CG-GRF-001 | エンティティ・リレーション管理 |
307
- | REQ-CG-GRF-003 | グラフクエリ |
308
- | REQ-CG-GRF-004 | 依存関係分析 |
309
- | REQ-CG-GRF-005 | 呼び出しグラフ分析 |
310
- | REQ-CG-RAG-001 | コミュニティ検出 |
311
- | REQ-CG-RAG-002 | セマンティック検索 |
312
-
313
- ## 関連ドキュメント
314
-
315
- - [MUSUBIX Overview](MUSUBIX-Overview.md)
316
- - [MUSUBIX Core](MUSUBIX-Core.md)
317
- - [MUSUBIX MCP Server](MUSUBIX-MCP-Server.md)
318
-
319
- ---
320
-
321
- **バージョン**: 2.3.0
322
- **最終更新**: 2026-01-09