Skip to content

Commit 3d77848

Browse files
authored
Merge branch 'master' into mdragnev/zoneless-sticky-tooltip
2 parents e3f4716 + b9681be commit 3d77848

25 files changed

Lines changed: 2828 additions & 77 deletions

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,27 @@ Check the relevant skill file for component APIs and patterns:
6969

7070
---
7171

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+
7293
## GREEN Phase — Fix the Bug
7394

7495
1. Write the **minimum code** to make the failing reproduction test pass.

.github/agents/changelog-agent.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,18 @@ Use `### General` for deprecations, behavioral changes, and changelog-worthy bug
8989
- If the component already has entries in the same subsection, add sub-bullets under the same component heading.
9090
- Include short code examples only if they clarify usage.
9191

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
93104

94105
Before finishing:
95106

@@ -98,7 +109,7 @@ Before finishing:
98109
3. Confirm the formatting matches the existing CHANGELOG style.
99110
4. Confirm you updated an existing component entry instead of duplicating it when appropriate.
100111

101-
### 6. Commit
112+
### 8. Commit
102113

103114
For features:
104115
```

.github/agents/component-readme-agent.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,19 @@ Component documentation is located at:
7474

7575
---
7676

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.
87+
88+
---
89+
7790
## Final Self-Validation
7891

7992
Before finishing:

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

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Treat failing tests as guidance, not as the full specification.
2727
2. **Read the existing component source** — understand the current implementation, patterns, and conventions used in this specific component.
2828
3. **Read the failing tests** — understand what behaviors they are trying to prove.
2929
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.
3131
6. **Run all tests** — everything required must pass.
3232
7. **Refactor** — clean up for quality without expanding scope unnecessarily.
3333

@@ -44,6 +44,27 @@ Each skill file is a routing hub pointing to detailed reference files under its
4444

4545
---
4646

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+
4768
## GREEN Phase — Make Tests Pass
4869

4970
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.
96117
## REFACTOR Phase — Clean Up
97118

98119
1. **Production code**: eliminate duplication, improve naming, simplify logic, strengthen types.
99-
2. **Test code**: extract shared setup and sharpen assertions. Add or adjust tests only when required by the actual feature contract.
120+
2. **Test code**: extract shared setup and sharpen assertions.
100121
3. Run tests — confirm no regressions.
101122

102123
---

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

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,31 @@ If the user declined, skip that handoff and continue with the remaining agents.
201201

202202
If the feature is purely theming or styling, route directly from `tdd-test-writer-agent` to `theming-styles-agent` and skip the general implementer.
203203

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+
204226
### Step 5 — Verify Completeness
205227

206-
After all agents finish, check:
228+
After all agents finish **without any outstanding backtrack signals**, check:
207229

208230
- Were all affected areas covered?
209231
- Were public exports updated?

.github/agents/migration-agent.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,18 @@ Create `index.spec.ts` in the migration folder:
112112
- Assert the output contains the migrated API
113113
- Test edge cases: files without the pattern, already-migrated files
114114

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
116127

117128
Before finishing:
118129

@@ -124,7 +135,7 @@ Before finishing:
124135
- `npm run lint:lib`
125136
4. Confirm the migration updates the old API and leaves unrelated code unchanged.
126137

127-
### 7. Commit
138+
### 9. Commit
128139

129140
Use the conventional commit format with `BREAKING CHANGE:` footer:
130141

.github/agents/tdd-test-writer-agent.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ You may collapse multiple requirements into fewer tests when one test can prove
3232

3333
Do not add extra scenarios unless they are explicitly requested, clearly required by the feature contract, or needed for accessibility or backward compatibility.
3434

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.
36+
3537
---
3638

3739
## Rules

.github/workflows/nodejs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818

1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@v6
21+
uses: actions/checkout@v7
2222
- name: Use Node.js 24
23-
uses: actions/setup-node@v6
23+
uses: actions/setup-node@v7
2424
with:
2525
node-version: 24.x
2626
cache: 'npm'

.github/workflows/npm-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v6
15-
- uses: actions/setup-node@v6
14+
- uses: actions/checkout@v7
15+
- uses: actions/setup-node@v7
1616
with:
1717
node-version: 24.x
1818
cache: 'npm'

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/stale@v7
18+
- uses: actions/stale@v10
1919
with:
2020
repo-token: ${{ secrets.GITHUB_TOKEN }}
2121
stale-issue-message: 'There has been no recent activity and this issue has been marked inactive.'

0 commit comments

Comments
 (0)