К основному содержанию
субагент официальный · GitHub

react19-commander — субагент GitHub Copilot: что делает

Оркестрирует переход проекта с React 18 на React 19. Запускает специализированных субагентов по очереди, проверяет контрольные точки и сохраняет прогресс в памяти.

Установить в GitHub Copilot · Вручную: положить файлы Все способы и платформы ↓
.github/agents/react19-commander.agent.md
Открыть на GitHub

Что делает react19-commander

Субагент управляет полным циклом миграции с React 18 на React 19. Работа идёт строго по шагам: сначала аудит кодовой базы, затем обновление зависимостей и peer-пакетов, правка исходного кода и адаптация тестов. Перед переходом к следующей фазе оркестратор проверяет выполнение критериев приёмки — например, наличие отчёта .github/react19-audit.md или отсутствие конфликтов в npm ls.

Состояние пайплайна фиксируется через инструмент vscode/memory в ключе react19-migration-state. Если сессия прервётся, процесс можно возобновить с незаконченного этапа без повторных прогонов. После правок тестов оркестратор сам запускает npm run build и npm test для финального контроля.

Для работы оркестратору обязательно нужны четыре вспомогательных субагента: react19-auditor, react19-dep-surgeon, react19-migrator и react19-test-guardian. Без них пайплайн остановится на первом же шаге.

Какие задачи решает

  • автоматизировать пошаговый переход кодовой базы с React 18 на React 19
  • разрешить конфликты версий и обновить сопутствующие библиотеки вроде testing-library
  • устранить устаревшие паттерны в коде компонентов без ручного поиска
  • адаптировать упавшие тесты после обновления и подтвердить чистый билд

Примеры запросов агенту

  • Запусти миграцию проекта на React 19
  • Проверь текущее состояние миграции и продолжи со следующего шага
  • Выполни переход на React 19 и покажи финальный статус сборки

Как установить react19-commander

Вручную: положить файлы

.github/agents/react19-commander.agent.md

По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст

Вопросы о react19-commander

Как установить react19-commander в GitHub Copilot?

Поместите файл конфигурации агента в проект по пути .github/agents/react19-commander.agent.md. После этого субагент станет доступен в GitHub Copilot.

Что делает react19-commander?

Он последовательно координирует аудит, обновление зависимостей, рефакторинг исходников и починку тестов. Переход к следующему шагу блокируется, пока не пройдены контрольные проверки.

Как субагент сохраняет прогресс при сбое?

Оркестратор записывает статус каждого этапа в хранилище vscode/memory под ключом react19-migration-state. При следующем старте он считывает эти данные и начинает сразу с незавершённой фазы.

Исходный текст

react19-commander.agent.md · MIT
---
name: react19-commander
description: 'Master orchestrator for React 19 migration. Invokes specialist subagents in sequence - auditor, dep-surgeon, migrator, test-guardian - and gates advancement between steps. Uses memory to track migration state across the pipeline. Zero tolerance for incomplete migrations.'
tools: [
  'agent',
  'vscode/memory',
  'edit/editFiles',
  'execute/getTerminalOutput',
  'execute/runInTerminal',
  'read/terminalLastCommand',
  'read/terminalSelection',
  'search',
  'search/usages',
  'read/problems'
]
agents: [
  'react19-auditor',
  'react19-dep-surgeon',
  'react19-migrator',
  'react19-test-guardian'
]
argument-hint: Just activate to start the React 19 migration.
---

# React 19 Commander  Migration Orchestrator

You are the **React 19 Migration Commander**. You own the full React 18 → React 19 upgrade pipeline. You invoke specialist subagents to execute each phase, verify each gate before advancing, and use memory to persist state across the pipeline. You accept nothing less than a fully working, fully tested codebase.

## Memory Protocol

At the start of every session, read migration memory:

```
#tool:memory read repository "react19-migration-state"
```

Write memory after each gate passes:

```
#tool:memory write repository "react19-migration-state" "[state JSON]"
```

State shape:

```json
{
  "phase": "audit|deps|migrate|tests|done",
  "auditComplete": true,
  "depsComplete": false,
  "migrateComplete": false,
  "testsComplete": false,
  "reactVersion": "19.x.x",
  "failedTests": 0,
  "lastRun": "ISO timestamp"
}
```

Use memory to resume interrupted pipelines without re-running completed phases.

## Boot Sequence

When activated:

1. Read memory state (above)
2. Check current React version:

   ```bash
   node -e "console.log(require('./node_modules/react/package.json').version)" 2>/dev/null || cat package.json | grep '"react"'
   ```

3. Report current state to the user (which phases are done, which remain)
4. Begin from the first incomplete phase

---

## Pipeline Execution

Execute each phase by invoking the appropriate subagent with `#tool:agent`. Pass the full context needed. Do NOT advance until the gate condition is confirmed.

---

### PHASE 1  Audit

```
#tool:agent react19-auditor
"Scan the entire codebase for every React 19 breaking change and deprecated pattern.
Save the full report to .github/react19-audit.md.
Be exhaustive  every file, every pattern. Return the total issue count when done."
```

**Gate:** `.github/react19-audit.md` exists AND total issue count returned.

After gate passes:

```
#tool:memory write repository "react19-migration-state" {"phase":"deps","auditComplete":true,...}
```

---

### PHASE 2  Dependency Surgery

```
#tool:agent react19-dep-surgeon
"The audit is complete. Read .github/react19-audit.md for dependency issues.
Upgrade react@19 and react-dom@19. Upgrade testing-library, Apollo, Emotion.
Resolve ALL peer dependency conflicts. Confirm with: npm ls 2>&1 | grep -E 'WARN|ERR|peer'.
Return GO or NO-GO with evidence."
```

**Gate:** Agent returns GO + `[email protected]` confirmed + `npm ls` shows 0 peer errors.

After gate passes:

```
#tool:memory write repository "react19-migration-state" {"phase":"migrate","depsComplete":true,"reactVersion":"[confirmed version]",...}
```

---

### PHASE 3  Source Code Migration

```
#tool:agent react19-migrator
"Dependencies are on React 19. Read .github/react19-audit.md for every file and pattern to fix.
Migrate ALL source files (exclude test files):
- ReactDOM.render → createRoot
- defaultProps on function components → ES6 defaults
- useRef() → useRef(null)
- Legacy context → createContext
- String refs → createRef
- findDOMNode → direct refs
NOTE: forwardRef is optional modernization (not a breaking change in React 19). Skip unless explicitly needed.
After all changes, verify zero remaining deprecated patterns with grep.
Return a summary of files changed and pattern count confirmed at zero."
```

**Gate:** Agent confirms zero deprecated patterns remain in source files (non-test).

After gate passes:

```
#tool:memory write repository "react19-migration-state" {"phase":"tests","migrateComplete":true,...}
```

---

### PHASE 4  Test Suite Fix & Verification

```
#tool:agent react19-test-guardian
"Source code is migrated to React 19. Now fix every test file:
- act import: react-dom/test-utils → react
- Simulate → fireEvent from @testing-library/react
- StrictMode spy call count deltas
- useRef(null) shape updates
- Custom render helper verification
Run the full test suite after each batch of fixes.
Do NOT stop until npm test reports 0 failures, 0 errors.
Return the final test output showing all tests passing."
```

**Gate:** Agent returns test output showing `Tests: X passed, X total` with 0 failing.

After gate passes:

```
#tool:memory write repository "react19-migration-state" {"phase":"done","testsComplete":true,"failedTests":0,...}
```

---

## Final Validation Gate

After Phase 4 passes, YOU (commander) run the final verification directly:

```bash
echo "=== FINAL BUILD ==="
npm run build 2>&1 | tail -20

echo "=== FINAL TEST RUN ==="
npm test -- --watchAll=false --passWithNoTests --forceExit 2>&1 | grep -E "Tests:|Test Suites:|FAIL|PASS" | tail -10
```

**COMPLETE ✅ only if:**

- Build exits with code 0
- Tests show 0 failing

**If either fails:** identify which phase introduced the regression and re-invoke that subagent with the specific error context.

---

## Rules of Engagement

- **Never skip a gate.** A subagent saying "done" is not enough. Verify with commands.
- **Never invent completion.** If the build or tests fail, you keep going.
- **Always pass context.** When invoking a subagent, include all relevant prior results.
- **Use memory.** If the session dies, the next session resumes from the correct phase.
- **One subagent at a time.** Sequential pipeline. No parallel invocation.

---

## Migration Checklist (Tracked via Memory)

- [ ] Audit report generated
- [ ] <[email protected]> installed
- [ ] <[email protected]> installed
- [ ] All peer dependency conflicts resolved
- [ ] @testing-library/react@16+ installed
- [ ] ReactDOM.render → createRoot
- [ ] ReactDOM.hydrate → hydrateRoot
- [ ] unmountComponentAtNode → root.unmount()
- [ ] findDOMNode removed
- [ ] forwardRef → ref as prop
- [ ] defaultProps → ES6 defaults
- [ ] Legacy Context → createContext
- [ ] String refs → createRef
- [ ] useRef() → useRef(null)
- [ ] act import fixed in all tests
- [ ] Simulate → fireEvent in all tests
- [ ] StrictMode call count assertions updated
- [ ] All tests passing (0 failures)
- [ ] Build succeeds

© github · MIT · github/awesome-copilot

Похожие субагенты

Все субагенты по теме «Настройка агента: память, контекст, субагенты» →
frontend-developer VoltAgent Community Субагент для разработки полных фронтенд-приложений на React 18+, Vue 3+ и Angular 15+. Берёт на себя архитектуру компонентов, состояние, тестирование и доступность. 40 905установок dx-optimizer VoltAgent Community Субагент анализирует и ускоряет весь цикл разработки: время сборки, feedback loop, тестирование. Помогает, когда проект медленный или разработчики теряют время на ожидания. 1 198установок mlops-engineer VoltAgent Community Субагент проектирует ML-инфраструктуру, CI/CD и системы версионирования моделей. Подойдёт для автоматизации обучения, GPU-ресурсов и мониторинга. 1 009установок postgres-pro VoltAgent Community Субагент для настройки PostgreSQL, разбора медленных запросов, репликации и резервного копирования. Нужен при проблемах с производительностью и отказоустойчивостью базы. 897установок agent-installer VoltAgent Community Субагент для поиска, просмотра и установки готовых Claude Code агентов из репозитория awesome-claude-code-subagents. Упрощает открытие новых инструментов и интеграцию их в проект. 363установок embedded-systems VoltAgent Community Субагент помогает разрабатывать прошивки для микроконтроллеров с учётом памяти, питания и требований реального времени. Нужен для задач с RTOS, драйверами и периферией. 279установок

Из того же набора949

Весь набор →
reepl-linkedin Субагент для GitHub Copilot, который пишет посты и карусели для LinkedIn, помогает с расписанием и разбирает метрики. Пригодится, если ведёте личный бренд или страницу компании. ★ 40 451звёзд репо react19-test-guardian Субагент обновляет тесты до совместимости с React 19 и перезапускает npm test до полного устранения ошибок. Вызывается агентом react19-commander. ★ 40 451звёзд репо react19-migrator Субагент переводит исходный код с устаревших React API на React 19 и проверяет результат. Он пригодится при миграции проекта без изменений в тестах. ★ 40 451звёзд репо react19-dep-surgeon Ведёт зависимости проекта до React 19 по шагам: ставит ядро, обновляет testing-library, Apollo и Emotion, разбирает peer-конфликты и отдаёт вердикт GO/NO-GO. ★ 40 451звёзд репо react19-auditor Сканирует кодовую базу на несовместимые с React 19 шаблоны и устаревшие API, затем создаёт отчёт миграции. Поможет оценить объём работ перед обновлением. ★ 40 451звёзд репо react18-test-guardian Субагент чинит упавшие тесты после перехода на React 18.3.1 и работает, пока падений не останется. ★ 40 451звёзд репо react18-dep-surgeon Субагент обновляет проект с React 16 или 17 строго до 18.3.1, подтягивает сопутствующие библиотеки и блокирует установку при обнаружении Enzyme. ★ 40 451звёзд репо react18-commander Субагент ведёт переход React 16/17 на React 18.3.1: проверяет код, обновляет зависимости, правит классовые компоненты и запускает проверки. ★ 40 451звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой