Flutter-clean-arch-skills orchestrator
git clone https://github.com/aleksandr-chaika/flutter-clean-arch-skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/aleksandr-chaika/flutter-clean-arch-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/orchestrator" ~/.claude/skills/aleksandr-chaika-flutter-clean-arch-skills-orchestrator && rm -rf "$T"
skills/orchestrator/SKILL.mdFlutter Autonomous Development Orchestrator
CRITICAL: MANDATORY EXECUTION RULES
Orchestrator MUST execute ALL phases from PM plan. Skipping phases is FORBIDDEN.
- DO NOT ASK for confirmation to proceed
- DO NOT ASK for permission to create/edit files
- EXECUTE the pipeline automatically --- ALL STAGES are MANDATORY
- ONLY STOP if blocked by missing critical information
- NEVER SKIP review, tests, or QE verification
CORE FLOW
USER REQUEST -> PHASE 1: PM -> PHASE 2: TodoWrite -> PHASE 3: Execute -> -> PHASE 4: Review -> PHASE 5: Tests -> PHASE 6: QE E2E -> PHASE 7: Close & Registry
PIPELINE STATUS TRACKING
BEFORE each agent call, update
.tasks/.pipeline-status file via Bash:
mkdir -p .tasks cat > .tasks/.pipeline-status << 'PSTATUS' REQUEST=краткое описание запроса PHASE=текущая фаза (PM|Execute|Review|Tests|QE|Close) CURRENT_TASK=TASK-XXX CURRENT_DESC=краткое описание задачи CURRENT_AGENT=имя агента PSTATUS
This file is read by Telegram notification hooks to provide context in messages.
Update this file EVERY TIME before invoking a new agent.
PHASE 1: PM ANALYSIS (ALWAYS FIRST)
Update pipeline status:
cat > .tasks/.pipeline-status << 'PSTATUS' REQUEST=[user request summary] PHASE=PM CURRENT_TASK= CURRENT_DESC=Анализ и декомпозиция задачи CURRENT_AGENT=flutter-pm PSTATUS
Invoke PM agent:
Task(subagent_type="flutter-pm", prompt="[user request + context]")
PM accepts:
- Plain text requirements
- Asana task URLs (PM uses Asana MCP to read them)
- Multiple tasks (PM groups them into execution plan)
PM returns:
- Registry lookup result (similar past tasks)
- Task type (bug/feature/fix/refactor)
- Numbered tasks with execution order
- Required reviews and tests
- Maestro test cases (for Flutter UI tasks)
If PM found similar past task:
Show to user: "Found similar task TASK-XXX. It was resolved by [resolution]."
PHASE 2: BUILD TODOWRITE FROM PM PLAN
Create TodoWrite checklist based on PM's plan (NOT a fixed template).
Example for FEATURE:
TodoWrite([ { content: "PM Analysis", status: "completed" }, { content: "Dev: flutter-dev -> TASK-050 (domain)", status: "pending" }, { content: "Dev: flutter-dev -> TASK-051 (data)", status: "pending" }, { content: "Dev: flutter-dev -> TASK-052 (presentation)", status: "pending" }, { content: "Review: flutter-reviewer -> all changes", status: "pending" }, { content: "Tests: flutter-tester -> full coverage", status: "pending" }, { content: "QE: maestro-tester -> E2E verify", status: "pending" }, { content: "Close: registry + report", status: "pending" } ])
Only include stages that PM specified.
PHASE 3: EXECUTE TASKS
For each task in PM's execution order:
- TodoWrite: mark task
in_progress - Update pipeline status (
) with current TASK-ID, description, agent.tasks/.pipeline-status - Read task file from
.tasks/flutter/ - Invoke agent via Task tool:
Task(subagent_type="flutter-dev", prompt="Read and implement: .tasks/flutter/TASK-050-domain.md\n\n[task file content]")
- Collect agent result --- save status (SUCCESS/FAILURE), files changed, errors encountered
- Verify agent output (files exist, no errors)
- TodoWrite: mark task
completed
PHASE 4: REVIEW (after dev tasks)
Update pipeline status, then invoke:
Task(subagent_type="flutter-reviewer", prompt="Review all Flutter changes for [task description]. Fix issues found.\n\nFiles changed:\n[file list]")
Reviewer FIXES issues, not just reports them. Max 3 review-fix cycles. Collect: issues found count, issues fixed count.
PHASE 5: TESTS --- MANDATORY
TESTS MANDATORY FOR ALL TASK TYPES. SKIPPING FORBIDDEN.
| Task Type | Test Scope |
|---|---|
| Full: unit + BLoC + widget + flow tests |
| Regression test reproducing and verifying the fix |
| Unit test covering the changed behavior |
| Tests verifying no behavior change |
Update pipeline status, then invoke:
Task(subagent_type="flutter-tester", prompt="Write tests for [task description]. Include flow tests for CRUD.\n\nTest scenarios from PM:\n[test scenarios]\n\nSource files:\n[file list]")
If tests fail -> fix and re-run (max 3 cycles). Collect: test count, pass/fail, coverage %.
PHASE 6: QE E2E VERIFICATION --- MANDATORY
QE MANDATORY FOR ALL FLUTTER UI TASKS. SKIPPING FORBIDDEN.
After unit/widget tests pass, verify user journeys via Maestro E2E tests.
Update pipeline status, then invoke:
Task(subagent_type="maestro-tester", prompt="QE E2E verification.\n\nMaestro test cases from PM:\n[paste test cases]\n\nVerify all test cases pass on emulator.")
If QE tests fail:
- UI bug -> send back to flutter-dev for fix
- Test issue -> maestro-tester self-fixes (up to 2 retries)
- Still failing -> report in final summary as PARTIAL
Skip QE if:
- PM explicitly marks task as "no UI changes"
- Task is pure domain/data refactor with no presentation changes
PHASE 7: CLOSE & UPDATE REGISTRY
- Verify all PM tasks completed
- Update
: status.tasks/REGISTRY.md
->open
, fill Resolution columndone - Update pipeline status:
PHASE=Close - Output final summary in Russian (MANDATORY FORMAT below)
MANDATORY FINAL OUTPUT FORMAT (Russian)
## Задача выполнена ### Запрос [оригинальный запрос пользователя] ### Источник [Asana URL / прямой запрос] ### Тип [bug | feature | fix | refactor] --- ### Реестр задач - Созданные задачи: TASK-050, TASK-051, TASK-052 - Похожие задачи в истории: [TASK-XXX / не найдено] - **Статус реестра: ОБНОВЛЁН** (все задачи закрыты) --- ### Выполненная работа | # | Задача | Агент | Статус | Что сделано | |---|--------|-------|--------|-------------| | 1 | TASK-050 | flutter-dev | ВЫПОЛНЕНО | Создан домен: entities, use cases | | 2 | TASK-051 | flutter-dev | ВЫПОЛНЕНО | Создан data layer: repo, API | | 3 | TASK-052 | flutter-dev | ВЫПОЛНЕНО | Создан UI: BLoC, экраны, виджеты | --- ### Код-ревью | Ревьюер | Статус | Найдено проблем | Исправлено | |---------|--------|----------------|------------| | flutter-reviewer | ВЫПОЛНЕНО | 3 | 3 | --- ### Тестирование | Тестер | Статус | Кол-во тестов | Покрытие | Результат | |--------|--------|--------------|----------|-----------| | flutter-tester | ВЫПОЛНЕНО | 18 | 85% | ВСЕ ПРОЙДЕНЫ | --- ### QE E2E (Maestro) | Статус | Всего TC | Пройдено | Провалено | |--------|----------|----------|-----------| | ВЫПОЛНЕНО | 5 | 5 | 0 | --- ### Ошибки и проблемы - [Список ошибок, которые возникли в процессе работы] - [Как каждая ошибка была решена] - [Если ошибок не было: "Ошибок не обнаружено"] --- ### Изменённые файлы | Файл | Действие | Описание | |------|----------|----------| | lib/features/auth/domain/ | создан | Entities, use cases | | lib/features/auth/data/ | создан | Repository, API models | | lib/features/auth/presentation/ | создан | BLoC, экраны | | test/features/auth/ | создан | 18 тестов | --- ### Итог - Все задачи: ВЫПОЛНЕНЫ / ЧАСТИЧНО / С ОШИБКАМИ - Реестр: ОБНОВЛЁН - Тесты: ПРОЙДЕНЫ - QE E2E: ПРОЙДЕНЫ / Н/Д
IMPORTANT: Fill in ACTUAL data from each agent's results, not placeholders. All text MUST be in Russian. Use data collected during phases 3-6.
SMART ROUTING EXAMPLES
Bug: PM -> flutter-dev (fix) -> flutter-reviewer -> flutter-tester -> maestro-tester -> registry Feature: PM -> flutter-dev (domain) -> flutter-dev (data) -> flutter-dev (UI) -> flutter-reviewer -> flutter-tester -> maestro-tester -> registry Fix: PM -> flutter-dev (fix) -> flutter-reviewer -> flutter-tester -> maestro-tester -> registry Refactor (no UI): PM -> flutter-dev -> flutter-reviewer -> flutter-tester -> registry (no QE)
Autonomy Rules
DO Automatically:
- Start with PM (registry lookup + task classification)
- Parse Asana URLs via PM
- Build TodoWrite from PM's plan
- Execute only agents PM specified
- Update
before EVERY agent call.tasks/.pipeline-status - Run reviews after dev work
- Run tests ALWAYS
- Run QE E2E when Flutter UI tasks exist
- Update registry after completion
- Output final summary in Russian
ONLY Ask If:
- PM flagged ambiguity
- Critical security decision
- Conflicting requirements
- Asana task has no description
NEVER Skip:
- PM analysis phase
- Registry lookup
- Pipeline status updates
- Code review after development
- Tests after development
- QE E2E after Flutter UI development
- Registry update after completion
- Russian final summary output
Error Handling
Build Errors
flutter clean && flutter pub get flutter pub run build_runner build --delete-conflicting-outputs
Test Errors
- Read error message carefully
- Check if mock is missing
- Verify test setup
- Fix and re-run
Unresolvable Issues
If stuck after 3 iterations:
## Заблокировано: [Проблема] **Попытки исправления:** 1. Попытка 1 --- результат 2. Попытка 2 --- результат 3. Попытка 3 --- результат **Требуется решение пользователя:** - Вопрос или решение
Quality Gates
| Этап | Проверка | Критерий |
|---|---|---|
| DEVELOP | Build | succeeds |
| REVIEW | Critical | Zero [CRITICAL] issues |
| TEST | Pass | All tests pass |
| TEST | Coverage | >80% on new code |
| QE E2E | Pass | All Maestro flows pass |
| QE E2E | Screenshots | Screenshots captured at key points |