Files
wiki/tasks/multi-agent/PROPOSAL_VS_REALITY.md
2026-06-01 09:10:15 +03:00

64 lines
7.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Сводная таблица расхождений: Proposal v1 vs Реализация
## Статус: 2026-06-01
| # | Аспект | Proposal v1 | Реализация (факт) | Критичность | Что делать |
|---|--------|-------------|-------------------|-------------|------------|
| **АГЕНТЫ** |||||
| 1 | Deployer | Полноценный агент: merge → tag → deploy test → smoke → deploy prod → healthcheck 5 min → rollback | Хардкод `_auto_merge_pr()` в `_try_advance_stage`. `deployer.md` есть в репо, но не в `AGENT_CONFIGS` и `stages.py` | 🔴 HIGH | Добавить deployer в AGENT_CONFIGS + stages.py, убрать хардкод |
| 2 | Designer | Отдельный агент между Architect и Developer (макеты, states, a11y) | Не реализован. Этап пропускается | 🟡 MED | Пока skip (ui_affected=false для большинства задач). Добавить когда будет UI-heavy задача |
| 3 | Модели агентов | Analyst: Sonnet, Architect: Opus, Designer: Opus, Developer: Sonnet/GLM, Reviewer: Opus, Tester: Sonnet, Deployer: Sonnet | Все на `claude-sonnet-4-6` (из system prompt) | 🟡 MED | Поднять Architect и Reviewer на Opus (proposal обосновывает: ошибка архитектора/ревьюера дороже) |
| **QUALITY GATES** |||||
| 4 | QG-0 (Inception→Analysis) | Валидация Work Item: title 5-80 chars, description ≥3 предложений, priority, project | Нет. Задача создаётся вручную в БД orchestrator'а | 🟡 MED | Реализовать webhook `work_item.created` → QG-0 → auto-init |
| 5 | QG-1 (Analysis→Architecture) | `lint-spec.sh` + `lint-test-plan.sh` + `req-coverage.py` + `:approved:` reaction | Только проверка файлов + `:approved:` в комментарии | 🟢 LOW | Добавить lint-скрипты (формальная валидация YAML/MD) |
| 6 | QG-2 (Architecture→Development) | `lint-adr.sh` + req-coverage (каждый REQ покрыт ADR) | Только `check_architecture_done` (файлы существуют) | 🟢 LOW | Добавить lint-adr |
| 7 | QG-4 (Development→Review) | CI: lint+type+unit+integration+build+coverage | `check_ci_green` через Gitea API (CI настроен) | ✅ OK | Работает |
| 8 | QG-5 (Review→Testing) | Gitea PR review APPROVED + 0 unresolved | `check_reviewer_verdict` — читает `12-review.md` | 🟡 MED | Proposal предполагает PR review через Forge API. Реализация — через файл. Оба подхода рабочие, но proposal точнее |
| 9 | QG-6 (Testing→Deploy) | CI на preview: e2e + visual + a11y + perf | `check_tests_passed` — наличие `13-test-report.md` с "PASS" | 🟡 MED | Нет Playwright/e2e. Tester прогоняет unit-тесты и пишет отчёт |
| 10 | QG-7 (Deploy test→prod) | smoke + healthcheck + user `:approved:` | Нет. Один merge в main = deploy | 🟡 MED | Deployer должен делать smoke после deploy |
| 11 | QG-final | uptime 10min + user `:final-approved:` | Нет | 🟢 LOW | Добавить в deployer |
| **GIT WORKFLOW** |||||
| 12 | Ветки | `feature/<plane-id>-<slug>` | `feature/ET-007-et-005` (используется plane sequence_id) | ✅ OK | Близко к proposal |
| 13 | PR creation | Developer открывает PR через Forge MCP | `_ensure_pr()` в monitor thread после developer push | ✅ OK | Работает (добавлено сегодня) |
| 14 | PR merge | Deployer мержит после QG-6 | `_auto_merge_pr()` хардкод | 🔴 HIGH | Перенести в deployer agent |
| 15 | Tags/semver | Deployer создаёт tag `vX.Y.Z` по conventional commits | Нет тегов | 🟡 MED | Добавить в deployer |
| 16 | Conventional commits | `feat(scope): описание` + `Refs: PROJ-NNN` | Частично (developer делает `feat(web): ...`) | 🟢 LOW | Добавить lint в CI |
| **PLANE INTEGRATION** |||||
| 17 | Подзадачи (7 subtasks) | Auto-create 7 подзадач при создании Feature | Нет. Одна задача, этапы в orchestrator DB | 🟡 MED | Proposal предполагает Plane как витрину. Можно добавить позже |
| 18 | Статусы подзадач | To Do → In Progress → Awaiting Approval → Done → Blocked | Только комментарии + issue state (Backlog/Todo/InProgress/Done) | 🟡 MED | Расширить plane_sync |
| 19 | Custom fields | `stage`, `agent_running`, `branch`, `pr_url` | Нет custom fields. Данные в orchestrator DB | 🟢 LOW | Nice-to-have |
| 20 | Webhook events | `work_item.created`, `comment.created`, `work_item.updated` | Только `issue_comment` (для `:approved:`) | 🟡 MED | Добавить `work_item.created` для auto-init |
| **ORCHESTRATOR** |||||
| 21 | Event journal (DB) | Postgres с полным журналом событий | SQLite с tasks + agent_runs | 🟢 LOW | SQLite достаточен для текущего масштаба |
| 22 | Idempotency | Повторный webhook → тот же результат | Частично (дубли комментариев возможны) | 🟡 MED | Добавить event dedup |
| 23 | Budget/kill-switch | `.openclaw/budget.yaml` с лимитами на агента | Только timeout watchdog | 🟡 MED | Добавить budget tracking |
| 24 | Retry/escalation | 3 retry developer, escalation в Plane | 3 retry developer (реализовано сегодня). Escalation — только Telegram | ✅ OK | Работает |
| **DEPLOY** |||||
| 25 | Environments | test + prod (два этапа) | Один merge в main. Нет отдельного test/prod | 🟡 MED | Deployer должен различать test/prod |
| 26 | Rollback | Deployer откатывает при failed smoke | Нет rollback | 🟡 MED | Добавить в deployer |
| 27 | CHANGELOG.md | Deployer обновляет при merge | Нет | 🟢 LOW | Добавить в deployer |
| **MONITORING** |||||
| 28 | Telegram notifications | Детерминированные от скрипта | ✅ Реализовано (send_telegram в notifications.py) | ✅ OK | Работает |
| 29 | Plane comments | На каждом переходе + при ошибках | Частично (не все переходы) | 🟢 LOW | Расширить |
| 30 | Метрики (время/стоимость) | Дашборд: время на этап, стоимость, retry rate | Нет | 🟢 LOW | Добавить позже |
---
## Приоритеты реализации
### 🔴 Немедленно (блокирует автономность)
1. **Deployer как агент** — убрать хардкод, добавить в AGENT_CONFIGS + stages.py
### 🟡 Следующая итерация (улучшает качество)
2. Модели: Architect/Reviewer на Opus
3. QG-0: auto-init при создании Work Item в Plane
4. Deployer: smoke test + rollback + tag + CHANGELOG
5. Budget tracking
### 🟢 Backlog (nice-to-have)
6. Designer agent
7. Lint-скрипты для QG-1/QG-2
8. Plane подзадачи (7 subtasks)
9. Метрики/дашборд
10. E2E тесты (Playwright)