Skip to content

feat: mille add --depth — サブディレクトリを個別レイヤーとして追加#89

Merged
makinzm merged 1 commit intomainfrom
feat/pr87-mille-add-depth
Mar 26, 2026
Merged

feat: mille add --depth — サブディレクトリを個別レイヤーとして追加#89
makinzm merged 1 commit intomainfrom
feat/pr87-mille-add-depth

Conversation

@makinzm
Copy link
Copy Markdown
Owner

@makinzm makinzm commented Mar 26, 2026

Summary

  • mille add <path> --depth N でサブディレクトリを個別レイヤーとして複数追加
  • mille init と同じ depth ベースのレイヤー検出(auto_detect_layer_depth + infer_layers)を再利用
  • 重複するレイヤーはスキップ(--force で置換可能)
  • depth なしの従来動作(単一レイヤー追加)は変更なし

使用例

mille add conf --depth 1     # conf/cloud, conf/executor 等を個別レイヤーに
mille add lib --depth 1      # lib/alpha, lib/beta 等を個別レイヤーに
mille add conf               # 従来通り conf を1レイヤーとして追加

変更ファイル

  • src/presentation/cli/args.rs--depth オプション追加
  • src/runner.rsscan_target_with_depth + 複数レイヤー追加ロジック
  • tests/e2e_add.rs — depth 関連 E2E テスト 5件追加
  • README.md--depth ドキュメント追加
  • docs/TODO.md — 実装状況更新

Test plan

  • CLI args テスト: test_parse_add_with_depth
  • E2E テスト 5件: depth_creates_multiple_layers, depth_preserves_existing_layers, depth_with_conflict_skips_overlapping, depth_with_force_replaces_overlapping, without_depth_unchanged
  • 既存 E2E テスト 8件 全パス(後方互換性)
  • cargo test 全テスト 0 FAILED
  • cargo clippy -- -D warnings パス

🤖 Generated with Claude Code

CLI args テスト: test_parse_add_with_depth
E2E テスト 5件: depth_creates_multiple_layers, depth_preserves_existing,
depth_with_conflict_skips, depth_with_force_replaces, without_depth_unchanged

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@makinzm makinzm merged commit a1bb6c7 into main Mar 26, 2026
8 checks passed
@makinzm makinzm deleted the feat/pr87-mille-add-depth branch March 26, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant