CODYNEX Engine
Mines local Git history (git log) for architectural decisions, bug history, and churn hotspots to inform impact analysis, risk scoring, and change planning.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CODYNEX Enginewhat breaks if I change auth.py?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
๐งฌ CODYNEX Engine
๐งฌ CODYNEX Engine โ codebase intelligence: an engine that reads your entire
project and builds a structured model of it โ architecture, dependency graph,
design decisions, bug history. Blast-radius prediction โ ask what breaks if
you touch auth.py, and get a ranked impact analysis. Apply a patch in an
isolated sandbox and see the test verdict before the change ever lands.
Stdlib-only Python. Zero dependencies.
๐ Quickstart
git clone https://github.com/Thegreatprabh/codynex-engine.git
cd DNA
pip install -e . # stdlib only โ nothing else to install
dna init ./my-project # ingest โ build the DNA
dna map # architecture: components + dependency stats
dna impact "auth.py" # blast radius: what breaks if I change this?
dna plan "change the login system" # predict a natural-language change
dna verify --patch fix.diff # sandbox: apply patch, run tests, report
dna watch # keep the DNA updated as files changeThe DNA is saved as JSON at ~/.dna/<project>/dna.json (dir 0700).
Run dna watch during development, or re-run dna init after big changes.
Related MCP server: Weavatrix
๐งช How it works โ ingest โ model โ analyze โ verify
source code โโโบ INGEST โโโบ MODEL โโโบ ANALYZE โโโบ VERIFY
(.py files) ast parse ProjectDNA blast radius isolated
git log dep graph risk report sandbox
mining reverse decisions + pytest
graphIngest โ stdlib
astparses every Python file: imports (absolutepkg.suband relative.sibresolved to real files), functions, classes, call edges.git logis mined for architectural decisions, bug history, and churn hotspots. An intent extractor records what each component is for: module docstring, README mentions, and thetest_*names of tests importing it. No git? The graph still builds โ history is skipped gracefully.Model โ a
ProjectDNA: per-file components with one-line purpose summaries, a dependency graph and its reverse graph, decisions, hotspots, test coverage, and per-component intents. Persisted as JSON.dna watchkeeps it live: it polls mtimes and re-parses only changed files, so the model never goes stale.Analyze โ
dna impactruns reverse-BFS from your target over the dependency graph and scores every affected component.dna plantakes a natural-language change request, resolves it to components with a stated confidence, and returns the blast radius plus suggested tests.dna risksreports circular imports (Tarjan SCC), god-files, dead-code candidates, untested components.dna decisionslists design choices mined from commits.Verify โ
dna verifycopies the tree to a temp dir, applies your unified diff (context-verified โ mismatched hunks are refused, new-file creation rejected), and runs the project's own test suite with a timeout.
๐ฅ Blast-radius prediction
$ dna impact "auth.py"
target: auth.py โ auth.py, session.py, api/routes.py
affected components: 3
RISK SCORE DEPTH COMPONENT
------------------------------------------
high 5 1 session.py
ยท no test coverage
ยท churn hotspot
ยท depth 1
medium 3 2 api/routes.py
ยท no test coverage
low 1 1 auth.py
ยท target itself
โโ 3 components ยท 1 high-risk โโRisk scoring is explicit, not magic: no test coverage +2, circular dependency +2, churn hotspot +1, depth > 3 +1. Labels: 0โ1 low, 2โ3 medium, 4+ high. Every score comes with its reasons printed.
dna impact checkout --limit 30 # fuzzy match โ file, or even a function name๐ง Change planning โ predict before you change
$ dna plan "change the login system"
TARGET: auth.py (confidence: high)
request: change the login system
affected components: 3
RISK SCORE DEPTH COMPONENT
------------------------------------------
high 5 1 session.py
ยท no test coverage
ยท churn hotspot
medium 3 2 api/routes.py
ยท no test coverage
SUGGESTED TESTS:
tests/test_session.py
tests/test_routes.py
RISK SUMMARY: high=1 medium=1 low=0
HOTSPOTS IN BLAST:
session.py (12 commits)dna plan resolves your request to components (exact path/basename โ
high confidence, fuzzy match โ medium, keyword fallback โ low),
reuses the blast-radius engine, and suggests the tests that cover the
affected code. Confidence is always shown โ a low plan tells you the
match was a guess, not a fact.
๐งซ Sandbox verification
$ dna verify --patch fix.diff --path ./my-project
verifying patch in sandbox (project: ./my-project) ...
patched: auth.py
tests: PASS โ 42 passed, 0 failed in 1.8sThe patch is applied to a throwaway copy โ your working tree is never touched. Only verify projects you trust: the sandbox runs the project's own test suite, so it inherits your trust in that code.
๐๏ธ Live watcher โ DNA that stays current
$ dna watch --interval 2
ingesting /home/you/my-project ...
watching 38 files in /home/you/my-project (every 2s) โ Ctrl+C to stop
update #1: ~1 changed โ DNA saved (38 files)
update #2: ~1 changed, -1 deleted โ DNA saved (37 files)dna watch polls file mtimes (stdlib only โ no watchdog dependency) and
re-parses only the files that changed, then rebuilds and re-saves the
DNA. New files, deleted files, and edits are all picked up; Ctrl+C
exits cleanly. The DNA stops being a snapshot and becomes a living model.
๐ค MCP โ for AI agents
Four tools over stdio JSON-RPC. Malformed input returns -32600; the
server never crashes.
Tool | Args | Returns |
| โ | Components, dependency stats |
|
| Ranked blast radius with reasons |
|
| Full change prediction + suggested tests |
|
| Decisions mined from git history |
{ "project": { "command": "<FULL PYTHON PATH>", "args": ["-m", "dna", "mcp"] } }๐ Full per-agent setup guide: docs/SETUP_ALL_AGENTS.md โ Claude Code, Claude Desktop, Cursor, Codex, ChatGPT Desktop, Gemini CLI, Antigravity, Termux. (Golden rule: GUI apps need the full python path.)
โ ๏ธ Risk report
dna risksrisk report: my-project (38 components, 112 edges)
circular imports: 1
โป api/routes.py โ db/session.py โ api/routes.py
god-files (>500 lines): 2
legacy/parser.py (812 lines)
dead-code candidates (no inbound, no tests): 3
utils/old_helpers.py๐งฑ Honest limits โ v0.2.0
Python only. Other languages are invisible to the parser.
Fuzzy target matching is heuristic. Ambiguous names resolve to the first/best match; verify with
dna mapwhen unsure.dna planalways shows its confidence โ treatlowas a guess.Call-graph resolution is best-effort. Dynamic imports,
exec,getattr-style dispatch, and method calls on unknown receivers are not tracked. The dependency graph is file-level (imports), which is robust; function-level edges are informational.The sandbox runs the project's own test suite. Only verify projects you trust โ same trust level as running their tests locally.
Patch applier is minimal. Unified diffs with new-file creation (
/dev/nullsources) are rejected; complex renames may fail โ the tool refuses rather than mis-applying.The watcher polls. It checks mtimes on an interval (default 2s), so sub-second bursts of edits may batch into one update. It does not watch git history โ commit, then re-mine decisions with
dna init.Intent is extracted, not understood. Summaries come from docstrings, README mentions, and test names โ useful signal, not deep comprehension.
๐ Verify it yourself
python -m pytest tests/ -q # 56 tests โ should all passTests are fully mocked โ zero network, zero real git, under a second. Every badge above is checkable in this repo.
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐งฌ DNA CORE โ
โ ingest ยท model ยท analyze โ
โ ยท verify โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
โ INGEST โ โ MODEL โ โ ANALYZE โ
โ ast parser โ โ ProjectDNA โ โ reverse-BFS โ
โ import resolve โ โ dep + reverse โ โ risk scoring โ
โ git log miner โ โ decisions โ โ Tarjan cycles โ
โ degrades w/o โ โ hotspots โ โ god-files โ
โ git โ โ JSON @ ~/.dna โ โ dead code โ
โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ VERIFY + MCP โ
โ temp-dir sandbox ยท context-verified โ
โ patch applier ยท pytest ยท 3 MCP tools โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ~2,000 lines of Python. No frameworks. No dependencies. The whole model fits in one JSON file you can open and read.
๐ค Contributing
New analyzers are the best contribution:
Fork โ branch โ add your analyzer under
dna/analysis/Add a test in
tests/(mocked โ no network, no real git)pytest tests/ -qmust stay greenOpen a PR explaining what it detects and why it matters
๐ License
MIT ยฉ 2026 Prabhjot Singh. Know your codebase's genome before you edit it. ๐งฌ
Available Tools
4 toolsdna_decisionsC
Architectural decisions mined from git history.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| project | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden, and it says almost nothing. 'Mined from git history' weakly implies a read-only retrieval over a repository, but it omits whether a repo/path is required, whether results are cached, what scope 'project' selects, or how failures surface.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
It is a single short sentence with no padding and no wasted clauses, so it is not verbose. However it is a bare fragment rather than a front-loaded statement of purpose, and its brevity reflects under-specification rather than tight editing.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 2-parameter query tool with no annotations and no output schema, the description is too thin: it does not say what a result contains, how results are limited, or what the params mean. The absence of an output schema means the description should carry more, not less.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the description adds nothing about either parameter. Neither 'limit' (default value, max) nor 'project' (what identifier form, which repo) is explained anywhere, so the two parameters are effectively undocumented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description is a noun phrase that essentially restates the tool name (dna_decisions -> 'architectural decisions') with only the source qualifier 'mined from git history' added. There is no verb describing the operation and nothing that separates it from siblings dna_map, dna_impact, or dna_plan.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No when-to-use guidance is given and no alternative tool is mentioned. An agent cannot tell from the text whether this should be preferred over dna_map or dna_impact. There is no misleading statement, but there is also no routing information at all.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dna_impactC
Predict blast radius of changing a component.
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | ||
| project | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. "Predict" hints at a read-only analysis rather than a mutation, but it does not state permissions, whether the operation is safe, what happens if the target is invalid, or what the output represents.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with no filler or repetition. It is efficient, though its brevity contributes to the gaps captured in other dimensions.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with two parameters, no annotations, no output schema, and 0% schema description coverage, the description is too thin. It omits parameter meaning, usage context, and behavioral details that an agent needs to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage for both parameters, and the description never names or explains "target" or "project." The phrase "changing a component" loosely gestures at target, but project is entirely unaddressed, leaving both parameters semantically undocumented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ("Predict") and resource ("blast radius of changing a component"), so the agent can tell it performs impact analysis rather than mapping or planning. It does not explicitly differentiate itself from siblings like dna_map or dna_plan, but the core purpose is clear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus the sibling tools, nor any prerequisite or exclusion conditions. The only implicit signal is that it is for assessing change impact, which is not enough to route an agent reliably.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dna_mapC
Architecture summary of the ingested project.
| Name | Required | Description | Default |
|---|---|---|---|
| project | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden and delivers almost none of it. 'Summary' weakly implies a non-mutating read, but there is no statement about scope, cost, format, or what happens when the project parameter is omitted (required parameters = 0), leaving the mutation/safety profile entirely undefined.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
It is short and free of padding, which is a positive, but it is a sentence fragment rather than a front-loaded statement of action and scope. Brevity here reflects under-specification rather than disciplined concision.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no annotations, no output schema, a 0%-documented parameter, and no usage guidance, this one-line fragment is not sufficient for an agent to call the tool correctly. Almost everything an agent would need sits outside the description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and the single 'project' parameter has no description, so the description must compensate and does not. Saying 'the ingested project' does not tell the agent whether project expects a name, ID, path, or whether it may be omitted to summarize everything.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The phrase 'Architecture summary of the ingested project' names a resource and an output type, so the agent gets a rough idea of what comes back. But it is a noun fragment with no action verb and no differentiation from the sibling tools (dna_impact, dna_decisions, dna_plan), all of which sound equally like project-analysis reads.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no when-to-use statement, no prerequisite (e.g. 'project must be ingested first'), and no routing to alternatives such as dna_impact or dna_plan. The agent is left to guess from the name alone which of the four sibling tools to call.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dna_planC
Full change prediction for a natural-language request.
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | ||
| request | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the entire behavioral burden, and it discloses almost nothing: no indication of whether this is a read-only analysis or a mutating operation, no permission requirements, no cost/latency, and no note that a 'plan' may produce a large multi-file result. The word 'prediction' weakly implies a non-destructive analysis, but nothing is stated.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
It is a single front-loaded sentence with no filler, so nothing is wasted. However, the brevity is under-specification rather than efficiency: a meaningful statement about scope or output would have earned its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, no annotations, 0% schema coverage, and two undocumented parameters, the description should compensate but does not. It never says what a returned 'plan' contains or how 'project' scopes the prediction, so an agent lacks enough to invoke this confidently.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and neither parameter is documented in the schema. The description hints that 'request' is natural-language free text, but says nothing about the optional 'project' parameter โ its format, scope, or default โ leaving half the inputs unexplained in both places.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The phrase 'Full change prediction' gives a rough verb+resource, but it is vague about what a 'prediction' actually yields and gives no distinction from the sibling dna_impact, which presumably also concerns change consequences. An agent cannot reliably tell from this sentence alone which of dna_plan/dna_impact/dna_map to pick.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no when-to-use guidance, no prerequisites, and no reference to the sibling tools (dna_map, dna_impact, dna_decisions) that clearly occupy adjacent roles. The only implicit cue is 'natural-language request', which does not route the agent among alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v0.2.0- First observed
dna_decisions - First observed
dna_impact - First observed
dna_map - First observed
dna_plan
TDQS
Scored across 4 tools
Each tool targets a distinct capability: architecture summary, component impact, historical decisions, and request-level change planning. No two tools overlap in input or output scope, so an agent can easily select the right one.
All four tools use the dna_ prefix followed by a single noun (map, impact, decisions, plan), forming a consistent and predictable naming convention.
Four tools are well-suited for a focused architecture analysis engine; each covers a unique analysis dimension without redundancy.
The set covers key analysis outputs (summary, impact, decisions, plan) but lacks a tool to ingest/refresh the project or drill into specific components/decisions, leaving minor workflow gaps.
Maintenance
Related MCP Connectors
Codebase intelligence for AI agents โ dead code, blast radius, ownership.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Deterministic context layer for your codebase: change impact, blast radius, answers with receipts.
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceLive codebase intelligence for AI agents. Import graph PageRank for file importance, git forensics for co-change coupling and fragile code, convention detection across 16 domains, and blast radius analysis.4 npm3Business Source 1.1
- AlicenseNot gradedqualityAmaintenanceProvides a dependency graph of any local repository with tools for change impact, transitive dependents, health audits, and more, enabling AI coding agents to see structure and refactor safely.4,912 npm4MIT
- AlicenseNot gradedqualityBmaintenanceAI-powered codebase intelligence tool that builds a dependency graph of a git repo for structural Q&A and pre-PR code review. It exposes MCP tools for blast radius, review sessions, and static analysis, running locally over stdio with no LLM or network dependencies.MIT
- AlicenseBqualityBmaintenanceEnables AI agents to index local Python repositories and retrieve code intelligence through semantic search, caller lookups, hybrid context expansion, and visualization.5MIT