Metadata-Version: 2.4
Name: tree-sitter-analyzer
Version: 1.10.4
Summary: AI-era enterprise-grade code analysis tool with comprehensive HTML/CSS support, dynamic plugin architecture, and MCP integration
Project-URL: Homepage, https://github.com/aimasteracc/tree-sitter-analyzer
Project-URL: Documentation, https://github.com/aimasteracc/tree-sitter-analyzer#readme
Project-URL: Repository, https://github.com/aimasteracc/tree-sitter-analyzer.git
Project-URL: Issues, https://github.com/aimasteracc/tree-sitter-analyzer/issues
Project-URL: Changelog, https://github.com/aimasteracc/tree-sitter-analyzer/blob/main/CHANGELOG.md
Project-URL: Bug Reports, https://github.com/aimasteracc/tree-sitter-analyzer/issues
Project-URL: Source Code, https://github.com/aimasteracc/tree-sitter-analyzer
Author-email: "aisheng.yu" <aimasteracc@gmail.com>
Maintainer-email: "aisheng.yu" <aimasteracc@gmail.com>
License: MIT
License-File: LICENSE
Keywords: ai-tools,ast,code-analysis,css,html,mcp,mcp-server,model-context-protocol,multi-language,parsing,static-analysis,tree-sitter,web-development
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Communications
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Text Processing :: Linguistic
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: cachetools>=5.0.0
Requires-Dist: chardet>=5.0.0
Requires-Dist: deepdiff>=6.7.1
Requires-Dist: detect-secrets>=1.5.0
Requires-Dist: jsonschema>=4.0.0
Requires-Dist: mcp<2.0.0,>=1.12.3
Requires-Dist: psutil>=5.9.8
Requires-Dist: tree-sitter-c-sharp>=0.23.1
Requires-Dist: tree-sitter-c>=0.20.0
Requires-Dist: tree-sitter-cpp>=0.23.4
Requires-Dist: tree-sitter-css>=0.23.0
Requires-Dist: tree-sitter-go>=0.20.0
Requires-Dist: tree-sitter-html>=0.23.0
Requires-Dist: tree-sitter-java>=0.23.5
Requires-Dist: tree-sitter-javascript>=0.23.1
Requires-Dist: tree-sitter-kotlin>=0.3.0
Requires-Dist: tree-sitter-markdown>=0.3.1
Requires-Dist: tree-sitter-php>=0.24.1
Requires-Dist: tree-sitter-python>=0.23.6
Requires-Dist: tree-sitter-ruby>=0.23.1
Requires-Dist: tree-sitter-rust>=0.20.0
Requires-Dist: tree-sitter-sql>=0.3.11
Requires-Dist: tree-sitter-typescript>=0.23.2
Requires-Dist: tree-sitter-yaml>=0.7.0
Requires-Dist: tree-sitter>=0.25.0
Provides-Extra: all
Requires-Dist: anyio>=4.0.0; extra == 'all'
Requires-Dist: black>=24.0.0; extra == 'all'
Requires-Dist: httpx<1.0.0,>=0.27.0; extra == 'all'
Requires-Dist: isort>=5.13.0; extra == 'all'
Requires-Dist: mcp>=1.12.2; extra == 'all'
Requires-Dist: memory-profiler>=0.61.0; extra == 'all'
Requires-Dist: mypy>=1.17.0; extra == 'all'
Requires-Dist: pre-commit>=3.0.0; extra == 'all'
Requires-Dist: psutil<6,>=5.9.6; extra == 'all'
Requires-Dist: pydantic-settings>=2.2.1; extra == 'all'
Requires-Dist: pydantic>=2.5.0; extra == 'all'
Requires-Dist: pytest-asyncio>=1.1.0; extra == 'all'
Requires-Dist: pytest-cov>=4.0.0; extra == 'all'
Requires-Dist: pytest-mock>=3.14.1; extra == 'all'
Requires-Dist: pytest>=8.4.1; extra == 'all'
Requires-Dist: ruff>=0.5.0; extra == 'all'
Requires-Dist: tree-sitter-c<0.25.0,>=0.20.0; extra == 'all'
Requires-Dist: tree-sitter-cpp<0.25.0,>=0.23.4; extra == 'all'
Requires-Dist: tree-sitter-css<0.25.0,>=0.23.0; extra == 'all'
Requires-Dist: tree-sitter-go<0.25.0,>=0.20.0; extra == 'all'
Requires-Dist: tree-sitter-html<0.25.0,>=0.23.0; extra == 'all'
Requires-Dist: tree-sitter-java<0.25.0,>=0.23.5; extra == 'all'
Requires-Dist: tree-sitter-javascript<0.25.0,>=0.23.1; extra == 'all'
Requires-Dist: tree-sitter-markdown>=0.3.1; extra == 'all'
Requires-Dist: tree-sitter-python<0.25.0,>=0.23.0; extra == 'all'
Requires-Dist: tree-sitter-rust<0.25.0,>=0.20.0; extra == 'all'
Requires-Dist: tree-sitter-sql<0.4.0,>=0.3.11; extra == 'all'
Requires-Dist: tree-sitter-typescript<0.25.0,>=0.20.0; extra == 'all'
Requires-Dist: types-psutil>=5.9.0; extra == 'all'
Provides-Extra: all-languages
Requires-Dist: tree-sitter-c-sharp>=0.23.1; extra == 'all-languages'
Requires-Dist: tree-sitter-c<0.25.0,>=0.20.0; extra == 'all-languages'
Requires-Dist: tree-sitter-cpp<0.25.0,>=0.23.4; extra == 'all-languages'
Requires-Dist: tree-sitter-css<0.25.0,>=0.23.0; extra == 'all-languages'
Requires-Dist: tree-sitter-go<0.25.0,>=0.20.0; extra == 'all-languages'
Requires-Dist: tree-sitter-html<0.25.0,>=0.23.0; extra == 'all-languages'
Requires-Dist: tree-sitter-java<0.25.0,>=0.23.5; extra == 'all-languages'
Requires-Dist: tree-sitter-javascript<0.25.0,>=0.23.1; extra == 'all-languages'
Requires-Dist: tree-sitter-kotlin>=0.3.0; extra == 'all-languages'
Requires-Dist: tree-sitter-markdown>=0.3.1; extra == 'all-languages'
Requires-Dist: tree-sitter-php<0.25.0,>=0.23.0; extra == 'all-languages'
Requires-Dist: tree-sitter-python<0.25.0,>=0.23.0; extra == 'all-languages'
Requires-Dist: tree-sitter-ruby<0.25.0,>=0.23.0; extra == 'all-languages'
Requires-Dist: tree-sitter-rust<0.25.0,>=0.20.0; extra == 'all-languages'
Requires-Dist: tree-sitter-sql<0.4.0,>=0.3.11; extra == 'all-languages'
Requires-Dist: tree-sitter-typescript<0.25.0,>=0.20.0; extra == 'all-languages'
Requires-Dist: tree-sitter-yaml>=0.7.0; extra == 'all-languages'
Provides-Extra: c
Requires-Dist: tree-sitter-c<0.25.0,>=0.20.0; extra == 'c'
Provides-Extra: cpp
Requires-Dist: tree-sitter-cpp<0.25.0,>=0.23.4; extra == 'cpp'
Provides-Extra: csharp
Requires-Dist: tree-sitter-c-sharp>=0.23.1; extra == 'csharp'
Provides-Extra: css
Requires-Dist: tree-sitter-css<0.25.0,>=0.23.0; extra == 'css'
Provides-Extra: dev
Requires-Dist: black>=24.0.0; extra == 'dev'
Requires-Dist: hypothesis>=6.0.0; extra == 'dev'
Requires-Dist: isort>=5.13.0; extra == 'dev'
Requires-Dist: memory-profiler>=0.61.0; extra == 'dev'
Requires-Dist: mypy>=1.17.0; extra == 'dev'
Requires-Dist: pre-commit>=3.0.0; extra == 'dev'
Requires-Dist: psutil<6,>=5.9.6; extra == 'dev'
Requires-Dist: pytest-asyncio>=1.1.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest-mock>=3.14.1; extra == 'dev'
Requires-Dist: pytest>=8.4.1; extra == 'dev'
Requires-Dist: ruff>=0.5.0; extra == 'dev'
Requires-Dist: types-psutil>=5.9.0; extra == 'dev'
Provides-Extra: full
Requires-Dist: anyio>=4.0.0; extra == 'full'
Requires-Dist: black>=24.0.0; extra == 'full'
Requires-Dist: httpx<1.0.0,>=0.27.0; extra == 'full'
Requires-Dist: isort>=5.13.0; extra == 'full'
Requires-Dist: mcp>=1.12.2; extra == 'full'
Requires-Dist: memory-profiler>=0.61.0; extra == 'full'
Requires-Dist: mypy>=1.17.0; extra == 'full'
Requires-Dist: pre-commit>=3.0.0; extra == 'full'
Requires-Dist: psutil<6,>=5.9.6; extra == 'full'
Requires-Dist: pydantic-settings>=2.2.1; extra == 'full'
Requires-Dist: pydantic>=2.5.0; extra == 'full'
Requires-Dist: pytest-asyncio>=1.1.0; extra == 'full'
Requires-Dist: pytest-cov>=4.0.0; extra == 'full'
Requires-Dist: pytest-mock>=3.14.1; extra == 'full'
Requires-Dist: pytest>=8.4.1; extra == 'full'
Requires-Dist: ruff>=0.5.0; extra == 'full'
Requires-Dist: tree-sitter-c<0.25.0,>=0.20.0; extra == 'full'
Requires-Dist: tree-sitter-cpp<0.25.0,>=0.23.4; extra == 'full'
Requires-Dist: tree-sitter-go<0.25.0,>=0.20.0; extra == 'full'
Requires-Dist: tree-sitter-java<0.25.0,>=0.23.5; extra == 'full'
Requires-Dist: tree-sitter-javascript<0.25.0,>=0.23.1; extra == 'full'
Requires-Dist: tree-sitter-markdown>=0.3.1; extra == 'full'
Requires-Dist: tree-sitter-python<0.25.0,>=0.23.0; extra == 'full'
Requires-Dist: tree-sitter-rust<0.25.0,>=0.20.0; extra == 'full'
Requires-Dist: tree-sitter-typescript<0.25.0,>=0.20.0; extra == 'full'
Requires-Dist: types-psutil>=5.9.0; extra == 'full'
Provides-Extra: go
Requires-Dist: tree-sitter-go<0.25.0,>=0.20.0; extra == 'go'
Provides-Extra: html
Requires-Dist: tree-sitter-html<0.25.0,>=0.23.0; extra == 'html'
Provides-Extra: integration
Requires-Dist: anyio>=4.0.0; extra == 'integration'
Requires-Dist: mcp>=1.12.2; extra == 'integration'
Requires-Dist: memory-profiler>=0.61.0; extra == 'integration'
Requires-Dist: psutil>=5.9.8; extra == 'integration'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'integration'
Requires-Dist: pytest-benchmark>=4.0.0; extra == 'integration'
Requires-Dist: pytest-cov>=4.0.0; extra == 'integration'
Requires-Dist: pytest-mock>=3.14.1; extra == 'integration'
Requires-Dist: pytest>=8.4.1; extra == 'integration'
Requires-Dist: tree-sitter-java>=0.23.5; extra == 'integration'
Requires-Dist: tree-sitter-javascript>=0.23.1; extra == 'integration'
Requires-Dist: tree-sitter-markdown>=0.3.1; extra == 'integration'
Requires-Dist: tree-sitter-python>=0.23.0; extra == 'integration'
Requires-Dist: tree-sitter-typescript>=0.20.0; extra == 'integration'
Provides-Extra: java
Requires-Dist: tree-sitter-java<0.25.0,>=0.23.5; extra == 'java'
Provides-Extra: javascript
Requires-Dist: tree-sitter-javascript<0.25.0,>=0.23.1; extra == 'javascript'
Provides-Extra: kotlin
Requires-Dist: tree-sitter-kotlin>=0.3.0; extra == 'kotlin'
Provides-Extra: markdown
Requires-Dist: tree-sitter-markdown>=0.3.1; extra == 'markdown'
Provides-Extra: mcp
Requires-Dist: anyio>=4.0.0; extra == 'mcp'
Requires-Dist: httpx<1.0.0,>=0.27.0; extra == 'mcp'
Requires-Dist: mcp>=1.12.2; extra == 'mcp'
Requires-Dist: pydantic-settings>=2.2.1; extra == 'mcp'
Requires-Dist: pydantic>=2.5.0; extra == 'mcp'
Provides-Extra: php
Requires-Dist: tree-sitter-php<0.25.0,>=0.23.0; extra == 'php'
Provides-Extra: popular
Requires-Dist: tree-sitter-java<0.25.0,>=0.23.5; extra == 'popular'
Requires-Dist: tree-sitter-javascript<0.25.0,>=0.23.1; extra == 'popular'
Requires-Dist: tree-sitter-python<0.25.0,>=0.23.0; extra == 'popular'
Requires-Dist: tree-sitter-typescript<0.25.0,>=0.20.0; extra == 'popular'
Provides-Extra: python
Requires-Dist: tree-sitter-python<0.25.0,>=0.23.0; extra == 'python'
Provides-Extra: ruby
Requires-Dist: tree-sitter-ruby<0.25.0,>=0.23.0; extra == 'ruby'
Provides-Extra: rust
Requires-Dist: tree-sitter-rust<0.25.0,>=0.20.0; extra == 'rust'
Provides-Extra: sql
Requires-Dist: tree-sitter-sql<0.4.0,>=0.3.11; extra == 'sql'
Provides-Extra: systems
Requires-Dist: tree-sitter-c<0.25.0,>=0.20.0; extra == 'systems'
Requires-Dist: tree-sitter-cpp<0.25.0,>=0.23.4; extra == 'systems'
Requires-Dist: tree-sitter-go<0.25.0,>=0.20.0; extra == 'systems'
Requires-Dist: tree-sitter-rust<0.25.0,>=0.20.0; extra == 'systems'
Provides-Extra: test
Requires-Dist: pytest-asyncio>=1.1.0; extra == 'test'
Requires-Dist: pytest-cov>=4.0.0; extra == 'test'
Requires-Dist: pytest-mock>=3.14.1; extra == 'test'
Requires-Dist: pytest>=8.4.1; extra == 'test'
Requires-Dist: tree-sitter-c-sharp>=0.23.1; extra == 'test'
Requires-Dist: tree-sitter-cpp>=0.23.4; extra == 'test'
Requires-Dist: tree-sitter-java>=0.23.5; extra == 'test'
Requires-Dist: tree-sitter-javascript>=0.23.1; extra == 'test'
Requires-Dist: tree-sitter-php<0.25.0,>=0.23.0; extra == 'test'
Requires-Dist: tree-sitter-python>=0.23.0; extra == 'test'
Requires-Dist: tree-sitter-ruby<0.25.0,>=0.23.0; extra == 'test'
Requires-Dist: tree-sitter-sql<0.4.0,>=0.3.11; extra == 'test'
Provides-Extra: typescript
Requires-Dist: tree-sitter-typescript<0.25.0,>=0.20.0; extra == 'typescript'
Provides-Extra: web
Requires-Dist: tree-sitter-css<0.25.0,>=0.23.0; extra == 'web'
Requires-Dist: tree-sitter-html<0.25.0,>=0.23.0; extra == 'web'
Requires-Dist: tree-sitter-javascript<0.25.0,>=0.23.1; extra == 'web'
Requires-Dist: tree-sitter-php<0.25.0,>=0.23.0; extra == 'web'
Requires-Dist: tree-sitter-ruby<0.25.0,>=0.23.0; extra == 'web'
Requires-Dist: tree-sitter-typescript<0.25.0,>=0.20.0; extra == 'web'
Provides-Extra: yaml
Requires-Dist: tree-sitter-yaml>=0.7.0; extra == 'yaml'
Description-Content-Type: text/markdown

# 🌳 Tree-sitter Analyzer

**English** | **[日本語](README_ja.md)** | **[简体中文](README_zh.md)**

[![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://python.org)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![Tests](https://img.shields.io/badge/tests-8409%20passed-brightgreen.svg)](#-quality--testing)
[![Coverage](https://codecov.io/gh/aimasteracc/tree-sitter-analyzer/branch/main/graph/badge.svg)](https://codecov.io/gh/aimasteracc/tree-sitter-analyzer)
[![PyPI](https://img.shields.io/pypi/v/tree-sitter-analyzer.svg)](https://pypi.org/project/tree-sitter-analyzer/)
[![Version](https://img.shields.io/badge/version-1.10.4-blue.svg)](https://github.com/aimasteracc/tree-sitter-analyzer/releases)
[![GitHub Stars](https://img.shields.io/github/stars/aimasteracc/tree-sitter-analyzer.svg?style=social)](https://github.com/aimasteracc/tree-sitter-analyzer)

> 🚀 **Enterprise-Grade Code Analysis Tool for the AI Era** - Deep AI Integration · Powerful Search · 17 Languages · Intelligent Analysis

---

## ✨ What's New in v1.10.4

- **Vertex AI Compatibility**: Fixed MCP tool JSON Schema compatibility with Vertex AI API by removing `oneOf`/`anyOf`/`allOf` constraints
- **Format Change Management System**: Complete system for tracking and managing format changes with database tracking and pre-commit validation
- **Behavior Profile Comparison**: CLI tool for comparing code analysis behavior profiles between versions
- **Enhanced Language Support**: Added Go, Rust, and Kotlin to core dependencies for comprehensive systems programming language support
- **C++ Formatter**: Dedicated formatter with Bandit security scanning
- **8,409 tests** with 100% pass rate and 80.33% coverage

📖 **[Full Changelog](CHANGELOG.md)** for complete version history.

---

## 🎬 See It In Action

<!-- GIF placeholder - see docs/assets/demo-placeholder.md for creation instructions -->
*Demo GIF coming soon - showcasing AI integration with SMART workflow*

---

## 🚀 5-Minute Quick Start

### Prerequisites

```bash
# Install uv (required)
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows PowerShell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

# Install fd + ripgrep (required for search features)
brew install fd ripgrep          # macOS
winget install sharkdp.fd BurntSushi.ripgrep.MSVC  # Windows
```

📖 **[Detailed Installation Guide](docs/installation.md)** for all platforms.

### Verify Installation

```bash
uv run tree-sitter-analyzer --show-supported-languages
```

---

## 🤖 AI Integration

Configure your AI assistant to use Tree-sitter Analyzer via MCP protocol.

### Claude Desktop / Cursor / Roo Code

Add to your MCP configuration:

```json
{
  "mcpServers": {
    "tree-sitter-analyzer": {
      "command": "uvx",
      "args": [
        "--from", "tree-sitter-analyzer[mcp]",
        "tree-sitter-analyzer-mcp"
      ],
      "env": {
        "TREE_SITTER_PROJECT_ROOT": "/path/to/your/project",
        "TREE_SITTER_OUTPUT_PATH": "/path/to/output/directory"
      }
    }
  }
}
```

**Configuration file locations:**
- **Claude Desktop**: `%APPDATA%\Claude\claude_desktop_config.json` (Windows) / `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)
- **Cursor**: Built-in MCP settings
- **Roo Code**: MCP configuration

After restart, tell the AI: `Please set the project root directory to: /path/to/your/project`

📖 **[MCP Tools Reference](docs/api/mcp_tools_specification.md)** for complete API documentation.

---

## 💻 Common CLI Commands

### Installation

```bash
uv add "tree-sitter-analyzer[all,mcp]"  # Full installation
```

### Top 5 Commands

```bash
# 1. Analyze file structure
uv run tree-sitter-analyzer examples/BigService.java --table full

# 2. Quick summary
uv run tree-sitter-analyzer examples/BigService.java --summary

# 3. Extract code section
uv run tree-sitter-analyzer examples/BigService.java --partial-read --start-line 93 --end-line 106

# 4. Find files and search content
uv run find-and-grep --roots . --query "class.*Service" --extensions java

# 5. Query specific elements
uv run tree-sitter-analyzer examples/BigService.java --query-key methods --filter "public=true"
```

<details>
<summary>📋 View Output Example</summary>

```
╭─────────────────────────────────────────────────────────────╮
│                   BigService.java Analysis                   │
├─────────────────────────────────────────────────────────────┤
│ Total Lines: 1419 | Code: 906 | Comments: 246 | Blank: 267  │
│ Classes: 1 | Methods: 66 | Fields: 9 | Complexity: 5.27 avg │
╰─────────────────────────────────────────────────────────────╯
```

</details>

📖 **[Complete CLI Reference](docs/cli-reference.md)** for all commands and options.

---

## 🌍 Supported Languages

| Language | Support Level | Key Features |
|----------|---------------|--------------|
| **Java** | ✅ Complete | Spring, JPA, enterprise features |
| **Python** | ✅ Complete | Type annotations, decorators |
| **TypeScript** | ✅ Complete | Interfaces, types, TSX/JSX |
| **JavaScript** | ✅ Complete | ES6+, React/Vue/Angular |
| **C** | ✅ Complete | Functions, structs, unions, enums, preprocessor |
| **C++** | ✅ Complete | Classes, templates, namespaces, inheritance |
| **C#** | ✅ Complete | Records, async/await, attributes |
| **SQL** | ✅ Enhanced | Tables, views, procedures, triggers |
| **HTML** | ✅ Complete | DOM structure, element classification |
| **CSS** | ✅ Complete | Selectors, properties, categorization |
| **Go** | ✅ Complete | Structs, interfaces, goroutines |
| **Rust** | ✅ Complete | Traits, impl blocks, macros |
| **Kotlin** | ✅ Complete | Data classes, coroutines |
| **PHP** | ✅ Complete | PHP 8+, attributes, traits |
| **Ruby** | ✅ Complete | Rails patterns, metaprogramming |
| **YAML** | ✅ Complete | Anchors, aliases, multi-document |
| **Markdown** | ✅ Complete | Headers, code blocks, tables |

📖 **[Features Documentation](docs/features.md)** for language-specific details.

---

## 📊 Features Overview

| Feature | Description | Learn More |
|---------|-------------|------------|
| **SMART Workflow** | Set-Map-Analyze-Retrieve-Trace methodology | [Guide](docs/smart-workflow.md) |
| **MCP Protocol** | Native AI assistant integration | [API Docs](docs/api/mcp_tools_specification.md) |
| **Token Optimization** | Up to 95% token reduction | [Features](docs/features.md) |
| **File Search** | fd-based high-performance discovery | [CLI Reference](docs/cli-reference.md) |
| **Content Search** | ripgrep regex search | [CLI Reference](docs/cli-reference.md) |
| **Security** | Project boundary protection | [Architecture](docs/architecture.md) |

---

## 🏆 Quality & Testing

| Metric | Value |
|--------|-------|
| **Tests** | 6,246 passed ✅ |
| **Coverage** | [![Coverage](https://codecov.io/gh/aimasteracc/tree-sitter-analyzer/branch/main/graph/badge.svg)](https://codecov.io/gh/aimasteracc/tree-sitter-analyzer) |
| **Type Safety** | 100% mypy compliance |
| **Platforms** | Windows, macOS, Linux |

```bash
# Run tests
uv run pytest tests/ -v

# Generate coverage report
uv run pytest tests/ --cov=tree_sitter_analyzer --cov-report=html
```

---

## 🛠️ Development

### Setup

```bash
git clone https://github.com/aimasteracc/tree-sitter-analyzer.git
cd tree-sitter-analyzer
uv sync --extra all --extra mcp
```

### Quality Checks

```bash
uv run pytest tests/ -v                    # Run tests
uv run python check_quality.py --new-code-only  # Quality check
uv run python llm_code_checker.py --check-all   # AI code check
```

📖 **[Architecture Guide](docs/architecture.md)** for system design details.

---

## 🤝 Contributing & License

We welcome contributions! See **[Contributing Guide](docs/CONTRIBUTING.md)** for development guidelines.

### ⭐ Support

If this project helps you, please give us a ⭐ on GitHub!

### 💝 Sponsors

**[@o93](https://github.com/o93)** - Lead Sponsor supporting MCP tool enhancement, test infrastructure, and quality improvements.

**[💖 Sponsor this project](https://github.com/sponsors/aimasteracc)**

### 📄 License

MIT License - see [LICENSE](LICENSE) file.

---

## 🧪 Testing

### Test Coverage

| Metric | Value |
|--------|-------|
| **Total Tests** | 2,411 tests ✅ |
| **Test Pass Rate** | 100% (2,411/2,411) |
| **Code Coverage** | [![Coverage](https://codecov.io/gh/aimasteracc/tree-sitter-analyzer/branch/main/graph/badge.svg)](https://codecov.io/gh/aimasteracc/tree-sitter-analyzer) |
| **Type Safety** | 100% mypy compliance |

### Running Tests

```bash
# Run all tests
uv run pytest tests/ -v

# Run specific test category
uv run pytest tests/unit/ -v              # Unit tests
uv run pytest tests/integration/ -v         # Integration tests
uv run pytest tests/regression/ -m regression  # Regression tests
uv run pytest tests/benchmarks/ -v         # Benchmark tests

# Run with coverage
uv run pytest tests/ --cov=tree_sitter_analyzer --cov-report=html

# Run property-based tests
uv run pytest tests/property/

# Run performance benchmarks
uv run pytest tests/benchmarks/ --benchmark-only
```

### Test Documentation

| Document | Description |
|----------|-------------|
| [Test Writing Guide](docs/test-writing-guide.md) | Comprehensive guide for writing tests |
| [Regression Testing Guide](docs/regression-testing-guide.md) | Golden Master methodology and regression testing |
| [Testing Documentation](docs/TESTING.md) | Project testing standards |

### Test Categories

- **Unit Tests** (2,087 tests): Test individual components in isolation
- **Integration Tests** (187 tests): Test component interactions
- **Regression Tests** (70 tests): Ensure backward compatibility and format stability
- **Property Tests** (75 tests): Hypothesis-based property testing
- **Benchmark Tests** (20 tests): Performance monitoring and regression detection
- **Compatibility Tests** (30 tests): Cross-version compatibility validation

### CI/CD Integration

- **Test Coverage Workflow**: Automated coverage checks on PRs and pushes
- **Regression Tests Workflow**: Golden Master validation and format stability checks
- **Performance Benchmarks**: Daily benchmark runs with trend analysis
- **Quality Checks**: Automated linting, type checking, and security scanning

### Contributing Tests

When contributing new features:

1. **Write Tests**: Follow the [Test Writing Guide](docs/test-writing-guide.md)
2. **Ensure Coverage**: Maintain >80% code coverage
3. **Run Locally**: `uv run pytest tests/ -v`
4. **Check Quality**: `uv run ruff check . && uv run mypy tree_sitter_analyzer/`
5. **Update Docs**: Document new tests and features

---

## 📚 Documentation

| Document | Description |
|----------|-------------|
| [Installation Guide](docs/installation.md) | Setup for all platforms |
| [CLI Reference](docs/cli-reference.md) | Complete command reference |
| [SMART Workflow](docs/smart-workflow.md) | AI-assisted analysis guide |
| [MCP Tools API](docs/api/mcp_tools_specification.md) | MCP integration details |
| [Features](docs/features.md) | Language support details |
| [Architecture](docs/architecture.md) | System design |
| [Contributing](docs/CONTRIBUTING.md) | Development guidelines |
| [Test Writing Guide](docs/test-writing-guide.md) | Comprehensive test writing guide |
| [Regression Testing Guide](docs/regression-testing-guide.md) | Golden Master methodology |
| [Changelog](CHANGELOG.md) | Version history |

---

**🎯 Built for developers working with large codebases and AI assistants**

*Making every line of code understandable to AI, enabling every project to break through token limitations*
