System Maps

A compact, structured index of your entire system that AI agents and tooling can consume instantly.

What Is a System Map?

A system map is a lightweight JSON document that summarizes every module, capability, entity, and unresolved reference in your SysMARA project. It is generated alongside the full system graph but serves a different purpose: while the system graph captures every edge and relationship for validation and diagnostics, the system map provides a flat, scannable index optimized for quick lookups.

Think of it this way: the system graph is the full blueprint of your building, while the system map is the directory in the lobby that tells you which offices are on which floor.

System Map vs. System Graph

Aspect System Graph System Map
File system-graph.json system-map.json
Purpose Full relationship graph for validation, impact analysis, cycle detection Flat index for discovery, navigation, and AI agent orientation
Contains edges Yes — every dependency and reference No — only lists of names grouped by type
Used by Compiler, diagnostics engine, impact analyzer AI agents, IDE extensions, documentation tools
Size Grows with relationship complexity Grows linearly with number of specs

SystemMap Structure

The SystemMap JSON document has four top-level fields:

Generating the System Map

The system map is generated as part of the sysmara graph command. This command parses all your spec files, builds the full system graph, and then produces both system-graph.json and system-map.json in your configured generated directory.

npx sysmara graph

You can also generate it as part of the full build pipeline:

npx sysmara build

The build command runs the full pipeline: validate, graph, compile, and diagnose. The system map is produced during the graph phase.

Both commands support the --json flag for machine-readable output:

npx sysmara graph --json

Example Output

Here is an example system-map.json for a billing service with two modules:

{
  "version": "1.0",
  "generatedAt": "2026-03-14T10:30:00.000Z",
  "modules": [
    "billing",
    "customers"
  ],
  "capabilities": [
    "CreateSubscription",
    "CancelSubscription",
    "ChargeInvoice",
    "RegisterCustomer",
    "UpdateCustomerProfile"
  ],
  "entities": [
    "Subscription",
    "Invoice",
    "Customer",
    "PaymentMethod"
  ],
  "unresolved": []
}

If an entity or capability references something that does not exist, it appears in the unresolved array:

{
  "version": "1.0",
  "generatedAt": "2026-03-14T10:30:00.000Z",
  "modules": ["billing"],
  "capabilities": ["CreateSubscription"],
  "entities": ["Subscription"],
  "unresolved": ["entity:Plan"]
}

How AI Agents Use the System Map

When an AI agent needs to work with your codebase, it first reads the system map to understand what exists. This is far more efficient than scanning the file system or parsing YAML files directly. The system map answers questions like:

With this information, an agent can then request specific spec files for deeper context, or use the full system graph for relationship traversal. The system map serves as the entry point — the first thing an agent reads to orient itself.

Keeping the Map Current

The system map is a generated artifact. Do not edit it manually. Re-run sysmara graph or sysmara build whenever you change spec files. In a CI/CD pipeline, include the graph step to ensure the map stays in sync:

# In your CI pipeline
npx sysmara validate
npx sysmara graph
# Optionally commit the generated files or use them in subsequent steps

If your unresolved array is non-empty, treat that as a warning. It means your specs reference things that do not exist yet, and AI agents or tooling may produce incomplete or incorrect results.