musubix 3.6.0 → 3.7.3

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 (123) 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/build-fix/SKILL.md +124 -0
  15. package/.github/skills/checkpoint/SKILL.md +131 -0
  16. package/.github/skills/codemap/SKILL.md +120 -0
  17. package/.github/skills/codemap/templates/codemap-index.md +142 -0
  18. package/.github/skills/codemap/templates/package-codemap.md +160 -0
  19. package/.github/skills/context-optimizer/SKILL.md +109 -0
  20. package/.github/skills/context-optimizer/contexts/dev.md +40 -0
  21. package/.github/skills/context-optimizer/contexts/research.md +55 -0
  22. package/.github/skills/context-optimizer/contexts/review.md +49 -0
  23. package/.github/skills/e2e-runner/SKILL.md +145 -0
  24. package/.github/skills/eval-harness/SKILL.md +111 -0
  25. package/.github/skills/eval-harness/examples/capability-eval.md +158 -0
  26. package/.github/skills/eval-harness/examples/human-grader-template.md +326 -0
  27. package/.github/skills/eval-harness/examples/regression-eval.md +228 -0
  28. package/.github/skills/learning-hooks/SKILL.md +101 -0
  29. package/.github/skills/learning-hooks/templates/learned-skill-template.md +79 -0
  30. package/.github/skills/musubix-adr-generation/SKILL.md +74 -0
  31. package/.github/skills/musubix-best-practices/SKILL.md +85 -0
  32. package/.github/skills/musubix-c4-design/SKILL.md +86 -0
  33. package/.github/skills/musubix-code-generation/SKILL.md +90 -0
  34. package/.github/skills/musubix-domain-inference/SKILL.md +82 -0
  35. package/.github/skills/musubix-ears-validation/SKILL.md +74 -0
  36. package/.github/skills/musubix-sdd-workflow/SKILL.md +95 -0
  37. package/.github/skills/musubix-technical-writing/SKILL.md +108 -0
  38. package/.github/skills/musubix-test-generation/SKILL.md +88 -0
  39. package/.github/skills/musubix-traceability/SKILL.md +94 -0
  40. package/.github/skills/refactor-cleaner/SKILL.md +105 -0
  41. package/.github/skills/session-manager/SKILL.md +119 -0
  42. package/.github/skills/session-manager/scripts/session-end.sh +175 -0
  43. package/.github/skills/session-manager/scripts/session-start.sh +87 -0
  44. package/.github/skills/verification-loop/SKILL.md +111 -0
  45. package/.github/skills/verification-loop/scripts/verify.sh +305 -0
  46. package/AGENTS.md +333 -0
  47. package/LICENSE +21 -0
  48. package/README.ja.md +313 -0
  49. package/README.md +315 -50
  50. package/bin/musubix-mcp.js +15 -0
  51. package/bin/musubix.js +9 -1
  52. package/docs/API-REFERENCE.md +1425 -0
  53. package/docs/CODEMAPS/CODEMAP.md +1 -0
  54. package/docs/GITHUB-ACTIONS-NPM-SETUP.md +132 -0
  55. package/docs/INSTALL-GUIDE.ja.md +459 -0
  56. package/docs/INSTALL-GUIDE.md +459 -0
  57. package/docs/MIGRATION-v3.0.md +324 -0
  58. package/docs/MUSUBI-enhancement_roadmap_20260105.md +651 -0
  59. package/docs/MUSUBIX-v3.0-User-Guide.md +1357 -0
  60. package/docs/MUSUBIXv2.2.0-Manual-outline.md +136 -0
  61. package/docs/MUSUBIXv2.2.0-Manual.md +3123 -0
  62. package/docs/MUSUBIXv2.3.5-Refactering.md +1310 -0
  63. package/docs/MUSUBIv1.6.1-enhancement_roadmap_20260105.md +291 -0
  64. package/docs/MUSUBIv2.2.0-USERGUIDE.md +2079 -0
  65. package/docs/ROADMAP-v1.5.md +116 -0
  66. package/docs/SwarmCoding.md +1284 -0
  67. package/docs/Test-prompt.md +105 -0
  68. package/docs/USER-GUIDE-v1.8.0.md +2371 -0
  69. package/docs/USER-GUIDE.ja.md +2147 -0
  70. package/docs/USER-GUIDE.md +3022 -0
  71. package/docs/YATA-GLOBAL-GUIDE.ja.md +750 -0
  72. package/docs/YATA-GLOBAL-GUIDE.md +595 -0
  73. package/docs/YATA-LOCAL-GUIDE.ja.md +989 -0
  74. package/docs/YATA-LOCAL-GUIDE.md +730 -0
  75. package/docs/adr/0001-real-time-pattern-learning-architecture-for-v1-5-0.md +75 -0
  76. package/docs/adr/0002-pattern-sharing-protocol-for-cross-team-collaborat.md +79 -0
  77. package/docs/adr/0003-owl-2-rl-implementation-strategy-for-advanced-infe.md +90 -0
  78. package/docs/adr/ADR-v3.4.0-001-deep-research-architecture.md +217 -0
  79. package/docs/adr/ADR-v3.4.0-002-search-provider-selection.md +308 -0
  80. package/docs/adr/ADR-v3.4.0-003-lm-api-integration.md +475 -0
  81. package/docs/adr/ADR-v3.7.0-001-everything-claude-code-integration.md +102 -0
  82. package/docs/enterprise-knowledge-management.md +1737 -0
  83. package/docs/evolution-from-musubi-to-musubix.md +2170 -0
  84. package/docs/experiments/EXPERIMENT-ASSISTANT-AXIS-DRIFT-DETECTION.md +155 -0
  85. package/docs/getting-started-with-sdd.md +1602 -0
  86. package/docs/moodle-refactering-codegraph-musubix.md +391 -0
  87. package/docs/moodle-refactering-codegraph.md +278 -0
  88. package/docs/overview/MUSUBIX-CodeGraph.md +322 -0
  89. package/docs/overview/MUSUBIX-Core.md +671 -0
  90. package/docs/overview/MUSUBIX-Decisions.md +494 -0
  91. package/docs/overview/MUSUBIX-FormalVerify.md +566 -0
  92. package/docs/overview/MUSUBIX-Knowledge.md +1231 -0
  93. package/docs/overview/MUSUBIX-Learning.md +837 -0
  94. package/docs/overview/MUSUBIX-MCP-Server.md +535 -0
  95. package/docs/overview/MUSUBIX-Overview.md +264 -0
  96. package/docs/overview/MUSUBIX-Phase1-Complete.md +271 -0
  97. package/docs/overview/MUSUBIX-Phase2-Complete.md +310 -0
  98. package/docs/overview/MUSUBIX-Policy.md +477 -0
  99. package/docs/overview/MUSUBIX-Roadmap-v2.md +399 -0
  100. package/docs/overview/MUSUBIX-Security-Plan.md +939 -0
  101. package/docs/overview/MUSUBIX-Security-v2.1.md +668 -0
  102. package/docs/overview/MUSUBIX-Security.md +891 -0
  103. package/docs/overview/MUSUBIX-YATA.md +666 -0
  104. package/docs/overview/MUSUBIX-v2.2.0-Advanced-Learning.md +513 -0
  105. package/docs/overview/Neuro-SymbolicAI.md +159 -0
  106. package/docs/packages/knowledge.md +594 -0
  107. package/docs/qiita/musubix-v3.6.0-fastrender-insights.md +625 -0
  108. package/docs/qiita-linux-kernel-knowledge-graph.md +596 -0
  109. package/docs/qiita-musubix-assistant-axis.md +380 -0
  110. package/package.json +58 -52
  111. package/scripts/generate-quality-gate-report.ts +106 -0
  112. package/scripts/postinstall.js +94 -0
  113. package/scripts/register-release-knowledge.ts +127 -0
  114. package/steering/.musubi-version +1 -0
  115. package/steering/product.ja.md +572 -0
  116. package/steering/project.yml +66 -0
  117. package/steering/rules/constitution.md +491 -0
  118. package/steering/structure.ja.md +503 -0
  119. package/steering/tech.ja.md +208 -0
  120. package/dist/index.d.ts +0 -25
  121. package/dist/index.d.ts.map +0 -1
  122. package/dist/index.js +0 -74
  123. package/dist/index.js.map +0 -1
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: musubix-code-generation
3
+ description: 設計仕様からコード生成ガイド。実装・機能作成に使用。
4
+ license: MIT
5
+ ---
6
+
7
+ # Code Generation Skill
8
+
9
+ 設計ドキュメントからコードを生成し、トレーサビリティを維持。
10
+
11
+ ## Supported Languages
12
+
13
+ | 言語 | 拡張子 | サポート機能 |
14
+ |------|--------|-------------|
15
+ | TypeScript | `.ts` | フル型サポート |
16
+ | JavaScript | `.js` | ES6+ modules |
17
+ | Python | `.py` | 型ヒント |
18
+ | Java/Go/Rust/C# | 各種 | Interface/Struct生成 |
19
+
20
+ ## WHEN → DO
21
+
22
+ | WHEN | DO |
23
+ |------|-----|
24
+ | コード生成前 | DES-*とREQ-*の存在確認 |
25
+ | 実装開始 | テスト先行(Article III) |
26
+ | コード作成 | @see タグでトレーサビリティ追加 |
27
+
28
+ ## Traceability Comment
29
+
30
+ ```typescript
31
+ /**
32
+ * UserService - Handles user operations
33
+ * @see REQ-INT-001 - Neuro-Symbolic Integration
34
+ * @see DES-INT-001 - Integration Layer Design
35
+ */
36
+ export class UserService { ... }
37
+ ```
38
+
39
+ ## Design Pattern Templates
40
+
41
+ | パターン | 用途 |
42
+ |---------|------|
43
+ | **Singleton** | グローバルインスタンス管理 |
44
+ | **Factory** | 型に応じたオブジェクト生成 |
45
+ | **Repository** | データアクセス抽象化 |
46
+
47
+ ### Repository Pattern
48
+
49
+ ```typescript
50
+ /** @pattern Repository */
51
+ export interface Repository<T> {
52
+ findById(id: string): Promise<T | null>;
53
+ save(entity: T): Promise<T>;
54
+ delete(id: string): Promise<void>;
55
+ }
56
+ ```
57
+
58
+ ## CLI
59
+
60
+ ```bash
61
+ npx musubix codegen generate <design-file> # コード生成
62
+ npx musubix codegen generate <file> --full-skeleton # 4ファイル生成
63
+ npx musubix codegen generate <file> --with-tests # テスト付き
64
+ npx musubix codegen status <spec> # ステータス遷移コード
65
+ npx musubix codegen status <spec> --enum # enum型
66
+ npx musubix codegen analyze <file> # 静的解析
67
+ npx musubix codegen security <path> # セキュリティスキャン
68
+ ```
69
+
70
+ ## Quality Checks (Article IX)
71
+
72
+ - [ ] No `any` types
73
+ - [ ] @see references on all classes/functions
74
+ - [ ] Test coverage ≥ 80%
75
+ - [ ] `npm run lint` passes
76
+ - [ ] `npm run build` succeeds
77
+
78
+ ## 出力例
79
+
80
+ ```
81
+ ┌─────────────────────────────────────────┐
82
+ │ Code Generated │
83
+ ├─────────────────────────────────────────┤
84
+ │ Source: DES-AUTH-001 │
85
+ │ Files: 4 generated │
86
+ │ Patterns: Repository, Service │
87
+ │ Coverage: @see tags added │
88
+ │ Tests: test stubs generated │
89
+ └─────────────────────────────────────────┘
90
+ ```
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: musubix-domain-inference
3
+ description: 自動ドメイン検出・コンポーネント推論ガイド。プロジェクトドメイン特定に使用。
4
+ license: MIT
5
+ ---
6
+
7
+ # Domain Inference Skill
8
+
9
+ **62ドメイン**・**224コンポーネント**を自動検出・推奨。
10
+
11
+ ## Domain Categories
12
+
13
+ | カテゴリ | ドメイン数 | 例 |
14
+ |---------|-----------|-----|
15
+ | **Business** | 8 | ecommerce, finance, crm, hr |
16
+ | **Healthcare** | 3 | healthcare, pharmacy, veterinary |
17
+ | **Service** | 20+ | booking, hotel, restaurant, gym |
18
+ | **Technology** | 8 | iot, security, ai, analytics |
19
+
20
+ ## Key Domains
21
+
22
+ | Domain | 名称 | Key Components |
23
+ |--------|------|----------------|
24
+ | ecommerce | EC・通販 | CartService, ProductCatalog, OrderProcessor |
25
+ | finance | 金融 | AccountService, TransactionManager |
26
+ | veterinary | 動物病院 | PetService, VetScheduleService |
27
+ | booking | 予約 | ReservationService, SlotManager |
28
+ | iot | IoT | DeviceManager, TelemetryProcessor |
29
+
30
+ ## WHEN → DO
31
+
32
+ | WHEN | DO |
33
+ |------|-----|
34
+ | 新規プロジェクト開始 | 要件テキストからドメイン検出 |
35
+ | 複数ドメインの場合 | primaryとsecondaryを特定 |
36
+ | コンポーネント設計 | 推奨コンポーネントを適用 |
37
+
38
+ ## Detection Example
39
+
40
+ ```typescript
41
+ const result = domainDetector.detect(`
42
+ ペットの予約管理システム。
43
+ 獣医師のスケジュール管理とワクチン接種記録。
44
+ `);
45
+ // {
46
+ // primaryDomain: { id: 'veterinary' },
47
+ // confidence: 0.92,
48
+ // matchedKeywords: ['ペット', '獣医', 'ワクチン'],
49
+ // suggestedComponents: ['PetService', 'ReservationService']
50
+ // }
51
+ ```
52
+
53
+ ## Architecture by Category
54
+
55
+ | カテゴリ | アーキテクチャ | スケーリング |
56
+ |---------|---------------|-------------|
57
+ | Business | Layered + DDD | Vertical + Cache |
58
+ | Technology | Microservices | Horizontal |
59
+ | Healthcare | Layered + Audit | Vertical + Compliance |
60
+
61
+ ## CLI
62
+
63
+ ```bash
64
+ npx musubix design patterns --detect-domain <file> # ドメイン検出
65
+ npx musubix design generate <file> --infer-components # コンポーネント推論
66
+ ```
67
+
68
+ ## 出力例
69
+
70
+ ```
71
+ ┌─────────────────────────────────────────┐
72
+ │ Domain Detected │
73
+ ├─────────────────────────────────────────┤
74
+ │ Primary: veterinary (動物病院) │
75
+ │ Confidence: 92% │
76
+ │ Keywords: ペット, 獣医, ワクチン │
77
+ │ Components: 5 recommended │
78
+ │ - PetService │
79
+ │ - ReservationService │
80
+ │ - VetScheduleService │
81
+ └─────────────────────────────────────────┘
82
+ ```
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: musubix-ears-validation
3
+ description: EARS形式要件の検証・作成ガイド。要件記述・構文検証に使用。
4
+ license: MIT
5
+ ---
6
+
7
+ # EARS Validation Skill
8
+
9
+ EARS (Easy Approach to Requirements Syntax) で要件を形式化・検証。
10
+
11
+ ## EARS Patterns
12
+
13
+ | パターン | 構文 | 用途 |
14
+ |---------|------|------|
15
+ | **Ubiquitous** | `THE [system] SHALL [requirement]` | 常に満たす要件 |
16
+ | **Event-driven** | `WHEN [event], THE [system] SHALL [response]` | イベント発生時 |
17
+ | **State-driven** | `WHILE [state], THE [system] SHALL [behavior]` | 特定状態中 |
18
+ | **Unwanted** | `THE [system] SHALL NOT [behavior]` | 禁止事項 |
19
+ | **Optional** | `IF [cond], THEN THE [system] SHALL [response]` | 条件付き |
20
+
21
+ ## WHEN → DO
22
+
23
+ | WHEN | DO |
24
+ |------|-----|
25
+ | 自然言語の要件 | EARS形式に変換 |
26
+ | 要件レビュー | 6項目チェックリスト実施 |
27
+ | 要件文書作成 | テンプレートに従って記述 |
28
+
29
+ ## Validation Checklist
30
+
31
+ - [ ] **Pattern Compliance**: 5パターンのいずれかに準拠
32
+ - [ ] **System Name**: システム名が明確
33
+ - [ ] **SHALL Keyword**: 必須要件に「SHALL」使用
34
+ - [ ] **Measurable**: テスト可能・測定可能
35
+ - [ ] **Atomic**: 単一の要件を記述
36
+ - [ ] **No Ambiguity**: 曖昧な表現がない
37
+
38
+ ## Conversion Examples
39
+
40
+ | 自然言語 | EARS形式 |
41
+ |---------|---------|
42
+ | ユーザーがログインできる | `THE AuthModule SHALL authenticate users with valid credentials.` |
43
+ | パスワードが間違っている時エラー表示 | `WHEN invalid credentials are provided, THE AuthModule SHALL display an error.` |
44
+ | SQLインジェクションを許可しない | `THE InputValidator SHALL NOT accept SQL injection patterns.` |
45
+
46
+ ## Priority Levels
47
+
48
+ | 優先度 | 説明 | 用途 |
49
+ |--------|------|------|
50
+ | **P0** | 必須 | リリースブロッカー |
51
+ | **P1** | 重要 | 可能な限り実装 |
52
+ | **P2** | 任意 | 時間があれば |
53
+
54
+ ## CLI
55
+
56
+ ```bash
57
+ npx musubix requirements validate <file> # EARS検証
58
+ npx musubix requirements analyze <file> # 自然言語→EARS変換
59
+ npx musubix requirements map <file> # オントロジーマッピング
60
+ ```
61
+
62
+ ## 出力例
63
+
64
+ ```
65
+ ┌─────────────────────────────────────────┐
66
+ │ EARS Validation Result │
67
+ ├─────────────────────────────────────────┤
68
+ │ Requirements: 5 validated │
69
+ │ ✅ Ubiquitous: 2 passed │
70
+ │ ✅ Event-driven: 2 passed │
71
+ │ ✅ Unwanted: 1 passed │
72
+ │ Issues: 0 │
73
+ └─────────────────────────────────────────┘
74
+ ```
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: musubix-sdd-workflow
3
+ description: MUSUBIX SDD開発ワークフローガイド。10憲法条項に従った開発プロセスに使用。
4
+ license: MIT
5
+ ---
6
+
7
+ # SDD Workflow Skill
8
+
9
+ 10憲法条項に基づくSDD (Specification-Driven Development) ワークフロー。
10
+
11
+ ## Prerequisites
12
+
13
+ 1. `steering/`を確認
14
+ 2. `steering/rules/constitution.md`の10条項を確認
15
+ 3. `storage/specs/`の既存specを確認
16
+
17
+ ## 5 Phases
18
+
19
+ | Phase | 内容 | 成果物 |
20
+ |-------|------|--------|
21
+ | **1** | 要件定義 | REQ-* (EARS形式) |
22
+ | **2** | 設計 | DES-* (C4モデル) |
23
+ | **3** | タスク分解 | TSK-* (≤4時間) |
24
+ | **4** | 実装 | Code + Tests (TDD) |
25
+ | **5** | 完了 | CHANGELOG, Docs |
26
+
27
+ ## Phase Flow
28
+
29
+ ```
30
+ Phase 1 → Review → Phase 2 → Review → Phase 3 → Review → Phase 4 → Phase 5
31
+ ↑___________↓ ↑___________↓ ↑___________↓
32
+ 修正ループ 修正ループ 修正ループ
33
+ ```
34
+
35
+ **⛔ 禁止**: Phase 2 → Phase 4 の直接遷移(必ずPhase 3を経由)
36
+
37
+ ## WHEN → DO
38
+
39
+ | WHEN | DO |
40
+ |------|-----|
41
+ | 機能開発開始 | Phase 1から順に実行 |
42
+ | レビューで問題発見 | 修正して再レビュー |
43
+ | Phase 3完了前に実装要求 | 「Phase 3が必要」と回答 |
44
+ | 実装フェーズ | TDD (Red→Green→Blue) |
45
+
46
+ ## Article X: Implementation Prerequisites
47
+
48
+ **絶対ルール**: 要件・設計・タスクが承認されていない限り、実装禁止。
49
+
50
+ ```
51
+ ⛔ 禁止: Phase 2 → Phase 4
52
+ ✅ 必須: Phase 1 → 2 → 3 → 4
53
+ ```
54
+
55
+ ## CLI
56
+
57
+ ```bash
58
+ # Requirements
59
+ npx musubix requirements analyze <file>
60
+ npx musubix requirements validate <file>
61
+
62
+ # Design
63
+ npx musubix design generate <file>
64
+ npx musubix design traceability
65
+
66
+ # Code
67
+ npx musubix codegen generate <file>
68
+ npx musubix codegen status <spec>
69
+
70
+ # Scaffold
71
+ npx musubix scaffold domain-model <name>
72
+ npx musubix scaffold domain-model <name> -v "Price,Email"
73
+ npx musubix scaffold domain-model <name> -s "Order,Task"
74
+ ```
75
+
76
+ ## Traceability Chain
77
+
78
+ ```
79
+ REQ-* → DES-* → TSK-* → Code → Tests
80
+ ```
81
+
82
+ ## 出力例
83
+
84
+ ```
85
+ ┌─────────────────────────────────────────┐
86
+ │ Workflow Status │
87
+ ├─────────────────────────────────────────┤
88
+ │ Phase 1: ✅ Requirements (3 REQs) │
89
+ │ Phase 2: ✅ Design (1 DES) │
90
+ │ Phase 3: ✅ Tasks (5 TSKs) │
91
+ │ Phase 4: 🔄 Implementation (2/5 done) │
92
+ │ Phase 5: ⏸️ Pending │
93
+ │ Traceability: 100% │
94
+ └─────────────────────────────────────────┘
95
+ ```
@@ -0,0 +1,108 @@
1
+ ---
2
+ name: musubix-technical-writing
3
+ description: 技術ドキュメント作成ガイド。README、ユーザーガイド、API参照に使用。
4
+ license: MIT
5
+ ---
6
+
7
+ # Technical Writing Skill
8
+
9
+ 高品質な技術ドキュメントを一貫した構造で作成。
10
+
11
+ ## Document Types
12
+
13
+ | 種類 | 目的 | ファイル |
14
+ |------|------|---------|
15
+ | **README** | プロジェクト概要 | README.md |
16
+ | **Install Guide** | セットアップ手順 | INSTALL-GUIDE.md |
17
+ | **User Guide** | 使用方法詳細 | USER-GUIDE.md |
18
+ | **API Reference** | API完全ドキュメント | API-REFERENCE.md |
19
+ | **Changelog** | バージョン履歴 | CHANGELOG.md |
20
+
21
+ ## WHEN → DO
22
+
23
+ | WHEN | DO |
24
+ |------|-----|
25
+ | 新規プロジェクト | READMEテンプレート適用 |
26
+ | 機能追加 | User GuideとAPI Reference更新 |
27
+ | リリース | Changelog更新 |
28
+ | セットアップ手順変更 | Install Guide更新 |
29
+
30
+ ## README Template
31
+
32
+ ```markdown
33
+ # Project Name
34
+
35
+ > One-line description
36
+
37
+ ## 🎯 Features
38
+ - Feature 1
39
+ - Feature 2
40
+
41
+ ## 📦 Installation
42
+ \`\`\`bash
43
+ npm install package-name
44
+ \`\`\`
45
+
46
+ ## 🚀 Quick Start
47
+ \`\`\`typescript
48
+ import { MainClass } from 'package-name';
49
+ const instance = new MainClass();
50
+ \`\`\`
51
+
52
+ ## 📖 Documentation
53
+ - [Installation](docs/INSTALL-GUIDE.md)
54
+ - [User Guide](docs/USER-GUIDE.md)
55
+ - [API Reference](docs/API-REFERENCE.md)
56
+ ```
57
+
58
+ ## API Reference Template
59
+
60
+ ```markdown
61
+ ### `methodName(param1, param2)`
62
+
63
+ Description.
64
+
65
+ | Parameter | Type | Required | Description |
66
+ |-----------|------|----------|-------------|
67
+ | `param1` | `string` | Yes | First param |
68
+ | `param2` | `number` | No | Optional |
69
+
70
+ **Returns**: `Promise<Result>`
71
+
72
+ **Example**:
73
+ \`\`\`typescript
74
+ const result = await instance.methodName('value', 42);
75
+ \`\`\`
76
+ ```
77
+
78
+ ## Changelog Format
79
+
80
+ [Keep a Changelog](https://keepachangelog.com/)準拠:
81
+
82
+ ```markdown
83
+ ## [1.2.0] - 2026-01-15
84
+
85
+ ### Added
86
+ - New feature description
87
+
88
+ ### Changed
89
+ - Modified behavior
90
+
91
+ ### Fixed
92
+ - Bug fix description
93
+ ```
94
+
95
+ ## 出力例
96
+
97
+ ```
98
+ ┌─────────────────────────────────────────┐
99
+ │ Documentation Generated │
100
+ ├─────────────────────────────────────────┤
101
+ │ README.md: Updated │
102
+ │ INSTALL-GUIDE.md: Created │
103
+ │ USER-GUIDE.md: Updated │
104
+ │ API-REFERENCE.md: Updated │
105
+ │ CHANGELOG.md: Updated │
106
+ │ Total Sections: 15 │
107
+ └─────────────────────────────────────────┘
108
+ ```
@@ -0,0 +1,88 @@
1
+ ---
2
+ name: musubix-test-generation
3
+ description: テストコード生成ガイド。TDD/BDDによるユニット・統合テスト作成に使用。
4
+ license: MIT
5
+ ---
6
+
7
+ # Test Generation Skill
8
+
9
+ **Article III - Test-First**: Red-Green-Blue TDDサイクルでテストを生成。
10
+
11
+ ## TDD Cycle
12
+
13
+ ```
14
+ 🔴 Red (Failing Test) → 🟢 Green (Minimal Code) → 🔵 Blue (Refactor)
15
+ ```
16
+
17
+ ## Test Categories
18
+
19
+ | カテゴリ | 目的 | 場所 |
20
+ |---------|------|------|
21
+ | Unit | 単一コンポーネント | `__tests__/unit/` |
22
+ | Integration | 複数コンポーネント連携 | `__tests__/integration/` |
23
+ | E2E | フルユーザーフロー | `__tests__/e2e/` |
24
+
25
+ ## WHEN → DO
26
+
27
+ | WHEN | DO |
28
+ |------|-----|
29
+ | 機能実装前 | テストを先に書く(Red) |
30
+ | テスト失敗 | 最小限のコードで通す(Green) |
31
+ | テスト成功 | リファクタリング(Blue) |
32
+
33
+ ## Test Template
34
+
35
+ ```typescript
36
+ /**
37
+ * @requirement REQ-XXX-NNN
38
+ * @design DES-XXX-NNN
39
+ */
40
+ describe('XxxService', () => {
41
+ let service: XxxService;
42
+
43
+ beforeEach(() => {
44
+ resetXxxCounter(); // BP-TEST-001
45
+ service = new XxxService(new MockRepository());
46
+ });
47
+
48
+ it('should create entity with valid input', async () => {
49
+ const result = await service.create({ name: 'Test' });
50
+ expect(result.isOk()).toBe(true);
51
+ });
52
+
53
+ it('should return error for invalid input', async () => {
54
+ const result = await service.create({ name: '' });
55
+ expect(result.isErr()).toBe(true);
56
+ });
57
+ });
58
+ ```
59
+
60
+ ## Best Practices
61
+
62
+ | ID | パターン | 内容 |
63
+ |----|---------|------|
64
+ | BP-TEST-001 | Counter Reset | beforeEachでIDカウンターリセット |
65
+ | BP-TEST-004 | Result Type | isOk()/isErr()で両ケーステスト |
66
+ | BP-TEST-005 | Status Transition | 有効・無効遷移を網羅 |
67
+
68
+ ## CLI
69
+
70
+ ```bash
71
+ npx musubix test generate <design-file> # テスト生成
72
+ npm test # 全テスト実行
73
+ npx musubix test coverage src/ # カバレッジ計測
74
+ ```
75
+
76
+ ## 出力例
77
+
78
+ ```
79
+ ┌─────────────────────────────────────────┐
80
+ │ Test Generation Result │
81
+ ├─────────────────────────────────────────┤
82
+ │ Source: DES-AUTH-001 │
83
+ │ Unit Tests: 8 generated │
84
+ │ Coverage: @requirement tags added │
85
+ │ Patterns: BP-TEST-001, 004, 005 │
86
+ │ Status: Ready for TDD cycle │
87
+ └─────────────────────────────────────────┘
88
+ ```
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: musubix-traceability
3
+ description: 要件・設計・コード・テスト間のトレーサビリティ管理ガイド。影響分析・マトリクス作成に使用。
4
+ license: MIT
5
+ ---
6
+
7
+ # Traceability Skill
8
+
9
+ **Article V - Traceability**: 100%双方向トレーサビリティを維持。
10
+
11
+ ## Traceability Chain
12
+
13
+ ```
14
+ REQ-* ↔ DES-* ↔ TSK-* ↔ Code ↔ Tests
15
+ ```
16
+
17
+ ## WHEN → DO
18
+
19
+ | WHEN | DO |
20
+ |------|-----|
21
+ | 要件作成 | REQ-* IDを付与 |
22
+ | 設計作成 | DES-* IDを付与、REQ-*に紐付け |
23
+ | タスク作成 | TSK-* IDを付与、DES-*・REQ-*に紐付け |
24
+ | コード作成 | @requirement, @design タグ追加 |
25
+ | テスト作成 | @requirement, @design タグ追加 |
26
+ | 要件変更 | 影響分析を実施 |
27
+
28
+ ## Traceability Matrix
29
+
30
+ ```markdown
31
+ | 要件ID | 設計ID | タスクID | コード | テスト |
32
+ |--------|--------|---------|--------|--------|
33
+ | REQ-AUTH-001 | DES-AUTH-001 | TSK-001 | auth-service.ts | auth.test.ts |
34
+ | REQ-AUTH-002 | DES-AUTH-001 | TSK-002 | token-manager.ts | token.test.ts |
35
+ ```
36
+
37
+ ## Code Traceability
38
+
39
+ ```typescript
40
+ /**
41
+ * AuthService - 認証サービス
42
+ * @requirement REQ-AUTH-001
43
+ * @design DES-AUTH-001
44
+ * @task TSK-001
45
+ */
46
+ export class AuthService { ... }
47
+ ```
48
+
49
+ ## Impact Analysis
50
+
51
+ 要件変更時の影響範囲特定:
52
+
53
+ ```
54
+ REQ-AUTH-001 変更
55
+
56
+ DES-AUTH-001 (設計)
57
+
58
+ TSK-001, TSK-002 (タスク)
59
+
60
+ auth-service.ts, token-manager.ts (コード)
61
+
62
+ auth.test.ts, token.test.ts (テスト)
63
+ ```
64
+
65
+ ## Verification Checklist
66
+
67
+ - [ ] 全要件に設計がリンク
68
+ - [ ] 全設計にタスクがリンク
69
+ - [ ] 全コードにトレーサビリティコメント
70
+ - [ ] 全テストに@requirementタグ
71
+
72
+ ## CLI
73
+
74
+ ```bash
75
+ npx musubix trace matrix # マトリクス生成
76
+ npx musubix trace impact REQ-* # 影響分析
77
+ npx musubix trace validate # リンク検証
78
+ npx musubix trace sync # 自動更新
79
+ ```
80
+
81
+ ## 出力例
82
+
83
+ ```
84
+ ┌─────────────────────────────────────────┐
85
+ │ Traceability Report │
86
+ ├─────────────────────────────────────────┤
87
+ │ Requirements: 5 (100% linked) │
88
+ │ Designs: 3 (100% linked) │
89
+ │ Tasks: 8 (100% linked) │
90
+ │ Code Files: 12 (100% tagged) │
91
+ │ Test Files: 12 (100% tagged) │
92
+ │ Coverage: 100% │
93
+ └─────────────────────────────────────────┘
94
+ ```