Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- **Tree-sitter Dependency Extraction (Phase 1)**: Static AST-based analysis mode
- New `tree-sitter-dependency-graph` processing mode
- Multi-language support framework for Python, TypeScript, JavaScript, Go, Rust, Java, Swift
- Python extraction fully implemented: classes, functions, methods, imports
- Component relationship extraction from static analysis
- Uses tree-sitter-language-pack for fast, accurate parsing
- No AI/API calls required - pure static analysis

### Changed
- Added `tree-sitter-language-pack>=0.10.0` dependency to setup.py
- Made tree-sitter processor optional (graceful fallback if not installed)

## [1.3.0] - 2025-10-28

### Added
Expand All @@ -20,6 +35,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added `--mode` / `-m` option to select processing mode
- Added `--list-modes` flag to display available processing modes
- Default mode: `openai-agents-dependency-graph` (backward compatible)
- **Graph Export Integration**: Merged graph export features from v1.2.0
- `--format` option to export graph data (JSON, pickle, GraphML)
- Structured JSON output format optimized for integrations
- **Documentation**:
- Added comprehensive developer guide: `docs/ADDING_PROCESSING_MODES.md`
- Updated README.md with processing modes information
Expand Down
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,32 @@ Uses OpenAI Agents SDK to analyze code and generate component-level dependency g
- Analyzes dependencies between components
- Generates a visual dependency graph showing how components relate to each other
- Best for understanding architectural changes and component interactions
- **Requires**: OpenAI API key

#### `tree-sitter-dependency-graph` (NEW in Phase 1)
Static AST-based dependency extraction using tree-sitter. This mode:
- Parses source files using tree-sitter for accurate syntax analysis
- Extracts components (classes, functions, methods) from AST
- Identifies import statements and function calls
- Supports multiple programming languages:
- **Python** (fully supported)
- TypeScript, JavaScript, Go, Rust, Java, Swift (in progress)
- No API calls required - pure static analysis
- Fast and deterministic results
- Best for quick analysis without AI costs

Example usage:
```bash
# Use tree-sitter mode for Python analysis
wild diff --mode tree-sitter-dependency-graph

# Export tree-sitter analysis as JSON
wild diff --mode tree-sitter-dependency-graph --format graph
```

### Future Modes

The architecture is designed to support additional processing modes:
- **tree-sitter-dependency-graph**: AST-based analysis using Tree-sitter
- **data-flow-analysis**: Focus on data flow and transformations
- **user-context-analysis**: Analyze changes from a user interaction perspective
- **architecture-analysis**: System-level architectural insights
Expand Down
7 changes: 7 additions & 0 deletions diffgraph/processing_modes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ def list_available_modes() -> Dict[str, str]:
# This will be populated as we add more processors
from . import openai_agents_dependency # noqa: F401, E402

# Import optional processors
try:
from . import tree_sitter_dependency # noqa: F401, E402
except ImportError:
# tree-sitter-languages not installed, skip this processor
pass


__all__ = [
"BaseProcessor",
Expand Down
Loading