AI agent analyzing software to map codebase dependencies automatically

Map Codebase Dependencies Automatically for AI Agents

Automatic codebase dependency mapping builds a living graph of modules, call chains, and runtime relationships using Tree-sitter and Neo4j, accessible to AI tools via MCP. It surfaces transitive impact, dead code, and risk clusters across repos, reducing duplicate logic and enabling safer refactorin

Dan Greer · · 9 min read
Developers reviewing code on screen during codebase audit for AI assisted development

Codebase Audit for AI-Assisted Development

AI-driven development speeds delivery but hides debt—duplicate logic, dead code, and architectural drift—without a modern audit. A graph-based, auto-updating code map (Neo4j-backed) like Pharaoh reveals reachability, duplication, dead code, and risk across the whole repo. When connected to AI agents

Dan Greer · · 8 min read
Prevent orphaned code in AI development with effective code management and best practices

15 Proven Ways to Prevent Orphaned Code in AI Development

This playbook argues for preventing orphaned AI code by prioritizing code connection and production reachability, using graph checks like Pharaoh to verify exports are reachable. It prescribes an entry-point–first design, upfront codebase mapping, full module context, and wiring as you go. It also e

Dan Greer · · 8 min read
Detect dead exports in JavaScript for cleaner code and improved AI project efficiency

Detect Dead Exports JavaScript for Cleaner AI Code

Dead exports are unreferenced exports in JavaScript—clutter that slows AI-assisted development and increases risk. Detect them with project-wide static analysis, using Knip for monorepos and ts-prune for TypeScript, while watching for false positives from barrels and dynamic imports. Tree-shaking wo

Dan Greer · · 9 min read
Dashboard showing tools and metrics to find unused code in TypeScript project efficiently

How to Find Unused Code in Your TypeScript Project Fast

Dead code in fast-moving TypeScript projects slows builds and confuses AI-driven development. It piles up from rapid changes, fear of breaking unseen consumers, AI duplicates, and hidden abstractions. Automated tools like Knip (and ts-prune, unimported) plus graph maps (ENRE-ts, Pharaoh) reveal

Dan Greer · · 9 min read
Diagram illustrating how to check blast radius before refactoring code for AI agent readiness

Check Blast Radius Before Refactoring for AI Agent-Ready Code

Before refactoring with AI agents, you must check blast radius to avoid silent breakages. The article promotes deterministic knowledge-graph blast-radius analysis (Pharaoh) that parses code with Tree-sitter and stores relationships in Neo4j, enabling multi-hop reachability for changes. Integrating t

Dan Greer · · 8 min read
How to prevent regressions with AI coding: team reviewing code with AI tools on laptops

How to Prevent Regressions with AI Coding for Small Teams

AI coding accelerates regressions due to limited context, causing silent breakages and duplication in small teams. The guide promotes an architecture-first approach: model the codebase as a living knowledge graph that agents can query to guide changes. It adds guardrails—blast radius, reachability,

Dan Greer · · 9 min read
Diagram illustrating codebase context for AI agents analyzing and interacting with project repositories

How to Build Codebase Context for AI Agents in Your Repo

AI agents work best with true codebase context—a structured, graph-backed map of modules, dependencies, and endpoints—not file dumps. Flat context misses links and drifts while inflating token costs; deterministic parsing (Tree-sitter) keeps facts reliable. Pharaoh converts TS/Python repos into a Ne

Dan Greer · · 8 min read
Dead code detection MCP concept showing agent optimizing code for faster intelligence development

Dead Code Detection MCP: Boosting Agent Intelligence Fast

Dead code detection MCP gives real-time, deterministic identification of unused or unreachable code, making its truth accessible to AI agents and tools like Claude Code and Cursor. It exceeds traditional tools by cross-repo reachability with Tree-sitter and graph databases and eliminates runtime LLM

Dan Greer · · 7 min read
Illustration showing developers using tools to function search across codebase efficiently

8 Powerful Ways to Function Search Across Codebase Efficiently

The piece outlines eight strategies to search, validate, and reuse functions at scale in AI-augmented codebases, emphasizing speed, accuracy, and deterministic results. It centers on Pharaoh search_functions, a Neo4j knowledge graph with MCP that delivers import-path aware results and zero per-query

Dan Greer · · 8 min read