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 brings determinism to AI-assisted architecture model derivation. 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 decides the elements and most of their names, and only relationships the ArchiMate 3.2 metamodel allows are drawn. An LLM makes the few closed choices structure cannot, each asked once, then refine steps tidy the result. In the studio, each element links back to the graph nodes it came from.
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 and watch it unfold on one canvas: the intermediate graph grows step by step, and each derived element links back to the nodes it came from. Follow every step and prompt live, read the model at the enterprise or solution level, and edit the 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 (uv downloads Python for you)
- Git, to clone the repositories you analyse
- An LLM: Azure OpenAI, OpenAI, Anthropic or Mistral, or local with Ollama or LM Studio
-
Install Deriva
uv tool install --python 3.14 deriva-studioDeriva ships as three packages on PyPI:
deriva-studio(the studio and the command line),deriva-cli(the command line only) andderiva-dev(both, plus benchmarking). To try it without installing:uvx --python 3.14 deriva-studio. -
Start it (opens on http://127.0.0.1:8765)
derivaDeriva keeps its settings and data in
~/.deriva. On first start a banner points to General, where you add an LLM model.
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.











