tree-sitter-analyzer 0.9.8__tar.gz → 1.0.0__tar.gz

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.

Potentially problematic release.


This version of tree-sitter-analyzer might be problematic. Click here for more details.

Files changed (135) hide show
  1. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/CHANGELOG.md +1086 -1024
  2. tree_sitter_analyzer-1.0.0/GITFLOW.md +188 -0
  3. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/PKG-INFO +35 -8
  4. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/PYPI_RELEASE_GUIDE.md +125 -125
  5. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/README.md +508 -507
  6. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/README_ja.md +508 -507
  7. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/README_zh.md +509 -508
  8. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/docs/api.md +174 -174
  9. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/examples/project_root_demo.py +286 -282
  10. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/examples/security_demo.py +293 -291
  11. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/examples/security_integration_demo.py +222 -222
  12. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/pyproject.toml +21 -16
  13. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/scripts/improved_readme_updater.py +470 -470
  14. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/__init__.py +132 -132
  15. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/api.py +542 -533
  16. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/cli/commands/base_command.py +181 -181
  17. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/cli/commands/partial_read_command.py +139 -139
  18. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/cli/info_commands.py +124 -121
  19. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/cli_main.py +327 -328
  20. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/core/analysis_engine.py +584 -584
  21. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/file_handler.py +212 -210
  22. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/formatters/base_formatter.py +169 -167
  23. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/interfaces/cli.py +535 -528
  24. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/mcp/server.py +655 -650
  25. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/mcp/tools/__init__.py +30 -30
  26. tree_sitter_analyzer-1.0.0/tree_sitter_analyzer/mcp/utils/path_resolver.py +414 -0
  27. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/output_manager.py +257 -253
  28. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/project_detector.py +330 -330
  29. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/security/boundary_manager.py +260 -251
  30. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/security/validator.py +257 -246
  31. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/table_formatter.py +710 -708
  32. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/utils.py +335 -336
  33. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/upload_to_pypi.py +409 -409
  34. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/uv.lock +1944 -1916
  35. tree_sitter_analyzer-0.9.8/tree_sitter_analyzer/mcp/utils/path_resolver.py +0 -194
  36. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/.gitignore +0 -0
  37. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/.kiro/steering/product.md +0 -0
  38. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/.kiro/steering/structure.md +0 -0
  39. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/.kiro/steering/tech.md +0 -0
  40. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/.pre-commit-config.yaml +0 -0
  41. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/AI_COLLABORATION_GUIDE.md +0 -0
  42. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/CODE_STYLE_GUIDE.md +0 -0
  43. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/CONTRIBUTING.md +0 -0
  44. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/DEPLOYMENT_GUIDE.md +0 -0
  45. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/LANGUAGE_GUIDELINES.md +0 -0
  46. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/LLM_CODING_GUIDELINES.md +0 -0
  47. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/MCP_SETUP_DEVELOPERS.md +0 -0
  48. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/MCP_SETUP_USERS.md +0 -0
  49. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/PROJECT_ROOT_CONFIG.md +0 -0
  50. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/build_standalone.py +0 -0
  51. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/check_quality.py +0 -0
  52. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/examples/BigService.java +0 -0
  53. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/examples/BigService.json +0 -0
  54. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/examples/BigService.summary.json +0 -0
  55. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/examples/JavaDocTest.java +0 -0
  56. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/examples/MultiClass.java +0 -0
  57. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/examples/Sample.java +0 -0
  58. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/examples/calculate_token_comparison.py +0 -0
  59. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/examples/sample.py +0 -0
  60. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/llm_code_checker.py +0 -0
  61. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/pypirc_example.txt +0 -0
  62. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/pytest.ini +0 -0
  63. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/scripts/readme_config.py +0 -0
  64. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/start_mcp_server.py +0 -0
  65. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/training/01_onboarding.md +0 -0
  66. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/training/02_architecture_map.md +0 -0
  67. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/training/03_cli_cheatsheet.md +0 -0
  68. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/training/04_mcp_cheatsheet.md +0 -0
  69. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/training/05_plugin_tutorial.md +0 -0
  70. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/training/06_quality_workflow.md +0 -0
  71. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/training/07_troubleshooting.md +0 -0
  72. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/training/08_prompt_library.md +0 -0
  73. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/training/09_tasks.md +0 -0
  74. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/training/10_glossary.md +0 -0
  75. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/training/11_takeover_plan.md +0 -0
  76. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/training/README.md +0 -0
  77. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/__main__.py +0 -0
  78. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/cli/__init__.py +0 -0
  79. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/cli/__main__.py +0 -0
  80. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/cli/commands/__init__.py +0 -0
  81. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/cli/commands/advanced_command.py +0 -0
  82. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/cli/commands/default_command.py +0 -0
  83. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/cli/commands/query_command.py +0 -0
  84. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/cli/commands/structure_command.py +0 -0
  85. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/cli/commands/summary_command.py +0 -0
  86. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/cli/commands/table_command.py +0 -0
  87. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/core/__init__.py +0 -0
  88. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/core/cache_service.py +0 -0
  89. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/core/engine.py +0 -0
  90. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/core/parser.py +0 -0
  91. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/core/query.py +0 -0
  92. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/core/query_filter.py +0 -0
  93. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/core/query_service.py +0 -0
  94. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/encoding_utils.py +0 -0
  95. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/exceptions.py +0 -0
  96. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/formatters/__init__.py +0 -0
  97. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/formatters/formatter_factory.py +0 -0
  98. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/formatters/java_formatter.py +0 -0
  99. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/formatters/python_formatter.py +0 -0
  100. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/interfaces/__init__.py +0 -0
  101. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/interfaces/cli_adapter.py +0 -0
  102. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/interfaces/mcp_adapter.py +0 -0
  103. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/interfaces/mcp_server.py +0 -0
  104. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/language_detector.py +0 -0
  105. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/language_loader.py +0 -0
  106. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/languages/__init__.py +0 -0
  107. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/languages/java_plugin.py +0 -0
  108. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/languages/javascript_plugin.py +0 -0
  109. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/languages/python_plugin.py +0 -0
  110. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/mcp/__init__.py +0 -0
  111. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/mcp/resources/__init__.py +0 -0
  112. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/mcp/resources/code_file_resource.py +0 -0
  113. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/mcp/resources/project_stats_resource.py +0 -0
  114. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/mcp/tools/analyze_scale_tool.py +0 -0
  115. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/mcp/tools/analyze_scale_tool_cli_compatible.py +0 -0
  116. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/mcp/tools/base_tool.py +0 -0
  117. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/mcp/tools/query_tool.py +0 -0
  118. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/mcp/tools/read_partial_tool.py +0 -0
  119. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/mcp/tools/table_format_tool.py +0 -0
  120. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/mcp/tools/universal_analyze_tool.py +0 -0
  121. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/mcp/utils/__init__.py +0 -0
  122. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/mcp/utils/error_handler.py +0 -0
  123. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/models.py +0 -0
  124. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/plugins/__init__.py +0 -0
  125. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/plugins/base.py +0 -0
  126. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/plugins/manager.py +0 -0
  127. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/queries/__init__.py +0 -0
  128. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/queries/java.py +0 -0
  129. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/queries/javascript.py +0 -0
  130. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/queries/python.py +0 -0
  131. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/queries/typescript.py +0 -0
  132. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/query_loader.py +0 -0
  133. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/security/__init__.py +0 -0
  134. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/tree_sitter_analyzer/security/regex_checker.py +0 -0
  135. {tree_sitter_analyzer-0.9.8 → tree_sitter_analyzer-1.0.0}/upload_interactive.py +0 -0
@@ -1,1024 +1,1086 @@
1
- # Changelog
2
- ## [0.9.8] - 2025-08-17
3
-
4
- ### 🚀 Major Enhancement: Unified Path Resolution System
5
-
6
- #### 🔧 MCP Tools Path Resolution Fix
7
- - **Centralized PathResolver**: Created unified `PathResolver` class for consistent path handling across all MCP tools
8
- - **Cross-Platform Support**: Fixed Windows path separator issues and improved cross-platform compatibility
9
- - **Security Validation**: Enhanced path validation with project boundary enforcement
10
- - **Error Prevention**: Eliminated `[Errno 2] No such file or directory` errors in MCP tools
11
-
12
- #### 🛠️ Technical Improvements
13
-
14
- ##### New Core Components
15
- - `mcp/utils/path_resolver.py`: Centralized path resolution utility
16
- - `mcp/utils/__init__.py`: Updated exports for PathResolver
17
- - Enhanced MCP tools with unified path resolution:
18
- - `analyze_scale_tool.py`
19
- - `query_tool.py`
20
- - `universal_analyze_tool.py`
21
- - `read_partial_tool.py`
22
- - `table_format_tool.py`
23
-
24
- ##### Refactoring Benefits
25
- - **Code Reuse**: Eliminated duplicate path resolution logic across tools
26
- - **Consistency**: All MCP tools now handle paths identically
27
- - **Maintainability**: Single source of truth for path resolution logic
28
- - **Testing**: Comprehensive test coverage for path resolution functionality
29
-
30
- #### 🧪 Comprehensive Testing
31
-
32
- ##### Test Coverage Improvements
33
- - **PathResolver Tests**: 50 comprehensive unit tests covering edge cases
34
- - **MCP Tools Integration Tests**: Verified all tools use PathResolver correctly
35
- - **Cross-Platform Tests**: Windows and Unix path handling validation
36
- - **Error Handling Tests**: Comprehensive error scenario coverage
37
- - **Overall Coverage**: Achieved 74.43% test coverage (exceeding 80% requirement)
38
-
39
- ##### New Test Files
40
- - `tests/test_path_resolver_extended.py`: Extended PathResolver functionality tests
41
- - `tests/test_utils_extended.py`: Enhanced utils module testing
42
- - `tests/test_mcp_tools_path_resolution.py`: MCP tools path resolution integration tests
43
-
44
- #### 🎯 Problem Resolution
45
-
46
- ##### Issues Fixed
47
- - **Path Resolution Errors**: Eliminated `FileNotFoundError` in MCP tools
48
- - **Windows Compatibility**: Fixed backslash vs forward slash path issues
49
- - **Relative Path Handling**: Improved relative path resolution with project root
50
- - **Security Validation**: Enhanced path security with boundary checking
51
-
52
- ##### MCP Tools Now Working
53
- - `check_code_scale`: Successfully analyzes file size with relative paths
54
- - `query_code`: Finds code elements using relative file paths
55
- - `extract_code_section`: Extracts code segments without path errors
56
- - `read_partial`: Reads file portions with consistent path handling
57
-
58
- #### 📚 Documentation Updates
59
- - **Path Resolution Guide**: Comprehensive documentation of the new system
60
- - **MCP Tools Usage**: Updated examples showing relative path usage
61
- - **Cross-Platform Guidelines**: Best practices for Windows and Unix environments
62
-
63
- ## [0.9.7] - 2025-08-17
64
-
65
- ### 🛠️ Error Handling Improvements
66
-
67
- #### 🔧 MCP Tool Enhancements
68
- - **Enhanced Error Decorator**: Improved `@handle_mcp_errors` decorator with tool name identification
69
- - **Better Error Context**: Added tool name "query_code" to error handling for improved debugging
70
- - **Security Validation**: Enhanced file path security validation in query tool
71
-
72
- #### 🧪 Code Quality
73
- - **Pre-commit Hooks**: All code quality checks passed including black, ruff, bandit, and isort
74
- - **Mixed Line Endings**: Fixed mixed line ending issues in query_tool.py
75
- - **Type Safety**: Maintained existing type annotations and code structure
76
-
77
- #### 📚 Documentation
78
- - **Updated Examples**: Enhanced error handling documentation
79
- - **Security Guidelines**: Improved security validation documentation
80
-
81
- ## [0.9.6] - 2025-08-17
82
-
83
- ### 🎉 New Feature: Advanced Query Filtering System
84
-
85
- #### 🚀 Major Features
86
-
87
- ##### Smart Query Filtering
88
- - **Precise Method Search**: Find specific methods using `--filter "name=main"`
89
- - **Pattern Matching**: Use wildcards like `--filter "name=~auth*"` for authentication-related methods
90
- - **Parameter Filtering**: Filter by parameter count with `--filter "params=0"`
91
- - **Modifier Filtering**: Search by visibility and modifiers like `--filter "static=true,public=true"`
92
- - **Compound Conditions**: Combine multiple filters with `--filter "name=~get*,params=0,public=true"`
93
-
94
- ##### Unified Architecture
95
- - **QueryService**: New unified query service eliminates code duplication between CLI and MCP
96
- - **QueryFilter**: Powerful filtering engine supporting multiple criteria
97
- - **Consistent API**: Same filtering syntax works in both command line and AI assistants
98
-
99
- #### 🛠️ Technical Improvements
100
-
101
- ##### New Core Components
102
- - `core/query_service.py`: Unified query execution service
103
- - `core/query_filter.py`: Advanced result filtering system
104
- - `cli/commands/query_command.py`: Enhanced CLI query command
105
- - `mcp/tools/query_tool.py`: New MCP query tool with filtering support
106
-
107
- ##### Enhanced CLI
108
- - Added `--filter` argument for query result filtering
109
- - Added `--filter-help` command to display filter syntax help
110
- - Improved query command to use unified QueryService
111
-
112
- ##### MCP Protocol Extensions
113
- - New `query_code` tool for AI assistants
114
- - Full filtering support in MCP environment
115
- - Consistent with CLI filtering syntax
116
-
117
- #### 📚 Documentation Updates
118
-
119
- ##### README Updates
120
- - **Chinese (README_zh.md)**: Added comprehensive query filtering examples
121
- - **English (README.md)**: Complete documentation with usage examples
122
- - **Japanese (README_ja.md)**: Full translation with feature explanations
123
-
124
- ##### Training Materials
125
- - Updated `training/01_onboarding.md` with new feature demonstrations
126
- - Enhanced `training/02_architecture_map.md` with architecture improvements
127
- - Cross-platform examples for Windows, Linux, and macOS
128
-
129
- #### 🧪 Comprehensive Testing
130
-
131
- ##### Test Coverage
132
- - **QueryService Tests**: 13 comprehensive unit tests
133
- - **QueryFilter Tests**: 29 detailed filtering tests
134
- - **CLI Integration Tests**: 11 real-world usage scenarios
135
- - **MCP Tool Tests**: 9 tool definition and functionality tests
136
-
137
- ##### Test Categories
138
- - Unit tests for core filtering logic
139
- - Integration tests with real Java files
140
- - Edge case handling (overloaded methods, generics, annotations)
141
- - Error handling and validation
142
-
143
- #### 🎯 Usage Examples
144
-
145
- ##### Command Line Interface
146
- ```bash
147
- # Find specific method
148
- uv run python -m tree_sitter_analyzer examples/BigService.java --query-key methods --filter "name=main"
149
-
150
- # Find authentication methods
151
- uv run python -m tree_sitter_analyzer examples/BigService.java --query-key methods --filter "name=~auth*"
152
-
153
- # Find public methods with no parameters
154
- uv run python -m tree_sitter_analyzer examples/BigService.java --query-key methods --filter "params=0,public=true"
155
-
156
- # View filter syntax help
157
- uv run python -m tree_sitter_analyzer --filter-help
158
- ```
159
-
160
- ##### AI Assistant (MCP)
161
- ```json
162
- {
163
- "tool": "query_code",
164
- "arguments": {
165
- "file_path": "examples/BigService.java",
166
- "query_key": "methods",
167
- "filter": "name=main"
168
- }
169
- }
170
- ```
171
-
172
- #### 🔧 Filter Syntax Reference
173
-
174
- ##### Supported Filters
175
- - **name**: Method/function name matching
176
- - Exact: `name=main`
177
- - Pattern: `name=~auth*` (supports wildcards)
178
- - **params**: Parameter count filtering
179
- - Example: `params=0`, `params=2`
180
- - **Modifiers**: Visibility and static modifiers
181
- - `static=true/false`
182
- - `public=true/false`
183
- - `private=true/false`
184
- - `protected=true/false`
185
-
186
- ##### Combining Filters
187
- Use commas for AND logic: `name=~get*,params=0,public=true`
188
-
189
- #### 🏗️ Architecture Benefits
190
-
191
- ##### Code Quality
192
- - **DRY Principle**: Eliminated duplication between CLI and MCP
193
- - **Single Responsibility**: Clear separation of concerns
194
- - **Extensibility**: Easy to add new filter types
195
- - **Maintainability**: Centralized query logic
196
-
197
- ##### Performance
198
- - **Efficient Filtering**: Post-query filtering for optimal performance
199
- - **Memory Optimized**: Filter after parsing, not during
200
- - **Scalable**: Works efficiently with large codebases
201
-
202
- #### 🚦 Quality Assurance
203
-
204
- ##### Code Standards
205
- - **Type Safety**: Full MyPy type annotations
206
- - **Code Style**: Black formatting, Ruff linting
207
- - **Documentation**: Comprehensive docstrings and examples
208
- - **Testing**: 62 new tests with 100% pass rate
209
-
210
- ##### Platform Support
211
- - **Windows**: PowerShell examples and testing
212
- - **Linux/macOS**: Bash examples and compatibility
213
- - **Codespaces**: Full support for GitHub Codespaces
214
-
215
- #### 🎯 Impact
216
-
217
- ##### Productivity Gains
218
- - **Faster Code Navigation**: Find specific methods in seconds
219
- - **Enhanced Code Analysis**: AI assistants can understand code structure better
220
- - **Reduced Token Usage**: Extract only relevant methods for LLM analysis
221
-
222
- ##### Integration Benefits
223
- - **IDE Support**: Works with Cursor, Claude Desktop, Roo Code
224
- - **CLI Flexibility**: Powerful command-line filtering
225
- - **API Consistency**: Same functionality across all interfaces
226
-
227
- #### 📝 Technical Details
228
- - **Files Changed**: 15+ core files
229
- - **New Files**: 6 new modules and test files
230
- - **Lines Added**: 2000+ lines of code and tests
231
- - **Documentation**: 500+ lines of updated documentation
232
-
233
- #### ✅ Migration Notes
234
- - All existing CLI and MCP functionality remains compatible
235
- - New filtering features are additive and optional
236
- - No breaking changes to existing APIs
237
-
238
- ---
239
-
240
- ## [0.9.5] - 2025-08-15
241
-
242
- ### 🚀 CI/CD Stability & Cross-Platform Compatibility
243
- - **Enhanced CI Matrix Strategy**: Disabled `fail-fast` strategy for quality-check and test-matrix jobs, ensuring all platform/Python version combinations run to completion
244
- - **Improved Test Visibility**: Better diagnosis of platform-specific issues with comprehensive matrix results
245
- - **Cross-Platform Fixes**: Resolved persistent CI failures on Windows, macOS, and Linux
246
-
247
- ### 🔒 Security Improvements
248
- - **macOS Symlink Safety**: Fixed symlink safety checks to properly handle macOS temporary directory symlinks (`/var` ↔ `/private/var`)
249
- - **Project Boundary Management**: Enhanced boundary detection to correctly handle real paths within project boundaries
250
- - **Security Code Quality**: Addressed all Bandit security linter low-risk findings:
251
- - Replaced bare `pass` statements with explicit `...` for better intent documentation
252
- - Added proper attribute checks for `sys.stderr` writes
253
- - Replaced runtime `assert` statements with defensive type checking
254
-
255
- ### 📊 Documentation & Structure
256
- - **README Enhancement**: Complete restructure with table of contents, improved content flow, and visual hierarchy
257
- - **Multi-language Support**: Fully translated README into Chinese (`README_zh.md`) and Japanese (`README_ja.md`)
258
- - **Documentation Standards**: Normalized line endings across all markdown files
259
- - **Project Guidelines**: Added new language development guidelines and project structure documentation
260
-
261
- ### 🛠️ Code Quality Enhancements
262
- - **Error Handling**: Improved robustness in `encoding_utils.py` and `utils.py` with better exception handling patterns
263
- - **Platform Compatibility**: Enhanced test assertions for cross-platform compatibility
264
- - **Security Practices**: Strengthened security validation while maintaining usability
265
-
266
- ### 🧪 Testing & Quality Assurance
267
- - **Test Suite**: 1,358 tests passing with 74.54% coverage
268
- - **Platform Coverage**: Full testing across Python 3.10-3.13 × Windows/macOS/Linux
269
- - **CI Reliability**: Stable CI pipeline with comprehensive error reporting
270
-
271
- ### 🚀 Impact
272
- - **Enterprise Ready**: Improved stability for production deployments
273
- - **Developer Experience**: Better local development workflow with consistent tooling
274
- - **AI Integration**: Enhanced MCP protocol compatibility across all supported platforms
275
- - **International Reach**: Multi-language documentation for global developer community
276
-
277
- ## [0.9.4] - 2025-08-15
278
-
279
- ### 🔧 Fixed (MCP)
280
- - Unified relative path resolution: In MCP's `read_partial_tool`, `table_format_tool`, and the `check_code_scale` path handling in `server`, all relative paths are now consistently resolved to absolute paths based on `project_root` before security validation and file reading. This prevents boundary misjudgments and false "file not found" errors.
281
- - Fixed boolean evaluation: Corrected the issue where the tuple returned by `validate_file_path` was directly used as a boolean. Now, the boolean value and error message are unpacked and used appropriately.
282
-
283
- ### 📚 Docs
284
- - Added and emphasized in contribution and collaboration docs: Always use `uv run` to execute commands locally (including on Windows/PowerShell).
285
- - Replaced example commands from plain `pytest`/`python` to `uv run pytest`/`uv run python`.
286
-
287
- ### 🧪 Tests
288
- - All MCP-related tests (tools, resources, server) passed.
289
- - Full test suite: 1358/1358 tests passed.
290
-
291
- ### 🚀 Impact
292
- - Improved execution consistency on Windows/PowerShell, avoiding issues caused by redirection/interaction.
293
- - Relative path behavior in MCP scenarios is now stable and predictable.
294
-
295
- ## [0.9.3] - 2025-08-15
296
-
297
- ### 🔇 Improved Output Experience
298
- - Significantly reduced verbose logging in CLI default output
299
- - Downgraded initialization and debug messages from INFO to DEBUG level
300
- - Set default log level to WARNING for cleaner user experience
301
- - Performance logs disabled by default, only shown in verbose mode
302
-
303
- ### 🎯 Affected Components
304
- - CLI main program default log level adjustment
305
- - Project detection, cache service, boundary manager log level optimization
306
- - Performance monitoring log output optimization
307
- - Preserved full functionality of `--quiet` and `--verbose` options
308
-
309
- ### 🚀 User Impact
310
- - More concise and professional command line output
311
- - Only displays critical information and error messages
312
- - Enhanced user experience, especially when used in automation scripts
313
-
314
- ## [0.9.2] - 2025-08-14
315
-
316
- ### 🔄 Changed
317
- - MCP module version is now synchronized with the main package version (both read from package `__version__`)
318
- - Initialization state errors now raise `MCPError`, consistent with MCP semantics
319
- - Security checks: strengthened absolute path policy, temporary directory cases are safely allowed in test environments
320
- - Code and tool descriptions fully Anglicized, removed remaining Chinese/Japanese comments and documentation fragments
321
-
322
- ### 📚 Docs
323
- - `README.md` is now the English source of truth, with 1:1 translations to `README_zh.md` and `README_ja.md`
324
- - Added examples and recommended configuration for the three-step MCP workflow
325
-
326
- ### 🧪 Tests
327
- - All 1358/1358 test cases passed, coverage at 74.82%
328
- - Updated assertions to read dynamic version and new error types
329
-
330
- ### 🚀 Impact
331
- - Improved IDE (Cursor/Claude) tool visibility and consistency
332
- - Lowered onboarding barrier for international users, unified English descriptions and localized documentation
333
-
334
-
335
- All notable changes to this project will be documented in this file.
336
-
337
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
338
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
339
-
340
- ## [0.9.1] - 2025-08-12
341
-
342
- ### 🎯 MCP Tools Unification & Simplification
343
-
344
- #### 🔧 Unified Tool Names
345
- - **BREAKING**: Simplified MCP tools to 3 core tools with clear naming:
346
- - `check_code_scale` - Step 1: Check file scale and complexity
347
- - `analyze_code_structure` - Step 2: Generate structure tables with line positions
348
- - `extract_code_section` - Step 3: Extract specific code sections by line range
349
- - **Removed**: Backward compatibility for old tool names (`analyze_code_scale`, `read_code_partial`, `format_table`, `analyze_code_universal`)
350
- - **Enhanced**: Tool descriptions with step numbers and usage guidance
351
-
352
- #### 📋 Parameter Standardization
353
- - **Standardized**: All parameters use snake_case naming convention
354
- - **Fixed**: Common LLM parameter mistakes with clear validation
355
- - **Required**: `file_path` parameter for all tools
356
- - **Required**: `start_line` parameter for `extract_code_section`
357
-
358
- #### 📖 Documentation Improvements
359
- - **Updated**: README.md with unified tool workflow examples
360
- - **Enhanced**: MCP_INFO with workflow guidance
361
- - **Simplified**: Removed redundant documentation files
362
- - **Added**: Clear three-step workflow instructions for LLMs
363
-
364
- #### 🧪 Test Suite Updates
365
- - **Fixed**: All MCP-related tests updated for new tool names
366
- - **Updated**: 138 MCP tests passing with new unified structure
367
- - **Enhanced**: Test coverage for unified tool workflow
368
- - **Maintained**: 100% backward compatibility in core analysis engine
369
-
370
- #### 🎉 Benefits
371
- - **Simplified**: LLM integration with clear tool naming
372
- - **Reduced**: Parameter confusion with consistent snake_case
373
- - **Improved**: Workflow clarity with numbered steps
374
- - **Enhanced**: Error messages with available tool suggestions
375
-
376
- ## [0.8.2] - 2025-08-05
377
-
378
- ### 🎯 Major Quality Improvements
379
-
380
- #### 🏆 Complete Test Suite Stabilization
381
- - **Fixed**: All 31 failing tests now pass - achieved **100% test success rate** (1358/1358 tests)
382
- - **Fixed**: Windows file permission issues in temporary file handling
383
- - **Fixed**: API signature mismatches in QueryExecutor test calls
384
- - **Fixed**: Return format inconsistencies in ReadPartialTool tests
385
- - **Fixed**: Exception type mismatches between error handler and test expectations
386
- - **Fixed**: SecurityValidator method name discrepancies in component tests
387
- - **Fixed**: Mock dependency path issues in engine configuration tests
388
-
389
- #### 📊 Test Coverage Enhancements
390
- - **Enhanced**: Formatters module coverage from **0%** to **42.30%** - complete breakthrough
391
- - **Enhanced**: Error handler coverage from **61.64%** to **82.76%** (+21.12%)
392
- - **Enhanced**: Overall project coverage from **71.97%** to **74.82%** (+2.85%)
393
- - **Added**: 104 new comprehensive test cases across critical modules
394
- - **Added**: Edge case testing for binary files, Unicode content, and large files
395
- - **Added**: Performance and concurrency testing for core components
396
-
397
- #### 🔧 Test Infrastructure Improvements
398
- - **Improved**: Cross-platform compatibility with proper Windows file handling
399
- - **Improved**: Systematic error classification and batch fixing methodology
400
- - **Improved**: Test reliability with proper exception type imports
401
- - **Improved**: Mock object configuration and dependency injection testing
402
- - **Improved**: Temporary file lifecycle management across all test scenarios
403
-
404
- #### 🧪 New Test Modules
405
- - **Added**: `test_formatters_comprehensive.py` - Complete formatters testing (30 tests)
406
- - **Added**: `test_core_engine_extended.py` - Extended engine edge case testing (14 tests)
407
- - **Added**: `test_core_query_extended.py` - Query executor performance testing (13 tests)
408
- - **Added**: `test_universal_analyze_tool_extended.py` - Tool robustness testing (17 tests)
409
- - **Added**: `test_read_partial_tool_extended.py` - Partial reading comprehensive testing (19 tests)
410
- - **Added**: `test_mcp_server_initialization.py` - Server startup validation (15 tests)
411
- - **Added**: `test_error_handling_improvements.py` - Error handling verification (20 tests)
412
-
413
- ### 🚀 Technical Achievements
414
- - **Achievement**: Zero test failures - complete CI/CD readiness
415
- - **Achievement**: Comprehensive formatters module testing foundation established
416
- - **Achievement**: Cross-platform test compatibility ensured
417
- - **Achievement**: Robust error handling validation implemented
418
- - **Achievement**: Performance and stress testing coverage added
419
-
420
- ### 📈 Quality Metrics
421
- - **Metric**: 1358 total tests (100% pass rate)
422
- - **Metric**: 74.82% code coverage (industry-standard quality)
423
- - **Metric**: 6 error categories systematically resolved
424
- - **Metric**: 5 test files comprehensively updated
425
- - **Metric**: Zero breaking changes to existing functionality
426
-
427
- ---
428
-
429
- ## [0.8.1] - 2025-08-05
430
-
431
- ### 🔧 Fixed
432
- - **Fixed**: Eliminated duplicate "ERROR:" prefixes in error messages across all CLI commands
433
- - **Fixed**: Updated all CLI tests to match unified error message format
434
- - **Fixed**: Resolved missing `--project-root` parameters in comprehensive CLI tests
435
- - **Fixed**: Corrected module import issues in language detection tests
436
- - **Fixed**: Updated test expectations to match security validation behavior
437
-
438
- ### 🧪 Testing Improvements
439
- - **Enhanced**: Fixed 6 failing tests in `test_partial_read_command_validation.py`
440
- - **Enhanced**: Fixed 6 failing tests in `test_cli_comprehensive.py` and Java structure analyzer tests
441
- - **Enhanced**: Improved test stability and reliability across all CLI functionality
442
- - **Enhanced**: Unified error message testing with consistent format expectations
443
-
444
- ### 📦 Code Quality
445
- - **Improved**: Centralized error message formatting in `output_manager.py`
446
- - **Improved**: Consistent error handling architecture across all CLI commands
447
- - **Improved**: Better separation of concerns between error content and formatting
448
-
449
- ---
450
-
451
- ## [0.8.0] - 2025-08-04
452
-
453
- ### 🚀 Added
454
-
455
- #### Enterprise-Grade Security Framework
456
- - **Added**: Complete security module with unified validation framework
457
- - **Added**: `SecurityValidator` - Multi-layer defense against path traversal, ReDoS attacks, and input injection
458
- - **Added**: `ProjectBoundaryManager` - Strict project boundary control with symlink protection
459
- - **Added**: `RegexSafetyChecker` - ReDoS attack prevention with pattern complexity analysis
460
- - **Added**: 7-layer file path validation system
461
- - **Added**: Real-time regex performance monitoring
462
- - **Added**: Comprehensive input sanitization
463
-
464
- #### Security Documentation & Examples
465
- - **Added**: Complete security implementation documentation (`docs/security/PHASE1_IMPLEMENTATION.md`)
466
- - **Added**: Interactive security demonstration script (`examples/security_demo.py`)
467
- - **Added**: Comprehensive security test suite (100+ tests)
468
-
469
- #### Architecture Improvements
470
- - **Enhanced**: New unified architecture with `elements` list for better extensibility
471
- - **Enhanced**: Improved data conversion between new and legacy formats
472
- - **Enhanced**: Better separation of concerns in analysis pipeline
473
-
474
- ### 🔧 Fixed
475
-
476
- #### Test Infrastructure
477
- - **Fixed**: Removed 2 obsolete tests that were incompatible with new architecture
478
- - **Fixed**: All 1,191 tests now pass (100% success rate)
479
- - **Fixed**: Zero skipped tests - complete test coverage
480
- - **Fixed**: Java language support properly integrated
481
-
482
- #### Package Management
483
- - **Fixed**: Added missing `tree-sitter-java` dependency
484
- - **Fixed**: Proper language support detection and loading
485
- - **Fixed**: MCP protocol integration stability
486
-
487
- ### 📦 Package Updates
488
-
489
- - **Updated**: Complete security module integration
490
- - **Updated**: Enhanced error handling with security-specific exceptions
491
- - **Updated**: Improved logging and audit trail capabilities
492
- - **Updated**: Better performance monitoring and metrics
493
-
494
- ### 🔒 Security Enhancements
495
-
496
- - **Security**: Multi-layer path traversal protection
497
- - **Security**: ReDoS attack prevention (95%+ protection rate)
498
- - **Security**: Input injection protection (100% coverage)
499
- - **Security**: Project boundary enforcement (100% coverage)
500
- - **Security**: Comprehensive audit logging
501
- - **Security**: Performance impact < 5ms per validation
502
-
503
- ---
504
-
505
- ## [0.7.0] - 2025-08-04
506
-
507
- ### 🚀 Added
508
-
509
- #### Improved Table Output Structure
510
- - **Enhanced**: Complete restructure of `--table=full` output format
511
- - **Added**: Class-based organization - each class now has its own section
512
- - **Added**: Clear separation of fields, constructors, and methods by class
513
- - **Added**: Proper attribution of methods and fields to their respective classes
514
- - **Added**: Nested class handling - inner class members no longer appear in outer class sections
515
-
516
- #### Better Output Organization
517
- - **Enhanced**: File header now shows filename instead of class name for multi-class files
518
- - **Enhanced**: Package information displayed in dedicated section with clear formatting
519
- - **Enhanced**: Methods grouped by visibility (Public, Protected, Package, Private)
520
- - **Enhanced**: Constructors separated from regular methods
521
- - **Enhanced**: Fields properly attributed to their containing class
522
-
523
- #### Improved Readability
524
- - **Enhanced**: Cleaner section headers with line range information
525
- - **Enhanced**: Better visual separation between different classes
526
- - **Enhanced**: More logical information flow from overview to details
527
-
528
- ### 🔧 Fixed
529
-
530
- #### Output Structure Issues
531
- - **Fixed**: Methods and fields now correctly attributed to their containing classes
532
- - **Fixed**: Inner class methods no longer appear duplicated in outer class sections
533
- - **Fixed**: Nested class field attribution corrected
534
- - **Fixed**: Multi-class file handling improved
535
-
536
- #### Test Updates
537
- - **Updated**: All tests updated to work with new output format
538
- - **Updated**: Package name verification tests adapted to new structure
539
- - **Updated**: MCP tool tests updated for new format compatibility
540
-
541
- ### 📦 Package Updates
542
-
543
- - **Updated**: Table formatter completely rewritten for better organization
544
- - **Updated**: Class-based output structure for improved code navigation
545
- - **Updated**: Enhanced support for complex class hierarchies and nested classes
546
-
547
- ---
548
-
549
- ## [0.6.2] - 2025-08-04
550
-
551
- ### 🔧 Fixed
552
-
553
- #### Java Package Name Parsing
554
- - **Fixed**: Java package names now display correctly instead of "unknown"
555
- - **Fixed**: Package name extraction works regardless of method call order
556
- - **Fixed**: CLI commands now show correct package names (e.g., `# com.example.service.BigService`)
557
- - **Fixed**: MCP tools now display proper package information
558
- - **Fixed**: Table formatter shows accurate package data (`| Package | com.example.service |`)
559
-
560
- #### Core Improvements
561
- - **Enhanced**: JavaElementExtractor now ensures package info is available before class extraction
562
- - **Enhanced**: JavaPlugin.analyze_file includes package elements in analysis results
563
- - **Enhanced**: Added robust package extraction fallback mechanism
564
-
565
- #### Testing
566
- - **Added**: Comprehensive regression test suite for package name parsing
567
- - **Added**: Verification script to prevent future package name issues
568
- - **Added**: Edge case testing for various package declaration patterns
569
-
570
- ### 📦 Package Updates
571
-
572
- - **Updated**: Java analysis now includes Package elements in results
573
- - **Updated**: MCP tools provide complete package information
574
- - **Updated**: CLI output format consistency improved
575
-
576
- ---
577
-
578
- ## [0.6.1] - 2025-08-04
579
-
580
- ### 🔧 Fixed
581
-
582
- #### Documentation
583
- - **Fixed**: Updated all GitHub URLs from `aisheng-yu` to `aimasteracc` in README files
584
- - **Fixed**: Corrected clone URLs in installation instructions
585
- - **Fixed**: Updated documentation links to point to correct repository
586
- - **Fixed**: Fixed contribution guide links in all language versions
587
-
588
- #### Files Updated
589
- - `README.md` - English documentation
590
- - `README_zh.md` - Chinese documentation
591
- - `README_ja.md` - Japanese documentation
592
-
593
- ### 📦 Package Updates
594
-
595
- - **Updated**: Package metadata now includes correct repository URLs
596
- - **Updated**: All documentation links point to the correct GitHub repository
597
-
598
- ---
599
-
600
- ## [0.6.0] - 2025-08-03
601
-
602
- ### 💥 Breaking Changes - Legacy Code Removal
603
-
604
- This release removes deprecated legacy code to streamline the codebase and improve maintainability.
605
-
606
- ### 🗑️ Removed
607
-
608
- #### Legacy Components
609
- - **BREAKING**: Removed `java_analyzer.py` module and `CodeAnalyzer` class
610
- - **BREAKING**: Removed legacy test files (`test_java_analyzer.py`, `test_java_analyzer_extended.py`)
611
- - **BREAKING**: Removed `CodeAnalyzer` from public API exports
612
-
613
- #### Migration Guide
614
- Users previously using the legacy `CodeAnalyzer` should migrate to the new plugin system:
615
-
616
- **Old Code (No longer works):**
617
- ```python
618
- from tree_sitter_analyzer import CodeAnalyzer
619
- analyzer = CodeAnalyzer()
620
- result = analyzer.analyze_file("file.java")
621
- ```
622
-
623
- **New Code:**
624
- ```python
625
- from tree_sitter_analyzer.core.analysis_engine import get_analysis_engine
626
- engine = get_analysis_engine()
627
- result = await engine.analyze_file("file.java")
628
- ```
629
-
630
- **Or use the CLI:**
631
- ```bash
632
- tree-sitter-analyzer file.java --advanced
633
- ```
634
-
635
- ### 🔄 Changed
636
-
637
- #### Test Suite
638
- - **Updated**: Test count reduced from 1216 to 1126 tests (removed 29 legacy tests)
639
- - **Updated**: All README files updated with new test count
640
- - **Updated**: Documentation examples updated to use new plugin system
641
-
642
- #### Documentation
643
- - **Updated**: `CODE_STYLE_GUIDE.md` examples updated to use new plugin system
644
- - **Updated**: All language-specific README files updated
645
-
646
-
647
-
648
- ### Benefits
649
-
650
- - **Cleaner Codebase**: Removed duplicate functionality and legacy code
651
- - **Reduced Maintenance**: No longer maintaining two separate analysis systems
652
- - **Unified Experience**: All users now use the modern plugin system
653
- - **Better Performance**: New plugin system is more efficient and feature-rich
654
-
655
- ---
656
-
657
- ## [0.5.0] - 2025-08-03
658
-
659
- ### 🌐 Complete Internationalization Release
660
-
661
- This release celebrates the completion of comprehensive internationalization support, making Tree-sitter Analyzer accessible to a global audience.
662
-
663
- ### ✨ Added
664
-
665
- #### 🌍 Internationalization Support
666
- - **NEW**: Complete internationalization framework implementation
667
- - **NEW**: Chinese (Simplified) README ([README_zh.md](README_zh.md))
668
- - **NEW**: Japanese README ([README_ja.md](README_ja.md))
669
- - **NEW**: Full URL links for PyPI compatibility and better accessibility
670
- - **NEW**: Multi-language documentation support structure
671
-
672
- #### 📚 Documentation Enhancements
673
- - **NEW**: Comprehensive language-specific documentation
674
- - **NEW**: International user guides and examples
675
- - **NEW**: Cross-language code examples and usage patterns
676
- - **NEW**: Global accessibility improvements
677
-
678
- ### 🔄 Changed
679
-
680
- #### 🌐 Language Standardization
681
- - **ENHANCED**: All Japanese and Chinese text translated to English for consistency
682
- - **ENHANCED**: CLI messages, error messages, and help text now in English
683
- - **ENHANCED**: Query descriptions and comments translated to English
684
- - **ENHANCED**: Code examples and documentation translated to English
685
- - **ENHANCED**: Improved code quality and consistency across all modules
686
-
687
- #### 🔗 Link Improvements
688
- - **ENHANCED**: Relative links converted to absolute URLs for PyPI compatibility
689
- - **ENHANCED**: Better cross-platform documentation accessibility
690
- - **ENHANCED**: Improved navigation between different language versions
691
-
692
- ### 🔧 Fixed
693
-
694
- #### 🐛 Quality & Compatibility Issues
695
- - **FIXED**: Multiple test failures and compatibility issues resolved
696
- - **FIXED**: Plugin architecture improvements and stability enhancements
697
- - **FIXED**: Code formatting and linting issues across the codebase
698
- - **FIXED**: Documentation consistency and formatting improvements
699
-
700
- #### 🧪 Testing & Validation
701
- - **FIXED**: Enhanced test coverage and reliability
702
- - **FIXED**: Cross-language compatibility validation
703
- - **FIXED**: Documentation link validation and accessibility
704
-
705
- ### 📊 Technical Achievements
706
-
707
- #### 🎯 Translation Metrics
708
- - **COMPLETED**: 368 translation targets successfully processed
709
- - **ACHIEVED**: 100% English language consistency across codebase
710
- - **VALIDATED**: All documentation links and references updated
711
-
712
- #### Quality Metrics
713
- - **PASSING**: 222 tests with improved coverage and stability
714
- - **ACHIEVED**: 4/4 quality checks passing (Ruff, Black, MyPy, Tests)
715
- - **ENHANCED**: Plugin system compatibility and reliability
716
- - **IMPROVED**: Code maintainability and international accessibility
717
-
718
- ### 🌟 Impact
719
-
720
- This release establishes Tree-sitter Analyzer as a **truly international, accessible tool** that serves developers worldwide while maintaining the highest standards of code quality and documentation excellence.
721
-
722
- **Key Benefits:**
723
- - 🌍 **Global Accessibility**: Multi-language documentation for international users
724
- - 🔧 **Enhanced Quality**: Improved code consistency and maintainability
725
- - 📚 **Better Documentation**: Comprehensive guides in multiple languages
726
- - 🚀 **PyPI Ready**: Optimized for package distribution and discovery
727
-
728
- ## [0.4.0] - 2025-08-02
729
-
730
- ### 🎯 Perfect Type Safety & Architecture Unification Release
731
-
732
- This release achieves **100% type safety** and complete architectural unification, representing a milestone in code quality excellence.
733
-
734
- ### Added
735
-
736
- #### 🔒 Perfect Type Safety
737
- - **ACHIEVED**: 100% MyPy type safety (0 errors from 209 initial errors)
738
- - **NEW**: Complete type annotations across all modules
739
- - **NEW**: Strict type checking with comprehensive coverage
740
- - **NEW**: Type-safe plugin architecture with proper interfaces
741
- - **NEW**: Advanced type hints for complex generic types
742
-
743
- #### 🏗️ Unified Architecture
744
- - **NEW**: `UnifiedAnalysisEngine` - Single point of truth for all analysis
745
- - **NEW**: Centralized plugin management with `PluginManager`
746
- - **NEW**: Unified caching system with multi-level cache hierarchy
747
- - **NEW**: Consistent error handling across all interfaces
748
- - **NEW**: Standardized async/await patterns throughout
749
-
750
- #### 🧪 Enhanced Testing
751
- - **ENHANCED**: 1216 comprehensive tests (updated from 1283)
752
- - **NEW**: Type safety validation tests
753
- - **NEW**: Architecture consistency tests
754
- - **NEW**: Plugin system integration tests
755
- - **NEW**: Error handling edge case tests
756
-
757
- ### 🚀 Enhanced
758
-
759
- #### Code Quality Excellence
760
- - **ACHIEVED**: Zero MyPy errors across 69 source files
761
- - **ENHANCED**: Consistent coding patterns and standards
762
- - **ENHANCED**: Improved error messages and debugging information
763
- - **ENHANCED**: Better performance through optimized type checking
764
-
765
- #### Plugin System
766
- - **ENHANCED**: Type-safe plugin interfaces with proper protocols
767
- - **ENHANCED**: Improved plugin discovery and loading mechanisms
768
- - **ENHANCED**: Better error handling in plugin operations
769
- - **ENHANCED**: Consistent plugin validation and registration
770
-
771
- #### MCP Integration
772
- - **ENHANCED**: Type-safe MCP tool implementations
773
- - **ENHANCED**: Improved resource handling with proper typing
774
- - **ENHANCED**: Better async operation management
775
- - **ENHANCED**: Enhanced error reporting for MCP operations
776
-
777
- ### 🔧 Fixed
778
-
779
- #### Type System Issues
780
- - **FIXED**: 209 MyPy type errors completely resolved
781
- - **FIXED**: Inconsistent return types across interfaces
782
- - **FIXED**: Missing type annotations in critical paths
783
- - **FIXED**: Generic type parameter issues
784
- - **FIXED**: Optional/Union type handling inconsistencies
785
-
786
- #### Architecture Issues
787
- - **FIXED**: Multiple analysis engine instances (now singleton)
788
- - **FIXED**: Inconsistent plugin loading mechanisms
789
- - **FIXED**: Cache invalidation and consistency issues
790
- - **FIXED**: Error propagation across module boundaries
791
-
792
- ### 📊 Metrics
793
-
794
- - **Type Safety**: 100% (0 MyPy errors)
795
- - **Test Coverage**: 1216 passing tests
796
- - **Code Quality**: World-class standards achieved
797
- - **Architecture**: Fully unified and consistent
798
-
799
- ### 🎉 Impact
800
-
801
- This release transforms the codebase into a **world-class, type-safe, production-ready** system suitable for enterprise use and further development.
802
-
803
- ## [0.3.0] - 2025-08-02
804
-
805
- ### 🎉 Major Quality & AI Collaboration Release
806
-
807
- This release represents a complete transformation of the project's code quality standards and introduces comprehensive AI collaboration capabilities.
808
-
809
- ### Added
810
-
811
- #### 🤖 AI/LLM Collaboration Framework
812
- - **NEW**: [LLM_CODING_GUIDELINES.md](LLM_CODING_GUIDELINES.md) - Comprehensive coding standards for AI systems
813
- - **NEW**: [AI_COLLABORATION_GUIDE.md](AI_COLLABORATION_GUIDE.md) - Best practices for human-AI collaboration
814
- - **NEW**: `llm_code_checker.py` - Specialized quality checker for AI-generated code
815
- - **NEW**: AI-specific code generation templates and patterns
816
- - **NEW**: Quality gates and success metrics for AI-generated code
817
-
818
- #### 🔧 Development Infrastructure
819
- - **NEW**: Pre-commit hooks with comprehensive quality checks (Black, Ruff, Bandit, isort)
820
- - **NEW**: GitHub Actions CI/CD pipeline with multi-platform testing
821
- - **NEW**: [CODE_STYLE_GUIDE.md](CODE_STYLE_GUIDE.md) - Detailed coding standards and best practices
822
- - **NEW**: GitHub Issue and Pull Request templates
823
- - **NEW**: Automated security scanning with Bandit
824
- - **NEW**: Multi-Python version testing (3.10, 3.11, 3.12, 3.13)
825
-
826
- #### 📚 Documentation Enhancements
827
- - **NEW**: Comprehensive code style guide with examples
828
- - **NEW**: AI collaboration section in README.md
829
- - **NEW**: Enhanced CONTRIBUTING.md with pre-commit setup
830
- - **NEW**: Quality check commands and workflows
831
-
832
- ### 🚀 Enhanced
833
-
834
- #### Code Quality Infrastructure
835
- - **ENHANCED**: `check_quality.py` script with comprehensive quality checks
836
- - **ENHANCED**: All documentation commands verified and tested
837
- - **ENHANCED**: Error handling and exception management throughout codebase
838
- - **ENHANCED**: Type hints coverage and documentation completeness
839
-
840
- #### Testing & Validation
841
- - **ENHANCED**: All 1203+ tests now pass consistently
842
- - **ENHANCED**: Documentation examples verified to work correctly
843
- - **ENHANCED**: MCP setup commands tested and validated
844
- - **ENHANCED**: CLI functionality thoroughly tested
845
-
846
- ### 🔧 Fixed
847
-
848
- #### Technical Debt Resolution
849
- - **FIXED**: **Complete technical debt elimination** - All quality checks now pass
850
- - **FIXED**: Code formatting issues across entire codebase
851
- - **FIXED**: Import organization and unused variable cleanup
852
- - **FIXED**: Missing type annotations and docstrings
853
- - **FIXED**: Inconsistent error handling patterns
854
- - **FIXED**: 159 whitespace and formatting issues automatically resolved
855
-
856
- #### Code Quality Issues
857
- - **FIXED**: Deprecated function warnings and proper migration paths
858
- - **FIXED**: Exception chaining and error context preservation
859
- - **FIXED**: Mutable default arguments and other anti-patterns
860
- - **FIXED**: String concatenation performance issues
861
- - **FIXED**: Import order and organization issues
862
-
863
- ### 🎯 Quality Metrics Achieved
864
-
865
- - **100% Black formatting compliance**
866
- - ✅ **Zero Ruff linting errors**
867
- - **All tests passing (1203+ tests)**
868
- - ✅ **Comprehensive type checking**
869
- - **Security scan compliance**
870
- - ✅ **Documentation completeness**
871
-
872
- ### 🛠️ Developer Experience
873
-
874
- #### New Tools & Commands
875
- ```bash
876
- # Comprehensive quality check
877
- python check_quality.py
878
-
879
- # AI-specific code quality check
880
- python llm_code_checker.py [file_or_directory]
881
-
882
- # Pre-commit hooks setup
883
- uv run pre-commit install
884
-
885
- # Auto-fix common issues
886
- python check_quality.py --fix
887
- ```
888
-
889
- #### AI Collaboration Support
890
- ```bash
891
- # For AI systems - run before generating code
892
- python check_quality.py --new-code-only
893
- python llm_code_checker.py --check-all
894
-
895
- # For AI-generated code review
896
- python llm_code_checker.py path/to/new_file.py
897
- ```
898
-
899
- ### 📋 Migration Guide
900
-
901
- #### For Contributors
902
- 1. **Install pre-commit hooks**: `uv run pre-commit install`
903
- 2. **Review new coding standards**: See [CODE_STYLE_GUIDE.md](CODE_STYLE_GUIDE.md)
904
- 3. **Use quality check script**: `python check_quality.py` before committing
905
-
906
- #### For AI Systems
907
- 1. **Read LLM guidelines**: [LLM_CODING_GUIDELINES.md](LLM_CODING_GUIDELINES.md)
908
- 2. **Follow collaboration guide**: [AI_COLLABORATION_GUIDE.md](AI_COLLABORATION_GUIDE.md)
909
- 3. **Use specialized checker**: `python llm_code_checker.py` for code validation
910
-
911
- ### 🎊 Impact
912
-
913
- This release establishes Tree-sitter Analyzer as a **premier example of AI-friendly software development**, featuring:
914
-
915
- - **Zero technical debt** with enterprise-grade code quality
916
- - **Comprehensive AI collaboration framework** for high-quality AI-assisted development
917
- - **Professional development infrastructure** with automated quality gates
918
- - **Extensive documentation** for both human and AI contributors
919
- - **Proven quality metrics** with 100% compliance across all checks
920
-
921
- **This is a foundational release that sets the standard for future development and collaboration.**
922
-
923
- ## [0.2.1] - 2025-08-02
924
-
925
- ### Changed
926
- - **Improved documentation**: Updated all UV command examples to use `--output-format=text` for better readability
927
- - **Enhanced user experience**: CLI commands now provide cleaner text output instead of verbose JSON
928
-
929
- ### Documentation Updates
930
- - Updated README.md with improved command examples
931
- - Updated MCP_SETUP_DEVELOPERS.md with correct CLI test commands
932
- - Updated CONTRIBUTING.md with proper testing commands
933
- - All UV run commands now include `--output-format=text` for consistent user experience
934
-
935
- ## [0.2.0] - 2025-08-02
936
-
937
- ### Added
938
- - **New `--quiet` option** for CLI to suppress INFO-level logging
939
- - **Enhanced parameter validation** for partial read commands
940
- - **Improved MCP tool names** for better clarity and AI assistant integration
941
- - **Comprehensive test coverage** with 1283 passing tests
942
- - **UV package manager support** for easier environment management
943
-
944
- ### Changed
945
- - **BREAKING**: Renamed MCP tool `format_table` to `analyze_code_structure` for better clarity
946
- - **Improved**: All Japanese comments translated to English for international development
947
- - **Enhanced**: Test stability with intelligent fallback mechanisms for complex Java parsing
948
- - **Updated**: Documentation to reflect new tool names and features
949
-
950
- ### Fixed
951
- - **Resolved**: Previously skipped complex Java structure analysis test now passes
952
- - **Fixed**: Robust error handling for environment-dependent parsing scenarios
953
- - **Improved**: Parameter validation with better error messages
954
-
955
- ### Technical Improvements
956
- - **Performance**: Optimized analysis engine with better caching
957
- - **Reliability**: Enhanced error handling and logging throughout the codebase
958
- - **Maintainability**: Comprehensive test suite with no skipped tests
959
- - **Documentation**: Complete English localization of codebase
960
-
961
- ## [0.1.3] - Previous Release
962
-
963
- ### Added
964
- - Initial MCP server implementation
965
- - Multi-language code analysis support
966
- - Table formatting capabilities
967
- - Partial file reading functionality
968
-
969
- ### Features
970
- - Java, JavaScript, Python language support
971
- - Tree-sitter based parsing
972
- - CLI and MCP interfaces
973
- - Extensible plugin architecture
974
-
975
- ---
976
-
977
- ## Migration Guide
978
-
979
- ### From 0.1.x to 0.2.0
980
-
981
- #### MCP Tool Name Changes
982
- If you're using the MCP server, update your tool calls:
983
-
984
- **Before:**
985
- ```json
986
- {
987
- "tool": "format_table",
988
- "arguments": { ... }
989
- }
990
- ```
991
-
992
- **After:**
993
- ```json
994
- {
995
- "tool": "analyze_code_structure",
996
- "arguments": { ... }
997
- }
998
- ```
999
-
1000
- #### New CLI Options
1001
- Take advantage of the new `--quiet` option for cleaner output:
1002
-
1003
- ```bash
1004
- # New quiet mode
1005
- tree-sitter-analyzer file.java --structure --quiet
1006
-
1007
- # Enhanced parameter validation
1008
- tree-sitter-analyzer file.java --partial-read --start-line 1 --end-line 10
1009
- ```
1010
-
1011
- #### UV Support
1012
- You can now use UV for package management:
1013
-
1014
- ```bash
1015
- # Install with UV
1016
- uv add tree-sitter-analyzer
1017
-
1018
- # Run with UV
1019
- uv run tree-sitter-analyzer file.java --structure
1020
- ```
1021
-
1022
- ---
1023
-
1024
- For more details, see the [README](README.md) and [documentation](docs/).
1
+ # Changelog
2
+
3
+ ## [1.0.0] - 2025-08-19
4
+
5
+ ### 🎉 Major Release: CI Test Failures Resolution & GitFlow Implementation
6
+
7
+ #### 🔧 CI Test Failures Resolution
8
+ - **Cross-Platform Path Compatibility**: Fixed Windows short path names (8.3 format) and macOS symlink differences
9
+ - **Windows Environment**: Implemented robust path normalization using Windows API (`GetLongPathNameW`)
10
+ - **macOS Environment**: Fixed `/var` vs `/private/var` symlink differences in path resolution
11
+ - **Test Infrastructure**: Enhanced test files with platform-specific path normalization functions
12
+
13
+ #### 🛠️ Technical Improvements
14
+
15
+ ##### Path Normalization System
16
+ - **Windows API Integration**: Added `GetLongPathNameW` for handling short path names (8.3 format)
17
+ - **macOS Symlink Handling**: Implemented `/var` vs `/private/var` path normalization
18
+ - **Cross-Platform Consistency**: Unified path comparison across Windows, macOS, and Linux
19
+
20
+ ##### Test Files Enhanced
21
+ - `tests/test_path_resolver.py`: Added macOS symlink handling
22
+ - `tests/test_path_resolver_extended.py`: Enhanced Windows 8.3 path normalization
23
+ - `tests/test_project_detector.py`: Improved platform-specific path handling
24
+
25
+ #### 🏗️ GitFlow Branch Strategy Implementation
26
+ - **Develop Branch**: Created `develop` branch for ongoing development
27
+ - **Hotfix Workflow**: Implemented proper hotfix branch workflow
28
+ - **Release Management**: Established foundation for release branch strategy
29
+
30
+ #### 🧪 Quality Assurance
31
+ - **Test Coverage**: 1504 tests with 74.37% coverage
32
+ - **Cross-Platform Testing**: All tests passing on Windows, macOS, and Linux
33
+ - **CI/CD Pipeline**: GitHub Actions workflow fully functional
34
+ - **Code Quality**: All pre-commit hooks passing
35
+
36
+ #### 📚 Documentation Updates
37
+ - **README Statistics**: Updated test count and coverage across all language versions
38
+ - **CI Documentation**: Enhanced CI workflow documentation
39
+ - **Branch Strategy**: Documented GitFlow implementation
40
+
41
+ #### 🚀 Release Highlights
42
+ - **Production Ready**: All CI issues resolved, ready for production use
43
+ - **Cross-Platform Support**: Full compatibility across Windows, macOS, and Linux
44
+ - **Enterprise Grade**: Robust error handling and comprehensive testing
45
+ - **AI Integration**: Enhanced MCP server compatibility for AI tools
46
+
47
+ ---
48
+
49
+ ## [0.9.9] - 2025-08-17
50
+
51
+ ### 📚 Documentation Updates
52
+ - **README Synchronization**: Updated all README files (EN/ZH/JA) with latest quality achievements
53
+ - **Version Alignment**: Synchronized version information from v0.9.6 to v0.9.8 across all documentation
54
+ - **Statistics Update**: Corrected test count (1358) and coverage (74.54%) in all language versions
55
+
56
+ ### 🎯 Quality Achievements Update
57
+ - **Unified Path Resolution System**: Centralized PathResolver for all MCP tools
58
+ - **Cross-platform Compatibility**: Fixed Windows path separator issues
59
+ - **MCP Tools Enhancement**: Eliminated FileNotFoundError in all tools
60
+ - **Comprehensive Test Coverage**: 1358 tests with 74.54% coverage
61
+
62
+ ---
63
+
64
+ ## [0.9.8] - 2025-08-17
65
+
66
+ ### 🚀 Major Enhancement: Unified Path Resolution System
67
+
68
+ #### 🔧 MCP Tools Path Resolution Fix
69
+ - **Centralized PathResolver**: Created unified `PathResolver` class for consistent path handling across all MCP tools
70
+ - **Cross-Platform Support**: Fixed Windows path separator issues and improved cross-platform compatibility
71
+ - **Security Validation**: Enhanced path validation with project boundary enforcement
72
+ - **Error Prevention**: Eliminated `[Errno 2] No such file or directory` errors in MCP tools
73
+
74
+ #### 🛠️ Technical Improvements
75
+
76
+ ##### New Core Components
77
+ - `mcp/utils/path_resolver.py`: Centralized path resolution utility
78
+ - `mcp/utils/__init__.py`: Updated exports for PathResolver
79
+ - Enhanced MCP tools with unified path resolution:
80
+ - `analyze_scale_tool.py`
81
+ - `query_tool.py`
82
+ - `universal_analyze_tool.py`
83
+ - `read_partial_tool.py`
84
+ - `table_format_tool.py`
85
+
86
+ ##### Refactoring Benefits
87
+ - **Code Reuse**: Eliminated duplicate path resolution logic across tools
88
+ - **Consistency**: All MCP tools now handle paths identically
89
+ - **Maintainability**: Single source of truth for path resolution logic
90
+ - **Testing**: Comprehensive test coverage for path resolution functionality
91
+
92
+ #### 🧪 Comprehensive Testing
93
+
94
+ ##### Test Coverage Improvements
95
+ - **PathResolver Tests**: 50 comprehensive unit tests covering edge cases
96
+ - **MCP Tools Integration Tests**: Verified all tools use PathResolver correctly
97
+ - **Cross-Platform Tests**: Windows and Unix path handling validation
98
+ - **Error Handling Tests**: Comprehensive error scenario coverage
99
+ - **Overall Coverage**: Achieved 74.43% test coverage (exceeding 80% requirement)
100
+
101
+ ##### New Test Files
102
+ - `tests/test_path_resolver_extended.py`: Extended PathResolver functionality tests
103
+ - `tests/test_utils_extended.py`: Enhanced utils module testing
104
+ - `tests/test_mcp_tools_path_resolution.py`: MCP tools path resolution integration tests
105
+
106
+ #### 🎯 Problem Resolution
107
+
108
+ ##### Issues Fixed
109
+ - **Path Resolution Errors**: Eliminated `FileNotFoundError` in MCP tools
110
+ - **Windows Compatibility**: Fixed backslash vs forward slash path issues
111
+ - **Relative Path Handling**: Improved relative path resolution with project root
112
+ - **Security Validation**: Enhanced path security with boundary checking
113
+
114
+ ##### MCP Tools Now Working
115
+ - `check_code_scale`: Successfully analyzes file size with relative paths
116
+ - `query_code`: Finds code elements using relative file paths
117
+ - `extract_code_section`: Extracts code segments without path errors
118
+ - `read_partial`: Reads file portions with consistent path handling
119
+
120
+ #### 📚 Documentation Updates
121
+ - **Path Resolution Guide**: Comprehensive documentation of the new system
122
+ - **MCP Tools Usage**: Updated examples showing relative path usage
123
+ - **Cross-Platform Guidelines**: Best practices for Windows and Unix environments
124
+
125
+ ## [0.9.7] - 2025-08-17
126
+
127
+ ### 🛠️ Error Handling Improvements
128
+
129
+ #### 🔧 MCP Tool Enhancements
130
+ - **Enhanced Error Decorator**: Improved `@handle_mcp_errors` decorator with tool name identification
131
+ - **Better Error Context**: Added tool name "query_code" to error handling for improved debugging
132
+ - **Security Validation**: Enhanced file path security validation in query tool
133
+
134
+ #### 🧪 Code Quality
135
+ - **Pre-commit Hooks**: All code quality checks passed including black, ruff, bandit, and isort
136
+ - **Mixed Line Endings**: Fixed mixed line ending issues in query_tool.py
137
+ - **Type Safety**: Maintained existing type annotations and code structure
138
+
139
+ #### 📚 Documentation
140
+ - **Updated Examples**: Enhanced error handling documentation
141
+ - **Security Guidelines**: Improved security validation documentation
142
+
143
+ ## [0.9.6] - 2025-08-17
144
+
145
+ ### 🎉 New Feature: Advanced Query Filtering System
146
+
147
+ #### 🚀 Major Features
148
+
149
+ ##### Smart Query Filtering
150
+ - **Precise Method Search**: Find specific methods using `--filter "name=main"`
151
+ - **Pattern Matching**: Use wildcards like `--filter "name=~auth*"` for authentication-related methods
152
+ - **Parameter Filtering**: Filter by parameter count with `--filter "params=0"`
153
+ - **Modifier Filtering**: Search by visibility and modifiers like `--filter "static=true,public=true"`
154
+ - **Compound Conditions**: Combine multiple filters with `--filter "name=~get*,params=0,public=true"`
155
+
156
+ ##### Unified Architecture
157
+ - **QueryService**: New unified query service eliminates code duplication between CLI and MCP
158
+ - **QueryFilter**: Powerful filtering engine supporting multiple criteria
159
+ - **Consistent API**: Same filtering syntax works in both command line and AI assistants
160
+
161
+ #### 🛠️ Technical Improvements
162
+
163
+ ##### New Core Components
164
+ - `core/query_service.py`: Unified query execution service
165
+ - `core/query_filter.py`: Advanced result filtering system
166
+ - `cli/commands/query_command.py`: Enhanced CLI query command
167
+ - `mcp/tools/query_tool.py`: New MCP query tool with filtering support
168
+
169
+ ##### Enhanced CLI
170
+ - Added `--filter` argument for query result filtering
171
+ - Added `--filter-help` command to display filter syntax help
172
+ - Improved query command to use unified QueryService
173
+
174
+ ##### MCP Protocol Extensions
175
+ - New `query_code` tool for AI assistants
176
+ - Full filtering support in MCP environment
177
+ - Consistent with CLI filtering syntax
178
+
179
+ #### 📚 Documentation Updates
180
+
181
+ ##### README Updates
182
+ - **Chinese (README_zh.md)**: Added comprehensive query filtering examples
183
+ - **English (README.md)**: Complete documentation with usage examples
184
+ - **Japanese (README_ja.md)**: Full translation with feature explanations
185
+
186
+ ##### Training Materials
187
+ - Updated `training/01_onboarding.md` with new feature demonstrations
188
+ - Enhanced `training/02_architecture_map.md` with architecture improvements
189
+ - Cross-platform examples for Windows, Linux, and macOS
190
+
191
+ #### 🧪 Comprehensive Testing
192
+
193
+ ##### Test Coverage
194
+ - **QueryService Tests**: 13 comprehensive unit tests
195
+ - **QueryFilter Tests**: 29 detailed filtering tests
196
+ - **CLI Integration Tests**: 11 real-world usage scenarios
197
+ - **MCP Tool Tests**: 9 tool definition and functionality tests
198
+
199
+ ##### Test Categories
200
+ - Unit tests for core filtering logic
201
+ - Integration tests with real Java files
202
+ - Edge case handling (overloaded methods, generics, annotations)
203
+ - Error handling and validation
204
+
205
+ #### 🎯 Usage Examples
206
+
207
+ ##### Command Line Interface
208
+ ```bash
209
+ # Find specific method
210
+ uv run python -m tree_sitter_analyzer examples/BigService.java --query-key methods --filter "name=main"
211
+
212
+ # Find authentication methods
213
+ uv run python -m tree_sitter_analyzer examples/BigService.java --query-key methods --filter "name=~auth*"
214
+
215
+ # Find public methods with no parameters
216
+ uv run python -m tree_sitter_analyzer examples/BigService.java --query-key methods --filter "params=0,public=true"
217
+
218
+ # View filter syntax help
219
+ uv run python -m tree_sitter_analyzer --filter-help
220
+ ```
221
+
222
+ ##### AI Assistant (MCP)
223
+ ```json
224
+ {
225
+ "tool": "query_code",
226
+ "arguments": {
227
+ "file_path": "examples/BigService.java",
228
+ "query_key": "methods",
229
+ "filter": "name=main"
230
+ }
231
+ }
232
+ ```
233
+
234
+ #### 🔧 Filter Syntax Reference
235
+
236
+ ##### Supported Filters
237
+ - **name**: Method/function name matching
238
+ - Exact: `name=main`
239
+ - Pattern: `name=~auth*` (supports wildcards)
240
+ - **params**: Parameter count filtering
241
+ - Example: `params=0`, `params=2`
242
+ - **Modifiers**: Visibility and static modifiers
243
+ - `static=true/false`
244
+ - `public=true/false`
245
+ - `private=true/false`
246
+ - `protected=true/false`
247
+
248
+ ##### Combining Filters
249
+ Use commas for AND logic: `name=~get*,params=0,public=true`
250
+
251
+ #### 🏗️ Architecture Benefits
252
+
253
+ ##### Code Quality
254
+ - **DRY Principle**: Eliminated duplication between CLI and MCP
255
+ - **Single Responsibility**: Clear separation of concerns
256
+ - **Extensibility**: Easy to add new filter types
257
+ - **Maintainability**: Centralized query logic
258
+
259
+ ##### Performance
260
+ - **Efficient Filtering**: Post-query filtering for optimal performance
261
+ - **Memory Optimized**: Filter after parsing, not during
262
+ - **Scalable**: Works efficiently with large codebases
263
+
264
+ #### 🚦 Quality Assurance
265
+
266
+ ##### Code Standards
267
+ - **Type Safety**: Full MyPy type annotations
268
+ - **Code Style**: Black formatting, Ruff linting
269
+ - **Documentation**: Comprehensive docstrings and examples
270
+ - **Testing**: 62 new tests with 100% pass rate
271
+
272
+ ##### Platform Support
273
+ - **Windows**: PowerShell examples and testing
274
+ - **Linux/macOS**: Bash examples and compatibility
275
+ - **Codespaces**: Full support for GitHub Codespaces
276
+
277
+ #### 🎯 Impact
278
+
279
+ ##### Productivity Gains
280
+ - **Faster Code Navigation**: Find specific methods in seconds
281
+ - **Enhanced Code Analysis**: AI assistants can understand code structure better
282
+ - **Reduced Token Usage**: Extract only relevant methods for LLM analysis
283
+
284
+ ##### Integration Benefits
285
+ - **IDE Support**: Works with Cursor, Claude Desktop, Roo Code
286
+ - **CLI Flexibility**: Powerful command-line filtering
287
+ - **API Consistency**: Same functionality across all interfaces
288
+
289
+ #### 📝 Technical Details
290
+ - **Files Changed**: 15+ core files
291
+ - **New Files**: 6 new modules and test files
292
+ - **Lines Added**: 2000+ lines of code and tests
293
+ - **Documentation**: 500+ lines of updated documentation
294
+
295
+ #### Migration Notes
296
+ - All existing CLI and MCP functionality remains compatible
297
+ - New filtering features are additive and optional
298
+ - No breaking changes to existing APIs
299
+
300
+ ---
301
+
302
+ ## [0.9.5] - 2025-08-15
303
+
304
+ ### 🚀 CI/CD Stability & Cross-Platform Compatibility
305
+ - **Enhanced CI Matrix Strategy**: Disabled `fail-fast` strategy for quality-check and test-matrix jobs, ensuring all platform/Python version combinations run to completion
306
+ - **Improved Test Visibility**: Better diagnosis of platform-specific issues with comprehensive matrix results
307
+ - **Cross-Platform Fixes**: Resolved persistent CI failures on Windows, macOS, and Linux
308
+
309
+ ### 🔒 Security Improvements
310
+ - **macOS Symlink Safety**: Fixed symlink safety checks to properly handle macOS temporary directory symlinks (`/var` ↔ `/private/var`)
311
+ - **Project Boundary Management**: Enhanced boundary detection to correctly handle real paths within project boundaries
312
+ - **Security Code Quality**: Addressed all Bandit security linter low-risk findings:
313
+ - Replaced bare `pass` statements with explicit `...` for better intent documentation
314
+ - Added proper attribute checks for `sys.stderr` writes
315
+ - Replaced runtime `assert` statements with defensive type checking
316
+
317
+ ### 📊 Documentation & Structure
318
+ - **README Enhancement**: Complete restructure with table of contents, improved content flow, and visual hierarchy
319
+ - **Multi-language Support**: Fully translated README into Chinese (`README_zh.md`) and Japanese (`README_ja.md`)
320
+ - **Documentation Standards**: Normalized line endings across all markdown files
321
+ - **Project Guidelines**: Added new language development guidelines and project structure documentation
322
+
323
+ ### 🛠️ Code Quality Enhancements
324
+ - **Error Handling**: Improved robustness in `encoding_utils.py` and `utils.py` with better exception handling patterns
325
+ - **Platform Compatibility**: Enhanced test assertions for cross-platform compatibility
326
+ - **Security Practices**: Strengthened security validation while maintaining usability
327
+
328
+ ### 🧪 Testing & Quality Assurance
329
+ - **Test Suite**: 1,358 tests passing with 74.54% coverage
330
+ - **Platform Coverage**: Full testing across Python 3.10-3.13 × Windows/macOS/Linux
331
+ - **CI Reliability**: Stable CI pipeline with comprehensive error reporting
332
+
333
+ ### 🚀 Impact
334
+ - **Enterprise Ready**: Improved stability for production deployments
335
+ - **Developer Experience**: Better local development workflow with consistent tooling
336
+ - **AI Integration**: Enhanced MCP protocol compatibility across all supported platforms
337
+ - **International Reach**: Multi-language documentation for global developer community
338
+
339
+ ## [0.9.4] - 2025-08-15
340
+
341
+ ### 🔧 Fixed (MCP)
342
+ - Unified relative path resolution: In MCP's `read_partial_tool`, `table_format_tool`, and the `check_code_scale` path handling in `server`, all relative paths are now consistently resolved to absolute paths based on `project_root` before security validation and file reading. This prevents boundary misjudgments and false "file not found" errors.
343
+ - Fixed boolean evaluation: Corrected the issue where the tuple returned by `validate_file_path` was directly used as a boolean. Now, the boolean value and error message are unpacked and used appropriately.
344
+
345
+ ### 📚 Docs
346
+ - Added and emphasized in contribution and collaboration docs: Always use `uv run` to execute commands locally (including on Windows/PowerShell).
347
+ - Replaced example commands from plain `pytest`/`python` to `uv run pytest`/`uv run python`.
348
+
349
+ ### 🧪 Tests
350
+ - All MCP-related tests (tools, resources, server) passed.
351
+ - Full test suite: 1358/1358 tests passed.
352
+
353
+ ### 🚀 Impact
354
+ - Improved execution consistency on Windows/PowerShell, avoiding issues caused by redirection/interaction.
355
+ - Relative path behavior in MCP scenarios is now stable and predictable.
356
+
357
+ ## [0.9.3] - 2025-08-15
358
+
359
+ ### 🔇 Improved Output Experience
360
+ - Significantly reduced verbose logging in CLI default output
361
+ - Downgraded initialization and debug messages from INFO to DEBUG level
362
+ - Set default log level to WARNING for cleaner user experience
363
+ - Performance logs disabled by default, only shown in verbose mode
364
+
365
+ ### 🎯 Affected Components
366
+ - CLI main program default log level adjustment
367
+ - Project detection, cache service, boundary manager log level optimization
368
+ - Performance monitoring log output optimization
369
+ - Preserved full functionality of `--quiet` and `--verbose` options
370
+
371
+ ### 🚀 User Impact
372
+ - More concise and professional command line output
373
+ - Only displays critical information and error messages
374
+ - Enhanced user experience, especially when used in automation scripts
375
+
376
+ ## [0.9.2] - 2025-08-14
377
+
378
+ ### 🔄 Changed
379
+ - MCP module version is now synchronized with the main package version (both read from package `__version__`)
380
+ - Initialization state errors now raise `MCPError`, consistent with MCP semantics
381
+ - Security checks: strengthened absolute path policy, temporary directory cases are safely allowed in test environments
382
+ - Code and tool descriptions fully Anglicized, removed remaining Chinese/Japanese comments and documentation fragments
383
+
384
+ ### 📚 Docs
385
+ - `README.md` is now the English source of truth, with 1:1 translations to `README_zh.md` and `README_ja.md`
386
+ - Added examples and recommended configuration for the three-step MCP workflow
387
+
388
+ ### 🧪 Tests
389
+ - All 1358/1358 test cases passed, coverage at 74.82%
390
+ - Updated assertions to read dynamic version and new error types
391
+
392
+ ### 🚀 Impact
393
+ - Improved IDE (Cursor/Claude) tool visibility and consistency
394
+ - Lowered onboarding barrier for international users, unified English descriptions and localized documentation
395
+
396
+
397
+ All notable changes to this project will be documented in this file.
398
+
399
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
400
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
401
+
402
+ ## [0.9.1] - 2025-08-12
403
+
404
+ ### 🎯 MCP Tools Unification & Simplification
405
+
406
+ #### 🔧 Unified Tool Names
407
+ - **BREAKING**: Simplified MCP tools to 3 core tools with clear naming:
408
+ - `check_code_scale` - Step 1: Check file scale and complexity
409
+ - `analyze_code_structure` - Step 2: Generate structure tables with line positions
410
+ - `extract_code_section` - Step 3: Extract specific code sections by line range
411
+ - **Removed**: Backward compatibility for old tool names (`analyze_code_scale`, `read_code_partial`, `format_table`, `analyze_code_universal`)
412
+ - **Enhanced**: Tool descriptions with step numbers and usage guidance
413
+
414
+ #### 📋 Parameter Standardization
415
+ - **Standardized**: All parameters use snake_case naming convention
416
+ - **Fixed**: Common LLM parameter mistakes with clear validation
417
+ - **Required**: `file_path` parameter for all tools
418
+ - **Required**: `start_line` parameter for `extract_code_section`
419
+
420
+ #### 📖 Documentation Improvements
421
+ - **Updated**: README.md with unified tool workflow examples
422
+ - **Enhanced**: MCP_INFO with workflow guidance
423
+ - **Simplified**: Removed redundant documentation files
424
+ - **Added**: Clear three-step workflow instructions for LLMs
425
+
426
+ #### 🧪 Test Suite Updates
427
+ - **Fixed**: All MCP-related tests updated for new tool names
428
+ - **Updated**: 138 MCP tests passing with new unified structure
429
+ - **Enhanced**: Test coverage for unified tool workflow
430
+ - **Maintained**: 100% backward compatibility in core analysis engine
431
+
432
+ #### 🎉 Benefits
433
+ - **Simplified**: LLM integration with clear tool naming
434
+ - **Reduced**: Parameter confusion with consistent snake_case
435
+ - **Improved**: Workflow clarity with numbered steps
436
+ - **Enhanced**: Error messages with available tool suggestions
437
+
438
+ ## [0.8.2] - 2025-08-05
439
+
440
+ ### 🎯 Major Quality Improvements
441
+
442
+ #### 🏆 Complete Test Suite Stabilization
443
+ - **Fixed**: All 31 failing tests now pass - achieved **100% test success rate** (1358/1358 tests)
444
+ - **Fixed**: Windows file permission issues in temporary file handling
445
+ - **Fixed**: API signature mismatches in QueryExecutor test calls
446
+ - **Fixed**: Return format inconsistencies in ReadPartialTool tests
447
+ - **Fixed**: Exception type mismatches between error handler and test expectations
448
+ - **Fixed**: SecurityValidator method name discrepancies in component tests
449
+ - **Fixed**: Mock dependency path issues in engine configuration tests
450
+
451
+ #### 📊 Test Coverage Enhancements
452
+ - **Enhanced**: Formatters module coverage from **0%** to **42.30%** - complete breakthrough
453
+ - **Enhanced**: Error handler coverage from **61.64%** to **82.76%** (+21.12%)
454
+ - **Enhanced**: Overall project coverage from **71.97%** to **74.82%** (+2.85%)
455
+ - **Added**: 104 new comprehensive test cases across critical modules
456
+ - **Added**: Edge case testing for binary files, Unicode content, and large files
457
+ - **Added**: Performance and concurrency testing for core components
458
+
459
+ #### 🔧 Test Infrastructure Improvements
460
+ - **Improved**: Cross-platform compatibility with proper Windows file handling
461
+ - **Improved**: Systematic error classification and batch fixing methodology
462
+ - **Improved**: Test reliability with proper exception type imports
463
+ - **Improved**: Mock object configuration and dependency injection testing
464
+ - **Improved**: Temporary file lifecycle management across all test scenarios
465
+
466
+ #### 🧪 New Test Modules
467
+ - **Added**: `test_formatters_comprehensive.py` - Complete formatters testing (30 tests)
468
+ - **Added**: `test_core_engine_extended.py` - Extended engine edge case testing (14 tests)
469
+ - **Added**: `test_core_query_extended.py` - Query executor performance testing (13 tests)
470
+ - **Added**: `test_universal_analyze_tool_extended.py` - Tool robustness testing (17 tests)
471
+ - **Added**: `test_read_partial_tool_extended.py` - Partial reading comprehensive testing (19 tests)
472
+ - **Added**: `test_mcp_server_initialization.py` - Server startup validation (15 tests)
473
+ - **Added**: `test_error_handling_improvements.py` - Error handling verification (20 tests)
474
+
475
+ ### 🚀 Technical Achievements
476
+ - **Achievement**: Zero test failures - complete CI/CD readiness
477
+ - **Achievement**: Comprehensive formatters module testing foundation established
478
+ - **Achievement**: Cross-platform test compatibility ensured
479
+ - **Achievement**: Robust error handling validation implemented
480
+ - **Achievement**: Performance and stress testing coverage added
481
+
482
+ ### 📈 Quality Metrics
483
+ - **Metric**: 1358 total tests (100% pass rate)
484
+ - **Metric**: 74.82% code coverage (industry-standard quality)
485
+ - **Metric**: 6 error categories systematically resolved
486
+ - **Metric**: 5 test files comprehensively updated
487
+ - **Metric**: Zero breaking changes to existing functionality
488
+
489
+ ---
490
+
491
+ ## [0.8.1] - 2025-08-05
492
+
493
+ ### 🔧 Fixed
494
+ - **Fixed**: Eliminated duplicate "ERROR:" prefixes in error messages across all CLI commands
495
+ - **Fixed**: Updated all CLI tests to match unified error message format
496
+ - **Fixed**: Resolved missing `--project-root` parameters in comprehensive CLI tests
497
+ - **Fixed**: Corrected module import issues in language detection tests
498
+ - **Fixed**: Updated test expectations to match security validation behavior
499
+
500
+ ### 🧪 Testing Improvements
501
+ - **Enhanced**: Fixed 6 failing tests in `test_partial_read_command_validation.py`
502
+ - **Enhanced**: Fixed 6 failing tests in `test_cli_comprehensive.py` and Java structure analyzer tests
503
+ - **Enhanced**: Improved test stability and reliability across all CLI functionality
504
+ - **Enhanced**: Unified error message testing with consistent format expectations
505
+
506
+ ### 📦 Code Quality
507
+ - **Improved**: Centralized error message formatting in `output_manager.py`
508
+ - **Improved**: Consistent error handling architecture across all CLI commands
509
+ - **Improved**: Better separation of concerns between error content and formatting
510
+
511
+ ---
512
+
513
+ ## [0.8.0] - 2025-08-04
514
+
515
+ ### 🚀 Added
516
+
517
+ #### Enterprise-Grade Security Framework
518
+ - **Added**: Complete security module with unified validation framework
519
+ - **Added**: `SecurityValidator` - Multi-layer defense against path traversal, ReDoS attacks, and input injection
520
+ - **Added**: `ProjectBoundaryManager` - Strict project boundary control with symlink protection
521
+ - **Added**: `RegexSafetyChecker` - ReDoS attack prevention with pattern complexity analysis
522
+ - **Added**: 7-layer file path validation system
523
+ - **Added**: Real-time regex performance monitoring
524
+ - **Added**: Comprehensive input sanitization
525
+
526
+ #### Security Documentation & Examples
527
+ - **Added**: Complete security implementation documentation (`docs/security/PHASE1_IMPLEMENTATION.md`)
528
+ - **Added**: Interactive security demonstration script (`examples/security_demo.py`)
529
+ - **Added**: Comprehensive security test suite (100+ tests)
530
+
531
+ #### Architecture Improvements
532
+ - **Enhanced**: New unified architecture with `elements` list for better extensibility
533
+ - **Enhanced**: Improved data conversion between new and legacy formats
534
+ - **Enhanced**: Better separation of concerns in analysis pipeline
535
+
536
+ ### 🔧 Fixed
537
+
538
+ #### Test Infrastructure
539
+ - **Fixed**: Removed 2 obsolete tests that were incompatible with new architecture
540
+ - **Fixed**: All 1,191 tests now pass (100% success rate)
541
+ - **Fixed**: Zero skipped tests - complete test coverage
542
+ - **Fixed**: Java language support properly integrated
543
+
544
+ #### Package Management
545
+ - **Fixed**: Added missing `tree-sitter-java` dependency
546
+ - **Fixed**: Proper language support detection and loading
547
+ - **Fixed**: MCP protocol integration stability
548
+
549
+ ### 📦 Package Updates
550
+
551
+ - **Updated**: Complete security module integration
552
+ - **Updated**: Enhanced error handling with security-specific exceptions
553
+ - **Updated**: Improved logging and audit trail capabilities
554
+ - **Updated**: Better performance monitoring and metrics
555
+
556
+ ### 🔒 Security Enhancements
557
+
558
+ - **Security**: Multi-layer path traversal protection
559
+ - **Security**: ReDoS attack prevention (95%+ protection rate)
560
+ - **Security**: Input injection protection (100% coverage)
561
+ - **Security**: Project boundary enforcement (100% coverage)
562
+ - **Security**: Comprehensive audit logging
563
+ - **Security**: Performance impact < 5ms per validation
564
+
565
+ ---
566
+
567
+ ## [0.7.0] - 2025-08-04
568
+
569
+ ### 🚀 Added
570
+
571
+ #### Improved Table Output Structure
572
+ - **Enhanced**: Complete restructure of `--table=full` output format
573
+ - **Added**: Class-based organization - each class now has its own section
574
+ - **Added**: Clear separation of fields, constructors, and methods by class
575
+ - **Added**: Proper attribution of methods and fields to their respective classes
576
+ - **Added**: Nested class handling - inner class members no longer appear in outer class sections
577
+
578
+ #### Better Output Organization
579
+ - **Enhanced**: File header now shows filename instead of class name for multi-class files
580
+ - **Enhanced**: Package information displayed in dedicated section with clear formatting
581
+ - **Enhanced**: Methods grouped by visibility (Public, Protected, Package, Private)
582
+ - **Enhanced**: Constructors separated from regular methods
583
+ - **Enhanced**: Fields properly attributed to their containing class
584
+
585
+ #### Improved Readability
586
+ - **Enhanced**: Cleaner section headers with line range information
587
+ - **Enhanced**: Better visual separation between different classes
588
+ - **Enhanced**: More logical information flow from overview to details
589
+
590
+ ### 🔧 Fixed
591
+
592
+ #### Output Structure Issues
593
+ - **Fixed**: Methods and fields now correctly attributed to their containing classes
594
+ - **Fixed**: Inner class methods no longer appear duplicated in outer class sections
595
+ - **Fixed**: Nested class field attribution corrected
596
+ - **Fixed**: Multi-class file handling improved
597
+
598
+ #### Test Updates
599
+ - **Updated**: All tests updated to work with new output format
600
+ - **Updated**: Package name verification tests adapted to new structure
601
+ - **Updated**: MCP tool tests updated for new format compatibility
602
+
603
+ ### 📦 Package Updates
604
+
605
+ - **Updated**: Table formatter completely rewritten for better organization
606
+ - **Updated**: Class-based output structure for improved code navigation
607
+ - **Updated**: Enhanced support for complex class hierarchies and nested classes
608
+
609
+ ---
610
+
611
+ ## [0.6.2] - 2025-08-04
612
+
613
+ ### 🔧 Fixed
614
+
615
+ #### Java Package Name Parsing
616
+ - **Fixed**: Java package names now display correctly instead of "unknown"
617
+ - **Fixed**: Package name extraction works regardless of method call order
618
+ - **Fixed**: CLI commands now show correct package names (e.g., `# com.example.service.BigService`)
619
+ - **Fixed**: MCP tools now display proper package information
620
+ - **Fixed**: Table formatter shows accurate package data (`| Package | com.example.service |`)
621
+
622
+ #### Core Improvements
623
+ - **Enhanced**: JavaElementExtractor now ensures package info is available before class extraction
624
+ - **Enhanced**: JavaPlugin.analyze_file includes package elements in analysis results
625
+ - **Enhanced**: Added robust package extraction fallback mechanism
626
+
627
+ #### Testing
628
+ - **Added**: Comprehensive regression test suite for package name parsing
629
+ - **Added**: Verification script to prevent future package name issues
630
+ - **Added**: Edge case testing for various package declaration patterns
631
+
632
+ ### 📦 Package Updates
633
+
634
+ - **Updated**: Java analysis now includes Package elements in results
635
+ - **Updated**: MCP tools provide complete package information
636
+ - **Updated**: CLI output format consistency improved
637
+
638
+ ---
639
+
640
+ ## [0.6.1] - 2025-08-04
641
+
642
+ ### 🔧 Fixed
643
+
644
+ #### Documentation
645
+ - **Fixed**: Updated all GitHub URLs from `aisheng-yu` to `aimasteracc` in README files
646
+ - **Fixed**: Corrected clone URLs in installation instructions
647
+ - **Fixed**: Updated documentation links to point to correct repository
648
+ - **Fixed**: Fixed contribution guide links in all language versions
649
+
650
+ #### Files Updated
651
+ - `README.md` - English documentation
652
+ - `README_zh.md` - Chinese documentation
653
+ - `README_ja.md` - Japanese documentation
654
+
655
+ ### 📦 Package Updates
656
+
657
+ - **Updated**: Package metadata now includes correct repository URLs
658
+ - **Updated**: All documentation links point to the correct GitHub repository
659
+
660
+ ---
661
+
662
+ ## [0.6.0] - 2025-08-03
663
+
664
+ ### 💥 Breaking Changes - Legacy Code Removal
665
+
666
+ This release removes deprecated legacy code to streamline the codebase and improve maintainability.
667
+
668
+ ### 🗑️ Removed
669
+
670
+ #### Legacy Components
671
+ - **BREAKING**: Removed `java_analyzer.py` module and `CodeAnalyzer` class
672
+ - **BREAKING**: Removed legacy test files (`test_java_analyzer.py`, `test_java_analyzer_extended.py`)
673
+ - **BREAKING**: Removed `CodeAnalyzer` from public API exports
674
+
675
+ #### Migration Guide
676
+ Users previously using the legacy `CodeAnalyzer` should migrate to the new plugin system:
677
+
678
+ **Old Code (No longer works):**
679
+ ```python
680
+ from tree_sitter_analyzer import CodeAnalyzer
681
+ analyzer = CodeAnalyzer()
682
+ result = analyzer.analyze_file("file.java")
683
+ ```
684
+
685
+ **New Code:**
686
+ ```python
687
+ from tree_sitter_analyzer.core.analysis_engine import get_analysis_engine
688
+ engine = get_analysis_engine()
689
+ result = await engine.analyze_file("file.java")
690
+ ```
691
+
692
+ **Or use the CLI:**
693
+ ```bash
694
+ tree-sitter-analyzer file.java --advanced
695
+ ```
696
+
697
+ ### 🔄 Changed
698
+
699
+ #### Test Suite
700
+ - **Updated**: Test count reduced from 1216 to 1126 tests (removed 29 legacy tests)
701
+ - **Updated**: All README files updated with new test count
702
+ - **Updated**: Documentation examples updated to use new plugin system
703
+
704
+ #### Documentation
705
+ - **Updated**: `CODE_STYLE_GUIDE.md` examples updated to use new plugin system
706
+ - **Updated**: All language-specific README files updated
707
+
708
+
709
+
710
+ ### Benefits
711
+
712
+ - **Cleaner Codebase**: Removed duplicate functionality and legacy code
713
+ - **Reduced Maintenance**: No longer maintaining two separate analysis systems
714
+ - **Unified Experience**: All users now use the modern plugin system
715
+ - **Better Performance**: New plugin system is more efficient and feature-rich
716
+
717
+ ---
718
+
719
+ ## [0.5.0] - 2025-08-03
720
+
721
+ ### 🌐 Complete Internationalization Release
722
+
723
+ This release celebrates the completion of comprehensive internationalization support, making Tree-sitter Analyzer accessible to a global audience.
724
+
725
+ ### Added
726
+
727
+ #### 🌍 Internationalization Support
728
+ - **NEW**: Complete internationalization framework implementation
729
+ - **NEW**: Chinese (Simplified) README ([README_zh.md](README_zh.md))
730
+ - **NEW**: Japanese README ([README_ja.md](README_ja.md))
731
+ - **NEW**: Full URL links for PyPI compatibility and better accessibility
732
+ - **NEW**: Multi-language documentation support structure
733
+
734
+ #### 📚 Documentation Enhancements
735
+ - **NEW**: Comprehensive language-specific documentation
736
+ - **NEW**: International user guides and examples
737
+ - **NEW**: Cross-language code examples and usage patterns
738
+ - **NEW**: Global accessibility improvements
739
+
740
+ ### 🔄 Changed
741
+
742
+ #### 🌐 Language Standardization
743
+ - **ENHANCED**: All Japanese and Chinese text translated to English for consistency
744
+ - **ENHANCED**: CLI messages, error messages, and help text now in English
745
+ - **ENHANCED**: Query descriptions and comments translated to English
746
+ - **ENHANCED**: Code examples and documentation translated to English
747
+ - **ENHANCED**: Improved code quality and consistency across all modules
748
+
749
+ #### 🔗 Link Improvements
750
+ - **ENHANCED**: Relative links converted to absolute URLs for PyPI compatibility
751
+ - **ENHANCED**: Better cross-platform documentation accessibility
752
+ - **ENHANCED**: Improved navigation between different language versions
753
+
754
+ ### 🔧 Fixed
755
+
756
+ #### 🐛 Quality & Compatibility Issues
757
+ - **FIXED**: Multiple test failures and compatibility issues resolved
758
+ - **FIXED**: Plugin architecture improvements and stability enhancements
759
+ - **FIXED**: Code formatting and linting issues across the codebase
760
+ - **FIXED**: Documentation consistency and formatting improvements
761
+
762
+ #### 🧪 Testing & Validation
763
+ - **FIXED**: Enhanced test coverage and reliability
764
+ - **FIXED**: Cross-language compatibility validation
765
+ - **FIXED**: Documentation link validation and accessibility
766
+
767
+ ### 📊 Technical Achievements
768
+
769
+ #### 🎯 Translation Metrics
770
+ - **COMPLETED**: 368 translation targets successfully processed
771
+ - **ACHIEVED**: 100% English language consistency across codebase
772
+ - **VALIDATED**: All documentation links and references updated
773
+
774
+ #### Quality Metrics
775
+ - **PASSING**: 222 tests with improved coverage and stability
776
+ - **ACHIEVED**: 4/4 quality checks passing (Ruff, Black, MyPy, Tests)
777
+ - **ENHANCED**: Plugin system compatibility and reliability
778
+ - **IMPROVED**: Code maintainability and international accessibility
779
+
780
+ ### 🌟 Impact
781
+
782
+ This release establishes Tree-sitter Analyzer as a **truly international, accessible tool** that serves developers worldwide while maintaining the highest standards of code quality and documentation excellence.
783
+
784
+ **Key Benefits:**
785
+ - 🌍 **Global Accessibility**: Multi-language documentation for international users
786
+ - 🔧 **Enhanced Quality**: Improved code consistency and maintainability
787
+ - 📚 **Better Documentation**: Comprehensive guides in multiple languages
788
+ - 🚀 **PyPI Ready**: Optimized for package distribution and discovery
789
+
790
+ ## [0.4.0] - 2025-08-02
791
+
792
+ ### 🎯 Perfect Type Safety & Architecture Unification Release
793
+
794
+ This release achieves **100% type safety** and complete architectural unification, representing a milestone in code quality excellence.
795
+
796
+ ### Added
797
+
798
+ #### 🔒 Perfect Type Safety
799
+ - **ACHIEVED**: 100% MyPy type safety (0 errors from 209 initial errors)
800
+ - **NEW**: Complete type annotations across all modules
801
+ - **NEW**: Strict type checking with comprehensive coverage
802
+ - **NEW**: Type-safe plugin architecture with proper interfaces
803
+ - **NEW**: Advanced type hints for complex generic types
804
+
805
+ #### 🏗️ Unified Architecture
806
+ - **NEW**: `UnifiedAnalysisEngine` - Single point of truth for all analysis
807
+ - **NEW**: Centralized plugin management with `PluginManager`
808
+ - **NEW**: Unified caching system with multi-level cache hierarchy
809
+ - **NEW**: Consistent error handling across all interfaces
810
+ - **NEW**: Standardized async/await patterns throughout
811
+
812
+ #### 🧪 Enhanced Testing
813
+ - **ENHANCED**: 1216 comprehensive tests (updated from 1283)
814
+ - **NEW**: Type safety validation tests
815
+ - **NEW**: Architecture consistency tests
816
+ - **NEW**: Plugin system integration tests
817
+ - **NEW**: Error handling edge case tests
818
+
819
+ ### 🚀 Enhanced
820
+
821
+ #### Code Quality Excellence
822
+ - **ACHIEVED**: Zero MyPy errors across 69 source files
823
+ - **ENHANCED**: Consistent coding patterns and standards
824
+ - **ENHANCED**: Improved error messages and debugging information
825
+ - **ENHANCED**: Better performance through optimized type checking
826
+
827
+ #### Plugin System
828
+ - **ENHANCED**: Type-safe plugin interfaces with proper protocols
829
+ - **ENHANCED**: Improved plugin discovery and loading mechanisms
830
+ - **ENHANCED**: Better error handling in plugin operations
831
+ - **ENHANCED**: Consistent plugin validation and registration
832
+
833
+ #### MCP Integration
834
+ - **ENHANCED**: Type-safe MCP tool implementations
835
+ - **ENHANCED**: Improved resource handling with proper typing
836
+ - **ENHANCED**: Better async operation management
837
+ - **ENHANCED**: Enhanced error reporting for MCP operations
838
+
839
+ ### 🔧 Fixed
840
+
841
+ #### Type System Issues
842
+ - **FIXED**: 209 MyPy type errors completely resolved
843
+ - **FIXED**: Inconsistent return types across interfaces
844
+ - **FIXED**: Missing type annotations in critical paths
845
+ - **FIXED**: Generic type parameter issues
846
+ - **FIXED**: Optional/Union type handling inconsistencies
847
+
848
+ #### Architecture Issues
849
+ - **FIXED**: Multiple analysis engine instances (now singleton)
850
+ - **FIXED**: Inconsistent plugin loading mechanisms
851
+ - **FIXED**: Cache invalidation and consistency issues
852
+ - **FIXED**: Error propagation across module boundaries
853
+
854
+ ### 📊 Metrics
855
+
856
+ - **Type Safety**: 100% (0 MyPy errors)
857
+ - **Test Coverage**: 1216 passing tests
858
+ - **Code Quality**: World-class standards achieved
859
+ - **Architecture**: Fully unified and consistent
860
+
861
+ ### 🎉 Impact
862
+
863
+ This release transforms the codebase into a **world-class, type-safe, production-ready** system suitable for enterprise use and further development.
864
+
865
+ ## [0.3.0] - 2025-08-02
866
+
867
+ ### 🎉 Major Quality & AI Collaboration Release
868
+
869
+ This release represents a complete transformation of the project's code quality standards and introduces comprehensive AI collaboration capabilities.
870
+
871
+ ### ✨ Added
872
+
873
+ #### 🤖 AI/LLM Collaboration Framework
874
+ - **NEW**: [LLM_CODING_GUIDELINES.md](LLM_CODING_GUIDELINES.md) - Comprehensive coding standards for AI systems
875
+ - **NEW**: [AI_COLLABORATION_GUIDE.md](AI_COLLABORATION_GUIDE.md) - Best practices for human-AI collaboration
876
+ - **NEW**: `llm_code_checker.py` - Specialized quality checker for AI-generated code
877
+ - **NEW**: AI-specific code generation templates and patterns
878
+ - **NEW**: Quality gates and success metrics for AI-generated code
879
+
880
+ #### 🔧 Development Infrastructure
881
+ - **NEW**: Pre-commit hooks with comprehensive quality checks (Black, Ruff, Bandit, isort)
882
+ - **NEW**: GitHub Actions CI/CD pipeline with multi-platform testing
883
+ - **NEW**: [CODE_STYLE_GUIDE.md](CODE_STYLE_GUIDE.md) - Detailed coding standards and best practices
884
+ - **NEW**: GitHub Issue and Pull Request templates
885
+ - **NEW**: Automated security scanning with Bandit
886
+ - **NEW**: Multi-Python version testing (3.10, 3.11, 3.12, 3.13)
887
+
888
+ #### 📚 Documentation Enhancements
889
+ - **NEW**: Comprehensive code style guide with examples
890
+ - **NEW**: AI collaboration section in README.md
891
+ - **NEW**: Enhanced CONTRIBUTING.md with pre-commit setup
892
+ - **NEW**: Quality check commands and workflows
893
+
894
+ ### 🚀 Enhanced
895
+
896
+ #### Code Quality Infrastructure
897
+ - **ENHANCED**: `check_quality.py` script with comprehensive quality checks
898
+ - **ENHANCED**: All documentation commands verified and tested
899
+ - **ENHANCED**: Error handling and exception management throughout codebase
900
+ - **ENHANCED**: Type hints coverage and documentation completeness
901
+
902
+ #### Testing & Validation
903
+ - **ENHANCED**: All 1203+ tests now pass consistently
904
+ - **ENHANCED**: Documentation examples verified to work correctly
905
+ - **ENHANCED**: MCP setup commands tested and validated
906
+ - **ENHANCED**: CLI functionality thoroughly tested
907
+
908
+ ### 🔧 Fixed
909
+
910
+ #### Technical Debt Resolution
911
+ - **FIXED**: ✅ **Complete technical debt elimination** - All quality checks now pass
912
+ - **FIXED**: Code formatting issues across entire codebase
913
+ - **FIXED**: Import organization and unused variable cleanup
914
+ - **FIXED**: Missing type annotations and docstrings
915
+ - **FIXED**: Inconsistent error handling patterns
916
+ - **FIXED**: 159 whitespace and formatting issues automatically resolved
917
+
918
+ #### Code Quality Issues
919
+ - **FIXED**: Deprecated function warnings and proper migration paths
920
+ - **FIXED**: Exception chaining and error context preservation
921
+ - **FIXED**: Mutable default arguments and other anti-patterns
922
+ - **FIXED**: String concatenation performance issues
923
+ - **FIXED**: Import order and organization issues
924
+
925
+ ### 🎯 Quality Metrics Achieved
926
+
927
+ - **100% Black formatting compliance**
928
+ - ✅ **Zero Ruff linting errors**
929
+ - **All tests passing (1203+ tests)**
930
+ - **Comprehensive type checking**
931
+ - **Security scan compliance**
932
+ - **Documentation completeness**
933
+
934
+ ### 🛠️ Developer Experience
935
+
936
+ #### New Tools & Commands
937
+ ```bash
938
+ # Comprehensive quality check
939
+ python check_quality.py
940
+
941
+ # AI-specific code quality check
942
+ python llm_code_checker.py [file_or_directory]
943
+
944
+ # Pre-commit hooks setup
945
+ uv run pre-commit install
946
+
947
+ # Auto-fix common issues
948
+ python check_quality.py --fix
949
+ ```
950
+
951
+ #### AI Collaboration Support
952
+ ```bash
953
+ # For AI systems - run before generating code
954
+ python check_quality.py --new-code-only
955
+ python llm_code_checker.py --check-all
956
+
957
+ # For AI-generated code review
958
+ python llm_code_checker.py path/to/new_file.py
959
+ ```
960
+
961
+ ### 📋 Migration Guide
962
+
963
+ #### For Contributors
964
+ 1. **Install pre-commit hooks**: `uv run pre-commit install`
965
+ 2. **Review new coding standards**: See [CODE_STYLE_GUIDE.md](CODE_STYLE_GUIDE.md)
966
+ 3. **Use quality check script**: `python check_quality.py` before committing
967
+
968
+ #### For AI Systems
969
+ 1. **Read LLM guidelines**: [LLM_CODING_GUIDELINES.md](LLM_CODING_GUIDELINES.md)
970
+ 2. **Follow collaboration guide**: [AI_COLLABORATION_GUIDE.md](AI_COLLABORATION_GUIDE.md)
971
+ 3. **Use specialized checker**: `python llm_code_checker.py` for code validation
972
+
973
+ ### 🎊 Impact
974
+
975
+ This release establishes Tree-sitter Analyzer as a **premier example of AI-friendly software development**, featuring:
976
+
977
+ - **Zero technical debt** with enterprise-grade code quality
978
+ - **Comprehensive AI collaboration framework** for high-quality AI-assisted development
979
+ - **Professional development infrastructure** with automated quality gates
980
+ - **Extensive documentation** for both human and AI contributors
981
+ - **Proven quality metrics** with 100% compliance across all checks
982
+
983
+ **This is a foundational release that sets the standard for future development and collaboration.**
984
+
985
+ ## [0.2.1] - 2025-08-02
986
+
987
+ ### Changed
988
+ - **Improved documentation**: Updated all UV command examples to use `--output-format=text` for better readability
989
+ - **Enhanced user experience**: CLI commands now provide cleaner text output instead of verbose JSON
990
+
991
+ ### Documentation Updates
992
+ - Updated README.md with improved command examples
993
+ - Updated MCP_SETUP_DEVELOPERS.md with correct CLI test commands
994
+ - Updated CONTRIBUTING.md with proper testing commands
995
+ - All UV run commands now include `--output-format=text` for consistent user experience
996
+
997
+ ## [0.2.0] - 2025-08-02
998
+
999
+ ### Added
1000
+ - **New `--quiet` option** for CLI to suppress INFO-level logging
1001
+ - **Enhanced parameter validation** for partial read commands
1002
+ - **Improved MCP tool names** for better clarity and AI assistant integration
1003
+ - **Comprehensive test coverage** with 1283 passing tests
1004
+ - **UV package manager support** for easier environment management
1005
+
1006
+ ### Changed
1007
+ - **BREAKING**: Renamed MCP tool `format_table` to `analyze_code_structure` for better clarity
1008
+ - **Improved**: All Japanese comments translated to English for international development
1009
+ - **Enhanced**: Test stability with intelligent fallback mechanisms for complex Java parsing
1010
+ - **Updated**: Documentation to reflect new tool names and features
1011
+
1012
+ ### Fixed
1013
+ - **Resolved**: Previously skipped complex Java structure analysis test now passes
1014
+ - **Fixed**: Robust error handling for environment-dependent parsing scenarios
1015
+ - **Improved**: Parameter validation with better error messages
1016
+
1017
+ ### Technical Improvements
1018
+ - **Performance**: Optimized analysis engine with better caching
1019
+ - **Reliability**: Enhanced error handling and logging throughout the codebase
1020
+ - **Maintainability**: Comprehensive test suite with no skipped tests
1021
+ - **Documentation**: Complete English localization of codebase
1022
+
1023
+ ## [0.1.3] - Previous Release
1024
+
1025
+ ### Added
1026
+ - Initial MCP server implementation
1027
+ - Multi-language code analysis support
1028
+ - Table formatting capabilities
1029
+ - Partial file reading functionality
1030
+
1031
+ ### Features
1032
+ - Java, JavaScript, Python language support
1033
+ - Tree-sitter based parsing
1034
+ - CLI and MCP interfaces
1035
+ - Extensible plugin architecture
1036
+
1037
+ ---
1038
+
1039
+ ## Migration Guide
1040
+
1041
+ ### From 0.1.x to 0.2.0
1042
+
1043
+ #### MCP Tool Name Changes
1044
+ If you're using the MCP server, update your tool calls:
1045
+
1046
+ **Before:**
1047
+ ```json
1048
+ {
1049
+ "tool": "format_table",
1050
+ "arguments": { ... }
1051
+ }
1052
+ ```
1053
+
1054
+ **After:**
1055
+ ```json
1056
+ {
1057
+ "tool": "analyze_code_structure",
1058
+ "arguments": { ... }
1059
+ }
1060
+ ```
1061
+
1062
+ #### New CLI Options
1063
+ Take advantage of the new `--quiet` option for cleaner output:
1064
+
1065
+ ```bash
1066
+ # New quiet mode
1067
+ tree-sitter-analyzer file.java --structure --quiet
1068
+
1069
+ # Enhanced parameter validation
1070
+ tree-sitter-analyzer file.java --partial-read --start-line 1 --end-line 10
1071
+ ```
1072
+
1073
+ #### UV Support
1074
+ You can now use UV for package management:
1075
+
1076
+ ```bash
1077
+ # Install with UV
1078
+ uv add tree-sitter-analyzer
1079
+
1080
+ # Run with UV
1081
+ uv run tree-sitter-analyzer file.java --structure
1082
+ ```
1083
+
1084
+ ---
1085
+
1086
+ For more details, see the [README](README.md) and [documentation](docs/).