Type
CLI toolkit for AI-assisted development
Tools
sourcevision · rex · hench
Runs with
Claude Code · Codex · Gemini · local models
Price
$0 — no seat, no markup
License
Elastic 2.0 (source-available)

Map it. Plan it. Ship it.

n-dx reads the repo you already have, turns what it finds into a living plan stored in git, and has an agent work that plan one task at a time — in your terminal, with Claude Code or Codex.

Free play. No seat, no subscription, no token markup. n-dx runs on the Claude Code or Codex plan you already pay for — or on a local model.

sourcevision ▸ en-dash-consulting/n-dx Mapped 000%
Move across the map to scan
An interactive pixel map of the n-dx monorepo: 2,067 files grouped into 42 architectural zones by sourcevision, with nine of its real findings pinned to the zones they concern.
  • 2,067files
  • 620,046lines
  • 42zones
  • 2,884zone crossings
  • 106findings
  • n-dx on its own monorepo.
    Sep 28, 2026.

Free to use, with no charge on top of your existing plan. Works with Claude Code, Codex, Gemini, LM Studio, Ollama, MCP, git worktrees, Notion, and GitHub Actions.

01IntroductionScroll ↓

AI agents write code fast. Then they forget what they built, why they built it, and what comes next. n-dx gives them a map of the codebase, a plan that lives in git, and a loop that works through it.

02Problems

Your agent is fast.
It is also lost.

Chat-driven coding works at the file level. Real repos fail at the project level — the part no prompt carries from one session to the next.

  1. Blind01

    It can't see the architecture

    Agents read files one at a time. Zones, boundaries, and the import graph stay invisible, so every change is a local guess.

  2. Amnesiac02

    Every session starts from zero

    Context evaporates between runs. You re-explain the repo, the goal, and what's already done — again.

  3. Drift03

    The plan and the code disagree

    A spec written up front is stale the week you ship. Nobody re-derives it from what's actually in the tree.

  4. Unaccounted04

    Nothing records what ran

    Which task, which model, how many tokens, which files changed? A chat log can't answer that.

03The loop

One loop.
Four levels.

Run it once to get started. Run it again to stay current. Each level feeds the next, and the PRD keeps score.

World 1-1 · sourcevision

Analyze

Inventory, import graph, Louvain zones, components, call graph. Written out as CONTEXT.md and llms.txt, so any agent starts with the architecture instead of guessing it.

ndx analyze .

ndx analyze · sample notes app
> ndx analyze .
Vendor: claude  Model: claude-sonnet-5 (configured)
[phase 1] Inventory...
  83 files (25 cached, 1 changed, 57 new, 0 deleted)
[phase 2] Imports...
  22 edges, 9 external
[phase 3] Classifications...
  10 classified, 0 unclassified
[phase 4] Zones...
  Enriching zones...
  6 zones, 11 crossings, 1 unzoned
  16 findings, 41 insights (enrichment pass 1)
    · [pattern] One dependency cycle: editor-hooks ↔ note-editor.
[phase 5] Components...
  5 components, 0 route modules, 6 usage edges
[phase 6] Call graph...
  24 functions, 627 calls, 12 files
[output] llms.txt + CONTEXT.md + zones/ → .sourcevision
Done. 

World 1-2 · rex

Plan

Findings become epics, features, and tasks with priorities, dependencies, and acceptance criteria. Or describe the work in plain English. Nothing lands in the PRD until you accept it.

ndx recommend --accept . ndx add "Add SSO support" .

ndx add · sample notes app
> ndx add "tag notes automatically with an LLM" .
▣ LLM-Powered Auto-Tagging
└─ ▤ LLM Tag Suggestion and Review
   ├─ ○ Integrate LLM API to generate tag suggestions [critical]
   │   ✓ LLM is called after each save, debounced
   │   ✓ Prompt returns 3–7 lowercase tags as JSON
   │   ✓ API errors shown as a non-blocking warning
   │   ✓ Malformed responses fall back to no suggestions
   └─ ○ Build tag suggestion review UI [high]
       ✓ Suggested tags are visually distinct
       ✓ Accepting moves a tag to confirmed in one click
       ✓ Rejected tags are never re-suggested

Accept proposals? (y=all / n=none / b#=break down /
c#=consolidate / 1,2,...=select) y 

World 1-3 · hench

Work

Hench takes the highest-priority unblocked task, briefs the agent with the PRD and the analysis, and runs a tool-use loop inside guardrails. Every run is recorded, down to the tokens.

ndx work --auto .

ndx work · sample notes app
Vendor: claude  Model: claude-sonnet-5 (configured)
Actionable tasks (by priority):
  1. [critical] Build note editor with auto-save
  2. [critical] Design note data model and storage
  3. [high]     Build related notes panel

── Task ───────────────────────────
  [Task]    Build note editor with auto-save
            Priority: critical
            Context: Core Note Management → Note Storage
            Acceptance criteria: 6
═══════════════════════════════════
❯ Agent Run (claude-sonnet-5)
═══════════════════════════════════
  prompt total: 4443 bytes (2 sections)
  [Tool] Read({"file_path":"src/store/noteStore.ts"})
  [Tool] Edit({"file_path":"src/editor/NoteEditor.tsx"})
  [Tool] Bash({"command":"npx vitest run"})
  

World 1-4 · iso map

See

Render the architecture as an isometric map: a block per zone, sized by files and lines, coloured by what it does, wired by its imports. One standalone HTML file to open, commit, or attach to a review.

ndx iso . ndx start .

n-dx27 of 27 zones1,957 files584,686 linessourcevision analysis
04ToolsPress start

Choose your tool.
Or take all three.

Three packages behind one command, ndx. Each works alone; together they close the loop.

P1The scanner

sourcevision

Static analysis that turns a repo into context an agent can use.

  • File inventory with content hashes
  • AST import graph and cycle detection
  • Louvain zones with cohesion and coupling
  • React / Preact component and route catalog
  • CONTEXT.md · llms.txt · zones.json
10 MCP toolsndx analyze .
P2The planner

rex

A PRD that lives in your repo as a folder of markdown.

  • Epic → feature → task → subtask
  • Priorities, blockers, acceptance criteria
  • Proposals from findings, or plain-English ndx add
  • Acceptance criteria mapped to tests
  • Sync to Notion for non-engineers
19 MCP toolsndx recommend .
P3The builder

hench

An agent loop that works the plan, one task at a time.

  • Picks the next unblocked task by priority
  • Briefs with PRD and codebase context
  • Claude Code, Codex, Gemini, or local models
  • Allowlisted commands, blocked paths, rate limits
  • Full transcripts in .hench/runs/
50 turn cap (default)ndx work .
05Features

Built for the repo
you already have.

Not a demo on a blank folder. The details that matter once an agent is committing to a codebase people depend on.

A

The plan lives in git

Every PRD item is a folder under .rex/prd_tree/ with an index.md. Review a plan change like any other diff.

B

Parallel worktrees

Each git worktree claims its own task, and the others skip it. Run several agents on one repo without collisions.

C

29 MCP tools

ndx init writes .mcp.json and .codex/config.toml. Your agent can read and update the PRD directly.

D

Every token on the tab

Token usage rolls up to the PRD item that spent it. ndx usage turns it into a cost estimate.

E

Self-heal

Re-analyze, recommend, execute, acknowledge — N times over. Fixed findings don't come back as new.

ndx self-heal 3 .

F

A second opinion

One vendor builds; the other reviews by running your tests. ndx pair-programming — or ndx bicker.

G

Guardrails, not vibes

An allowlist of commands. No git push, reset, or rebase. .git and .rex are off-limits. 60 commands a minute. The agent can't edit its own guard config.

H

Commits that explain themselves

Hench signs its work with git trailers: status, vendor, model, run, and a permalink to the PRD item.

feat(editor): auto-save notes on idle

N-DX-Status: completed
N-DX: claude/claude-sonnet-5/run-0192
N-DX-Item: …/prd/build-note-editor
06Use cases

Made for the people
in the codebase.

  1. A prototype became the product. n-dx finds the patterns and anti-patterns across zones, turns them into a prioritized backlog, and works it down with guardrails on.

  2. New to a repo, human or agent? One analysis gives you the zones, the hubs, the cycles, and a CONTEXT.md that reads in minutes instead of days.

  3. Describe what to build in plain English. Rex structures it into epics, tasks, and acceptance criteria; hench executes from that structure, and every run traces back to the spec.

  4. The code never stops changing, so the plan can't either. Self-heal re-derives findings from the tree and acknowledges what's fixed, so the PRD stays true without manual tracking.

  5. A shared source of truth without another planning tool. ndx ci checks PRD health on every push; Notion sync shows progress to people who never open a terminal.

07How it compares

The only tool
that owns the loop.

Most AI development tools cover one layer. n-dx connects all three and keeps them in sync.

Capabilityn-dxClaude CodeAiderOpenHandsGooseMetaGPT8090Devin
Codebase analysis
Structured PRD / task tree
Autonomous execution loop
Works with your AI subscription
Persistent state across sessions
Source code public
CLI-first / local
Full Partial No · Public documentation as of Q1 2026 Looking at Spec Kit, OpenSpec or Kiro? →
09Get started

Press
start.

Free, with nothing to sign up for. Node.js 22+ on macOS, Linux, or WSL2 — log in to the Claude Code or Codex account you already have on first run and you're set.

$ npm i -g @n-dx/core
  1. 1ndx init .set up all three tools + MCP
  2. 2ndx analyze .map the codebase
  3. 3ndx recommend --accept .turn findings into a PRD
  4. 4ndx work --auto .let hench work the plan
  5. 5ndx start .open the dashboard

Just kicking the tires? ndx install-sample . sets up a throwaway app to try it on, and ndx destroy-sample . removes it.

ship-it.exeShipped 000
Space / tap to jump · dodge the bugs

Built by En Dash Consulting

Questions?
Let's talk.

Evaluating n-dx for a team, or stuck on a specific repo? Write to us. Putting people on the codebase with you is consulting, not a CLI flag.

Get in touch →