musubix 3.3.3 → 3.3.5

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/.github/AGENTS.md +949 -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 +237 -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 +217 -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 +1065 -0
  25. package/LICENSE +21 -0
  26. package/README.ja.md +296 -0
  27. package/README.md +305 -50
  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/MIGRATION-v3.0.md +324 -0
  35. package/docs/MUSUBI-enhancement_roadmap_20260105.md +651 -0
  36. package/docs/MUSUBIX-v3.0-User-Guide.md +1357 -0
  37. package/docs/MUSUBIXv2.2.0-Manual-outline.md +136 -0
  38. package/docs/MUSUBIXv2.2.0-Manual.md +3123 -0
  39. package/docs/MUSUBIXv2.3.5-Refactering.md +1310 -0
  40. package/docs/MUSUBIv1.6.1-enhancement_roadmap_20260105.md +291 -0
  41. package/docs/MUSUBIv2.2.0-USERGUIDE.md +2079 -0
  42. package/docs/ROADMAP-v1.5.md +116 -0
  43. package/docs/SwarmCoding.md +1284 -0
  44. package/docs/Test-prompt.md +105 -0
  45. package/docs/USER-GUIDE-v1.8.0.md +2371 -0
  46. package/docs/USER-GUIDE.ja.md +2147 -0
  47. package/docs/USER-GUIDE.md +3022 -0
  48. package/docs/YATA-GLOBAL-GUIDE.ja.md +750 -0
  49. package/docs/YATA-GLOBAL-GUIDE.md +595 -0
  50. package/docs/YATA-LOCAL-GUIDE.ja.md +989 -0
  51. package/docs/YATA-LOCAL-GUIDE.md +730 -0
  52. package/docs/adr/0001-real-time-pattern-learning-architecture-for-v1-5-0.md +75 -0
  53. package/docs/adr/0002-pattern-sharing-protocol-for-cross-team-collaborat.md +79 -0
  54. package/docs/adr/0003-owl-2-rl-implementation-strategy-for-advanced-infe.md +90 -0
  55. package/docs/enterprise-knowledge-management.md +1737 -0
  56. package/docs/evolution-from-musubi-to-musubix.md +2170 -0
  57. package/docs/getting-started-with-sdd.md +1602 -0
  58. package/docs/moodle-refactering-codegraph-musubix.md +391 -0
  59. package/docs/moodle-refactering-codegraph.md +278 -0
  60. package/docs/overview/MUSUBIX-CodeGraph.md +322 -0
  61. package/docs/overview/MUSUBIX-Core.md +671 -0
  62. package/docs/overview/MUSUBIX-Decisions.md +494 -0
  63. package/docs/overview/MUSUBIX-FormalVerify.md +566 -0
  64. package/docs/overview/MUSUBIX-Knowledge.md +1231 -0
  65. package/docs/overview/MUSUBIX-Learning.md +837 -0
  66. package/docs/overview/MUSUBIX-MCP-Server.md +535 -0
  67. package/docs/overview/MUSUBIX-Overview.md +264 -0
  68. package/docs/overview/MUSUBIX-Phase1-Complete.md +271 -0
  69. package/docs/overview/MUSUBIX-Phase2-Complete.md +310 -0
  70. package/docs/overview/MUSUBIX-Policy.md +477 -0
  71. package/docs/overview/MUSUBIX-Roadmap-v2.md +399 -0
  72. package/docs/overview/MUSUBIX-Security-Plan.md +939 -0
  73. package/docs/overview/MUSUBIX-Security-v2.1.md +668 -0
  74. package/docs/overview/MUSUBIX-Security.md +891 -0
  75. package/docs/overview/MUSUBIX-YATA.md +666 -0
  76. package/docs/overview/MUSUBIX-v2.2.0-Advanced-Learning.md +513 -0
  77. package/docs/overview/Neuro-SymbolicAI.md +159 -0
  78. package/docs/packages/knowledge.md +594 -0
  79. package/docs/qiita-linux-kernel-knowledge-graph.md +596 -0
  80. package/package.json +55 -51
  81. package/scripts/generate-quality-gate-report.ts +106 -0
  82. package/scripts/postinstall.js +94 -0
  83. package/steering/.musubi-version +1 -0
  84. package/steering/product.ja.md +572 -0
  85. package/steering/project.yml +66 -0
  86. package/steering/rules/constitution.md +491 -0
  87. package/steering/structure.ja.md +503 -0
  88. package/steering/tech.ja.md +208 -0
  89. package/dist/index.d.ts +0 -25
  90. package/dist/index.d.ts.map +0 -1
  91. package/dist/index.js +0 -74
  92. package/dist/index.js.map +0 -1
@@ -0,0 +1,310 @@
1
+ # MUSUBIX Phase 2: Advanced Learning - 完了レポート
2
+
3
+ **完了日**: 2026-01-08
4
+ **バージョン**: 2.0.0
5
+ **ステータス**: ✅ Phase 2 完了
6
+
7
+ ---
8
+
9
+ ## 1. 概要
10
+
11
+ Phase 2「Advanced Learning」の全3パッケージの開発が完了しました。合計422テストが全て合格し、MUSUBIX v2.0.0としてリリース準備が整いました。
12
+
13
+ ### 1.1 完了サマリー
14
+
15
+ | パッケージ | バージョン | テスト数 | 結果 |
16
+ |-----------|------------|----------|------|
17
+ | **@nahisaho/musubix-library-learner** | 2.0.0 | 132 | ✅ 全合格 |
18
+ | **@nahisaho/musubix-neural-search** | 2.0.0 | 144 | ✅ 全合格 |
19
+ | **@nahisaho/musubix-synthesis** | 2.0.0 | 146 | ✅ 全合格 |
20
+ | **合計** | - | **422** | ✅ |
21
+
22
+ ---
23
+
24
+ ## 2. @nahisaho/musubix-library-learner
25
+
26
+ ### 2.1 パッケージ概要
27
+
28
+ DreamCoder(10^72探索削減を達成)を参考にした階層的ライブラリ学習パッケージです。パターンの抽象化と圧縮により、探索空間を劇的に削減します。
29
+
30
+ ### 2.2 主要機能
31
+
32
+ | 機能 | 説明 |
33
+ |------|------|
34
+ | **階層的抽象化** | Multi-level Abstractionによるパターンの階層化 |
35
+ | **パターン圧縮** | CompressionEngineによる冗長性削減 |
36
+ | **Wake-Sleep学習** | 観察と統合のサイクルによる継続的学習 |
37
+ | **型指向探索** | 型システムによる探索空間削減 |
38
+ | **E-graph最適化** | 等価性グラフによる表現最適化 |
39
+
40
+ ### 2.3 アーキテクチャ
41
+
42
+ ```
43
+ packages/library-learner/
44
+ ├── src/
45
+ │ ├── index.ts # Main exports
46
+ │ ├── types.ts # 型定義
47
+ │ ├── LibraryLearner.ts # メイン学習器
48
+ │ ├── AbstractionEngine.ts # 抽象化エンジン
49
+ │ ├── CompressionEngine.ts # 圧縮エンジン
50
+ │ ├── PatternMatcher.ts # パターンマッチング
51
+ │ ├── TypeDirectedSearch.ts # 型指向探索
52
+ │ └── EGraphOptimizer.ts # E-graph最適化
53
+ └── tests/
54
+ └── ... (132 tests)
55
+ ```
56
+
57
+ ### 2.4 使用例
58
+
59
+ ```typescript
60
+ import { LibraryLearner, AbstractionEngine, CompressionEngine } from '@nahisaho/musubix-library-learner';
61
+
62
+ // ライブラリ学習器の初期化
63
+ const learner = new LibraryLearner({
64
+ abstractionLevels: 3,
65
+ minOccurrences: 5,
66
+ });
67
+
68
+ // コーパスから学習
69
+ await learner.learnFromCorpus(codeCorpus);
70
+
71
+ // 学習済みプリミティブで合成
72
+ const solution = await learner.synthesize(specification, {
73
+ useLearnedPrimitives: true,
74
+ });
75
+ ```
76
+
77
+ ---
78
+
79
+ ## 3. @nahisaho/musubix-neural-search
80
+
81
+ ### 3.1 パッケージ概要
82
+
83
+ DeepCoder、NGDSを参考にしたニューラル誘導探索パッケージです。ニューラルモデルによる分岐スコアリングで効率的な探索を実現します。
84
+
85
+ ### 3.2 主要機能
86
+
87
+ | 機能 | 説明 |
88
+ |------|------|
89
+ | **分岐スコアリング** | ニューラルモデルで探索分岐を評価 |
90
+ | **探索優先順位付け** | 有望な探索パスを優先 |
91
+ | **学習ベースプルーニング** | 不毛な探索を早期打ち切り |
92
+ | **探索履歴学習** | 過去の探索から学習 |
93
+ | **ベストファースト探索** | スコアベースの最良優先探索 |
94
+
95
+ ### 3.3 アーキテクチャ
96
+
97
+ ```
98
+ packages/neural-search/
99
+ ├── src/
100
+ │ ├── index.ts # Main exports
101
+ │ ├── types.ts # 型定義
102
+ │ ├── NeuralSearchEngine.ts # メインエンジン
103
+ │ ├── embedding/
104
+ │ │ ├── EmbeddingModel.ts # 埋め込みモデル
105
+ │ │ └── EmbeddingScorer.ts # スコアリング
106
+ │ ├── search/
107
+ │ │ ├── BeamSearch.ts # ビームサーチ
108
+ │ │ ├── BestFirstSearch.ts # 最良優先探索
109
+ │ │ └── PruningStrategy.ts # プルーニング戦略
110
+ │ └── learning/
111
+ │ └── HistoryLearner.ts # 履歴学習
112
+ └── tests/
113
+ └── ... (144 tests)
114
+ ```
115
+
116
+ ### 3.4 使用例
117
+
118
+ ```typescript
119
+ import { NeuralSearchEngine, EmbeddingScorer, BeamSearch } from '@nahisaho/musubix-neural-search';
120
+
121
+ // ニューラル探索エンジンの初期化
122
+ const engine = new NeuralSearchEngine({
123
+ embeddingModel: model,
124
+ beamWidth: 10,
125
+ });
126
+
127
+ // スコアリング
128
+ const scorer = new EmbeddingScorer();
129
+ const scores = scorer.scoreBranches(candidates);
130
+
131
+ // ビームサーチ
132
+ const search = new BeamSearch({ width: 10, maxDepth: 20 });
133
+ const result = await search.search(spec);
134
+ ```
135
+
136
+ ---
137
+
138
+ ## 4. @nahisaho/musubix-synthesis
139
+
140
+ ### 4.1 パッケージ概要
141
+
142
+ Microsoft PROSE/FlashMetaを参考にしたプログラム合成DSLフレームワークです。例示合成(PBE)とWitness関数による演繹的合成をサポートします。
143
+
144
+ ### 4.2 主要機能
145
+
146
+ | 機能 | 説明 |
147
+ |------|------|
148
+ | **DSL定義フレームワーク** | ドメイン固有言語の宣言的定義 |
149
+ | **型システム** | 型推論・型チェック・型統一 |
150
+ | **プログラム列挙** | 網羅的なプログラム空間探索 |
151
+ | **例示合成 (PBE)** | 入出力例からの合成 |
152
+ | **Witness関数** | 演繹的合成のためのWitness関数 |
153
+ | **バージョン空間** | 候補プログラムの効率的管理 |
154
+ | **合成ルール学習** | メタ学習による合成ルール自動学習 |
155
+
156
+ ### 4.3 アーキテクチャ
157
+
158
+ ```
159
+ packages/synthesis/
160
+ ├── src/
161
+ │ ├── index.ts # Main exports
162
+ │ ├── types.ts # 型定義
163
+ │ ├── dsl/
164
+ │ │ ├── DSL.ts # DSL実行エンジン
165
+ │ │ ├── DSLBuilder.ts # DSLビルダー
166
+ │ │ └── TypeSystem.ts # 型システム
167
+ │ ├── synthesis/
168
+ │ │ ├── Enumerator.ts # プログラム列挙
169
+ │ │ ├── PBESynthesizer.ts # PBE合成器
170
+ │ │ ├── WitnessEngine.ts # Witness関数エンジン
171
+ │ │ └── VersionSpace.ts # バージョン空間
172
+ │ └── rules/
173
+ │ ├── RuleExtractor.ts # ルール抽出
174
+ │ ├── RuleLibrary.ts # ルールライブラリ
175
+ │ └── MetaLearner.ts # メタ学習器
176
+ └── tests/
177
+ └── ... (146 tests)
178
+ ```
179
+
180
+ ### 4.4 使用例
181
+
182
+ ```typescript
183
+ import { DSL, DSLBuilder, PBESynthesizer, WitnessEngine } from '@nahisaho/musubix-synthesis';
184
+
185
+ // DSL定義
186
+ const config = new DSLBuilder()
187
+ .type('int', { kind: 'primitive', name: 'int' })
188
+ .operator('add', {
189
+ name: 'add',
190
+ inputTypes: ['int', 'int'],
191
+ outputType: 'int',
192
+ implementation: (a, b) => a + b,
193
+ })
194
+ .constant('zero', { name: 'zero', type: 'int', value: 0 })
195
+ .build();
196
+
197
+ const dsl = new DSL(config);
198
+
199
+ // 例示合成(PBE)
200
+ const synthesizer = new PBESynthesizer();
201
+ const result = await synthesizer.synthesize(spec, dsl);
202
+
203
+ // Witness関数による演繹的合成
204
+ const witness = new WitnessEngine(dsl);
205
+ const program = await witness.synthesizeWithWitness(spec);
206
+ ```
207
+
208
+ ---
209
+
210
+ ## 5. Phase 1 + Phase 2 統合
211
+
212
+ ### 5.1 パッケージ間の連携
213
+
214
+ ```
215
+ ┌─────────────────────────────────────────────────────────────┐
216
+ │ MUSUBIX v2.0.0 │
217
+ ├─────────────────────────────────────────────────────────────┤
218
+ │ Phase 1: Deep Symbolic Integration │
219
+ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
220
+ │ │ musubix- │ │ musubix- │ │ yata- │ │
221
+ │ │ dfg │ │ lean │ │ scale │ │
222
+ │ │ (30 tests) │ │ (151 tests)│ │ (57 tests) │ │
223
+ │ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
224
+ │ │ │ │ │
225
+ │ └────────────────┼────────────────┘ │
226
+ │ ▼ │
227
+ │ Phase 2: Advanced Learning │
228
+ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
229
+ │ │ library- │ │ neural- │ │ musubix- │ │
230
+ │ │ learner │ │ search │ │ synthesis │ │
231
+ │ │ (132 tests)│ │ (144 tests)│ │ (146 tests)│ │
232
+ │ └─────────────┘ └─────────────┘ └─────────────┘ │
233
+ ├─────────────────────────────────────────────────────────────┤
234
+ │ Total: 660 tests (Phase 1: 238 + Phase 2: 422) │
235
+ └─────────────────────────────────────────────────────────────┘
236
+ ```
237
+
238
+ ### 5.2 統合API例
239
+
240
+ ```typescript
241
+ import { DFGExtractor } from '@nahisaho/musubix-dfg';
242
+ import { LibraryLearner } from '@nahisaho/musubix-library-learner';
243
+ import { NeuralSearchEngine } from '@nahisaho/musubix-neural-search';
244
+ import { PBESynthesizer, DSLBuilder } from '@nahisaho/musubix-synthesis';
245
+
246
+ // 1. DFGからパターンを抽出
247
+ const dfg = new DFGExtractor().extract(sourceCode);
248
+
249
+ // 2. パターンをライブラリとして学習
250
+ const learner = new LibraryLearner();
251
+ await learner.learnFromPatterns(dfg.patterns);
252
+
253
+ // 3. ニューラル誘導で探索を効率化
254
+ const search = new NeuralSearchEngine({
255
+ library: learner.getLibrary(),
256
+ });
257
+
258
+ // 4. DSLベースで合成
259
+ const synthesizer = new PBESynthesizer();
260
+ const result = await synthesizer.synthesize(spec, dsl, {
261
+ searchEngine: search,
262
+ });
263
+ ```
264
+
265
+ ---
266
+
267
+ ## 6. 成功指標(KPI)達成状況
268
+
269
+ | 指標 | 目標 | 実績 | 状態 |
270
+ |------|------|------|------|
271
+ | library-learnerテスト数 | 100+ | 132 | ✅ |
272
+ | neural-searchテスト数 | 80+ | 144 | ✅ |
273
+ | synthesisテスト数 | 120+ | 146 | ✅ |
274
+ | 合計テスト数 | 300+ | 422 | ✅ |
275
+ | ビルド成功 | 100% | 100% | ✅ |
276
+ | 型チェック通過 | 100% | 100% | ✅ |
277
+
278
+ ---
279
+
280
+ ## 7. 次のステップ
281
+
282
+ ### 7.1 Phase 3への準備
283
+
284
+ Phase 3「Enterprise Ready (v3.0)」の準備:
285
+
286
+ 1. **JetBrains/VS Code深い統合**: IDE拡張機能の開発
287
+ 2. **セキュリティ特化機能**: 高度な脆弱性検出
288
+ 3. **大規模知識グラフ**: 1億+トリプル対応
289
+
290
+ ### 7.2 v2.0.0正式リリース
291
+
292
+ - ✅ 全パッケージバージョン更新
293
+ - ✅ CHANGELOG更新
294
+ - ✅ README更新
295
+ - ✅ ドキュメント整備
296
+ - ⏳ npm公開
297
+
298
+ ---
299
+
300
+ ## 8. 参考文献
301
+
302
+ 1. **DreamCoder**: Ellis et al., "DreamCoder: Bootstrapping Inductive Program Synthesis with Wake-Sleep Library Learning" (PLDI 2021)
303
+ 2. **DeepCoder**: Balog et al., "DeepCoder: Learning to Write Programs" (ICLR 2017)
304
+ 3. **PROSE**: Gulwani et al., "Program Synthesis" (Foundations and Trends in Programming Languages 2017)
305
+ 4. **FlashMeta**: Polozov & Gulwani, "FlashMeta: A Framework for Inductive Program Synthesis" (OOPSLA 2015)
306
+
307
+ ---
308
+
309
+ **作成者**: MUSUBIX Development Team
310
+ **最終更新**: 2026-01-08