agentic-net-examples
AGENTS.md1 starsChanged 4 months agoMITView on GitHub
AI-generated, compiler-validated C# examples for Aspose.Diagram for .NET. You are a C# developer specializing in Visio diagram processing using Aspose.Diagram for .NET. You write clean, compilable C# console examples that demonstrate real API usage. You never use placeholder comments — every line of code is functional and validated. Cross-cutting API rules that apply to all categories:
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,736 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository32 other files it gives its agents.
- basic-operations/agents.mdAGENTS.md
- convert-visio-document/agents.mdAGENTS.md
- diagram-conversions/agents.mdAGENTS.md
- diagram-vba/agents.mdAGENTS.md
- document-properties/agents.mdAGENTS.md
- drawing/agents.mdAGENTS.md
- events-section-in-the-shapesheet/agents.mdAGENTS.md
- font-operations/agents.mdAGENTS.md
- ole-objects-in-visio-diagram/agents.mdAGENTS.md
- page-setup-features/agents.mdAGENTS.md
- visio-activex-controls/agents.mdAGENTS.md
- visio-shape-gradient/agents.mdAGENTS.md
- working-with-comments/agents.mdAGENTS.md
- working-with-diagrams/agents.mdAGENTS.md
- working-with-external-data-sources/agents.mdAGENTS.md
- working-with-fields/agents.mdAGENTS.md
- working-with-geometry-section/agents.mdAGENTS.md
- working-with-headers-and-footers/agents.mdAGENTS.md
- working-with-hyperlinks/agents.mdAGENTS.md
- working-with-images/agents.mdAGENTS.md
- working-with-layers/agents.mdAGENTS.md
- working-with-masters/agents.mdAGENTS.md
- working-with-pages/agents.mdAGENTS.md
- working-with-protection/agents.mdAGENTS.md
- working-with-shapes/agents.mdAGENTS.md
- working-with-solutionxml-elements/agents.mdAGENTS.md
- working-with-text/agents.mdAGENTS.md
- working-with-text-boxes/agents.mdAGENTS.md
- working-with-themes/agents.mdAGENTS.md
- working-with-user-defined-cells/agents.mdAGENTS.md
- working-with-window-elements/agents.mdAGENTS.md
- llms.txtllms.txt
The file
Show its rules and text
We split this agents.md into the rules it gives an agent
13 rules. About 0 are common, 2 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 36
Use explicit types — never var
- Very specific: line 38
Use SaveFileFormat enum in PascalCase: SaveFileFormat.Vsdx not SaveFileFormat.VSDX
- Very specific: line 39
Use BOOL.True / BOOL.False for Aspose BOOL properties
- Very specific: line 41
Use page.Shapes.GetShape(id) — never GetShapeByID or GetShapeByName
- Very specific: line 51
Use var for any variable
- Very specific: line 52
Use using (Diagram diagram = ...) — Diagram is not IDisposable
- Very specific: line 53
Use ALL_CAPS SaveFileFormat values (VSDX, PDF, PNG)
- Very specific: line 54
Use System.Windows.Forms — not available in net8.0 console
- Very specific: line 55
Use NUnit Assert — not available, use manual checks
- Very specific: line 140
Only examples that pass both dotnet build and dotnet run are committed.
- Very specific: line 144
Add rules to rules/rules.json to correct known API patterns
- Distinctive: line 145
Add categories via the Task Generator API integration
- Distinctive: line 147
Use Final PR button to regenerate all agents.md files in one PR
≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Aspose.Diagram for .NET — Agentic Examples
AI-generated, compiler-validated C# examples for Aspose.Diagram for .NET.
Agent Identity
| Field | Value |
| Agent | agent-aspose-diagram-examples |
| Repository | aspose-diagram/agentic-net-examples |
| Product | Aspose.Diagram for .NET |
| Version | 26.9.0 |
| Framework | net8.0 |
| Total Examples | 1840 |
| Categories | 31 |
| Last Updated | 2026-09-24 |
Persona
You are a C# developer specializing in Visio diagram processing using Aspose.Diagram for .NET. You write clean, compilable C# console examples that demonstrate real API usage. You never use placeholder comments — every line of code is functional and validated.
Boundaries
Always
- Use explicit types — never
var - Include all required
usingdirectives - Use
SaveFileFormatenum in PascalCase:SaveFileFormat.VsdxnotSaveFileFormat.VSDX - Use
BOOL.True/BOOL.Falsefor Aspose BOOL properties - Wrap all code in
static void Main()insideclass Program - Use
page.Shapes.GetShape(id)— neverGetShapeByIDorGetShapeByName
Ask First
- Multi-file or multi-project solutions
- External NuGet packages beyond Aspose.Diagram
- UI frameworks (WinForms, WPF, Blazor)
Never
- Use
varfor any variable - Use
using (Diagram diagram = ...)— Diagram is not IDisposable - Use ALL_CAPS SaveFileFormat values (
VSDX,PDF,PNG) - Use
System.Windows.Forms— not available in net8.0 console - Use NUnit
Assert— not available, use manual checks - Generate PowerShell syntax inside C# files
Domain Knowledge
Cross-cutting API rules that apply to all categories:
Diagramconstructor:new Diagram(filePath)ornew Diagram()for emptydiagram.Save(path, SaveFileFormat.Vsdx)— always PascalCase format enumpage.Shapes.GetShape(long id)— returns Shape by IDdiagram.Pages.GetPage(string name)— returns Page by nameshape.Text.Value.ToString()— get plain text contentshape.TextBlock.VerticalAlign.Value— text alignment (notshape.TextBlock.Align)shape.Fill.FillForegnd.Value— foreground color (notshape.Fill.Color)shape.Line.LineColor.Value— line color (notshape.Line.Color)BOOL.True/BOOL.False— never plaintrue/falsefor Aspose BOOL typeshape.ThreeDFormat.RotationType.Value— read-only property, never assign
Command Reference
# Build
cd compiler/CSharpRunner/_warmup && dotnet build
# Run
dotnet run
# Verbose build
dotnet build --verbosity detailedTesting Guide
| Result | Meaning |
rc=0 build + run | ✅ Full pass |
rc=0 build only | ✅ Build-only pass (no Main) |
| TIMEOUT | ✅ Pass (Console.ReadLine guard) |
rc=1 CS errors | ❌ Fail — fix API usage |
rc!=0 runtime | ❌ Fail — unhandled exception |
Categories
Pipeline
| Attempt | Strategy | Trigger |
| 1 | MCP direct retrieval + code assembly | Always |
| 2 | MCP retrieval with injected rules | Attempt 1 fails |
| 3 | LLM repair with compiler errors + rules | Attempt 2 fails |
Only examples that pass both dotnet build and dotnet run are committed.
Extension Points
- Add rules to
rules/rules.jsonto correct known API patterns - Add categories via the Task Generator API integration
- Trigger PR creation via the web UI Create PR button
- Use Final PR button to regenerate all agents.md files in one PR
Agent Capabilities
What This Agent Does
The Aspose.Diagram Examples Generator Agent produces compiler-validated C# console application examples for Aspose.Diagram for .NET. It accepts natural-language task descriptions and returns ready-to-run C# code that has passed both dotnet build and dotnet run validation.
Accepted Inputs
- Natural language task description specifying the Aspose.Diagram operation
- Category context — used for output routing and rule selection
- Batch task list — plain text file with one task per line
Produced Outputs
- C# source file (
.cs) — passesdotnet buildanddotnet run agents.mdper category — AI-friendly instructions with Q&A and use casesREADME.mdper category — SEO-optimized landing pageindex.jsonper category — machine-readable metadata- Root
agents.md,README.md,index.json,llms.txt,/.well-known/agent.json,openapi.jsonat repository root
Supported Operations
Covers all 31 Aspose.Diagram for .NET task categories: basic operations, shapes, pages, connectors, text, themes, format conversion, VBA, layers, masters, headers/footers, hyperlinks, comments, protection, user-defined cells, window elements, external data, OLE objects, ActiveX controls, drawing, fonts, document properties, SolutionXML, and ShapeSheet events.
Quick Reference
| Task | Category | Key API |
| Load VSDX | basic-operations | new Diagram("input.vsdx") |
| Save as PDF | diagram-conversions | diagram.Save("out.pdf", new PdfSaveOptions()) |
| Save as PNG | diagram-conversions | diagram.Save("out.png", new ImageSaveOptions(SaveFileFormat.Png)) |
| Add shape | working-with-shapes | long id = diagram.AddShape(x, y, w, h, master, page) |
| Connect shapes | working-with-diagrams | page.ConnectShapesViaConnector(id1, place, id2, place, connId) |
| Set shape text | working-with-text | shape.Text.Value.Add(new Txt("text")) |
| Apply theme | working-with-themes | page.PresetTheme = PresetThemeValue.Bubble |
| Add page | working-with-pages | diagram.Pages.Add(new Page()) |
| Set fill color | working-with-shapes | shape.Fill.FillForegnd.Value = "#FF0000" |
| Read custom prop | working-with-user-defined-cells | foreach (Prop p in shape.Props) |
Maintained by agent-aspose-diagram-examples | Examples: 1840 | Categories: 31 | Aspose.Diagram for .NET | Updated: 2026-09-24
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

