musubix 2.1.1 → 2.2.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.
@@ -26,13 +26,14 @@
26
26
  18. [DFG/CFG Extraction](#dfgcfg-extraction) *(v2.0.0)*
27
27
  19. [Lean 4 Integration](#lean-4-integration) *(v2.0.0)*
28
28
  20. [YATA Scale](#yata-scale) *(v2.0.0)*
29
- 21. [Library Learning](#library-learning) *(v2.0.0 NEW!)*
30
- 22. [Neural Search](#neural-search) *(v2.0.0 NEW!)*
31
- 23. [Program Synthesis](#program-synthesis) *(v2.0.0 NEW!)*
32
- 24. [MCP Server Integration](#mcp-server-integration)
33
- 25. [YATA Integration](#yata-integration)
34
- 26. [Best Practices](#best-practices)
35
- 27. [Troubleshooting](#troubleshooting)
29
+ 21. [Library Learning](#library-learning) *(v2.0.0)*
30
+ 22. [Neural Search](#neural-search) *(v2.0.0)*
31
+ 23. [Program Synthesis](#program-synthesis) *(v2.0.0)*
32
+ 24. [Advanced Learning Enhancement](#advanced-learning-enhancement) *(v2.2.0 NEW!)*
33
+ 25. [MCP Server Integration](#mcp-server-integration)
34
+ 26. [YATA Integration](#yata-integration)
35
+ 27. [Best Practices](#best-practices)
36
+ 28. [Troubleshooting](#troubleshooting)
36
37
 
37
38
  ---
38
39
 
@@ -2037,6 +2038,199 @@ for (const issue of verification.issues) {
2037
2038
 
2038
2039
  ---
2039
2040
 
2041
+ ## Advanced Learning Enhancement
2042
+
2043
+ *(v2.2.0 NEW!)*
2044
+
2045
+ MUSUBIX v2.2.0では、Neural Search、Library Learner、Synthesisの3パッケージに対して高度な学習機能を追加しました。
2046
+
2047
+ ### Neural Search Enhancement
2048
+
2049
+ #### ContextAwareEmbedder
2050
+
2051
+ AST構造を認識したコンテキスト埋め込み:
2052
+
2053
+ ```typescript
2054
+ import { ContextAwareEmbedder } from '@nahisaho/musubix-neural-search';
2055
+
2056
+ const embedder = new ContextAwareEmbedder({
2057
+ windowSize: 5,
2058
+ includeAST: true,
2059
+ });
2060
+
2061
+ const embedding = embedder.embed(code, {
2062
+ surrounding: surroundingCode,
2063
+ imports: importStatements,
2064
+ });
2065
+ ```
2066
+
2067
+ #### HybridRanker
2068
+
2069
+ BM25とベクトル類似度のハイブリッドランキング:
2070
+
2071
+ ```typescript
2072
+ import { HybridRanker } from '@nahisaho/musubix-neural-search';
2073
+
2074
+ const ranker = new HybridRanker({ alpha: 0.6 });
2075
+ const results = ranker.rank(query, documents);
2076
+ ```
2077
+
2078
+ #### EmbeddingCache
2079
+
2080
+ LRU + TTL管理キャッシュ:
2081
+
2082
+ ```typescript
2083
+ import { EmbeddingCache } from '@nahisaho/musubix-neural-search';
2084
+
2085
+ const cache = new EmbeddingCache({
2086
+ maxSize: 10000,
2087
+ ttlMs: 3600000,
2088
+ });
2089
+
2090
+ cache.set('key', embedding);
2091
+ const stats = cache.getStats(); // { hits, misses, hitRate }
2092
+ ```
2093
+
2094
+ #### TrajectoryLogger
2095
+
2096
+ 検索軌跡のロギング:
2097
+
2098
+ ```typescript
2099
+ import { createTrajectoryLogger } from '@nahisaho/musubix-neural-search';
2100
+
2101
+ const logger = createTrajectoryLogger();
2102
+ logger.logBranch({ depth: 1, score: 0.85, action: 'expand' });
2103
+
2104
+ const trajectory = logger.getTrajectory();
2105
+ const parquet = logger.export('parquet');
2106
+ ```
2107
+
2108
+ ### Library Learner Enhancement
2109
+
2110
+ #### SemanticChunker
2111
+
2112
+ AST境界認識チャンキング:
2113
+
2114
+ ```typescript
2115
+ import { SemanticChunker } from '@nahisaho/musubix-library-learner';
2116
+
2117
+ const chunker = new SemanticChunker({
2118
+ minSize: 50,
2119
+ maxSize: 500,
2120
+ respectBoundaries: true,
2121
+ });
2122
+
2123
+ const chunks = chunker.chunk(code);
2124
+ ```
2125
+
2126
+ #### PatternVersionManager
2127
+
2128
+ Git風バージョン管理:
2129
+
2130
+ ```typescript
2131
+ import { PatternVersionManager } from '@nahisaho/musubix-library-learner';
2132
+
2133
+ const manager = new PatternVersionManager();
2134
+ manager.commit(pattern, 'Add validation pattern');
2135
+ const history = manager.getHistory(patternId);
2136
+ manager.rollback(patternId, commitId);
2137
+ ```
2138
+
2139
+ #### MetricsExporter
2140
+
2141
+ 学習メトリクスのエクスポート:
2142
+
2143
+ ```typescript
2144
+ import { createMetricsExporter } from '@nahisaho/musubix-library-learner';
2145
+
2146
+ const exporter = createMetricsExporter(library);
2147
+ const json = exporter.export('json');
2148
+ const markdown = exporter.export('markdown');
2149
+ const summary = exporter.getSummary();
2150
+ // { totalPatterns, averageConfidence, healthStatus }
2151
+ ```
2152
+
2153
+ ### Synthesis Enhancement
2154
+
2155
+ #### MetaLearningEngine
2156
+
2157
+ タスク類似度ベースの戦略選択:
2158
+
2159
+ ```typescript
2160
+ import { createMetaLearningEngine } from '@nahisaho/musubix-synthesis';
2161
+
2162
+ const meta = createMetaLearningEngine({
2163
+ historySize: 100,
2164
+ similarityThreshold: 0.7,
2165
+ });
2166
+
2167
+ meta.recordTask(task, result);
2168
+ const strategy = meta.selectStrategy(newTask);
2169
+ ```
2170
+
2171
+ #### DSLExtender
2172
+
2173
+ パターンからのDSL演算子自動生成:
2174
+
2175
+ ```typescript
2176
+ import { createDSLExtender } from '@nahisaho/musubix-synthesis';
2177
+
2178
+ const extender = createDSLExtender(baseDSL);
2179
+ const gaps = extender.detectGaps(patterns);
2180
+ const suggestions = extender.suggestOperators(gaps);
2181
+ ```
2182
+
2183
+ #### ExampleAnalyzer
2184
+
2185
+ 例題品質分析:
2186
+
2187
+ ```typescript
2188
+ import { createExampleAnalyzer } from '@nahisaho/musubix-synthesis';
2189
+
2190
+ const analyzer = createExampleAnalyzer();
2191
+ const quality = analyzer.analyzeQuality(examples);
2192
+ const coverage = analyzer.analyzeCoverage(examples, dsl);
2193
+ ```
2194
+
2195
+ #### ExplanationGenerator
2196
+
2197
+ 合成プログラムの自然言語説明:
2198
+
2199
+ ```typescript
2200
+ import { createExplanationGenerator } from '@nahisaho/musubix-synthesis';
2201
+
2202
+ const explainer = createExplanationGenerator();
2203
+ const explanation = explainer.generate(program);
2204
+ const summary = explainer.summarize(program);
2205
+ // "Converts to uppercase"
2206
+ ```
2207
+
2208
+ ### v2.2.0 CLI Commands
2209
+
2210
+ ```bash
2211
+ # プログラム合成
2212
+ npx musubix synthesize <examples.json>
2213
+ npx musubix syn <examples.json> # エイリアス
2214
+
2215
+ # パターンライブラリ管理
2216
+ npx musubix library learn <file>
2217
+ npx musubix library query <query>
2218
+ npx musubix library stats
2219
+ npx musubix lib stats # エイリアス
2220
+ ```
2221
+
2222
+ ### v2.2.0 Test Statistics
2223
+
2224
+ | EPIC | Tasks | Tests |
2225
+ |------|-------|-------|
2226
+ | Neural Search | 7 | 138 |
2227
+ | Library Learner | 7 | 145 |
2228
+ | Synthesis | 6 | 108 |
2229
+ | Integration | 4 | 73 |
2230
+ | **Total** | **28** | **464** |
2231
+
2232
+ ---
2233
+
2040
2234
  ## MCP Server Integration
2041
2235
 
2042
2236
  ### CLI Startup
@@ -2644,9 +2838,10 @@ const client = createYATAClient({
2644
2838
  | [INSTALL-GUIDE.md](INSTALL-GUIDE.md) | Detailed installation guide |
2645
2839
  | [API-REFERENCE.md](API-REFERENCE.md) | API reference |
2646
2840
  | [evolution-from-musubi-to-musubix.md](evolution-from-musubi-to-musubix.md) | Evolution from MUSUBI |
2841
+ | [overview/MUSUBIX-v2.2.0-Advanced-Learning.md](overview/MUSUBIX-v2.2.0-Advanced-Learning.md) | v2.2.0 Advanced Learning details |
2647
2842
 
2648
2843
  ---
2649
2844
 
2650
- **Version**: 2.0.0
2845
+ **Version**: 2.2.0
2651
2846
  **Last Updated**: 2026-01-08
2652
2847
  **MUSUBIX Project**