---
title: "MGS7005: directory not in the graph"
description: Fires when magus\dir is asked for a path the knowledge graph holds no directory node for, a typo or a directory outside every project. The call raises rather than return an empty record.
tags: [MGS7005, knowledge graph, magus\dir, figures, buzz]
---

# MGS7005: directory not in the graph

`magus\dir(path)` returns the typed `Dir` record for one workspace directory:
its layer, language, imports, importers and declared calls. Figures build their
boxes from these records rather than from path strings.

This code fires when no directory node matches the path.

## Why

An empty record for a misspelled path would draw a box with no edges and no
drift, which looks like a quiet package. Raising makes the typo fail where it
was written.

## Resolution

- **A typo.** Correct the path; it is workspace-relative, with no leading `./`.
- **A directory outside every project.** Declare a project that covers it, or
  draw it as an external box that names no directory.
- **A stale graph.** Run `magus graph build` after adding the directory.
