tree-sitter-analyzer 1.7.2__tar.gz → 1.7.4__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.
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/.roo/rules/ROO_RULES.md +228 -5
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/CHANGELOG.md +73 -0
- tree_sitter_analyzer-1.7.4/GITFLOW.md +324 -0
- tree_sitter_analyzer-1.7.4/GITFLOW_ja.md +338 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/GITFLOW_zh.md +68 -22
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/PKG-INFO +45 -20
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/README.md +37 -18
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/README_ja.md +37 -18
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/README_zh.md +37 -18
- tree_sitter_analyzer-1.7.4/coverage.json +1 -0
- tree_sitter_analyzer-1.7.4/examples/test_markdown.md +160 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/pyproject.toml +10 -3
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/__init__.py +1 -1
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/cli/commands/advanced_command.py +52 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/cli/commands/structure_command.py +50 -1
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/cli/commands/summary_command.py +49 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/cli/commands/table_command.py +48 -0
- tree_sitter_analyzer-1.7.4/tree_sitter_analyzer/core/query_service.py +312 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/formatters/base_formatter.py +29 -2
- tree_sitter_analyzer-1.7.4/tree_sitter_analyzer/formatters/language_formatter_factory.py +83 -0
- tree_sitter_analyzer-1.7.4/tree_sitter_analyzer/formatters/markdown_formatter.py +557 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/language_detector.py +30 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/language_loader.py +1 -0
- tree_sitter_analyzer-1.7.4/tree_sitter_analyzer/languages/markdown_plugin.py +1673 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/languages/python_plugin.py +75 -16
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/server.py +5 -74
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/tools/analyze_scale_tool.py +8 -18
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/tools/find_and_grep_tool.py +1 -1
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/tools/list_files_tool.py +1 -1
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/tools/query_tool.py +86 -3
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/tools/read_partial_tool.py +91 -23
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/tools/search_content_tool.py +1 -1
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/tools/table_format_tool.py +7 -17
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/queries/javascript.py +20 -0
- tree_sitter_analyzer-1.7.4/tree_sitter_analyzer/queries/markdown.py +379 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/queries/typescript.py +22 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/query_loader.py +1 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/uv.lock +70 -35
- tree_sitter_analyzer-1.7.2/GITFLOW.md +0 -480
- tree_sitter_analyzer-1.7.2/GITFLOW_ja.md +0 -292
- tree_sitter_analyzer-1.7.2/coverage.json +0 -1
- tree_sitter_analyzer-1.7.2/tree_sitter_analyzer/core/query_service.py +0 -162
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/.gitattributes +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/.gitignore +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/.kiro/steering/product.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/.kiro/steering/structure.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/.kiro/steering/tech.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/.pre-commit-config.yaml +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/.pre-commit-hooks.yaml +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/AI_COLLABORATION_GUIDE.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/CODE_STYLE_GUIDE.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/CONTRIBUTING.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/DEPLOYMENT_GUIDE.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/FILE_OUTPUT_FEATURE_SUMMARY.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/LANGUAGE_GUIDELINES.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/LLM_CODING_GUIDELINES.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/MCP_SETUP_DEVELOPERS.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/MCP_SETUP_USERS.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/PROJECT_ROOT_CONFIG.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/PYPI_RELEASE_GUIDE.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/PYTHON_SUPPORT_SUMMARY.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/REFACTORING_SUMMARY.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/build_standalone.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/check_quality.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/docs/GITFLOW_BEST_PRACTICES.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/docs/RELEASE_EXECUTION_GUIDE.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/docs/api.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/docs/mcp_fd_rg_design.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/BigService.java +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/BigService.json +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/BigService.summary.json +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/ComprehensiveTypeScript.ts +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/JavaDocTest.java +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/ModernJavaScript.js +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/MultiClass.java +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/ReactComponent.jsx +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/ReactTypeScriptComponent.tsx +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/Sample.java +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/TypeScriptDeclarations.d.ts +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/cache_demo.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/calculate_token_comparison.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/file_output_demo.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/javascript_analysis_demo.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/project_root_demo.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/sample.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/security_demo.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/security_integration_demo.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/smart_cache_demo.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/suppress_output_demo.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/examples/total_only_optimization_demo.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/llm_code_checker.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/pypirc_example.txt +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/pytest.ini +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/scripts/README.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/scripts/gitflow_helper.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/scripts/gitflow_release_automation.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/scripts/sync_version.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/scripts/sync_version_minimal.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/start_mcp_server.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/test_python_support.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/training/01_onboarding.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/training/02_architecture_map.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/training/03_cli_cheatsheet.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/training/04_mcp_cheatsheet.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/training/05_plugin_tutorial.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/training/06_quality_workflow.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/training/07_troubleshooting.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/training/08_prompt_library.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/training/09_tasks.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/training/10_glossary.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/training/11_takeover_plan.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/training/CLI_COMMAND_CORRECTIONS.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/training/IMPROVEMENT_SUMMARY.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/training/README.md +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/__main__.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/api.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/cli/__init__.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/cli/__main__.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/cli/commands/__init__.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/cli/commands/base_command.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/cli/commands/default_command.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/cli/commands/find_and_grep_cli.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/cli/commands/list_files_cli.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/cli/commands/partial_read_command.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/cli/commands/query_command.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/cli/commands/search_content_cli.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/cli/info_commands.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/cli_main.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/constants.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/core/__init__.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/core/analysis_engine.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/core/cache_service.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/core/engine.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/core/parser.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/core/query.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/core/query_filter.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/encoding_utils.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/exceptions.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/file_handler.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/formatters/__init__.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/formatters/formatter_factory.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/formatters/java_formatter.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/formatters/javascript_formatter.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/formatters/python_formatter.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/formatters/typescript_formatter.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/interfaces/__init__.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/interfaces/cli.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/interfaces/cli_adapter.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/interfaces/mcp_adapter.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/interfaces/mcp_server.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/languages/__init__.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/languages/java_plugin.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/languages/javascript_plugin.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/languages/typescript_plugin.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/__init__.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/resources/__init__.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/resources/code_file_resource.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/resources/project_stats_resource.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/tools/__init__.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/tools/analyze_scale_tool_cli_compatible.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/tools/base_tool.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/tools/fd_rg_utils.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/tools/universal_analyze_tool.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/utils/__init__.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/utils/error_handler.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/utils/file_output_manager.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/utils/gitignore_detector.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/utils/path_resolver.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/mcp/utils/search_cache.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/models.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/output_manager.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/plugins/__init__.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/plugins/base.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/plugins/manager.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/project_detector.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/queries/__init__.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/queries/java.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/queries/python.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/security/__init__.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/security/boundary_manager.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/security/regex_checker.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/security/validator.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/table_formatter.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/tree_sitter_analyzer/utils.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/upload_interactive.py +0 -0
- {tree_sitter_analyzer-1.7.2 → tree_sitter_analyzer-1.7.4}/upload_to_pypi.py +0 -0
|
@@ -54,8 +54,11 @@ use_mcp_tool:
|
|
|
54
54
|
|
|
55
55
|
##### コード読取用ツール
|
|
56
56
|
- `analyze_code_structure`: 全体構造の把握
|
|
57
|
+
- `suppress_output + output_file`でトークン節約対応
|
|
57
58
|
- `extract_code_section`: 特定行範囲の抽出
|
|
59
|
+
- `suppress_output + output_file`でトークン節約対応
|
|
58
60
|
- `query_code`: 特定要素の検索(関数、クラス等)
|
|
61
|
+
- `suppress_output + output_file`でトークン節約対応
|
|
59
62
|
|
|
60
63
|
##### ファイル検索用ツール
|
|
61
64
|
- `list_files`: ファイル一覧取得(fd使用)
|
|
@@ -730,8 +733,8 @@ use_mcp_tool:
|
|
|
730
733
|
tool_name: find_and_grep
|
|
731
734
|
arguments:
|
|
732
735
|
roots: ["."]
|
|
733
|
-
pattern: "*
|
|
734
|
-
query: "
|
|
736
|
+
pattern: "*XXXX060*"
|
|
737
|
+
query: "项目名|lblKoumokuName"
|
|
735
738
|
# → 大量の出力でトークン消費
|
|
736
739
|
|
|
737
740
|
# 新しい解決策: ファイル出力でトークン節約
|
|
@@ -740,8 +743,8 @@ use_mcp_tool:
|
|
|
740
743
|
tool_name: find_and_grep
|
|
741
744
|
arguments:
|
|
742
745
|
roots: ["."]
|
|
743
|
-
pattern: "*
|
|
744
|
-
query: "
|
|
746
|
+
pattern: "*XXXX060*"
|
|
747
|
+
query: "项目名|lblKoumokuName"
|
|
745
748
|
case: "insensitive"
|
|
746
749
|
group_by_file: true
|
|
747
750
|
suppress_output: true
|
|
@@ -812,6 +815,225 @@ use_mcp_tool:
|
|
|
812
815
|
output_file: "controller_analysis.json" # ファイル保存
|
|
813
816
|
```
|
|
814
817
|
|
|
818
|
+
### 16. 新機能: コード読取ツールでのファイル出力最適化
|
|
819
|
+
|
|
820
|
+
#### 16.1 対応ツール
|
|
821
|
+
- [`extract_code_section`](tree_sitter_analyzer/mcp/tools/read_partial_tool.py): 特定行範囲の抽出
|
|
822
|
+
- [`query_code`](tree_sitter_analyzer/mcp/tools/query_tool.py): tree-sitterクエリによる要素抽出
|
|
823
|
+
|
|
824
|
+
#### 16.2 新パラメータ
|
|
825
|
+
- `output_file`: 結果をファイルに保存(拡張子自動検出)
|
|
826
|
+
- `suppress_output`: `output_file`指定時に詳細出力を抑制してトークン節約
|
|
827
|
+
|
|
828
|
+
#### 16.3 推奨使用パターン
|
|
829
|
+
|
|
830
|
+
##### 16.3.1 大きなコードセクションの抽出
|
|
831
|
+
```markdown
|
|
832
|
+
# 従来の問題: 大きなコードセクションでトークン消費
|
|
833
|
+
use_mcp_tool:
|
|
834
|
+
server_name: tree-sitter-analyzer
|
|
835
|
+
tool_name: extract_code_section
|
|
836
|
+
arguments:
|
|
837
|
+
file_path: "src/large_file.py"
|
|
838
|
+
start_line: 100
|
|
839
|
+
end_line: 500
|
|
840
|
+
# → 大量のコード出力でトークン消費
|
|
841
|
+
|
|
842
|
+
# 新しい解決策: ファイル出力でトークン節約
|
|
843
|
+
use_mcp_tool:
|
|
844
|
+
server_name: tree-sitter-analyzer
|
|
845
|
+
tool_name: extract_code_section
|
|
846
|
+
arguments:
|
|
847
|
+
file_path: "src/large_file.py"
|
|
848
|
+
start_line: 100
|
|
849
|
+
end_line: 500
|
|
850
|
+
suppress_output: true
|
|
851
|
+
output_file: "code_section_extract"
|
|
852
|
+
|
|
853
|
+
# 後で詳細を確認
|
|
854
|
+
read_file:
|
|
855
|
+
path: "code_section_extract.txt"
|
|
856
|
+
```
|
|
857
|
+
|
|
858
|
+
##### 16.3.2 大量のクエリ結果の処理
|
|
859
|
+
```markdown
|
|
860
|
+
# 従来の問題: 大量のクエリ結果でトークン消費
|
|
861
|
+
use_mcp_tool:
|
|
862
|
+
server_name: tree-sitter-analyzer
|
|
863
|
+
tool_name: query_code
|
|
864
|
+
arguments:
|
|
865
|
+
file_path: "src/complex_file.java"
|
|
866
|
+
query_key: "methods"
|
|
867
|
+
output_format: "json"
|
|
868
|
+
# → 大量のメソッド情報でトークン消費
|
|
869
|
+
|
|
870
|
+
# 新しい解決策: ファイル出力でトークン節約
|
|
871
|
+
use_mcp_tool:
|
|
872
|
+
server_name: tree-sitter-analyzer
|
|
873
|
+
tool_name: query_code
|
|
874
|
+
arguments:
|
|
875
|
+
file_path: "src/complex_file.java"
|
|
876
|
+
query_key: "methods"
|
|
877
|
+
output_format: "json"
|
|
878
|
+
suppress_output: true
|
|
879
|
+
output_file: "methods_analysis"
|
|
880
|
+
|
|
881
|
+
# 後で詳細を確認
|
|
882
|
+
read_file:
|
|
883
|
+
path: "methods_analysis.json"
|
|
884
|
+
```
|
|
885
|
+
|
|
886
|
+
##### 16.3.3 段階的コード解析戦略(更新版)
|
|
887
|
+
```markdown
|
|
888
|
+
# ステップ1: 全体構造把握(トークン節約)
|
|
889
|
+
use_mcp_tool:
|
|
890
|
+
server_name: tree-sitter-analyzer
|
|
891
|
+
tool_name: analyze_code_structure
|
|
892
|
+
arguments:
|
|
893
|
+
file_path: "src/target_file.py"
|
|
894
|
+
format_type: "compact"
|
|
895
|
+
suppress_output: true
|
|
896
|
+
output_file: "structure_overview"
|
|
897
|
+
|
|
898
|
+
# ステップ2: 特定要素の詳細抽出(トークン節約)
|
|
899
|
+
use_mcp_tool:
|
|
900
|
+
server_name: tree-sitter-analyzer
|
|
901
|
+
tool_name: query_code
|
|
902
|
+
arguments:
|
|
903
|
+
file_path: "src/target_file.py"
|
|
904
|
+
query_key: "functions"
|
|
905
|
+
output_format: "summary"
|
|
906
|
+
suppress_output: true
|
|
907
|
+
output_file: "functions_summary"
|
|
908
|
+
|
|
909
|
+
# ステップ3: 興味のある部分の詳細取得(トークン節約)
|
|
910
|
+
use_mcp_tool:
|
|
911
|
+
server_name: tree-sitter-analyzer
|
|
912
|
+
tool_name: extract_code_section
|
|
913
|
+
arguments:
|
|
914
|
+
file_path: "src/target_file.py"
|
|
915
|
+
start_line: 45
|
|
916
|
+
end_line: 80
|
|
917
|
+
suppress_output: true
|
|
918
|
+
output_file: "detailed_section"
|
|
919
|
+
|
|
920
|
+
# ステップ4: 結果の段階的確認
|
|
921
|
+
read_file:
|
|
922
|
+
path: "structure_overview.md"
|
|
923
|
+
read_file:
|
|
924
|
+
path: "functions_summary.json"
|
|
925
|
+
read_file:
|
|
926
|
+
path: "detailed_section.txt"
|
|
927
|
+
```
|
|
928
|
+
|
|
929
|
+
#### 16.4 ファイル形式の自動選択
|
|
930
|
+
- **extract_code_section**: テキスト形式(.txt)で保存
|
|
931
|
+
- **query_code**: JSON形式(.json)で保存(output_format="json"の場合)
|
|
932
|
+
- **query_code**: JSON形式(.json)で保存(output_format="summary"の場合)
|
|
933
|
+
- 拡張子は内容に基づいて自動決定
|
|
934
|
+
|
|
935
|
+
#### 16.5 実践的な使用例
|
|
936
|
+
|
|
937
|
+
##### 16.5.1 大規模ファイルの段階的解析
|
|
938
|
+
```markdown
|
|
939
|
+
# ステップ1: ファイルサイズ確認
|
|
940
|
+
use_mcp_tool:
|
|
941
|
+
server_name: tree-sitter-analyzer
|
|
942
|
+
tool_name: check_code_scale
|
|
943
|
+
arguments:
|
|
944
|
+
file_path: "src/huge_service.java"
|
|
945
|
+
|
|
946
|
+
# ステップ2: 構造概要取得(大規模ファイル対応)
|
|
947
|
+
use_mcp_tool:
|
|
948
|
+
server_name: tree-sitter-analyzer
|
|
949
|
+
tool_name: analyze_code_structure
|
|
950
|
+
arguments:
|
|
951
|
+
file_path: "src/huge_service.java"
|
|
952
|
+
format_type: "compact"
|
|
953
|
+
suppress_output: true
|
|
954
|
+
output_file: "huge_service_structure"
|
|
955
|
+
|
|
956
|
+
# ステップ3: 特定メソッドの検索(トークン節約)
|
|
957
|
+
use_mcp_tool:
|
|
958
|
+
server_name: tree-sitter-analyzer
|
|
959
|
+
tool_name: query_code
|
|
960
|
+
arguments:
|
|
961
|
+
file_path: "src/huge_service.java"
|
|
962
|
+
query_key: "methods"
|
|
963
|
+
filter: "name=~process*"
|
|
964
|
+
suppress_output: true
|
|
965
|
+
output_file: "process_methods"
|
|
966
|
+
|
|
967
|
+
# ステップ4: 興味のあるメソッドの詳細抽出
|
|
968
|
+
use_mcp_tool:
|
|
969
|
+
server_name: tree-sitter-analyzer
|
|
970
|
+
tool_name: extract_code_section
|
|
971
|
+
arguments:
|
|
972
|
+
file_path: "src/huge_service.java"
|
|
973
|
+
start_line: 150
|
|
974
|
+
end_line: 200
|
|
975
|
+
suppress_output: true
|
|
976
|
+
output_file: "target_method_detail"
|
|
977
|
+
```
|
|
978
|
+
|
|
979
|
+
##### 16.5.2 複数ファイルの効率的解析
|
|
980
|
+
```markdown
|
|
981
|
+
# 複数ファイルを順次解析(各ファイルでトークン節約)
|
|
982
|
+
files=["controller.py", "service.py", "model.py"]
|
|
983
|
+
|
|
984
|
+
for file in files:
|
|
985
|
+
# 構造解析
|
|
986
|
+
use_mcp_tool:
|
|
987
|
+
server_name: tree-sitter-analyzer
|
|
988
|
+
tool_name: analyze_code_structure
|
|
989
|
+
arguments:
|
|
990
|
+
file_path: f"src/{file}"
|
|
991
|
+
format_type: "compact"
|
|
992
|
+
suppress_output: true
|
|
993
|
+
output_file: f"{file}_structure"
|
|
994
|
+
|
|
995
|
+
# 関数抽出
|
|
996
|
+
use_mcp_tool:
|
|
997
|
+
server_name: tree-sitter-analyzer
|
|
998
|
+
tool_name: query_code
|
|
999
|
+
arguments:
|
|
1000
|
+
file_path: f"src/{file}"
|
|
1001
|
+
query_key: "functions"
|
|
1002
|
+
output_format: "summary"
|
|
1003
|
+
suppress_output: true
|
|
1004
|
+
output_file: f"{file}_functions"
|
|
1005
|
+
|
|
1006
|
+
# 結果の一括確認
|
|
1007
|
+
for file in files:
|
|
1008
|
+
read_file:
|
|
1009
|
+
path: f"{file}_structure.md"
|
|
1010
|
+
read_file:
|
|
1011
|
+
path: f"{file}_functions.json"
|
|
1012
|
+
```
|
|
1013
|
+
|
|
1014
|
+
#### 16.6 トークン最適化のベストプラクティス
|
|
1015
|
+
|
|
1016
|
+
##### 16.6.1 適切なツール選択
|
|
1017
|
+
```markdown
|
|
1018
|
+
# 用途別の最適なツール選択
|
|
1019
|
+
1. 全体構造把握: analyze_code_structure (suppress_output: true)
|
|
1020
|
+
2. 特定要素検索: query_code (suppress_output: true)
|
|
1021
|
+
3. 詳細コード確認: extract_code_section (suppress_output: true)
|
|
1022
|
+
4. 後続処理: read_file で保存されたファイルを読取
|
|
1023
|
+
```
|
|
1024
|
+
|
|
1025
|
+
##### 16.6.2 段階的詳細化戦略
|
|
1026
|
+
```markdown
|
|
1027
|
+
# レベル1: 概要のみ(最小トークン)
|
|
1028
|
+
suppress_output: true + output_file
|
|
1029
|
+
|
|
1030
|
+
# レベル2: 必要に応じて保存ファイル読取
|
|
1031
|
+
read_file: 保存されたファイル
|
|
1032
|
+
|
|
1033
|
+
# レベル3: さらに詳細が必要な場合のみ追加抽出
|
|
1034
|
+
extract_code_section: 特定行範囲
|
|
1035
|
+
```
|
|
1036
|
+
|
|
815
1037
|
## まとめ
|
|
816
1038
|
|
|
817
1039
|
ROOはtree-sitter-analyzer MCPツールを最大限活用し、効率的で安全なコード解析・編集を実現する。標準ツールよりもMCPツールを優先し、トークン効率化と構造化された解析を重視する。
|
|
@@ -823,4 +1045,5 @@ ROOはtree-sitter-analyzer MCPツールを最大限活用し、効率的で安
|
|
|
823
1045
|
4. **適切なツール選択**: 目的に応じた最適なMCPツール使用
|
|
824
1046
|
5. **セキュリティ重視**: プロジェクト境界内での安全な操作
|
|
825
1047
|
6. **日本語検索対策**: 汎用語での無制限検索を避け、段階的アプローチを採用
|
|
826
|
-
7. **NEW: 検索最適化**: `find_and_grep`と`search_content`でのファイル出力機能活用
|
|
1048
|
+
7. **NEW: 検索最適化**: `find_and_grep`と`search_content`でのファイル出力機能活用
|
|
1049
|
+
8. **NEW: コード読取最適化**: `extract_code_section`と`query_code`でのファイル出力機能活用
|
|
@@ -1,5 +1,78 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.7.4] - 2025-10-10
|
|
4
|
+
|
|
5
|
+
### Improved
|
|
6
|
+
- **📊 Quality Metrics**:
|
|
7
|
+
- Test count increased to 2934 (up from 2831)
|
|
8
|
+
- Code coverage improved to 80.08% (up from 79.19%)
|
|
9
|
+
- All tests passing with enhanced system stability
|
|
10
|
+
- **🔧 Development Workflow**: Continued improvements to development and release processes
|
|
11
|
+
- **📚 Documentation**: Maintained comprehensive documentation and examples
|
|
12
|
+
|
|
13
|
+
### Technical Details
|
|
14
|
+
- **Test Coverage**: All 2934 tests passing with 80.08% coverage
|
|
15
|
+
- **Quality Metrics**: Enhanced test suite with improved coverage
|
|
16
|
+
- **Breaking Changes**: None - all improvements are backward compatible
|
|
17
|
+
|
|
18
|
+
This minor release maintains the high quality standards while improving test coverage and system stability.
|
|
19
|
+
|
|
20
|
+
## [1.7.3] - 2025-10-09
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
- **🆕 Complete Markdown Plugin Enhancement**: Comprehensive Markdown element extraction capabilities
|
|
24
|
+
- **5 New Element Types**: Added blockquotes, horizontal rules, HTML elements, text formatting, and footnotes
|
|
25
|
+
- **Enhanced Element Extraction**: New extraction methods for comprehensive Markdown analysis
|
|
26
|
+
- **Structured Analysis**: Convert Markdown documents to structured data for AI processing
|
|
27
|
+
- **Query System Integration**: Full integration with existing query and filtering functionality
|
|
28
|
+
|
|
29
|
+
- **📝 New Markdown Extraction Methods**: Powerful new analysis capabilities
|
|
30
|
+
- `extract_blockquotes()`: Extract > quoted text blocks with proper attribution
|
|
31
|
+
- `extract_horizontal_rules()`: Extract ---, ***, ___ separators and dividers
|
|
32
|
+
- `extract_html_elements()`: Extract HTML blocks and inline tags within Markdown
|
|
33
|
+
- `extract_text_formatting()`: Extract **bold**, *italic*, `code`, ~~strikethrough~~ formatting
|
|
34
|
+
- `extract_footnotes()`: Extract [^1] references and definitions with linking
|
|
35
|
+
|
|
36
|
+
- **🔧 Enhanced Tree-sitter Queries**: Extended query system for comprehensive parsing
|
|
37
|
+
- **New Footnotes Query**: Dedicated query for footnote references and definitions
|
|
38
|
+
- **Updated All Elements Query**: Enhanced query covering all 10 Markdown element types
|
|
39
|
+
- **Improved Pattern Matching**: Better recognition of complex Markdown structures
|
|
40
|
+
|
|
41
|
+
### Enhanced
|
|
42
|
+
- **📊 Markdown Formatter Improvements**: Enhanced table display for new element types
|
|
43
|
+
- **Comprehensive Element Display**: All 10 element types now displayed in structured tables
|
|
44
|
+
- **Better Formatting**: Improved readability and organization of Markdown analysis results
|
|
45
|
+
- **Consistent Output**: Unified formatting across all Markdown element types
|
|
46
|
+
|
|
47
|
+
- **🧪 Test Suite Expansion**: Comprehensive test coverage for new functionality
|
|
48
|
+
- **67 New Test Cases**: Complete validation of all new Markdown features
|
|
49
|
+
- **Element-Specific Testing**: Dedicated tests for each new extraction method
|
|
50
|
+
- **Integration Testing**: Full validation of query system integration
|
|
51
|
+
- **Backward Compatibility**: Ensured all existing functionality remains intact
|
|
52
|
+
|
|
53
|
+
### Improved
|
|
54
|
+
- **📊 Quality Metrics**:
|
|
55
|
+
- Test count increased to 2831 (up from 2829)
|
|
56
|
+
- Code coverage improved to 79.19% (up from 76.51%)
|
|
57
|
+
- All tests passing with enhanced system stability
|
|
58
|
+
- CLI regression tests updated to reflect 47→69 elements (46% improvement)
|
|
59
|
+
|
|
60
|
+
- **📚 Documentation**: Enhanced examples/test_markdown.md analysis coverage significantly
|
|
61
|
+
- **🔧 Development Workflow**: Improved Markdown analysis capabilities for AI-assisted development
|
|
62
|
+
- **🎯 Element Coverage**: Expanded from 5 to 10 Markdown element types for comprehensive analysis
|
|
63
|
+
|
|
64
|
+
### Technical Details
|
|
65
|
+
- **Enhanced Files**:
|
|
66
|
+
- `tree_sitter_analyzer/languages/markdown_plugin.py` - Added 5 new extraction methods
|
|
67
|
+
- `tree_sitter_analyzer/formatters/markdown_formatter.py` - Enhanced table formatting
|
|
68
|
+
- `tree_sitter_analyzer/queries/markdown.py` - Extended query definitions
|
|
69
|
+
- **Test Coverage**: All 2831 tests passing with 79.19% coverage
|
|
70
|
+
- **Quality Metrics**: Enhanced Markdown plugin with comprehensive validation
|
|
71
|
+
- **Breaking Changes**: None - all improvements are backward compatible
|
|
72
|
+
- **Element Count**: Increased from 47 to 69 elements in examples/test_markdown.md analysis
|
|
73
|
+
|
|
74
|
+
This minor release introduces comprehensive Markdown analysis capabilities, making Tree-sitter Analyzer a powerful tool for document analysis and AI-assisted Markdown processing, while maintaining full backward compatibility.
|
|
75
|
+
|
|
3
76
|
## [1.7.2] - 2025-10-09
|
|
4
77
|
|
|
5
78
|
### Added
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
# GitFlow Branching Strategy (English Documentation)
|
|
2
|
+
|
|
3
|
+
This document explains the GitFlow branching strategy implemented in the `tree-sitter-analyzer` project using Mermaid diagrams and English descriptions.
|
|
4
|
+
|
|
5
|
+
## GitFlow Diagram
|
|
6
|
+
|
|
7
|
+
```mermaid
|
|
8
|
+
gitGraph
|
|
9
|
+
commit id: "Initial commit"
|
|
10
|
+
branch develop
|
|
11
|
+
commit id: "dev-1"
|
|
12
|
+
|
|
13
|
+
branch feature/my-feature
|
|
14
|
+
commit id: "feat-1"
|
|
15
|
+
commit id: "feat-2"
|
|
16
|
+
|
|
17
|
+
checkout develop
|
|
18
|
+
merge feature/my-feature id: "merge-feat"
|
|
19
|
+
|
|
20
|
+
branch release/v1.0.0
|
|
21
|
+
commit id: "release-prep"
|
|
22
|
+
|
|
23
|
+
checkout main
|
|
24
|
+
merge release/v1.0.0 tag: "v1.0.0"
|
|
25
|
+
|
|
26
|
+
checkout develop
|
|
27
|
+
merge release/v1.0.0
|
|
28
|
+
|
|
29
|
+
checkout main
|
|
30
|
+
branch hotfix/critical-fix
|
|
31
|
+
commit id: "fix-bug"
|
|
32
|
+
|
|
33
|
+
checkout main
|
|
34
|
+
merge hotfix/critical-fix tag: "v1.0.1"
|
|
35
|
+
|
|
36
|
+
checkout develop
|
|
37
|
+
merge hotfix/critical-fix
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Branch Structure
|
|
41
|
+
|
|
42
|
+
### Main Branches
|
|
43
|
+
|
|
44
|
+
- **`main`**: Production-ready code. Always contains the latest stable version. Should be deployable at any time.
|
|
45
|
+
- **`develop`**: Feature integration branch. Contains the latest delivered development changes and serves as the starting point for all feature development.
|
|
46
|
+
|
|
47
|
+
### Supporting Branches
|
|
48
|
+
|
|
49
|
+
- **`feature/*`**: Feature development branches.
|
|
50
|
+
- **Origin**: `develop`
|
|
51
|
+
- **Merge back to**: `develop`
|
|
52
|
+
- **Naming**: `feature/descriptive-name` (e.g., `feature/user-authentication`)
|
|
53
|
+
- **`release/*`**: Release preparation branches. Used to prepare new production releases, performing only minor bug fixes and release-oriented tasks like documentation generation.
|
|
54
|
+
- **Origin**: `develop`
|
|
55
|
+
- **Merge back to**: `main` and `develop`
|
|
56
|
+
- **Naming**: `release/v1.2.0`
|
|
57
|
+
- **`hotfix/*`**: Emergency production bug fix branches. Used to quickly fix critical issues in the production environment.
|
|
58
|
+
- **Origin**: `main`
|
|
59
|
+
- **Merge back to**: `main` and `develop`
|
|
60
|
+
- **Naming**: `hotfix/critical-bug-fix`
|
|
61
|
+
|
|
62
|
+
## Workflow
|
|
63
|
+
|
|
64
|
+
### 1. Feature Development
|
|
65
|
+
|
|
66
|
+
1. **Create `feature` branch from `develop`**:
|
|
67
|
+
```bash
|
|
68
|
+
git fetch origin
|
|
69
|
+
git checkout -b feature/your-feature-name origin/develop
|
|
70
|
+
```
|
|
71
|
+
2. **Develop the feature** and commit regularly.
|
|
72
|
+
3. **After development completion**, push the `feature` branch to remote and create a Pull Request to the `develop` branch.
|
|
73
|
+
4. After code review and continuous integration (CI) checks pass, **merge to `develop`**.
|
|
74
|
+
|
|
75
|
+
### 2. Release Process
|
|
76
|
+
|
|
77
|
+
The project recommends using automated release workflows, but the manual process is as follows:
|
|
78
|
+
|
|
79
|
+
1. **Create `release` branch from `develop`**:
|
|
80
|
+
```bash
|
|
81
|
+
git fetch origin
|
|
82
|
+
git checkout -b release/v1.0.0 origin/develop
|
|
83
|
+
```
|
|
84
|
+
2. **Prepare release**: Update version numbers, generate documentation, etc.
|
|
85
|
+
```bash
|
|
86
|
+
# Update version number in pyproject.toml
|
|
87
|
+
# Update server_version
|
|
88
|
+
# Sync version number to __init__.py
|
|
89
|
+
uv run python scripts/sync_version_minimal.py
|
|
90
|
+
|
|
91
|
+
# Get current test count and coverage statistics:
|
|
92
|
+
# Test count: uv run python -m pytest --collect-only -q | findstr /C:"collected"
|
|
93
|
+
# Coverage: uv run python -m pytest --cov=tree_sitter_analyzer --cov-report=term-missing --cov-report=json -x -q | findstr "TOTAL"
|
|
94
|
+
|
|
95
|
+
# Update documentation:
|
|
96
|
+
# - Update version number, test count, and coverage in README.md
|
|
97
|
+
# - Update version badge, test badge, coverage badge
|
|
98
|
+
# - Update version references in "Latest Quality Achievements" section
|
|
99
|
+
# - Update version references in test environment section
|
|
100
|
+
# - Update all other version references in documentation
|
|
101
|
+
# - Update translated versions README_zh.md and README_ja.md
|
|
102
|
+
# - If workflow changes exist, update GITFLOW_zh.md and GITFLOW_ja.md
|
|
103
|
+
# - Update CHANGELOG.md release details
|
|
104
|
+
```
|
|
105
|
+
3. **Push `release` branch to remote to trigger PyPI release**:
|
|
106
|
+
```bash
|
|
107
|
+
git checkout release/v1.0.0
|
|
108
|
+
git push origin release/v1.0.0
|
|
109
|
+
```
|
|
110
|
+
4. **After PyPI release completion, merge to `main` and `develop`**:
|
|
111
|
+
```bash
|
|
112
|
+
# Switch to main branch and merge
|
|
113
|
+
git checkout main
|
|
114
|
+
git merge release/v1.0.0
|
|
115
|
+
git tag -a v1.0.0 -m "Release v1.0.0" # Add version tag
|
|
116
|
+
git push origin main --tags
|
|
117
|
+
|
|
118
|
+
# Switch to develop branch and merge
|
|
119
|
+
git checkout develop
|
|
120
|
+
git merge release/v1.0.0
|
|
121
|
+
git push origin develop
|
|
122
|
+
```
|
|
123
|
+
5. **Create GitHub Release**:
|
|
124
|
+
```bash
|
|
125
|
+
# Create temporary release message file (avoid encoding and symbol errors)
|
|
126
|
+
cat > release_message.md << 'EOF'
|
|
127
|
+
## v1.7.2 - File Output Optimization and ROO Rules Documentation
|
|
128
|
+
|
|
129
|
+
### 🎯 New Features
|
|
130
|
+
- **File Output Optimization**: Added `suppress_output` and `output_file` parameters to MCP search tools, significantly reducing token consumption
|
|
131
|
+
- **Automatic Format Detection**: Intelligent file format selection (JSON/Markdown) based on content type
|
|
132
|
+
- **ROO Rules Documentation**: Added comprehensive tree-sitter-analyzer MCP optimization usage guide
|
|
133
|
+
|
|
134
|
+
### 📊 Quality Metrics
|
|
135
|
+
- Test count: 2675 tests (100% pass rate)
|
|
136
|
+
- Code coverage: 78.85%
|
|
137
|
+
- New features: File output optimization significantly reduces AI conversation token consumption
|
|
138
|
+
|
|
139
|
+
### 🔧 Technical Improvements
|
|
140
|
+
- Response size reduction up to 99% (when outputting large search results to files)
|
|
141
|
+
- Backward compatible, no impact on existing functionality usage
|
|
142
|
+
- Complete test coverage including file output optimization feature verification
|
|
143
|
+
EOF
|
|
144
|
+
|
|
145
|
+
# Create release using gh CLI
|
|
146
|
+
gh release create v1.7.2 \
|
|
147
|
+
--title "Release v1.7.2: File Output Optimization and ROO Rules Documentation" \
|
|
148
|
+
--notes-file release_message.md \
|
|
149
|
+
--target main
|
|
150
|
+
|
|
151
|
+
# Delete temporary file
|
|
152
|
+
rm release_message.md
|
|
153
|
+
```
|
|
154
|
+
6. **Delete `release` branch**:
|
|
155
|
+
```bash
|
|
156
|
+
# Delete local branch
|
|
157
|
+
git branch -d release/v1.0.0
|
|
158
|
+
# Delete remote branch
|
|
159
|
+
git push origin --delete release/v1.0.0
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Important Explanation**: This release workflow adopts a "PyPI-first" strategy, ensuring the package is successfully published before updating the main branch. This approach avoids the risk of code being published on GitHub but packages being unavailable on PyPI, providing a safer release process.
|
|
163
|
+
|
|
164
|
+
### 3. Hotfix Process
|
|
165
|
+
|
|
166
|
+
1. **Create `hotfix` branch from `main`**:
|
|
167
|
+
```bash
|
|
168
|
+
git fetch origin
|
|
169
|
+
git checkout -b hotfix/critical-bug-fix origin/main
|
|
170
|
+
```
|
|
171
|
+
2. **Fix the bug** and commit.
|
|
172
|
+
3. **Update version and documentation**:
|
|
173
|
+
```bash
|
|
174
|
+
# Update version number in pyproject.toml (e.g., 1.0.0 -> 1.0.1)
|
|
175
|
+
# Update server_version
|
|
176
|
+
# Sync version number to __init__.py
|
|
177
|
+
uv run python scripts/sync_version_minimal.py
|
|
178
|
+
|
|
179
|
+
# Get current test count and coverage statistics:
|
|
180
|
+
# Test count: uv run python -m pytest --collect-only -q | findstr /C:"collected"
|
|
181
|
+
# Coverage: uv run python -m pytest --cov=tree_sitter_analyzer --cov-report=term-missing --cov-report=json -x -q | findstr "TOTAL"
|
|
182
|
+
|
|
183
|
+
# Update documentation:
|
|
184
|
+
# - Add hotfix details to CHANGELOG.md
|
|
185
|
+
# - Update version number, test count, and coverage in README.md
|
|
186
|
+
# - Update version badge, test badge, coverage badge
|
|
187
|
+
# - Update version references in "Latest Quality Achievements" section
|
|
188
|
+
# - Update version references in test environment section
|
|
189
|
+
# - Update all other version references in documentation
|
|
190
|
+
# - Update translated versions README_zh.md and README_ja.md
|
|
191
|
+
# - If workflow changes exist, update GITFLOW_zh.md and GITFLOW_ja.md
|
|
192
|
+
```
|
|
193
|
+
4. **Push `hotfix` branch to remote to trigger PyPI release**:
|
|
194
|
+
```bash
|
|
195
|
+
git checkout hotfix/critical-bug-fix
|
|
196
|
+
git push origin hotfix/critical-bug-fix
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
5. **After PyPI release completion, merge to `main` and `develop`**:
|
|
200
|
+
```bash
|
|
201
|
+
# Switch to main branch and merge
|
|
202
|
+
git checkout main
|
|
203
|
+
git merge hotfix/critical-bug-fix
|
|
204
|
+
git tag -a v1.0.1 -m "Hotfix v1.0.1" # Add fix version tag
|
|
205
|
+
git push origin main --tags
|
|
206
|
+
|
|
207
|
+
# Switch to develop branch and merge
|
|
208
|
+
git checkout develop
|
|
209
|
+
git merge hotfix/critical-bug-fix
|
|
210
|
+
git push origin develop
|
|
211
|
+
```
|
|
212
|
+
6. **Create GitHub Release**:
|
|
213
|
+
```bash
|
|
214
|
+
# Create temporary hotfix release message file
|
|
215
|
+
cat > hotfix_release_message.md << 'EOF'
|
|
216
|
+
## v1.0.1 - Emergency Fix
|
|
217
|
+
|
|
218
|
+
### 🐛 Fix Details
|
|
219
|
+
- Fixed critical production environment issue
|
|
220
|
+
- Improved system stability and security
|
|
221
|
+
|
|
222
|
+
### 📊 Quality Metrics
|
|
223
|
+
- All tests passing
|
|
224
|
+
- Emergency fix verification completed
|
|
225
|
+
|
|
226
|
+
### ⚡ Deployment Notes
|
|
227
|
+
- This version is an emergency fix, immediate deployment to production environment recommended
|
|
228
|
+
- Verified through complete testing
|
|
229
|
+
EOF
|
|
230
|
+
|
|
231
|
+
# Create hotfix release using gh CLI
|
|
232
|
+
gh release create v1.0.1 \
|
|
233
|
+
--title "Hotfix v1.0.1: Critical Production Fix" \
|
|
234
|
+
--notes-file hotfix_release_message.md \
|
|
235
|
+
--target main
|
|
236
|
+
|
|
237
|
+
# Delete temporary file
|
|
238
|
+
rm hotfix_release_message.md
|
|
239
|
+
```
|
|
240
|
+
7. **Delete `hotfix` branch**:
|
|
241
|
+
```bash
|
|
242
|
+
# Delete local branch
|
|
243
|
+
git branch -d hotfix/critical-bug-fix
|
|
244
|
+
# Delete remote branch
|
|
245
|
+
git push origin --delete hotfix/critical-bug-fix
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
**Important Explanation**: This hotfix workflow also adopts the "PyPI-first" strategy, updating the main branch after successful package release to avoid the risk of emergency fix code being published but packages being unavailable.
|
|
249
|
+
|
|
250
|
+
**Note**: According to the actual automated workflow, hotfix branches **do** automatically trigger PyPI releases. However, this may cause version conflicts, so it's recommended to ensure version numbers are correctly updated before using hotfix branches.
|
|
251
|
+
|
|
252
|
+
## Automation Workflows
|
|
253
|
+
|
|
254
|
+
### Develop Branch Automation (`develop-automation.yml`)
|
|
255
|
+
When code is pushed to the `develop` branch, automatically executes:
|
|
256
|
+
|
|
257
|
+
1. **Test Job**:
|
|
258
|
+
- Run complete test suite using pytest with detailed traceback and failure limits
|
|
259
|
+
- Generate coverage reports (XML and terminal formats)
|
|
260
|
+
- Upload coverage to Codecov
|
|
261
|
+
|
|
262
|
+
2. **Build Job**:
|
|
263
|
+
- Build Python package using `python -m build`
|
|
264
|
+
- Validate package using `twine check`
|
|
265
|
+
- Upload build artifacts (retained for 1 day)
|
|
266
|
+
|
|
267
|
+
3. **Create Release PR Job**:
|
|
268
|
+
- Automatically create PR from develop to main
|
|
269
|
+
- Include quality metrics and test results
|
|
270
|
+
- Ready for production deployment
|
|
271
|
+
|
|
272
|
+
**Important**: Pushes to develop branch do **not** trigger PyPI deployment.
|
|
273
|
+
|
|
274
|
+
### Release Branch Automation (`release-automation.yml`)
|
|
275
|
+
When code is pushed to `release/v*` branches, automatically executes:
|
|
276
|
+
|
|
277
|
+
1. **Test Job**:
|
|
278
|
+
- Run complete test suite using pytest with detailed traceback and failure limits
|
|
279
|
+
- Generate coverage reports (XML and terminal formats)
|
|
280
|
+
- Upload coverage to Codecov
|
|
281
|
+
|
|
282
|
+
2. **Build and Deploy Job**:
|
|
283
|
+
- Build Python package
|
|
284
|
+
- Validate package using `twine check`
|
|
285
|
+
- **Deploy to PyPI using `twine upload`**
|
|
286
|
+
|
|
287
|
+
3. **Create Main PR Job**:
|
|
288
|
+
- Create PR to main branch after successful PyPI deployment
|
|
289
|
+
- Marked as critical hotfix, ready for immediate production
|
|
290
|
+
|
|
291
|
+
### Hotfix Branch Automation (`hotfix-automation.yml`)
|
|
292
|
+
When code is pushed to `hotfix/*` branches, automatically executes:
|
|
293
|
+
|
|
294
|
+
1. **Test Job**:
|
|
295
|
+
- Run complete test suite using pytest with detailed traceback and failure limits
|
|
296
|
+
- Generate coverage reports (XML and terminal formats)
|
|
297
|
+
|
|
298
|
+
2. **Build and Deploy Job**:
|
|
299
|
+
- Build Python package
|
|
300
|
+
- Validate package using `twine check`
|
|
301
|
+
- **Deploy to PyPI using `twine upload`**
|
|
302
|
+
|
|
303
|
+
3. **Create Main PR Job**:
|
|
304
|
+
- Create PR to main branch after successful PyPI deployment
|
|
305
|
+
- Marked as critical hotfix, ready for immediate production
|
|
306
|
+
|
|
307
|
+
**Important**: According to the actual automated workflow, hotfix branches **do** automatically trigger PyPI deployment, same as release branches. This may cause version conflicts, so careful use of hotfix branches is recommended.
|
|
308
|
+
|
|
309
|
+
### CI Workflow (`ci.yml`)
|
|
310
|
+
Runs on all branches (`main`, `develop`, `hotfix/*`, `feature/*`, `release/*`) and PRs:
|
|
311
|
+
|
|
312
|
+
1. **Quality Check Job**:
|
|
313
|
+
- Multi-Python version testing (3.10, 3.11, 3.12, 3.13)
|
|
314
|
+
- Code quality checks using `check_quality.py`
|
|
315
|
+
|
|
316
|
+
2. **Test Matrix Job**:
|
|
317
|
+
- Cross-platform testing (Ubuntu, Windows, macOS)
|
|
318
|
+
- Multi-Python version compatibility testing
|
|
319
|
+
|
|
320
|
+
**PyPI Deployment Strategy**: Both `release/*` and `hotfix/*` branches automatically deploy to PyPI. However, hotfix branches may cause version conflicts, so careful usage is recommended.
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
*This English documentation aims to help understand the core concepts in [`GITFLOW.md`](GITFLOW.md). For more detailed information on automation workflows, quality checks, and CI/CD integration, please refer to the original [GITFLOW.md](GITFLOW.md) file.*
|