Deriva reads a software repository, builds a graph of what is in it, and derives an ArchiMate enterprise architecture model you can open in tools like Archi.
Deriva brings determinism to AI-assisted architecture model derivation. From repository to intermediate graph to output graph to the final ArchiMate model. Parsing and graph algorithms find the structure; an LLM reads what needs reading. Every prompt is versioned configuration you can open and change.
- Repository (clone): 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.
- Intermediate graph (extract): parsing (tree-sitter for most languages) turns the code into a graph of directories, files, types, methods, dependencies, technologies and business concepts. Graph metrics (PageRank, Louvain communities, k-core) then rank what matters.
- Output graph (derive): graph structure picks the candidates and names them; an LLM makes the closed choices structure cannot (a directory's role, which documented concepts and actors count, how components group into applications), each from a fixed list, within ArchiMate's rules; then refine steps tidy the result. The studio shows both graphs side by side.
- ArchiMate model (export): the output graph exports in the Open Group ArchiMate exchange format, ready to open in Archi.
uv tool install --python 3.14 deriva-studioThen run deriva: the studio opens in your browser. Deriva runs on your own machine; you bring the LLM, a cloud API key or a local model.
Everything else is on docs.deriva.dev:
- Get started: install, connect an LLM, derive your first model
- Studio, CLI, Configuration, Data and queries and Troubleshooting
- ArchiMate and Architecture: what Deriva derives and how it is put together
- Benchmarking and Optimization: measure and improve the model
- Changelog: what changed in each release
The pages are built from docs/ in this repository.
For development setup, architecture details, and contribution guidelines, see CONTRIBUTING.md.
This project is licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later).
This means you can freely use, modify, and distribute this software, but if you run a modified version as a network service, you must make the source code available to users of that service.
See LICENSE for the full license text.
The bundled business function model is an excerpt of APQC's Process Classification Framework® (PCF), used under APQC's license; see THIRD_PARTY_NOTICES.md.
- FastAPI and React - The studio
- anywidget-graph and anywidget-archimate - Graph and model views
- Grafeo - Embedded graph database
- DuckDB - Embedded relational database
- ArchiMate - Enterprise architecture standard
- Archi - Open source ArchiMate modeling tool
- Tree-sitter - Multi-language AST parsing
Status: Active Development