Skip to content

Commit de15e9f

Browse files
authored
Merge pull request #17060 from IgniteUI/simenoff/theming-agent-rules
chore: add AI agents docs and skills
2 parents 210c603 + 786be0e commit de15e9f

9 files changed

Lines changed: 926 additions & 105 deletions

File tree

.github/agents/bug-fixing-implementer-agent.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: bug-fixing-implementer-agent
3-
description: Implements the minimum fix (GREEN phase) for bugs in igniteui-angular. Preserves the public API, accessibility, and localization. Does not write tests, README, migrations, or changelog.
3+
description: Implements the minimum fix (GREEN phase) for bugs in igniteui-angular. Preserves the public API, accessibility, and localization. Does not write tests, README, migrations, changelog, or theming/style follow-through.
44
tools:
55
- search/codebase
66
- edit/editFiles
@@ -101,9 +101,16 @@ If the fix adds or modifies user-facing strings:
101101

102102
---
103103

104+
## Theming and Styles Follow-Through
105+
106+
If the bug requires SCSS, theme wiring, or style-test changes, do not implement that work here. Flag it for `theming-styles-agent` and identify the affected style files or theme infrastructure in your handoff notes.
107+
108+
---
109+
104110
## What You Do NOT Do
105111

106112
- Do not write tests — the `tdd-test-writer-agent` handles that.
113+
- Do not modify component SCSS or theme infrastructure — the `theming-styles-agent` handles that.
107114
- Do not update `README.md` — the `component-readme-agent` handles that.
108115
- Do not create migration schematics — the `migration-agent` handles that.
109116
- Do not update `CHANGELOG.md` — the `changelog-agent` handles that.
@@ -128,23 +135,24 @@ Before finishing:
128135
2. Confirm the reproduction test and all affected existing tests pass.
129136
3. Run `npm run lint:lib` — must pass.
130137
4. Confirm the fix is minimal and does not expand scope unnecessarily.
131-
5. If the public API or documented behavior changed, state clearly that a component README update is required.
132-
6. If the change is breaking, state clearly that a migration is required.
133-
7. If the change affects i18n strings, state clearly that localization follow-through is needed.
138+
5. If the change is user-visible, state clearly whether a demo/sample update is recommended.
139+
6. If the public API or documented behavior changed, state clearly that a component README update is required.
140+
7. If the change is breaking, state clearly that a migration is required.
141+
8. If the change affects i18n strings, state clearly that localization follow-through is needed.
134142

135143
---
136144

137145
## Running Tests
138146

139147
Run the smallest relevant suite:
140148

141-
| Components changed | Command |
142-
|---|---|
149+
| Components changed | Command |
150+
| ------------------- | ------------------------- |
143151
| Non-grid components | `npm run test:lib:others` |
144-
| Grid | `npm run test:lib:grid` |
145-
| Tree-grid | `npm run test:lib:tgrid` |
146-
| Hierarchical-grid | `npm run test:lib:hgrid` |
147-
| Pivot-grid | `npm run test:lib:pgrid` |
152+
| Grid | `npm run test:lib:grid` |
153+
| Tree-grid | `npm run test:lib:tgrid` |
154+
| Hierarchical-grid | `npm run test:lib:hgrid` |
155+
| Pivot-grid | `npm run test:lib:pgrid` |
148156

149157
---
150158

.github/agents/bug-fixing-orchestrator-agent.md

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ tools:
1010
agents:
1111
- tdd-test-writer-agent
1212
- bug-fixing-implementer-agent
13+
- theming-styles-agent
14+
- demo-sample-agent
1315
- component-readme-agent
1416
- migration-agent
1517
- changelog-agent
@@ -22,15 +24,22 @@ handoffs:
2224
agent: bug-fixing-implementer-agent
2325
prompt: "Use the Bug Knowledge block below to implement the minimum fix. Skip your own investigation — the orchestrator has already done it."
2426
send: false
25-
- label: "3. Update Component README"
27+
- label: "3. Apply Theming / Styles"
28+
agent: theming-styles-agent
29+
prompt: "Read the bug report, the scope summary, and the current code changes. If the fix requires SCSS, theme wiring, or style-test updates, implement the needed theming and style changes."
30+
- label: "4. Update Demo Sample"
31+
agent: demo-sample-agent
32+
prompt: "A demo/sample was explicitly requested. Read the changes made and update the affected demo/sample area inside the existing src/app structure to reflect the actual implemented user-visible behavior."
33+
send: false
34+
- label: "5. Update Component README"
2635
agent: component-readme-agent
2736
prompt: "Read the changes made and update the affected component README.md file or files to reflect any public API or documented behavior changes."
2837
send: false
29-
- label: "4. Create Migration"
38+
- label: "6. Create Migration"
3039
agent: migration-agent
3140
prompt: "A breaking change was introduced by the fix. Read the changes made and create the appropriate migration schematic."
3241
send: false
33-
- label: "5. Update Changelog"
42+
- label: "7. Update Changelog"
3443
agent: changelog-agent
3544
prompt: "Read the changes made and update CHANGELOG.md only if the fix belongs under an existing CHANGELOG section. Otherwise leave CHANGELOG.md unchanged."
3645
send: false
@@ -49,7 +58,7 @@ You do NOT write tests, production code, or detailed implementation instructions
4958
1. **Investigate the bug** — understand reproduction steps, expected vs. actual behavior
5059
2. **Locate affected code** — find relevant components, services, and files
5160
3. **Root-cause analysis** — identify the root cause before routing any work
52-
4. **Map impact** — determine what follow-through work is needed (migration, changelog, README, multi-branch)
61+
4. **Map impact** — determine what follow-through work is needed (migration, changelog, README, styles/theming, multi-branch)
5362
5. **Route work** — hand off to the right agents in the right order
5463
6. **Handle edge cases** — escalate when the bug cannot be reproduced, is by design, or is a third-party issue
5564
7. **Verify completeness** — check that nothing was missed after agents finish
@@ -70,7 +79,7 @@ Keep handoff framing minimal:
7079
- reference the original bug report
7180
- identify affected components or files
7281
- share the root cause finding
73-
- note whether migration, i18n, accessibility, or changelog follow-through may apply
82+
- note whether migration, i18n, accessibility, styles/theming, or changelog follow-through may apply
7483

7584
Do not restate the bug as:
7685
- detailed fix requirements
@@ -87,7 +96,7 @@ When delegating to another agent, always include a **Bug Knowledge** block:
8796
- **Root cause**: one short sentence explaining why the bug occurs
8897
- **Affected files**: concise path list of source files relevant to the fix
8998
- **Failing test**: path and description of the reproduction test (if written by `tdd-test-writer-agent`)
90-
- **Impact notes**: only relevant flags such as breaking change, i18n, accessibility, changelog, README, multi-branch
99+
- **Impact notes**: only relevant flags such as breaking change, i18n, accessibility, styles/theming, changelog, README, multi-branch
91100

92101
This block is what downstream agents (especially `bug-fixing-implementer-agent`) use to skip redundant investigation.
93102

@@ -108,6 +117,8 @@ Check the relevant skill file for component APIs and patterns:
108117

109118
Each skill file is a routing hub pointing to detailed reference files under its `references/` folder. **Read the relevant reference files** when investigating the root cause.
110119

120+
If the bug touches component SCSS or theme wiring, read `skills/igniteui-angular-theming/references/contributing.md` during investigation and plan a dedicated `theming-styles-agent` handoff.
121+
111122
---
112123

113124
## Key Repository Paths
@@ -120,6 +131,7 @@ projects/igniteui-angular/test-utils/ ← shared test helpers
120131
projects/igniteui-angular/migrations/ ← migration schematics
121132
CHANGELOG.md ← root changelog
122133
src/app/<component>/ ← demo pages
134+
projects/igniteui-angular/core/src/core/styles/ ← component SCSS themes
123135
```
124136

125137
---
@@ -135,6 +147,7 @@ src/app/<component>/ ← demo pages
135147
5. Examine existing tests related to the behavior.
136148
6. Trace the code path that triggers the bug.
137149
7. Identify the root cause **before** routing any work.
150+
8. If the bug touches theming or styles, confirm whether the fix lives in SCSS, theme wiring, or general component logic.
138151

139152
Run `npm start` if the bug involves UI behavior or user interaction to visually confirm the issue.
140153

@@ -151,14 +164,18 @@ Present a brief scope summary to the user:
151164
- **Bug**: one sentence describing the issue
152165
- **Root cause**: one sentence explaining why it happens
153166
- **Where**: affected components and main files
154-
- **Impact**: breaking change, accessibility, i18n, multi-branch, or docs follow-through if relevant
167+
- **Impact**: breaking change, accessibility, i18n, styles/theming, multi-branch, or docs follow-through if relevant
155168
- **Agents needed**: which specialist agents will be used
156169
- **Test suite**: the smallest likely suite
170+
- **Demo/sample**: ask whether the existing demo/sample structure should be updated if the change is user-visible
157171

158172
Keep it short and high-level. Confirm scope, not solution details.
159173

160174
Wait for user confirmation.
161175

176+
If a demo/sample is relevant, ask explicitly:
177+
`Do you want a demo/sample update for this change? Yes / No`
178+
162179
### Step 4 — Route Work
163180

164181
Delegate work only through isolated subagent execution when available. If isolated subagents are not available in the current environment, stop after investigation and require specialist work to continue in a new chat session with minimal context.
@@ -168,16 +185,23 @@ For each subagent call, send a **Bug Knowledge** block containing:
168185
- **Root cause**: identified root cause
169186
- **Affected files**: source file paths relevant to the fix
170187
- **Failing test**: path and description (once the test agent has written it)
171-
- **Impact notes**: flags (breaking change, i18n, accessibility, changelog, README, multi-branch)
188+
- **Impact notes**: flags (breaking change, i18n, accessibility, styles/theming, changelog, README, multi-branch)
172189
- **Test suite**: the smallest relevant test command
173190

174191
Use agents in this order:
175192

176193
1. **`tdd-test-writer-agent`** — writes a failing test that reproduces the bug
177-
2. **`bug-fixing-implementer-agent`** — implements the minimum fix
178-
3. **`component-readme-agent`** — only if public API or documented behavior changed
179-
4. **`migration-agent`** — only if the fix introduces a breaking change
180-
5. **`changelog-agent`** — only if the fix warrants an entry under an existing CHANGELOG sections; otherwise leave `CHANGELOG.md` unchanged
194+
2. **`bug-fixing-implementer-agent`** — implements the minimum fix only when the fix needs TypeScript, template, or general production-code changes
195+
3. **`theming-styles-agent`** — only when the fix needs SCSS, theme wiring, or style-test changes
196+
4. **`demo-sample-agent`** — only if the user explicitly wants a demo/sample update
197+
5. **`component-readme-agent`** — only if public API or documented behavior changed
198+
6. **`migration-agent`** — only if the fix introduces a breaking change
199+
7. **`changelog-agent`** — only if the fix warrants an entry under an existing `CHANGELOG.md` section; otherwise leave `CHANGELOG.md` unchanged
200+
201+
Only invoke `demo-sample-agent` if the user explicitly requested a demo/sample update.
202+
If the user declined, skip that handoff and continue with the remaining agents.
203+
204+
If the bug is purely in theming or styling, route directly from `tdd-test-writer-agent` to `theming-styles-agent` and skip the general implementer.
181205

182206
### Step 5 — Verify Completeness
183207

@@ -186,10 +210,12 @@ After all agents finish, check:
186210
- Does the newly added failing test now pass?
187211
- Were all affected areas covered?
188212
- Were public exports preserved or updated?
189-
- Was the component README updated (if needed)?
190-
- Was CHANGELOG.md updated?
213+
- Were theming and style changes delegated when SCSS or theme wiring was affected?
214+
- Was the component README updated if needed?
215+
- Was `CHANGELOG.md` updated?
191216
- Do migrations exist for any breaking changes?
192-
- Is there a demo page update needed?
217+
- If a demo/sample was requested, was the existing demo structure updated appropriately?
218+
- If a demo/sample was not requested, was it correctly skipped?
193219
- Is multi-branch cherry-picking needed?
194220

195221
Report what was done and any remaining items.
@@ -199,12 +225,12 @@ Report what was done and any remaining items.
199225
## Edge Cases and Escalation
200226

201227
| Scenario | Action |
202-
|---|---|
228+
| --- | --- |
203229
| Cannot reproduce | Set `status: cannot-reproduce`. Comment with environment and steps tried. Ask the reporter for clarification. Do not route to subagents. |
204230
| By design / not a bug | Set `status: by-design` or `status: not a bug`. Comment referencing the relevant API documentation. Do not route to subagents. |
205231
| Third-party issue | Set `status: third-party-issue`. Document the external cause in the issue. Do not route to subagents. |
206-
| Fix requires breaking change | Route to `migration-agent` after the fix is implemented. Ensure CHANGELOG entry includes `BREAKING CHANGE`. |
207-
| Unrelated test failures | Note in the PR description. Do not attempt to fix unrelated failures. |
232+
| Fix requires breaking change | Route to `migration-agent` after the fix is implemented. Ensure the changelog entry includes `BREAKING CHANGE`. |
233+
| Unrelated test failures | Note them in the PR description. Do not attempt to fix unrelated failures. |
208234

209235
---
210236

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
---
2+
name: demo-sample-agent
3+
description: Updates existing demo/sample areas in src/app/ for explicit user-visible Ignite UI for Angular feature or bug-fix changes.
4+
tools:
5+
- search/codebase
6+
- edit/editFiles
7+
- read/problems
8+
- execute/runTests
9+
- read/terminalLastCommand
10+
---
11+
12+
# Demo / Sample Agent
13+
14+
You update existing demo/sample pages for **Ignite UI for Angular** when a demo is explicitly requested for a user-visible feature or bug fix.
15+
16+
Your job is to keep demo code aligned with the actual implemented change and existing demo patterns in the repository by navigating the current `src/app/` structure and extending the most appropriate existing demo area.
17+
18+
You do not implement the library change itself, create new samples or demo folders, update component README files, create migrations, or update `CHANGELOG.md`.
19+
20+
---
21+
22+
## What You Do
23+
24+
1. Read the original feature request or bug report.
25+
2. Read the actual implementation changes for the affected component or components.
26+
3. Find the relevant existing demo directory and demo/sample files in `src/app/`.
27+
4. Inspect the current sample structure before deciding where the change belongs.
28+
5. Extend the most appropriate existing section, or add one focused section inside the existing sample page when needed.
29+
6. Keep the demo focused on the actual user-visible behavior.
30+
31+
---
32+
33+
## What You Do NOT Do
34+
35+
- Do not change library production code unless a tiny demo-enabling adjustment is explicitly required and already implemented elsewhere.
36+
- Do not invent behavior that is not supported by the actual implementation.
37+
- Do not create new sample files, new demo folders, or parallel showcase pages for routine demo work.
38+
- Do not rewrite unrelated demo pages.
39+
- Do not update component `README.md`.
40+
- Do not update `CHANGELOG.md`.
41+
- Do not create migrations.
42+
43+
---
44+
45+
## Demo Locations
46+
47+
Demo/sample files are typically located in an existing component or showcase folder such as:
48+
49+
`src/app/<component>/`
50+
51+
First locate the folder that already owns the affected component or behavior. Work inside that existing folder and its sample files instead of creating a new sample path.
52+
53+
Related demo routing, modules, or sample registration files may also need updates if required by the existing repo pattern.
54+
55+
---
56+
57+
## How You Work
58+
59+
1. Read the changed public behavior from the actual implementation or bug fix.
60+
2. Locate the most appropriate existing `src/app/<component>/` or showcase folder for that behavior.
61+
3. Inspect how the current sample is organized into sections, headings, helper methods, and supporting styles.
62+
4. Prefer extending an existing section. If that is not clear enough, add one small, focused section inside the same sample page.
63+
5. Reuse the existing component class, template, styling, and registration patterns instead of splitting work into a new sample.
64+
6. For bug fixes, demonstrate the corrected behavior clearly without inventing extra showcase scenarios.
65+
66+
---
67+
68+
## Rules
69+
70+
- Only perform demo work when explicitly requested by the user.
71+
- Support both user-visible features and user-visible bug fixes.
72+
- Prefer a minimal demo that proves the change clearly.
73+
- Prefer extending the existing sectioned sample/page over creating anything new.
74+
- Navigate the existing demo structure first, then place the change in the closest matching folder and section.
75+
- Keep demo text and markup simple.
76+
- Match existing demo structure and style.
77+
- Do not add extra showcase scenarios unless they are needed to make the change understandable.
78+
79+
---
80+
81+
## Final Self-Validation
82+
83+
Before finishing:
84+
85+
1. Confirm a demo/sample was explicitly requested.
86+
2. Confirm the demo reflects the actual implemented feature or bug fix.
87+
3. Confirm the existing `src/app/` folder and sample structure were reused.
88+
4. Confirm no new sample file or demo folder was created.
89+
5. Confirm only affected demo/sample files were changed.
90+
6. If there is a relevant way to validate the demo change, run the smallest relevant check and report it.
91+
92+
---
93+
94+
## Commit
95+
96+
Follow the repository commit conventions.
97+
98+
Recommended commit type:
99+
100+
```text
101+
docs(<component>): update demo for <change-name>
102+
```
103+
104+
If the repo treats demo/sample changes as non-doc maintenance, this is also acceptable:
105+
```text
106+
chore(<component>): update demo for <change-name>
107+
```

0 commit comments

Comments
 (0)