You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/agents/bug-fixing-implementer-agent.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,27 @@ Check the relevant skill file for component APIs and patterns:
69
69
70
70
---
71
71
72
+
## Handling a Wrong or Incomplete Test
73
+
74
+
If the reproduction test is wrong, **do not fix it yourself and do not proceed**. Stop and report the problem back — test code is the responsibility of `tdd-test-writer-agent`.
75
+
76
+
A test is wrong if it:
77
+
- Passes immediately without any code change (not reproducing the bug)
78
+
- Fails for the wrong reason (unrelated setup error, missing import, wrong assertion)
79
+
- Tests a different code path than the one identified as the root cause
80
+
81
+
In those cases:
82
+
1. Do **not** modify the test.
83
+
2. State clearly in your output what is wrong with the test and why it does not correctly reproduce the bug.
84
+
3. Stop. The orchestrator will re-invoke `tdd-test-writer-agent` to fix it before you proceed.
85
+
86
+
If you discover the root cause is in a **different place** than the orchestrator identified:
87
+
1. Do **not** silently fix a different location.
88
+
2. State clearly in your output that the root cause differs from the scope summary.
89
+
3. Fix the actual root cause, explain the discrepancy, and let the orchestrator decide whether re-investigation is needed.
90
+
91
+
---
92
+
72
93
## GREEN Phase — Fix the Bug
73
94
74
95
1. Write the **minimum code** to make the failing reproduction test pass.
Copy file name to clipboardExpand all lines: .github/agents/changelog-agent.md
+13-2Lines changed: 13 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,7 +89,18 @@ Use `### General` for deprecations, behavioral changes, and changelog-worthy bug
89
89
- If the component already has entries in the same subsection, add sub-bullets under the same component heading.
90
90
- Include short code examples only if they clarify usage.
91
91
92
-
### 5. Final Self-Validation
92
+
### 5. Surfacing Problems
93
+
94
+
If the changes handed off to you are inconsistent with what appears in the code — for example, the described change does not match the actual diff, or a breaking change lacks a matching migration:
95
+
1. Do **not** document behavior that does not exist or was not actually implemented.
96
+
2. State clearly in your output what the inconsistency is.
97
+
3. Stop. The orchestrator will decide whether to re-invoke an earlier agent before you proceed.
98
+
99
+
### 6. Re-invocation
100
+
101
+
If you are re-invoked because a previous CHANGELOG entry was incorrect, misplaced, or inconsistent, read the orchestrator's correction note carefully. Do not repeat the same approach — fix the specific issue identified and confirm the entry is accurate and correctly formatted.
102
+
103
+
### 7. Final Self-Validation
93
104
94
105
Before finishing:
95
106
@@ -98,7 +109,7 @@ Before finishing:
98
109
3. Confirm the formatting matches the existing CHANGELOG style.
99
110
4. Confirm you updated an existing component entry instead of duplicating it when appropriate.
Copy file name to clipboardExpand all lines: .github/agents/component-readme-agent.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,19 @@ Component documentation is located at:
74
74
75
75
---
76
76
77
+
## Surfacing Problems
78
+
79
+
If you find that the code changes are inconsistent, incomplete, or contradictory to what was described in the handoff:
80
+
1. Do **not** document behavior that does not exist in the code.
81
+
2. State clearly in your output what the inconsistency is.
82
+
3. Stop. The orchestrator will decide whether to re-invoke an earlier agent before you proceed.
83
+
84
+
## Re-invocation
85
+
86
+
If you are re-invoked because a previous README update was incomplete or incorrect, read the orchestrator's correction note carefully. Do not repeat the same approach — address the specific gap or inconsistency identified and confirm the README now accurately reflects the actual code.
Copy file name to clipboardExpand all lines: .github/agents/feature-implementer-agent.md
+23-2Lines changed: 23 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ Treat failing tests as guidance, not as the full specification.
27
27
2.**Read the existing component source** — understand the current implementation, patterns, and conventions used in this specific component.
28
28
3.**Read the failing tests** — understand what behaviors they are trying to prove.
29
29
4.**Implement the feature** — write the code that satisfies the real feature contract across all affected areas.
30
-
5.**Evaluate the tests** — if a test is redundant, overly narrow, or encodes a wrong assumption, adjust it only when justified by the feature contract.
30
+
5.**Evaluate the tests** — if a test is redundant, overly narrow, or needs a small correction to match the real feature contract, you may adjust it. If it encodes a wrong assumption or points in the wrong direction, report it to the orchestrator for backtrack action.
31
31
6.**Run all tests** — everything required must pass.
32
32
7.**Refactor** — clean up for quality without expanding scope unnecessarily.
33
33
@@ -44,6 +44,27 @@ Each skill file is a routing hub pointing to detailed reference files under its
44
44
45
45
---
46
46
47
+
## Backtrack Actions
48
+
49
+
If implementation reveals that earlier work is wrong or incomplete, do not continue silently. Report it clearly so the orchestrator can backtrack and re-route as needed.
50
+
51
+
Backtrack in these cases:
52
+
- The failing tests encode the wrong feature behavior.
53
+
- The scope summary is missing an affected area or includes the wrong one.
54
+
- The intended implementation would introduce an unexpected breaking change.
55
+
- README, changelog, or migration follow-through is clearly needed but was not flagged.
56
+
57
+
Use this rule:
58
+
- If the tests are directionally correct but too narrow, redundant, or need small adjustments to match the real feature contract, you may update them as part of implementation.
59
+
- If the tests are based on the wrong feature behavior or the scope summary is materially wrong, stop and report it for backtracking instead of silently redefining the work.
60
+
61
+
When reporting a backtrack action, state:
62
+
1. What you found.
63
+
2. Why it conflicts with the current tests or scope summary.
64
+
3. What needs to be re-run or re-evaluated.
65
+
66
+
---
67
+
47
68
## GREEN Phase — Make Tests Pass
48
69
49
70
1. Write the **minimum code** to make each failing test pass.
@@ -96,7 +117,7 @@ the affected style files or theme infrastructure in your handoff notes.
Copy file name to clipboardExpand all lines: .github/agents/feature-orchestrator-agent.md
+23-1Lines changed: 23 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -201,9 +201,31 @@ If the user declined, skip that handoff and continue with the remaining agents.
201
201
202
202
If the feature is purely theming or styling, route directly from `tdd-test-writer-agent` to `theming-styles-agent` and skip the general implementer.
203
203
204
+
**After each agent finishes, read its output before proceeding to the next step.** If it reports a problem, follow the backtracking rules in Step 4a before continuing forward.
205
+
206
+
### Step 4a — Backtracking
207
+
208
+
The workflow is a **loop, not a strict pipeline**. If any agent finds a problem with earlier work, stop and correct it before moving forward.
209
+
210
+
Use these rules:
211
+
212
+
| Agent reports | Backtrack action |
213
+
|---|---|
214
+
| Test already passes (feature already exists or test logic is wrong) | Re-invoke `tdd-test-writer-agent` with the finding. Do not proceed until a properly failing test exists. |
215
+
| The implementation shows the scope summary was wrong or incomplete | Go back to Step 1, update the scope summary, then re-run the affected agents in order. |
216
+
| Theming work reveals a component structure change is needed | Re-run `feature-implementer-agent` with the structural gap, then re-run `theming-styles-agent`. |
217
+
| The README update exposes missing or inconsistent behavior | Re-run `feature-implementer-agent` with the gap, then re-run `component-readme-agent`. |
218
+
| Migration work reveals an unexpected breaking change | Re-run `feature-implementer-agent` to decide whether to avoid or keep the break, then continue with `migration-agent`. |
219
+
| The changelog entry does not match the implementation | Re-run `feature-implementer-agent` if the code must change. Otherwise clarify the scope and re-run `changelog-agent`. |
220
+
221
+
When re-invoking an agent, tell it explicitly:
222
+
- what the previous attempt produced
223
+
- what was found to be wrong
224
+
- what it needs to correct
225
+
204
226
### Step 5 — Verify Completeness
205
227
206
-
After all agents finish, check:
228
+
After all agents finish**without any outstanding backtrack signals**, check:
Copy file name to clipboardExpand all lines: .github/agents/migration-agent.md
+13-2Lines changed: 13 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,7 +112,18 @@ Create `index.spec.ts` in the migration folder:
112
112
- Assert the output contains the migrated API
113
113
- Test edge cases: files without the pattern, already-migrated files
114
114
115
-
### 6. Final Self-Validation
115
+
### 6. Surfacing Problems
116
+
117
+
If you find that the breaking change is ambiguous, the old or new API is unclear, or the fix does not actually require a migration:
118
+
1. Do **not** create a migration for a non-breaking change.
119
+
2. State clearly in your output what the inconsistency or uncertainty is.
120
+
3. Stop. The orchestrator will decide whether to re-invoke an earlier agent to clarify before you proceed.
121
+
122
+
### 7. Re-invocation
123
+
124
+
If you are re-invoked because a previous migration was incorrect or incomplete, read the orchestrator's correction note carefully. Do not repeat the same approach — address the specific issue identified, re-run `npm run test:schematics` and `npm run build:migrations`, and confirm the migration is correct.
125
+
126
+
### 8. Final Self-Validation
116
127
117
128
Before finishing:
118
129
@@ -124,7 +135,7 @@ Before finishing:
124
135
-`npm run lint:lib`
125
136
4. Confirm the migration updates the old API and leaves unrelated code unchanged.
126
137
127
-
### 7. Commit
138
+
### 9. Commit
128
139
129
140
Use the conventional commit format with `BREAKING CHANGE:` footer:
Copy file name to clipboardExpand all lines: .github/agents/tdd-test-writer-agent.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,8 @@ You may collapse multiple requirements into fewer tests when one test can prove
32
32
33
33
Do not add extra scenarios unless they are explicitly requested, clearly required by the feature contract, or needed for accessibility or backward compatibility.
34
34
35
+
If you are **re-invoked** because a previous test was found to be wrong, read the implementer's finding carefully before writing a new test. Do not repeat the same approach — correct the specific flaw identified (wrong code path, passes immediately, broken setup) and confirm the new test fails for the right reason.
0 commit comments