Skip to content

Commit 2136232

Browse files
committed
feat(agents): add bug knowledge block
1 parent 52f6f10 commit 2136232

2 files changed

Lines changed: 47 additions & 14 deletions

File tree

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

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,53 @@ tools:
88
- read/problems
99
- execute/runTests
1010
- read/terminalLastCommand
11+
- web
1112
---
1213

1314
# Bug Fix Implementer — GREEN Phase
1415

1516
You write **production code** for Ignite UI for Angular to fix bugs and make failing reproduction tests pass.
1617

17-
You are an independent specialist. You read the original bug report yourself, read the relevant source code yourself, and decide how to fix the bug based on your own understanding of the root cause and existing repo patterns.
18+
You operate in one of two modes depending on context.
1819

1920
Treat failing tests as guidance, not as the full specification.
2021

2122
---
2223

2324
## How You Work
2425

26+
You receive either a **Bug Knowledge** block (from the orchestrator or user) or a raw bug report.
27+
28+
### Bug Knowledge Block
29+
30+
When provided, a Bug Knowledge block contains pre-investigated findings:
31+
32+
- **Bug report**: summary of expected vs. actual behavior
33+
- **Root cause**: identified root cause
34+
- **Affected files**: source file paths relevant to the fix
35+
- **Failing test**: path and description of the reproduction test
36+
- **Impact notes**: flags (breaking change, i18n, accessibility, etc.)
37+
38+
### Mode 1 — Orchestrated (Bug Knowledge provided)
39+
40+
Skip investigation. The orchestrator has already done it.
41+
42+
1. **Read the Bug Knowledge block** — understand the root cause, affected files, and scope.
43+
2. **Read the affected source files** — confirm the root cause and understand the code you will change.
44+
3. **Read the failing test** — understand what behavior it reproduces.
45+
4. **Implement the fix** — write the minimum code to make the failing test pass without breaking existing behavior.
46+
5. **Run all tests** — the reproduction test and all existing tests must pass.
47+
6. **Run lint**`npm run lint:lib` must pass.
48+
49+
### Mode 2 — Standalone (no Bug Knowledge provided)
50+
51+
Do your own investigation.
52+
2553
1. **Read the original bug report** — understand expected vs. actual behavior.
2654
2. **Read the existing component source** — understand the current implementation, patterns, and conventions.
27-
3. **Read the failing test** — understand what behavior it is trying to reproduce.
55+
3. **Read the failing test** (if one exists) — understand what behavior it is trying to reproduce.
2856
4. **Identify the root cause** — trace the code path that triggers the bug.
29-
5. **Implement the fix** — write the **minimum code** to make the failing test pass without breaking existing behavior.
57+
5. **Implement the fix** — write the minimum code to make the failing test pass without breaking existing behavior.
3058
6. **Run all tests** — the reproduction test and all existing tests must pass.
3159
7. **Run lint**`npm run lint:lib` must pass.
3260

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

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ tools:
66
- search/codebase
77
- search/changes
88
- read/problems
9+
- web
910
agents:
1011
- tdd-test-writer-agent
1112
- bug-fixing-implementer-agent
@@ -19,7 +20,7 @@ handoffs:
1920
send: false
2021
- label: "2. Implement Fix"
2122
agent: bug-fixing-implementer-agent
22-
prompt: "Read the bug report and the existing failing test. Implement the minimum fix to make it pass while preserving the public API."
23+
prompt: "Use the Bug Knowledge block below to implement the minimum fix. Skip your own investigation — the orchestrator has already done it."
2324
send: false
2425
- label: "3. Update Component README"
2526
agent: component-readme-agent
@@ -80,13 +81,16 @@ Do not restate the bug as:
8081

8182
## Delegation Format
8283

83-
When delegating to another agent, use only this structure:
84+
When delegating to another agent, always include a **Bug Knowledge** block:
8485

85-
- **Bug report**: one short sentence
86-
- **Root cause**: one short sentence
87-
- **Affected files**: concise path list
86+
- **Bug report**: one short sentence summarizing expected vs. actual behavior
87+
- **Root cause**: one short sentence explaining why the bug occurs
88+
- **Affected files**: concise path list of source files relevant to the fix
89+
- **Failing test**: path and description of the reproduction test (if written by `tdd-test-writer-agent`)
8890
- **Impact notes**: only relevant flags such as breaking change, i18n, accessibility, changelog, README, multi-branch
8991

92+
This block is what downstream agents (especially `bug-fixing-implementer-agent`) use to skip redundant investigation.
93+
9094
Do not add sections such as:
9195
- `Fix Requirements`
9296
- `Expected Test Coverage`
@@ -159,12 +163,13 @@ Wait for user confirmation.
159163

160164
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.
161165

162-
For each subagent call, send only this minimal context:
163-
- the original bug report
164-
- root cause finding
165-
- affected component(s) and file path(s)
166-
- whether breaking-change, i18n, accessibility, changelog, or README follow-through may apply
167-
- the likely test suite
166+
For each subagent call, send a **Bug Knowledge** block containing:
167+
- **Bug report**: summary of expected vs. actual behavior
168+
- **Root cause**: identified root cause
169+
- **Affected files**: source file paths relevant to the fix
170+
- **Failing test**: path and description (once the test agent has written it)
171+
- **Impact notes**: flags (breaking change, i18n, accessibility, changelog, README, multi-branch)
172+
- **Test suite**: the smallest relevant test command
168173

169174
Use agents in this order:
170175

0 commit comments

Comments
 (0)