Merged
Conversation
This commit implements User Story 5 from v0.2, enabling discovery of skills in nested directory structures up to 5 levels deep with security safeguards. Changes: - Updated SkillDiscovery.find_skill_files() to use recursive directory walking - Added _find_skill_files_recursive() helper with depth limit validation - Implemented circular symlink detection using inode tracking - Added depth limit warnings when exceeding 5 levels - Updated async version afind_skill_files() to delegate to sync implementation - Created example nested skill structure with 4 test skills at various depths - Created test_nested_discovery.py validation script (all tests pass) Features: - Supports both flat and nested directory structures simultaneously - Depth limit: warns when skills are deeper than 5 levels - Security: detects and prevents circular symlinks - Symlink resolution: resolves symlinks to canonical paths before validation - Backward compatible: max_depth parameter defaults to 5 Test Results: - Sync Discovery: ✅ PASSED (4/4 skills discovered) - Async Discovery: ✅ PASSED (4/4 skills discovered) - Sync/Async Consistency: ✅ PASSED (identical results) Code Quality: - All ruff checks passed - All mypy strict type checks passed - Full type annotations for new set[tuple[int, int]] parameter Task Status: - [X] T044: Recursive directory walking implemented - [X] T045: Depth limit validation (warn if >5 levels) - [X] T046: Skill name extraction (already correct from YAML frontmatter) - [X] T047: Symlink resolution and circular detection - [X] T048: Sync/async consistency validated - [X] T049: Example nested structure created 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
adiscover(),ainvoke_skill())plugin:skill-name)