tree-sitter-analyzer 0.9.5__tar.gz → 0.9.7__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 (133) hide show
  1. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/CHANGELOG.md +177 -0
  2. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/PKG-INFO +83 -13
  3. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/README.md +82 -12
  4. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/README_ja.md +82 -12
  5. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/README_zh.md +83 -12
  6. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/pyproject.toml +1 -1
  7. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/scripts/improved_readme_updater.py +470 -464
  8. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/start_mcp_server.py +8 -2
  9. tree_sitter_analyzer-0.9.7/training/01_onboarding.md +152 -0
  10. tree_sitter_analyzer-0.9.7/training/02_architecture_map.md +93 -0
  11. tree_sitter_analyzer-0.9.7/training/03_cli_cheatsheet.md +58 -0
  12. tree_sitter_analyzer-0.9.7/training/04_mcp_cheatsheet.md +73 -0
  13. tree_sitter_analyzer-0.9.7/training/05_plugin_tutorial.md +67 -0
  14. tree_sitter_analyzer-0.9.7/training/06_quality_workflow.md +41 -0
  15. tree_sitter_analyzer-0.9.7/training/07_troubleshooting.md +39 -0
  16. tree_sitter_analyzer-0.9.7/training/08_prompt_library.md +62 -0
  17. tree_sitter_analyzer-0.9.7/training/09_tasks.md +31 -0
  18. tree_sitter_analyzer-0.9.7/training/10_glossary.md +14 -0
  19. tree_sitter_analyzer-0.9.7/training/11_takeover_plan.md +53 -0
  20. tree_sitter_analyzer-0.9.7/training/README.md +39 -0
  21. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/__init__.py +1 -1
  22. tree_sitter_analyzer-0.9.7/tree_sitter_analyzer/cli/commands/query_command.py +107 -0
  23. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/cli_main.py +21 -0
  24. tree_sitter_analyzer-0.9.7/tree_sitter_analyzer/core/query_filter.py +200 -0
  25. tree_sitter_analyzer-0.9.7/tree_sitter_analyzer/core/query_service.py +162 -0
  26. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/mcp/resources/code_file_resource.py +1 -2
  27. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/mcp/server.py +7 -1
  28. tree_sitter_analyzer-0.9.7/tree_sitter_analyzer/mcp/tools/query_tool.py +242 -0
  29. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/mcp/utils/error_handler.py +569 -569
  30. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/queries/java.py +5 -0
  31. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/uv.lock +1 -1
  32. tree_sitter_analyzer-0.9.5/tree_sitter_analyzer/cli/commands/query_command.py +0 -92
  33. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/.gitignore +0 -0
  34. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/.kiro/steering/product.md +0 -0
  35. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/.kiro/steering/structure.md +0 -0
  36. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/.kiro/steering/tech.md +0 -0
  37. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/.pre-commit-config.yaml +0 -0
  38. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/AI_COLLABORATION_GUIDE.md +0 -0
  39. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/CODE_STYLE_GUIDE.md +0 -0
  40. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/CONTRIBUTING.md +0 -0
  41. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/DEPLOYMENT_GUIDE.md +0 -0
  42. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/LANGUAGE_GUIDELINES.md +0 -0
  43. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/LLM_CODING_GUIDELINES.md +0 -0
  44. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/MCP_SETUP_DEVELOPERS.md +0 -0
  45. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/MCP_SETUP_USERS.md +0 -0
  46. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/PROJECT_ROOT_CONFIG.md +0 -0
  47. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/PYPI_RELEASE_GUIDE.md +0 -0
  48. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/build_standalone.py +0 -0
  49. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/check_quality.py +0 -0
  50. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/docs/api.md +0 -0
  51. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/examples/BigService.java +0 -0
  52. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/examples/BigService.json +0 -0
  53. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/examples/BigService.summary.json +0 -0
  54. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/examples/JavaDocTest.java +0 -0
  55. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/examples/MultiClass.java +0 -0
  56. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/examples/Sample.java +0 -0
  57. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/examples/calculate_token_comparison.py +0 -0
  58. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/examples/project_root_demo.py +0 -0
  59. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/examples/sample.py +0 -0
  60. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/examples/security_demo.py +0 -0
  61. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/examples/security_integration_demo.py +0 -0
  62. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/llm_code_checker.py +0 -0
  63. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/pypirc_example.txt +0 -0
  64. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/pytest.ini +0 -0
  65. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/scripts/readme_config.py +0 -0
  66. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/__main__.py +0 -0
  67. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/api.py +0 -0
  68. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/cli/__init__.py +0 -0
  69. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/cli/__main__.py +0 -0
  70. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/cli/commands/__init__.py +0 -0
  71. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/cli/commands/advanced_command.py +0 -0
  72. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/cli/commands/base_command.py +0 -0
  73. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/cli/commands/default_command.py +0 -0
  74. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/cli/commands/partial_read_command.py +0 -0
  75. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/cli/commands/structure_command.py +0 -0
  76. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/cli/commands/summary_command.py +0 -0
  77. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/cli/commands/table_command.py +0 -0
  78. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/cli/info_commands.py +0 -0
  79. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/core/__init__.py +0 -0
  80. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/core/analysis_engine.py +0 -0
  81. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/core/cache_service.py +0 -0
  82. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/core/engine.py +0 -0
  83. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/core/parser.py +0 -0
  84. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/core/query.py +0 -0
  85. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/encoding_utils.py +0 -0
  86. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/exceptions.py +0 -0
  87. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/file_handler.py +0 -0
  88. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/formatters/__init__.py +0 -0
  89. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/formatters/base_formatter.py +0 -0
  90. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/formatters/formatter_factory.py +0 -0
  91. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/formatters/java_formatter.py +0 -0
  92. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/formatters/python_formatter.py +0 -0
  93. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/interfaces/__init__.py +0 -0
  94. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/interfaces/cli.py +0 -0
  95. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/interfaces/cli_adapter.py +0 -0
  96. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/interfaces/mcp_adapter.py +0 -0
  97. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/interfaces/mcp_server.py +0 -0
  98. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/language_detector.py +0 -0
  99. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/language_loader.py +0 -0
  100. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/languages/__init__.py +0 -0
  101. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/languages/java_plugin.py +0 -0
  102. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/languages/javascript_plugin.py +0 -0
  103. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/languages/python_plugin.py +0 -0
  104. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/mcp/__init__.py +0 -0
  105. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/mcp/resources/__init__.py +0 -0
  106. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/mcp/resources/project_stats_resource.py +0 -0
  107. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/mcp/tools/__init__.py +0 -0
  108. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/mcp/tools/analyze_scale_tool.py +0 -0
  109. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/mcp/tools/analyze_scale_tool_cli_compatible.py +0 -0
  110. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/mcp/tools/base_tool.py +0 -0
  111. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/mcp/tools/read_partial_tool.py +0 -0
  112. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/mcp/tools/table_format_tool.py +0 -0
  113. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/mcp/tools/universal_analyze_tool.py +0 -0
  114. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/mcp/utils/__init__.py +0 -0
  115. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/models.py +0 -0
  116. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/output_manager.py +0 -0
  117. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/plugins/__init__.py +0 -0
  118. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/plugins/base.py +0 -0
  119. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/plugins/manager.py +0 -0
  120. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/project_detector.py +0 -0
  121. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/queries/__init__.py +0 -0
  122. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/queries/javascript.py +0 -0
  123. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/queries/python.py +0 -0
  124. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/queries/typescript.py +0 -0
  125. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/query_loader.py +0 -0
  126. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/security/__init__.py +0 -0
  127. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/security/boundary_manager.py +0 -0
  128. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/security/regex_checker.py +0 -0
  129. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/security/validator.py +0 -0
  130. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/table_formatter.py +0 -0
  131. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/tree_sitter_analyzer/utils.py +0 -0
  132. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/upload_interactive.py +0 -0
  133. {tree_sitter_analyzer-0.9.5 → tree_sitter_analyzer-0.9.7}/upload_to_pypi.py +0 -0
@@ -1,4 +1,181 @@
1
1
  # Changelog
2
+ ## [0.9.7] - 2025-01-17
3
+
4
+ ### 🛠️ Error Handling Improvements
5
+
6
+ #### 🔧 MCP Tool Enhancements
7
+ - **Enhanced Error Decorator**: Improved `@handle_mcp_errors` decorator with tool name identification
8
+ - **Better Error Context**: Added tool name "query_code" to error handling for improved debugging
9
+ - **Security Validation**: Enhanced file path security validation in query tool
10
+
11
+ #### 🧪 Code Quality
12
+ - **Pre-commit Hooks**: All code quality checks passed including black, ruff, bandit, and isort
13
+ - **Mixed Line Endings**: Fixed mixed line ending issues in query_tool.py
14
+ - **Type Safety**: Maintained existing type annotations and code structure
15
+
16
+ #### 📚 Documentation
17
+ - **Updated Examples**: Enhanced error handling documentation
18
+ - **Security Guidelines**: Improved security validation documentation
19
+
20
+ ## [0.9.6] - 2025-01-17
21
+
22
+ ### 🎉 New Feature: Advanced Query Filtering System
23
+
24
+ #### 🚀 Major Features
25
+
26
+ ##### Smart Query Filtering
27
+ - **Precise Method Search**: Find specific methods using `--filter "name=main"`
28
+ - **Pattern Matching**: Use wildcards like `--filter "name=~auth*"` for authentication-related methods
29
+ - **Parameter Filtering**: Filter by parameter count with `--filter "params=0"`
30
+ - **Modifier Filtering**: Search by visibility and modifiers like `--filter "static=true,public=true"`
31
+ - **Compound Conditions**: Combine multiple filters with `--filter "name=~get*,params=0,public=true"`
32
+
33
+ ##### Unified Architecture
34
+ - **QueryService**: New unified query service eliminates code duplication between CLI and MCP
35
+ - **QueryFilter**: Powerful filtering engine supporting multiple criteria
36
+ - **Consistent API**: Same filtering syntax works in both command line and AI assistants
37
+
38
+ #### 🛠️ Technical Improvements
39
+
40
+ ##### New Core Components
41
+ - `core/query_service.py`: Unified query execution service
42
+ - `core/query_filter.py`: Advanced result filtering system
43
+ - `cli/commands/query_command.py`: Enhanced CLI query command
44
+ - `mcp/tools/query_tool.py`: New MCP query tool with filtering support
45
+
46
+ ##### Enhanced CLI
47
+ - Added `--filter` argument for query result filtering
48
+ - Added `--filter-help` command to display filter syntax help
49
+ - Improved query command to use unified QueryService
50
+
51
+ ##### MCP Protocol Extensions
52
+ - New `query_code` tool for AI assistants
53
+ - Full filtering support in MCP environment
54
+ - Consistent with CLI filtering syntax
55
+
56
+ #### 📚 Documentation Updates
57
+
58
+ ##### README Updates
59
+ - **Chinese (README_zh.md)**: Added comprehensive query filtering examples
60
+ - **English (README.md)**: Complete documentation with usage examples
61
+ - **Japanese (README_ja.md)**: Full translation with feature explanations
62
+
63
+ ##### Training Materials
64
+ - Updated `training/01_onboarding.md` with new feature demonstrations
65
+ - Enhanced `training/02_architecture_map.md` with architecture improvements
66
+ - Cross-platform examples for Windows, Linux, and macOS
67
+
68
+ #### 🧪 Comprehensive Testing
69
+
70
+ ##### Test Coverage
71
+ - **QueryService Tests**: 13 comprehensive unit tests
72
+ - **QueryFilter Tests**: 29 detailed filtering tests
73
+ - **CLI Integration Tests**: 11 real-world usage scenarios
74
+ - **MCP Tool Tests**: 9 tool definition and functionality tests
75
+
76
+ ##### Test Categories
77
+ - Unit tests for core filtering logic
78
+ - Integration tests with real Java files
79
+ - Edge case handling (overloaded methods, generics, annotations)
80
+ - Error handling and validation
81
+
82
+ #### 🎯 Usage Examples
83
+
84
+ ##### Command Line Interface
85
+ ```bash
86
+ # Find specific method
87
+ uv run python -m tree_sitter_analyzer examples/BigService.java --query-key methods --filter "name=main"
88
+
89
+ # Find authentication methods
90
+ uv run python -m tree_sitter_analyzer examples/BigService.java --query-key methods --filter "name=~auth*"
91
+
92
+ # Find public methods with no parameters
93
+ uv run python -m tree_sitter_analyzer examples/BigService.java --query-key methods --filter "params=0,public=true"
94
+
95
+ # View filter syntax help
96
+ uv run python -m tree_sitter_analyzer --filter-help
97
+ ```
98
+
99
+ ##### AI Assistant (MCP)
100
+ ```json
101
+ {
102
+ "tool": "query_code",
103
+ "arguments": {
104
+ "file_path": "examples/BigService.java",
105
+ "query_key": "methods",
106
+ "filter": "name=main"
107
+ }
108
+ }
109
+ ```
110
+
111
+ #### 🔧 Filter Syntax Reference
112
+
113
+ ##### Supported Filters
114
+ - **name**: Method/function name matching
115
+ - Exact: `name=main`
116
+ - Pattern: `name=~auth*` (supports wildcards)
117
+ - **params**: Parameter count filtering
118
+ - Example: `params=0`, `params=2`
119
+ - **Modifiers**: Visibility and static modifiers
120
+ - `static=true/false`
121
+ - `public=true/false`
122
+ - `private=true/false`
123
+ - `protected=true/false`
124
+
125
+ ##### Combining Filters
126
+ Use commas for AND logic: `name=~get*,params=0,public=true`
127
+
128
+ #### 🏗️ Architecture Benefits
129
+
130
+ ##### Code Quality
131
+ - **DRY Principle**: Eliminated duplication between CLI and MCP
132
+ - **Single Responsibility**: Clear separation of concerns
133
+ - **Extensibility**: Easy to add new filter types
134
+ - **Maintainability**: Centralized query logic
135
+
136
+ ##### Performance
137
+ - **Efficient Filtering**: Post-query filtering for optimal performance
138
+ - **Memory Optimized**: Filter after parsing, not during
139
+ - **Scalable**: Works efficiently with large codebases
140
+
141
+ #### 🚦 Quality Assurance
142
+
143
+ ##### Code Standards
144
+ - **Type Safety**: Full MyPy type annotations
145
+ - **Code Style**: Black formatting, Ruff linting
146
+ - **Documentation**: Comprehensive docstrings and examples
147
+ - **Testing**: 62 new tests with 100% pass rate
148
+
149
+ ##### Platform Support
150
+ - **Windows**: PowerShell examples and testing
151
+ - **Linux/macOS**: Bash examples and compatibility
152
+ - **Codespaces**: Full support for GitHub Codespaces
153
+
154
+ #### 🎯 Impact
155
+
156
+ ##### Productivity Gains
157
+ - **Faster Code Navigation**: Find specific methods in seconds
158
+ - **Enhanced Code Analysis**: AI assistants can understand code structure better
159
+ - **Reduced Token Usage**: Extract only relevant methods for LLM analysis
160
+
161
+ ##### Integration Benefits
162
+ - **IDE Support**: Works with Cursor, Claude Desktop, Roo Code
163
+ - **CLI Flexibility**: Powerful command-line filtering
164
+ - **API Consistency**: Same functionality across all interfaces
165
+
166
+ #### 📝 Technical Details
167
+ - **Files Changed**: 15+ core files
168
+ - **New Files**: 6 new modules and test files
169
+ - **Lines Added**: 2000+ lines of code and tests
170
+ - **Documentation**: 500+ lines of updated documentation
171
+
172
+ #### ✅ Migration Notes
173
+ - All existing CLI and MCP functionality remains compatible
174
+ - New filtering features are additive and optional
175
+ - No breaking changes to existing APIs
176
+
177
+ ---
178
+
2
179
  ## [0.9.5] - 2025-01-15
3
180
 
4
181
  ### 🚀 CI/CD Stability & Cross-Platform Compatibility
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tree-sitter-analyzer
3
- Version: 0.9.5
3
+ Version: 0.9.7
4
4
  Summary: Extensible multi-language code analyzer framework using Tree-sitter with dynamic plugin architecture
5
5
  Project-URL: Homepage, https://github.com/aimasteracc/tree-sitter-analyzer
6
6
  Project-URL: Documentation, https://github.com/aimasteracc/tree-sitter-analyzer#readme
@@ -137,10 +137,11 @@ Description-Content-Type: text/markdown
137
137
 
138
138
  [![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://python.org)
139
139
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
140
- [![Tests](https://img.shields.io/badge/tests-1358%20passed-brightgreen.svg)](#quality-assurance)
141
- [![Coverage](https://img.shields.io/badge/coverage-74.19%25-green.svg)](#quality-assurance)
140
+ [![Tests](https://img.shields.io/badge/tests-1420%20passed-brightgreen.svg)](#quality-assurance)
141
+ [![Coverage](https://img.shields.io/badge/coverage-74.36%25-green.svg)](#quality-assurance)
142
142
  [![Quality](https://img.shields.io/badge/quality-enterprise%20grade-blue.svg)](#quality-assurance)
143
143
  [![PyPI](https://img.shields.io/pypi/v/tree-sitter-analyzer.svg)](https://pypi.org/project/tree-sitter-analyzer/)
144
+ [![Version](https://img.shields.io/badge/version-0.9.7-blue.svg)](https://github.com/aimasteracc/tree-sitter-analyzer/releases)
144
145
  [![GitHub Stars](https://img.shields.io/github/stars/aimasteracc/tree-sitter-analyzer.svg?style=social)](https://github.com/aimasteracc/tree-sitter-analyzer)
145
146
 
146
147
  ## 🚀 Break Through LLM Token Limits, Let AI Understand Code Files of Any Size
@@ -359,11 +360,54 @@ Parameters: {"file_path": "examples/BigService.java", "start_line": 100, "end_li
359
360
  }
360
361
  ```
361
362
 
363
+ #### 🔍 **Step 4: Smart Query Filtering (v0.9.6+)**
364
+
365
+ **Enhanced Error Handling (v0.9.7):**
366
+ - Improved `@handle_mcp_errors` decorator with tool name identification
367
+ - Better error context for debugging and troubleshooting
368
+ - Enhanced security validation for file paths
369
+
370
+ **Find specific methods:**
371
+ ```
372
+ Use MCP tool query_code to precisely find code elements
373
+ Parameters: {"file_path": "examples/BigService.java", "query_key": "methods", "filter": "name=main"}
374
+ ```
375
+
376
+ **Find authentication-related methods:**
377
+ ```
378
+ Use MCP tool query_code to find authentication methods
379
+ Parameters: {"file_path": "examples/BigService.java", "query_key": "methods", "filter": "name=~auth*"}
380
+ ```
381
+
382
+ **Find parameterless public methods:**
383
+ ```
384
+ Use MCP tool query_code to find getter methods
385
+ Parameters: {"file_path": "examples/BigService.java", "query_key": "methods", "filter": "params=0,public=true"}
386
+ ```
387
+
388
+ **Return Format:**
389
+ ```json
390
+ {
391
+ "success": true,
392
+ "results": [
393
+ {
394
+ "capture_name": "method",
395
+ "node_type": "method_declaration",
396
+ "start_line": 1385,
397
+ "end_line": 1418,
398
+ "content": "public static void main(String[] args) { ... }"
399
+ }
400
+ ],
401
+ "count": 1
402
+ }
403
+ ```
404
+
362
405
  #### 💡 **Important Notes**
363
406
  - **Parameter Format**: Use snake_case (`file_path`, `start_line`, `end_line`)
364
407
  - **Path Handling**: Relative paths auto-resolve to project root
365
408
  - **Security Protection**: Tool automatically performs project boundary checks
366
- - **Workflow**: Recommended to use in order: Step 1 → 2 → 3
409
+ - **Workflow**: Recommended to use in order: Step 1 → 2 → 4 (Query Filtering) → 3 (Precise Extraction)
410
+ - **Filter Syntax**: Supports `name=value`, `name=~pattern*`, `params=number`, `static/public/private=true/false`
367
411
 
368
412
  ### 🛠️ CLI Command Examples
369
413
 
@@ -379,6 +423,22 @@ uv run python -m tree_sitter_analyzer examples/BigService.java --partial-read --
379
423
 
380
424
  # Silent mode (display results only)
381
425
  uv run python -m tree_sitter_analyzer examples/BigService.java --table=full --quiet
426
+
427
+ # 🔍 Query filtering examples (v0.9.6+)
428
+ # Find specific methods
429
+ uv run python -m tree_sitter_analyzer examples/BigService.java --query-key methods --filter "name=main"
430
+
431
+ # Find authentication-related methods
432
+ uv run python -m tree_sitter_analyzer examples/BigService.java --query-key methods --filter "name=~auth*"
433
+
434
+ # Find parameterless public methods
435
+ uv run python -m tree_sitter_analyzer examples/BigService.java --query-key methods --filter "params=0,public=true"
436
+
437
+ # Find static methods
438
+ uv run python -m tree_sitter_analyzer examples/BigService.java --query-key methods --filter "static=true"
439
+
440
+ # View filter syntax help
441
+ uv run python -m tree_sitter_analyzer --filter-help
382
442
  ```
383
443
 
384
444
  ---
@@ -398,6 +458,15 @@ Get insights without reading complete files:
398
458
  - Include position metadata
399
459
  - Support efficient processing of large files
400
460
 
461
+ ### 🔍 **Advanced Query Filtering**
462
+ Powerful code element querying and filtering system:
463
+ - **Exact matching**: `--filter "name=main"` Find specific methods
464
+ - **Pattern matching**: `--filter "name=~auth*"` Find authentication-related methods
465
+ - **Parameter filtering**: `--filter "params=2"` Find methods with specific parameter counts
466
+ - **Modifier filtering**: `--filter "static=true,public=true"` Find static public methods
467
+ - **Compound conditions**: `--filter "name=~get*,params=0,public=true"` Combine multiple conditions
468
+ - **CLI/MCP consistency**: Same filtering syntax in command line and AI assistants
469
+
401
470
  ### 🔗 **AI Assistant Integration**
402
471
  Deep integration via MCP protocol:
403
472
  - Claude Desktop
@@ -482,16 +551,16 @@ Tree-sitter Analyzer automatically detects and protects project boundaries:
482
551
  ## 🏆 Quality Assurance
483
552
 
484
553
  ### 📊 **Quality Metrics**
485
- - **1,358 Tests** - 100% pass rate ✅
486
- - **74.54% Code Coverage** - Industry-leading level
554
+ - **1,420 Tests** - 100% pass rate ✅
555
+ - **74.36% Code Coverage** - Industry-leading level
487
556
  - **Zero Test Failures** - Complete CI/CD ready
488
557
  - **Cross-platform Compatible** - Windows, macOS, Linux
489
558
 
490
- ### ⚡ **Latest Quality Achievements (v0.9.4)**
491
- - ✅ **Test Suite Completely Stable** - Fixed all historical issues
492
- - ✅ **Formatter Module Breakthrough** - Coverage significantly improved
493
- - ✅ **Error Handling Optimization** - Enterprise-grade exception handling
494
- - ✅ **100+ New Comprehensive Tests** - Covering critical modules
559
+ ### ⚡ **Latest Quality Achievements (v0.9.6)**
560
+ - ✅ **Smart Query Filtering System** - 62 new tests all passed
561
+ - ✅ **Unified Architecture Design** - QueryService eliminates code duplication
562
+ - ✅ **CI Test Fixes** - All platforms test stable
563
+ - ✅ **Multi-language Documentation** - Complete updates in EN/ZH/JA
495
564
 
496
565
  ### ⚙️ **Running Tests**
497
566
  ```bash
@@ -507,9 +576,10 @@ uv run pytest tests/test_mcp_server_initialization.py -v
507
576
 
508
577
  ### 📈 **Coverage Highlights**
509
578
  - **Language Detector**: 98.41% (Excellent)
510
- - **CLI Main Entry**: 97.78% (Excellent)
579
+ - **CLI Main Entry**: 94.36% (Excellent)
580
+ - **Query Filtering System**: 96.06% (Excellent)
581
+ - **Query Service**: 86.25% (Good)
511
582
  - **Error Handling**: 82.76% (Good)
512
- - **Security Framework**: 78%+ (Reliable)
513
583
 
514
584
  ---
515
585
 
@@ -2,10 +2,11 @@
2
2
 
3
3
  [![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://python.org)
4
4
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
5
- [![Tests](https://img.shields.io/badge/tests-1358%20passed-brightgreen.svg)](#quality-assurance)
6
- [![Coverage](https://img.shields.io/badge/coverage-74.19%25-green.svg)](#quality-assurance)
5
+ [![Tests](https://img.shields.io/badge/tests-1420%20passed-brightgreen.svg)](#quality-assurance)
6
+ [![Coverage](https://img.shields.io/badge/coverage-74.36%25-green.svg)](#quality-assurance)
7
7
  [![Quality](https://img.shields.io/badge/quality-enterprise%20grade-blue.svg)](#quality-assurance)
8
8
  [![PyPI](https://img.shields.io/pypi/v/tree-sitter-analyzer.svg)](https://pypi.org/project/tree-sitter-analyzer/)
9
+ [![Version](https://img.shields.io/badge/version-0.9.7-blue.svg)](https://github.com/aimasteracc/tree-sitter-analyzer/releases)
9
10
  [![GitHub Stars](https://img.shields.io/github/stars/aimasteracc/tree-sitter-analyzer.svg?style=social)](https://github.com/aimasteracc/tree-sitter-analyzer)
10
11
 
11
12
  ## 🚀 Break Through LLM Token Limits, Let AI Understand Code Files of Any Size
@@ -224,11 +225,54 @@ Parameters: {"file_path": "examples/BigService.java", "start_line": 100, "end_li
224
225
  }
225
226
  ```
226
227
 
228
+ #### 🔍 **Step 4: Smart Query Filtering (v0.9.6+)**
229
+
230
+ **Enhanced Error Handling (v0.9.7):**
231
+ - Improved `@handle_mcp_errors` decorator with tool name identification
232
+ - Better error context for debugging and troubleshooting
233
+ - Enhanced security validation for file paths
234
+
235
+ **Find specific methods:**
236
+ ```
237
+ Use MCP tool query_code to precisely find code elements
238
+ Parameters: {"file_path": "examples/BigService.java", "query_key": "methods", "filter": "name=main"}
239
+ ```
240
+
241
+ **Find authentication-related methods:**
242
+ ```
243
+ Use MCP tool query_code to find authentication methods
244
+ Parameters: {"file_path": "examples/BigService.java", "query_key": "methods", "filter": "name=~auth*"}
245
+ ```
246
+
247
+ **Find parameterless public methods:**
248
+ ```
249
+ Use MCP tool query_code to find getter methods
250
+ Parameters: {"file_path": "examples/BigService.java", "query_key": "methods", "filter": "params=0,public=true"}
251
+ ```
252
+
253
+ **Return Format:**
254
+ ```json
255
+ {
256
+ "success": true,
257
+ "results": [
258
+ {
259
+ "capture_name": "method",
260
+ "node_type": "method_declaration",
261
+ "start_line": 1385,
262
+ "end_line": 1418,
263
+ "content": "public static void main(String[] args) { ... }"
264
+ }
265
+ ],
266
+ "count": 1
267
+ }
268
+ ```
269
+
227
270
  #### 💡 **Important Notes**
228
271
  - **Parameter Format**: Use snake_case (`file_path`, `start_line`, `end_line`)
229
272
  - **Path Handling**: Relative paths auto-resolve to project root
230
273
  - **Security Protection**: Tool automatically performs project boundary checks
231
- - **Workflow**: Recommended to use in order: Step 1 → 2 → 3
274
+ - **Workflow**: Recommended to use in order: Step 1 → 2 → 4 (Query Filtering) → 3 (Precise Extraction)
275
+ - **Filter Syntax**: Supports `name=value`, `name=~pattern*`, `params=number`, `static/public/private=true/false`
232
276
 
233
277
  ### 🛠️ CLI Command Examples
234
278
 
@@ -244,6 +288,22 @@ uv run python -m tree_sitter_analyzer examples/BigService.java --partial-read --
244
288
 
245
289
  # Silent mode (display results only)
246
290
  uv run python -m tree_sitter_analyzer examples/BigService.java --table=full --quiet
291
+
292
+ # 🔍 Query filtering examples (v0.9.6+)
293
+ # Find specific methods
294
+ uv run python -m tree_sitter_analyzer examples/BigService.java --query-key methods --filter "name=main"
295
+
296
+ # Find authentication-related methods
297
+ uv run python -m tree_sitter_analyzer examples/BigService.java --query-key methods --filter "name=~auth*"
298
+
299
+ # Find parameterless public methods
300
+ uv run python -m tree_sitter_analyzer examples/BigService.java --query-key methods --filter "params=0,public=true"
301
+
302
+ # Find static methods
303
+ uv run python -m tree_sitter_analyzer examples/BigService.java --query-key methods --filter "static=true"
304
+
305
+ # View filter syntax help
306
+ uv run python -m tree_sitter_analyzer --filter-help
247
307
  ```
248
308
 
249
309
  ---
@@ -263,6 +323,15 @@ Get insights without reading complete files:
263
323
  - Include position metadata
264
324
  - Support efficient processing of large files
265
325
 
326
+ ### 🔍 **Advanced Query Filtering**
327
+ Powerful code element querying and filtering system:
328
+ - **Exact matching**: `--filter "name=main"` Find specific methods
329
+ - **Pattern matching**: `--filter "name=~auth*"` Find authentication-related methods
330
+ - **Parameter filtering**: `--filter "params=2"` Find methods with specific parameter counts
331
+ - **Modifier filtering**: `--filter "static=true,public=true"` Find static public methods
332
+ - **Compound conditions**: `--filter "name=~get*,params=0,public=true"` Combine multiple conditions
333
+ - **CLI/MCP consistency**: Same filtering syntax in command line and AI assistants
334
+
266
335
  ### 🔗 **AI Assistant Integration**
267
336
  Deep integration via MCP protocol:
268
337
  - Claude Desktop
@@ -347,16 +416,16 @@ Tree-sitter Analyzer automatically detects and protects project boundaries:
347
416
  ## 🏆 Quality Assurance
348
417
 
349
418
  ### 📊 **Quality Metrics**
350
- - **1,358 Tests** - 100% pass rate ✅
351
- - **74.54% Code Coverage** - Industry-leading level
419
+ - **1,420 Tests** - 100% pass rate ✅
420
+ - **74.36% Code Coverage** - Industry-leading level
352
421
  - **Zero Test Failures** - Complete CI/CD ready
353
422
  - **Cross-platform Compatible** - Windows, macOS, Linux
354
423
 
355
- ### ⚡ **Latest Quality Achievements (v0.9.4)**
356
- - ✅ **Test Suite Completely Stable** - Fixed all historical issues
357
- - ✅ **Formatter Module Breakthrough** - Coverage significantly improved
358
- - ✅ **Error Handling Optimization** - Enterprise-grade exception handling
359
- - ✅ **100+ New Comprehensive Tests** - Covering critical modules
424
+ ### ⚡ **Latest Quality Achievements (v0.9.6)**
425
+ - ✅ **Smart Query Filtering System** - 62 new tests all passed
426
+ - ✅ **Unified Architecture Design** - QueryService eliminates code duplication
427
+ - ✅ **CI Test Fixes** - All platforms test stable
428
+ - ✅ **Multi-language Documentation** - Complete updates in EN/ZH/JA
360
429
 
361
430
  ### ⚙️ **Running Tests**
362
431
  ```bash
@@ -372,9 +441,10 @@ uv run pytest tests/test_mcp_server_initialization.py -v
372
441
 
373
442
  ### 📈 **Coverage Highlights**
374
443
  - **Language Detector**: 98.41% (Excellent)
375
- - **CLI Main Entry**: 97.78% (Excellent)
444
+ - **CLI Main Entry**: 94.36% (Excellent)
445
+ - **Query Filtering System**: 96.06% (Excellent)
446
+ - **Query Service**: 86.25% (Good)
376
447
  - **Error Handling**: 82.76% (Good)
377
- - **Security Framework**: 78%+ (Reliable)
378
448
 
379
449
  ---
380
450
 
@@ -2,10 +2,11 @@
2
2
 
3
3
  [![Pythonバージョン](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://python.org)
4
4
  [![ライセンス](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
5
- [![テスト](https://img.shields.io/badge/tests-1358%20passed-brightgreen.svg)](#品質保証)
6
- [![カバレッジ](https://img.shields.io/badge/coverage-74.19%25-green.svg)](#品質保証)
5
+ [![テスト](https://img.shields.io/badge/tests-1420%20passed-brightgreen.svg)](#品質保証)
6
+ [![カバレッジ](https://img.shields.io/badge/coverage-74.36%25-green.svg)](#品質保証)
7
7
  [![品質](https://img.shields.io/badge/quality-enterprise%20grade-blue.svg)](#品質保証)
8
8
  [![PyPI](https://img.shields.io/pypi/v/tree-sitter-analyzer.svg)](https://pypi.org/project/tree-sitter-analyzer/)
9
+ [![バージョン](https://img.shields.io/badge/version-0.9.7-blue.svg)](https://github.com/aimasteracc/tree-sitter-analyzer/releases)
9
10
  [![GitHub Stars](https://img.shields.io/github/stars/aimasteracc/tree-sitter-analyzer.svg?style=social)](https://github.com/aimasteracc/tree-sitter-analyzer)
10
11
 
11
12
  ## 🚀 LLMトークン制限を突破し、AIにあらゆるサイズのコードファイルを理解させる
@@ -224,11 +225,54 @@ MCPツールextract_code_sectionを使用して指定されたコードセクシ
224
225
  }
225
226
  ```
226
227
 
228
+ #### 🔍 **ステップ4: スマートクエリフィルタリング(v0.9.6+)**
229
+
230
+ **エラーハンドリングの強化(v0.9.7):**
231
+ - ツール名識別を追加した`@handle_mcp_errors`デコレータの改善
232
+ - デバッグとトラブルシューティングのためのより良いエラーコンテキスト
233
+ - ファイルパスのセキュリティ検証の強化
234
+
235
+ **特定のメソッドを検索:**
236
+ ```
237
+ MCPツールquery_codeを使用してコード要素を正確に検索
238
+ パラメーター: {"file_path": "examples/BigService.java", "query_key": "methods", "filter": "name=main"}
239
+ ```
240
+
241
+ **認証関連メソッドを検索:**
242
+ ```
243
+ MCPツールquery_codeを使用して認証メソッドを検索
244
+ パラメーター: {"file_path": "examples/BigService.java", "query_key": "methods", "filter": "name=~auth*"}
245
+ ```
246
+
247
+ **パラメーターなしのパブリックメソッドを検索:**
248
+ ```
249
+ MCPツールquery_codeを使用してgetterメソッドを検索
250
+ パラメーター: {"file_path": "examples/BigService.java", "query_key": "methods", "filter": "params=0,public=true"}
251
+ ```
252
+
253
+ **戻り値の形式:**
254
+ ```json
255
+ {
256
+ "success": true,
257
+ "results": [
258
+ {
259
+ "capture_name": "method",
260
+ "node_type": "method_declaration",
261
+ "start_line": 1385,
262
+ "end_line": 1418,
263
+ "content": "public static void main(String[] args) { ... }"
264
+ }
265
+ ],
266
+ "count": 1
267
+ }
268
+ ```
269
+
227
270
  #### 💡 **重要な注意事項**
228
271
  - **パラメーター形式**: スネークケースを使用(`file_path`、`start_line`、`end_line`)
229
272
  - **パス処理**: 相対パスは自動的にプロジェクトルートに解決
230
273
  - **セキュリティ保護**: ツールは自動的にプロジェクト境界チェックを実行
231
- - **ワークフロー**: 順序通りの使用を推奨:ステップ1 → 2 → 3
274
+ - **ワークフロー**: 順序通りの使用を推奨:ステップ1 → 2 → 4(クエリフィルタリング)→ 3(正確な抽出)
275
+ - **フィルター構文**: `name=値`、`name=~パターン*`、`params=数字`、`static/public/private=true/false`をサポート
232
276
 
233
277
  ### 🛠️ CLIコマンド例
234
278
 
@@ -244,6 +288,22 @@ uv run python -m tree_sitter_analyzer examples/BigService.java --partial-read --
244
288
 
245
289
  # サイレントモード(結果のみ表示)
246
290
  uv run python -m tree_sitter_analyzer examples/BigService.java --table=full --quiet
291
+
292
+ # 🔍 クエリフィルタリング例(v0.9.6+)
293
+ # 特定のメソッドを検索
294
+ uv run python -m tree_sitter_analyzer examples/BigService.java --query-key methods --filter "name=main"
295
+
296
+ # 認証関連メソッドを検索
297
+ uv run python -m tree_sitter_analyzer examples/BigService.java --query-key methods --filter "name=~auth*"
298
+
299
+ # パラメーターなしのパブリックメソッドを検索
300
+ uv run python -m tree_sitter_analyzer examples/BigService.java --query-key methods --filter "params=0,public=true"
301
+
302
+ # 静的メソッドを検索
303
+ uv run python -m tree_sitter_analyzer examples/BigService.java --query-key methods --filter "static=true"
304
+
305
+ # フィルター構文ヘルプを表示
306
+ uv run python -m tree_sitter_analyzer --filter-help
247
307
  ```
248
308
 
249
309
  ---
@@ -263,6 +323,15 @@ uv run python -m tree_sitter_analyzer examples/BigService.java --table=full --qu
263
323
  - 位置メタデータを含む
264
324
  - 大ファイルの効率的な処理をサポート
265
325
 
326
+ ### 🔍 **高度なクエリフィルタリング**
327
+ 強力なコード要素クエリとフィルタリングシステム:
328
+ - **完全一致**: `--filter "name=main"` 特定のメソッドを検索
329
+ - **パターンマッチング**: `--filter "name=~auth*"` 認証関連メソッドを検索
330
+ - **パラメーターフィルタリング**: `--filter "params=2"` 特定のパラメーター数のメソッドを検索
331
+ - **修飾子フィルタリング**: `--filter "static=true,public=true"` 静的パブリックメソッドを検索
332
+ - **複合条件**: `--filter "name=~get*,params=0,public=true"` 複数の条件を組み合わせ
333
+ - **CLI/MCP一貫性**: コマンドラインとAIアシスタントで同じフィルタリング構文
334
+
266
335
  ### 🔗 **AIアシスタント統合**
267
336
  MCPプロトコルを通じた深い統合:
268
337
  - Claude Desktop
@@ -347,16 +416,16 @@ Tree-sitter Analyzerは自動的にプロジェクト境界を検出・保護:
347
416
  ## 🏆 品質保証
348
417
 
349
418
  ### 📊 **品質メトリクス**
350
- - **1,358テスト** - 100%合格率 ✅
351
- - **74.54%コードカバレッジ** - 業界最高レベル
419
+ - **1,420テスト** - 100%合格率 ✅
420
+ - **74.36%コードカバレッジ** - 業界最高レベル
352
421
  - **ゼロテスト失敗** - 完全なCI/CD対応
353
422
  - **クロスプラットフォーム対応** - Windows、macOS、Linux
354
423
 
355
- ### ⚡ **最新の品質成果(v0.9.4)**
356
- - ✅ **テストスイート完全安定化** - すべての歴史的問題を修正
357
- - ✅ **フォーマッターモジュールブレークスルー** - カバレッジ大幅向上
358
- - ✅ **エラーハンドリング最適化** - エンタープライズグレードの例外処理
359
- - ✅ **100+新総合テスト** - 重要なモジュールをカバー
424
+ ### ⚡ **最新の品質成果(v0.9.6)**
425
+ - ✅ **スマートクエリフィルタリングシステム** - 62の新しいテストすべて合格
426
+ - ✅ **統合アーキテクチャ設計** - QueryServiceによるコード重複の排除
427
+ - ✅ **CIテスト修正** - すべてのプラットフォームでテスト安定化
428
+ - ✅ **多言語ドキュメンテーション** - 中英日三言語の完全更新
360
429
 
361
430
  ### ⚙️ **テスト実行**
362
431
  ```bash
@@ -372,9 +441,10 @@ uv run pytest tests/test_mcp_server_initialization.py -v
372
441
 
373
442
  ### 📈 **カバレッジハイライト**
374
443
  - **言語検出器**: 98.41%(優秀)
375
- - **CLIメインエントリ**: 97.78%(優秀)
444
+ - **CLIメインエントリ**: 94.36%(優秀)
445
+ - **クエリフィルタリングシステム**: 96.06%(優秀)
446
+ - **クエリサービス**: 86.25%(良好)
376
447
  - **エラーハンドリング**: 82.76%(良好)
377
- - **セキュリティフレームワーク**: 78%+(信頼性)
378
448
 
379
449
  ---
380
450