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
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,296 @@
1
+ # MUSUBIX - ニューロシンボリックAI統合システム
2
+
3
+ [![npm version](https://img.shields.io/npm/v/musubix.svg)](https://www.npmjs.com/package/musubix)
4
+ [![npm core](https://img.shields.io/npm/v/@nahisaho/musubix-core.svg?label=@nahisaho/musubix-core)](https://www.npmjs.com/package/@nahisaho/musubix-core)
5
+ [![npm mcp](https://img.shields.io/npm/v/@nahisaho/musubix-mcp-server.svg?label=@nahisaho/musubix-mcp-server)](https://www.npmjs.com/package/@nahisaho/musubix-mcp-server)
6
+ [![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen)](https://nodejs.org/)
7
+ [![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
8
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue)](https://www.typescriptlang.org/)
9
+ [![Tests](https://img.shields.io/badge/tests-1586%20passing-brightgreen)](https://github.com/nahisaho/MUSUBIX)
10
+ [![npm security](https://img.shields.io/npm/v/@nahisaho/musubix-security.svg?label=@nahisaho/musubix-security)](https://www.npmjs.com/package/@nahisaho/musubix-security)
11
+
12
+ > Git-Native知識統合による次世代AIコーディングシステム
13
+ >
14
+ > **v3.0.0** - Git-Native Knowledge System
15
+
16
+ ## 概要
17
+
18
+ MUSUBIXは、**ニューラル(LLM)** と **シンボリック(知識グラフ)** 推論を統合した革新的なAIコーディングシステムです。MUSUBI SDDの方法論とGit-Native知識管理を組み合わせ、高品質なソフトウェア開発を支援します。
19
+
20
+ ### 特徴
21
+
22
+ - 🧠 **ニューロシンボリック統合** - LLMの創造性と知識グラフの厳密性を融合
23
+ - � **シンボリック推論** - 形式検証、幻覚検出、憲法強制
24
+ - 📝 **EARS形式要件分析** - 自然言語から正式な要件への変換・検証
25
+ - 🎨 **設計パターン推奨** - コンテキストに基づくC4モデル・ADR生成
26
+ - ✅ **テスト駆動開発** - Test-First原則による品質保証
27
+ - 🔗 **完全なトレーサビリティ** - 要件からコードまでの追跡可能性
28
+ - 💬 **一問一答形式ヒアリング** - 対話的な要件定義サポート
29
+ - 🌐 **多言語対応(i18n)** - 日本語・英語対応
30
+ - 🔒 **セキュリティスキャン** - 脆弱性検出、シークレットスキャン、OWASPパターン
31
+ - 📚 **自己学習システム** - フィードバック収集とパターン抽出による適応的改善
32
+ - 🏗️ **C4コード生成** - C4設計ドキュメントからTypeScriptスケルトン生成
33
+ - ⚙️ **品質ゲート** - フェーズ移行前の自動品質検証
34
+ - 🔮 **高度推論** - OWL 2 RL推論とDatalog評価 *(v1.4.5)*
35
+ - 🖥️ **対話的REPL** - コマンド補完、履歴管理、セッション変数 *(v1.6.0)*
36
+ - � **Git-Native知識** - ファイルベースの知識グラフ管理 *(v3.0.0)*
37
+ - 🔬 **形式検証** - Z3 SMTソルバー統合、Hoareトリプル検証、EARS→SMT変換 *(v1.7.5)*
38
+ - 🛡️ **セキュリティ分析** - 脆弱性スキャン、シークレット検出、テイント解析、依存関係監査 *(v1.8.0)*
39
+
40
+ ## アーキテクチャ
41
+
42
+ ```mermaid
43
+ flowchart TB
44
+ subgraph MUSUBIX["MUSUBIX System v3.0"]
45
+ subgraph Packages["Packages"]
46
+ Core["@nahisaho/musubix-core"]
47
+ MCP["@nahisaho/musubix-mcp-server"]
48
+ Security["@nahisaho/musubix-security"]
49
+ end
50
+
51
+ Core <--> MCP
52
+ MCP <--> Security
53
+
54
+ subgraph Integration["Neuro-Symbolic Integration"]
55
+ NSI["LLM Creativity + Git-Native Knowledge"]
56
+ end
57
+
58
+ Core --> Integration
59
+ MCP --> Integration
60
+ end
61
+ ```
62
+
63
+ ## プロジェクト構造
64
+
65
+ | パス | 説明 |
66
+ |------|------|
67
+ | `packages/core/` | コアライブラリ(249モジュール) |
68
+ | `packages/core/auth/` | 認証・認可 |
69
+ | `packages/core/cli/` | CLIインターフェース |
70
+ | `packages/core/codegen/` | コード生成・解析 |
71
+ | `packages/core/design/` | 設計パターン・C4モデル |
72
+ | `packages/core/error/` | エラーハンドリング |
73
+ | `packages/core/explanation/` | 説明生成・可視化 |
74
+ | `packages/core/learning/` | 自己学習・パターン抽出 |
75
+ | `packages/core/requirements/` | 要件分析・分解 |
76
+ | `packages/core/symbolic/` | シンボリック推論 |
77
+ | `packages/core/traceability/` | トレーサビリティ |
78
+ | `packages/core/types/` | 型定義 |
79
+ | `packages/core/utils/` | ユーティリティ |
80
+ | `packages/core/validators/` | EARS検証 |
81
+ | `packages/mcp-server/` | MCPサーバー(35 tools, 5 prompts) |
82
+ | `packages/pattern-mcp/` | **パターン学習** |
83
+ | `packages/ontology-mcp/` | **オントロジーエンジン** |
84
+ | `packages/wake-sleep/` | **Wake-Sleep学習** |
85
+ | `packages/sdd-ontology/` | **SDDオントロジー** |
86
+ | `packages/security/` | **セキュリティ分析** |
87
+ | `packages/formal-verify/` | **形式検証** |
88
+ | `steering/` | プロジェクトメモリ |
89
+ | `storage/` | 仕様書・成果物 |
90
+ | `templates/` | テンプレート |
91
+ | `docs/` | ドキュメント |
92
+
93
+ ## 要件
94
+
95
+ - Node.js >= 20.0.0
96
+ - npm >= 10.0.0
97
+ - TypeScript >= 5.3
98
+
99
+ ## インストール
100
+
101
+ ### npm/npx(推奨)
102
+
103
+ ```bash
104
+ # グローバルインストール
105
+ npm install -g musubix
106
+
107
+ # npx で直接実行
108
+ npx musubix init
109
+ npx musubix --help
110
+
111
+ # MCPサーバー起動
112
+ npx @nahisaho/musubix-mcp-server
113
+ npx musubix-mcp --transport stdio
114
+ ```
115
+
116
+ ### スコープ付きパッケージ
117
+
118
+ ```bash
119
+ # 個別パッケージのインストール
120
+ npm install @nahisaho/musubix-core
121
+ npm install @nahisaho/musubix-mcp-server
122
+ npm install @nahisaho/musubix-security
123
+ npm install @nahisaho/musubix-formal-verify
124
+ ```
125
+
126
+ ### ソースからビルド
127
+
128
+ ```bash
129
+ git clone https://github.com/nahisaho/MUSUBIX.git
130
+ cd MUSUBIX
131
+ npm install
132
+ npm run build
133
+ ```
134
+
135
+ ## 開発
136
+
137
+ \`\`\`bash
138
+ # ビルド
139
+ npm run build
140
+
141
+ # テスト実行
142
+ npm test
143
+
144
+ # リント
145
+ npm run lint
146
+
147
+ # 型チェック
148
+ npm run type-check
149
+ \`\`\`
150
+
151
+ ## 主要機能
152
+
153
+ ### 要件定義(Article II準拠)
154
+
155
+ - **EARS検証**: Easy Approach to Requirements Syntax パターン検証
156
+ - **一問一答ヒアリング**: 対話形式での要件収集
157
+ - **要件分解**: 大きな要件を実装単位に分解
158
+ - **関連要件検索**: 類似・依存要件の自動検出
159
+
160
+ ### 設計生成(Article III準拠)
161
+
162
+ - **C4モデル生成**: Context/Container/Component/Code図
163
+ - **ADR生成**: Architecture Decision Records
164
+ - **パターン検出**: デザインパターンの自動検出・推奨
165
+ - **SOLID検証**: SOLID原則準拠チェック
166
+
167
+ ### コード生成・検証
168
+
169
+ - **静的解析**: 品質メトリクス・複雑度計算
170
+ - **セキュリティスキャン**: 脆弱性検出
171
+ - **テスト生成**: ユニット・統合テスト生成
172
+ - **カバレッジレポート**: テストカバレッジ計測
173
+
174
+ ### MCPサーバー
175
+
176
+ 16個のツール(SDD 9個 + パターン 7個)と3つのプロンプトを提供:
177
+
178
+ ```bash
179
+ # MCPサーバー起動
180
+ npx @nahisaho/musubix-mcp-server
181
+ ```
182
+
183
+ ## ドキュメント
184
+
185
+ | 文書 | 説明 |
186
+ |------|------|
187
+ | [要件定義書](storage/specs/REQ-MUSUBIX-001.md) | EARS形式の機能・非機能要件 |
188
+ | [設計書](storage/specs/DES-MUSUBIX-001.md) | C4モデル・ADRベースの設計 |
189
+ | [タスク定義書](storage/specs/TSK-MUSUBIX-001.md) | 56タスクのスプリント計画 |
190
+ | [APIリファレンス](docs/API-REFERENCE.md) | 公開API仕様 |
191
+ | [シンボリック統合](storage/specs/REQ-SYMB-001.md) | Neuro-Symbolic要件(27要件) |
192
+
193
+ ## シンボリック推論モジュール(v1.2.0)
194
+
195
+ 新しいシンボリック推論モジュール:
196
+
197
+ ### Phase 1: 基盤
198
+ - **SemanticCodeFilterPipeline** - LLM出力のセマンティック検証
199
+ - **HallucinationDetector** - 未定義シンボル・無効インポートの検出
200
+ - **ConstitutionRuleRegistry** - 9憲法条項の強制
201
+ - **ConfidenceEstimator** - AST複雑度、要件カバレッジのスコアリング
202
+ - **ConfidenceBasedRouter** - 信頼度ベースのルーティング決定
203
+ - **ErrorHandler** - グレースフルデグラデーション
204
+
205
+ ### Phase 2: 形式検証
206
+ - **EarsToFormalSpecConverter** - EARS → SMT-LIB変換
207
+ - **VerificationConditionGenerator** - 検証条件(VC)生成
208
+ - **Z3Adapter** - Z3 SMTソルバー統合
209
+ - **SecurityScanner** - OWASPパターン、シークレット検出
210
+
211
+ ### Phase 3: 高度機能
212
+ - **CandidateRanker** - 複数基準による候補スコアリング
213
+ - **ResultBlender** - Neural/Symbolic結果統合(3戦略)
214
+ - **ExtensibleRuleConfig** - YAML/JSONルール設定
215
+ - **AuditLogger** - SHA-256ハッシュチェーン改ざん検出
216
+ - **PerformanceBudget** - 段階別予算、SLOメトリクス
217
+ - **QualityGateValidator** - 自動品質ゲート検証
218
+
219
+ ## Wake-Sleep学習サイクル(v1.3.0)
220
+
221
+ Wake-Sleepアルゴリズムに基づく継続的学習システム:
222
+
223
+ | フェーズ | 処理内容 |
224
+ |---------|----------|
225
+ | **Wake** | コード観察 → パターン抽出 → 知識グラフ更新 |
226
+ | **Sleep** | パターン統合 → 類似パターン圧縮 → メモリ最適化 |
227
+
228
+ ### 主要コンポーネント
229
+ - **WakeSleepCycle** - 学習サイクルのオーケストレーション
230
+ - **PatternLibrary** - 学習済みパターンの永続化管理
231
+ - **PatternOntologyBridge** - パターン↔オントロジー相互変換
232
+ - **N3Store** - RDF/OWLベースの知識グラフストレージ
233
+
234
+ ### 新MCPツール(7ツール)
235
+ - `pattern_extract` - コードからパターンを抽出
236
+ - `pattern_compress` - パターンの抽象化・圧縮
237
+ - `pattern_store` - パターンライブラリへの保存
238
+ - `pattern_query` - パターンの検索・取得
239
+ - `pattern_consolidate` - 類似パターンの統合
240
+ - `ontology_query` - オントロジーグラフへのクエリ
241
+ - `ontology_infer` - オントロジーによる推論実行
242
+
243
+ ## 高度推論(v1.4.5)
244
+
245
+ OWL 2 RLプロファイル推論とDatalog評価エンジン:
246
+
247
+ ### 推論コンポーネント
248
+ - **OWL2RLReasoner** - OWL 2 RLプロファイル準拠推論(20+ビルトインルール)
249
+ - **DatalogEngine** - ストラティファイドDatalog評価(否定サポート)
250
+ - **InferenceExplainer** - 人間可読な推論説明生成
251
+ - **ProgressReporter** - リアルタイム進捗フィードバック(500ms間隔)
252
+
253
+ ### OWL 2 RLビルトインルール
254
+ | カテゴリ | ルール | 説明 |
255
+ |----------|-------|------|
256
+ | Class Axioms | cax-sco, cax-eqc | サブクラス、同値クラス推論 |
257
+ | Property | prp-dom, prp-rng | ドメイン、レンジ推論 |
258
+ | Property Characteristics | prp-symp, prp-trp, prp-inv | 対称、推移、逆プロパティ |
259
+ | Equality | eq-ref, eq-sym, eq-trans | sameAs推論 |
260
+
261
+ ### 説明フォーマット
262
+ - `text` - プレーンテキスト説明
263
+ - `markdown` - Markdown形式
264
+ - `html` - HTML形式(エスケープ対応)
265
+
266
+ ## 憲法(9条)
267
+
268
+ MUSUBIXは以下の9条の憲法に準拠しています:
269
+
270
+ 1. **Specification First** - 要件が先、実装は後
271
+ 2. **Design Before Code** - 設計が先、コードは後
272
+ 3. **Single Source of Truth** - プロジェクトメモリが正
273
+ 4. **Traceability** - 要件〜コードの追跡可能性
274
+ 5. **Incremental Progress** - 小さく頻繁にデリバリー
275
+ 6. **Decision Documentation** - 決定はADRで記録
276
+ 7. **Quality Gates** - フェーズ検証必須
277
+ 8. **User-Centric** - ユーザー価値を文書化
278
+ 9. **Continuous Learning** - 振り返りと改善
279
+
280
+ ## ライセンス
281
+
282
+ MIT License - 詳細は [LICENSE](LICENSE) を参照
283
+
284
+ ## 作者
285
+
286
+ nahisaho
287
+
288
+ ## 変更履歴
289
+
290
+ [CHANGELOG.md](CHANGELOG.md) を参照
291
+
292
+ ---
293
+
294
+ **文書ID**: README
295
+ **バージョン**: 1.8.0
296
+ **最終更新**: 2026-01-06