The problem Teams building AI‑augmented codebases spend hours grepping for LLM calls, manually tracing branches, and rebuilding mental models after every prompt change. Codag automates that tracing: it extracts the full workflow, renders an interactive graph inside VS Code, and highlights which functions changed when files are edited.

What this does Codag analyses the codebase and produces a live, clickable DAG of every LLM call, decision branch, and data transformation. Key capabilities, grounded in the code, include:

  • Automatic workflow detection – tree‑sitter parsers scan 78 source files (70 TypeScript, 7 Python) and resolve 222 import edges, surfacing LLM calls from OpenAI, Anthropic, Gemini, LangChain, etc. The detection logic lives in frontend/src/tree-sitter/extractors.ts and frontend/src/analysis/workspace.ts.
  • Live graph updates – editing a file triggers an incremental re‑analysis; changed functions receive a green highlight. The update pathway runs through frontend/src/webview.tspostMessagestate.ts.
  • Click‑to‑source navigation – each graph node links to the exact function and line. The navigation mesh is built in frontend/src/webview-client/state.ts (27 functions, called from 9 other files) and frontend/src/webview-client/messages.ts (1 → 16 edges).
  • Export to PNG – the graph can be exported as a high‑resolution PNG via frontend/src/webview-client/export.ts.
  • Native theme support – graphs automatically adopt the VS Code light/dark theme, using styles defined in frontend/media/webview/styles.css.

How it is wired Execution starts at two entry points:

Entry pointFileReaches
initfrontend/src/tree-sitter/parser-manager.ts:7550 functions; called from 2 places
scheduleFileAnalysisfrontend/src/file-watching/handler.ts:476 functions; called from 1 place

The internal call graph contains 748 resolved call edges. Notable hubs and cycles:

  • Hub modulefrontend/src/webview-client/state.ts is depended on by 17 modules; any change has a broad blast radius.
  • Import cycles – four modules form circular dependencies: frontend/src/call-graph-extractor.ts, frontend/src/tree-sitter/extractors.ts, frontend/src/webview-client/directory.ts, and frontend/src/webview-client/visibility.ts.
  • Most connected functionspostMessage (34 callers), toRelativePath (20), log (16), estimateTokens (10).

Paths that leave the process: init → show → getHtml reads the filesystem via fs.readFileSync; outbound network calls are limited to 4 functions that make HTTP requests from backend/main.py.

How to use it The repository does not ship a documented start‑up script, but the presence of the following files gives a practical pathway:

  1. Clone the repository: ``bash git clone https://github.com/moses-y/codag ``
  2. Install dependencies (npm‑based front‑end, Python back‑end): ``bash cd codag/frontend && npm install cd ../backend && python -m pip install -r requirements.txt ``
  3. Build / run the extension – the VS Code extension is packaged from frontend/. Typical commands (inferred from package.json scripts) are npm run compile and npm run watch, or load the extension folder directly into VS Code for development.
  4. Start the backend server – run python backend/main.py (the entry point listed in the analysis) or use the provided Dockerfile: docker compose up --build.
  5. Open VS Code and enable the Codag extension; the graph appears in the side panel and updates as you edit files.

If the README or package.json scripts differ, consult those files for the exact commands.

Real‑world use A developer joins a LangChain project with 20 files and nested tool calls. After opening the codebase in VS Code and activating Codag, the extension instantly maps every LLM call, decision branch, and data transformation. The graph highlights the exact function that failed after a prompt tweak, and a click jumps to the source line. The team exports a PNG for documentation and watches the graph update in real‑time as they refactor.

Code health & issues (measured static‑analysis findings)

  • [HIGH] Add a test suite – 78 source files, no test files exist. Any change ships with no regression signal.
  • [HIGH] Add a CI/CD workflow – no .github/ CI config; every merge runs untested.
  • [HIGH] Build gate for Docker imagebackend/Dockerfile has no automated build validation.
  • [HIGH] Replace wildcard CORS originbackend/main.py sets allow_origins=["*"] with credentials enabled, a security risk.
  • [MEDIUM] Enable Dependabot/Renovate – 3 manifest files, no update bot configured.
  • [MEDIUM] Pin container base image by digestbackend/Dockerfile uses python:3.11-slim without a digest.
  • [MEDIUM] Move large binaries out of repomedia/demo.gif is 21.5 MB; every clone pays that cost.
  • [MEDIUM] Add timeout to outbound requestsbackend/Dockerfile has no timeout on the single outbound call.
  • [MEDIUM] Add non‑root USER to Docker image – container runs as root; no USER directive.
  • [LOW] Add convention files – missing .editorconfig, .gitattributes, formatter config.

The bottom line Codag provides a powerful, in‑VS‑Code view of AI/LLM workflows with minimal configuration, making it easy to trace and visualise complex pipelines. The codebase suffers from a lack of tests, CI, and several security / maintenance gaps that should be addressed before production use, especially the CORS wildcard and missing test coverage. It is well‑suited for AI engineers and agent builders who need rapid insight into code‑level LLM interactions, provided the hygiene items are resolved.