metaagent session-005: METASTATE + HANDOFF
- All 7 tasks archived (T1-T7 in .agent/archive/tasks/) - All 7 requests approved and moved to .agent/archive/requests/ - .agent/archive/index.json created - .agent/context/project-state.md updated (post-refactor snapshot) - .agent/handoff-summary.md (full summary for next agent) - .agent/session-summary.md (phase-level summary) - .agent/roadmap/sources.md (updated priorities) - .agent/checkpoints.json: handoff=completed All 8 phases completed: INIT, ANALYSE, ROADMAP, DECOMPOSITION, EXECUTION, METASTATE, HANDOFF (DESIGN skipped for existing project).
This commit is contained in:
1 parent
3ef10618dc
commit
32b2f537a8
54 files changed
+1536
-3012
No files matched your search
@@ -15,8 +15,7 @@
|
||||
- **Точка входа:** {{ entry_point }}
|
||||
- **Система сборки:** {{ build_system }}
|
||||
|
||||
{% if project_type == "existing" or project_type == "scaffold" %}
|
||||
## 2. Стек технологий
|
||||
## 2. Стек технологий (existing / scaffold)
|
||||
|
||||
| Компонент | Значение |
|
||||
|---|---|
|
||||
@@ -27,7 +26,7 @@
|
||||
| Пакетный менеджер | {{ package_manager }} |
|
||||
| Линтер/форматтер | {{ linter }} |
|
||||
|
||||
## 3. Архитектура
|
||||
## 3. Архитектура (existing / scaffold)
|
||||
|
||||
```
|
||||
{{ directory_tree }}
|
||||
@@ -41,7 +40,7 @@
|
||||
|---|---|
|
||||
| {{ module }} | {{ description }} |
|
||||
|
||||
## 4. Конвенции
|
||||
## 4. Конвенции (existing / scaffold)
|
||||
|
||||
- **Стиль:** {{ code_style }}
|
||||
- **Импорты:** {{ import_style }}
|
||||
@@ -49,52 +48,38 @@
|
||||
- **Обработка ошибок:** {{ error_handling }}
|
||||
- **Логирование:** {{ logging }}
|
||||
|
||||
## 5. Тесты
|
||||
## 5. Тесты (existing / scaffold)
|
||||
|
||||
- **Команда запуска:** `{{ test_command }}`
|
||||
- **Всего тестов:** {{ total_tests }}
|
||||
- **Пройдено:** {{ passed }}
|
||||
- **Упало:** {{ failed }}
|
||||
- **Пропущено:** {{ skipped }}
|
||||
- **Упавшие тесты:**
|
||||
{% for test in failed_tests %}
|
||||
- `{{ test }}`
|
||||
{% endfor %}
|
||||
- **Упавшие тесты:** {{ failed_tests_list }}
|
||||
|
||||
## 6. Базовая проверка
|
||||
## 6. Базовая проверка (existing / scaffold)
|
||||
|
||||
- **Сборка:** {{ build_status }}
|
||||
- **Запуск:** {{ run_status }}
|
||||
- **Git status:** {{ git_status }}
|
||||
{% endif %}
|
||||
|
||||
{% if project_type == "greenfield" or project_type == "scaffold" %}
|
||||
## 7. Требования (из README)
|
||||
## 7. Требования (greenfield / scaffold)
|
||||
|
||||
### Функциональные требования
|
||||
|
||||
{% for req in functional_requirements %}
|
||||
- {{ req }}
|
||||
{% endfor %}
|
||||
{{ functional_requirements_list }}
|
||||
|
||||
### Нефункциональные требования
|
||||
|
||||
{% for req in non_functional_requirements %}
|
||||
- {{ req }}
|
||||
{% endfor %}
|
||||
{{ non_functional_requirements_list }}
|
||||
|
||||
### Бизнес-контекст
|
||||
|
||||
{% for item in business_context %}
|
||||
- {{ item }}
|
||||
{% endfor %}
|
||||
{{ business_context_list }}
|
||||
|
||||
### Неясные моменты / Вопросы
|
||||
|
||||
{% for question in open_questions %}
|
||||
- {{ question }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{{ open_questions_list }}
|
||||
|
||||
## 8. Примечания
|
||||
|
||||
|
||||
@@ -38,36 +38,11 @@
|
||||
|
||||
### Сущности
|
||||
|
||||
{% for entity in entities %}
|
||||
### {{ entity.name }}
|
||||
|
||||
| Поле | Тип | Ограничения | Описание |
|
||||
|---|---|---|---|
|
||||
{% for field in entity.fields %}
|
||||
| {{ field.name }} | {{ field.type }} | {{ field.constraints }} | {{ field.description }} |
|
||||
{% endfor %}
|
||||
|
||||
**Связи:** {{ entity.relationships }}
|
||||
|
||||
{% endfor %}
|
||||
{{ entity_descriptions }}
|
||||
|
||||
## 5. API / Интерфейсы
|
||||
|
||||
{% if has_api %}
|
||||
| Метод | Путь | Описание | Request | Response |
|
||||
|---|---|---|---|---|
|
||||
{% for endpoint in api_endpoints %}
|
||||
| {{ endpoint.method }} | {{ endpoint.path }} | {{ endpoint.description }} | {{ endpoint.request }} | {{ endpoint.response }} |
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if has_gui %}
|
||||
**Экраны:** {{ gui_screens }}
|
||||
{% endif %}
|
||||
|
||||
{% if has_cli %}
|
||||
**Команды:** {{ cli_commands }}
|
||||
{% endif %}
|
||||
{{ api_endpoints_table }}
|
||||
|
||||
## 6. Обработка ошибок
|
||||
|
||||
@@ -82,31 +57,16 @@
|
||||
- **Mock-стратегия:** {{ mock_strategy }}
|
||||
- **Команда запуска:** `{{ test_command }}`
|
||||
|
||||
## 8. Alternative Architecture (если применимо)
|
||||
## 8. Дополнительные артефакты (по команде пользователя)
|
||||
|
||||
| Критерий | Выбранная архитектура | Альтернатива |
|
||||
|---|---|---|
|
||||
| Название | {{ chosen_arch }} | {{ alt_arch }} |
|
||||
| Сложность | {{ chosen_complexity }} | {{ alt_complexity }} |
|
||||
| Почему не выбрана | — | {{ alt_rejection_reason }} |
|
||||
Если пользователь вызвал соответствующие команды, добавить ссылки:
|
||||
|
||||
## 9. ADR Reference (если применимо)
|
||||
- ADR: `.agent/decisions/` (команда `/adr`)
|
||||
- Alternative Architecture: `.agent/context/alt-architecture.md` (команда `/alt-arch`)
|
||||
- Risk Register: `.agent/context/risk-register.md` (команда `/risk-register`)
|
||||
- Red Team Review: `.agent/context/red-team-report.md` (команда `/red-team`)
|
||||
|
||||
| ID | Решение | Файл |
|
||||
|---|---|---|
|
||||
{% for adr in adr_list %}
|
||||
| {{ adr.id }} | {{ adr.title }} | `{{ adr.path }}` |
|
||||
{% endfor %}
|
||||
|
||||
## 10. Risk Register (если применимо)
|
||||
|
||||
| # | Assumption | Impact | Mitigation |
|
||||
|---|---|---|---|
|
||||
{% for risk in risk_list %}
|
||||
| {{ risk.id }} | {{ risk.assumption }} | {{ risk.impact }} | {{ risk.mitigation }} |
|
||||
{% endfor %}
|
||||
|
||||
## 11. Предварительная группировка задач
|
||||
## 9. Предварительная группировка задач
|
||||
|
||||
| Задача | Описание | Тип |
|
||||
|---|---|---|
|
||||
@@ -115,6 +75,6 @@
|
||||
| T3 | {{ task_3 }} | feature |
|
||||
| T4 | {{ task_4 }} | test |
|
||||
|
||||
## 12. Примечания
|
||||
## 10. Примечания
|
||||
|
||||
{{ notes }}
|
||||
@@ -3,37 +3,24 @@
|
||||
## Session Info
|
||||
|
||||
- **Session ID:** `{{ session_id }}`
|
||||
- **Target Repo:** `{{ target_repo }}`
|
||||
- **Target Repo:** {{ target_repo }}
|
||||
- **Goal:** {{ goal }}
|
||||
- **Date:** {{ date }}
|
||||
- **Duration:** {{ duration }}
|
||||
- **Depth:** {{ depth }}
|
||||
- **Config:** {{ config_summary }}
|
||||
- **Project type:** {{ project_type }}
|
||||
|
||||
## Repo Summary
|
||||
|
||||
{{ repo_summary }}
|
||||
|
||||
## Project Type
|
||||
## Artifacts Created
|
||||
|
||||
- **Type:** {{ project_type }}
|
||||
- **Design report:** {% if project_type == "greenfield" or project_type == "scaffold" %}`.agent/context/design-report.md`{% else %}—{% endif %}
|
||||
|
||||
## ADR Summary (если применимо)
|
||||
|
||||
{% if adr_count > 0 %}
|
||||
Создано ADR: {{ adr_count }}
|
||||
{% for adr in adr_list %}
|
||||
- `{{ adr.path }}` — {{ adr.title }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
## Risk Register (если применимо)
|
||||
|
||||
{% if risk_count > 0 %}
|
||||
Задокументировано допущений: {{ risk_count }}
|
||||
Наиболее критичное: {{ top_risk }}
|
||||
{% endif %}
|
||||
- **Analysis report:** `.agent/context/analysis-report.md`
|
||||
- **Project state:** `.agent/context/project-state.md`
|
||||
- **Design report:** {{ design_report_path_or_dash }}
|
||||
- **Roadmap:** `.agent/roadmap/sources.md`
|
||||
- **ADR:** {{ adr_summary_or_dash }}
|
||||
- **Risk Register:** {{ risk_register_path_or_dash }}
|
||||
- **Red Team Report:** {{ red_team_report_path_or_dash }}
|
||||
|
||||
## Environment Status
|
||||
|
||||
@@ -50,35 +37,21 @@
|
||||
| Pending | {{ pending }} |
|
||||
| In Progress | {{ in_progress }} |
|
||||
| Completed | {{ completed }} |
|
||||
| Archived | {{ archived }} |
|
||||
| Failed/Skipped | {{ failed }} |
|
||||
|
||||
**Task by type:**
|
||||
{% for type, count in tasks_by_type %}
|
||||
- {{ type }}: {{ count }}
|
||||
{% endfor %}
|
||||
|
||||
## Tasks (ordered)
|
||||
|
||||
{% for task in tasks %}
|
||||
### {{ task.id }}: {{ task.title }}
|
||||
- Type: {{ task.type }}
|
||||
- Depends on: {{ task.depends_on | default("—") }}
|
||||
- Files: {{ task.files | join(", ") }}
|
||||
- Status: {{ task.status }}
|
||||
|
||||
{% endfor %}
|
||||
{{ task_list_markdown }}
|
||||
|
||||
## Next Steps
|
||||
|
||||
Исполнительный агент начинает с задачи **{{ first_task }}**.
|
||||
Следующий агент: прочитай `.agent/context/project-state.md`, затем `.agent/tasks/manifest.json` и приступай к первой `pending` задаче.
|
||||
|
||||
## Caveats
|
||||
|
||||
{% for caveat in caveats %}
|
||||
- {{ caveat }}
|
||||
{% endfor %}
|
||||
{{ caveats_list }}
|
||||
|
||||
## Checkpoints
|
||||
|
||||
Файл: `.agent/checkpoints.json`
|
||||
Актуальное состояние чекпоинтов прилагается.
|
||||
Файл: `.agent/checkpoints.json` — состояние фаз и список задач.
|
||||
@@ -1,38 +0,0 @@
|
||||
# MetaAgent Request
|
||||
# Для ручного заполнения перед запуском MetaAgent.
|
||||
# Поместите этот файл в .agent/metaagent-request.md целевого репозитория.
|
||||
# Если файл отсутствует — MetaAgent проведёт интервью (PROTOCOLS/00_CONFIG.md).
|
||||
# Ответьте "default" на любой вопрос — будет использовано значение по умолчанию.
|
||||
|
||||
## Параметры сессии
|
||||
|
||||
| Функция | Вкл | Аргументы |
|
||||
|---|---|---|
|
||||
| ANALYSIS | ✓ | — |
|
||||
| DESIGN | ✓ | adr=yes, alternative_arch=yes |
|
||||
| RED_TEAM | ✗ | — |
|
||||
| RISK_REGISTER | ✗ | — |
|
||||
| DECOMPOSITION | ✓ | invariant_tests=yes |
|
||||
| SETUP | ✓ | — |
|
||||
| HANDOFF | ✓ | — |
|
||||
|
||||
## Глубина проработки
|
||||
|
||||
**Значение:** 6 (1-10)
|
||||
|
||||
| Уровень | Название | Описание |
|
||||
|---|---|---|
|
||||
| 1-2 | Scaffold | Только структура проекта + пустые модули |
|
||||
| 3-4 | Light | (default) Быстрый дизайн + задачи без расширений |
|
||||
| 5-6 | Standard | Полный ANALYSIS→DESIGN→DECOMP→SETUP→HANDOFF |
|
||||
| 7-8 | Deep | Standard + ADR, Risk Register, Alternative Architecture |
|
||||
| 9-10 | Maximum | Deep + Red Team Review, Executable Invariants |
|
||||
|
||||
## Цель
|
||||
|
||||
Сформулируйте задачу для MetaAgent.
|
||||
|
||||
## Дополнительно
|
||||
|
||||
- **Boundaries:** (опционально) ограничения, которые нельзя нарушать
|
||||
- **Target:** путь к репозиторию или URL
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "metaagent/checkpoints/2.0.0",
|
||||
"$id": "metaagent/checkpoints/3.0.0",
|
||||
"title": "MetaAgent Checkpoints",
|
||||
"description": "Schema for .agent/checkpoints.json — session state",
|
||||
"type": "object",
|
||||
@@ -19,52 +19,25 @@
|
||||
"description": "Path to the target repository"
|
||||
},
|
||||
"goal": {
|
||||
"type": "string",
|
||||
"description": "Session goal"
|
||||
"type": ["string", "null"],
|
||||
"description": "Session goal (set by user, may be null until first task)"
|
||||
},
|
||||
"project_type": {
|
||||
"type": "string",
|
||||
"enum": ["pending", "existing", "greenfield", "scaffold"],
|
||||
"description": "Type of the target project"
|
||||
},
|
||||
"config": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"depth": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 10,
|
||||
"description": "Depth of the session (1-10)"
|
||||
},
|
||||
"design": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"adr": { "type": "boolean" },
|
||||
"alternative_arch": { "type": "boolean" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"red_team": { "type": "boolean" },
|
||||
"risk_register": { "type": "boolean" },
|
||||
"decomposition": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"invariant_tests": { "type": "boolean" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
"type": ["string", "null"],
|
||||
"enum": [null, "existing", "greenfield", "scaffold"],
|
||||
"description": "Type of the target project (set in ANALYSE phase)"
|
||||
},
|
||||
"phases": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"analysis": { "type": "string", "enum": ["pending", "in_progress", "completed", "failed", "skipped"] },
|
||||
"design": { "type": "string", "enum": ["pending", "in_progress", "completed", "failed", "skipped"] },
|
||||
"red_team": { "type": "string", "enum": ["pending", "in_progress", "completed", "failed", "skipped"] },
|
||||
"init": { "type": "string", "enum": ["pending", "in_progress", "completed", "failed", "skipped"] },
|
||||
"analyse": { "type": "string", "enum": ["pending", "in_progress", "completed", "failed", "skipped"] },
|
||||
"roadmap": { "type": "string", "enum": ["pending", "in_progress", "completed", "failed", "skipped"] },
|
||||
"design": { "type": "string", "enum": ["pending", "in_progress", "completed", "failed", "skipped"] },
|
||||
"decomposition": { "type": "string", "enum": ["pending", "in_progress", "completed", "failed", "skipped"] },
|
||||
"environment": { "type": "string", "enum": ["pending", "in_progress", "completed", "failed", "skipped"] },
|
||||
"handoff": { "type": "string", "enum": ["pending", "in_progress", "completed", "failed", "skipped"] }
|
||||
"execution": { "type": "string", "enum": ["pending", "in_progress", "completed", "failed", "skipped"] },
|
||||
"metastate": { "type": "string", "enum": ["pending", "in_progress", "completed", "failed", "skipped"] },
|
||||
"handoff": { "type": "string", "enum": ["pending", "in_progress", "completed", "failed", "skipped"] }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
@@ -74,8 +47,8 @@
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": { "type": "string" },
|
||||
"title": { "type": "string" },
|
||||
"id": { "type": "string" },
|
||||
"title": { "type": "string" },
|
||||
"status": { "type": "string", "enum": ["pending", "in_progress", "completed", "failed", "archived"] }
|
||||
},
|
||||
"required": ["id", "title", "status"],
|
||||
@@ -88,6 +61,6 @@
|
||||
"description": "ISO 8601 timestamp of last update"
|
||||
}
|
||||
},
|
||||
"required": ["metaagent_version", "session_id", "goal", "config", "phases", "last_updated"],
|
||||
"required": ["metaagent_version", "session_id", "phases", "last_updated"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "metaagent/decisions-index/2.0.0",
|
||||
"$id": "metaagent/decisions-index/3.0.0",
|
||||
"title": "MetaAgent Decisions Index",
|
||||
"description": "Schema for .agent/decisions/index.json — machine-readable index of ADRs",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "Schema version",
|
||||
"enum": ["2.0"]
|
||||
"description": "Schema version (3.0 in v3.0+, 2.0 still valid from v2.1)",
|
||||
"enum": ["2.0", "3.0"]
|
||||
},
|
||||
"decisions": {
|
||||
"type": "array",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "metaagent/task-manifest/2.0.0",
|
||||
"$id": "metaagent/task-manifest/3.0.0",
|
||||
"title": "MetaAgent Task Manifest",
|
||||
"description": "Schema for .agent/tasks/manifest.json — the global task manifest",
|
||||
"type": "object",
|
||||
@@ -8,7 +8,7 @@
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "Schema version",
|
||||
"enum": ["2.0"]
|
||||
"enum": ["3.0"]
|
||||
},
|
||||
"session_id": {
|
||||
"type": "string",
|
||||
@@ -31,8 +31,8 @@
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^T[0-9]+$",
|
||||
"description": "Unique task identifier (T1, T2, ...)"
|
||||
"pattern": "^(T[0-9]+|T-INV-[0-9]+)$",
|
||||
"description": "Unique task identifier (T1, T2, ... or T-INV-N for invariants)"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
@@ -47,6 +47,10 @@
|
||||
"enum": ["feature", "refactor", "test", "fix", "config", "design", "docs", "invariant"],
|
||||
"description": "Task type"
|
||||
},
|
||||
"origin": {
|
||||
"type": "string",
|
||||
"description": "Task source (roadmap:file, adr:NNN, user:direct, agent:analysis, decomposition, invariant:NNN, risk:R-NNN)"
|
||||
},
|
||||
"files": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
|
||||
@@ -2,33 +2,49 @@
|
||||
|
||||
**Session:** {{ session_id }}
|
||||
**Target:** {{ target_repo }}
|
||||
**Depth:** {{ depth }}
|
||||
**MetaAgent version:** {{ version }}
|
||||
**Date:** {{ date }}
|
||||
|
||||
## Configuration
|
||||
|
||||
| Функция | Статус |
|
||||
|---|---|
|
||||
| ADR | {{ adr_enabled }} |
|
||||
| Alternative Architecture | {{ alt_arch_enabled }} |
|
||||
| Red Team | {{ red_team_enabled }} |
|
||||
| Risk Register | {{ risk_register_enabled }} |
|
||||
| Invariant Tests | {{ invariant_tests_enabled }} |
|
||||
|
||||
## Phase Status
|
||||
|
||||
| Phase | Status |
|
||||
|---|---|
|
||||
| ANALYSIS | {{ analysis_status }} |
|
||||
| INIT | {{ init_status }} |
|
||||
| ANALYSE | {{ analyse_status }} |
|
||||
| ROADMAP | {{ roadmap_status }} |
|
||||
| DESIGN | {{ design_status }} |
|
||||
| RED_TEAM | {{ red_team_status }} |
|
||||
| DECOMPOSITION | {{ decomposition_status }} |
|
||||
| SETUP | {{ setup_status }} |
|
||||
| EXECUTION | {{ execution_status }} |
|
||||
| METASTATE | {{ metastate_status }} |
|
||||
| HANDOFF | {{ handoff_status }} |
|
||||
|
||||
## Tasks
|
||||
|
||||
| Status | Count |
|
||||
|---|---|
|
||||
| Total | {{ total }} |
|
||||
| Pending | {{ pending }} |
|
||||
| In Progress | {{ in_progress }} |
|
||||
| Completed | {{ completed }} |
|
||||
| Archived | {{ archived }} |
|
||||
| Failed/Skipped | {{ failed }} |
|
||||
|
||||
**By origin:**
|
||||
- user:direct: {{ user_direct_count }}
|
||||
- roadmap: {{ roadmap_count }}
|
||||
- adr: {{ adr_count }}
|
||||
- decomposition: {{ decomposition_count }}
|
||||
- (другое): {{ other_count }}
|
||||
|
||||
## Commands Invoked (если были)
|
||||
|
||||
{{ commands_invoked_list }}
|
||||
|
||||
## Quick Links
|
||||
|
||||
- Task Manifest: `.agent/tasks/manifest.json`
|
||||
- Handoff Summary: `.agent/handoff-summary.md`
|
||||
- Design Report: `.agent/context/design-report.md`
|
||||
- ADR: `.agent/decisions/` (если есть)
|
||||
- Project State: `.agent/context/project-state.md`
|
||||
- ADR: `.agent/decisions/`
|
||||
- Risk Register: `.agent/context/risk-register.md`
|
||||
- Red Team Report: `.agent/context/red-team-report.md`
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"$schema": ".agent/src/TEMPLATES/schemas/task-manifest-schema.json",
|
||||
"version": "1.0",
|
||||
"version": "3.0",
|
||||
"session_id": "{{ session_id }}",
|
||||
"goal": "{{ goal }}",
|
||||
"created_at": "{{ timestamp }}",
|
||||
@@ -9,7 +9,8 @@
|
||||
"id": "T1",
|
||||
"title": "{{ task_title }}",
|
||||
"description": "{{ task_description }}",
|
||||
"type": "feature|refactor|test|fix|config|docs",
|
||||
"type": "feature|refactor|test|fix|config|design|docs|invariant",
|
||||
"origin": "user:direct",
|
||||
"files": ["path/to/file1.py", "path/to/file2.py"],
|
||||
"depends_on": [],
|
||||
"acceptance_criteria": [
|
||||
|
||||
Reference in new issue
Block a user