musubi-sdd 5.8.2 → 5.9.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/README.ja.md CHANGED
@@ -71,6 +71,80 @@ musubi init --windsurf # Windsurf IDE
71
71
 
72
72
  ---
73
73
 
74
+ ## 📊 v5.9.0 の新機能
75
+
76
+ ### Phase 1-4 エンタープライズ機能 🏢
77
+
78
+ 大規模プロジェクトとモノレポ対応のエンタープライズ機能を大幅追加。
79
+
80
+ #### ワークフロー柔軟性(Phase 1)
81
+
82
+ - **3つのワークフローモード**: `small`(バグ修正)、`medium`(機能追加)、`large`(設計変更)
83
+ - **自動検出**: フィーチャー名パターンからモード自動選択
84
+ - **`musubi-release`**: CHANGELOG自動生成付きリリースCLI
85
+
86
+ ```bash
87
+ # コミットからCHANGELOGを生成
88
+ musubi-release
89
+
90
+ # フィーチャーのモードを検出
91
+ musubi-workflow mode --detect "feat: ユーザー認証"
92
+ ```
93
+
94
+ #### モノレポ対応(Phase 2)
95
+
96
+ - **パッケージレジストリ**: `steering/packages.yml` で依存関係管理
97
+ - **依存関係グラフ**: Mermaidダイアグラム生成で可視化
98
+ - **カバレッジ追跡**: パッケージ別テストカバレッジレポート
99
+
100
+ #### 憲法レベル管理(Phase 3)
101
+
102
+ - **3つの適用レベル**: `critical`(ブロック)、`advisory`(警告)、`flexible`(提案)
103
+ - **レベル別検証**: 条項の重要度に応じた異なる適用
104
+ - **プロジェクト別オーバーライド**: プロジェクトタイプ別カスタムレベル
105
+
106
+ | レベル | 条項 | 動作 |
107
+ |--------|------|------|
108
+ | Critical | CONST-001, 002, 003, 005, 009 | ワークフローをブロック |
109
+ | Advisory | CONST-004, 006, 007 | 警告のみ |
110
+ | Flexible | CONST-008 | 提案として表示 |
111
+
112
+ #### プロジェクト設定(Phase 4)
113
+
114
+ - **`musubi-config`**: 設定管理用新CLI
115
+ - **スキーマ検証**: AJVによるv2.0スキーマ検証
116
+ - **自動マイグレーション**: v1.0設定をv2.0に自動アップグレード
117
+
118
+ ```bash
119
+ musubi-config validate # project.yml を検証
120
+ musubi-config migrate # v2.0 にマイグレーション
121
+ musubi-config show # 有効な設定を表示
122
+ ```
123
+
124
+ #### オーケストレーター統合
125
+
126
+ プログラムアクセス用の5つの組み込みスキル:
127
+
128
+ | スキル | カテゴリ | 用途 |
129
+ |--------|----------|------|
130
+ | `release-manager` | release | CHANGELOG生成 |
131
+ | `workflow-mode-manager` | workflow | モード検出・管理 |
132
+ | `package-manager` | configuration | パッケージ・依存関係分析 |
133
+ | `constitution-level-manager` | validation | レベル別検証 |
134
+ | `project-config-manager` | configuration | 設定検証・マイグレーション |
135
+
136
+ ```javascript
137
+ const { workflowModeSkill } = require('musubi-sdd/src/orchestration');
138
+
139
+ const result = await workflowModeSkill.execute({
140
+ action: 'detect',
141
+ featureName: 'fix: 軽微なバグ'
142
+ });
143
+ console.log(result.detectedMode); // 'small'
144
+ ```
145
+
146
+ ---
147
+
74
148
  ## 📊 v5.6.0 の新機能
75
149
 
76
150
  ### エンタープライズスケール分析 & Rustマイグレーション支援 🏢🦀
@@ -166,8 +240,8 @@ musubi init -r owner/repo@develop
166
240
  - 🤖 **マルチエージェント対応** - 7つのAIコーディングエージェントに対応(Claude Code、GitHub Copilot、Cursor、Gemini CLI、Codex CLI、Qwen Code、Windsurf)
167
241
  - 🔌 **MCPサーバー統合** - 高度なコード分析のためのCodeGraphMCPServer(v2.0.0で追加)
168
242
  - 📄 **柔軟なコマンド形式** - Markdown、TOML、AGENTS.md形式に対応
169
- - 🎯 **25の専門エージェント(全プラットフォーム対応)** - オーケストレーター、ステアリング、要件、アーキテクチャ、開発、品質、セキュリティ、インフラ
170
- - Claude Code: Skills API(25スキル)
243
+ - 🎯 **27の専門スキル(全プラットフォーム対応)** - 25プラットフォームエージェント + 5オーケストレーター組み込みスキル(v5.9.0)
244
+ - Claude Code: Skills API(25スキル + 5組み込み)
171
245
  - GitHub Copilot & Cursor: AGENTS.md(公式サポート)
172
246
  - その他4エージェント: AGENTS.md(互換形式)
173
247
  - 📋 **憲法ガバナンス** - 9つの不変条項 + フェーズ-1ゲートによる品質保証
@@ -188,9 +262,9 @@ musubi init -r owner/repo@develop
188
262
 
189
263
  MUSUBIは7つのAIコーディングエージェントに対応し、それぞれに最適化された設定を提供します。
190
264
 
191
- | エージェント | スキルAPI | 25エージェント | コマンド形式 | コマンドファイル形式 | インストールディレクトリ |
265
+ | エージェント | スキルAPI | 27スキル | コマンド形式 | コマンドファイル形式 | インストールディレクトリ |
192
266
  | ------------------ | ------------- | -------------- | ---------------- | -------------------- | --------------------------------------------- |
193
- | **Claude Code** | ✅ (25スキル) | ✅ | `/sdd-*` | Markdown | `.claude/skills/`, `.claude/commands/` |
267
+ | **Claude Code** | ✅ (27スキル) | ✅ | `/sdd-*` | Markdown | `.claude/skills/`, `.claude/commands/` |
194
268
  | **GitHub Copilot** | ❌ | ✅ (AGENTS.md) | `#sdd-*` | Markdown + AGENTS.md | `.github/prompts/`, `.github/AGENTS.md` |
195
269
  | **Cursor IDE** | ❌ | ✅ (AGENTS.md) | `/sdd-*` | Markdown + AGENTS.md | `.cursor/commands/`, `.cursor/AGENTS.md` |
196
270
  | **Gemini CLI** | ❌ | ✅ (GEMINI.md) | `/sdd-*` | TOML + GEMINI.md | `.gemini/commands/`, `GEMINI.md` |
@@ -201,7 +275,8 @@ MUSUBIは7つのAIコーディングエージェントに対応し、それぞ
201
275
  **注意事項**:
202
276
 
203
277
  - スキルAPIはClaude Code専用です
204
- - **全7プラットフォームが25エージェントに対応**(Skills APIまたはAGENTS.md経由)
278
+ - **全7プラットフォームが27スキルに対応**(Skills APIまたはAGENTS.md経由)
279
+ - v5.9.0で5つの組み込みオーケストレータースキルを追加(release, workflow, package, constitution-level, project-config)
205
280
  - AGENTS.md: OpenAI仕様、GitHub Copilot & Cursorが公式サポート
206
281
  - Gemini CLIはTOML形式 + GEMINI.md統合を使用
207
282
  - その他のエージェントはMarkdown形式 + AGENTS.mdを使用
package/README.md CHANGED
@@ -71,6 +71,80 @@ musubi init --windsurf # Windsurf IDE
71
71
 
72
72
  ---
73
73
 
74
+ ## 📊 What's New in v5.9.0
75
+
76
+ ### Phase 1-4 Enterprise Features 🏢
77
+
78
+ Major update with enterprise-ready features for large-scale projects and monorepo support.
79
+
80
+ #### Workflow Flexibility (Phase 1)
81
+
82
+ - **3 Workflow Modes**: `small` (bug fixes), `medium` (features), `large` (architecture)
83
+ - **Auto-detection**: Smart mode selection based on feature name patterns
84
+ - **`musubi-release`**: New CLI for release automation with CHANGELOG generation
85
+
86
+ ```bash
87
+ # Generate CHANGELOG from commits
88
+ musubi-release
89
+
90
+ # Show detected mode for a feature
91
+ musubi-workflow mode --detect "feat: user authentication"
92
+ ```
93
+
94
+ #### Monorepo Support (Phase 2)
95
+
96
+ - **Package Registry**: `steering/packages.yml` for dependency management
97
+ - **Dependency Graphs**: Mermaid diagram generation for visualization
98
+ - **Coverage Tracking**: Per-package test coverage reporting
99
+
100
+ #### Constitution Level Management (Phase 3)
101
+
102
+ - **3 Enforcement Levels**: `critical` (blocking), `advisory` (warnings), `flexible` (suggestions)
103
+ - **Level-aware Validation**: Different enforcement based on article importance
104
+ - **Project Overrides**: Custom levels per project type
105
+
106
+ | Level | Articles | Behavior |
107
+ |-------|----------|----------|
108
+ | Critical | CONST-001, 002, 003, 005, 009 | Blocks workflow |
109
+ | Advisory | CONST-004, 006, 007 | Warnings only |
110
+ | Flexible | CONST-008 | Suggestions |
111
+
112
+ #### Project Configuration (Phase 4)
113
+
114
+ - **`musubi-config`**: New CLI for configuration management
115
+ - **Schema Validation**: v2.0 schema with AJV validation
116
+ - **Auto-migration**: Upgrade v1.0 configs to v2.0
117
+
118
+ ```bash
119
+ musubi-config validate # Validate project.yml
120
+ musubi-config migrate # Migrate to v2.0
121
+ musubi-config show # Show effective config
122
+ ```
123
+
124
+ #### Orchestrator Integration
125
+
126
+ 5 new built-in skills for programmatic access:
127
+
128
+ | Skill | Category | Usage |
129
+ |-------|----------|-------|
130
+ | `release-manager` | release | CHANGELOG generation |
131
+ | `workflow-mode-manager` | workflow | Mode detection & management |
132
+ | `package-manager` | configuration | Package & dependency analysis |
133
+ | `constitution-level-manager` | validation | Level-aware validation |
134
+ | `project-config-manager` | configuration | Config validation & migration |
135
+
136
+ ```javascript
137
+ const { workflowModeSkill } = require('musubi-sdd/src/orchestration');
138
+
139
+ const result = await workflowModeSkill.execute({
140
+ action: 'detect',
141
+ featureName: 'fix: minor bug'
142
+ });
143
+ console.log(result.detectedMode); // 'small'
144
+ ```
145
+
146
+ ---
147
+
74
148
  ## 📊 What's New in v5.8.0
75
149
 
76
150
  ### CodeGraph MCP v0.8.0 Integration 🔗
@@ -269,8 +343,8 @@ const result = await validator.validateAll(projectPath);
269
343
  - 🧠 **Dynamic Replanning** - AI agents dynamically adjust plans on failure with LLM-powered alternatives (v3.6.0+)
270
344
  - 🔌 **MCP Server Integration** - CodeGraphMCPServer for advanced code analysis (v2.0.0)
271
345
  - 📄 **Flexible Command Formats** - Supports Markdown, TOML, and AGENTS.md formats
272
- - 🎯 **25 Specialized Agents (All Platforms)** - Orchestrator, Steering, Requirements, Architecture, Development, Quality, Security, Infrastructure
273
- - Claude Code: Skills API (25 skills)
346
+ - 🎯 **27 Specialized Skills (All Platforms)** - 25 platform agents + 5 orchestrator built-in skills (v5.9.0)
347
+ - Claude Code: Skills API (25 skills + 5 built-in)
274
348
  - GitHub Copilot & Cursor: AGENTS.md (official support)
275
349
  - Other 4 agents: AGENTS.md (compatible format)
276
350
  - 📋 **Constitutional Governance** - 9 immutable articles + Phase -1 Gates for quality enforcement
@@ -291,9 +365,9 @@ const result = await validator.validateAll(projectPath);
291
365
 
292
366
  MUSUBI supports 7 AI coding agents, each with tailored configurations:
293
367
 
294
- | Agent | Skills API | 25 Agents | Command Format | Command File Format | Installation Directory |
368
+ | Agent | Skills API | 27 Skills | Command Format | Command File Format | Installation Directory |
295
369
  | ------------------ | -------------- | -------------- | ---------------- | -------------------- | --------------------------------------------- |
296
- | **Claude Code** | ✅ (25 skills) | ✅ | `/sdd-*` | Markdown | `.claude/skills/`, `.claude/commands/` |
370
+ | **Claude Code** | ✅ (27 skills) | ✅ | `/sdd-*` | Markdown | `.claude/skills/`, `.claude/commands/` |
297
371
  | **GitHub Copilot** | ❌ | ✅ (AGENTS.md) | `#sdd-*` | Markdown + AGENTS.md | `.github/prompts/`, `.github/AGENTS.md` |
298
372
  | **Cursor IDE** | ❌ | ✅ (AGENTS.md) | `/sdd-*` | Markdown + AGENTS.md | `.cursor/commands/`, `.cursor/AGENTS.md` |
299
373
  | **Gemini CLI** | ❌ | ✅ (GEMINI.md) | `/sdd-*` | TOML + GEMINI.md | `.gemini/commands/`, `GEMINI.md` |
@@ -304,7 +378,8 @@ MUSUBI supports 7 AI coding agents, each with tailored configurations:
304
378
  **Notes**:
305
379
 
306
380
  - Skills API is exclusive to Claude Code
307
- - **All 7 platforms now support 25 agents** via Skills API (Claude Code) or AGENTS.md (others)
381
+ - **All 7 platforms now support 27 skills** via Skills API (Claude Code) or AGENTS.md (others)
382
+ - v5.9.0 added 5 built-in orchestrator skills (release, workflow, package, constitution-level, project-config)
308
383
  - AGENTS.md: OpenAI specification, officially supported by GitHub Copilot & Cursor
309
384
  - Gemini CLI uses TOML format + GEMINI.md integration
310
385
 
@@ -347,26 +422,26 @@ musubi-validate complexity
347
422
  ```bash
348
423
  # Initialize MUSUBI for your preferred agent
349
424
 
350
- # Claude Code (default) - 25 Skills API
425
+ # Claude Code (default) - 27 Skills (25 + 5 built-in)
351
426
  npx musubi-sdd init
352
427
  npx musubi-sdd init --claude
353
428
 
354
- # GitHub Copilot - 25 agents (AGENTS.md, official support)
429
+ # GitHub Copilot - 27 skills (AGENTS.md, official support)
355
430
  npx musubi-sdd init --copilot
356
431
 
357
- # Cursor IDE - 25 agents (AGENTS.md, official support)
432
+ # Cursor IDE - 27 skills (AGENTS.md, official support)
358
433
  npx musubi-sdd init --cursor
359
434
 
360
- # Gemini CLI - 25 agents (GEMINI.md integration)
435
+ # Gemini CLI - 27 skills (GEMINI.md integration)
361
436
  npx musubi-sdd init --gemini
362
437
 
363
- # Codex CLI - 25 agents (AGENTS.md)
438
+ # Codex CLI - 27 skills (AGENTS.md)
364
439
  npx musubi-sdd init --codex
365
440
 
366
- # Qwen Code - 25 agents (AGENTS.md)
441
+ # Qwen Code - 27 skills (AGENTS.md)
367
442
  npx musubi-sdd init --qwen
368
443
 
369
- # Windsurf IDE - 25 agents (AGENTS.md)
444
+ # Windsurf IDE - 27 skills (AGENTS.md)
370
445
  npx musubi-sdd init --windsurf
371
446
 
372
447
  # Or install globally
@@ -540,7 +615,7 @@ During initialization, MUSUBI asks you to select a **Project Type**. This determ
540
615
  ```text
541
616
  your-project/
542
617
  ├── .claude/
543
- │ ├── skills/ # 25 Skills API (Claude Code exclusive feature)
618
+ │ ├── skills/ # 25 Skills API + 5 built-in (Claude Code exclusive)
544
619
  │ │ ├── orchestrator/
545
620
  │ │ ├── steering/
546
621
  │ │ ├── requirements-analyst/
@@ -572,10 +647,10 @@ your-project/
572
647
  ```text
573
648
  your-project/
574
649
  ├── .github/prompts/ # For GitHub Copilot (#sdd-*, Markdown)
575
- │ ├── AGENTS.md # 25 agents definition (official support)
650
+ │ ├── AGENTS.md # 27 skills definition (official support)
576
651
  │ OR
577
652
  ├── .cursor/commands/ # For Cursor (/sdd-*, Markdown)
578
- │ ├── AGENTS.md # 25 agents definition (official support)
653
+ │ ├── AGENTS.md # 27 skills definition (official support)
579
654
  │ OR
580
655
  ├── .gemini/commands/ # For Gemini CLI (/sdd-*, TOML)
581
656
  │ │ ├── sdd-steering.toml
@@ -583,15 +658,15 @@ your-project/
583
658
  │ │ └── ... (6 TOML files)
584
659
  │ OR
585
660
  ├── .codex/prompts/ # For Codex CLI (/prompts:sdd-*, Markdown)
586
- │ ├── AGENTS.md # 25 agents definition
661
+ │ ├── AGENTS.md # 27 skills definition
587
662
  │ OR
588
663
  ├── .qwen/commands/ # For Qwen Code (/sdd-*, Markdown)
589
- │ ├── AGENTS.md # 25 agents definition
664
+ │ ├── AGENTS.md # 27 skills definition
590
665
  │ OR
591
666
  ├── .windsurf/workflows/ # For Windsurf (/sdd-*, Markdown)
592
- │ ├── AGENTS.md # 25 agents definition
667
+ │ ├── AGENTS.md # 27 skills definition
593
668
 
594
- ├── GEMINI.md (root, for Gemini) # 25 agents integrated into existing file
669
+ ├── GEMINI.md (root, for Gemini) # 27 skills integrated into existing file
595
670
  ├── steering/ # Project memory (same for all)
596
671
  │ ├── project.yml # Project configuration (v0.2.1+)
597
672
  │ ├── memories/ # Persistent knowledge (v0.2.0+)
@@ -608,11 +683,11 @@ your-project/
608
683
 
609
684
  **Key Differences**:
610
685
 
611
- - **Claude Code**: 25 Skills API (exclusive) + commands (Markdown)
686
+ - **Claude Code**: 27 Skills (25 + 5 built-in) + commands (Markdown)
612
687
  - **GitHub Copilot & Cursor**: AGENTS.md (official support) + commands (Markdown)
613
- - **Gemini CLI**: GEMINI.md integration (25 agents) + TOML commands (unique)
688
+ - **Gemini CLI**: GEMINI.md integration (27 skills) + TOML commands (unique)
614
689
  - **Others**: AGENTS.md (compatible) + Markdown commands
615
- - **All platforms**: Same 25 agents, different implementation formats
690
+ - **All platforms**: Same 27 skills, different implementation formats
616
691
 
617
692
  ## Usage
618
693
 
@@ -804,7 +879,7 @@ Shows the current state of your MUSUBI project:
804
879
 
805
880
  ✅ MUSUBI is initialized
806
881
 
807
- 📁 Claude Code Skills: 25 installed
882
+ 📁 Claude Code Skills: 27 installed (25 + 5 built-in)
808
883
  Location: .claude/skills/
809
884
 
810
885
  🧭 Steering Context:
@@ -917,20 +992,28 @@ For comprehensive validation, use your agent's `/sdd-validate` (or equivalent) c
917
992
  /prompts:sdd-validate authentication
918
993
  ```
919
994
 
920
- ## 25 Agents Overview (All Platforms)
995
+ ## 27 Skills Overview (All Platforms)
921
996
 
922
997
  **Available on all 7 platforms** via:
923
998
 
924
- - **Claude Code**: Skills API (automatic invocation)
999
+ - **Claude Code**: Skills API (automatic invocation) + 5 built-in orchestrator skills
925
1000
  - **GitHub Copilot & Cursor**: AGENTS.md (official support, reference via `@agent-name`)
926
1001
  - **Gemini, Windsurf, Codex, Qwen**: AGENTS.md (compatible format, natural language reference)
927
1002
 
928
- ### Orchestration & Management (3)
1003
+ ### Orchestration & Management (3 + 5 built-in)
929
1004
 
930
1005
  - **orchestrator** - Master coordinator for multi-skill workflows
931
1006
  - **steering** - Project memory manager (auto-updating context)
932
1007
  - **constitution-enforcer** - Governance validation (9 Articles + Phase -1 Gates)
933
1008
 
1009
+ #### Built-in Orchestrator Skills (v5.9.0)
1010
+
1011
+ - **release-manager** - CHANGELOG generation, version management
1012
+ - **workflow-mode-manager** - Mode detection (small/medium/large)
1013
+ - **package-manager** - Monorepo package & dependency analysis
1014
+ - **constitution-level-manager** - Level-aware validation (critical/advisory/flexible)
1015
+ - **project-config-manager** - Schema validation & migration
1016
+
934
1017
  ### Requirements & Planning (3)
935
1018
 
936
1019
  - **requirements-analyst** - EARS format requirements generation
@@ -0,0 +1,230 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * musubi-config CLI
5
+ *
6
+ * Manage project configuration (project.yml)
7
+ * - validate: Validate project.yml against schema
8
+ * - migrate: Migrate v1.0 to v2.0
9
+ * - show: Display effective configuration
10
+ */
11
+
12
+ const { Command } = require('commander');
13
+ const { ProjectValidator } = require('../src/validators/project-validator');
14
+ const chalk = require('chalk');
15
+
16
+ const program = new Command();
17
+
18
+ program
19
+ .name('musubi-config')
20
+ .description('MUSUBI Project Configuration Manager')
21
+ .version('1.0.0');
22
+
23
+ program
24
+ .command('validate')
25
+ .description('Validate project.yml against schema')
26
+ .option('-d, --dir <path>', 'Project directory', process.cwd())
27
+ .option('--strict', 'Treat warnings as errors')
28
+ .action(async options => {
29
+ try {
30
+ const validator = new ProjectValidator(options.dir);
31
+ const result = await validator.validateConfig();
32
+
33
+ console.log('\n📋 Project Configuration Validation\n');
34
+ console.log(`Schema Version: ${result.schemaVersion}`);
35
+ console.log(`Valid: ${result.valid ? chalk.green('✓ Yes') : chalk.red('✗ No')}`);
36
+
37
+ if (result.needsMigration) {
38
+ console.log(chalk.yellow('\n⚠️ Migration recommended: v1.0 → v2.0'));
39
+ console.log(' Run: musubi-config migrate');
40
+ }
41
+
42
+ if (result.errors.length > 0) {
43
+ console.log(chalk.red('\n❌ Errors:'));
44
+ result.errors.forEach(err => {
45
+ console.log(` • ${err.path}: ${err.message}`);
46
+ });
47
+ }
48
+
49
+ if (result.warnings.length > 0) {
50
+ console.log(chalk.yellow('\n⚠️ Warnings:'));
51
+ result.warnings.forEach(warn => {
52
+ console.log(` • ${warn.path}: ${warn.message}`);
53
+ });
54
+ }
55
+
56
+ if (result.valid && result.errors.length === 0) {
57
+ console.log(chalk.green('\n✅ Configuration is valid'));
58
+ }
59
+
60
+ const exitCode = result.errors.length > 0 || (options.strict && result.warnings.length > 0) ? 1 : 0;
61
+ process.exit(exitCode);
62
+ } catch (error) {
63
+ console.error(chalk.red(`Error: ${error.message}`));
64
+ process.exit(1);
65
+ }
66
+ });
67
+
68
+ program
69
+ .command('migrate')
70
+ .description('Migrate project.yml from v1.0 to v2.0')
71
+ .option('-d, --dir <path>', 'Project directory', process.cwd())
72
+ .option('--dry-run', 'Show changes without saving')
73
+ .action(async options => {
74
+ try {
75
+ const validator = new ProjectValidator(options.dir);
76
+ const result = await validator.migrateToV2();
77
+
78
+ console.log('\n📦 Project Configuration Migration\n');
79
+
80
+ if (!result.migrated) {
81
+ console.log(chalk.green(result.message));
82
+ return;
83
+ }
84
+
85
+ console.log(chalk.cyan('Migration changes:'));
86
+ console.log(` • schema_version: 1.0 → 2.0`);
87
+ console.log(` • package_type: ${result.config.package_type}`);
88
+ console.log(` • workflow.mode: ${result.config.workflow?.mode}`);
89
+ console.log(` • workflow.auto_detect_mode: ${result.config.workflow?.auto_detect_mode}`);
90
+ console.log(` • constitution section added`);
91
+
92
+ if (options.dryRun) {
93
+ console.log(chalk.yellow('\n[Dry run] No changes saved'));
94
+ } else {
95
+ await validator.saveConfig(result.config);
96
+ console.log(chalk.green('\n✅ Migration complete'));
97
+ console.log(` Backup saved to: steering/project.yml.backup`);
98
+ }
99
+ } catch (error) {
100
+ console.error(chalk.red(`Error: ${error.message}`));
101
+ process.exit(1);
102
+ }
103
+ });
104
+
105
+ program
106
+ .command('show')
107
+ .description('Display effective configuration')
108
+ .option('-d, --dir <path>', 'Project directory', process.cwd())
109
+ .option('--json', 'Output as JSON')
110
+ .action(async options => {
111
+ try {
112
+ const validator = new ProjectValidator(options.dir);
113
+ const report = await validator.generateReport();
114
+
115
+ if (options.json) {
116
+ console.log(JSON.stringify(report, null, 2));
117
+ return;
118
+ }
119
+
120
+ console.log('\n📊 Effective Project Configuration\n');
121
+ console.log(`Project: ${report.projectRoot}`);
122
+ console.log(`Schema Version: ${report.effective.schema_version}`);
123
+ console.log(`Package Type: ${report.effective.package_type}`);
124
+ console.log(`Workflow Mode: ${report.effective.workflow_mode}`);
125
+ console.log(`Coverage Threshold: ${report.effective.coverage_threshold || 80}%`);
126
+
127
+ if (report.effective.constitution_overrides) {
128
+ console.log('\nConstitution Overrides:');
129
+ Object.entries(report.effective.constitution_overrides).forEach(([key, value]) => {
130
+ console.log(` • ${key}: ${JSON.stringify(value)}`);
131
+ });
132
+ }
133
+
134
+ console.log('\nValidation:');
135
+ console.log(` Valid: ${report.validation.valid ? 'Yes' : 'No'}`);
136
+ console.log(` Errors: ${report.validation.errors.length}`);
137
+ console.log(` Warnings: ${report.validation.warnings.length}`);
138
+ } catch (error) {
139
+ console.error(chalk.red(`Error: ${error.message}`));
140
+ process.exit(1);
141
+ }
142
+ });
143
+
144
+ program
145
+ .command('init')
146
+ .description('Create a new project.yml with v2.0 schema')
147
+ .option('-d, --dir <path>', 'Project directory', process.cwd())
148
+ .option('-n, --name <name>', 'Project name')
149
+ .option('-t, --type <type>', 'Package type', 'application')
150
+ .action(async options => {
151
+ try {
152
+ const fs = require('fs-extra');
153
+ const path = require('path');
154
+ const yaml = require('js-yaml');
155
+
156
+ const projectRoot = options.dir;
157
+ const configPath = path.join(projectRoot, 'steering/project.yml');
158
+
159
+ if (await fs.pathExists(configPath)) {
160
+ console.log(chalk.yellow('project.yml already exists. Use "migrate" to upgrade.'));
161
+ return;
162
+ }
163
+
164
+ await fs.ensureDir(path.join(projectRoot, 'steering'));
165
+
166
+ const projectName = options.name || path.basename(projectRoot);
167
+ const config = {
168
+ schema_version: '2.0',
169
+ project_name: projectName,
170
+ description: `${projectName} project`,
171
+ version: '0.1.0',
172
+ package_type: options.type,
173
+ languages: ['javascript'],
174
+ frameworks: [],
175
+ conventions: {
176
+ architecture_pattern: 'unknown',
177
+ directory_structure: {},
178
+ },
179
+ steering: {
180
+ auto_update: { enabled: false, frequency: 'on-demand' },
181
+ excluded_paths: ['node_modules/**', 'dist/**', '.git/**'],
182
+ memories: {
183
+ enabled: true,
184
+ path: 'steering/memories/',
185
+ max_file_size_kb: 500,
186
+ retention_days: 365,
187
+ },
188
+ },
189
+ agents: {
190
+ default_language: 'en',
191
+ bilingual_output: { enabled: false, languages: ['en'] },
192
+ output: {
193
+ gradual_generation: true,
194
+ progress_indicators: true,
195
+ large_file_splitting: false,
196
+ split_threshold_lines: 300,
197
+ },
198
+ },
199
+ workflow: {
200
+ mode: 'medium',
201
+ auto_detect_mode: true,
202
+ testing: {
203
+ required: true,
204
+ coverage_threshold: 80,
205
+ },
206
+ quality_gates: [],
207
+ },
208
+ constitution: {
209
+ level_config: 'steering/rules/constitution-levels.yml',
210
+ overrides: {},
211
+ },
212
+ custom_rules: [],
213
+ metadata: {
214
+ created_at: new Date().toISOString(),
215
+ musubi_version: require('../package.json').version,
216
+ },
217
+ };
218
+
219
+ await fs.writeFile(configPath, yaml.dump(config, { indent: 2 }), 'utf8');
220
+
221
+ console.log(chalk.green('\n✅ Created steering/project.yml (v2.0 schema)'));
222
+ console.log(` Project: ${projectName}`);
223
+ console.log(` Type: ${options.type}`);
224
+ } catch (error) {
225
+ console.error(chalk.red(`Error: ${error.message}`));
226
+ process.exit(1);
227
+ }
228
+ });
229
+
230
+ program.parse();
@@ -30,6 +30,7 @@ const {
30
30
  TriageCategory,
31
31
  TriageStrategy,
32
32
  AgentCapability,
33
+ getBuiltInSkills,
33
34
  } = require('../src/orchestration');
34
35
 
35
36
  const {
@@ -145,6 +146,21 @@ async function loadSkills(projectPath) {
145
146
  }
146
147
  }
147
148
 
149
+ // Add built-in Phase 1-4 skills
150
+ const builtInSkills = getBuiltInSkills();
151
+ for (const skill of builtInSkills) {
152
+ skills.set(skill.id, {
153
+ name: skill.name,
154
+ description: skill.description,
155
+ keywords: skill.tags || [],
156
+ categories: [skill.category],
157
+ execute: skill.execute,
158
+ version: skill.version,
159
+ inputs: skill.inputs,
160
+ outputs: skill.outputs,
161
+ });
162
+ }
163
+
148
164
  return skills;
149
165
  }
150
166