[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-84609-en":3,"doc-seo-84609-105":29,"detail-sidebar-cat-0-en-105":90},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":13,"seo_description":14,"update_tm":27,"read_time":28},84609,1649267921044,"Ava Thompson","https://us-avatar.wpscdn.com/avatar/1800007509477c92dfb?_k=1782875107921204101",8,"Research & Report","SAGE Structured Agentic Graph Editing for Software Diagrams","Software diagrams require edits that simultaneously preserve visual layout, editable structure, and semantic relationships, yet natural-language editing can easily break underlying consistency. SAGE is a browser-based, prompt-guided editing tool for Draw.io and Mermaid-style engineering diagrams. It maps diagrams into an editable graph model, converts natural-language requests into structured edit intents, analyzes them into graph operations, validates and repairs common Draw.io XML issues, and saves successful outcomes as recoverable, versioned artifacts. The approach separates structured state management from model interpretation, includes unit tests and a Kubernetes case study, and evaluates edit success, structural validity, and failure causes.","SAGE: Structured Agentic Graph Editing for Software Diagrams  \nTyler Sivertsen  \nPurdue University West Lafayette, Indiana USA [tsiverts@purdue.edu](tsiverts@purdue.edu)  \nNeal Singh  \nPurdue University West Lafayette, Indiana USA [sing1030@purdue.edu](sing1030@purdue.edu)  \nJames C. Davis  \nPurdue University West Lafayette, Indiana USA [davisjam@purdue.edu](davisjam@purdue.edu)  \narXiv :2607 .0 1 102v 1 [ cs . SE] 1 Jul 2026  \nAbstract  \nSoftware diagrams are difficult to edit through human-friendly interfaces because edits expressed in natural language must still preserve visual layout, editable structure, and semantic relationships. As a step forward, we present SAGE, a browser-based tool [for prompt-guided editing of Draw.io](for prompt-guided editing of Draw.io) and Mermaid-style engineering diagrams. The tool maps diagrams into an editable graph representation, translates natural language requests into structured edit intents, analyzes those intents into graph-oriented operation steps, validates and repairs common Draw.io XML issues, and stores successful results as recoverable versioned artifacts. This design separates structured state management from model-driven interpretation, while acknowledging that some prompt-guided XML edits remain model-assisted. The tool also supports direct canvas editing and a secondary mask-based image-editing workflow. We evaluate the system using unit tests and a Kubernetes architecture case study, measuring structural validity, edit success, preservation of unrelated elements, and failure causes.  \nDemo video: [https://youtu.be/pB76i10GkMg](https://youtu.be/pB76i10GkMg)  \nCode: [https://github.com/Miller11k/Agentic-Figure-Drawing](https://github.com/Miller11k/Agentic-Figure-Drawing)  \nCCS Concepts  \n• Human-centered computing → Interactive systems and tools.  \n1 Introduction  \nSoftware evolves, and so should its engineering diagrams. Architecture diagrams, deployment diagrams, and workflow diagrams are common mechanisms for communicating system structure, behavior, and stakeholder-specific views [1, 2, 5] . However, current drawing tools are either high-friction or under-controlled. Existing tools [such as Draw.io](such as Draw.io) and Mermaid support visual or textual diagram authoring [4, 6], but users must adapt their editing behavior to the tool’s available affordances, such as dragging shapes, editing XML-like structure, or rewriting diagram text. Recent systems leveraging language models can generate plausible visual outputs (e.g., [3, 9]), but they treat diagrams as static images or unvalidated text. Both approaches are insufficient for software engineering workflows where diagrams must remain editable, reusable, and structurally consistent. A useful diagram-editing tool must offer a human-friendly interface while preserving graph structure, maintaining editable elements, serializing back into reusable formats, and supporting recovery when an automatic edit is wrong.  \nOur tool, SAGE, addresses this problem through a hybrid architecture for structured, prompt-guided diagram editing. The tool maps Draw.io XML into an editable DiagramModel, represents natural language requests as ParsedEditIntent objects, analyzes those intents into target matches and graph-oriented operation steps,  \nFigure 1: Diagram-editing workflow in SAGE.  \nvalidates and repairs common serialized XML issues, and stores successful results as versioned artifacts. Language-model reasoning is used for interpretation, target resolution, and some prompt-guided XML transformations. Structured application logic performs graph edits, serialization, validation, repair, and recovery.  \nContributions: We describe the representations and algorithms that enable SAGE to combine human-oriented editing with structured diagram control and evaluate it with a case study. More broadly, SAGE illustrates a pattern for agentic tools: use language models for interpretation, but constrain accepted changes through editable representatio","cbCaisCCMXy5jg70","https://ap.wps.com/l/cbCaisCCMXy5jg70","pdf",2242291,1,4,"English","en",105,"# Abstract\n# Introduction\n# Tool Overview\n# Representations and Transformation Pipeline","[{\"question\":\"Why are software diagrams hard to edit with human-friendly interfaces?\",\"answer\":\"Edits expressed in natural language must still preserve visual layout, editable structure, and semantic relationships. Current tools often require users to adapt to low-level affordances like dragging, rewriting diagram text, or manually handling XML-like structure.\"},{\"question\":\"How does SAGE convert a natural-language request into safe diagram changes?\",\"answer\":\"SAGE parses requests into structured edit intents, analyzes those intents into graph-oriented operation steps, and validates the resulting changes. It also validates and repairs common Draw.io XML issues before accepting the edit as a recoverable artifact.\"},{\"question\":\"What evaluation metrics does SAGE use to assess its effectiveness?\",\"answer\":\"The system is evaluated with unit tests and a Kubernetes architecture case study, measuring structural validity, edit success, preservation of unrelated elements, and diagnosing failure causes.\"}]",1784197106,10,{"code":4,"msg":30,"data":31},"ok",{"site_id":24,"language":23,"slug":32,"title":13,"keywords":33,"description":14,"schema_data":34,"social_meta":85,"head_meta":87,"extra_data":89,"updated_unix":27},"sage-structured-agentic-graph-editing-for-software-diagrams","",{"@graph":35,"@context":84},[36,52,67],{"@type":37,"itemListElement":38},"BreadcrumbList",[39,43,47,50],{"item":40,"name":41,"@type":42,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":44,"name":45,"@type":42,"position":46},"https://docshare.wps.com/document/","Document",2,{"item":48,"name":12,"@type":42,"position":49},"https://docshare.wps.com/document/research-report/",3,{"item":51,"name":13,"@type":42,"position":21},"https://docshare.wps.com/document/sage-structured-agentic-graph-editing-for-software-diagrams/84609/",{"url":51,"name":13,"@type":53,"author":54,"headline":13,"publisher":56,"fileFormat":59,"inLanguage":23,"description":14,"dateModified":60,"datePublished":61,"encodingFormat":59,"isAccessibleForFree":62,"interactionStatistic":63},"DigitalDocument",{"name":9,"@type":55},"Person",{"url":40,"name":57,"@type":58},"DocShare","Organization","application/pdf","2026-07-17","2026-07-16",true,{"@type":64,"interactionType":65,"userInteractionCount":20},"InteractionCounter",{"@type":66},"ViewAction",{"@type":68,"mainEntity":69},"FAQPage",[70,76,80],{"name":71,"@type":72,"acceptedAnswer":73},"Why are software diagrams hard to edit with human-friendly interfaces?","Question",{"text":74,"@type":75},"Edits expressed in natural language must still preserve visual layout, editable structure, and semantic relationships. Current tools often require users to adapt to low-level affordances like dragging, rewriting diagram text, or manually handling XML-like structure.","Answer",{"name":77,"@type":72,"acceptedAnswer":78},"How does SAGE convert a natural-language request into safe diagram changes?",{"text":79,"@type":75},"SAGE parses requests into structured edit intents, analyzes those intents into graph-oriented operation steps, and validates the resulting changes. It also validates and repairs common Draw.io XML issues before accepting the edit as a recoverable artifact.",{"name":81,"@type":72,"acceptedAnswer":82},"What evaluation metrics does SAGE use to assess its effectiveness?",{"text":83,"@type":75},"The system is evaluated with unit tests and a Kubernetes architecture case study, measuring structural validity, edit success, preservation of unrelated elements, and diagnosing failure causes.","https://schema.org",{"og:url":51,"og:type":86,"og:title":13,"og:site_name":57,"og:description":14},"article",{"robots":88,"canonical":51},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":91},[92,96,100,104,109,114,119,122,127,130,133],{"id":20,"doc_module":4,"doc_module_name":45,"category_name":93,"show_sort_weight":94,"slug":95},"Story & Novel",90,"story-novel",{"id":46,"doc_module":4,"doc_module_name":45,"category_name":97,"show_sort_weight":98,"slug":99},"Literature",80,"literature",{"id":21,"doc_module":4,"doc_module_name":45,"category_name":101,"show_sort_weight":102,"slug":103},"Exam",70,"exam",{"id":105,"doc_module":4,"doc_module_name":45,"category_name":106,"show_sort_weight":107,"slug":108},5,"Comic",60,"comic",{"id":110,"doc_module":4,"doc_module_name":45,"category_name":111,"show_sort_weight":112,"slug":113},6,"Technology",50,"technology",{"id":115,"doc_module":4,"doc_module_name":45,"category_name":116,"show_sort_weight":117,"slug":118},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":45,"category_name":12,"show_sort_weight":120,"slug":121},30,"research-report",{"id":123,"doc_module":4,"doc_module_name":45,"category_name":124,"show_sort_weight":125,"slug":126},9,"Religion & Spirituality",20,"religion-spirituality",{"id":125,"doc_module":4,"doc_module_name":45,"category_name":128,"show_sort_weight":125,"slug":129},"World Cup","world-cup",{"id":28,"doc_module":4,"doc_module_name":45,"category_name":131,"show_sort_weight":28,"slug":132},"Lifestyle","lifestyle",{"id":134,"doc_module":4,"doc_module_name":45,"category_name":135,"show_sort_weight":105,"slug":136},19,"General","general"]