Skip to content

Latest commit

 

History

History
60 lines (49 loc) · 4.44 KB

File metadata and controls

60 lines (49 loc) · 4.44 KB
# CodeGraphX Implementation Status

## ✅ Implemented

### Phase 1: Core AST Extraction & Static Analysis
- **Multi-language support**: Integrated Tree-sitter for JS, TS, Python, CSS, and HTML.
- **Symbol Extraction**: Extraction of functions, classes, and scopes.
- **Call Graph**: Heuristic-based call resolution and import mapping.
- **Visualization**: D3-backed HTML dashboard (`codegraph.html`).

### Phase 2: Persistence & SCD Type 2
- **Postgres Backend**: Migrated from JSON cache to Postgres using Kysely.
- **SCD Type 2**: Tracking history of files, symbols, and edges using `valid_from_commit_id` and `valid_to_commit_id`.
- **Database Migrations**: Initial schema with repository and commit tracking.

### Phase 3: Deep Semantic Diffing & Impact Analysis (Current)
- **Git-to-DB Mapping**: Refactored `commit-scanner.js` to map git diff lines to Postgres symbol nodes.
- **Symbol Change Detection**: `getChangesInCommit` logic to identify Added, Modified, and Removed symbols via DB versioning.
- **Recursive Impact Tracing**: Recursive CTE-based traversal to calculate the "blast radius" of changes (upstream/downstream).
- **CLI Tools**: Added `cgx impact`, `cgx query`, and updated `session summary`.
- **MCP Server**: Full migration of all tools to query the Postgres backend.

### Phase 4: Semantic Intelligence & Task Verification (Completed)
- **Vector Search**: Integrated `pgvector`/`jsonb` fallback for symbol embeddings.
- **Relationship Inference Engine**: Automated detection of `ROUTES_TO` (decorators) and `IMPLEMENTS` (interfaces).
- **Framework Support**: Hardened logic for NestJS, FastAPI, Flask, and Django Rest Framework.
- **AI Context Builder**: Created `src/context-builder.js` for token-efficient deterministic evidence assembly.
- **Task Verification Engine**: Created `src/verifier.js` for grounded evaluation of task completion vs. graph changes.
- **Interrogation Engine (Task 4.4)**: Designed (and partially implemented) the Developer Interrogation Engine for generating technical follow-up questions.
- **CLI Integration**: Added `cgx verify` command for automated engineering validation.
- **Pipeline Integration**: Indexing pipeline in `src/scanner.js` now orchestrates AST, Inference, and Embedding passes.
- **Doctor Command Overhaul**: 
    - **Dynamic Built-in Filtering**: Spawns runtime subprocesses (Python/Node) to identify language built-ins and stdlib modules.
    - **Circular Dependency Detection**: Implemented DFS-based cycle detection in the file import graph.
    - **Python Import Fix**: Hardened `PythonAdapter` to support `import_list` (grouped imports) and parentheses.
    - **External Call Suppression**: Refined filtering to ignore calls originating from resolved external dependencies.
    - **Reporting**: Added de-duplication and fixed terminal ANSI escape sequence rendering.

### Phase 5: Scrum Intelligence & Pure Tool Refactor (Completed)
- **Intelligence SDK**: Created `IntelligenceSDK` class to decouple core logic from CLI.
- **Pure Evidence API**: Refactored `verifyTask` to `getVerificationEvidence` for deterministic, LLM-agnostic JSON output.
- **GitHub Webhook Pipeline**: Implemented `src/server/webhook-handler.js` for automated PR/Push scanning.
- **Architecture Drift Detection**: Built a rule engine in `src/sdk/drift-detector.js` to detect illegal cross-layer dependencies.
- **ESM/Jest Fix**: Configured Babel to handle ESM-only dependencies (`kysely`) in the Jest test suite.

### Phase 6: SQLite Portability & Skill Integration (Completed)
- **SQLite Backend**: Migrated default storage to `better-sqlite3` for zero-config npm portability.
- **Multi-Dialect Support**: Unified storage layer (`SqlGraphStore`) supporting both SQLite and Postgres.
- **Gemini Skill**: Created `using-cgx` Gemini Skill (`SKILL.md`) for proactive agentic discovery and impact analysis.
- **Portable ID Generation**: Moved UUID generation to application layer for dialect compatibility.

---

## ⏳ Remaining to be Implemented

### Phase 7: Cross-Language & Advanced Intel
- **Cross-Language Linking**: Connecting symbols across frontend (React/Next) and backend (Python/Node).
- **PR Review Automation**: Automatic impact report generation for Pull Requests integrated with SDK.
- **Scrum Dashboard**: Integrated visualization for verification results and architectural health.