agentleFS
aspose-diagramaspose-diagram/agentic-net-examples/agents.md

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:

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
  1. Very specific:

    Use explicit types — never var

    line 36
  2. Very specific:

    Use SaveFileFormat enum in PascalCase: SaveFileFormat.Vsdx not SaveFileFormat.VSDX

    line 38
  3. Very specific:

    Use BOOL.True / BOOL.False for Aspose BOOL properties

    line 39
  4. Very specific:

    Use page.Shapes.GetShape(id) — never GetShapeByID or GetShapeByName

    line 41
  5. Very specific:

    Use var for any variable

    line 51
  6. Very specific:

    Use using (Diagram diagram = ...) — Diagram is not IDisposable

    line 52
  7. Very specific:

    Use ALL_CAPS SaveFileFormat values (VSDX, PDF, PNG)

    line 53
  8. Very specific:

    Use System.Windows.Forms — not available in net8.0 console

    line 54
  9. Very specific:

    Use NUnit Assert — not available, use manual checks

    line 55
  10. Very specific:

    Only examples that pass both dotnet build and dotnet run are committed.

    line 140
  11. Very specific:

    Add rules to rules/rules.json to correct known API patterns

    line 144
  12. Distinctive:

    Add categories via the Task Generator API integration

    line 145
  13. Distinctive:

    Use Final PR button to regenerate all agents.md files in one PR

    line 147

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
agents.md

Aspose.Diagram for .NET — Agentic Examples

AI-generated, compiler-validated C# examples for Aspose.Diagram for .NET.

Agent Identity

FieldValue
Agentagent-aspose-diagram-examples
Repositoryaspose-diagram/agentic-net-examples
ProductAspose.Diagram for .NET
Version26.9.0
Frameworknet8.0
Total Examples1840
Categories31
Last Updated2026-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 using directives
  • Use SaveFileFormat enum in PascalCase: SaveFileFormat.Vsdx not SaveFileFormat.VSDX
  • Use BOOL.True / BOOL.False for Aspose BOOL properties
  • Wrap all code in static void Main() inside class Program
  • Use page.Shapes.GetShape(id) — never GetShapeByID or GetShapeByName

Ask First

  • Multi-file or multi-project solutions
  • External NuGet packages beyond Aspose.Diagram
  • UI frameworks (WinForms, WPF, Blazor)

Never

  • Use var for 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:

  • Diagram constructor: new Diagram(filePath) or new Diagram() for empty
  • diagram.Save(path, SaveFileFormat.Vsdx) — always PascalCase format enum
  • page.Shapes.GetShape(long id) — returns Shape by ID
  • diagram.Pages.GetPage(string name) — returns Page by name
  • shape.Text.Value.ToString() — get plain text content
  • shape.TextBlock.VerticalAlign.Value — text alignment (not shape.TextBlock.Align)
  • shape.Fill.FillForegnd.Value — foreground color (not shape.Fill.Color)
  • shape.Line.LineColor.Value — line color (not shape.Line.Color)
  • BOOL.True / BOOL.False — never plain true/false for Aspose BOOL type
  • shape.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 detailed

Testing Guide

ResultMeaning
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

AttemptStrategyTrigger
1MCP direct retrieval + code assemblyAlways
2MCP retrieval with injected rulesAttempt 1 fails
3LLM repair with compiler errors + rulesAttempt 2 fails

Only examples that pass both dotnet build and dotnet run are committed.

Extension Points

  • Add rules to rules/rules.json to 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) — passes dotnet build and dotnet run
  • agents.md per category — AI-friendly instructions with Q&A and use cases
  • README.md per category — SEO-optimized landing page
  • index.json per category — machine-readable metadata
  • Root agents.md, README.md, index.json, llms.txt, /.well-known/agent.json, openapi.json at 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

TaskCategoryKey API
Load VSDXbasic-operationsnew Diagram("input.vsdx")
Save as PDFdiagram-conversionsdiagram.Save("out.pdf", new PdfSaveOptions())
Save as PNGdiagram-conversionsdiagram.Save("out.png", new ImageSaveOptions(SaveFileFormat.Png))
Add shapeworking-with-shapeslong id = diagram.AddShape(x, y, w, h, master, page)
Connect shapesworking-with-diagramspage.ConnectShapesViaConnector(id1, place, id2, place, connId)
Set shape textworking-with-textshape.Text.Value.Add(new Txt("text"))
Apply themeworking-with-themespage.PresetTheme = PresetThemeValue.Bubble
Add pageworking-with-pagesdiagram.Pages.Add(new Page())
Set fill colorworking-with-shapesshape.Fill.FillForegnd.Value = "#FF0000"
Read custom propworking-with-user-defined-cellsforeach (Prop p in shape.Props)

Maintained by agent-aspose-diagram-examples | Examples: 1840 | Categories: 31 | Aspose.Diagram for .NET | Updated: 2026-09-24

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.