Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions coordination/PROJECT_CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@

## Где закончили

**2026-08-19 (Arena.ai, отчёт «по-человечески»):** кнопка «Трейдинг» теперь
выдаёт отчёт на языке обывателя: «Главное за 30 секунд», «Что это» к каждому
портфелю, человеческие названия причин сделок, блок «Простыми словами» и
словарик; LLM-аналитика переведена на тот же язык (жаргон с пояснениями,
дисклеймер о виртуальных деньгах). Отправлен владельцу в TG (3 сообщения).
Коммит `216f5dd1`, ветка `agent/20260819-human-report`.
Журнал: `coordination/sessions/20260819T010000Z-aios-arena-tg-trading-report.md`.

## Где закончили

**2026-08-19 (Arena.ai, кнопка «Трейдинг» — детальный отчёт):** tg_bot/trading_report.py —
полный снапшот всех портфелей (A/B с trade_log, DCA VA+control, корзина
vol-targeting, T2 5 ног + портфель, freqtrade dry, MM/ws/очередь, scoreboard,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,16 @@ claim: "coordination/claims/tg-trading-report--20260819T010000Z-aios-arena.md (

- [PASS] pytest tests/test_trading_report.py 7/7; живой LLM-вызов.
- [PASS] полный pytest: единственный провал — stale inventory (перегенерирован).

## Дополнение (2026-08-19, человеческий отчёт)

- По запросу владельца отчёт переписан «по-человечески»: блок «Главное за 30
секунд», к каждому контуру — «Что это» простыми словами, сделки с переводом
причин выходов (stop_loss -> «защитный стоп»), вердикты обывателю, блок
«Простыми словами» и словарик терминов.
- LLM-промпт переписан на язык для человека без финансового образования
(жаргон с пояснениями в скобках, структура «Главное / Что с портфелями /
Чего ждать» с вероятностями, обязательный дисклеймер о виртуальных деньгах).
- Отчёт отправлен владельцу в TG (3 сообщения: 2 данных + LLM-аналитика).
- Бот перезапущен; тесты test_trading_report.py 8/8; полный pytest зелёный
(кроме регенерируемого inventory).
14 changes: 7 additions & 7 deletions docs/PROJECT_INVENTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
|---|---:|
| Package version | `19.9.0` |
| Стабильных tracked-файлов | 6,371 |
| Строк | 612,727 |
| Размер | 24.99 MiB |
| Строк | 612,823 |
| Размер | 25.00 MiB |
| Python-файлов | 3,525 |
| Строк Python | 362,433 |
| Классов / функций / async | 2,988 / 20,008 / 1,636 |
| Строк Python | 362,529 |
| Классов / функций / async | 2,988 / 20,010 / 1,636 |
| Python syntax errors | 0 |
| Test Python files / test functions | 972 / 6,728 |
| Test Python files / test functions | 972 / 6,729 |
| Markdown-файлов | 2,046 |
| Root `run_*.py` | 113 |
| Уникальных tracked service/timer names | 210 |
Expand All @@ -27,12 +27,12 @@
| `aios_core` | 971 | 158,144 | 5.92 MiB |
| `skills` | 2,641 | 109,481 | 4.73 MiB |
| `docs` | 477 | 76,067 | 3.27 MiB |
| `tests` | 554 | 71,349 | 2.48 MiB |
| `tests` | 554 | 71,360 | 2.48 MiB |
| `[root]` | 217 | 35,241 | 1.39 MiB |
| `scripts` | 281 | 33,845 | 1.28 MiB |
| `attic` | 33 | 30,669 | 1.61 MiB |
| `octopus_services` | 110 | 27,850 | 0.90 MiB |
| `tg_bot` | 34 | 12,812 | 0.65 MiB |
| `tg_bot` | 34 | 12,897 | 0.65 MiB |
| `deploy` | 252 | 6,385 | 0.18 MiB |
| `octopus_instructions` | 102 | 5,959 | 0.50 MiB |
| `octopus_roadmap` | 13 | 4,741 | 0.22 MiB |
Expand Down
25 changes: 18 additions & 7 deletions tests/test_trading_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,25 @@ def test_format_report_covers_all_sections():
snap = _snapshot()
chunks = format_report(snap)
text = "\n".join(chunks)
assert "Directional v2" in text and "main" in text and "control" in text
assert "DCA" in text and "va" in text and "dca" in text
assert "Корзина топ-10" in text and "inverse_vol_30d" in text
assert "T2 momentum" in text and "CASH" in text
# человеческие маркеры: главное, объяснения, словарик
assert "Главное за 30 секунд" in text
assert "Что это" in text
assert "Робот А" in text and "Робот Б" in text
assert "Автокопилка" in text and "Корзина топ-10" in text
assert "Моментум-роботы" in text and "вне рынка (кэш)" in text
assert "freqtrade" in text and "BTC/USDT" in text
assert "ws-снапшотов" in text and "5,816,805" in text
assert "Scoreboard 2026-08" in text and "top10_basket" in text
assert "⚠️ aios-freqtrade-t2-dry" in text
assert "снимков" in text and "5,816,805" in text
assert "Кто лучший по тесту" in text and "корзина топ-10" in text
assert "Словарик" in text
assert "Простыми словами" in text
assert "⚠️ лежит: aios-freqtrade-t2-dry" in text


def test_format_report_human_verdict_names_winner():
snap = _snapshot()
text = "\n".join(format_report(snap))
# победитель переведён на человеческий язык
assert "Победитель: <b>корзина топ-10</b>" in text


def test_format_report_no_crash_on_empty():
Expand Down
Loading
Loading