Listed from the MCP registry; nobody on Odel publishes it.

MCP server: One MCP server.

Wingbox

@aileron-techRun by its publisher: served from their own domain, namespace checked by the registry.MCP server · External

Local code graph: what a change breaks, who uses a symbol, architecture layers. No model.

Code searchv0.19.2MITPython
Freeno charge per call

Runs on your machine from its package; the steps are below.

Wingbox: the code graph of a repository drawn as the structure of an aircraft wing, with the blast radius of one change highlighted
From the README · 1 of 3

What it does

  1. Reads
  2. Writes
  3. High impact

At most: creates or changes data: records, files, settings.

What it costs

Free

Odel charges nothing per call. The publisher may charge for its own service.

Runs locally over stdio

This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).

PyPIwingboxv0.19.2

Run

uvx wingbox

MCP client config

{
  "mcpServers": {
    "wingbox": {
      "command": "uvx",
      "args": [
        "wingbox"
      ]
    }
  }
}
README49 min read

Wingbox: a map of your codebase for AI coding agents

Wingbox: the code graph of a repository drawn as the structure of an aircraft wing, with the blast radius of one change highlighted

Give your coding agent a map of your codebase. 2-4x cheaper, no missed files.

Up to 5x faster, up to 8.8x fewer tokens, up to $484 saved per 1,000 questions, no missed files.

Your agent sees every file a change touches before it edits, so it no longer forgets a fix. 2-4x cheaper per answer than its own search or another code-graph tool: benchmarks.

Wingbox builds a local code graph (a code knowledge graph made by static parsing, with no model) of your repository so that AI coding agents and developers can see dependencies, call flows, architecture boundaries and the blast radius of a change before editing code. It works as an agent skill in Claude Code, Codex, Gemini CLI, Cursor and GitHub Copilot, as an MCP server for any MCP client, and from the command line. It supports Python, TypeScript, Rust, C, C++, C#, Java, Go, Ruby, Rails, PHP, Laravel (Blade, Livewire), Dart, Flutter, Free Pascal, and Lazarus.

Runs fully locally: no network access, no model, no telemetry. It can be used inside a security perimeter and on a machine with no internet.

macOS, Linux and Windows: on Windows it runs natively, from PowerShell, cmd or Git Bash, with no WSL.

Website: wingbox.dev: benchmarks with charts, a sample report and the live map.

Install: pipx install wingbox && wingbox install | PyPI: the command, then the skill, an always-on block and a search hook for every coding assistant on the machine. Then type /wingbox in your agent.

The graph keeps itself fresh: in Claude Code a hook marks every edited file, and the next search patches only those files into the graph (about a second on a 1,200-file project); changes made by git or an editor are found too. See Keeping the graph fresh.

Skill only: npx skills add aileron-tech/wingbox | skills.sh

Release notes: Changelog · What is next: Roadmap

Note: Wingbox was formerly published as codespaces. The skill, the scripts and the generated files were renamed on 2026-11-15; see the Changelog for the old and new names.

Understand a large codebase before you change it. Wingbox is an architecture-aware code search and impact analysis tool for Python, TypeScript, TSX, Rust, C, C++, C#, Java, Go, Ruby, Ruby on Rails, PHP, Laravel, Blade, Livewire, Dart, Flutter, Free Pascal, and Lazarus repositories. It helps developers and AI coding agents find the right module, trace dependencies, measure change impact, and read only the source files that matter.

Use it for codebase architecture discovery, dependency graph search, blast-radius analysis, call-flow tracing, monorepo navigation, and safer AI-assisted coding.

Everything runs on your machine. The code graph is built by deterministic static parsing: no LLM call, no vector database, and no network access to build or query it. Wingbox does not embed your code.

INSTALL AND RUN

sh
pipx install wingbox && wingbox install
sh
wingbox build .

The first line installs the command and sets up your coding assistants: it lists what it adds, lets you untick items, and writes only your own settings in your home folder. The second maps the repository you are in into its .wingbox/ folder. Then ask your agent, or run wingbox impact path/to/file.

The one install brings the parsers of every supported language: there is nothing to add per language.

With Homebrew, on macOS or Linux: brew install aileron-tech/wingbox/wingbox && wingbox install (tap).

No terminal? Install with a click

  • Claude Desktop: download the extension, open the file, press Install, choose your project folder and switch it on. Wingbox builds the map the first time you ask.
  • Codex app: Settings > Plugins > Add > Add a marketplace, paste aileron-tech/wingbox as the source, then press + next to Wingbox under Personal.

Both start Wingbox with uv, which has to be on the machine.

Runs fully locally, inside your security perimeter

Wingbox is safe to run on code that must not leave the company:

  • No network. Building and querying the graph open no network connection. Run it with the network switched off to see for yourself: docker run --rm --network none -v "$PWD":/repo wingbox (PowerShell: docker run --rm --network none -v "${PWD}:/repo" wingbox). The one command that reaches the network is wingbox update, which runs your package installer (pipx, uv or pip) when you ask it to. The one build option that can is --lsp, off by default: see "never run" below. Wingbox listens on no port either. Serving the MCP server to another machine is a separate package, wingbox-http, that you install and start yourself; it only answers the requests that reach it and opens no connection of its own.
  • No model, no account, no key, no telemetry. Nothing is sent to a model or to a service, and nothing is collected about its use.
  • Your code is read, never run. Wingbox parses source files with its own parsers and calls git for the ignore rules, the state of the work tree and a diff; it does not execute the code, the tests or the build of the repository. Every git call on a repository switches off the programs that its own Git configuration can name (core.fsmonitor, hooks, filter, diff and signature programs, Git inside a submodule, a fetch of missing objects). One option is the exception: wingbox build --lsp, off by default, starts the language servers that are installed on the machine (rust-analyzer, gopls, jdtls, csharp-ls, typescript-language-server, pyright-langserver, clangd, ruby-lsp, intelephense, dart language-server), and what such a server does is its own: it can run the build of the project (Cargo build scripts and procedural macros, a Gradle or Maven import) and fetch dependencies from a package registry. Leave --lsp off for code you do not trust and where nothing may leave the machine.
  • The results stay in one folder of the repository, .wingbox/: the graph index.sexp, REPORT.md and map.html. The map is one HTML file that loads nothing from outside and opens offline.
  • Works on a machine with no internet. Fetch the package and its pinned dependencies once (pip download wingbox -d wheels), carry the folder inside, and install with pip install --no-index --find-links wheels wingbox.
  • Deterministic and open. The same code gives the same graph; the source is MIT licensed and small enough to review.

Where Wingbox writes. Nothing else on the machine is changed:

CommandWrites to
wingbox build (and the refresh after a change)the repository's .wingbox/
wingbox init (project setup)the project's .wingbox/ and .gitignore
wingbox install (your assistants)the assistants' files and ~/.wingbox/, plus Git's global excludes file with --global-gitignore

Three tests of the repository keep this true: the package imports no module that opens network connections, the map page loads no outside resource, and the write-scope test checks the project and home paths each command may change.

See it in action

wingbox impact on the immich server: a terminal asks what breaks if src/dtos/asset.dto.ts changes; on a 3D stack of architecture layers the file lights up in the domain layer, then the ten files that import it, then twenty more at two hops

Once the graph is built, an agent asks what a change breaks before it edits anything. Real output on the server of immich (commit e5d6eb7, 707 modules):

text
$ wingbox impact src/dtos/asset.dto.ts 2 --human
Impact of changing src/dtos/asset.dto.ts
  direct dependents   10
  within 2 hops       30

Depth 1
  src/controllers/asset-media.controller.ts   imports it
  src/controllers/asset.controller.ts         imports it
  src/controllers/shared-link.controller.ts   imports it
  src/controllers/user-admin.controller.ts    imports it
  src/dtos/asset-media.dto.ts                 imports it
  src/services/asset-media.service.ts         imports it
  src/services/asset.service.ts               imports it
  src/services/asset.service.spec.ts          imports it
  src/services/shared-link.service.ts         imports it
  src/services/user-admin.service.ts          imports it

Depth 2
  src/controllers/index.ts                                 through src/controllers/asset-media.controller.ts (or 3 other files): imports it
  src/controllers/asset-media.controller.spec.ts           through src/controllers/asset-media.controller.ts (or 1 other file): imports it
  src/controllers/asset.controller.spec.ts                 through src/controllers/asset.controller.ts (or 1 other file): imports it
  ...

Every row says why the file is listed: the import, and below depth 1 the file it is reached through. For Rust the row also names the items (uses HarEntry by name after use super::*``). The answer is 30 files in about 880 tokens, and it is exact: a TypeScript import resolver written separately from Wingbox finds the same 3,795 dependencies between the 707 modules, none extra and none missing.

--human asks for this text. Without an option the same answer is printed as S-expressions, the compact form an agent reads, and --json gives it to a script; wingbox impact a.ts b.ts 2 answers for several files in one call.

wingbox build also writes .wingbox/map.html (wingbox open shows it). Its layers view stacks the architecture in 3D; click a file and its blast radius lights up across the layers:

One DTO changes: 30 files within two hopsThe base service changes: 281 of 707 modules
The Wingbox map of the immich server in the layers view, turning slowly, with the 30 modules reached by a change to src/dtos/asset.dto.ts highlightedLayers view of the Wingbox map with src/services/base.service.ts selected: 65 direct dependents, 281 modules within two hops

Benchmarks with charts, a sample report and the live map: wingbox.dev.

What can Wingbox answer?

  • Where is authentication, billing, upload, or another feature implemented?
  • Which modules depend on this service, class, function, or type?
  • Where exactly is this function, class or constant used, line by line?
  • What could break if I change this file?
  • Which two or three files should I read before fixing a bug?
  • How does a request or data value move through the system?
  • Does this dependency cross an architecture boundary?
  • Which Rails models, services, jobs, mailers, concerns, and specs are affected?
  • Can you draw a call-flow, data-flow, or sequence diagram from the code?

Instead of searching a repository one text match at a time, Wingbox turns code into a queryable code graph of modules, entities, imports, references, call relationships, architecture layers, and infrastructure connections.

What is a code graph?

A code graph describes a codebase as facts instead of text. Modules, classes, functions and types are nodes; imports, references, data flows, calls and architecture layers are edges. Wingbox writes the graph to .wingbox/index.sexp as plain S-expression facts, so the bundled query tool and ordinary text search can both read it.

What is blast radius analysis?

The blast radius of a change is everything that depends, directly or transitively, on the code you are about to edit. Wingbox computes it from the reverse dependencies in the code graph. impact path/to/file prints the dependents by depth and the files to read first; rdeps and boundary give the same facts as a tree and as a change boundary.

text
$ wingbox impact scripts/lang/treesitter.py
(impact scripts/lang/treesitter.py :direct 13 :total 25
 (1 scripts/lang/csharp/parser.py
    scripts/lang/csharp/validation.py
    scripts/lang/dart/parser.py
    ...
    scripts/lang/typescript/validation.py)
 (2
  (:through scripts/lang/csharp/parser.py
   scripts/lang/csharp/__init__.py
   scripts/lang/csharp/imports.py)
  (:through scripts/lang/dart/parser.py
   scripts/lang/dart/__init__.py)
  ...)
 (read-first scripts/lang/treesitter.py scripts/lang/csharp/parser.py ...))

$ wingbox impact scripts/lang/treesitter.py --human
Impact of changing scripts/lang/treesitter.py
  direct dependents   13
  within 2 hops       25

Depth 1
  scripts/lang/csharp/parser.py           imports it
  scripts/lang/csharp/validation.py       imports it
  scripts/lang/dart/parser.py             imports it
...

Depth 2
  scripts/lang/csharp/__init__.py     through scripts/lang/csharp/parser.py: imports it
...

The default form is S-expressions, for agents: the asked file once, the rows grouped by depth and by the file they are reached through, each with the reason it is listed. --human prints the same answer as text for people and --json as one JSON object for code.

Measured: 100 questions, with and without Wingbox

One hundred "which files depend on this file" questions, drawn at random with a fixed seed in five public repositories (TypeScript, Rust, Python):

  • wingbox impact <file> 2 --all names the complete list of dependent files, with nothing outside it, in 100 of 100 questions (95 % interval 96 to 100 %). The lists hold 1 to 503 files.
  • Claude Code answers 55 of the questions with its built-in search only, and again with the wingbox command added:
SetupComplete answersTokens per answerCost per answer
With Wingbox55 of 5567,5790.110 USD
Built-in search only48 of 5598,8000.179 USD

Cost -38 % (95 % interval -49 % to -25 %), tokens -32 % (-47 % to -12 %), on claude-opus-5-5 with Wingbox 0.10.0 (2026-11-18). Tokens fall on the two Rust repositories (agent-browser -67 %, claudes-c-compiler -32 %) and are higher on the other three (chrome-devtools-mcp +13 %, immich +26 %, FastAPI +43 %).

  • Checked against every import statement of seven corpora (3,795 dependencies in the largest), the graph has no wrong dependency and one missing: an import of a vendored bundle, which Wingbox leaves out of the graph.

The reference lists come from resolvers that share no code with Wingbox. The scripts, the lists and every result file are in benchmarks/impact, with what the benchmark does not show. Dockerfile.benchmark runs the tests that need no model in a clean container and compares every result with the committed one:

bash
docker build -f Dockerfile.benchmark -t wingbox-benchmark .
docker run --rm wingbox-benchmark

Wingbox, Graphify, CodeGraph and OntoIndex on the same tests

Graphify builds a knowledge graph of a codebase, documents and images for coding agents; CodeGraph and OntoIndex index code for agents. Wingbox is narrower: a deterministic graph of the code alone, built without a model, and exact lists of what depends on a file. The four ran on the same public repositories, questions, reference lists and scoring (Wingbox 0.10.0, the FastAPI row with Wingbox 0.9.1; Graphify 0.9.110, CodeGraph 1.6.2, OntoIndex 3.1.9; no model inside any of the tools):

TestWingboxGraphifyCodeGraphOntoIndex
Exact list of dependent files, five questions5 of 51 of 51 of 51 of 5
File dependencies of FastAPI against its 1,802 import pairs, wrong / missing0 / 019 / 17106 / 2522 / 118
Tokens a coding agent spends per answer (built-in search alone: 254,967)66,628314,516297,215362,509
Cost per answer in that test, USD (built-in search alone: 0.357)0.1210.3950.3540.402
Answer quality in that test, F1 (built-in search alone: 0.989)1.0000.9840.9840.984

Building the graph of FastAPI on a hosted runner takes Wingbox 2.2 s and Graphify 17.9 s (measured with Wingbox 0.2.0; not measured for the other two).

What the others do better: CodeGraph's answers are the shortest where it answers (1,000 tokens against 1,454 for Wingbox on the same three questions), and per its documentation it covers more languages (Swift, Kotlin, C, C++, Lua and others); per its documentation Graphify also maps documents, PDFs, images and videos. graphify affected follows calls and references as well as imports, so it answers a wider question than "who imports this file"; the report gives its figures restricted to imports too. The scripts, the reference lists, every result file and the token formula Graphify publishes are in benchmarks/graphify.

Find usages: 100 questions, three tools

"I will change exported symbol S of file X. Where is S used?" One hundred questions on five public repositories in TypeScript, Rust and Python. Every answer is checked against the language tooling (the TypeScript language service, pyright, rust-analyzer) and the use sites against a SCIP index (Wingbox 0.5.1, CodeGraph 1.6.2, Graphify 0.9.110):

ToolExact list of filesUse sites found
wingbox usages100 of 1001,660 of 1,660
codegraph callers79 of 100680 of 1,660
graphify affected --depth 176 of 100 (91 answered)604 of 1,660

CodeGraph keeps one entry per calling function and kind of use, which is why it lists fewer sites; Graphify has no command that lists the uses of a symbol, and affected is the nearest one. The questions, the reference lists and the scripts are in benchmarks/usages.

Wingbox on Theory of Code Space

Theory of Code Space (ToCS) generates Python codebases with a known architecture and scores a map of their dependencies by edge type, with its own metric. Its agents explore with a budget of 20 actions; Wingbox reads every file, with no model, which is closest to the paper's condition where a model is given every file at once. On the paper's three medium codebases:

MapDep F1IMPORTSCALLS_APIREGISTRY_WIRESDATA_FLOWS_TO
Wingbox, this version0.953150 of 15019 of 3919 of 1916 of 16
Wingbox 0.2.40.802150 of 1500 of 390 of 190 of 16

No edge outside the ground truth on these three. The CALLS_API left are calls between files that also import each other, where the ground truth counts a call of an API but not of a helper; Wingbox leaves that judgement to a model. The scripts, the maps sent to the metric, eight more generated codebases and the plan for a model that starts from the Wingbox map are in benchmarks/tocs.

Quick start for AI coding agents

Install the command and let it set up every coding assistant on the machine (see Install into your coding assistants):

bash
pipx install wingbox
wingbox install

In the agent, /wingbox builds the graph and summarizes the report, /wingbox path/to/file shows what a change to that file breaks. Or ask a natural question:

text
Use the Wingbox skill before reading source.
Find where file uploads are handled, analyze that module, show its dependencies
and blast radius, then list only the boundary files needed for the change.

To install the skill alone, without the command's block and hook:

bash
npx skills add aileron-tech/wingbox

MCP clients use wingbox mcp: see Use from an MCP client.

Install as a plugin

This repository is also a plugin marketplace for Claude Code and Codex. The plugin, in plugins/wingbox, bundles the wingbox skill and the MCP server wingbox mcp, and in Claude Code the search hook that wingbox install adds. Use either the plugin or wingbox install, not both (wingbox uninstall removes what install added).

Claude Code:

text
/plugin marketplace add aileron-tech/wingbox
/plugin install wingbox@aileron-tech

From a shell, in one line: claude plugin install wingbox --marketplace aileron-tech/wingbox (or claude plugin marketplace add aileron-tech/wingbox, then claude plugin install wingbox@aileron-tech). The skill is /wingbox:wingbox. The Claude Code plugin needs uv: its MCP server and hooks run uvx --from git+https://github.com/aileron-tech/wingbox@<commit> wingbox, pinned to the commit of the latest release tag, which uv fetches on first use. Claude Code starts uvx directly, with no shell, so the plugin works the same on macOS, Linux and Windows, with or without Git for Windows. The hooks run uvx --offline: they never download, and while uv is missing or has not fetched Wingbox yet they fail without blocking the search or the edit ("onFailure": "continue").

Codex:

bash
codex plugin marketplace add aileron-tech/wingbox
codex plugin add wingbox@aileron-tech

The Codex plugin runs wingbox from your PATH, so install the command first with pipx install wingbox. Codex lists the skill as wingbox:wingbox.

The plugin folder holds a copy of SKILL.md and references/, and the version of pyproject.toml; python3 tools/sync_plugin.py refreshes them and the tests fail while they differ.

Claude Desktop

Wingbox is also a Claude Desktop extension. Download wingbox-<version>.mcpb from the assets of the latest release and install it: double-click the file, drag it into the Claude Desktop window, or choose Settings > Extensions > Advanced settings > Install Extension... and select it. In the extension settings, choose the repository Wingbox maps.

The first use builds the code graph of that repository (the .wingbox/ folder in it). A tool call waits up to 45 seconds for that first build; on a large repository it answers that the build is still running, and the next call a minute later answers from the graph. Later answers bring the graph up to date with the files you change.

The extension holds no Python packages: it is an MCP Bundle of the server type uv, which pins this release of wingbox from PyPI. The MCPB specification says the host installs Python and the dependencies with uv, so that nothing needs to be installed first; Wingbox's parsers ship as binary wheels for macOS, Windows and Linux, so no compiler is needed. If your Claude Desktop reports that it cannot start the server, install uv and restart it. The first start downloads the package from PyPI; after that the server opens no network connection. python3 tools/build_mcpb.py builds the file from a checkout.

Quick start from the command line

Install the wingbox command (Python 3.11 or newer, macOS, Linux or Windows):

bash
pipx install wingbox

Or with Homebrew, on macOS or Linux (upgrade with brew upgrade wingbox):

bash
brew install aileron-tech/wingbox/wingbox

Or run it without installing:

bash
uvx wingbox --help

Build the code graph of a project, then ask what a change will break:

bash
cd /path/to/project
wingbox init                 # optional: state the architecture of each part
wingbox build .
wingbox impact path/to/file.py
wingbox usages path/to/file.py::create_order
wingbox quick "file upload"

Several files in one call, from a script: wingbox impact a.py b.py 2 --json prints one object with the state of the graph and one answer per file.

python
answer = json.loads(subprocess.run(["wingbox", "impact", *files, "2", "--json"], capture_output=True, text=True).stdout)
if answer["graph"]["stale"] == 0:                      # the graph misses no changed file
    for item in answer["impact"]:                       # one per file, in the order asked
        print(item["file"], [row["file"] for row in item.get("rows", [])])

Without --json the same call prints (graph :built 2026-01-31T09:15:00Z :files 359 :stale 0) and then one (impact <file> ...) form per file; a name that matches nothing gives (error no-match <file> ...) in its place, a file of the repository that is not in the graph (error not-in-graph <file> :reason ...) (What the graph does not cover), and the other files are still answered.

Four options narrow or widen what impact answers:

  • wingbox impact <file> ... --only tests keeps the dependents that are test files: the tests to run for the change. :direct and :total count them and the form says :only tests. In a repository whose CMake files state build targets and tests, two more facts follow: (affected-targets <file> <target> ...), the targets that compile the file or one of its listed dependents, and (affected-tests <file> <test> ...), the names to give to ctest -R (targets and tests in JSON); (unread-targets <file> <target> ...) names the targets whose source list was not all read; see C and C++ dependency search.

  • wingbox impact --diff [ref] answers for every file a diff changes (ref defaults to HEAD: the changes of the working tree) and adds one (changed <file>::<name> :line N :used-by (<file> ...)) fact per changed function with the other files that use it. For a C or C++ function the files that use it through the declaration in its header are included. Lines that were only removed count for the definition that holds the line above them. A file the diff deletes and the path a renamed file had are no longer in the graph, so the files that depended on them cannot be listed: each is named by (changed-file <path> :status deleted :dependents unknown) or (changed-file <old path> :status renamed :to <new path> :dependents unknown) (changed_files in JSON), and the new path of a rename gets its answer. (impact-diff-empty <ref>) is printed only when Git reports no change below the graph root. Both options go together: wingbox impact --diff --only tests, where each changed function also names the CMake targets and tests of the files that use it; a function that no test file uses directly and N other files do use says :other-users N after its empty :used-by ().

  • wingbox impact <file> ... --summary answers in a few lines where the complete list has hundreds: the number of dependents at each depth and of each kind (made from the file or started by it, test files, entry points, which nothing else depends on, and the others), the eight folders with the most of them, twenty files to look at first, and the command that prints the complete list. It goes with --only tests, --diff, --json and --human:

    text
    (impact-summary core/base.py :direct 39 :total 40 :depth 2
     (depths 39 1)
     (kinds :generated 1 :tests 6 :entry-points 3 :other 30)
     (folders (services 30) (tests 6) (. 2) (core 1) (jobs 1))
     (first core/table.py run_export.py run_report.py tests/test_part0.py ... :more 20)
     (full "wingbox impact core/base.py 2"))
    
  • A C or C++ source file is answered through its header, see C and C++ dependency search.

wingbox usages lists every place that uses one symbol, through re-exports and aliases, grouped by file, with the line, the column and the kind of use:

text
$ wingbox usages app/models.py::Invoice
(usages Invoice cls :at app/models.py:1 :uses 7 :files 2
 (app/__init__.py re-export 1:21)
 (app/billing.py import 1:17 2:24 extends 4:13 type 7:13 7:25 call 8:11))

$ wingbox usages app/models.py::Invoice --human
Usages of Invoice (class, app/models.py:1)
  7 uses in 2 files

app/__init__.py
  1:21   re-export
app/billing.py
  1:17   import
  2:24   import
  4:13   extends
  7:13   type
  7:25   type
  8:11   call

The symbol is Name, <file>::Name or <file>::Class.method; a name defined in several files lists the candidates. Kinds: import, re-export, call, type, extends (extends or implements), reference. For a method, calls whose receiver type is not in sight are listed as unresolved-call, never guessed. The answer is complete; the text of --human lists at most 200 uses unless --all, and --json prints one row per use. The build records which files use each definition, without the positions. In a repository of up to 300 files the first usages after a build reads the positions of every file and keeps them. In a larger one it reads the positions from the files that hold the name (a few seconds where the build takes a minute) and answers; it also starts one process that reads the positions of every file (about as long as a build) and keeps them, so the next calls answer at once. A file that uses the symbol under another name (an alias, a re-export) does not hold the name: such an answer lists it without a position and says :incomplete positions-pending. WINGBOX_POSITIONS_FILL=0 leaves that process out: every usages then reads the files that hold its name; =1 takes that way in a small repository too. Python, TypeScript, JavaScript, Rust, C and C++ have use positions; in other languages usages names the files that reference the symbol.

Architecture commands, with examples from immich (server)

Version 0.6.0 judges the architecture of each part of a repository by a style from a library of styles (or by the rules the project declares itself) and keeps it through the coding agent. One example of each command, run on the server folder of immich:

text
$ wingbox init                      # the style of each part, written to .wingbox/config.yaml
.  nestjs (NestJS)   1.00   container
  *.repository.ts 60  *.service.ts 57  *.dto.ts 53  *.controller.ts 48

$ wingbox align --human             # gaps against the style
.  nestjs: 371 of 475 files placed, 1132 of 1132 dependencies follow the rules

$ wingbox place "a client for the payment API" --human
src/repositories/  infra layer of nestjs
  because: placement: database access, client of another system

$ wingbox learn --agent             # the task for the coding agent: folders the style cannot place
Part .: closest style nestjs 1.00 (runner-up layered 1.00). Layers:

$ wingbox advice --human            # open recommendations; accept or reject them by id
f7c97b6d2342  missing-folder  src/<feature>

$ wingbox compare --human           # the parts of a monorepo side by side
.    typescript  nestjs  api domain infra service shared

$ wingbox boundaries all            # layer rules, then what each layer may do
(capability-violation src/services/shared-link.service.ts :capability db-client :layer service :allowed (infra module) :line 2 :evidence "import { PostgresError } from 'postgres';" ...)
(pattern-violation src/services/api.service.ts :pattern service-builds-http-response :line 99 ...)
(capability-summary :violations 15 :known 0 :candidates 0 :patterns 2 :checked 707)

On immich the capability rules find 15 files that do what their layer may not (database client types in DTOs and services, query-builder helpers in utils/) and 2 services that write the HTTP response themselves.

Without a layer style: wingbox cycles

The layer rules need a style, and a repository that fits none (an engine, a compiler, embedded code, a monorepo with its own folders) answers style none and "not checked". wingbox cycles reads the import graph alone and needs no style and no configuration:

text
(cycle 1 :files 3 shop/cart.py shop/order.py store/catalog.py)
(hub hub.py :dependents 12 :dependencies 12)
(folder-cycle shop store :forward 1 :back 1)
(folder-order (shop store) (core) (user) (.) (leaf))
(cycles-summary :cycles 1 :files-in-cycles 3 :hubs 1 :folder-cycles 1 :files 34)
  • cycle: a group of files that depend on each other through imports or includes (two files that import each other, or a longer ring), the largest first. An import the compiler erases (import type) is not counted.
  • hub: a file that at least ten files depend on and that depends on at least ten: a change of it reaches far, and it is changed often because it knows much.
  • folder-cycle: two top-level folders with dependencies in both directions, with the number of file pairs each way. The smaller number is usually the direction to remove.
  • folder-order: the top-level folders from those that depend on others to those the others depend on; folders that depend on each other stand in one group. It is the order a layer rule would have to respect.

wingbox cycles <folder> answers for the files below a folder, with its subfolders as the folders (wingbox cycles engine/src). --json prints the same facts.

Layers from the folders: wingbox init --from-folders

To have that order checked from now on, let Wingbox write it as the layers of the part:

text
$ wingbox init --from-folders .
Layers of . from its folders, lowest first: core, store, shop, app
  4 folders, 9 source files. A file may depend on its own layer and on the layers below it.
Imports that go upward under this order (1):
  store -> shop: 1
Written: .wingbox/config.yaml (part .: style declared, order). Reorder the entries by hand where the order is wrong.
Next: wingbox build .   then   wingbox boundaries   (the upward imports are its violations);
      wingbox align --learn   accepts the ones of today into .wingbox/baseline.sexp, so that only new ones are reported.

The argument is the part: . for the repository, or a folder (wingbox init --from-folders engine/src), which becomes a part of its own. Every folder of the part with source files is one layer; a folder stands below the folders that depend on it, and folders that depend on each other are ordered so that few imports go upward. Test files are in no layer. What is written is plain to read and to change:

yaml
parts:
  .:
    level: container
    style: declared
    order:   # lowest first: a file may depend on its own layer and on the layers below it
      - core: [core]
      - store: [store]
      - shop: [shop]
      - app: [app]

Move a folder to another entry, put two folders into one layer (- sales: [shop, app]) or reorder the entries, then build again. A layer name is one word of letters, digits, _, . and -, and a folder has one layer; the build stops, with the line, on a key it does not know, on a key or a part folder written twice and on a file it cannot read. From then on wingbox boundaries, the report, wingbox place and the pull request check treat the part like any part with a style: an import of a higher layer is a violation, and the ones accepted with wingbox align --learn are counted as known. A part that has layer rules already is kept unless --force. It needs a built graph, and works for every language of the graph, C and C++ included.

The architecture of each part: wingbox init

wingbox init [PATH] [--force] [--sexp] [--details] splits the repository into parts and judges the architecture style of each, then writes .wingbox/config.yaml and adds /.wingbox/ to the project's .gitignore (a file that already has a rule about .wingbox is left as it is):

$ wingbox init
platform/backend   declared by platform/backend/layers.mjs (22 layers, read)   container
  also declared: platform/backend/.dependency-cruiser.mjs (not read: it states no layer order)
  known exceptions: platform/backend/layers.known-upward-imports.json (112 entries)
platform/frontend  route-tree (Vercel)   1.00   container
  app/ 828  components/ 574  page.tsx 135  ui/ 70
  target: 5 of 5 folders present
  advice: 2 to move, 59 to fix
  - move platform/frontend/src/app/llm/model-pools/_parts/pool-providers.tsx from the feature layer to ui ...
crates/engine      Rust crate, no layer style   -   component

wrote .wingbox/config.yaml
next: wingbox learn settles the open points (run by a coding agent it is the agent's task, asking you when the code does not tell; in a terminal it asks you), then wingbox build
  • Parts. A part starts at a folder that holds a manifest (package.json, pyproject.toml, setup.py, Cargo.toml, go.mod, Gemfile, composer.json, *.sln, pom.xml, settings.gradle, mix.exs) and ends where a nested part starts; the repository root is always a part. A pom.xml below another one is a module of the same application. A part with fewer than 12 source files (tests and generated folders left out) is listed but not judged. Each part gets its C4 level (system for a workspace, container for a unit that runs by itself, component otherwise).

  • Styles. layered (Martin Fowler, "Patterns of Enterprise Application Architecture", 2002), onion / clean architecture (Jeffrey Palermo, 2008; Robert C. Martin, "Clean Architecture", 2017), hexagonal / ports and adapters (Alistair Cockburn, 2005), model-view-controller, NestJS, microkernel / plug-ins (Mark Richards, 2015), route-tree frontends (Next.js app/ and pages/, Remix, SvelteKit), Feature-Sliced Design, and CQRS (Greg Young; Martin Fowler) as an overlay. Each style is a TOML file in scripts/architecture/styles/ with its sources, the folder words it is recognised by, its layers and its rules.

  • Score. Each style scores the weight of its folder groups found in the part (a required group missing gives 0, a pattern of another style counts against it). A style is a candidate at score 0.6 and when its folders hold a quarter of the part's files; the part is determined when one candidate leads the next by 0.15. Otherwise the part is "not determined": no layers and no boundary violations are stated for it.

  • Own rules first. A part that states its architecture itself (dependency-cruiser layers, import-linter, tach, deptrac, packwerk, ESLint boundaries, ArchUnit, ...) is judged by those rules. A dependency-cruiser layer list in plain data is read (its order and path patterns); a file Wingbox cannot read is named and no violation is stated for that part.

  • Folder names. A folder matches a style word as a whole name after lowercasing and dropping - and _; a spelling variant one edit away matches (controlers). Each label says which step matched.

  • Files the rules exempt. A test may import anything and a composition root wires the layers, so no rule is stated for them. Tests are the files in a test folder (test, tests, spec, specs, testing, mocks, fixtures, __tests__, __mocks__, e2e, testdata, integration_test, or a folder whose name starts with test, tests, spec, specs or e2e and a -, _ or .: test-utils) and the files named *.test.*, *.spec.*, *_test.*, *_spec.*, test_*, *.test-*, *.spec-*, tests.py, *Test.java, *Tests.cs or *Test.cs (a pattern with a capital letter is matched as written: Latest.java is no test). A composition root is a file of a layer named main.*, program.*, startup.*, bootstrap.*, container.*, composition*.*, app.module.*, dependencyinjection.* or wire.go (index.ts in the part folder or one folder below it), or a file that imports a name that starts the application (NestFactory, a nest-commander command). The names are in scripts/architecture/styles/index.toml. The exemption holds while only tests and composition roots import the file. Once a file of a layer imports it, it could pass any import on, so it is judged like any file of its folder: src/models/container.ts imported by a model is a domain file, and a test helper imported by production code takes the layer of the files beside it. Importing a file named main.* does not exempt the importing file either.

  • Target layout. For each part with a style, init lists the full layout of that style: one folder per layer and the building blocks of the domain tier (entities, value objects, aggregates, domain events, domain services, repository interfaces, specifications; Eric Evans, "Domain-Driven Design", 2003; Vaughn Vernon, "Implementing Domain-Driven Design", 2013), each marked present (with the real folder) or proposed (where the style puts it). It is written to .wingbox/config.yaml; no folder is created.

  • Recommendations. Each part ends with its advice: folders of the target layout to create when such code appears, files to move (their dependents import them against the rules; the advice names the layer and the counts) and violations with the fix the style prescribes ("introduce a port in the domain and implement it in infrastructure"). wingbox build writes the same advice into REPORT.md ("Recommendations") and the map; analyze and impact print the advice that concerns the module. A part whose style is not determined gets no advice; a part with declared rules is advised by them.

  • Decisions. wingbox build logs the advice it gives and what became of it in .wingbox/decisions.sexp (append-only, meant to be committed): followed, done differently, ignored, or accepted and rejected with wingbox advice accept|reject <id> [--reason TEXT]. A file moved to another folder than the advised one teaches that folder's layer for the part, and later builds use it (:learned-from <id>); an item rejected or ignored for 3 builds is no longer shown. A rebuild of unchanged code is not counted as one of the 3, and a recommendation to fix a finding (fix-violation, fix-capability, fix-pattern) is never hidden by inaction: it stays until the finding is fixed, accepted in the baseline, or rejected with wingbox advice reject <id> --reason TEXT (the reason is required for these). wingbox advice lists the open items, wingbox advice --learned what was learned.

  • What a layer may do. Besides who imports whom, each style says what kind of work belongs where: SQL and the database client in the repository (DAO) layer, outbound HTTP in infrastructure, no web framework in the domain, the environment read in configuration (hexagonal: all I/O in the driven adapters). The build finds these capabilities by syntax in Python, TypeScript, PHP, Ruby, Java, C# and Go (a SQL string passed to execute, query or raw, query builders, session.query, Prisma model calls, DB::select, driver and ORM imports, requests/axios/HttpClient, os.environ/process.env, ...), each with its line, and wingbox boundaries reports a file outside the allowed layers: (capability-violation src/services/orders.py :capability sql :layer service :allowed (infra) :line 42 :evidence "cursor.execute(\"SELECT ...\")"). A query only kept in a variable is a candidate. A few pattern checks ride on the same data: a controller that imports a repository and skips the service, a service that builds an HTTP response, a domain file that imports the ORM. capabilities: of a part in .wingbox/config.yaml restates a rule; REPORT.md ("What layers do") and wingbox advice (fix-capability, fix-pattern) name the fix; align --learn accepts the current ones in the baseline. SQL assembled at run time or behind a helper of another package is not seen, nor is what stands after the first 2000 characters of a line. In a part with capability rules, the files of a language the detector does not read (Rust, Dart, Pascal, C and C++) are named: (capability-not-read :part . :language Rust :files 21); the status does not change.

  • Align. wingbox align [PART] [--to STYLE] [--learn] measures the gaps of each part against its style: files placed, dependencies that follow the rules, layers present and missing, folders without a layer, broken rules with an example; --to maps the layers onto another style (a migration view). --learn matches the part against the style library and takes the closest style as the base (its folders keep that style's layers); a folder it does not place is derived from its file names (*.controller.ts), its name in another style, and last its imports, each with its evidence; it writes the learned folders into .wingbox/config.yaml with a comment and what still breaks a rule into .wingbox/baseline.sexp; later builds report only new violations. For a part with declared rules nothing is guessed: the baseline comes from them. An entry of the baseline may say who accepted the break, why and until when; you add the three fields by hand to the entry, and align --learn keeps them when it writes the file again:

    (baseline "." src/models/order src/routes/orders :rule "domain -> api" :from align
              :owner "A. Reviewer" :reason "removed with the orders rewrite" :expires 2027-03-31)
    

    (one line in the file). wingbox boundaries prints the owner, the reason and the date on the violation-known line. :expires is the last day the entry holds: from the next day, or when the date is not a YYYY-MM-DD day of the calendar (2026-99-99), the break is a violation again (with :expired <date>), boundaries exits 1 and wingbox advice asks for the fix again. An end date is changed in its entry: a second entry for the same two files does not undo it (of two end dates the earlier holds). baseline-capability entries take the same fields. An entry that states a :rule accepts a break of that rule only: when the layers of the two files change and they break another rule, that is a new violation. An entry without :rule accepts the pair whatever the rule, and a baseline-capability entry accepts its capability in the whole file (its :line is where it was first seen).

  • A new project. In a folder without source files, init asks the language and offers the styles that fit it, best first: the style of the other parts in the same language of the repository (monorepo siblings), then your favourite in $HOME/.wingbox/config.yaml (defaults: {typescript: onion-clean}), then the library. Without a terminal it prints the choices and the flags it needs (--language, --style, --yes); it writes the chosen style with its full target layout, and creates the empty folders only with --scaffold. Style files in $HOME/.wingbox/styles/ replace the built-in ones of the same name.

  • Learn with an agent. wingbox learn decides who runs it: --agent or --human first, then the variables a coding agent sets for its commands (Claude Code CLAUDECODE=1, Gemini CLI GEMINI_CLI=1), then a command without a terminal counts as an agent. An agent gets a task: the closest style, its layers, and each folder the style cannot place with real files and imports; it reads the files and answers in a fixed S-expression format. When the code does not tell (a public API or an internal helper?), the task tells the agent to ask the operator in its chat and pass the answer on, never to guess. wingbox learn --apply validates the answer (the whole answer is rejected with every error when a line is wrong), writes into .wingbox/config.yaml with learned by agent: <because> (an entry you wrote is kept), records in .wingbox/learned.sexp and rebuilds. A person in a terminal (learn, or align --learn) gets a questionnaire: the style of each part among its candidates, with scores and one-line descriptions, then one question per open folder with its files and imports; the answers are recorded the same way, and at the end learn offers to open .wingbox/config.yaml in $VISUAL or $EDITOR (--yes takes the closest style and the guesses). Nobody needs to edit the file by hand; it starts with a header of instructions (what each key means, the rule that decides a file's layer, how to move a folder, what to run after a change), rewritten on every write, so that an agent asked to change it does so correctly. To share config.yaml, learned.sexp, decisions.sexp and baseline.sexp through Git, force-add those files explicitly.

If .wingbox/config.yaml exists, init keeps it and only prints the candidates; --force rewrites it. wingbox build reads the file when it exists and detects the styles itself when it does not. Every layer label and every boundary violation names its style and rule: in the graph ((layer <module> api :style layered :rule "folder routes/ -> api")), in wingbox boundaries, in REPORT.md and in the map.

wingbox build [PATH] accepts the builder options described below, and every query command in Common code searches is available as wingbox <command>. The command installs the parsers for all supported languages and finds the project by its .wingbox/index.sexp, in the current directory or a parent; without one it says so and names the paths it looked at. wingbox open shows the map of the project in the browser.

Install into your coding assistants

bash
wingbox install                            # every assistant whose configuration folder exists
wingbox install --dry-run                  # print the list and every file it would write, change nothing
wingbox install --assistant codex          # only the named assistants (repeatable)
wingbox install --without git-hook         # leave items out: ITEM or ASSISTANT:ITEM, comma separated
wingbox install --global-gitignore         # add .wingbox/ to Git's global excludes file
wingbox install --yes                      # ask nothing, even in a terminal
wingbox uninstall                          # remove installed assistant settings
wingbox uninstall --without skill          # ... except the named items

wingbox install writes your assistant settings in your home folder (%USERPROFILE% on Windows). Select Global Git ignore in the terminal checklist or pass --global-gitignore to append .wingbox/ to the file set by Git's global core.excludesFile, or to $XDG_CONFIG_HOME/git/ignore (default ~/.config/git/ignore). The rule stays in place after uninstall. The checkbox starts unchecked unless you pass the flag. Install shows what it is about to put in place, one line with a checkbox per item, grouped by assistant:

Item (--without)What it is
skillthe wingbox skill, so /wingbox exists
blocka short always-on block in the instructions file the assistant reads in every session
search-hookClaude Code: before each Grep, Glob and Read, context from the graph
edit-hookClaude Code: after each Edit and Write, marks the edited file
session-hookClaude Code: at session start, refreshes a graph older than the code, in the background
git-hookClaude Code: after the agent ran git switch, checkout, pull, merge, rebase, reset or stash pop, refreshes the graph in the background

In a terminal you toggle items with the arrow keys and space (or, where the terminal gives no single keys, by typing their numbers) and press Enter; Enter alone installs everything, q installs nothing. Started by an agent, from a script, in CI or with --yes, it asks nothing and installs every item except those named by --without (--without git-hook,codex:block; --without none puts everything back). The choice is recorded in ~/.wingbox/installed.sexp: a later wingbox install and wingbox update refresh only the items you kept and never add back one you left out. Running it again changes nothing; after an upgrade it refreshes the skill. Assistants are found by their folders in the home directory: ~/.claude, ~/.codex, ~/.gemini, ~/.cursor, ~/.copilot and ~/.agents.

Assistant (--assistant)SkillAlways-on block
Claude Code (claude-code)~/.claude/skills/wingbox~/.claude/CLAUDE.md
Codex (codex)~/.agents/skills/wingbox~/.codex/AGENTS.md
Gemini CLI (gemini)~/.gemini/skills/wingbox~/.gemini/GEMINI.md
Cursor (cursor)~/.cursor/skills/wingboxnone (user rules live in the settings)
GitHub Copilot, CLI and VS Code (copilot)~/.copilot/skills/wingbox~/.copilot/copilot-instructions.md
Shared Agent Skills folder of npx skills (agents)~/.agents/skills/wingboxnone

For a whole team. wingbox init prints and saves in .wingbox/assistant-setup.md the lines a team may add by hand to the repository's own files so that every member's assistant uses Wingbox there: the always-on block for AGENTS.md and CLAUDE.md, and the four hook entries for a committed .claude/settings.json (they run wingbox from PATH).

Moving from wingbox install --project. It was removed in 0.9.0. In each repository where you used it, run wingbox uninstall --project (it removes only the marked blocks, the hook entries and the skill folders that install wrote), then wingbox install once for your own assistants; wingbox update names these repositories until then.

  • The block sits between <!-- wingbox:begin --> and <!-- wingbox:end -->. It tells the agent to run wingbox quick or wingbox analyze before reading code, wingbox impact <file> before changing a file, and /wingbox for an overview. Text outside the markers is never touched; a file that links to another one (CLAUDE.md to AGENTS.md) gets one block.
  • The Claude Code hooks in ~/.claude/settings.json are a PreToolUse entry with the matcher Grep|Glob|Read that runs wingbox hook pre-search, a PostToolUse entry with the matcher Edit|Write|MultiEdit that runs wingbox hook dirty, a SessionStart entry that runs wingbox hook session-start, and a PostToolUse entry with the matcher Bash that runs wingbox hook git (it reads the command and acts only on the git commands above; it prints nothing). All are written in exec form ("command" the program, "args" ["hook", "pre-search"]) with "onFailure": "continue": Claude Code starts the program with no shell, so the hooks work on Windows with or without Git Bash, and a missing program never blocks a tool call. Install names the full path of the wingbox program (wingbox.exe on Windows). When the project has a graph, the search hook adds a few lines of context to the search: the modules and definitions that match the pattern with their direct dependents, or for a file its dependents and the hint to run wingbox impact. It answers in 0.4 to 0.7 s on a graph of 8,000 files, Python start included, never blocks the tool, opens no network connection. In a source repository without a graph it says so once per session, as (wingbox-no-graph :root <root> :hint ...) naming wingbox build (it never builds by itself; the "already told" mark is kept under ~/.wingbox/hook-hints, not in the project); elsewhere it says nothing. A Grep pattern matches with smart case: without an upper-case letter it ignores case. The edit hook only marks the edited file (see "Keeping the graph fresh"). Other settings and hooks are kept; the file is backed up once to settings.json.wingbox-bak before the first change.
  • A skill folder that another installer wrote (for example npx skills add) is left as it is. Install records what it did in ~/.wingbox/installed.sexp; wingbox update and wingbox uninstall read it.
  • /wingbox with no argument builds the graph when it is missing or older than the code and summarizes .wingbox/REPORT.md; /wingbox <file> runs wingbox impact <file> 2; /wingbox <command> ... runs that command. In Codex the skill is called as $wingbox.

Every result is a list of facts: --sexp prints them as S-expressions such as (install-wrote ~/.claude/skills/wingbox :what skill :assistant (claude-code) :version 0.2.6), and the default output is the same facts as aligned text.

Update

bash
wingbox update --check    # installed and latest version, nothing installed
wingbox update --dry-run  # the command it would run
wingbox update            # upgrade, then refresh what wingbox install put in place

wingbox update upgrades with the installer that installed Wingbox: pipx (pipx upgrade wingbox), uv (uv tool upgrade wingbox) or pip of the Python environment it runs in. A Homebrew install is upgraded by Homebrew (brew upgrade wingbox), and a Docker image or an editable or local install cannot update itself; the command says so and prints what to run instead. Wingbox itself opens no network connection: only the installer reaches the package index, and only when you run wingbox update.

On Windows the wingbox program is wingbox.exe, which runs for as long as the command does, and Windows lets nobody overwrite a running program. For the time of the upgrade wingbox update renames the wingbox.exe it was started through, so the installer can write the new one in its place, and the old file is removed when the command has ended.

It also looks for files that versions before 0.4.1 wrote outside .wingbox/ (.code_graph.sexp, .code_graph.uses.sexp, .code_graph.uses-cache.json, .code_graph_cache.json, wingbox-out/), in the current folder and its parents up to the project root and in every repository an earlier install --project recorded, and prints one warning line per project (yellow on a terminal); it deletes nothing. wingbox update refreshes only your own settings: for each repository where a version before 0.9.0 installed with --project it says once that those files are still there and that wingbox uninstall --project in that folder removes them.

Language parsers

The package installs the parser of every supported language: one pipx install wingbox, pip install wingbox or uvx wingbox covers them all, and nothing is fetched afterwards. The Dart parser has no wheel for Windows on arm64; there Wingbox installs without it.

A build that finds no parser for C#, Java, Go, Ruby, PHP, Dart, C or C++ files in the environment it runs in maps the other languages, says how many files it left out and names the command that installs the parser:

text
[code-graph] WARNING: Dart files are skipped (214 files): tree-sitter-dart==0.1.0 (missing). To include them: pip install "wingbox[dart]"

Hooks and the MCP server build in the background, where nobody reads that line, so the same fact travels with the graph: the build records it in .wingbox/graph-skipped.sexp, every query command prints it on stderr, every MCP answer starts with it, the search hook adds it to the context it gives, and REPORT.md lists it under the key findings:

text
(skipped-language dart :files 214 :add "pip install \"wingbox[dart]\"")

A build that parses every language removes the record. A project whose only source files are in a language without its parser publishes no graph; the build stops with the command.

The extras wingbox[csharp], [java], [go], [ruby], [php], [dart], [cpp] and [all] stay valid and name parsers the package already installs. wingbox add <language> is kept for scripts written for version 0.12: it adds nothing and exits 0.

To install only the parsers of the languages a repository holds, install the package without its dependencies and add them by hand, with the pins of requirements/<language>.txt (Python needs no parser):

bash
pip install --no-deps wingbox
pip install PyYAML==6.0.3 tree-sitter==0.25.2 tree-sitter-cpp==0.23.4   # a Python and C or C++ repository

A build then names every parser it lacks: files of C#, Java, Go, Ruby, PHP, Dart, C and C++ are skipped with the notice above, and for TypeScript, JavaScript or Rust files the build stops and names the package to add.

Generated files and launched scripts

Some dependencies are stated by no import: a file that a generator writes from a schema, a script that another file starts as a process. Wingbox reads them from four places and says for each link what it rests on.

  • Declared, in .wingbox/config.yaml:

    yaml
    generators:
      - run: tools/make_layouts.py          # the generator
        inputs: [schema/formats.yaml]       # what it reads
        outputs: [depot/layouts.py, native/src/layouts.h]   # what it writes
    

    Paths are relative to the repository root; inputs and outputs take * and **. A path that names no file is reported by the build and kept in the graph as (generation-unresolved "<path>" :role output :declared ...).

  • Inferred from the generated file: a line among its first ten that starts with Generated by <path> (also with, using), and edit <path> or generated from <path> for the input, in a comment or a docstring of any parsed language.

  • Inferred from CMake: add_custom_command(OUTPUT ... COMMAND ... DEPENDS ...) whose output is a file of the repository.

  • Inferred from Python: a script started by a literal path with subprocess.run, call, check_call, check_output, Popen or os.system, also as the literal tail of os.path.join(HERE, "tools", "report.py") or ROOT / "tools" / "report.py".

A generated file depends on its generator and on the inputs; a launcher depends on the script it starts. wingbox impact tools/make_layouts.py lists the generated files at depth 1 and the files that import or include them at depth 2:

text
(impact tools/make_layouts.py :direct 2 :total 4
 (1 depot/layouts.py :via generated :basis declared
    native/src/layouts.h :via generated :basis declared)
 (2
  (:through depot/layouts.py
   depot/reader.py)
  (:through native/src/layouts.h
   native/src/crate.cpp))
 (read-first tools/make_layouts.py depot/layouts.py native/src/layouts.h))

An input that is no source file (schema/formats.yaml) is not a module of the graph and still answers wingbox impact: the generated files and the generator (:via reads) at depth 1, their dependents below.

A row of impact says what its edge rests on when the code does not state it: :basis declared for the config file, :basis inferred for a marker, a CMake command, a launch call, and for a C or C++ include that was found without a compilation database ("basis" in a JSON row; a row without the key is stated by the code). A declared link stands for an inferred one of the same pair. REPORT.md counts the links of each basis and the unresolved paths. Layer rules do not read these links: a generated file is not judged by the layer of its generator.

What the graph does not cover

A repository usually holds more than the languages Wingbox parses: build files, shell scripts, shaders, a language without a parser. Those files are not in the graph, and Wingbox says so instead of answering around them:

  • The build counts them per language:

    text
    [code-graph] Not in the graph: 683 CMake files, 9 Shell files (no parser for these languages)
    

    and writes one (not-parsed-language "CMake" :files 683) fact per language to .wingbox/graph-unparsed.sexp. REPORT.md lists them under the key findings.

  • An impact answer in such a repository starts with the graph fact, (graph :built ... :files 2281 :stale 0 :not-parsed ("CMake" 683 "Shell" 9)) (graph.not_parsed with --json): the list of dependents is complete for the files of the graph and cannot name a file of those languages.

  • A question about a file that is in the repository and not in the graph (impact, analyze, deps, rdeps, module) answers (error not-in-graph <file> :reason <reason> [:language "<name>"]) with exit status 1, and suggests no other file. The reasons: not-parsed-language (Wingbox has no parser for it), skipped-language (its parser is not installed, see above), excluded (a source file the build left out: a skipped folder such as build/, a path Git ignores, a minified file) and not-source (a document, a data file). For such a file search the text (wingbox grep, rg): the graph knows nothing about it. --sexp keeps the no-match line of version 0.13.

  • One source

Similar modules

Browse Code search