feat: Add discoverable 'analyze' subcommand with preset flags (Phase 1 UX improvement)

Implements Phase 1 of the codebase analysis UX improvement plan, making the
command discoverable and adding intuitive preset flags while maintaining 100%
backward compatibility.

New Features:
- Add 'analyze' subcommand to main CLI (skill-seekers analyze)
- Add --quick preset: Fast analysis (1-2 min, basic features only)
- Add --comprehensive preset: Full analysis (20-60 min, all features + AI)
- Add --enhance flag: Simple AI enhancement with auto-detection
- Improve help text with timing estimates and mode descriptions

Files Modified:
- src/skill_seekers/cli/main.py: Add analyze subcommand (lines 15, 273-311, 542-589)
- src/skill_seekers/cli/codebase_scraper.py: Add preset logic and improve help text
- tests/test_analyze_command.py: NEW - 20 comprehensive tests
- tests/test_cli_paths.py: Fix version check (2.7.0 -> 2.7.2)
- tests/test_package_structure.py: Fix 4 version checks (2.7.0 -> 2.7.2)
- README.md: Update examples to use 'analyze' command
- CLAUDE.md: Update examples to use 'analyze' command

Test Results:
- 81 tests related to Phase 1: ALL PASSING 
- 20 new tests for analyze command: ALL PASSING 
- Zero regressions introduced
- 100% backward compatibility maintained

Backward Compatibility:
- Old 'skill-seekers-codebase' command still works
- All existing flags (--depth, --ai-mode, --skip-*) still functional
- No breaking changes

Usage Examples:
  skill-seekers analyze --directory . --quick
  skill-seekers analyze --directory . --comprehensive
  skill-seekers analyze --directory . --enhance

Fixes #262 (codebase UX issues)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
yusyus
2026-01-29 21:52:46 +03:00
parent b72073a482
commit 380a71c714
7 changed files with 327 additions and 24 deletions

View File

@@ -24,7 +24,7 @@ class TestCliPackage:
import skill_seekers.cli
assert hasattr(skill_seekers.cli, "__version__")
assert skill_seekers.cli.__version__ == "2.7.0"
assert skill_seekers.cli.__version__ == "2.7.2"
def test_cli_has_all(self):
"""Test that skill_seekers.cli package has __all__ export list."""
@@ -88,7 +88,7 @@ class TestMcpPackage:
import skill_seekers.mcp
assert hasattr(skill_seekers.mcp, "__version__")
assert skill_seekers.mcp.__version__ == "2.7.0"
assert skill_seekers.mcp.__version__ == "2.7.2"
def test_mcp_has_all(self):
"""Test that skill_seekers.mcp package has __all__ export list."""
@@ -108,7 +108,7 @@ class TestMcpPackage:
import skill_seekers.mcp.tools
assert hasattr(skill_seekers.mcp.tools, "__version__")
assert skill_seekers.mcp.tools.__version__ == "2.7.0"
assert skill_seekers.mcp.tools.__version__ == "2.7.2"
class TestPackageStructure:
@@ -212,7 +212,7 @@ class TestRootPackage:
import skill_seekers
assert hasattr(skill_seekers, "__version__")
assert skill_seekers.__version__ == "2.7.0"
assert skill_seekers.__version__ == "2.7.2"
def test_root_has_metadata(self):
"""Test that skill_seekers root package has metadata."""