Skip to main content

Overview

The traceability-graph.json file is a structured representation of all SDD artifacts, their relationships, code/test/commit references, and statistical metrics. It powers the interactive HTML dashboard and the MCP server.

Location

dashboard/traceability-graph.json

Schema version

Current: v4 (introduced in SDD Plugin v2.0.0) Backward compatibility: All v1/v2/v3 fields are preserved. Each version is a pure extension.

Root fields

$schema
string
required
Schema version identifier. Always "traceability-graph-v4".
generatedAt
string
required
ISO-8601 timestamp when the graph was generated.Example: "2026-03-01T15:30:00.000Z"
projectName
string
required
Name of the project. Derived from package.json, directory name, or pipeline-state.json.
pipeline
object
required
Pipeline execution status snapshot.
artifacts
array
required
Array of all SDD artifacts found in the project.
relationships
array
required
Array of all relationships between artifacts.
statistics
object
required
Aggregate statistics about the graph.
adoption
object
v3 only. Onboarding skill data. Defaults to {"present": false} when no onboarding data exists.
codeIntelligence
object
v4 only. Code intelligence block from /sdd:code-index. Absent by default.

Example

See the full schema reference for a complete example.
{
  "$schema": "traceability-graph-v4",
  "generatedAt": "2026-03-01T15:30:00.000Z",
  "projectName": "my-project",
  "pipeline": {
    "currentStage": "task-generator",
    "stages": [
      {
        "name": "requirements-engineer",
        "status": "done",
        "lastRun": "2026-02-25T10:00:00.000Z",
        "artifactCount": 330
      }
    ]
  },
  "artifacts": [
    {
      "id": "REQ-EXT-001",
      "type": "REQ",
      "category": "EXT",
      "title": "Extract text from PDF files",
      "file": "requirements/REQUIREMENTS.md",
      "line": 42,
      "priority": "Must Have",
      "stage": "requirements-engineer",
      "classification": {
        "businessDomain": "Extraction & Processing",
        "technicalLayer": "Backend",
        "functionalCategory": "Functional"
      },
      "codeRefs": [],
      "testRefs": [],
      "commitRefs": []
    }
  ],
  "relationships": [],
  "statistics": {
    "totalArtifacts": 800,
    "byType": { "REQ": 330 },
    "totalRelationships": 1200,
    "traceabilityCoverage": {
      "reqsWithUCs": { "count": 280, "total": 330, "percentage": 84.8 }
    },
    "orphans": [],
    "brokenReferences": [],
    "codeStats": { "totalFiles": 85, "totalSymbols": 340, "symbolsWithRefs": 120 },
    "testStats": { "totalTestFiles": 42, "totalTests": 285, "testsWithRefs": 95 },
    "commitStats": { "totalCommits": 48, "commitsWithRefs": 42, "commitsWithTasks": 45, "uniqueTasksCovered": 40 },
    "classificationStats": {
      "byDomain": { "Extraction & Processing": 45 },
      "byLayer": { "Backend": 80 },
      "byCategory": { "Functional": 200 }
    },
    "adoptionStats": null
  }
}

Usage

Generation

Generate the graph with the dashboard skill:
/sdd:dashboard
This scans all pipeline directories and produces both traceability-graph.json and index.html.

Consumption

MCP Server: The graph is loaded by the MCP server at server/src/graph-loader.ts with file watching and graceful degradation. Dashboard: The HTML dashboard reads the graph to render the interactive UI. Context Hook: The sdd-augment-hook.js uses the graph to inject traceability context into file operations.
  • Skills: /sdd:dashboard, /sdd:code-index
  • Hooks: H5 (sdd-augment-hook)
  • MCP server: All 5 tools and 7 resources
  • Reference: graph-schema.md

Build docs developers (and LLMs) love