Skip to content

Commit 4680725

Browse files
feat(agents): add demo-sample-agent for updating demo/sample areas
1 parent d7fa027 commit 4680725

6 files changed

Lines changed: 159 additions & 23 deletions

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,10 @@ Before finishing:
109109
2. Confirm the reproduction test and all affected existing tests pass.
110110
3. Run `npm run lint:lib` — must pass.
111111
4. Confirm the fix is minimal and does not expand scope unnecessarily.
112-
5. If the public API or documented behavior changed, state clearly that a component README update is required.
113-
6. If the change is breaking, state clearly that a migration is required.
114-
7. If the change affects i18n strings, state clearly that localization follow-through is needed.
112+
5. If the change is user-visible, state clearly whether a demo/sample update is recommended.
113+
6. If the public API or documented behavior changed, state clearly that a component README update is required.
114+
7. If the change is breaking, state clearly that a migration is required.
115+
8. If the change affects i18n strings, state clearly that localization follow-through is needed.
115116

116117
---
117118

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

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ agents:
1010
- tdd-test-writer-agent
1111
- bug-fixing-implementer-agent
1212
- theming-styles-agent
13+
- demo-sample-agent
1314
- component-readme-agent
1415
- migration-agent
1516
- changelog-agent
@@ -25,16 +26,19 @@ handoffs:
2526
- label: "3. Apply Theming / Styles"
2627
agent: theming-styles-agent
2728
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."
29+
- label: "4. Update Demo Sample"
30+
agent: demo-sample-agent
31+
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."
2832
send: false
29-
- label: "4. Update Component README"
33+
- label: "5. Update Component README"
3034
agent: component-readme-agent
3135
prompt: "Read the changes made and update the affected component README.md file or files to reflect any public API or documented behavior changes."
3236
send: false
33-
- label: "5. Create Migration"
37+
- label: "6. Create Migration"
3438
agent: migration-agent
3539
prompt: "A breaking change was introduced by the fix. Read the changes made and create the appropriate migration schematic."
3640
send: false
37-
- label: "6. Update Changelog"
41+
- label: "7. Update Changelog"
3842
agent: changelog-agent
3943
prompt: "Read the changes made and update CHANGELOG.md only if the fix belongs under an existing CHANGELOG section. Otherwise leave CHANGELOG.md unchanged."
4044
send: false
@@ -153,11 +157,15 @@ Present a brief scope summary to the user:
153157
- **Impact**: breaking change, accessibility, i18n, styles/theming, multi-branch, or docs follow-through if relevant
154158
- **Agents needed**: which specialist agents will be used
155159
- **Test suite**: the smallest likely suite
160+
- **Demo/sample**: ask whether the existing demo/sample structure should be updated if the change is user-visible
156161

157162
Keep it short and high-level. Confirm scope, not solution details.
158163

159164
Wait for user confirmation.
160165

166+
If a demo/sample is relevant, ask explicitly:
167+
`Do you want a demo/sample update for this change? Yes / No`
168+
161169
### Step 3 — Route Work
162170

163171
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.
@@ -174,9 +182,13 @@ Use agents in this order:
174182
1. **`tdd-test-writer-agent`** — writes a failing test that reproduces the bug
175183
2. **`bug-fixing-implementer-agent`** — implements the minimum fix only when the fix needs TypeScript, template, or general production-code changes
176184
3. **`theming-styles-agent`** — only when the fix needs SCSS, theme wiring, or style-test changes
177-
4. **`component-readme-agent`** — only if public API or documented behavior changed
178-
5. **`migration-agent`** — only if the fix introduces a breaking change
179-
6. **`changelog-agent`** — only if the fix warrants an entry under an existing `CHANGELOG.md` section; otherwise leave `CHANGELOG.md` unchanged
185+
4. **`demo-sample-agent`** — only if the user explicitly wants a demo/sample update
186+
5. **`component-readme-agent`** — only if public API or documented behavior changed
187+
6. **`migration-agent`** — only if the fix introduces a breaking change
188+
7. **`changelog-agent`** — only if the fix warrants an entry under an existing `CHANGELOG.md` section; otherwise leave `CHANGELOG.md` unchanged
189+
190+
Only invoke `demo-sample-agent` if the user explicitly requested a demo/sample update.
191+
If the user declined, skip that handoff and continue with the remaining agents.
180192

181193
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.
182194

@@ -191,7 +203,8 @@ After all agents finish, check:
191203
- Was the component README updated if needed?
192204
- Was `CHANGELOG.md` updated?
193205
- Do migrations exist for any breaking changes?
194-
- Is there a demo page update needed?
206+
- If a demo/sample was requested, was the existing demo structure updated appropriately?
207+
- If a demo/sample was not requested, was it correctly skipped?
195208
- Is multi-branch cherry-picking needed?
196209

197210
Report what was done and any remaining items.
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+
```

.github/agents/feature-implementer-agent.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,11 @@ Before finishing:
127127
- accessibility
128128
- deprecation handling
129129
4. If the public API or documented behavior changed, state clearly that a component README update is required.
130-
5. If the change is breaking, state clearly that a migration is required.
131-
6. If the change affects i18n, run the related checks.
132-
7. If the change needs SCSS or theme-system updates, state clearly that `theming-styles-agent` follow-through is required.
133-
8. If the change is broad or touches shared/public API, run lint/build or state clearly why they were not needed.
130+
5. If the change is user-visible, state clearly whether a demo/sample update is recommended.
131+
6. If the change is breaking, state clearly that a migration is required.
132+
7. If the change affects i18n, run the related checks.
133+
8. If the change needs SCSS or theme-system updates, state clearly that `theming-styles-agent` follow-through is required.
134+
9. If the change is broad or touches shared/public API, run lint/build or state clearly why they were not needed.
134135

135136
---
136137

.github/agents/feature-orchestrator-agent.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ agents:
1010
- tdd-test-writer-agent
1111
- feature-implementer-agent
1212
- theming-styles-agent
13+
- demo-sample-agent
1314
- component-readme-agent
1415
- migration-agent
1516
- changelog-agent
@@ -25,16 +26,19 @@ handoffs:
2526
- label: "3. Apply Theming / Styles"
2627
agent: theming-styles-agent
2728
prompt: "Read the user's feature request, the scope summary, and the current code changes. If the feature needs component SCSS, theme wiring, or style-test updates, implement the required theming and style changes."
29+
- label: "4. Update Demo Sample"
30+
agent: demo-sample-agent
31+
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."
2832
send: false
29-
- label: "4. Update Component README"
33+
- label: "5. Update Component README"
3034
agent: component-readme-agent
3135
prompt: "Read the changes made and update the affected component README.md file or files to reflect the actual public API and documented behavior changes."
3236
send: false
33-
- label: "5. Create Migration"
37+
- label: "6. Create Migration"
3438
agent: migration-agent
3539
prompt: "A breaking change was introduced. Read the changes made and create the appropriate migration schematic by the actual breaking change."
3640
send: false
37-
- label: "6. Update Changelog"
41+
- label: "7. Update Changelog"
3842
agent: changelog-agent
3943
prompt: "Read the changes made and update CHANGELOG.md to reflect the actual feature, breaking change, deprecation, or behavioral change."
4044
send: false
@@ -137,11 +141,15 @@ Present a brief scope summary to the user:
137141
- **Impact**: breaking change, deprecation, i18n, accessibility, styles/theming, or docs/demo follow-through if relevant
138142
- **Agents needed**: which specialist agents will be used
139143
- **Test suite**: the smallest likely suite
144+
- **Demo/sample**: ask whether the existing demo/sample structure should be updated if the change is user-visible
140145

141146
Keep it short and high-level. Confirm scope, not solution details.
142147

143148
Wait for user confirmation.
144149

150+
If a demo/sample is relevant, ask explicitly:
151+
`Do you want a demo/sample update for this feature? Yes / No`
152+
145153
### Step 3 — Route Work
146154

147155
Delegate work only through isolated subagent execution when available. If isolated subagents are not available in the current environment, stop after scope discovery and require specialist work to continue in a new chat session with minimal context.
@@ -164,9 +172,13 @@ Use agents in this order:
164172
1. **`tdd-test-writer-agent`** — decides what tests to write
165173
2. **`feature-implementer-agent`** — only when TypeScript, template, or general production-code changes are needed
166174
3. **`theming-styles-agent`** — only when the feature needs SCSS, theme wiring, or style-test changes
167-
4. **`component-readme-agent`** — updates affected component `README.md` files
168-
5. **`migration-agent`** — only if breaking changes exist
169-
6. **`changelog-agent`** — updates `CHANGELOG.md`
175+
4. **`demo-sample-agent`** — only if the user explicitly wants a demo/sample update
176+
5. **`component-readme-agent`** — updates affected component `README.md` files
177+
6. **`migration-agent`** — only if breaking changes exist
178+
7. **`changelog-agent`** — updates `CHANGELOG.md`
179+
180+
Only invoke `demo-sample-agent` if the user explicitly requested a demo/sample update.
181+
If the user declined, skip that handoff and continue with the remaining agents.
170182

171183
If the feature is purely theming or styling, route directly from `tdd-test-writer-agent` to `theming-styles-agent` and skip the general
172184
implementer.
@@ -182,6 +194,7 @@ After all agents finish, check:
182194
- Was the component README updated?
183195
- Was `CHANGELOG.md` updated?
184196
- Do migrations exist for any breaking changes?
185-
- Is there a demo page update needed?
197+
- If a demo/sample was requested, was the existing demo structure updated appropriately?
198+
- If a demo/sample was not requested, was it correctly skipped?
186199

187200
Report what was done and any remaining items.

AGENTS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ css-naming-convention.md ← CSS naming rules
5454
- Keep accessibility intact: ARIA, keyboard navigation, focus behavior, and screen reader semantics.
5555
- Keep i18n intact when user-facing text changes.
5656
- Add JSDoc with `@param`, `@returns`, and `@example` on every new public member.
57-
- Add or update ng update migrations for breaking changes.
57+
- Add or update `ng update` migrations for true breaking changes such as removals, renames, moved entry points, selector changes, or incompatible default-behavior changes.
5858
- Update the component `README.md` when the public API surface changes.
5959
- Consider demo/sample updates in `src/app/` for user-visible changes.
60-
- Update `CHANGELOG.md` for every new feature, deprecation, or breaking change.
60+
- Update `CHANGELOG.md` for new features, deprecations, breaking changes, and notable user-visible fixes when they fit the existing changelog section structure.
6161

6262
### Never
6363

@@ -115,6 +115,7 @@ Feature implementation is handled by a set of specialized agents in `.github/age
115115
| `feature-implementer-agent` | `feature-implementer-agent.md` | Implements features and refactors (GREEN + REFACTOR phases) |
116116
| `bug-fixing-implementer-agent` | `bug-fixing-implementer-agent.md` | Implements the minimum bug fix (GREEN phase) |
117117
| `theming-styles-agent` | `theming-styles-agent.md` | Implements component theming, structural SCSS, theme wiring, and style validation |
118+
| `demo-sample-agent` | `demo-sample-agent.md` | Updates existing demo/sample areas in `src/app/` when a demo is explicitly requested for a user-visible feature or bug fix |
118119
| `component-readme-agent` | `component-readme-agent.md` | Updates affected component `README.md` files for public API and documented behavior changes |
119120
| `migration-agent` | `migration-agent.md` | Creates `ng update` migration schematics for breaking changes |
120121
| `changelog-agent` | `changelog-agent.md` | Updates `CHANGELOG.md` following repo conventions |

0 commit comments

Comments
 (0)