musubix 3.3.7 → 3.3.9

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,324 +0,0 @@
1
- # MUSUBIX v3.0 マイグレーションガイド
2
-
3
- このドキュメントは MUSUBIX v2.x から v3.0 への移行手順を説明します。
4
-
5
- ## 概要
6
-
7
- MUSUBIX v3.0.0 では **Git-Native Knowledge System** を導入し、YATA(Yet Another Temporal Architecture)を廃止しました。
8
-
9
- ### 主な変更点
10
-
11
- | 項目 | v2.x | v3.0 |
12
- |------|------|------|
13
- | 知識ストレージ | YATA (SQLite/分散) | Git-friendly JSON |
14
- | ストレージパス | `.yata/` | `.knowledge/` |
15
- | 知識グラフAPI | YATAClient | FileKnowledgeStore |
16
- | ポリシー検証 | 手動 | PolicyEngine (9憲法条項) |
17
- | ADR管理 | 手動 | DecisionManager |
18
-
19
- ---
20
-
21
- ## Step 1: パッケージ更新
22
-
23
- ### package.json の更新
24
-
25
- ```diff
26
- {
27
- "dependencies": {
28
- - "@nahisaho/musubix-yata-client": "^2.4.2",
29
- - "@nahisaho/yata-local": "^2.4.6",
30
- - "@nahisaho/yata-global": "^2.4.4",
31
- + "@musubix/knowledge": "^3.0.0",
32
- + "@musubix/policy": "^3.0.0",
33
- + "@musubix/decisions": "^3.0.0"
34
- }
35
- }
36
- ```
37
-
38
- ### インストール
39
-
40
- ```bash
41
- npm install @musubix/knowledge @musubix/policy @musubix/decisions
42
- npm uninstall @nahisaho/musubix-yata-client @nahisaho/yata-local @nahisaho/yata-global
43
- ```
44
-
45
- ---
46
-
47
- ## Step 2: 知識グラフ API の移行
48
-
49
- ### v2.x (YATA)
50
-
51
- ```typescript
52
- import { YATAClient } from '@nahisaho/musubix-yata-client';
53
-
54
- const client = new YATAClient({ dbPath: '.yata/knowledge.db' });
55
- await client.addNode({ id: 'REQ-001', type: 'requirement', label: 'User Login' });
56
- await client.addEdge({ from: 'REQ-001', to: 'DES-001', type: 'implements' });
57
- const nodes = await client.query({ type: 'requirement' });
58
- ```
59
-
60
- ### v3.0 (FileKnowledgeStore)
61
-
62
- ```typescript
63
- import { createKnowledgeStore } from '@musubix/knowledge';
64
-
65
- const store = createKnowledgeStore('.knowledge');
66
- await store.putEntity({ id: 'REQ-001', type: 'requirement', name: 'User Login' });
67
- await store.addRelation({ from: 'REQ-001', to: 'DES-001', type: 'implements' });
68
- const entities = await store.query({ type: 'requirement' });
69
- ```
70
-
71
- ### API マッピング表
72
-
73
- | YATA (v2.x) | Knowledge (v3.0) | 説明 |
74
- |-------------|------------------|------|
75
- | `addNode()` | `putEntity()` | エンティティ作成/更新 |
76
- | `getNode()` | `getEntity()` | エンティティ取得 |
77
- | `deleteNode()` | `deleteEntity()` | エンティティ削除 |
78
- | `addEdge()` | `addRelation()` | リレーション追加 |
79
- | `deleteEdge()` | `removeRelation()` | リレーション削除 |
80
- | `query()` | `query()` | 検索 |
81
- | `traverse()` | `traverse()` | グラフ走査 |
82
-
83
- ---
84
-
85
- ## Step 3: データ移行
86
-
87
- ### 自動移行スクリプト
88
-
89
- ```typescript
90
- // scripts/migrate-yata-to-knowledge.ts
91
- import Database from 'better-sqlite3';
92
- import { createKnowledgeStore } from '@musubix/knowledge';
93
- import * as fs from 'node:fs';
94
-
95
- async function migrateYataToKnowledge(yataDbPath: string, knowledgePath: string) {
96
- // 1. Open YATA SQLite database
97
- const db = new Database(yataDbPath, { readonly: true });
98
-
99
- // 2. Create Knowledge store
100
- const store = createKnowledgeStore(knowledgePath);
101
-
102
- // 3. Migrate nodes → entities
103
- const nodes = db.prepare('SELECT * FROM nodes').all();
104
- for (const node of nodes) {
105
- await store.putEntity({
106
- id: node.id,
107
- type: mapNodeType(node.type),
108
- name: node.label || node.id,
109
- properties: JSON.parse(node.properties || '{}'),
110
- });
111
- }
112
-
113
- // 4. Migrate edges → relations
114
- const edges = db.prepare('SELECT * FROM edges').all();
115
- for (const edge of edges) {
116
- await store.addRelation({
117
- from: edge.from_id,
118
- to: edge.to_id,
119
- type: mapEdgeType(edge.type),
120
- });
121
- }
122
-
123
- db.close();
124
- console.log(`Migrated ${nodes.length} entities, ${edges.length} relations`);
125
- }
126
-
127
- function mapNodeType(yataType: string): string {
128
- const mapping: Record<string, string> = {
129
- 'requirement': 'requirement',
130
- 'design': 'design',
131
- 'task': 'task',
132
- 'code': 'code',
133
- 'test': 'code',
134
- 'pattern': 'pattern',
135
- };
136
- return mapping[yataType] || 'code';
137
- }
138
-
139
- function mapEdgeType(yataType: string): string {
140
- const mapping: Record<string, string> = {
141
- 'implements': 'implements',
142
- 'depends': 'depends_on',
143
- 'traces': 'traces_to',
144
- 'uses': 'depends_on',
145
- };
146
- return mapping[yataType] || 'depends_on';
147
- }
148
-
149
- // 実行
150
- migrateYataToKnowledge('.yata/knowledge.db', '.knowledge');
151
- ```
152
-
153
- ### 手動移行
154
-
155
- 1. `.yata/` ディレクトリをバックアップ
156
- 2. 新しい `.knowledge/` ディレクトリを作成
157
- 3. 既存データを JSON 形式でエクスポート/インポート
158
-
159
- ---
160
-
161
- ## Step 4: ポリシー検証の追加
162
-
163
- v3.0 では9憲法条項をプログラマブルに検証できます。
164
-
165
- ```typescript
166
- import { createPolicyEngine } from '@musubix/policy';
167
-
168
- const engine = createPolicyEngine();
169
-
170
- // プロジェクト全体の検証
171
- const report = await engine.validate({ projectPath: '.' });
172
-
173
- if (!report.passed) {
174
- for (const violation of report.violations) {
175
- console.error(`[${violation.policyId}] ${violation.message}`);
176
- }
177
- }
178
-
179
- // 特定ポリシーのみ検証
180
- const earsReport = await engine.validate(
181
- { filePath: 'storage/specs/REQ-001.md', content: fileContent },
182
- ['CONST-004'] // EARS Format のみ
183
- );
184
- ```
185
-
186
- ### 利用可能なポリシー
187
-
188
- | ID | 名称 | 説明 |
189
- |----|------|------|
190
- | CONST-001 | Library-First | 独立ライブラリ化の検証 |
191
- | CONST-002 | CLI Interface | CLI公開必須の検証 |
192
- | CONST-003 | Test-First | テスト先行の検証 |
193
- | CONST-004 | EARS Format | EARS形式準拠の検証 |
194
- | CONST-005 | Traceability | トレーサビリティの検証 |
195
- | CONST-006 | Project Memory | steering/参照の検証 |
196
- | CONST-007 | Design Patterns | 設計パターン適用の検証 |
197
- | CONST-008 | Decision Records | ADR記録の検証 |
198
- | CONST-009 | Quality Gates | 品質ゲートの検証 |
199
-
200
- ---
201
-
202
- ## Step 5: ADR 管理の追加
203
-
204
- ```typescript
205
- import { createDecisionManager } from '@musubix/decisions';
206
-
207
- const manager = createDecisionManager('docs/decisions');
208
-
209
- // ADR 作成
210
- const adr = await manager.create({
211
- title: 'Use Git-Native Knowledge System',
212
- context: 'Need simpler knowledge storage that works with Git',
213
- decision: 'Replace YATA with JSON-based FileKnowledgeStore',
214
- rationale: 'Git-friendly, no external database required',
215
- });
216
-
217
- // ADR 承認
218
- await manager.accept(adr.id);
219
-
220
- // ADR 一覧
221
- const adrs = await manager.list({ status: 'accepted' });
222
- ```
223
-
224
- ---
225
-
226
- ## Step 6: CLI コマンドの更新
227
-
228
- ### v2.x
229
-
230
- ```bash
231
- # YATA 関連コマンドは非推奨
232
- npx yata-ui
233
- npx yata-global-server
234
- ```
235
-
236
- ### v3.0
237
-
238
- ```bash
239
- # Knowledge コマンド
240
- npx musubix knowledge put REQ-001 requirement "User Login"
241
- npx musubix knowledge get REQ-001
242
- npx musubix knowledge link REQ-001 DES-001 implements
243
- npx musubix knowledge query --type requirement
244
-
245
- # Policy コマンド
246
- npx musubix policy validate
247
- npx musubix policy list
248
- npx musubix policy check storage/specs/REQ-001.md
249
-
250
- # Decision コマンド
251
- npx musubix decision create "Use TypeScript" --context "..." --decision "..."
252
- npx musubix decision list
253
- npx musubix decision accept 0001
254
- npx musubix adr index
255
- ```
256
-
257
- ---
258
-
259
- ## Step 7: MCP ツールの更新
260
-
261
- ### v2.x MCP ツール (廃止)
262
-
263
- - `yata_query` → 廃止
264
- - `yata_add_node` → 廃止
265
- - `yata_add_edge` → 廃止
266
-
267
- ### v3.0 MCP ツール (新規)
268
-
269
- | ツール | 説明 |
270
- |--------|------|
271
- | `knowledge_put_entity` | エンティティ作成/更新 |
272
- | `knowledge_get_entity` | エンティティ取得 |
273
- | `knowledge_delete_entity` | エンティティ削除 |
274
- | `knowledge_add_relation` | リレーション追加 |
275
- | `knowledge_query` | グラフクエリ |
276
- | `knowledge_traverse` | グラフ走査 |
277
- | `policy_validate` | ポリシー検証 |
278
- | `policy_list` | ポリシー一覧 |
279
- | `policy_get` | ポリシー詳細 |
280
- | `policy_check_file` | ファイル検証 |
281
- | `decision_create` | ADR作成 |
282
- | `decision_list` | ADR一覧 |
283
- | `decision_get` | ADR詳細 |
284
- | `decision_accept` | ADR承認 |
285
- | `decision_deprecate` | ADR廃止 |
286
- | `decision_search` | ADR検索 |
287
- | `decision_find_by_requirement` | 要件からADR検索 |
288
- | `decision_generate_index` | インデックス生成 |
289
-
290
- ---
291
-
292
- ## トラブルシューティング
293
-
294
- ### Q: YATA データベースが見つからない
295
-
296
- A: `.yata/` ディレクトリが存在しない場合、移行は不要です。新規に `.knowledge/` を作成してください。
297
-
298
- ### Q: エンティティタイプが一致しない
299
-
300
- A: v3.0 では以下のタイプのみサポート:
301
- - `requirement`
302
- - `design`
303
- - `task`
304
- - `code`
305
- - `pattern`
306
-
307
- ### Q: リレーションタイプが一致しない
308
-
309
- A: v3.0 では以下のタイプのみサポート:
310
- - `implements`
311
- - `depends_on`
312
- - `traces_to`
313
-
314
- ---
315
-
316
- ## サポート
317
-
318
- 問題が発生した場合は GitHub Issues で報告してください:
319
- https://github.com/nahisaho/MUSUBIX/issues
320
-
321
- ---
322
-
323
- **Last Updated**: 2026-01-14
324
- **Version**: v3.0.0