This is an exploration of profiling file changes to identify LLM code production and modifications. This is not meant to be used in any way other than exploratory. At a super high level there's two components to this project a VS Code extension and a Web App:
- The extension logs out metrics on each "change" aka local history point in vs code. This is logged out into the
/.vscodefolder in the workspace as change-events.jsonl. - A web app can then be used to visualise those metrics and features to explore classification thresholds and weightings and see how code changes over time would be classified.
I've dabbled with a few other ideas around how to create summaries of all the prior changes at the point of a commit. I think realistically though you'd want to be blasting sanitised change-events.jsonl to a remote endpoint and doing all the classification work on there.
My takeaway from this is that with a bit of time you 100% could very thoroughly classify individual changes as purely LLM or not. Currently (Jun 5th 2025) different LLMs have very different profiles in how the edits take place. Gemini 2.5 Flash vs Claude 4 Sonnet edit files in very different ways.
None of these features are tuned, if you open the web app crank the weighting of typing speed to the moon.
Here's a gif of the Web App Analysing a session

Here's gif of the changes I'm typing now being logged out into ./vscode/ai-code-analyzer/change-events.jsonl

I don't think I wrote a line of code in this it's pretty much all Cline with Calude Sonnet 4 and about $15 dollary doos of tokens.
Learnings from that:
- ROADMAP.md is amazing for having a shared persistence of state between tasks in a token cost effective way. I'm 100% doing that again.
- Once you have BUG_LOG.md it'll auto update it whenever it fixes a bug. It's a bit wild on it's classification and the LLM always thinks it's January 6th like it's in some memento loop.
Claude is insane at coding compared to google's model. Like claude with the right feedback loops just works - it's mind blowing.
AI code analysis platform consisting of a VSCode extension and Next.js web application, sharing a common core library. This project analyzes code changes to understand AI vs human contribution and review quality, helping developers and engineering managers gain insights into their development practices.
This project uses a monorepo architecture with three independent packages:
ai-code-analyzer/
βββ packages/
β βββ core/ # π¦ Shared business logic & types
β β βββ src/types/ # Unified TypeScript interfaces
β β βββ src/services/ # AI detection algorithms
β β βββ src/models/ # Data models
β β βββ src/utils/ # Shared utilities
β βββ extension/ # π VSCode extension (independent)
β β βββ src/services/ # VSCode-specific services
β β βββ src/extension.ts # Main extension entry
β β βββ out/ # Compiled extension
β βββ web-app/ # π Next.js application (independent)
β βββ src/app/ # App router pages
β βββ src/components/ # React components
β βββ src/lib/ # State management & utilities
β βββ .next/ # Next.js build output
βββ package.json # Root workspace configuration
βββ ROADMAP.md # Development roadmap
- β Independent Compilation: Extension builds standalone without web app
- β Shared Codebase: Eliminates duplication, ensures consistency
- β Modern Framework: Next.js for better performance and developer experience
- β Scalable Architecture: Easy to add new features and maintain
- β Optional Integration: Web app enhances but doesn't require extension
- Node.js 18+
- npm 8+
- VSCode (for extension development)
-
Clone the repository
git clone <repository-url> cd ai-code-analyzer
-
Install all dependencies
npm install
This installs dependencies for all packages using npm workspaces.
-
Build all packages
npm run build
This builds the core library first, then the extension and web app.
# Build and start all components
npm run build
npm run dev# Build the extension
npm run build:extension
# Package the extension
npm run package:extension
# Install the packaged extension in VSCode
code --install-extension ai-code-analyzer-0.1.0.vsix# Start the web app in development mode
npm run dev:web-app
# Or build and start in production mode
npm run build:web-app
npm run start:web-app# Build the core library
npm run build:core
# Run tests
npm run test:core
# Watch mode for development
npm run dev:corenpm test# Core library tests (60 tests)
npm run test:core
# Extension tests
npm run test:extension
# Web app tests
npm run test:web-appnpm run test:coveragePurpose: Shared business logic, types, and utilities
Key Features:
- Zero runtime dependencies
- Pure TypeScript implementation
- Comprehensive AI detection algorithms
- 60+ unit tests with deterministic focus
- Shared data models and validation
Usage:
import { AIDetectionEngine, EnhancedChangeEvent } from '@ai-analyzer/core';
const engine = new AIDetectionEngine();
const result = engine.analyzeChanges(changeEvents);Purpose: VSCode integration for real-time code analysis
Key Features:
- Real-time AI detection and review quality assessment
- Comprehensive logging system
- Status bar integration
- Export capabilities
- Uses shared core library
Commands:
AI Analyzer: Show Report- Display comprehensive analysis reportAI Analyzer: Analyze Current File- Analyze the currently open fileAI Analyzer: Show Change Timeline- View detailed change timelineAI Analyzer: Export Metrics- Export all metrics as CSV
Development:
# Open in VSCode for debugging
code packages/extension
# Press F5 to launch Extension Development HostPurpose: Advanced visualization and parameter tuning interface
Key Features:
- Modern Next.js 14+ with App Router
- Interactive data visualization components
- Parameter tuning interface
- Zustand state management
- Custom hooks for business logic
- Uses shared core library
Available at: http://localhost:3000 (when running)
Pages:
/- Main dashboard/dashboard- Analysis dashboard (coming soon)/tuning- Parameter tuning (coming soon)
packages/core/src/
βββ types/ # Shared TypeScript interfaces
β βββ ChangeEvent.ts # Change event definitions
β βββ AIDetection.ts # AI detection types
β βββ index.ts # Type exports
βββ services/ # Business logic services
β βββ AIDetectionEngine.ts # Core AI detection engine
β βββ index.ts # Service exports
βββ models/ # Data models
β βββ Session.ts # Development session models
β βββ ReviewQuality.ts # Review quality models
β βββ index.ts # Model exports
βββ utils/ # Utility functions
β βββ validation.ts # Data validation
β βββ calculations.ts # Statistical calculations
β βββ index.ts # Utility exports
βββ __tests__/ # Comprehensive test suite
packages/extension/src/
βββ extension.ts # Main extension entry point
βββ services/ # VSCode-specific services
β βββ AIDetectionService.ts # Extension AI detection wrapper
β βββ ChangeTracker.ts # File change monitoring
β βββ ReviewAnalyzer.ts # Review quality assessment
β βββ MetricsLogger.ts # Comprehensive logging
βββ test/ # Extension tests
packages/web-app/src/
βββ app/ # Next.js App Router
β βββ layout.tsx # Root layout
β βββ page.tsx # Main dashboard
β βββ globals.css # Global styles
βββ components/ # React components
β βββ DataImport.tsx # Data import interface
β βββ DecisionTree.tsx # Decision tree visualization
β βββ HeuristicRadarChart.tsx # Radar chart component
β βββ TimelineVisualization.tsx # Timeline component
β βββ ParameterTuning.tsx # Parameter tuning interface
βββ lib/ # Application utilities
β βββ store.ts # Zustand state management
β βββ hooks/ # Custom React hooks
βββ services/ # Web app services
βββ DataService.ts # Data management service
- Core Library Changes: Add shared logic to
packages/core/src/ - Extension Features: Add VSCode-specific features to
packages/extension/src/ - Web App Features: Add UI components to
packages/web-app/src/
The project uses npm workspaces with proper dependency management:
- Core builds first: Extension and web app depend on core
- Independent packages: Each can be built and deployed separately
- Shared dependencies: Common dependencies are hoisted to root
- TypeScript references: Proper project references for incremental builds
- Bulk Insertion Pattern: Large code blocks inserted rapidly
- Typing Speed Analysis: Unrealistic typing speeds (>200 WPM)
- External Tool Signatures: Patterns specific to AI tools
- Content Pattern Analysis: Complete functions/classes, structured code
- Timing Anomalies: Long pauses followed by rapid changes
- Time Investment: Development time before commit
- Multiple Edit Sessions: Evidence of returning to code
- Incremental Refinement: Small improvements over time
- Commentary Addition: Adding comments and documentation
- Code Restructuring: Refactoring and improvements
- Detects file changes made outside VS Code sessions
- Identifies bulk replacements and structured edits
- Tracks handoff patterns between tools and manual editing
- Analyzes collaboration signatures
All metrics are logged to .vscode/ai-code-analyzer/ in your workspace:
change-events.jsonl- Raw change events with timing and contextai-detection-metrics.jsonl- AI detection analysis and decision tracesreview-quality-metrics.jsonl- Review assessment datasession-summaries.jsonl- Development session analysiscommit-analysis.jsonl- Git commit correlations
{
"aiCodeAnalyzer.enableLogging": true,
"aiCodeAnalyzer.logLevel": "info",
"aiCodeAnalyzer.aiDetectionSensitivity": 0.7
}The web app uses environment variables for configuration:
# .env.local
NEXT_PUBLIC_API_URL=http://localhost:3000/api# Package the extension
npm run package:extension
# Publish to VS Code Marketplace (requires publisher account)
vsce publish# Build for production
npm run build:web-app
# Deploy to Vercel, Netlify, or any static hosting
npm run export:web-app- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make changes in the appropriate package(s)
- Add tests for new functionality
- Ensure all tests pass:
npm test - Build all packages:
npm run build - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Submit a pull request
- Make changes in the appropriate package
- Run tests to ensure functionality works
- Build packages to check for compilation errors
- Test integration between packages if needed
Phase 4 In Progress: Next.js Migration Underway (50% Complete)
- β Phase 1: Monorepo Setup (Completed)
- β Phase 2: Extract Shared Core Library (Completed)
- β Phase 3: Refactor VSCode Extension (Completed)
- π§ Phase 4: Migrate Web App to Next.js (In Progress)
- β³ Phase 5: Enhanced Architecture (Pending)
- β³ Phase 6: Testing & Validation (Pending)
See ROADMAP.md for detailed progress tracking.
MIT License - see LICENSE file for details
For issues and feature requests, please use the GitHub issue tracker.
For detailed project documentation, see the docs/ directory:
- Development Roadmap - Current progress and migration phases
- Bug Reports - Known issues and resolutions
- Phase Completion Reports - Detailed completion summaries for each development phase
See docs/development/ROADMAP.md for the complete development roadmap.
Current Status: Phase 4 (Next.js Migration) - 50% Complete
- β Phase 1: Monorepo Setup (Completed)
- β Phase 2: Core Library Extraction (Completed)
- β Phase 3: VSCode Extension Refactor (Completed)
- π§ Phase 4: Next.js Migration (In Progress)
- β³ Phase 5: Enhanced Architecture (Pending)
- β³ Phase 6: Testing & Validation (Pending)