Skip to content

Commit 182b09d

Browse files
docs(skill): list all Theme tokens, warn about hallucinated ones (#287)
* docs(skill): list all Theme tokens, warn about hallucinated ones Agents consistently hallucinate Theme.Error, Theme.Success, and Theme.ErrorText which don't exist. Add complete token table with categories and explicit warning about non-existent tokens. Fixes #277 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * refactor: move token table to reactor-design skill Keep the nonexistent-token warning in getting-started as a critical gotcha, but move the full token table to the design skill where it belongs alongside the existing token reference. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent d187cf6 commit 182b09d

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

plugins/reactor/skills/reactor-design/SKILL.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ Hardcoded colors are acceptable only for:
5454

5555
#### Theme Token Reference
5656

57+
> ⚠️ **`Theme.Error`, `Theme.Success`, `Theme.Warning`, `Theme.ErrorText` do NOT exist.**
58+
> Use `Theme.SystemCritical` (red/error), `Theme.SystemSuccess` (green), `Theme.SystemCaution` (yellow).
59+
5760
**Text:**
5861

5962
| Token | WinUI Resource | Purpose |

plugins/reactor/skills/reactor-getting-started/SKILL.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,17 @@ items.Select(i => Component<Card, CardProps>(new CardProps(i)).WithKey(i.Id)).To
240240

241241
## Theme tokens (always)
242242

243-
Use `Theme.*` for all themed colors — never hardcoded hex on themed surfaces. The full token list with WinUI keys is in the api index.
243+
Use `Theme.*` for all themed colors — never hardcoded hex on themed surfaces. The full token list with WinUI keys is in the `reactor-design` skill.
244+
245+
> ⚠️ **`Theme.Error`, `Theme.Success`, `Theme.Warning`, `Theme.ErrorText` do NOT exist.**
246+
> Use `Theme.SystemCritical` (red/error), `Theme.SystemSuccess` (green), `Theme.SystemCaution` (yellow).
244247
245248
```csharp
246249
TextBlock("Hi").Foreground(Theme.PrimaryText)
247250
Border(child).Background(Theme.CardBackground).WithBorder(Theme.CardStroke, 1)
248251
Button("Action").Background(Theme.Accent)
252+
TextBlock("Error!").Foreground(Theme.SystemCritical) // NOT Theme.Error
253+
TextBlock("Saved").Foreground(Theme.SystemSuccess) // NOT Theme.Success
249254
```
250255

251256
## Critical gotchas

0 commit comments

Comments
 (0)