diff --git a/README.md b/README.md index 08e5add..6fa2a58 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,8 @@ Docs: [shellicons.shellui.dev](https://shellicons.shellui.dev) - [x] MAUI: typed controls, `IconName` dispatcher, `IconCatalog` metadata with alias lookup - [x] Avalonia: typed controls, `Kind` dispatcher, inherited `Foreground`, the same `IconCatalog` - [x] 168 tests (xUnit + bUnit + headless MAUI + headless Avalonia with Skia rendering), CI for both solutions, tag-driven release — see [RELEASING.md](RELEASING.md) -- [x] Docs site at [docs/ShellIcons.Docs](docs/ShellIcons.Docs) (ShellDocs 0.1.11-alpha), with a searchable icon browser +- [x] Docs site at [docs/ShellIcons.Docs](docs/ShellIcons.Docs) (ShellDocs 0.1.17-alpha), with a searchable icon browser +- [x] Docs for AI agents: [`/llms.txt`](https://shellicons.shellui.dev/llms.txt), every page as Markdown, and `AGENTS.md` / `CLAUDE.md` / Copilot / Cursor rule files — see [AI Agents](https://shellicons.shellui.dev/docs/ai-agents) - [x] Static build for GitHub Pages ([shellicons.shellui.dev](https://shellicons.shellui.dev)) — deploys on push to `main` - [ ] MAUI: check rendering on Android/iOS devices, then publish - [ ] Avalonia: run in a real desktop app, then publish @@ -225,7 +226,7 @@ Serves at http://localhost:5145. Pages live in `docs/ShellIcons.Docs/content/doc `/docs/icons` is a searchable browser of the entire catalog with click-to-copy component names. -Build the static site the way the deploy workflow does (needs `dotnet tool install -g ShellDocs.CLI --version 0.1.11-alpha`): +Build the static site the way the deploy workflow does (needs `dotnet tool install -g ShellDocs.CLI --version 0.1.17-alpha`): ```bash cd docs/ShellIcons.Docs diff --git a/docs/ShellIcons.Docs/Components/Pages/DocsPage.razor b/docs/ShellIcons.Docs/Components/Pages/DocsPage.razor index 4003d59..f894646 100644 --- a/docs/ShellIcons.Docs/Components/Pages/DocsPage.razor +++ b/docs/ShellIcons.Docs/Components/Pages/DocsPage.razor @@ -16,11 +16,7 @@ } else { -
-

Page not found

-

The page @Path doesn't exist yet.

-

Back to introduction

-
+ } @code { diff --git a/docs/ShellIcons.Docs/Llms/agent-rules.md b/docs/ShellIcons.Docs/Llms/agent-rules.md new file mode 100644 index 0000000..c68b852 --- /dev/null +++ b/docs/ShellIcons.Docs/Llms/agent-rules.md @@ -0,0 +1,18 @@ +## Rules for AI agents + +Read these before adding icons to a project that uses ShellIcons. + +1. **Use ShellIcons; don't paste SVG.** If the project references `ShellIcons.Blazor`, `ShellIcons.Maui` or `ShellIcons.Avalonia`, render icons with it. Don't paste inline `` markup, add another icon package, or copy icons from lucide.dev. +2. **Names come from Lucide.** Every icon is PascalCase of its Lucide id: `chevron-right` is `ChevronRight`, `triangle-alert` is `TriangleAlert`. The catalog is pinned to the Lucide version on the Browse icons page, so an icon that is newer on lucide.dev may not exist yet; check the catalog before using a name. Renamed icons keep their new name only (`home` is `House`). +3. **Blazor: import `ShellIcons` only.** One `@using ShellIcons` in `_Imports.razor` gives: + - `` suffixed components for markup (the default); + - `@Icon.ChevronRight()` for icons as values, such as `RenderFragment` parameters and lists built in C#; + - `` only for names known at runtime (it keeps every icon in the build). + Never add `@using ShellIcons.Icons` to `_Imports.razor`: its short names (`Badge`, `Table`, `Menu`, `Router`, …) collide with UI-kit components (RZ9985). Razor ignores `@using` aliases for tags, so `` renders nothing. +4. **Blazor: color and size like text.** Icons draw with `currentColor`, so set the color on the icon or its parent (`Class="text-destructive"`). `Size` is a string (`Size="16"`, `Size="1.25em"`); `StrokeWidth` defaults to 2; `AbsoluteStroke="true"` keeps the stroke width constant at any size. +5. **Blazor: put click handlers on a button.** Wrap the icon in a `