feat: implement --max-depth flag for bd dep tree (closes #87, bd-3, bd-159)

- Add --max-depth/-d flag with default of 50
- Wire flag through to store.GetDependencyTree()
- Add input validation (must be >= 1)
- Show inline '… [truncated]' markers on truncated nodes
- Update truncation warning to show actual depth used
- Add comprehensive tests (truncation, default depth, boundary cases)
- Update CLI docs and reference

Thanks to @yashwanth-reddy909 for the initial implementation in PR #87.
This commit completes the feature with full wiring, validation, tests, and docs.

Amp-Thread-ID: https://ampcode.com/threads/T-c439b09c-cff2-48d9-8988-cf9353f0d32e
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Steve Yegge
2025-10-19 09:00:11 -07:00
parent 22daa12665
commit b0fba2eef2
5 changed files with 180 additions and 6 deletions

View File

@@ -1421,9 +1421,12 @@ Those issues probably have open blockers. Check:
# See blocked issues
bd blocked
# Show dependency tree
# Show dependency tree (default max depth: 50)
bd dep tree <issue-id>
# Limit tree depth to prevent deep traversals
bd dep tree <issue-id> --max-depth 10
# Remove blocking dependency if needed
bd dep remove <from-id> <to-id>
```