0.8 · in development

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.

The Deriva mark Contour lines that are messy at the edge and grow calmer inward, closing in a perfect core: the repository at the edge, then the intermediate graph and the output graph, and the ArchiMate model at the core.

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.

  1. 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
  2. 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
  3. 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
  4. 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.

Deriva Studio's Workspace in the dark theme: the run configuration on the left, the intermediate graph of the Deriva repository in the middle and the output graph on the right, with the live log below Deriva Studio's Workspace in the light theme: the run configuration on the left, the intermediate graph of the Deriva repository in the middle and the output graph on the right, with the live log below
The Workspace, with Deriva run on its own repository: the intermediate graph on the left, the output graph on the right.

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

Installation guide and how-tos

  1. Clone the repository

    git clone https://github.com/StevenBtw/Deriva.git
    cd Deriva
  2. Configure (then set your LLM in .env)

    cp .env.example .env
  3. Install

    uv sync
  4. Build the studio (once)

    cd studio
    npm install
    npm run build
    cd ..
  5. 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.