https://github.com/nshkrdotcom/elixir_scope
Revolutionary AST-based debugging and code intelligence platform for Elixir applications
https://github.com/nshkrdotcom/elixir_scope
ast ast-analysis beam code-analysis code-inspection code-intelligence debugging debugging-tools developer-tools elixir erlang-vm functional-programming nshkr-devtools otp static-analysis syntax-tree
Last synced: 3 days ago
JSON representation
Revolutionary AST-based debugging and code intelligence platform for Elixir applications
- Host: GitHub
- URL: https://github.com/nshkrdotcom/elixir_scope
- Owner: nshkrdotcom
- License: mit
- Created: 2025-05-30T04:14:30.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-06-10T05:11:56.000Z (12 months ago)
- Last Synced: 2025-12-28T04:34:01.529Z (5 months ago)
- Topics: ast, ast-analysis, beam, code-analysis, code-inspection, code-intelligence, debugging, debugging-tools, developer-tools, elixir, erlang-vm, functional-programming, nshkr-devtools, otp, static-analysis, syntax-tree
- Language: Elixir
- Homepage:
- Size: 2.32 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ElixirScope
ElixirScope is a unified AST-based debugging and code intelligence platform for Elixir applications. Built on a clean 8-layer architecture with Foundation as an external hex dependency for optimal modularity and deployment simplicity.
[](https://github.com/nshkrdotcom/elixir_scope/actions/workflows/elixir.yaml)
[](https://elixir-lang.org)
[](https://www.erlang.org)
[](https://hex.pm/packages/elixir_scope)
[](https://hexdocs.pm/elixir_scope)
[](LICENSE)
## Architecture
ElixirScope implements a clean 8-layer architecture built on top of the Foundation dependency:
```
┌─────────────────────────────────────┐
│ Debugger │ ← Complete debugging interface
├─────────────────────────────────────┤
│ Intelligence │ ← AI/ML integration
├─────────────────────────────────────┤
│ Capture Query │ ← Runtime correlation & querying
├─────────────────────────────────────┤
│ Analysis │ ← Architectural analysis
├─────────────────────────────────────┤
│ CPG │ ← Code Property Graph
├─────────────────────────────────────┤
│ Graph │ ← Graph algorithms
├─────────────────────────────────────┤
│ AST │ ← AST parsing & repository
├─────────────────────────────────────┤
│ Foundation │ ← Core utilities (DEPENDENCY)
└─────────────────────────────────────┘
```
## Dependencies
- **Foundation Layer**: Available as hex dependency `foundation ~> 0.1.0` ([HexDocs](https://hexdocs.pm/foundation/0.1.0/api-reference.html))
- **Development Tools**: Credo, Dialyzer, ExCoveralls, ExDoc
- **Testing**: Mox, StreamData
## Current Status
- ✅ **Foundation Layer**: Available as production-ready hex dependency
- ✅ **Project Structure**: Clean 8-layer skeleton created
- ✅ **Testing Framework**: Smoke, unit, integration test structure
- ✅ **Foundation Integration**: Successfully integrated and tested
- 🚧 **Upper 8 Layers**: Skeleton created, ready for implementation
## Quick Start
```bash
# Install dependencies
mix deps.get
# Compile the project
mix compile
# Run tests
mix test
# Run smoke tests (Foundation integration)
mix test.smoke
# Development check (format, credo, compile, smoke tests)
mix dev.check
```
## Development Commands
```bash
# Test categories
mix test.unit # Fast unit tests
mix test.integration # Cross-layer integration tests
mix test.smoke # Quick health checks
mix test.all # Complete test suite
# Quality assurance
mix dev.check # Format check, Credo, compile, smoke tests
```
## Layer Implementation
Each layer is a skeleton ready for implementation:
- `ElixirScope.AST` - AST parsing and repository
- `ElixirScope.Graph` - Graph algorithms and data structures
- `ElixirScope.CPG` - Code Property Graph construction
- `ElixirScope.Analysis` - Architectural pattern detection
- `ElixirScope.Capture` - Runtime instrumentation and correlation
- `ElixirScope.Query` - Advanced querying system
- `ElixirScope.Intelligence` - AI/ML integration
- `ElixirScope.Debugger` - Complete debugging interface
## Foundation Services
The Foundation layer provides enterprise-grade OTP services:
- **ConfigServer**: Dynamic configuration with validation
- **EventStore**: Comprehensive event system
- **TelemetryService**: Advanced metrics and monitoring
- **ProcessRegistry**: Service discovery with namespace isolation
- **Infrastructure Protection**: Circuit breakers, rate limiting, connection pooling
## Examples
```elixir
# Start the application
{:ok, _} = Application.ensure_all_started(:elixir_scope)
# Check layer status
ElixirScope.layers()
# [:ast, :graph, :cpg, :analysis, :capture, :query, :intelligence, :debugger]
# Parse Elixir code (basic AST layer functionality)
{:ok, ast} = ElixirScope.AST.parse("defmodule Test, do: :ok")
# Check current implementation status
ElixirScope.AST.status()
# :not_implemented
```
## Implementation Plan
This project is ready for implementation following a comprehensive architecture plan:
### Documentation
- **Complete Architecture Plan**: [`docs/claudeCodeArchPlan.md`](docs/claudeCodeArchPlan.md)
- **Reference Implementation**: [`docs/reference_implementation/`](docs/reference_implementation/) (302 files, 54k LOC)
- **Implementation Guides**: [`docs/implementation/`](docs/implementation/) - Layer-by-layer instructions
- **Full Documentation**: [`docs/README.md`](docs/README.md)
### Implementation Priority
1. **Graph Layer** (Week 2) - Lowest complexity, validates architecture (11 files, 506 LOC)
2. **AST Layer** (Weeks 3-4) - Core functionality, central hub (70 files, 16k LOC)
3. **Remaining Layers** (Weeks 5-16) - CPG, Analysis, Capture, Query, Intelligence, Debugger
### Unified Package Benefits
- **Single Dependency**: `{:elixir_scope, "~> 0.1.0"}`
- **Atomic Deployments**: All layers versioned together
- **Direct Integration**: Function calls vs. message passing
- **Shared Memory**: Efficient ETS table and cache sharing
Each layer is ready for implementation with the Foundation layer providing robust enterprise-grade infrastructure.