These instructions apply to the entire repository. Use the repository-local
.agents/skills/dotnet-csharp/SKILL.md for .NET or C# implementation, debugging,
testing, packaging, CLI, Markdown rendering, and static-site generation work.
Do not create reports, summaries, migration notes, or delivery documents unless the user explicitly requests them. Keep documentation changes limited to behavior, configuration, or workflows changed by the task.
EasyDocs is a .NET 10 command-line tool (ezdoc) that turns Markdown content
into a static documentation and blog site.
The main execution flow is:
src/BuildSite/Program.csparsesinitandbuild.src/Share/Command.cscreates or readswebinfo.json.DocsBuilderbuilds versioned/multilingual documentation, navigation, search data, edit links, and documentation homepages.HtmlBuilderbuilds blogs, the homepage, about page, JSON data, assets, andsitemap.xml.- Markdig extensions in
src/Share/MarkdownExtensionconvert links and render highlighted fenced code through the embedded ColorCode implementation.
src/BuildSite: .NET global-tool entry point and NuGet package metadata.src/Share: commands, builders, Markdown pipeline, embedded HTML templates, and the packaged static asset archive.src/Models: configuration and generated-site models.src/ColorCode.Core: language definitions, compiler, parser, and styles.src/ColorCode.HTML: HTML formatters for highlighted code.src/ColorCode.Core.Tests: MSTest regression tests for ColorCode parsing.src/NodePackage: experimental/stale Node API wrapper; do not treat it as the primary product path without first reconciling its API and frameworks.Content: sample/source Markdown content used by this repository.WebApp: checked-in generated preview plus the CSS/JavaScript files consumed bypack.ps1.src/Share/template: embedded HTML templates andweb.zip, which supplies release-time static assets.
- Treat
webinfo.jsonandsrc/Models/WebInfo.cstogether as the configuration contract. Preserve the existing JSON property nameContetPathunless a task explicitly includes a compatibility migration. - Treat
Content/docs/<name>/<language>/<version>and eachDocInfoentry as one contract. Directory names must match configured names, languages, and versions. - Use
.orderfiles without.mdsuffixes to control document and directory ordering. - Keep template placeholders in
src/Share/template/*.tplsynchronized with every.Replace(...)chain that renders the template. - When changing files under
WebApp/css,WebApp/js, or the packaged favicon, runpack.ps1sosrc/Share/template/web.zipreceives the same changes. - Do not hand-edit generated pages merely to change generator behavior. Fix the builder/template/source asset first, then regenerate the affected output.
- Preserve relative Markdown link conversion from
.mdto.html; absolute HTTP(S) links must remain unchanged. - Preserve
BaseHrefbehavior, including its required trailing slash and root-deployment value/.
- Target the frameworks already declared by each project. The primary generator
projects target
net10.0. - Keep nullable reference types and implicit usings enabled.
- Prefer small, focused changes in the owning layer: models for configuration/data shape, builders for generation, Markdown extensions for parsing/rendering, and templates/assets for presentation.
- Use
Path.Combine,Path.GetRelativePath, and explicit slash normalization at URL boundaries. Do not build filesystem paths with URL assumptions. - Use ordinal-ignore-case comparisons for extensions, URLs, and paths where the existing behavior is case-insensitive.
- Keep file output deterministic and explicitly UTF-8 when writing generated text.
- Preserve user-facing CLI error shapes and localized messages when fixing a concrete failure.
- Avoid unrelated modernization of the vendored ColorCode implementation. Changes there require focused parser tests, especially for regex timeout or ReDoS behavior.
Do not use dotnet build EasyDocs.slnx as the default validation command. The
solution contains a legacy Website entry for WebApp, and dotnet MSBuild
fails with MSB4249 even when the SDK-style C# projects compile.
Use the narrowest relevant commands:
dotnet build .\src\BuildSite\BuildSite.csproj -c Release
dotnet test .\src\ColorCode.Core.Tests\ColorCode.Core.Tests.csproj -c ReleaseUse Release when invoking the CLI from source:
dotnet run --project .\src\BuildSite\BuildSite.csproj -c Release -- build .\webinfo.jsonDebug builds call the local Debug() generation path before processing command
arguments and can modify generated output unexpectedly.
For generation changes, prefer a temporary config/content/output directory.
Verify representative generated HTML, JSON, copied images, links, BaseHref,
and sitemap/canonical output. If repository sample output is intentionally
regenerated, review the full diff and do not discard unrelated user changes.
Known baseline limitations:
BuildSitecurrently compiles with existing warnings inBetterCodeBlockRenderer.csandProgram.cs.- Restoring the test project may resolve
Microsoft.NET.Test.Sdk17.9.1 to 17.10.0 withNU1603. src/NodePackagecurrently cannot build itsnet8.0target becauseSharetargets onlynet10.0; its JavaScript command contract is also older than the currentCommand.Build(string configPath)API.
Do not fix these baseline issues unless they are in task scope, but do not silently introduce additional warnings or failures.