musubix 1.1.15 → 1.3.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.
- package/.github/prompts/sdd-review.prompt.md +155 -0
- package/.github/prompts/sdd-security.prompt.md +228 -0
- package/.github/prompts/sdd-test.prompt.md +230 -0
- package/AGENTS.md +54 -11
- package/README.ja.md +68 -10
- package/README.md +67 -9
- package/docs/API-REFERENCE.md +128 -2
- package/docs/INSTALL-GUIDE.ja.md +20 -3
- package/docs/INSTALL-GUIDE.md +20 -3
- package/docs/MUSUBI-enhancement_roadmap_20260105.md +651 -0
- package/docs/SwarmCoding.md +1284 -0
- package/docs/USER-GUIDE.ja.md +115 -6
- package/docs/USER-GUIDE.md +115 -6
- package/docs/evolution-from-musubi-to-musubix.md +336 -25
- package/docs/getting-started-with-sdd.md +1602 -0
- package/package.json +9 -4
- package/scripts/generate-quality-gate-report.ts +106 -0
- package/steering/product.ja.md +2 -2
- package/steering/project.yml +1 -1
- package/steering/structure.ja.md +2 -2
- package/steering/tech.ja.md +7 -6
package/docs/USER-GUIDE.ja.md
CHANGED
|
@@ -15,10 +15,11 @@
|
|
|
15
15
|
9. [検証フェーズ](#検証フェーズ)
|
|
16
16
|
10. [自己学習システム](#自己学習システム)
|
|
17
17
|
11. [C4コード生成](#c4コード生成)
|
|
18
|
-
12. [
|
|
19
|
-
13. [
|
|
20
|
-
14. [
|
|
21
|
-
15. [
|
|
18
|
+
12. [シンボリック推論](#シンボリック推論) *(v1.2.0)*
|
|
19
|
+
13. [MCPサーバー連携](#mcpサーバー連携)
|
|
20
|
+
14. [YATA知識グラフ](#yata知識グラフ)
|
|
21
|
+
15. [ベストプラクティス](#ベストプラクティス)
|
|
22
|
+
16. [トラブルシューティング](#トラブルシューティング)
|
|
22
23
|
|
|
23
24
|
---
|
|
24
25
|
|
|
@@ -633,6 +634,114 @@ export function createAuthService(): IAuthService {
|
|
|
633
634
|
|
|
634
635
|
---
|
|
635
636
|
|
|
637
|
+
## シンボリック推論
|
|
638
|
+
|
|
639
|
+
*(v1.2.0 新機能)*
|
|
640
|
+
|
|
641
|
+
### 概要
|
|
642
|
+
|
|
643
|
+
シンボリック推論は、形式検証と知識グラフベースの推論を適用して、LLM出力を強化します。このハイブリッドアプローチ(ニューロシンボリック)は、ニューラルネットワークの創造性とシンボリックロジックの精度を組み合わせます。
|
|
644
|
+
|
|
645
|
+
### 主要コンポーネント
|
|
646
|
+
|
|
647
|
+
| コンポーネント | 説明 |
|
|
648
|
+
|--------------|------|
|
|
649
|
+
| `SemanticCodeFilterPipeline` | コード品質のためのLLM出力フィルタリング |
|
|
650
|
+
| `HallucinationDetector` | ハルシネーション(幻覚)出力の検出と防止 |
|
|
651
|
+
| `EarsToFormalSpecConverter` | EARS要件からZ3形式仕様への変換 |
|
|
652
|
+
| `Z3Adapter` | 形式検証のためのZ3ソルバーインターフェース |
|
|
653
|
+
| `QualityGateValidator` | 17品質ゲートチェックに対する検証 |
|
|
654
|
+
|
|
655
|
+
### 使用方法
|
|
656
|
+
|
|
657
|
+
#### セマンティックコードフィルタリング
|
|
658
|
+
|
|
659
|
+
```typescript
|
|
660
|
+
import { SemanticCodeFilterPipeline } from '@nahisaho/musubix-core';
|
|
661
|
+
|
|
662
|
+
const pipeline = new SemanticCodeFilterPipeline({
|
|
663
|
+
enableHallucinationDetection: true,
|
|
664
|
+
maxRetries: 3
|
|
665
|
+
});
|
|
666
|
+
|
|
667
|
+
const result = await pipeline.filter({
|
|
668
|
+
code: generatedCode,
|
|
669
|
+
context: { language: 'typescript', domain: 'authentication' }
|
|
670
|
+
});
|
|
671
|
+
|
|
672
|
+
if (result.isValid) {
|
|
673
|
+
console.log('コードが検証に合格:', result.filteredCode);
|
|
674
|
+
} else {
|
|
675
|
+
console.log('問題が検出されました:', result.issues);
|
|
676
|
+
}
|
|
677
|
+
```
|
|
678
|
+
|
|
679
|
+
#### ハルシネーション検出
|
|
680
|
+
|
|
681
|
+
```typescript
|
|
682
|
+
import { HallucinationDetector } from '@nahisaho/musubix-core';
|
|
683
|
+
|
|
684
|
+
const detector = new HallucinationDetector();
|
|
685
|
+
|
|
686
|
+
const analysis = await detector.analyze({
|
|
687
|
+
response: llmResponse,
|
|
688
|
+
groundTruth: knownFacts,
|
|
689
|
+
context: projectContext
|
|
690
|
+
});
|
|
691
|
+
|
|
692
|
+
console.log('信頼度スコア:', analysis.confidence);
|
|
693
|
+
console.log('ハルシネーションリスク:', analysis.risks);
|
|
694
|
+
```
|
|
695
|
+
|
|
696
|
+
#### EARSから形式仕様への変換
|
|
697
|
+
|
|
698
|
+
```typescript
|
|
699
|
+
import { EarsToFormalSpecConverter } from '@nahisaho/musubix-core';
|
|
700
|
+
|
|
701
|
+
const converter = new EarsToFormalSpecConverter();
|
|
702
|
+
|
|
703
|
+
const formalSpec = await converter.convert({
|
|
704
|
+
earsRequirement: 'WHEN user clicks login, THE system SHALL authenticate within 2 seconds',
|
|
705
|
+
requirementId: 'REQ-AUTH-001'
|
|
706
|
+
});
|
|
707
|
+
|
|
708
|
+
// Z3互換の仕様を返す
|
|
709
|
+
console.log(formalSpec.z3Expression);
|
|
710
|
+
```
|
|
711
|
+
|
|
712
|
+
#### 品質ゲート検証
|
|
713
|
+
|
|
714
|
+
```typescript
|
|
715
|
+
import { QualityGateValidator } from '@nahisaho/musubix-core';
|
|
716
|
+
|
|
717
|
+
const validator = new QualityGateValidator();
|
|
718
|
+
|
|
719
|
+
const gateResult = await validator.validate({
|
|
720
|
+
requirements: requirementsList,
|
|
721
|
+
designs: designDocuments,
|
|
722
|
+
tasks: taskList
|
|
723
|
+
});
|
|
724
|
+
|
|
725
|
+
console.log('全ゲート合格:', gateResult.allPassed);
|
|
726
|
+
console.log('ゲート詳細:', gateResult.gates);
|
|
727
|
+
// EARS準拠、トレーサビリティなど17の品質チェック
|
|
728
|
+
```
|
|
729
|
+
|
|
730
|
+
### 品質ゲートチェック
|
|
731
|
+
|
|
732
|
+
| ゲート | 説明 |
|
|
733
|
+
|--------|------|
|
|
734
|
+
| EARS準拠 | 要件がEARSパターンに従っているか |
|
|
735
|
+
| 一意のID | すべての成果物に一意の識別子があるか |
|
|
736
|
+
| トレーサビリティ | 完全なトレーサビリティチェーンが存在するか |
|
|
737
|
+
| 設計カバレッジ | すべての要件に設計があるか |
|
|
738
|
+
| タスクカバレッジ | すべての設計にタスクがあるか |
|
|
739
|
+
| 孤立なし | 孤立した要件やタスクがないか |
|
|
740
|
+
| 完全性 | すべての必須フィールドが存在するか |
|
|
741
|
+
| ... | その他10の品質チェック |
|
|
742
|
+
|
|
743
|
+
---
|
|
744
|
+
|
|
636
745
|
## MCPサーバー連携
|
|
637
746
|
|
|
638
747
|
### MCPサーバーの起動
|
|
@@ -945,6 +1054,6 @@ const client = createYATAClient({
|
|
|
945
1054
|
|
|
946
1055
|
---
|
|
947
1056
|
|
|
948
|
-
**バージョン**: 1.0
|
|
949
|
-
**最終更新**: 2026-01-
|
|
1057
|
+
**バージョン**: 1.3.0
|
|
1058
|
+
**最終更新**: 2026-01-05
|
|
950
1059
|
**MUSUBIX Project**
|
package/docs/USER-GUIDE.md
CHANGED
|
@@ -13,10 +13,11 @@
|
|
|
13
13
|
5. [SDD Workflow](#sdd-workflow)
|
|
14
14
|
6. [Self-Learning System](#self-learning-system)
|
|
15
15
|
7. [C4 Code Generation](#c4-code-generation)
|
|
16
|
-
8. [
|
|
17
|
-
9. [
|
|
18
|
-
10. [
|
|
19
|
-
11. [
|
|
16
|
+
8. [Symbolic Reasoning](#symbolic-reasoning) *(v1.2.0)*
|
|
17
|
+
9. [MCP Server Integration](#mcp-server-integration)
|
|
18
|
+
10. [YATA Integration](#yata-integration)
|
|
19
|
+
11. [Best Practices](#best-practices)
|
|
20
|
+
12. [Troubleshooting](#troubleshooting)
|
|
20
21
|
|
|
21
22
|
---
|
|
22
23
|
|
|
@@ -593,6 +594,114 @@ Add to `.cursor/mcp.json`:
|
|
|
593
594
|
|
|
594
595
|
---
|
|
595
596
|
|
|
597
|
+
## Symbolic Reasoning
|
|
598
|
+
|
|
599
|
+
*(v1.2.0 New Feature)*
|
|
600
|
+
|
|
601
|
+
### Overview
|
|
602
|
+
|
|
603
|
+
Symbolic reasoning enhances LLM outputs by applying formal verification and knowledge-graph backed reasoning. This hybrid approach (Neuro-Symbolic) combines the creativity of neural networks with the precision of symbolic logic.
|
|
604
|
+
|
|
605
|
+
### Key Components
|
|
606
|
+
|
|
607
|
+
| Component | Description |
|
|
608
|
+
|-----------|-------------|
|
|
609
|
+
| `SemanticCodeFilterPipeline` | Filter LLM outputs for code quality |
|
|
610
|
+
| `HallucinationDetector` | Detect and prevent hallucinated outputs |
|
|
611
|
+
| `EarsToFormalSpecConverter` | Convert EARS requirements to formal Z3 specifications |
|
|
612
|
+
| `Z3Adapter` | Interface with Z3 solver for formal verification |
|
|
613
|
+
| `QualityGateValidator` | Validate against 17 quality gate checks |
|
|
614
|
+
|
|
615
|
+
### Usage
|
|
616
|
+
|
|
617
|
+
#### Semantic Code Filtering
|
|
618
|
+
|
|
619
|
+
```typescript
|
|
620
|
+
import { SemanticCodeFilterPipeline } from '@nahisaho/musubix-core';
|
|
621
|
+
|
|
622
|
+
const pipeline = new SemanticCodeFilterPipeline({
|
|
623
|
+
enableHallucinationDetection: true,
|
|
624
|
+
maxRetries: 3
|
|
625
|
+
});
|
|
626
|
+
|
|
627
|
+
const result = await pipeline.filter({
|
|
628
|
+
code: generatedCode,
|
|
629
|
+
context: { language: 'typescript', domain: 'authentication' }
|
|
630
|
+
});
|
|
631
|
+
|
|
632
|
+
if (result.isValid) {
|
|
633
|
+
console.log('Code passed validation:', result.filteredCode);
|
|
634
|
+
} else {
|
|
635
|
+
console.log('Issues found:', result.issues);
|
|
636
|
+
}
|
|
637
|
+
```
|
|
638
|
+
|
|
639
|
+
#### Hallucination Detection
|
|
640
|
+
|
|
641
|
+
```typescript
|
|
642
|
+
import { HallucinationDetector } from '@nahisaho/musubix-core';
|
|
643
|
+
|
|
644
|
+
const detector = new HallucinationDetector();
|
|
645
|
+
|
|
646
|
+
const analysis = await detector.analyze({
|
|
647
|
+
response: llmResponse,
|
|
648
|
+
groundTruth: knownFacts,
|
|
649
|
+
context: projectContext
|
|
650
|
+
});
|
|
651
|
+
|
|
652
|
+
console.log('Confidence score:', analysis.confidence);
|
|
653
|
+
console.log('Hallucination risks:', analysis.risks);
|
|
654
|
+
```
|
|
655
|
+
|
|
656
|
+
#### EARS to Formal Specification
|
|
657
|
+
|
|
658
|
+
```typescript
|
|
659
|
+
import { EarsToFormalSpecConverter } from '@nahisaho/musubix-core';
|
|
660
|
+
|
|
661
|
+
const converter = new EarsToFormalSpecConverter();
|
|
662
|
+
|
|
663
|
+
const formalSpec = await converter.convert({
|
|
664
|
+
earsRequirement: 'WHEN user clicks login, THE system SHALL authenticate within 2 seconds',
|
|
665
|
+
requirementId: 'REQ-AUTH-001'
|
|
666
|
+
});
|
|
667
|
+
|
|
668
|
+
// Returns Z3-compatible specification
|
|
669
|
+
console.log(formalSpec.z3Expression);
|
|
670
|
+
```
|
|
671
|
+
|
|
672
|
+
#### Quality Gate Validation
|
|
673
|
+
|
|
674
|
+
```typescript
|
|
675
|
+
import { QualityGateValidator } from '@nahisaho/musubix-core';
|
|
676
|
+
|
|
677
|
+
const validator = new QualityGateValidator();
|
|
678
|
+
|
|
679
|
+
const gateResult = await validator.validate({
|
|
680
|
+
requirements: requirementsList,
|
|
681
|
+
designs: designDocuments,
|
|
682
|
+
tasks: taskList
|
|
683
|
+
});
|
|
684
|
+
|
|
685
|
+
console.log('All gates passed:', gateResult.allPassed);
|
|
686
|
+
console.log('Gate details:', gateResult.gates);
|
|
687
|
+
// 17 quality checks including EARS compliance, traceability, etc.
|
|
688
|
+
```
|
|
689
|
+
|
|
690
|
+
### Quality Gate Checks
|
|
691
|
+
|
|
692
|
+
| Gate | Description |
|
|
693
|
+
|------|-------------|
|
|
694
|
+
| EARS Compliance | Requirements follow EARS patterns |
|
|
695
|
+
| Unique IDs | All artifacts have unique identifiers |
|
|
696
|
+
| Traceability | Full traceability chain exists |
|
|
697
|
+
| Design Coverage | All requirements have designs |
|
|
698
|
+
| Task Coverage | All designs have tasks |
|
|
699
|
+
| No Orphans | No orphaned requirements or tasks |
|
|
700
|
+
| Completeness | All required fields are present |
|
|
701
|
+
| ... | And 10 more quality checks |
|
|
702
|
+
|
|
703
|
+
---
|
|
704
|
+
|
|
596
705
|
## YATA Integration
|
|
597
706
|
|
|
598
707
|
### What is YATA?
|
|
@@ -785,6 +894,6 @@ const client = createYATAClient({
|
|
|
785
894
|
|
|
786
895
|
---
|
|
787
896
|
|
|
788
|
-
**Version**: 1.0
|
|
789
|
-
**Last Updated**: 2026-01-
|
|
897
|
+
**Version**: 1.3.0
|
|
898
|
+
**Last Updated**: 2026-01-05
|
|
790
899
|
**MUSUBIX Project**
|