Metadata-Version: 2.4
Name: atlas-strata
Version: 0.1.0
Summary: Intelligent code analysis tool for understanding any codebase. Analyze dependencies, risks, and architecture instantly.
Author: Puneet Ghanshani
License: MIT
Project-URL: Homepage, https://github.com/punitganshani/atlas-strata
Project-URL: Documentation, https://punitganshani.github.io/atlas-strata/
Project-URL: Repository, https://github.com/punitganshani/atlas-strata.git
Project-URL: Issues, https://github.com/punitganshani/atlas-strata/issues
Project-URL: Changelog, https://github.com/punitganshani/atlas-strata/releases
Keywords: code-analysis,dependency-graph,codebase-understanding,architecture-analysis,code-intelligence,static-analysis,cli,github-copilot
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: networkx>=3.0
Requires-Dist: rich>=13.0
Requires-Dist: tree-sitter>=0.25
Requires-Dist: tree-sitter-python>=0.20
Requires-Dist: tree-sitter-typescript>=0.20
Requires-Dist: tree-sitter-java>=0.20
Requires-Dist: tree-sitter-go>=0.20
Requires-Dist: tree-sitter-c-sharp>=0.23.0
Requires-Dist: diskcache>=5.6
Requires-Dist: pydantic>=2.0
Requires-Dist: scikit-learn>=1.0
Requires-Dist: jinja2>=3.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=3.0; extra == "dev"
Requires-Dist: black>=22.0; extra == "dev"
Requires-Dist: flake8>=4.0; extra == "dev"
Requires-Dist: mypy>=0.950; extra == "dev"
Dynamic: license-file

# Atlas Strata - Code Architecture Analysis

A pure Python CLI for analyzing codebase architecture, dependencies, and code quality. Works standalone or with GitHub Copilot CLI.

## Features

- **Intelligent Code Analysis** - Build dependency graphs automatically
- **Architecture Understanding** - Identify coupling, cycles, dead code, impact analysis  
- **Health Scoring** - Rate architecture quality and surface issues
- **Dependency Visualization** - Interactive browser-based graphs
- **Two Usage Modes** - Standalone CLI for automation, Copilot CLI for exploration
- **Multiple Languages** - Python, TypeScript, Java, Go, C#
- **JSON Export** - Integration with CI/CD and other tools
- **Cross-platform** - Windows, macOS, Linux
- **Smart Recommendations** - Dual-pass analysis with AST accuracy + LLM reasoning
  - Pass 1: Precise code analysis with evidence
  - Pass 2: LLM validation (in Copilot CLI mode)

## Quick Start

### Installation

```bash
pip install atlas-strata
```

### Choose Your Mode

#### Mode 1: Standalone (Automation-Ready)
```bash
# Quick analysis
atlas analyze .

# Generate interactive graph
atlas visualize . --format html

# Check code health
atlas health .

# Get JSON for CI/CD
atlas analyze . --format json > analysis.json
```

#### Mode 2: Copilot CLI (Interactive with LLM)
```bash
copilot: @atlas analyze --path .
copilot: What's causing high coupling?
copilot: How do I reduce it?
```

### Common Tasks

```bash
# Find circular dependencies
atlas health cycles .

# Detect dead code
atlas health dead-code .

# Query dependency paths
atlas query --from auth.py --to main.py

# Get recommendations (AST-based)
atlas analyze . --show-evidence

# Get detailed report with recommendations
atlas report . --show-evidence

# Get recommendations with LLM reasoning (in Copilot CLI mode)
@atlas analyze . --show-evidence
@atlas report . --show-evidence
```

## Documentation

- **[Standalone Mode Guide](/site/content/modes/standalone.md)** - Complete CLI reference, automation examples, CI/CD integration
- **[Copilot CLI Guide](/site/content/modes/copilot-cli.md)** - Interactive queries, LLM reasoning, example conversations
- **[Mode Comparison](/site/static/comparisons/modes-comparison.md)** - Decide which mode to use
- **[Command Reference](/site/content/reference/_index.md)** - All commands documented with examples
```bash
# Check health metrics in pipeline
atlas atlas analyze . --output json --json-output metrics.json

# Generate reports for tracking
atlas atlas report . --json-output ci-report.json
```

### Ask Complex Questions
```bash
# Interactive mode for exploration
atlas ask "what's the impact of changing auth module?" --path ./src --interactive

# Via Copilot CLI (recommended)
@atlas ask "show me all circular dependencies"
```

## Documentation

- **[Getting Started](docs/agent/getting-started.md)** - Installation and first steps
- **[Complete Workflow Guide](docs/analysis-workflow.md)** - Step-by-step analysis workflow
- **[Real Command Outputs](docs/guides/command-outputs.md)** - Examples with actual outputs
- **[CLI Dependencies](docs/guides/cli-dependencies.md)** - Parameter analysis and execution order
- **[CLI Validation Report](docs/guides/cli-validation-report.md)** - Test results and verification
- **[CLI vs Copilot Integration](docs/cli-integration.md)** - When to use each mode
- **[Installation Guide](docs/agent/installation.md)** - Multiple installation methods
- **[API Reference](docs/api/index.md)** - API documentation
- **[Architecture](docs/atlas/architecture.md)** - System design and layers
- **[Recommendations Guide](docs/guides/recommendations.md)** - Smart code quality recommendations with evidence

## Commands

### Standalone CLI

```bash
# Analyze directory
atlas analyze <path> [--format json|text|mermaid]

# Generate health report
atlas report <path>
atlas health <path>

# Visualize dependency graph
atlas visualize <path> [--format html|json] [--output FILE]

# Query dependencies
atlas query --from <source> --to <target> <path>

# Show help
atlas --help
```

### Copilot CLI Integration

```bash
# Ask questions interactively
copilot: @atlas analyze --path .
copilot: @atlas visualize --path . --format json
copilot: @atlas query --from auth --to main --path .
copilot: @atlas health --path .
```

See [Command Reference](/site/content/reference/_index.md) for complete documentation.

## Running Tests

```bash
# Run full test suite
pytest tests/

# Run specific tests
pytest tests/test_cli.py -v

# With coverage
pytest --cov=agent tests/
```

Expected: 159+ tests passing

## Architecture

Atlas uses a **pure Python architecture**:

- **Core Modules**: `agent/atlas/core/` - Analysis engines (Analyzer, QueryEngine, Visualizer, Formatters)
- **Existing Analysis Infrastructure**: Reuses all existing analyzers (BlastRadius, DeadCode, Cycles, Coupling, Health)
- **CLI Layer**: `agent/cli.py` - Command-line interface using Click
- **No Internal LLM**: All LLM reasoning handled by Copilot CLI

### No External Dependencies for LLM
- ✅ No GitHub Copilot SDK imports
- ✅ No direct API calls
- ✅ No hardcoded credentials
- ✅ Pure JSON output to stdout
- ✅ Copilot CLI manages all LLM authentication

## Website

Documentation website: [site/](site/) (built with Hugo)

Key sections:
- [Getting Started](/site/content/docs/getting-started.md) - Setup and first steps
- [Standalone Mode](/site/content/modes/standalone.md) - Complete CLI guide
- [Copilot CLI Mode](/site/content/modes/copilot-cli.md) - Interactive exploration
- [Mode Comparison](/site/static/comparisons/modes-comparison.md) - Choose your mode
- [Command Reference](/site/content/reference/_index.md) - All commands documented

## Development

See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.

Key information:
- Python 3.8+
- Pure Python execution (no subprocess calls)
- Reuse existing analysis infrastructure
- Write testable code

## License

See [LICENSE](LICENSE) file.
