Deriva
From code repositories to ArchiMate models
Deriva reads a software repository, builds a graph of what is in it, and derives an ArchiMate enterprise architecture model you can open in Archi.
How it works
From mess to structure
Deriva works from the outside in, like its mark. Parsing and graph algorithms find the structure; an LLM reads what needs reading. Every prompt is versioned configuration you can open and change.
-
01 · clone
Repository
The code as it is: a Git repository, cloned locally. Deriva classifies every file by type, from source and config to docs, tests and build files.
cloneclassify -
02 · extract
Intermediate graph
Parsing turns the code into a graph of files, types, methods, dependencies, technologies and business concepts. Graph metrics then rank what matters.
parsePageRankLouvaink-core -
03 · derive
Output graph
Graph structure picks the candidates; an LLM classifies and names them within ArchiMate's rules, then refine steps tidy the result. The studio shows both graphs side by side.
generaterefine -
04 · export
ArchiMate model
The output graph exports as an ArchiMate model in the Open Group exchange format, ready to open in Archi.
exportArchi
Deriva Studio
Watch the model take shape
A local web app for the whole pipeline. Run a repository, follow every step and prompt live, compare the intermediate graph with the output graph, and edit the extraction and derivation settings as new versions.
Get started
Run it on your machine
Deriva runs locally: the studio in your browser, the pipeline and its databases on your machine. You bring the LLM, a cloud API key or a local model.
- Python 3.14 and uv
- Git and Node 22 (to build the studio)
- An LLM: Azure OpenAI, OpenAI, Anthropic or Mistral, or local with Ollama or LM Studio
-
Clone the repository
git clone https://github.com/StevenBtw/Deriva.git cd Deriva -
Configure (then set your LLM in .env)
cp .env.example .env -
Install
uv sync -
Build the studio (once)
cd studio npm install npm run build cd .. -
Start it (opens on http://127.0.0.1:8765)
uv run deriva
Research
A research project
Deriva is part of a research project on AI-assisted domain modeling. It is evaluated on held-out repositories; results follow with the final benchmark. The code is open source under the AGPL-3.0.