### Install and Build DiagramPilot CLI Source: https://diagrampilot.com/docs/agents/quickstart.md Install project dependencies and build the local CLI before running the demo. This is a prerequisite for local invocation. ```bash npm install npm run build ``` -------------------------------- ### Dependency Graph Example Source: https://diagrampilot.com/docs/agents/examples.md Visualizes package dependencies. This example defines nodes representing packages and edges showing their relationships, suitable for understanding project structure. ```yaml version: 1 title: Package Dependencies direction: right nodes: - id: cli label: packages/cli kind: package icon: lucide:terminal - id: core label: packages/core kind: package icon: lucide:box - id: render_svg label: packages/render-svg kind: package icon: lucide:file-image - id: export_mermaid label: packages/export-mermaid kind: package icon: lucide:file-code - id: export_d2 label: packages/export-d2 kind: package icon: lucide:file-code - id: export_dot label: packages/export-dot kind: package icon: lucide:file-code - id: icons label: packages/icons kind: package icon: lucide:shapes edges: - id: cli_to_core from: cli to: core - id: cli_to_render_svg from: cli to: render_svg - id: cli_to_export_mermaid from: cli to: export_mermaid - id: cli_to_export_d2 from: cli to: export_d2 - id: cli_to_export_dot from: cli to: export_dot - id: render_svg_to_export_d2 from: render_svg to: export_d2 - id: render_svg_to_core from: render_svg to: core - id: export_mermaid_to_core from: export_mermaid to: core - id: export_d2_to_core from: export_d2 to: core - id: export_dot_to_core from: export_dot to: core - id: core_to_icons from: core to: icons ``` -------------------------------- ### Example MCP Client Configuration Source: https://diagrampilot.com/docs/agents/installation.md Configuration for an MCP client to connect to a DiagramPilot server. ```json { "mcpServers": { "diagrampilot": { "command": "diagrampilot", "args": ["mcp"] } } } ``` -------------------------------- ### Flowchart Example Source: https://diagrampilot.com/docs/agents/examples.md Illustrates a login process using a flowchart. This example defines nodes for different stages like submission, validation, decision points, and outcomes, connected by directed edges. ```yaml version: 1 title: Login Flow direction: down nodes: - id: start label: User submits credentials kind: start icon: lucide:circle-play - id: validate_credentials label: Validate credentials kind: process icon: lucide:shield-check - id: valid_credentials label: Credentials valid? kind: decision icon: lucide:diamond - id: create_session label: Create session kind: process icon: lucide:key-round - id: reject_login label: Reject login kind: end icon: lucide:circle-x edges: - id: start_to_validate_credentials from: start to: validate_credentials - id: validate_credentials_to_valid_credentials from: validate_credentials to: valid_credentials - id: valid_credentials_to_create_session from: valid_credentials to: create_session label: yes - id: valid_credentials_to_reject_login from: valid_credentials to: reject_login label: no ``` -------------------------------- ### Initialize DiagramPilot Configuration Source: https://diagrampilot.com/docs/agents/quickstart.md Start a minimal DiagramPilot configuration file using the `init --config` command. ```bash diagrampilot init --config ``` -------------------------------- ### Nested Groups Diagram Example Source: https://diagrampilot.com/docs/agents/examples.md Demonstrates how to use nested groups to organize diagram elements. This example shows a platform overview with services grouped under a backend umbrella. ```yaml version: 1 title: Platform Overview direction: right nodes: - id: web_app label: Web App kind: frontend - id: api_gateway label: API Gateway kind: service - id: worker label: Worker kind: service - id: jobs_queue label: Jobs Queue kind: queue groups: - id: services label: Services contains: - api_gateway - worker - id: backend label: Backend contains: - services - jobs_queue edges: - id: web_app_to_api_gateway from: web_app to: api_gateway label: HTTPS - id: api_gateway_to_jobs_queue from: api_gateway to: jobs_queue label: enqueues job - id: jobs_queue_to_worker from: jobs_queue to: worker label: consumed by ``` -------------------------------- ### Launch DiagramPilot MCP Server Source: https://diagrampilot.com/docs/agents/mcp.md Use this command to launch the DiagramPilot MCP server via the main CLI. This is the primary method for starting the server. ```bash diagrampilot mcp ``` -------------------------------- ### DiagramSpec File Structure Source: https://diagrampilot.com/docs/agents/quickstart.md Example file structure for managing DiagramSpec source and rendered output. ```text docs/architecture.dp.yaml docs/architecture.svg ``` -------------------------------- ### Node Definition Example Source: https://diagrampilot.com/docs/agents/spec.md Shows a detailed node definition including ID, label, kind, description, icon, and metadata. ```yaml nodes: - id: api_gateway label: API Gateway kind: service description: Routes public API traffic. icon: lucide:server metadata: source: src/gateway external_url: https://example.com/api-gateway-notes ``` -------------------------------- ### Configured Artifact Mappings Source: https://diagrampilot.com/docs/agents/quickstart.md Example of DiagramPilot configuration defining artifact mappings for specific source files and glob patterns. ```yaml version: 1 artifacts: - source: docs/architecture.dp.yaml outputs: - format: svg path: docs/architecture.svg profile: presentation - format: mermaid path: docs/architecture.mmd profile: compact - format: png path: docs/architecture.png - format: markdown path: docs/architecture.embed.md - sourceGlob: docs/diagrams/*.dp.yaml outputs: - format: d2 path: artifacts/{sourceDir}/{stem}.{format} ``` -------------------------------- ### Minimal DiagramSpec Example Source: https://diagrampilot.com/docs/agents/spec.md A basic DiagramSpec file including version, title, nodes, and edges. ```yaml version: 1 title: Checkout Architecture nodes: - id: web_app label: Web App - id: api_gateway label: API Gateway edges: - id: web_app_to_api_gateway from: web_app to: api_gateway label: HTTPS ``` -------------------------------- ### Global Local Use Installation Source: https://diagrampilot.com/docs/agents/installation.md Install DiagramPilot globally to make the 'diagrampilot' command available as a local shell tool across repositories. This is preferred for general local tool availability. ```bash npm install --global diagrampilot diagrampilot check diagrampilot inspect ``` -------------------------------- ### Good Prompt Pattern for DiagramPilot Source: https://diagrampilot.com/docs/agents/prompting.md An example of a well-structured prompt for creating a DiagramPilot diagram. It specifies the source file location, components, artifact, ID strategy, and edge labeling. ```text Create a DiagramPilot source file at docs/architecture.dp.yaml for the auth, API, worker, queue, and database components. Render docs/architecture.svg. Use stable IDs and include labels on edges that describe protocols or data flow. ``` -------------------------------- ### Uninstall Global npm Install Source: https://diagrampilot.com/docs/agents/installation.md Remove a global npm installation of DiagramPilot. ```bash npm uninstall --global diagrampilot ``` -------------------------------- ### Valid ID Format Example Source: https://diagrampilot.com/docs/agents/spec.md Demonstrates the required lowercase snake_case format for stable IDs in DiagramSpec. ```text ^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$ ``` -------------------------------- ### Add DiagramPilot as Dev Dependency Source: https://diagrampilot.com/docs/agents/installation.md Install DiagramPilot as a dev dependency for consistent use in scripts and CI. This ensures the repository runs the same version. ```bash npm install --save-dev diagrampilot ``` -------------------------------- ### Known Node Kinds Source: https://diagrampilot.com/docs/agents/spec.md Provides examples of common 'kind' tags used for nodes in DiagramSpec. ```text frontend service database start process decision package ``` -------------------------------- ### Architecture Diagram Example Source: https://diagrampilot.com/docs/agents/examples.md Defines an architecture diagram with nodes for web applications, services, and databases, organized into groups. Use this for visualizing system components and their interactions. ```yaml version: 1 title: Checkout Architecture direction: right nodes: - id: web_app label: Web App kind: frontend icon: lucide:globe - id: api_gateway label: API Gateway kind: service icon: lucide:server - id: checkout_service label: Checkout Service kind: service icon: lucide:server - id: orders_db label: Orders DB kind: database icon: lucide:database groups: - id: backend label: Backend contains: - api_gateway - checkout_service - orders_db edges: - id: web_app_to_api_gateway from: web_app to: api_gateway label: HTTPS - id: api_gateway_to_checkout_service from: api_gateway to: checkout_service label: forwards request - id: checkout_service_to_orders_db from: checkout_service to: orders_db label: stores order ``` -------------------------------- ### Run DiagramPilot Script Source: https://diagrampilot.com/docs/agents/installation.md Execute the added DiagramPilot script locally or in CI after dependencies have been installed. This command runs the 'diagrampilot check' script defined in package.json. ```bash npm run diagrams:check ``` -------------------------------- ### Recommended Agent Instruction for DiagramPilot Source: https://diagrampilot.com/docs/agents/prompting.md Use this instruction to guide an AI agent in creating or updating DiagramPilot diagrams. It emphasizes structured source files, repository checks, ID preservation, validation, and SVG rendering. ```text Create or update a DiagramPilot diagram in this repository. Use a structured .dp.yaml source file, run the read-only repo check and inspect inventory first, preserve stable IDs, validate the spec, and render an SVG artifact with an explicit --out path. Render PNG with `--format png` only when a raster artifact is needed. Do not hand-edit generated artifacts. ``` -------------------------------- ### Update Prompt for DiagramPilot Source: https://diagrampilot.com/docs/agents/prompting.md Guides an AI agent to update an existing DiagramPilot source file by adding new components while preserving existing IDs. It ensures validation and re-rendering of the SVG. ```text Update the existing DiagramPilot source file to include the new payment service. Preserve all existing IDs unless an ID is invalid. Add only the new nodes and edges required, validate, and render the SVG again. ``` -------------------------------- ### Validate a Specific Source File Source: https://diagrampilot.com/docs/agents/quickstart.md Use the `validate` command on an explicit source file to get detailed repair information for source problems. ```bash diagrampilot validate docs/architecture.dp.yaml ``` -------------------------------- ### Good Error Message Example Source: https://diagrampilot.com/docs/agents/error-repair.md A good error message provides specific details about the problem, including the path, the unknown reference, and actionable suggestions for correction, such as adding a node or changing a reference. ```text edges[0].from references unknown node "client". Add a node with id "client" or change the edge to reference one of: web_app, api_gateway. ``` -------------------------------- ### Structured Validation Error Example Source: https://diagrampilot.com/docs/agents/error-repair.md A typical structured validation error includes the file path, a detailed message, the invalid value, expected format, and a concrete suggestion for repair. This format is designed for AI agents. ```json { "file": "docs/architecture.dp.yaml", "errors": [ { "path": "edges[1].to", "message": "Edge target does not reference an existing node.", "badValue": "payment_db", "expected": "One of: web_app, api_gateway, orders_db", "suggestion": "Change edges[1].to to an existing node ID or add a node with id payment_db." } ] } ``` -------------------------------- ### Repair Invalid ID Shape Source: https://diagrampilot.com/docs/agents/error-repair.md To fix an invalid ID shape, ensure the `id` field conforms to the specified pattern, typically starting with a letter and followed by alphanumeric characters or underscores. ```text nodes[0].id must match ^[a-z][a-z0-9]*(?:_[a-z0-9]+)*.$ ``` ```yaml id: api_gateway ``` -------------------------------- ### Create Starter DiagramPilot Source Files Source: https://diagrampilot.com/docs/agents/examples.md Use these commands to generate initial DiagramPilot source files with specified templates. Each command creates a new file and suggests validation and rendering commands. ```bash diagrampilot create docs/architecture.dp.yaml --template architecture diagrampilot create docs/login-flow.dp.yaml --template flow diagrampilot create docs/packages.dp.yaml --template package-map ``` -------------------------------- ### Initialize DiagramPilot Project Source: https://diagrampilot.com/docs Initializes a new DiagramPilot project. Use `--docs` to manage local agent documentation or `--config` to set up a `diagrampilot.config.yaml` file. ```bash diagrampilot init diagrampilot init --docs diagrampilot init --config ``` -------------------------------- ### Create DiagramPilot Source File Source: https://diagrampilot.com/docs Creates a starter `*.dp.yaml` source file from a template (e.g., `architecture`, `flow`, `package-map`). ```bash diagrampilot create docs/architecture.dp.yaml --template architecture ``` -------------------------------- ### Launch DiagramPilot MCP Server (Dedicated Package) Source: https://diagrampilot.com/docs/agents/mcp.md Clients requiring a dedicated package executable can use this command to launch the DiagramPilot MCP server. This is an alternative to the main CLI method. ```bash diagrampilot-mcp ``` -------------------------------- ### Inspect DiagramPilot Project with JSON Output Source: https://diagrampilot.com/docs Provides a read-only inventory with JSON output. ```bash diagrampilot inspect docs --json ``` -------------------------------- ### Create, Validate, and Render DiagramPilot Source Source: https://diagrampilot.com/docs/agents/quickstart.md Commands to create a new DiagramPilot source file, validate its syntax, and render it to an SVG artifact. Use these when a repository lacks a starter DiagramPilot file. ```bash diagrampilot create docs/architecture.dp.yaml --template architecture diagrampilot validate docs/architecture.dp.yaml diagrampilot render docs/architecture.dp.yaml --out docs/architecture.svg ``` -------------------------------- ### Inspect DiagramPilot Project Source: https://diagrampilot.com/docs Provides a read-only inventory of source files, topology, Stable IDs, and artifact expectations before making edits. ```bash diagrampilot inspect ``` -------------------------------- ### Run Demo Workflow Commands Source: https://diagrampilot.com/docs/agents/quickstart.md Execute the `check` and `inspect` commands from the demo project directory to review DiagramPilot source files and their artifacts. ```bash cd demo-projects/checkout diagrampilot check diagrampilot inspect ``` -------------------------------- ### Inspect DiagramPilot Project Inventory Source: https://diagrampilot.com/docs/agents/quickstart.md Provides a concise, read-only inventory of discovered source files, diagram counts, Stable IDs, topology summary, and artifact expectations. Use --json for stable output for agents, including diagnostics and artifact summaries. ```bash diagrampilot inspect diagrampilot inspect demo-projects/checkout --json ``` -------------------------------- ### Run Local DiagramPilot CLI Source: https://diagrampilot.com/docs/agents/quickstart.md Execute the local DiagramPilot CLI if it's not linked on your PATH. This command is used after navigating to the demo project directory. ```bash node ../../packages/cli/dist/index.js ``` -------------------------------- ### Minimal DiagramPilot Configuration Source: https://diagrampilot.com/docs/agents/quickstart.md A basic DiagramPilot configuration file with a source ignore pattern. ```yaml version: 1 sources: ignore: - generated/** - vendor/diagrams/** ``` -------------------------------- ### Check DiagramPilot Project with JSON Output Source: https://diagrampilot.com/docs Performs a read-only review of the repository with JSON output. ```bash diagrampilot check docs --json ``` -------------------------------- ### Inventory Prompt for DiagramPilot Source: https://diagrampilot.com/docs/agents/prompting.md Asks an AI agent to inspect DiagramPilot files and summarize repository inventory without editing or generating files. It requests information on source files, IDs, topology, and artifact expectations. ```text Run diagrampilot inspect --json for this repository and summarize the DiagramPilot Source Files, Stable IDs, topology, and missing or stale artifact expectations. Do not edit or generate files. ``` -------------------------------- ### One-Off Use with pnpm, yarn, or bun Source: https://diagrampilot.com/docs/agents/installation.md Verified package-manager equivalents for running DiagramPilot commands one-off using dlx or bunx. ```bash pnpm dlx diagrampilot check yarn dlx diagrampilot check bunx diagrampilot check ``` -------------------------------- ### Export to Mermaid Format Source: https://diagrampilot.com/docs/agents/quickstart.md Export a DiagramPilot source file to the Mermaid diagram-as-code format. ```bash diagrampilot export docs/architecture.dp.yaml --format mermaid ``` -------------------------------- ### Render DiagramPilot Source to Image Source: https://diagrampilot.com/docs Renders a `*.dp.yaml` source file to a specified output format (SVG, PNG). Requires the `--out` option. ```bash diagrampilot render docs/architecture.dp.yaml --out docs/architecture.svg diagrampilot render docs/architecture.dp.yaml --format png --out docs/architecture.png ``` -------------------------------- ### Add DiagramPilot with pnpm, yarn, or bun Source: https://diagrampilot.com/docs/agents/installation.md Verified package-manager equivalents for adding DiagramPilot as a dev dependency using pnpm, yarn, or bun. ```bash pnpm add -D diagrampilot yarn add -D diagrampilot bun add -D diagrampilot ``` -------------------------------- ### DiagramPilot CLI Commands Source: https://diagrampilot.com/docs/agents/quickstart.md Common commands for checking, inspecting, validating, and rendering diagrams using the DiagramPilot CLI. ```bash diagrampilot check diagrampilot inspect diagrampilot validate docs/architecture.dp.yaml diagrampilot render docs/architecture.dp.yaml --out docs/architecture.svg diagrampilot render docs/architecture.dp.yaml --format png --out docs/architecture.png git diff --exit-code docs/architecture.svg ``` -------------------------------- ### Add DiagramPilot Script to Package.json Source: https://diagrampilot.com/docs/agents/installation.md Add a script to the consuming repository's package.json to easily run DiagramPilot commands. This script can be executed locally or in CI. ```json { "scripts": { "diagrams:check": "diagrampilot check" } } ``` -------------------------------- ### Export DiagramPilot Source to Different Formats Source: https://diagrampilot.com/docs Exports a `*.dp.yaml` source file to formats like Mermaid, D2, or DOT. Writes to a file only when `--out` is provided; otherwise, prints to stdout. ```bash diagrampilot export docs/architecture.dp.yaml --format mermaid diagrampilot export docs/architecture.dp.yaml --format d2 --out docs/architecture.d2 diagrampilot export docs/architecture.dp.yaml --format dot --out docs/architecture.dot ``` -------------------------------- ### Watch DiagramPilot Files for Changes Source: https://diagrampilot.com/docs Monitors `*.dp.yaml` and `diagrampilot.config.yaml` files for changes, debounces events, and generates artifacts when the source/config state is valid. ```bash diagrampilot watch docs ``` -------------------------------- ### Architecture Prompt for DiagramPilot Source: https://diagrampilot.com/docs/agents/prompting.md Instructs an AI agent to create an architecture diagram source file and its corresponding SVG artifact. It specifies file locations, ID naming conventions, grouping, edge labeling, and validation. ```text Create docs/architecture.dp.yaml showing the main runtime components in this project. Use stable lowercase snake case IDs, group related services, include labeled edges for major data flows, validate the spec, and render docs/architecture.svg. ``` -------------------------------- ### Export Prompt for DiagramPilot Source: https://diagrampilot.com/docs/agents/prompting.md Instructs an AI agent to export a DiagramPilot source file to DOT format and display the output. It specifies not to write an exported file unless explicitly requested. ```text Export docs/architecture.dp.yaml to DOT and show me the output. Do not write an exported file unless I ask for one. ``` -------------------------------- ### One-Off Use Commands Source: https://diagrampilot.com/docs/agents/installation.md Run DiagramPilot commands without adding it as a project dependency. Useful for quick checks, demos, or repair loops. ```bash npx diagrampilot check npx diagrampilot create docs/architecture.dp.yaml --template architecture npx diagrampilot inspect npx diagrampilot validate docs/architecture.dp.yaml npx diagrampilot format docs/architecture.dp.yaml npx diagrampilot render docs/architecture.dp.yaml --out docs/architecture.svg npx diagrampilot render docs/architecture.dp.yaml --format png --out docs/architecture.png ``` -------------------------------- ### Generate DiagramPilot Artifacts Source: https://diagrampilot.com/docs Rewrites configured Derived Artifacts and generated Markdown embed files. ```bash diagrampilot generate ``` -------------------------------- ### Export to DOT Format Source: https://diagrampilot.com/docs/agents/quickstart.md Exports a YAML architecture definition to the DOT graph description language format. The `--out` flag directs the output to a file. ```bash diagrampilot export docs/architecture.dp.yaml --format dot --out docs/architecture.dot ``` -------------------------------- ### Validate DiagramPilot Source File Source: https://diagrampilot.com/docs Validates a `*.dp.yaml` source file. Use `--json` for JSON output. ```bash diagrampilot validate docs/architecture.dp.yaml diagrampilot validate docs/architecture.dp.yaml --json ``` -------------------------------- ### Uninstall DiagramPilot with bun Source: https://diagrampilot.com/docs/agents/installation.md Remove the DiagramPilot repository dev dependency using bun. ```bash bun remove diagrampilot ``` -------------------------------- ### Format DiagramPilot Source File Source: https://diagrampilot.com/docs Validates a `*.dp.yaml` source file and rewrites it in canonical YAML key order. Note: YAML comments may be removed or moved in v0.4.0. ```bash diagrampilot format docs/architecture.dp.yaml ``` -------------------------------- ### Render PNG Artifact Source: https://diagrampilot.com/docs/agents/quickstart.md Render a PNG artifact from the same local render path as the SVG, specifying the format and output path. ```bash diagrampilot render docs/architecture.dp.yaml --format png --out docs/architecture.png ``` -------------------------------- ### Uninstall DiagramPilot with pnpm Source: https://diagrampilot.com/docs/agents/installation.md Remove the DiagramPilot repository dev dependency using pnpm. ```bash pnpm remove diagrampilot ``` -------------------------------- ### Remove DiagramPilot Init Markers Source: https://diagrampilot.com/docs/agents/installation.md Remove managed sections from llms.txt and docs/diagrampilot.md that were added by an earlier 'diagrampilot init' run. These markers delineate the content to be removed. ```html ``` -------------------------------- ### Top-Level Fields in DiagramSpec Source: https://diagrampilot.com/docs/agents/spec.md Illustrates the common top-level fields for a DiagramSpec file, including optional fields like description and direction. ```yaml version: 1 title: System Architecture description: Optional plain-text summary. direction: right nodes: [] edges: [] groups: [] metadata: {} ``` -------------------------------- ### Uninstall DiagramPilot with npm Source: https://diagrampilot.com/docs/agents/installation.md Remove the DiagramPilot repository dev dependency using npm. ```bash npm uninstall diagrampilot ``` -------------------------------- ### Review Prompt for DiagramPilot Source: https://diagrampilot.com/docs/agents/prompting.md Instructs an AI agent to perform a check on DiagramPilot diagrams within a repository. It focuses on identifying and fixing issues related to references, IDs, containment, icons, labels, and stale artifacts. ```text Run diagrampilot check for this repository. Review .dp.yaml files for broken references, duplicate IDs, invalid group containment, unknown icons, unclear labels, and stale expected SVG artifacts. Report findings and fix only the issues directly related to DiagramPilot diagrams. ``` -------------------------------- ### Export to D2 Format Source: https://diagrampilot.com/docs/agents/quickstart.md Exports a YAML architecture definition to the D2 diagram format. Use the `--out` flag to specify an output file. ```bash diagrampilot export docs/architecture.dp.yaml --format d2 --out docs/architecture.d2 ``` -------------------------------- ### Check DiagramPilot Project Status Source: https://diagrampilot.com/docs Performs a read-only review of the repository or CI command for DiagramPilot projects. ```bash diagrampilot check ``` -------------------------------- ### Render SVG Artifact Source: https://diagrampilot.com/docs/agents/quickstart.md Render the SVG artifact for a source file after validation succeeds, specifying the output path. ```bash diagrampilot render docs/architecture.dp.yaml --out docs/architecture.svg ``` -------------------------------- ### Expected Validation Result Source: https://diagrampilot.com/docs/agents/quickstart.md This is the expected output when the `diagrampilot validate` command successfully processes a source file. ```text Valid docs/architecture.dp.yaml ``` -------------------------------- ### Expected Check Result Source: https://diagrampilot.com/docs/agents/quickstart.md This is the expected output when the `diagrampilot check` command finds all SVG artifacts to be fresh. ```text Checked 1 DiagramPilot Source File. All expected SVG artifacts are fresh. ``` -------------------------------- ### Validate with JSON Output Source: https://diagrampilot.com/docs/agents/error-repair.md Use the `--json` flag with the `diagrampilot validate` command for structured, agent-readable output of validation results. This is useful for automated processing of errors. ```bash diagrampilot validate docs/architecture.dp.yaml --json ``` -------------------------------- ### Icon Reference Source: https://diagrampilot.com/docs/agents/spec.md Specifies an optional namespaced icon for a diagram element. Icon namespaces must be lowercase, and Lucide icon names should follow the packaged kebab-case format. ```yaml icon: lucide:database ``` -------------------------------- ### Uninstall DiagramPilot with yarn Source: https://diagrampilot.com/docs/agents/installation.md Remove the DiagramPilot repository dev dependency using yarn. ```bash yarn remove diagrampilot ``` -------------------------------- ### Group Definition Source: https://diagrampilot.com/docs/agents/spec.md Organizes multiple nodes or groups under a single entity. Requires 'id', 'label', and 'contains' fields. Optional fields include 'kind', 'description', 'icon', and 'metadata'. Groups can nest but not form cycles. ```yaml groups: - id: backend label: Backend contains: - api_gateway - orders_service - orders_db ``` -------------------------------- ### Edge Definition Source: https://diagrampilot.com/docs/agents/spec.md Defines a connection between two nodes in the diagram. Requires 'id', 'from', and 'to' fields. Optional fields include 'label', 'kind', 'description', 'directed', and 'metadata'. Edges are directed by default. ```yaml edges: - id: web_app_to_api_gateway from: web_app to: api_gateway label: HTTPS kind: request directed: true ``` -------------------------------- ### Repair Unknown Icon Source: https://diagrampilot.com/docs/agents/error-repair.md To fix an unknown icon reference, update the `icon` field to a valid Lucide icon name, often prefixed with `lucide:`. ```text nodes[2].icon references unknown Lucide icon "databse". ``` ```yaml icon: lucide:database ``` -------------------------------- ### Repair Missing Node ID Source: https://diagrampilot.com/docs/agents/error-repair.md When a node ID is missing, the repair involves adding an `id` field with a unique identifier to the node definition. ```text nodes[3].id is missing. ``` ```yaml id: auth_service ``` -------------------------------- ### Repair Invalid Direction Source: https://diagrampilot.com/docs/agents/error-repair.md Correct an invalid direction by setting the `direction` field to one of the allowed values: right, left, down, or up. ```text direction must be one of: right, left, down, up. ``` ```yaml direction: right ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.