musubix 1.7.0 → 1.8.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.
- package/AGENTS.md +8 -4
- package/README.ja.md +11 -4
- package/README.md +23 -4
- package/docs/API-REFERENCE.md +238 -0
- package/docs/INSTALL-GUIDE.ja.md +2 -2
- package/docs/INSTALL-GUIDE.md +2 -2
- package/docs/USER-GUIDE-v1.8.0.md +2371 -0
- package/docs/USER-GUIDE.ja.md +284 -5
- package/docs/USER-GUIDE.md +601 -6
- package/docs/overview/MUSUBIX-Core.md +671 -0
- package/docs/overview/MUSUBIX-FormalVerify.md +566 -0
- package/docs/overview/MUSUBIX-Learning.md +837 -0
- package/docs/overview/MUSUBIX-MCP-Server.md +535 -0
- package/docs/overview/MUSUBIX-Overview.md +264 -0
- package/docs/overview/MUSUBIX-Phase1-Complete.md +271 -0
- package/docs/overview/MUSUBIX-Roadmap-v2.md +399 -0
- package/docs/overview/MUSUBIX-Security-Plan.md +939 -0
- package/docs/overview/MUSUBIX-Security.md +891 -0
- package/docs/overview/MUSUBIX-YATA.md +666 -0
- package/docs/overview/Neuro-SymbolicAI.md +159 -0
- package/package.json +7 -4
package/AGENTS.md
CHANGED
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
|
|
9
9
|
| 項目 | 詳細 |
|
|
10
10
|
|------|------|
|
|
11
|
-
| **バージョン** | 1.
|
|
11
|
+
| **バージョン** | 1.8.0 (Security Analysis Edition) |
|
|
12
12
|
| **言語** | TypeScript |
|
|
13
13
|
| **ランタイム** | Node.js >= 20.0.0 |
|
|
14
14
|
| **パッケージマネージャ** | npm >= 10.0.0 |
|
|
15
15
|
| **ビルドシステム** | モノレポ(npm workspaces) |
|
|
16
16
|
| **テストフレームワーク** | Vitest |
|
|
17
|
-
| **テスト数** |
|
|
17
|
+
| **テスト数** | 1586 (全合格) |
|
|
18
18
|
| **コンポーネント数** | 249 (62ドメイン対応) |
|
|
19
19
|
| **Agent Skills** | 12 (Claude Code対応) |
|
|
20
20
|
|
|
@@ -28,10 +28,12 @@
|
|
|
28
28
|
packages/
|
|
29
29
|
├── core/ # @nahisaho/musubix-core
|
|
30
30
|
├── mcp-server/ # @nahisaho/musubix-mcp-server
|
|
31
|
+
├── security/ # @nahisaho/musubix-security (NEW!)
|
|
32
|
+
├── formal-verify/ # @nahisaho/musubix-formal-verify
|
|
31
33
|
├── yata-client/ # @nahisaho/musubix-yata-client
|
|
32
34
|
├── yata-local/ # @nahisaho/yata-local
|
|
33
35
|
├── yata-global/ # @nahisaho/yata-global
|
|
34
|
-
├── yata-ui/ # @nahisaho/yata-ui
|
|
36
|
+
├── yata-ui/ # @nahisaho/yata-ui
|
|
35
37
|
├── pattern-mcp/ # @nahisaho/musubix-pattern-mcp
|
|
36
38
|
├── ontology-mcp/ # @nahisaho/musubix-ontology-mcp
|
|
37
39
|
├── wake-sleep/ # @nahisaho/musubix-wake-sleep
|
|
@@ -42,10 +44,12 @@ packages/
|
|
|
42
44
|
|-----------|-----|------|
|
|
43
45
|
| `packages/core/` | `@nahisaho/musubix-core` | コアライブラリ - CLI、EARS検証、コード生成、設計パターン |
|
|
44
46
|
| `packages/mcp-server/` | `@nahisaho/musubix-mcp-server` | MCPサーバー - 19ツール、3プロンプト |
|
|
47
|
+
| `packages/security/` | `@nahisaho/musubix-security` | **セキュリティ分析** - 脆弱性検出、シークレット検出、テイント解析 (NEW!) |
|
|
48
|
+
| `packages/formal-verify/` | `@nahisaho/musubix-formal-verify` | 形式検証 - Z3統合、Hoare検証、EARS→SMT変換 |
|
|
45
49
|
| `packages/yata-client/` | `@nahisaho/musubix-yata-client` | YATAクライアント - 知識グラフ連携 |
|
|
46
50
|
| `packages/yata-local/` | `@nahisaho/yata-local` | **YATA Local** - SQLiteベースローカル知識グラフ |
|
|
47
51
|
| `packages/yata-global/` | `@nahisaho/yata-global` | **YATA Global** - 分散型知識グラフプラットフォーム |
|
|
48
|
-
| `packages/yata-ui/` | `@nahisaho/yata-ui` | **YATA UI** - Web可視化・管理インターフェース
|
|
52
|
+
| `packages/yata-ui/` | `@nahisaho/yata-ui` | **YATA UI** - Web可視化・管理インターフェース |
|
|
49
53
|
| `packages/pattern-mcp/` | `@nahisaho/musubix-pattern-mcp` | パターン学習 - 抽出・圧縮・ライブラリ |
|
|
50
54
|
| `packages/ontology-mcp/` | `@nahisaho/musubix-ontology-mcp` | オントロジー - N3Store・推論エンジン |
|
|
51
55
|
| `packages/wake-sleep/` | `@nahisaho/musubix-wake-sleep` | Wake-Sleep学習サイクル |
|
package/README.ja.md
CHANGED
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
[](https://nodejs.org/)
|
|
7
7
|
[](LICENSE)
|
|
8
8
|
[](https://www.typescriptlang.org/)
|
|
9
|
-
[](https://github.com/nahisaho/MUSUBIX)
|
|
10
|
+
[](https://www.npmjs.com/package/@nahisaho/musubix-security)
|
|
10
11
|
|
|
11
12
|
> MUSUBI × YATA 統合による次世代AIコーディングシステム
|
|
12
13
|
>
|
|
13
|
-
> **v1.
|
|
14
|
+
> **v1.8.0** - セキュリティ分析エディション
|
|
14
15
|
|
|
15
16
|
## 概要
|
|
16
17
|
|
|
@@ -36,6 +37,8 @@ MUSUBIXは、**ニューラル(LLM)** と **シンボリック(知識グ
|
|
|
36
37
|
- 🌐 **YATA Global** - オフライン同期対応分散型知識プラットフォーム *(v1.6.3)*
|
|
37
38
|
- 📤 **KGPR** - 安全な知識共有のためのKnowledge Graph Pull Request *(v1.6.4)*
|
|
38
39
|
- 🚀 **YATAプラットフォーム拡張** - インデックス最適化、拡張エクスポート、グローバル同期、コード生成、Web UI *(v1.7.0)*
|
|
40
|
+
- 🔬 **形式検証** - Z3 SMTソルバー統合、Hoareトリプル検証、EARS→SMT変換 *(v1.7.5)*
|
|
41
|
+
- 🛡️ **セキュリティ分析** - 脆弱性スキャン、シークレット検出、テイント解析、依存関係監査 *(v1.8.0)*
|
|
39
42
|
|
|
40
43
|
## アーキテクチャ
|
|
41
44
|
|
|
@@ -85,6 +88,8 @@ flowchart TB
|
|
|
85
88
|
| `packages/ontology-mcp/` | **オントロジーエンジン(NEW!)** |
|
|
86
89
|
| `packages/wake-sleep/` | **Wake-Sleep学習(NEW!)** |
|
|
87
90
|
| `packages/sdd-ontology/` | **SDDオントロジー(NEW!)** |
|
|
91
|
+
| `packages/security/` | **セキュリティ分析(NEW!)** |
|
|
92
|
+
| `packages/formal-verify/` | **形式検証** |
|
|
88
93
|
| `steering/` | プロジェクトメモリ |
|
|
89
94
|
| `storage/` | 仕様書・成果物 |
|
|
90
95
|
| `templates/` | テンプレート |
|
|
@@ -120,6 +125,8 @@ npx musubix-mcp --transport stdio
|
|
|
120
125
|
npm install @nahisaho/musubix-core
|
|
121
126
|
npm install @nahisaho/musubix-mcp-server
|
|
122
127
|
npm install @nahisaho/musubix-yata-client
|
|
128
|
+
npm install @nahisaho/musubix-security
|
|
129
|
+
npm install @nahisaho/musubix-formal-verify
|
|
123
130
|
```
|
|
124
131
|
|
|
125
132
|
### ソースからビルド
|
|
@@ -291,5 +298,5 @@ nahisaho
|
|
|
291
298
|
---
|
|
292
299
|
|
|
293
300
|
**文書ID**: README
|
|
294
|
-
**バージョン**: 1.
|
|
295
|
-
**最終更新**: 2026-01-
|
|
301
|
+
**バージョン**: 1.8.0
|
|
302
|
+
**最終更新**: 2026-01-06
|
package/README.md
CHANGED
|
@@ -7,11 +7,15 @@
|
|
|
7
7
|
[](https://nodejs.org/)
|
|
8
8
|
[](LICENSE)
|
|
9
9
|
[](https://www.typescriptlang.org/)
|
|
10
|
-
[](https://github.com/nahisaho/MUSUBIX)
|
|
11
|
+
[](https://www.npmjs.com/package/@nahisaho/musubix-security)
|
|
12
|
+
[](https://www.npmjs.com/package/@nahisaho/musubix-dfg)
|
|
13
|
+
[](https://www.npmjs.com/package/@nahisaho/musubix-lean)
|
|
14
|
+
[](https://www.npmjs.com/package/@nahisaho/yata-scale)
|
|
11
15
|
|
|
12
16
|
> Next-generation AI Coding System powered by MUSUBI × YATA Integration
|
|
13
17
|
>
|
|
14
|
-
> **v1.
|
|
18
|
+
> **v1.8.5** - Deep Symbolic Integration Edition
|
|
15
19
|
|
|
16
20
|
**[日本語版 README](README.ja.md)**
|
|
17
21
|
|
|
@@ -39,6 +43,11 @@ MUSUBIX is an innovative AI coding system that integrates **Neural (LLM)** and *
|
|
|
39
43
|
- 🌐 **YATA Global** - Distributed knowledge platform with offline sync *(v1.6.3)*
|
|
40
44
|
- 📤 **KGPR** - Knowledge Graph Pull Request for safe knowledge sharing *(v1.6.4)*
|
|
41
45
|
- 🚀 **YATA Platform Enhancements** - Index optimization, enhanced export, global sync, code generation, web UI *(v1.7.0)*
|
|
46
|
+
- 🔬 **Formal Verification** - Z3 SMT solver integration, Hoare triple verification, EARS-to-SMT conversion *(v1.7.5)*
|
|
47
|
+
- 🛡️ **Security Analysis** - Vulnerability scanning, secret detection, taint analysis, dependency auditing *(v1.8.0)*
|
|
48
|
+
- 📊 **DFG/CFG Extraction** - Data flow graph and control flow graph analysis for TypeScript/JavaScript *(v2.0.0-alpha.1)*
|
|
49
|
+
- 🧮 **Lean 4 Integration** - Theorem proving with EARS-to-Lean conversion and ReProver proof search *(v2.0.0-alpha.1)*
|
|
50
|
+
- 📈 **YATA Scale** - Distributed knowledge graph with sharding, multi-tier caching, and vector clock sync *(v2.0.0-alpha.1)*
|
|
42
51
|
|
|
43
52
|
## Architecture
|
|
44
53
|
|
|
@@ -90,6 +99,11 @@ flowchart TB
|
|
|
90
99
|
| `packages/sdd-ontology/` | **SDD Ontology (NEW!)** |
|
|
91
100
|
| `packages/yata-local/` | **YATA Local - SQLite Knowledge Graph (NEW!)** |
|
|
92
101
|
| `packages/yata-global/` | **YATA Global - Distributed Knowledge Platform (NEW!)** |
|
|
102
|
+
| `packages/security/` | **Security Analysis (NEW!)** |
|
|
103
|
+
| `packages/formal-verify/` | **Formal Verification** |
|
|
104
|
+
| `packages/dfg/` | **DFG/CFG Extraction - Data Flow Analysis (v2.0.0)** |
|
|
105
|
+
| `packages/lean/` | **Lean 4 Integration - Theorem Proving (v2.0.0)** |
|
|
106
|
+
| `packages/yata-scale/` | **YATA Scale - Distributed KG (v2.0.0)** |
|
|
93
107
|
| `steering/` | Project Memory |
|
|
94
108
|
| `storage/` | Specifications & Artifacts |
|
|
95
109
|
| `templates/` | Templates |
|
|
@@ -125,6 +139,11 @@ npx musubix-mcp --transport stdio
|
|
|
125
139
|
npm install @nahisaho/musubix-core
|
|
126
140
|
npm install @nahisaho/musubix-mcp-server
|
|
127
141
|
npm install @nahisaho/musubix-yata-client
|
|
142
|
+
npm install @nahisaho/musubix-security
|
|
143
|
+
npm install @nahisaho/musubix-formal-verify
|
|
144
|
+
npm install @nahisaho/musubix-dfg
|
|
145
|
+
npm install @nahisaho/musubix-lean
|
|
146
|
+
npm install @nahisaho/yata-scale
|
|
128
147
|
```
|
|
129
148
|
|
|
130
149
|
### Build from Source
|
|
@@ -296,5 +315,5 @@ See [CHANGELOG.md](CHANGELOG.md)
|
|
|
296
315
|
---
|
|
297
316
|
|
|
298
317
|
**Document ID**: README
|
|
299
|
-
**Version**: 1.
|
|
300
|
-
**Last Updated**: 2026-01-
|
|
318
|
+
**Version**: 1.8.0
|
|
319
|
+
**Last Updated**: 2026-01-06
|
package/docs/API-REFERENCE.md
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
- [YATA Global](#yata-global) *(v1.6.3)*
|
|
19
19
|
- [KGPR](#kgpr) *(v1.6.4)*
|
|
20
20
|
- [YATA Platform](#yata-platform) *(v1.7.0)*
|
|
21
|
+
- [Formal Verification](#formal-verification) *(v1.7.5)*
|
|
21
22
|
- [Validation](#validation)
|
|
22
23
|
- [Utils](#utils)
|
|
23
24
|
- [MCP Server](#mcp-server)
|
|
@@ -885,6 +886,243 @@ await server.start();
|
|
|
885
886
|
|
|
886
887
|
---
|
|
887
888
|
|
|
889
|
+
### Formal Verification (v1.7.5)
|
|
890
|
+
|
|
891
|
+
The formal verification module provides Z3 SMT solver integration for verifying code correctness.
|
|
892
|
+
|
|
893
|
+
#### Z3Adapter
|
|
894
|
+
|
|
895
|
+
Unified interface for Z3 backends (WASM or Process).
|
|
896
|
+
|
|
897
|
+
```typescript
|
|
898
|
+
import { Z3Adapter } from '@nahisaho/musubix-formal-verify';
|
|
899
|
+
|
|
900
|
+
// Create adapter (auto-selects best backend)
|
|
901
|
+
const z3 = await Z3Adapter.create();
|
|
902
|
+
|
|
903
|
+
// Check satisfiability
|
|
904
|
+
const result = await z3.checkSat('(declare-const x Int) (assert (> x 0))');
|
|
905
|
+
console.log(result); // 'sat' | 'unsat' | 'unknown'
|
|
906
|
+
```
|
|
907
|
+
|
|
908
|
+
**Methods:**
|
|
909
|
+
|
|
910
|
+
| Method | Parameters | Returns | Description |
|
|
911
|
+
|--------|------------|---------|-------------|
|
|
912
|
+
| `create()` | - | `Promise<Z3Adapter>` | Create adapter instance |
|
|
913
|
+
| `checkSat(smtLib2)` | `smtLib2: string` | `Promise<string>` | Check satisfiability |
|
|
914
|
+
| `dispose()` | - | `Promise<void>` | Cleanup resources |
|
|
915
|
+
|
|
916
|
+
---
|
|
917
|
+
|
|
918
|
+
#### PreconditionVerifier
|
|
919
|
+
|
|
920
|
+
Verifies preconditions for functions and methods.
|
|
921
|
+
|
|
922
|
+
```typescript
|
|
923
|
+
import { PreconditionVerifier } from '@nahisaho/musubix-formal-verify';
|
|
924
|
+
|
|
925
|
+
const verifier = new PreconditionVerifier(z3Adapter);
|
|
926
|
+
|
|
927
|
+
const result = await verifier.verify({
|
|
928
|
+
condition: { expression: 'amount > 0 && balance >= amount', format: 'javascript' },
|
|
929
|
+
variables: [
|
|
930
|
+
{ name: 'amount', type: 'Int' },
|
|
931
|
+
{ name: 'balance', type: 'Int' }
|
|
932
|
+
]
|
|
933
|
+
});
|
|
934
|
+
|
|
935
|
+
console.log(result.status); // 'valid' | 'invalid' | 'unknown' | 'error'
|
|
936
|
+
```
|
|
937
|
+
|
|
938
|
+
**Methods:**
|
|
939
|
+
|
|
940
|
+
| Method | Parameters | Returns | Description |
|
|
941
|
+
|--------|------------|---------|-------------|
|
|
942
|
+
| `verify(spec)` | `PreconditionSpec` | `Promise<VerificationResult>` | Verify precondition |
|
|
943
|
+
|
|
944
|
+
**PreconditionSpec:**
|
|
945
|
+
|
|
946
|
+
| Property | Type | Description |
|
|
947
|
+
|----------|------|-------------|
|
|
948
|
+
| `condition` | `Condition` | The precondition to verify |
|
|
949
|
+
| `variables` | `Variable[]` | Variables with types |
|
|
950
|
+
|
|
951
|
+
**VerificationResult:**
|
|
952
|
+
|
|
953
|
+
| Property | Type | Description |
|
|
954
|
+
|----------|------|-------------|
|
|
955
|
+
| `status` | `'valid' \| 'invalid' \| 'unknown' \| 'error'` | Verification status |
|
|
956
|
+
| `counterexample?` | `Record<string, any>` | Counterexample if invalid |
|
|
957
|
+
| `message?` | `string` | Additional message |
|
|
958
|
+
|
|
959
|
+
---
|
|
960
|
+
|
|
961
|
+
#### PostconditionVerifier
|
|
962
|
+
|
|
963
|
+
Verifies Hoare triples {P} C {Q}.
|
|
964
|
+
|
|
965
|
+
```typescript
|
|
966
|
+
import { PostconditionVerifier } from '@nahisaho/musubix-formal-verify';
|
|
967
|
+
|
|
968
|
+
const verifier = new PostconditionVerifier(z3Adapter);
|
|
969
|
+
|
|
970
|
+
const result = await verifier.verify({
|
|
971
|
+
precondition: { expression: 'balance >= amount', format: 'javascript' },
|
|
972
|
+
postcondition: { expression: 'balance_new == balance - amount', format: 'javascript' },
|
|
973
|
+
preVariables: [
|
|
974
|
+
{ name: 'balance', type: 'Int' },
|
|
975
|
+
{ name: 'amount', type: 'Int' }
|
|
976
|
+
],
|
|
977
|
+
postVariables: [
|
|
978
|
+
{ name: 'balance_new', type: 'Int' }
|
|
979
|
+
],
|
|
980
|
+
transition: 'balance_new == balance - amount'
|
|
981
|
+
});
|
|
982
|
+
```
|
|
983
|
+
|
|
984
|
+
**PostconditionSpec:**
|
|
985
|
+
|
|
986
|
+
| Property | Type | Description |
|
|
987
|
+
|----------|------|-------------|
|
|
988
|
+
| `precondition` | `Condition` | Pre-state condition |
|
|
989
|
+
| `postcondition` | `Condition` | Post-state condition |
|
|
990
|
+
| `preVariables` | `Variable[]` | Pre-state variables |
|
|
991
|
+
| `postVariables` | `Variable[]` | Post-state variables |
|
|
992
|
+
| `transition` | `string` | State transition expression |
|
|
993
|
+
|
|
994
|
+
---
|
|
995
|
+
|
|
996
|
+
#### EarsToSmtConverter
|
|
997
|
+
|
|
998
|
+
Converts EARS requirements to SMT-LIB2 formulas.
|
|
999
|
+
|
|
1000
|
+
```typescript
|
|
1001
|
+
import { EarsToSmtConverter } from '@nahisaho/musubix-formal-verify';
|
|
1002
|
+
|
|
1003
|
+
const converter = new EarsToSmtConverter();
|
|
1004
|
+
|
|
1005
|
+
// Single conversion
|
|
1006
|
+
const result = converter.convert('THE system SHALL validate inputs');
|
|
1007
|
+
|
|
1008
|
+
// Multiple conversions
|
|
1009
|
+
const results = converter.convertMultiple([
|
|
1010
|
+
'THE system SHALL validate inputs', // ubiquitous
|
|
1011
|
+
'WHEN error, THE system SHALL notify user', // event-driven
|
|
1012
|
+
'WHILE busy, THE system SHALL queue requests', // state-driven
|
|
1013
|
+
'THE system SHALL NOT expose secrets', // unwanted
|
|
1014
|
+
'IF admin, THEN THE system SHALL allow edit' // optional
|
|
1015
|
+
]);
|
|
1016
|
+
```
|
|
1017
|
+
|
|
1018
|
+
**Methods:**
|
|
1019
|
+
|
|
1020
|
+
| Method | Parameters | Returns | Description |
|
|
1021
|
+
|--------|------------|---------|-------------|
|
|
1022
|
+
| `convert(ears)` | `ears: string` | `ConversionResult` | Convert single requirement |
|
|
1023
|
+
| `convertMultiple(ears[])` | `ears: string[]` | `ConversionResult[]` | Convert multiple requirements |
|
|
1024
|
+
|
|
1025
|
+
**EARS Patterns:**
|
|
1026
|
+
|
|
1027
|
+
| Pattern | Syntax | SMT Encoding |
|
|
1028
|
+
|---------|--------|--------------|
|
|
1029
|
+
| Ubiquitous | `THE system SHALL [action]` | `(assert action)` |
|
|
1030
|
+
| Event-driven | `WHEN [event], THE system SHALL [response]` | `(assert (=> event response))` |
|
|
1031
|
+
| State-driven | `WHILE [state], THE system SHALL [response]` | `(assert (=> state response))` |
|
|
1032
|
+
| Unwanted | `THE system SHALL NOT [behavior]` | `(assert (not behavior))` |
|
|
1033
|
+
| Optional | `IF [condition], THEN THE system SHALL [response]` | `(assert (=> condition response))` |
|
|
1034
|
+
|
|
1035
|
+
---
|
|
1036
|
+
|
|
1037
|
+
#### TraceabilityDB
|
|
1038
|
+
|
|
1039
|
+
SQLite-based traceability database.
|
|
1040
|
+
|
|
1041
|
+
```typescript
|
|
1042
|
+
import { TraceabilityDB } from '@nahisaho/musubix-formal-verify';
|
|
1043
|
+
|
|
1044
|
+
const db = new TraceabilityDB('./trace.db');
|
|
1045
|
+
|
|
1046
|
+
// Add nodes
|
|
1047
|
+
await db.addNode({ id: 'REQ-001', type: 'requirement', title: 'User Auth' });
|
|
1048
|
+
await db.addNode({ id: 'DES-001', type: 'design', title: 'AuthService' });
|
|
1049
|
+
await db.addNode({ id: 'CODE-001', type: 'code', title: 'auth.ts' });
|
|
1050
|
+
|
|
1051
|
+
// Add links
|
|
1052
|
+
await db.addLink({ source: 'DES-001', target: 'REQ-001', type: 'satisfies' });
|
|
1053
|
+
await db.addLink({ source: 'CODE-001', target: 'DES-001', type: 'implements' });
|
|
1054
|
+
|
|
1055
|
+
// Query
|
|
1056
|
+
const node = await db.getNode('REQ-001');
|
|
1057
|
+
const stats = await db.getStatistics();
|
|
1058
|
+
```
|
|
1059
|
+
|
|
1060
|
+
**Methods:**
|
|
1061
|
+
|
|
1062
|
+
| Method | Parameters | Returns | Description |
|
|
1063
|
+
|--------|------------|---------|-------------|
|
|
1064
|
+
| `addNode(node)` | `TraceNode` | `Promise<void>` | Add traceability node |
|
|
1065
|
+
| `getNode(id)` | `id: string` | `Promise<TraceNode \| undefined>` | Get node by ID |
|
|
1066
|
+
| `addLink(link)` | `TraceLink` | `Promise<void>` | Add traceability link |
|
|
1067
|
+
| `getStatistics()` | - | `Promise<TraceStats>` | Get database statistics |
|
|
1068
|
+
| `query(nodeId, options?)` | `nodeId: string, QueryOptions` | `Promise<QueryResult>` | Query related nodes |
|
|
1069
|
+
| `close()` | - | `void` | Close database |
|
|
1070
|
+
|
|
1071
|
+
**Node Types:**
|
|
1072
|
+
|
|
1073
|
+
| Type | Description |
|
|
1074
|
+
|------|-------------|
|
|
1075
|
+
| `requirement` | Requirements (REQ-*) |
|
|
1076
|
+
| `design` | Design artifacts (DES-*) |
|
|
1077
|
+
| `code` | Code files |
|
|
1078
|
+
| `test` | Test cases |
|
|
1079
|
+
|
|
1080
|
+
**Link Types:**
|
|
1081
|
+
|
|
1082
|
+
| Type | Description |
|
|
1083
|
+
|------|-------------|
|
|
1084
|
+
| `satisfies` | Design satisfies requirement |
|
|
1085
|
+
| `implements` | Code implements design |
|
|
1086
|
+
| `verifies` | Test verifies requirement |
|
|
1087
|
+
| `traces-to` | Generic traceability |
|
|
1088
|
+
|
|
1089
|
+
---
|
|
1090
|
+
|
|
1091
|
+
#### ImpactAnalyzer
|
|
1092
|
+
|
|
1093
|
+
Analyzes change impact across traceability graph.
|
|
1094
|
+
|
|
1095
|
+
```typescript
|
|
1096
|
+
import { ImpactAnalyzer } from '@nahisaho/musubix-formal-verify';
|
|
1097
|
+
|
|
1098
|
+
const analyzer = new ImpactAnalyzer(traceabilityDB);
|
|
1099
|
+
|
|
1100
|
+
// Analyze impact of changing REQ-001
|
|
1101
|
+
const impact = await analyzer.analyze('REQ-001');
|
|
1102
|
+
|
|
1103
|
+
console.log(`Total impacted: ${impact.totalImpacted}`);
|
|
1104
|
+
console.log(`Direct: ${impact.directImpact.length}`);
|
|
1105
|
+
console.log(`Indirect: ${impact.indirectImpact.length}`);
|
|
1106
|
+
```
|
|
1107
|
+
|
|
1108
|
+
**Methods:**
|
|
1109
|
+
|
|
1110
|
+
| Method | Parameters | Returns | Description |
|
|
1111
|
+
|--------|------------|---------|-------------|
|
|
1112
|
+
| `analyze(nodeId)` | `nodeId: string` | `Promise<ImpactResult>` | Analyze change impact |
|
|
1113
|
+
|
|
1114
|
+
**ImpactResult:**
|
|
1115
|
+
|
|
1116
|
+
| Property | Type | Description |
|
|
1117
|
+
|----------|------|-------------|
|
|
1118
|
+
| `sourceId` | `string` | Source node ID |
|
|
1119
|
+
| `directImpact` | `ImpactedNode[]` | Directly impacted nodes |
|
|
1120
|
+
| `indirectImpact` | `ImpactedNode[]` | Transitively impacted nodes |
|
|
1121
|
+
| `totalImpacted` | `number` | Total number of impacted nodes |
|
|
1122
|
+
| `maxDepth` | `number` | Maximum impact depth |
|
|
1123
|
+
|
|
1124
|
+
---
|
|
1125
|
+
|
|
888
1126
|
### Utils
|
|
889
1127
|
|
|
890
1128
|
#### I18nManager
|
package/docs/INSTALL-GUIDE.ja.md
CHANGED