Skip to content

An always-on second brain you talk to. Voice notes in Telegram → typed, linked knowledge in your Obsidian vault. Runs 24/7 on the Claude subscription you already have.

Initial release: Agent Second Brain v1.0.0

smixs9262e4880679
diff --git a/.env.example b/.env.example
new file mode 100644
index 0000000..7366f78
--- /dev/null
+++ b/.env.example
@@ -0,0 +1,14 @@
+# Telegram Bot API token from @BotFather
+TELEGRAM_BOT_TOKEN=
+
+# Deepgram API key for voice transcription
+DEEPGRAM_API_KEY=
+
+# Todoist API key for task management
+TODOIST_API_KEY=
+
+# Path to Obsidian vault directory
+VAULT_PATH=./vault
+
+# JSON array of Telegram user IDs allowed to use the bot (empty = allow all)
+ALLOWED_USER_IDS=[123456789]
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..00e537f
--- /dev/null
+++ b/README.md
@@ -0,0 +1,494 @@
+# Agent Second Brain
+
+**Голосовой личный ассистент в Telegram с интеграцией Obsidian и Todoist**
+
+Записываешь голосовые → бот транскрибирует → сохраняет в Obsidian → создаёт задачи в Todoist → присылает отчёты.
+
+---
+
+## Что умеет бот
+
+| Функция | Описание |
+|---------|----------|
+| 🎤 Голосовые | Транскрибирует через Deepgram (русский язык) |
+| 💬 Текст | Сохраняет как есть |
+| 📷 Фото | Сохраняет с подписью |
+| ⚙️ Обработка | Классифицирует записи, создаёт задачи, сохраняет мысли |
+| 📅 Недельный дайджест | Анализирует неделю, показывает прогресс по целям |
+| ✨ Произвольные запросы | "Перенеси задачи", "Покажи на сегодня" |
+
+### Интерфейс
+
+```
+┌──────────────────────────────────────┐
+│ 🎤 [Голосовое сообщение] │
+│ │
+│ ✓ Сохранено: 14:30 [voice] │
+│ "Надо обсудить проект с командой" │
+├──────────────────────────────────────┤
+│ [📊 Статус] [⚙️ Обработать] [📅 Неделя] │
+│ [✨ Запрос] [❓ Помощь] │
+└──────────────────────────────────────┘
+```
+
+---
+
+## Требования
+
+- Компьютер с VS Code и Git
+- VPS с Ubuntu 22.04+ (минимум 1GB RAM)
+- Аккаунты: Telegram, Deepgram (бесплатно $200), Anthropic (Claude)
+- Опционально: Todoist
+
+---
+
+# Часть 1: Подготовка на компьютере
+
+Сначала настраиваем проект локально, потом переносим на сервер.
+
+## Шаг 1: Установка Git и VS Code
+
+### Windows
+
+1. Скачайте [Git для Windows](https://git-scm.com/download/win)
+2. Установите, оставив все настройки по умолчанию
+3. Скачайте [VS Code](https://code.visualstudio.com/)
+4. Установите
+
+### Mac
+
+1. Откройте Terminal (Cmd+Пробел → "Terminal")
+2. Введите `git --version` — если не установлен, система предложит установить
+3. Скачайте [VS Code](https://code.visualstudio.com/)
+
+### Linux
+
+```bash
+sudo apt install git
+# VS Code: https://code.visualstudio.com/
+```
+
+---
+
+## Шаг 2: Клонирование проекта
+
+1. Откройте VS Code
+2. Нажмите `Ctrl+Shift+P` (Windows/Linux) или `Cmd+Shift+P` (Mac)
+3. Введите "Git: Clone"
+4. Вставьте URL: `https://github.com/smixs/dbrain.git`
+5. Выберите папку, куда сохранить (например, Documents)
+6. Нажмите "Open" когда спросит
+
+Теперь у вас открыт проект в VS Code.
+
+---
+
+## Шаг 3: Очистка чужих данных
+
+В левой панели VS Code найдите и **удалите** содержимое этих папок:
+
+```
+vault/daily/ ← удалить все файлы внутри
+vault/thoughts/ideas/ ← удалить все файлы
+vault/thoughts/projects/
+vault/thoughts/learnings/
+vault/thoughts/reflections/
+vault/summaries/ ← удалить все файлы
+vault/attachments/ ← удалить все папки внутри
+```
+
+**Как удалить:** правый клик на файл → Delete
+
+---
+
+## Шаг 4: Заполнение целей (с AI-помощником)
+
+Это самый важный шаг! Бот будет использовать ваши цели для приоритизации задач.
+
+### Вариант A: С помощью ChatGPT/Claude
+
+1. Откройте ChatGPT или Claude в браузере
+2. Скопируйте туда содержимое файла `vault/goals/0-vision-3y.md`
+3. Напишите:
+
+```
+Ты мой личный коуч. Помоги мне заполнить этот шаблон 3-летнего видения.
+Задавай мне вопросы по одному, чтобы понять:
+- Где я хочу быть через 3 года в карьере?
+- Какое здоровье и энергия мне нужны?
+- Какие отношения я хочу?
+- Что для меня финансовая свобода?
+- Что приносит мне радость?
+
+После каждого моего ответа задавай уточняющие вопросы.
+В конце сформируй заполненный шаблон.
+```
+
+4. Ответьте на вопросы AI
+5. Скопируйте результат обратно в файл
+
+Повторите для:
+- `vault/goals/1-yearly-2026.md` — годовые цели
+- `vault/goals/2-monthly.md` — приоритеты на месяц
+- `vault/goals/3-weekly.md` — фокус на неделю
+
+### Вариант B: Самостоятельно
+
+Откройте каждый файл в VS Code и заполните своими целями.
+
+**Важно:** В файле `3-weekly.md` есть секция "ONE Big Thing" — это ваш главный фокус на неделю. Бот показывает его в каждом отчёте.
+
+---
+
+## Шаг 5: Настройка профиля
+
+Откройте файл:
+```
+vault/.claude/skills/dbrain-processor/references/about.md
+```
+
+Замените информацию на свою:
+- Имя
+- Чем занимаетесь
+- Основные проекты
+- Приоритеты
+
+Это поможет боту понимать контекст ваших записей.
+
+---
+
+## Шаг 6: Создание своего репозитория
+
+1. Зайдите на [GitHub](https://github.com)
+2. Войдите или создайте аккаунт
+3. Нажмите "+" → "New repository"
+4. Имя: `my-second-brain` (или любое)
+5. **Важно:** Оставьте все галочки пустыми (без README, без .gitignore)
+6. Нажмите "Create repository"
+7. Скопируйте URL вашего репозитория (например: `https://github.com/YOUR_NAME/my-second-brain.git`)
+
+---
+
+## Шаг 7: Публикация в свой репозиторий
+
+В VS Code:
+
+1. Откройте Terminal: меню View → Terminal (или `Ctrl+``)
+2. Введите команды:
+
+```bash
+git remote set-url origin https://github.com/YOUR_NAME/my-second-brain.git
+```
+
+3. В левой панели нажмите на иконку с веткой (Source Control)
+4. Вы увидите список изменённых файлов
+5. Нажмите "+" рядом с "Changes" чтобы добавить все файлы
+6. В поле "Message" напишите: `Initial setup with my goals`
+7. Нажмите кнопку "Commit"
+8. Нажмите "Sync Changes" или "Publish Branch"
+
+Если спросит логин — введите ваш GitHub логин и пароль (или Personal Access Token).
+
+**Готово!** Ваш проект с вашими целями теперь в вашем репозитории.
+
+---
+
+# Часть 2: Получение токенов
+
+Перед настройкой сервера получите все нужные токены.
+
+## Telegram Bot Token
+
+1. Откройте Telegram
+2. Найдите `@BotFather`
+3. Отправьте `/newbot`
+4. Введите имя бота: `My Second Brain`
+5. Введите username: `my_brain_bot` (должен заканчиваться на `bot`)
+6. Скопируйте токен:
+ ```
+ 7123456789:AAHdN8J2K4m5N6o7P8q9R0s1T2u3V4w5X6y
+ ```
+
+**Сохраните токен!**
+
+## Ваш Telegram ID
+
+1. Найдите `@userinfobot` в Telegram
+2. Отправьте любое сообщение
+3. Скопируйте ваш ID: `123456789`
+
+**Сохраните ID!**
+
+## Deepgram API Key
+
+1. Зайдите на [console.deepgram.com](https://console.deepgram.com/)
+2. Зарегистрируйтесь (бесплатно, $200 на старте)
+3. Settings → API Keys → Create API Key
+4. Скопируйте ключ (показывается один раз!)
+
+**Сохраните ключ!**
+
+## Todoist API Token (опционально)
+
+1. [todoist.com](https://todoist.com) → Settings → Integrations → Developer
+2. Скопируйте API token
+
+---
+
+# Часть 3: Настройка VPS
+
+Теперь переносим проект на сервер.
+
+## Шаг 1: Покупка VPS
+
+Рекомендую [Contabo](https://contabo.com) — дёшево и надёжно.
+
+- Выберите Cloud VPS
+- ОС: Ubuntu 22.04
+- Минимум: 1GB RAM (лучше 2GB)
+- Получите: IP адрес и пароль root
+
+## Шаг 2: Подключение к серверу
+
+**Windows:** Скачайте [PuTTY](https://www.putty.org/) или используйте Windows Terminal
+
+**Mac/Linux:** Откройте Terminal
+
+```bash
+ssh root@ВАШ_IP_АДРЕС
+```
+
+Введите пароль (символы не отображаются — это нормально).
+
+## Шаг 3: Создание пользователя
+
+```bash
+# Создаём пользователя
+adduser myuser
+
+# Даём права sudo
+usermod -aG sudo myuser
+
+# Переключаемся
+su - myuser
+```
+
+## Шаг 4: Установка всего необходимого
+
+Копируйте и вставляйте эти команды по одной:
+
+```bash
+# Обновление системы
+sudo apt update && sudo apt upgrade -y
+
+# Базовые инструменты
+sudo apt install -y git curl wget build-essential
+
+# Python 3.12
+sudo apt install -y software-properties-common
+sudo add-apt-repository -y ppa:deadsnakes/ppa
+sudo apt update
+sudo apt install -y python3.12 python3.12-venv python3.12-dev
+
+# uv (менеджер пакетов Python)
+curl -LsSf https://astral.sh/uv/install.sh | sh
+source ~/.bashrc
+
+# Node.js 20
+curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
+sudo apt install -y nodejs
+
+# Claude CLI
+npm install -g @anthropic-ai/claude-code
+
+# Авторизация Claude (следуйте инструкциям)
+claude auth login
+```
+
+## Шаг 5: Клонирование ВАШЕГО репозитория
+
+```bash
+cd ~
+mkdir -p projects
+cd projects
+
+# Замените URL на ваш репозиторий!
+git clone https://github.com/YOUR_NAME/my-second-brain.git dbrain
+cd dbrain
+
+# Установка зависимостей
+uv sync
+```
+
+## Шаг 6: Настройка .env
+
+```bash
+nano .env
+```
+
+Вставьте (замените на ваши токены):
+
+```bash
+TELEGRAM_BOT_TOKEN=7123456789:AAHxxxxxxxxxxxxxxxxxxxxxxxxxx
+DEEPGRAM_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+TODOIST_API_KEY=
+VAULT_PATH=./vault
+ALLOWED_USER_IDS=[123456789]
+```
+
+Сохраните: `Ctrl+O`, `Enter`, `Ctrl+X`
+
+## Шаг 7: Тестовый запуск
+
+```bash
+uv run python -m d_brain
+```
+
+Откройте Telegram, найдите вашего бота, отправьте `/start`.
+
+Если работает — `Ctrl+C` для остановки.
+
+## Шаг 8: Автозапуск
+
+```bash
+sudo nano /etc/systemd/system/d-brain-bot.service
+```
+
+Вставьте (замените `myuser`):
+
+```ini
+[Unit]
+Description=d-brain Telegram Bot
+After=network.target
+
+[Service]
+Type=simple
+User=myuser
+WorkingDirectory=/home/myuser/projects/dbrain
+ExecStart=/home/myuser/.local/bin/uv run python -m d_brain
+Restart=always
+RestartSec=10
+
+[Install]
+WantedBy=multi-user.target
+```
+
+```bash
+sudo systemctl daemon-reload
+sudo systemctl enable d-brain-bot
+sudo systemctl start d-brain-bot
+
+# Проверка
+sudo systemctl status d-brain-bot
+```
+
+---
+
+# Часть 4: Синхронизация с Obsidian
+
+## На компьютере
+
+Ваш репозиторий уже клонирован (из Части 1). Откройте папку `vault` как хранилище в Obsidian.
+
+## Автоматическая синхронизация
+
+Создайте скрипт для синхронизации каждый час:
+
+**Mac:** Создайте файл `~/sync-brain.sh`:
+
+```bash
+#!/bin/bash
+cd ~/Documents/my-second-brain # путь к вашему репозиторию
+git pull --rebase
+git add -A
+git commit -m "Auto-sync: $(date '+%Y-%m-%d %H:%M')" 2>/dev/null || true
+git push 2>/dev/null || true
+```
+
+```bash
+chmod +x ~/sync-brain.sh
+```
+
+Добавьте в cron:
+```bash
+crontab -e
+# Добавьте строку:
+0 * * * * ~/sync-brain.sh
+```
+
+**Windows:** Используйте Task Scheduler с аналогичным bat-файлом.
+
+---
+
+## Команды бота
+
+| Команда | Описание |
+|---------|----------|
+| `/start` | Начать работу |
+| `/status` | Сколько записей сегодня |
+| `/process` | Обработать записи |
+| `/weekly` | Недельный дайджест |
+| `/do [текст]` | Произвольный запрос |
+
+### Примеры /do
+
+```
+/do покажи задачи на сегодня
+/do перенеси просроченные на понедельник
+/do что я записывал вчера?
+```
+
+---
+
+## Полезные команды VPS
+
+```bash
+# Логи
+sudo journalctl -u d-brain-bot -f
+
+# Перезапуск
+sudo systemctl restart d-brain-bot
+
+# Обновление
+cd ~/projects/dbrain
+git pull
+uv sync
+sudo systemctl restart d-brain-bot
+```
+
+---
+
+## Решение проблем
+
+**Бот не отвечает:**
+```bash
+sudo systemctl status d-brain-bot
+sudo journalctl -u d-brain-bot -n 50
+```
+
+**Не транскрибирует:**
+Проверьте DEEPGRAM_API_KEY в .env
+
+**Ошибка Claude:**
+```bash
+claude auth status
+# Если не авторизован:
+claude auth login
+```
+
+---
+
+## FAQ
+
+**Можно без Todoist?** — Да, оставьте TODOIST_API_KEY пустым.
+
+**Можно без Obsidian?** — Да, файлы можно смотреть на GitHub или в любом редакторе.
+
+**Сколько стоит?**
+- Deepgram: бесплатно $200
+- Claude: ~$20/месяц при активном использовании
+- VPS: от $5/месяц
+
+---
+
+*Made with 🧠 for people who think out loud*
diff --git a/deploy/d-brain-bot.service b/deploy/d-brain-bot.service
new file mode 100644
index 0000000..81d8c3d
--- /dev/null
+++ b/deploy/d-brain-bot.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=d-brain Telegram Bot
+After=network.target
+
+[Service]
+Type=simple
+User=shima
+WorkingDirectory=/home/shima/projects/dbrain
+ExecStart=/home/shima/.local/bin/uv run python -m d_brain
+Restart=always
+RestartSec=10
+Environment=PYTHONUNBUFFERED=1
+
+[Install]
+WantedBy=multi-user.target
diff --git a/deploy/d-brain-process.service b/deploy/d-brain-process.service
new file mode 100644
index 0000000..5ba85d0
--- /dev/null
+++ b/deploy/d-brain-process.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=d-brain Daily Processing
+
+[Service]
+Type=oneshot
+User=shima
+WorkingDirectory=/home/shima/projects/dbrain
+ExecStart=/home/shima/projects/dbrain/scripts/process.sh
+Environment=PYTHONUNBUFFERED=1
diff --git a/deploy/d-brain-process.timer b/deploy/d-brain-process.timer
new file mode 100644
index 0000000..8802982
--- /dev/null
+++ b/deploy/d-brain-process.timer
@@ -0,0 +1,9 @@
+[Unit]
+Description=Run d-brain processing daily at 21:00
+
+[Timer]
+OnCalendar=*-*-* 21:00:00
+Persistent=true
+
+[Install]
+WantedBy=timers.target
diff --git a/deploy/d-brain-weekly.service b/deploy/d-brain-weekly.service
new file mode 100644
index 0000000..83ac99c
--- /dev/null
+++ b/deploy/d-brain-weekly.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=d-brain Weekly Digest
+After=network.target
+
+[Service]
+Type=oneshot
+User=shima
+WorkingDirectory=/home/shima/projects/dbrain
+ExecStart=/home/shima/.local/bin/uv run python scripts/weekly.py
+EnvironmentFile=/home/shima/projects/dbrain/.env
+StandardOutput=journal
+StandardError=journal
diff --git a/deploy/d-brain-weekly.timer b/deploy/d-brain-weekly.timer
new file mode 100644
index 0000000..8b2c30f
--- /dev/null
+++ b/deploy/d-brain-weekly.timer
@@ -0,0 +1,9 @@
+[Unit]
+Description=Run d-brain weekly digest Friday morning
+
+[Timer]
+OnCalendar=Fri 06:00
+Persistent=true
+
+[Install]
+WantedBy=timers.target
diff --git a/mcp-config.json b/mcp-config.json
new file mode 100644
index 0000000..24fe555
--- /dev/null
+++ b/mcp-config.json
@@ -0,0 +1,9 @@
+{
+ "mcpServers": {
+ "todoist": {
+ "type": "stdio",
+ "command": "npx",
+ "args": ["-y", "@doist/todoist-ai"]
+ }
+ }
+}
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..0b92eeb
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,49 @@
+[project]
+name = "agent-second-brain"
+version = "1.0.0"
+description = "Voice-first personal assistant for Telegram with Obsidian and Todoist integration"
+readme = "README.md"
+authors = [
+ { name = "smixs", email = "[email protected]" }
+]
+requires-python = ">=3.12"
+dependencies = [
+ "aiogram>=3.0",
+ "deepgram-sdk",
+ "httpx",
+ "pydantic>=2.0",
+ "pydantic-settings",
+ "todoist-api-python>=3.1.0",
+]
+
+[project.optional-dependencies]
+dev = [
+ "pytest",
+ "pytest-asyncio",
+ "ruff",
+ "mypy",
+]
+
+[build-system]
+requires = ["uv_build>=0.9.7,<0.10.0"]
+build-backend = "uv_build"
+
+[tool.ruff]
+line-length = 88
+target-version = "py312"
+
+[tool.ruff.lint]
+select = ["E", "F", "I", "B", "UP"]
+
+[tool.mypy]
+python_version = "3.12"
+strict = true
+
+[tool.pytest.ini_options]
+asyncio_mode = "auto"
+
+[dependency-groups]
+dev = [
+ "pytest>=9.0.2",
+ "pytest-asyncio>=1.3.0",
+]
diff --git a/src/d_brain/__init__.py b/src/d_brain/__init__.py
new file mode 100644
index 0000000..2a373df
--- /dev/null
+++ b/src/d_brain/__init__.py
@@ -0,0 +1,3 @@
+"""d-brain: Voice-first system for capturing thoughts and tasks."""
+
+__version__ = "0.1.0"
diff --git a/src/d_brain/__main__.py b/src/d_brain/__main__.py
new file mode 100644
index 0000000..5fad375
--- /dev/null
+++ b/src/d_brain/__main__.py
@@ -0,0 +1,28 @@
+"""Entry point for running d-brain as a module."""
+
+import asyncio
+import logging
+
+logging.basicConfig(
+ level=logging.INFO,
+ format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
+)
+
+logger = logging.getLogger(__name__)
+
+
+async def main() -> None:
+ """Main entry point."""
+ from d_brain.bot.main import run_bot
+ from d_brain.config import get_settings
+
+ settings = get_settings()
+ logger.info("d-brain starting...")
+ logger.info("Vault path: %s", settings.vault_path)
+ logger.info("Allowed users: %s", settings.allowed_user_ids or "all")
+
+ await run_bot(settings)
+
+
+if __name__ == "__main__":
+ asyncio.run(main())
diff --git a/src/d_brain/bot/__init__.py b/src/d_brain/bot/__init__.py
new file mode 100644
index 0000000..068a8d9
--- /dev/null
+++ b/src/d_brain/bot/__init__.py
@@ -0,0 +1 @@
+"""Telegram bot module."""
diff --git a/src/d_brain/bot/formatters.py b/src/d_brain/bot/formatters.py
new file mode 100644
index 0000000..298d943
--- /dev/null
+++ b/src/d_brain/bot/formatters.py
@@ -0,0 +1,202 @@
+"""Report formatters for Telegram messages."""
+
+import html
+import re
+from typing import Any
+
+
+# Allowed HTML tags in Telegram
+ALLOWED_TAGS = {"b", "i", "code", "pre", "a", "s", "u"}
+
+
+def sanitize_telegram_html(text: str) -> str:
+ """Sanitize HTML for Telegram, keeping only allowed tags.
+
+ Telegram supports: <b>, <i>, <code>, <pre>, <a>, <s>, <u>
+
+ Args:
+ text: Raw HTML text from Claude
+
+ Returns:
+ Sanitized HTML safe for Telegram
+ """
+ if not text:
+ return ""
+
+ # First, escape any raw < > that are not part of tags
+ # This regex matches < or > not followed/preceded by tag patterns
+ result = []
+ i = 0
+ while i < len(text):
+ if text[i] == "<":
+ # Check if this looks like a valid tag
+ tag_match = re.match(r"</?([a-zA-Z]+)(?:\s[^>]*)?>", text[i:])
+ if tag_match:
+ tag_name = tag_match.group(1).lower()
+ if tag_name in ALLOWED_TAGS:
+ # Keep the allowed tag
+ result.append(tag_match.group(0))
+ i += len(tag_match.group(0))
+ continue
+ else:
+ # Escape disallowed tag
+ result.append("&lt;")
+ i += 1
+ continue
+ else:
+ # Not a valid tag pattern, escape
+ result.append("&lt;")
+ i += 1
+ continue
+ elif text[i] == ">":
+ # Standalone > should be escaped
+ result.append("&gt;")
+ i += 1
+ elif text[i] == "&":
+ # Check if already escaped
+ entity_match = re.match(r"&(amp|lt|gt|quot|#\d+|#x[0-9a-fA-F]+);", text[i:])
+ if entity_match:
+ result.append(entity_match.group(0))
+ i += len(entity_match.group(0))
+ else:
+ result.append("&amp;")
+ i += 1
+ else:
+ result.append(text[i])
+ i += 1
+
+ return "".join(result)
+
+
+def validate_telegram_html(text: str) -> bool:
+ """Validate that HTML tags are properly closed.
+
+ Args:
+ text: HTML text to validate
+
+ Returns:
+ True if valid, False otherwise
+ """
+ tag_stack = []
+ tag_pattern = re.compile(r"<(/?)([a-zA-Z]+)(?:\s[^>]*)?>")
+
+ for match in tag_pattern.finditer(text):
+ is_closing = match.group(1) == "/"
+ tag_name = match.group(2).lower()
+
+ if tag_name not in ALLOWED_TAGS:
+ continue
+
+ if is_closing:
+ if not tag_stack or tag_stack[-1] != tag_name:
+ return False
+ tag_stack.pop()
+ else:
+ tag_stack.append(tag_name)
+
+ return len(tag_stack) == 0
+
+
+def truncate_html(text: str, max_length: int = 4096) -> str:
+ """Truncate HTML text while keeping tags balanced.
+
+ Args:
+ text: HTML text
+ max_length: Maximum length (Telegram limit is 4096)
+
+ Returns:
+ Truncated text with balanced tags
+ """
+ if len(text) <= max_length:
+ return text
+
+ # Find a safe cut point
+ cut_point = max_length - 50 # Leave room for closing tags and ellipsis
+
+ # Don't cut in the middle of a tag
+ last_open = text.rfind("<", 0, cut_point)
+ last_close = text.rfind(">", 0, cut_point)
+
+ if last_open > last_close:
+ # We're in the middle of a tag, cut before it
+ cut_point = last_open
+
+ truncated = text[:cut_point]
+
+ # Close any open tags
+ tag_pattern = re.compile(r"<(/?)([a-zA-Z]+)(?:\s[^>]*)?>")
+ open_tags = []
+
+ for match in tag_pattern.finditer(truncated):
+ is_closing = match.group(1) == "/"
+ tag_name = match.group(2).lower()
+
+ if tag_name not in ALLOWED_TAGS:
+ continue
+
+ if is_closing and open_tags and open_tags[-1] == tag_name:
+ open_tags.pop()
+ elif not is_closing:
+ open_tags.append(tag_name)
+
+ # Add closing tags in reverse order
+ closing_tags = "".join(f"</{tag}>" for tag in reversed(open_tags))
+
+ return truncated + "..." + closing_tags
+
+
+def format_process_report(report: dict[str, Any]) -> str:
+ """Format processing report for Telegram HTML.
+
+ The report from Claude is expected to be in HTML format.
+ We sanitize it to ensure only Telegram-safe tags are used.
+
+ Args:
+ report: Processing report from ClaudeProcessor
+
+ Returns:
+ Formatted HTML message for Telegram
+ """
+ if "error" in report:
+ error_msg = html.escape(str(report["error"]))
+ return f"❌ <b>Ошибка:</b> {error_msg}"
+
+ if "report" in report:
+ raw_report = report["report"]
+
+ # Sanitize HTML, keeping allowed tags
+ sanitized = sanitize_telegram_html(raw_report)
+
+ # Validate tag balance
+ if not validate_telegram_html(sanitized):
+ # Fall back to plain text if tags are broken
+ return html.escape(raw_report)
+
+ # Truncate if too long
+ return truncate_html(sanitized, max_length=4096)
+
+ return "✅ <b>Обработка завершена</b>"
+
+
+def format_error(error: str) -> str:
+ """Format error message for Telegram.
+
+ Args:
+ error: Error message
+
+ Returns:
+ Formatted HTML error message
+ """
+ return f"❌ <b>Ошибка:</b> {html.escape(error)}"
+
+
+def format_empty_daily() -> str:
+ """Format message for empty daily file.
+
+ Returns:
+ Formatted HTML message
+ """
+ return (
+ "📭 <b>Нет записей для обработки</b>\n\n"
+ "<i>Добавьте голосовые сообщения или текст в течение дня</i>"
+ )
diff --git a/src/d_brain/bot/handlers/__init__.py b/src/d_brain/bot/handlers/__init__.py
new file mode 100644
index 0000000..334ef9c
--- /dev/null
+++ b/src/d_brain/bot/handlers/__init__.py
@@ -0,0 +1,25 @@
+"""Bot message handlers."""
+
+from d_brain.bot.handlers import (
+ buttons,
+ commands,
+ do,
+ forward,
+ photo,
+ process,
+ text,
+ voice,
+ weekly,
+)
+
+__all__ = [
+ "buttons",
+ "commands",
+ "do",
+ "forward",
+ "photo",
+ "process",
+ "text",
+ "voice",
+ "weekly",
+]
diff --git a/src/d_brain/bot/handlers/buttons.py b/src/d_brain/bot/handlers/buttons.py
new file mode 100644
index 0000000..7106a45
--- /dev/null
+++ b/src/d_brain/bot/handlers/buttons.py
@@ -0,0 +1,51 @@
+"""Button handlers for reply keyboard."""
+
+from aiogram import F, Router
+from aiogram.fsm.context import FSMContext
+from aiogram.types import Message
+
+from d_brain.bot.states import DoCommandState
+
+router = Router(name="buttons")
+
+
[email protected](F.text == "📊 Статус")
+async def btn_status(message: Message) -> None:
+ """Handle Status button."""
+ from d_brain.bot.handlers.commands import cmd_status
+
+ await cmd_status(message)
+
+
[email protected](F.text == "⚙️ Обработать")
+async def btn_process(message: Message) -> None:
+ """Handle Process button."""
+ from d_brain.bot.handlers.process import cmd_process
+
+ await cmd_process(message)
+
+
[email protected](F.text == "📅 Неделя")
+async def btn_weekly(message: Message) -> None:
+ """Handle Weekly button."""
+ from d_brain.bot.handlers.weekly import cmd_weekly
+
+ await cmd_weekly(message)
+
+
[email protected](F.text == "✨ Запрос")
+async def btn_do(message: Message, state: FSMContext) -> None:
+ """Handle Do button - set state and wait for input."""
+ await state.set_state(DoCommandState.waiting_for_input)
+ await message.answer(
+ "🎯 <b>Что сделать?</b>\n\n"
+ "Отправь голосовое или текстовое сообщение с запросом."
+ )
+
+
[email protected](F.text == "❓ Помощь")
+async def btn_help(message: Message) -> None:
+ """Handle Help button."""
+ from d_brain.bot.handlers.commands import cmd_help
+
+ await cmd_help(message)
diff --git a/src/d_brain/bot/handlers/commands.py b/src/d_brain/bot/handlers/commands.py
new file mode 100644
index 0000000..0059775
--- /dev/null
+++ b/src/d_brain/bot/handlers/commands.py
@@ -0,0 +1,87 @@
+"""Command handlers for /start, /help, /status."""
+
+from datetime import date
+
+from aiogram import Router
+from aiogram.filters import Command
+from aiogram.types import Message
+
+from d_brain.bot.keyboards import get_main_keyboard
+from d_brain.config import get_settings
+from d_brain.services.storage import VaultStorage
+
+router = Router(name="commands")
+
+
[email protected](Command("start"))
+async def cmd_start(message: Message) -> None:
+ """Handle /start command."""
+ await message.answer(
+ "<b>d-brain</b> - твой голосовой дневник\n\n"
+ "Отправляй мне:\n"
+ "🎤 Голосовые сообщения\n"
+ "💬 Текст\n"
+ "📷 Фото\n"
+ "↩️ Пересланные сообщения\n\n"
+ "Всё будет сохранено и обработано.\n\n"
+ "<b>Команды:</b>\n"
+ "/status - статус сегодняшнего дня\n"
+ "/process - обработать записи\n"
+ "/do - выполнить произвольный запрос\n"
+ "/weekly - недельный дайджест\n"
+ "/help - справка",
+ reply_markup=get_main_keyboard(),
+ )
+
+
[email protected](Command("help"))
+async def cmd_help(message: Message) -> None:
+ """Handle /help command."""
+ await message.answer(
+ "<b>Как использовать d-brain:</b>\n\n"
+ "1. Отправь голосовое — я транскрибирую и сохраню\n"
+ "2. Отправь текст — сохраню как есть\n"
+ "3. Отправь фото — сохраню в attachments\n"
+ "4. Перешли сообщение — сохраню с источником\n\n"
+ "Вечером используй /process для обработки:\n"
+ "Мысли → Obsidian, Задачи → Todoist\n\n"
+ "<b>Команды:</b>\n"
+ "/status - сколько записей сегодня\n"
+ "/process - обработать записи\n"
+ "/do - выполнить произвольный запрос\n"
+ "/weekly - недельный дайджест\n\n"
+ "<i>Пример: /do перенеси просроченные задачи на понедельник</i>"
+ )
+
+
[email protected](Command("status"))
+async def cmd_status(message: Message) -> None:
+ """Handle /status command."""
+ settings = get_settings()
+ storage = VaultStorage(settings.vault_path)
+
+ today = date.today()
+ content = storage.read_daily(today)
+
+ if not content:
+ await message.answer(f"📅 <b>{today}</b>\n\nЗаписей пока нет.")
+ return
+
+ lines = content.strip().split("\n")
+ entries = [line for line in lines if line.startswith("## ")]
+
+ voice_count = sum(1 for e in entries if "[voice]" in e)
+ text_count = sum(1 for e in entries if "[text]" in e)
+ photo_count = sum(1 for e in entries if "[photo]" in e)
+ forward_count = sum(1 for e in entries if "[forward from:" in e)
+
+ total = len(entries)
+
+ await message.answer(
+ f"📅 <b>{today}</b>\n\n"
+ f"Всего записей: <b>{total}</b>\n"
+ f"- 🎤 Голосовых: {voice_count}\n"
+ f"- 💬 Текстовых: {text_count}\n"
+ f"- 📷 Фото: {photo_count}\n"
+ f"- ↩️ Пересланных: {forward_count}"
+ )
diff --git a/src/d_brain/bot/handlers/do.py b/src/d_brain/bot/handlers/do.py
new file mode 100644
index 0000000..3093639
--- /dev/null
+++ b/src/d_brain/bot/handlers/do.py
@@ -0,0 +1,119 @@
+"""Handler for /do command - arbitrary Claude requests."""
+
+import asyncio
+import logging
+
+from aiogram import Bot, Router
+from aiogram.filters import Command, CommandObject
+from aiogram.fsm.context import FSMContext
+from aiogram.types import Message
+
+from d_brain.bot.formatters import format_process_report
+from d_brain.bot.states import DoCommandState
+from d_brain.config import get_settings
+from d_brain.services.processor import ClaudeProcessor
+from d_brain.services.transcription import DeepgramTranscriber
+
+router = Router(name="do")
+logger = logging.getLogger(__name__)
+
+
[email protected](Command("do"))
+async def cmd_do(message: Message, command: CommandObject, state: FSMContext) -> None:
+ """Handle /do command."""
+ # Check for inline text: /do move overdue tasks
+ if command.args:
+ await process_request(message, command.args)
+ return
+
+ # Otherwise, wait for next message
+ await state.set_state(DoCommandState.waiting_for_input)
+ await message.answer(
+ "🎯 <b>Что сделать?</b>\n\n"
+ "Отправь голосовое или текстовое сообщение с запросом."
+ )
+
+
[email protected](DoCommandState.waiting_for_input)
+async def handle_do_input(message: Message, bot: Bot, state: FSMContext) -> None:
+ """Handle voice/text input after /do command."""
+ await state.clear() # Clear state immediately
+
+ prompt = None
+
+ # Handle voice input
+ if message.voice:
+ await message.chat.do(action="typing")
+ settings = get_settings()
+ transcriber = DeepgramTranscriber(settings.deepgram_api_key)
+
+ try:
+ file = await bot.get_file(message.voice.file_id)
+ if not file.file_path:
+ await message.answer("❌ Не удалось скачать голосовое")
+ return
+
+ file_bytes = await bot.download_file(file.file_path)
+ if not file_bytes:
+ await message.answer("❌ Не удалось скачать голосовое")
+ return
+
+ audio_bytes = file_bytes.read()
+ prompt = await transcriber.transcribe(audio_bytes)
+ except Exception as e:
+ logger.exception("Failed to transcribe voice for /do")
+ await message.answer(f"❌ Не удалось транскрибировать: {e}")
+ return
+
+ if not prompt:
+ await message.answer("❌ Не удалось распознать речь")
+ return
+
+ # Echo transcription to user
+ await message.answer(f"🎤 <i>{prompt}</i>")
+
+ # Handle text input
+ elif message.text:
+ prompt = message.text
+
+ else:
+ await message.answer("❌ Отправь текст или голосовое сообщение")
+ return
+
+ await process_request(message, prompt)
+
+
+async def process_request(message: Message, prompt: str) -> None:
+ """Process the user's request with Claude."""
+ status_msg = await message.answer("⏳ Выполняю...")
+
+ settings = get_settings()
+ processor = ClaudeProcessor(settings.vault_path, settings.todoist_api_key)
+
+ async def run_with_progress() -> dict:
+ task = asyncio.create_task(
+ asyncio.to_thread(processor.execute_prompt, prompt)
+ )
+
+ elapsed = 0
+ while not task.done():
+ await asyncio.sleep(30)
+ elapsed += 30
+ if not task.done():
+ try:
+ await status_msg.edit_text(
+ f"⏳ Выполняю... ({elapsed // 60}m {elapsed % 60}s)"
+ )
+ except Exception:
+ pass
+
+ return await task
+
+ report = await run_with_progress()
+
+ formatted = format_process_report(report)
+ try:
+ await status_msg.edit_text(formatted)
+ except Exception:
+ # Fallback: send without HTML parsing
+ await status_msg.edit_text(formatted, parse_mode=None)
diff --git a/src/d_brain/bot/handlers/forward.py b/src/d_brain/bot/handlers/forward.py
new file mode 100644
index 0000000..6f73c56
--- /dev/null
+++ b/src/d_brain/bot/handlers/forward.py
@@ -0,0 +1,47 @@
+"""Forwarded message handler."""
+
+import logging
+from datetime import datetime
+
+from aiogram import Router
+from aiogram.types import Message
+
+from d_brain.config import get_settings
+from d_brain.services.storage import VaultStorage
+
+router = Router(name="forward")
+logger = logging.getLogger(__name__)
+
+
[email protected](lambda m: m.forward_origin is not None)
+async def handle_forward(message: Message) -> None:
+ """Handle forwarded messages."""
+ if not message.from_user:
+ return
+
+ settings = get_settings()
+ storage = VaultStorage(settings.vault_path)
+
+ # Determine source name
+ source_name = "Unknown"
+ origin = message.forward_origin
+
+ if hasattr(origin, "sender_user") and origin.sender_user:
+ user = origin.sender_user
+ source_name = user.full_name
+ elif hasattr(origin, "sender_user_name") and origin.sender_user_name:
+ source_name = origin.sender_user_name
+ elif hasattr(origin, "chat") and origin.chat:
+ chat = origin.chat
+ source_name = f"@{chat.username}" if chat.username else chat.title or "Channel"
+ elif hasattr(origin, "sender_name") and origin.sender_name:
+ source_name = origin.sender_name
+
+ content = message.text or message.caption or "[media]"
+ msg_type = f"[forward from: {source_name}]"
+
+ timestamp = datetime.fromtimestamp(message.date.timestamp())
+ storage.append_to_daily(content, timestamp, msg_type)
+
+ await message.answer(f"✓ Сохранено (от {source_name})")
+ logger.info("Forwarded message saved from: %s", source_name)
diff --git a/src/d_brain/bot/handlers/photo.py b/src/d_brain/bot/handlers/photo.py
new file mode 100644
index 0000000..4cf6aa4
--- /dev/null
+++ b/src/d_brain/bot/handlers/photo.py
@@ -0,0 +1,67 @@
+"""Photo message handler."""
+
+import logging
+from datetime import datetime
+
+from aiogram import Bot, Router
+from aiogram.types import Message
+
+from d_brain.config import get_settings
+from d_brain.services.storage import VaultStorage
+
+router = Router(name="photo")
+logger = logging.getLogger(__name__)
+
+
[email protected](lambda m: m.photo is not None)
+async def handle_photo(message: Message, bot: Bot) -> None:
+ """Handle photo messages."""
+ if not message.photo or not message.from_user:
+ return
+
+ settings = get_settings()
+ storage = VaultStorage(settings.vault_path)
+
+ # Get largest photo
+ photo = message.photo[-1]
+
+ try:
+ file = await bot.get_file(photo.file_id)
+ if not file.file_path:
+ await message.answer("Failed to download photo")
+ return
+
+ file_bytes = await bot.download_file(file.file_path)
+ if not file_bytes:
+ await message.answer("Failed to download photo")
+ return
+
+ timestamp = datetime.fromtimestamp(message.date.timestamp())
+ photo_bytes = file_bytes.read()
+
+ # Determine extension from file path
+ extension = "jpg"
+ if file.file_path and "." in file.file_path:
+ extension = file.file_path.rsplit(".", 1)[-1]
+
+ # Save photo and get relative path
+ relative_path = storage.save_attachment(
+ photo_bytes,
+ timestamp.date(),
+ timestamp,
+ extension,
+ )
+
+ # Create content with Obsidian embed
+ content = f"![[{relative_path}]]"
+ if message.caption:
+ content += f"\n\n{message.caption}"
+
+ storage.append_to_daily(content, timestamp, "[photo]")
+
+ await message.answer("📷 ✓ Сохранено")
+ logger.info("Photo saved: %s", relative_path)
+
+ except Exception as e:
+ logger.exception("Error processing photo")
+ await message.answer(f"Error: {e}")
diff --git a/src/d_brain/bot/handlers/process.py b/src/d_brain/bot/handlers/process.py
new file mode 100644
index 0000000..d3d12cc
--- /dev/null
+++ b/src/d_brain/bot/handlers/process.py
@@ -0,0 +1,65 @@
+"""Process command handler."""
+
+import asyncio
+import logging
+from datetime import date
+
+from aiogram import Router
+from aiogram.filters import Command
+from aiogram.types import Message
+
+from d_brain.bot.formatters import format_process_report
+from d_brain.config import get_settings
+from d_brain.services.git import VaultGit
+from d_brain.services.processor import ClaudeProcessor
+
+router = Router(name="process")
+logger = logging.getLogger(__name__)
+
+
[email protected](Command("process"))
+async def cmd_process(message: Message) -> None:
+ """Handle /process command - trigger Claude processing."""
+ user_id = message.from_user.id if message.from_user else "unknown"
+ logger.info("Process command triggered by user %s", user_id)
+
+ status_msg = await message.answer("⏳ Processing... (may take up to 10 min)")
+
+ settings = get_settings()
+ processor = ClaudeProcessor(settings.vault_path, settings.todoist_api_key)
+ git = VaultGit(settings.vault_path)
+
+ # Run subprocess in thread to avoid blocking event loop
+ async def process_with_progress() -> dict:
+ task = asyncio.create_task(
+ asyncio.to_thread(processor.process_daily, date.today())
+ )
+
+ elapsed = 0
+ while not task.done():
+ await asyncio.sleep(30)
+ elapsed += 30
+ if not task.done():
+ try:
+ await status_msg.edit_text(
+ f"⏳ Processing... ({elapsed // 60}m {elapsed % 60}s)"
+ )
+ except Exception:
+ pass # Ignore edit errors
+
+ return await task
+
+ report = await process_with_progress()
+
+ # Commit and push changes
+ if "error" not in report:
+ today = date.today().isoformat()
+ await asyncio.to_thread(git.commit_and_push, f"chore: process daily {today}")
+
+ # Format and send report
+ formatted = format_process_report(report)
+ try:
+ await status_msg.edit_text(formatted)
+ except Exception:
+ # Fallback: send without HTML parsing
+ await status_msg.edit_text(formatted, parse_mode=None)
diff --git a/src/d_brain/bot/handlers/text.py b/src/d_brain/bot/handlers/text.py
new file mode 100644
index 0000000..e77814b
--- /dev/null
+++ b/src/d_brain/bot/handlers/text.py
@@ -0,0 +1,29 @@
+"""Text message handler."""
+
+import logging
+from datetime import datetime
+
+from aiogram import Router
+from aiogram.types import Message
+
+from d_brain.config import get_settings
+from d_brain.services.storage import VaultStorage
+
+router = Router(name="text")
+logger = logging.getLogger(__name__)
+
+
[email protected](lambda m: m.text is not None and not m.text.startswith("/"))
+async def handle_text(message: Message) -> None:
+ """Handle text messages (excluding commands)."""
+ if not message.text or not message.from_user:
+ return
+
+ settings = get_settings()
+ storage = VaultStorage(settings.vault_path)
+
+ timestamp = datetime.fromtimestamp(message.date.timestamp())
+ storage.append_to_daily(message.text, timestamp, "[text]")
+
+ await message.answer("✓ Сохранено")
+ logger.info("Text message saved: %d chars", len(message.text))
diff --git a/src/d_brain/bot/handlers/voice.py b/src/d_brain/bot/handlers/voice.py
new file mode 100644
index 0000000..af56cc0
--- /dev/null
+++ b/src/d_brain/bot/handlers/voice.py
@@ -0,0 +1,55 @@
+"""Voice message handler."""
+
+import logging
+from datetime import datetime
+
+from aiogram import Bot, Router
+from aiogram.types import Message
+
+from d_brain.config import get_settings
+from d_brain.services.storage import VaultStorage
+from d_brain.services.transcription import DeepgramTranscriber
+
+router = Router(name="voice")
+logger = logging.getLogger(__name__)
+
+
[email protected](lambda m: m.voice is not None)
+async def handle_voice(message: Message, bot: Bot) -> None:
+ """Handle voice messages."""
+ if not message.voice or not message.from_user:
+ return
+
+ await message.chat.do(action="typing")
+
+ settings = get_settings()
+ storage = VaultStorage(settings.vault_path)
+ transcriber = DeepgramTranscriber(settings.deepgram_api_key)
+
+ try:
+ file = await bot.get_file(message.voice.file_id)
+ if not file.file_path:
+ await message.answer("Failed to download voice message")
+ return
+
+ file_bytes = await bot.download_file(file.file_path)
+ if not file_bytes:
+ await message.answer("Failed to download voice message")
+ return
+
+ audio_bytes = file_bytes.read()
+ transcript = await transcriber.transcribe(audio_bytes)
+
+ if not transcript:
+ await message.answer("Could not transcribe audio")
+ return
+
+ timestamp = datetime.fromtimestamp(message.date.timestamp())
+ storage.append_to_daily(transcript, timestamp, "[voice]")
+
+ await message.answer(f"🎤 {transcript}\n\n✓ Сохранено")
+ logger.info("Voice message saved: %d chars", len(transcript))
+
+ except Exception as e:
+ logger.exception("Error processing voice message")
+ await message.answer(f"Error: {e}")
diff --git a/src/d_brain/bot/handlers/weekly.py b/src/d_brain/bot/handlers/weekly.py
new file mode 100644
index 0000000..84f948c
--- /dev/null
+++ b/src/d_brain/bot/handlers/weekly.py
@@ -0,0 +1,60 @@
+"""Weekly digest command handler."""
+
+import asyncio
+import logging
+
+from aiogram import Router
+from aiogram.filters import Command
+from aiogram.types import Message
+
+from d_brain.bot.formatters import format_process_report
+from d_brain.config import get_settings
+from d_brain.services.git import VaultGit
+from d_brain.services.processor import ClaudeProcessor
+
+router = Router(name="weekly")
+logger = logging.getLogger(__name__)
+
+
[email protected](Command("weekly"))
+async def cmd_weekly(message: Message) -> None:
+ """Handle /weekly command - generate weekly digest."""
+ user_id = message.from_user.id if message.from_user else "unknown"
+ logger.info("Weekly digest triggered by user %s", user_id)
+
+ status_msg = await message.answer("⏳ Генерирую недельный дайджест...")
+
+ settings = get_settings()
+ processor = ClaudeProcessor(settings.vault_path, settings.todoist_api_key)
+ git = VaultGit(settings.vault_path)
+
+ async def run_with_progress() -> dict:
+ task = asyncio.create_task(
+ asyncio.to_thread(processor.generate_weekly)
+ )
+
+ elapsed = 0
+ while not task.done():
+ await asyncio.sleep(30)
+ elapsed += 30
+ if not task.done():
+ try:
+ await status_msg.edit_text(
+ f"⏳ Генерирую дайджест... ({elapsed // 60}m {elapsed % 60}s)"
+ )
+ except Exception:
+ pass
+
+ return await task
+
+ report = await run_with_progress()
+
+ # Commit any changes (weekly goal updates, etc)
+ if "error" not in report:
+ await asyncio.to_thread(git.commit_and_push, "chore: weekly digest")
+
+ formatted = format_process_report(report)
+ try:
+ await status_msg.edit_text(formatted)
+ except Exception:
+ await status_msg.edit_text(formatted, parse_mode=None)
diff --git a/src/d_brain/bot/keyboards.py b/src/d_brain/bot/keyboards.py
new file mode 100644
index 0000000..016e4f5
--- /dev/null
+++ b/src/d_brain/bot/keyboards.py
@@ -0,0 +1,18 @@
+"""Reply keyboards for Telegram bot."""
+
+from aiogram.types import ReplyKeyboardMarkup
+from aiogram.utils.keyboard import ReplyKeyboardBuilder
+
+
+def get_main_keyboard() -> ReplyKeyboardMarkup:
+ """Main reply keyboard with common commands."""
+ builder = ReplyKeyboardBuilder()
+ # First row: main commands
+ builder.button(text="📊 Статус")
+ builder.button(text="⚙️ Обработать")
+ builder.button(text="📅 Неделя")
+ # Second row: additional
+ builder.button(text="✨ Запрос")
+ builder.button(text="❓ Помощь")
+ builder.adjust(3, 2) # 3 in first row, 2 in second
+ return builder.as_markup(resize_keyboard=True, is_persistent=True)
diff --git a/src/d_brain/bot/main.py b/src/d_brain/bot/main.py
new file mode 100644
index 0000000..21416c1
--- /dev/null
+++ b/src/d_brain/bot/main.py
@@ -0,0 +1,85 @@
+"""Telegram bot initialization and polling."""
+
+import logging
+from collections.abc import Awaitable, Callable
+from typing import Any
+
+from aiogram import Bot, Dispatcher
+from aiogram.client.default import DefaultBotProperties
+from aiogram.enums import ParseMode
+from aiogram.fsm.storage.memory import MemoryStorage
+from aiogram.types import Update
+
+from d_brain.config import Settings
+
+logger = logging.getLogger(__name__)
+
+
+def create_bot(settings: Settings) -> Bot:
+ """Create and configure the Telegram bot."""
+ return Bot(
+ token=settings.telegram_bot_token,
+ default=DefaultBotProperties(parse_mode=ParseMode.HTML),
+ )
+
+
+def create_dispatcher() -> Dispatcher:
+ """Create and configure the dispatcher with routers."""
+ from d_brain.bot.handlers import buttons, commands, do, forward, photo, process, text, voice, weekly
+
+ # Use memory storage for FSM (required for /do command state)
+ dp = Dispatcher(storage=MemoryStorage())
+
+ # Register routers - ORDER MATTERS
+ dp.include_router(commands.router)
+ dp.include_router(process.router)
+ dp.include_router(weekly.router)
+ dp.include_router(do.router) # Before voice/text to catch FSM state
+ dp.include_router(buttons.router) # Reply keyboard buttons
+ dp.include_router(voice.router)
+ dp.include_router(photo.router)
+ dp.include_router(forward.router)
+ dp.include_router(text.router) # Must be last (catch-all for text)
+ return dp
+
+
+MiddlewareHandler = Callable[[Update, dict[str, Any]], Awaitable[Any]]
+MiddlewareType = Callable[[MiddlewareHandler, Update, dict[str, Any]], Awaitable[Any]]
+
+
+def create_auth_middleware(allowed_user_ids: list[int]) -> MiddlewareType:
+ """Create middleware to check user authorization."""
+
+ async def auth_middleware(
+ handler: Callable[[Update, dict[str, Any]], Awaitable[Any]],
+ event: Update,
+ data: dict[str, Any],
+ ) -> Any:
+ user = None
+ if event.message:
+ user = event.message.from_user
+ elif event.callback_query:
+ user = event.callback_query.from_user
+
+ if user and allowed_user_ids and user.id not in allowed_user_ids:
+ logger.warning("Unauthorized access attempt from user %s", user.id)
+ return None
+
+ return await handler(event, data)
+
+ return auth_middleware
+
+
+async def run_bot(settings: Settings) -> None:
+ """Run the bot with polling."""
+ bot = create_bot(settings)
+ dp = create_dispatcher()
+
+ if settings.allowed_user_ids:
+ dp.update.middleware(create_auth_middleware(settings.allowed_user_ids))
+
+ logger.info("Starting bot polling...")
+ try:
+ await dp.start_polling(bot, allowed_updates=dp.resolve_used_update_types())
+ finally:
+ await bot.session.close()
diff --git a/src/d_brain/bot/states.py b/src/d_brain/bot/states.py
new file mode 100644
index 0000000..961fd41
--- /dev/null
+++ b/src/d_brain/bot/states.py
@@ -0,0 +1,9 @@
+"""Bot FSM states."""
+
+from aiogram.fsm.state import State, StatesGroup
+
+
+class DoCommandState(StatesGroup):
+ """States for /do command flow."""
+
+ waiting_for_input = State() # Waiting for voice or text after /do
diff --git a/src/d_brain/config.py b/src/d_brain/config.py
new file mode 100644
index 0000000..a9bf30b
--- /dev/null
+++ b/src/d_brain/config.py
@@ -0,0 +1,48 @@
+"""Application configuration using Pydantic Settings."""
+
+from pathlib import Path
+
+from pydantic import Field
+from pydantic_settings import BaseSettings, SettingsConfigDict
+
+
+class Settings(BaseSettings):
+ """Application settings loaded from environment variables."""
+
+ model_config = SettingsConfigDict(
+ env_file=".env",
+ env_file_encoding="utf-8",
+ extra="ignore",
+ )
+
+ telegram_bot_token: str = Field(description="Telegram Bot API token")
+ deepgram_api_key: str = Field(description="Deepgram API key for transcription")
+ todoist_api_key: str = Field(default="", description="Todoist API key for tasks")
+ vault_path: Path = Field(
+ default=Path("./vault"),
+ description="Path to Obsidian vault directory",
+ )
+ allowed_user_ids: list[int] = Field(
+ default_factory=list,
+ description="List of Telegram user IDs allowed to use the bot",
+ )
+
+ @property
+ def daily_path(self) -> Path:
+ """Path to daily notes directory."""
+ return self.vault_path / "daily"
+
+ @property
+ def attachments_path(self) -> Path:
+ """Path to attachments directory."""
+ return self.vault_path / "attachments"
+
+ @property
+ def thoughts_path(self) -> Path:
+ """Path to thoughts directory."""
+ return self.vault_path / "thoughts"
+
+
+def get_settings() -> Settings:
+ """Get application settings instance."""
+ return Settings()
diff --git a/src/d_brain/services/__init__.py b/src/d_brain/services/__init__.py
new file mode 100644
index 0000000..de2060f
--- /dev/null
+++ b/src/d_brain/services/__init__.py
@@ -0,0 +1 @@
+"""Business logic services."""
diff --git a/src/d_brain/services/git.py b/src/d_brain/services/git.py
new file mode 100644
index 0000000..3c980c4
--- /dev/null
+++ b/src/d_brain/services/git.py
@@ -0,0 +1,88 @@
+"""Git automation service for vault."""
+
+import logging
+import subprocess
+from pathlib import Path
+
+logger = logging.getLogger(__name__)
+
+
+class VaultGit:
+ """Service for git operations on vault."""
+
+ def __init__(self, vault_path: Path) -> None:
+ self.vault_path = Path(vault_path)
+
+ def _run_git(self, *args: str) -> subprocess.CompletedProcess[str]:
+ """Run git command in vault directory."""
+ return subprocess.run(
+ ["git", *args],
+ cwd=self.vault_path,
+ capture_output=True,
+ text=True,
+ check=False,
+ )
+
+ def get_status(self) -> str:
+ """Get git status."""
+ result = self._run_git("status", "--porcelain")
+ return result.stdout
+
+ def has_changes(self) -> bool:
+ """Check if there are uncommitted changes."""
+ return bool(self.get_status().strip())
+
+ def commit_changes(self, message: str) -> bool:
+ """Stage all changes and commit.
+
+ Args:
+ message: Commit message
+
+ Returns:
+ True if commit was made, False otherwise
+ """
+ if not self.has_changes():
+ logger.info("No changes to commit")
+ return False
+
+ # Stage all changes
+ add_result = self._run_git("add", "-A")
+ if add_result.returncode != 0:
+ logger.error("Git add failed: %s", add_result.stderr)
+ return False
+
+ # Commit
+ commit_result = self._run_git("commit", "-m", message)
+ if commit_result.returncode != 0:
+ logger.error("Git commit failed: %s", commit_result.stderr)
+ return False
+
+ logger.info("Committed: %s", message)
+ return True
+
+ def push(self) -> bool:
+ """Push to remote.
+
+ Returns:
+ True if push was successful
+ """
+ result = self._run_git("push")
+ if result.returncode != 0:
+ logger.error("Git push failed: %s", result.stderr)
+ return False
+
+ logger.info("Pushed to remote")
+ return True
+
+ def commit_and_push(self, message: str) -> bool:
+ """Commit all changes and push.
+
+ Args:
+ message: Commit message
+
+ Returns:
+ True if successful
+ """
+ if self.commit_changes(message):
+ return self.push()
+ return True # No changes is not an error
diff --git a/src/d_brain/services/processor.py b/src/d_brain/services/processor.py
new file mode 100644
index 0000000..9477af8
--- /dev/null
+++ b/src/d_brain/services/processor.py
@@ -0,0 +1,375 @@
+"""Claude processing service."""
+
+import json
+import logging
+import os
+import subprocess
+from datetime import date
+from pathlib import Path
+from typing import Any
+
+logger = logging.getLogger(__name__)
+
+DEFAULT_TIMEOUT = 1200 # 20 minutes
+
+
+class ClaudeProcessor:
+ """Service for triggering Claude Code processing."""
+
+ def __init__(self, vault_path: Path, todoist_api_key: str = "") -> None:
+ self.vault_path = Path(vault_path)
+ self.todoist_api_key = todoist_api_key
+ self._mcp_config_path = (self.vault_path.parent / "mcp-config.json").resolve()
+
+ def _load_skill_content(self) -> str:
+ """Load dbrain-processor skill content for inclusion in prompt.
+
+ NOTE: @vault/ references don't work in --print mode,
+ so we must include skill content directly in the prompt.
+ """
+ skill_path = self.vault_path / ".claude/skills/dbrain-processor/SKILL.md"
+ if skill_path.exists():
+ return skill_path.read_text()
+ return ""
+
+ def _load_todoist_reference(self) -> str:
+ """Load Todoist reference for inclusion in prompt."""
+ ref_path = self.vault_path / ".claude/skills/dbrain-processor/references/todoist.md"
+ if ref_path.exists():
+ return ref_path.read_text()
+ return ""
+
+ def _html_to_markdown(self, html: str) -> str:
+ """Convert Telegram HTML to Obsidian Markdown."""
+ import re
+
+ text = html
+ # <b>text</b> → **text**
+ text = re.sub(r"<b>(.*?)</b>", r"**\1**", text)
+ # <i>text</i> → *text*
+ text = re.sub(r"<i>(.*?)</i>", r"*\1*", text)
+ # <code>text</code> → `text`
+ text = re.sub(r"<code>(.*?)</code>", r"`\1`", text)
+ # <s>text</s> → ~~text~~
+ text = re.sub(r"<s>(.*?)</s>", r"~~\1~~", text)
+ # Remove <u> (no Markdown equivalent, just keep text)
+ text = re.sub(r"</?u>", "", text)
+ # <a href="url">text</a> → [text](url)
+ text = re.sub(r'<a href="([^"]+)">([^<]+)</a>', r"[\2](\1)", text)
+
+ return text
+
+ def _save_weekly_summary(self, report_html: str, week_date: date) -> Path:
+ """Save weekly summary to vault/summaries/YYYY-WXX-summary.md."""
+ # Calculate ISO week number
+ year, week, _ = week_date.isocalendar()
+ filename = f"{year}-W{week:02d}-summary.md"
+ summary_path = self.vault_path / "summaries" / filename
+
+ # Convert HTML to Markdown for Obsidian
+ content = self._html_to_markdown(report_html)
+
+ # Add frontmatter
+ frontmatter = f"""---
+date: {week_date.isoformat()}
+type: weekly-summary
+week: {year}-W{week:02d}
+---
+
+"""
+ summary_path.write_text(frontmatter + content)
+ logger.info("Weekly summary saved to %s", summary_path)
+ return summary_path
+
+ def _update_weekly_moc(self, summary_path: Path) -> None:
+ """Add link to new summary in MOC-weekly.md."""
+ moc_path = self.vault_path / "MOC" / "MOC-weekly.md"
+ if moc_path.exists():
+ content = moc_path.read_text()
+ link = f"- [[summaries/{summary_path.name}|{summary_path.stem}]]"
+ # Insert after "## Previous Weeks" if not already there
+ if summary_path.stem not in content:
+ content = content.replace(
+ "## Previous Weeks\n",
+ f"## Previous Weeks\n\n{link}\n",
+ )
+ moc_path.write_text(content)
+ logger.info("Updated MOC-weekly.md with link to %s", summary_path.stem)
+
+ def process_daily(self, day: date | None = None) -> dict[str, Any]:
+ """Process daily file with Claude.
+
+ Args:
+ day: Date to process (default: today)
+
+ Returns:
+ Processing report as dict
+ """
+ if day is None:
+ day = date.today()
+
+ daily_file = self.vault_path / "daily" / f"{day.isoformat()}.md"
+
+ if not daily_file.exists():
+ logger.warning("No daily file for %s", day)
+ return {
+ "error": f"No daily file for {day}",
+ "processed_entries": 0,
+ }
+
+ # Load skill content directly (@ references don't work in --print mode)
+ skill_content = self._load_skill_content()
+
+ prompt = f"""Сегодня {day}. Выполни ежедневную обработку.
+
+=== SKILL INSTRUCTIONS ===
+{skill_content}
+=== END SKILL ===
+
+ПЕРВЫМ ДЕЛОМ: вызови mcp__todoist__user-info чтобы убедиться что MCP работает.
+
+CRITICAL MCP RULE:
+- ТЫ ИМЕЕШЬ ДОСТУП к mcp__todoist__* tools — ВЫЗЫВАЙ ИХ НАПРЯМУЮ
+- НИКОГДА не пиши "MCP недоступен" или "добавь вручную"
+- Для задач: вызови mcp__todoist__add-tasks tool
+- Если tool вернул ошибку — покажи ТОЧНУЮ ошибку в отчёте
+
+CRITICAL OUTPUT FORMAT:
+- Return ONLY raw HTML for Telegram (parse_mode=HTML)
+- NO markdown: no **, no ## , no ```, no tables
+- Start directly with 📊 <b>Обработка за {day}</b>
+- Allowed tags: <b>, <i>, <code>, <s>, <u>
+- If entries already processed, return status report in same HTML format"""
+
+ try:
+ # Pass TODOIST_API_KEY to Claude subprocess
+ env = os.environ.copy()
+ if self.todoist_api_key:
+ env["TODOIST_API_KEY"] = self.todoist_api_key
+
+ result = subprocess.run(
+ [
+ "/home/shima/.local/bin/claude",
+ "--print",
+ "--dangerously-skip-permissions",
+ "--mcp-config",
+ str(self._mcp_config_path),
+ "-p",
+ prompt,
+ ],
+ cwd=self.vault_path.parent,
+ capture_output=True,
+ text=True,
+ timeout=DEFAULT_TIMEOUT,
+ check=False,
+ env=env,
+ )
+
+ if result.returncode != 0:
+ logger.error("Claude processing failed: %s", result.stderr)
+ return {
+ "error": result.stderr or "Claude processing failed",
+ "processed_entries": 0,
+ }
+
+ # Return human-readable output
+ output = result.stdout.strip()
+ return {
+ "report": output,
+ "processed_entries": 1, # успешно обработано
+ }
+
+ except subprocess.TimeoutExpired:
+ logger.error("Claude processing timed out")
+ return {
+ "error": "Processing timed out",
+ "processed_entries": 0,
+ }
+ except FileNotFoundError:
+ logger.error("Claude CLI not found")
+ return {
+ "error": "Claude CLI not installed",
+ "processed_entries": 0,
+ }
+ except Exception as e:
+ logger.exception("Unexpected error during processing")
+ return {
+ "error": str(e),
+ "processed_entries": 0,
+ }
+
+ def execute_prompt(self, user_prompt: str) -> dict[str, Any]:
+ """Execute arbitrary prompt with Claude.
+
+ Args:
+ user_prompt: User's natural language request
+
+ Returns:
+ Execution report as dict
+ """
+ today = date.today()
+
+ # Load todoist reference for task operations
+ todoist_ref = self._load_todoist_reference()
+
+ prompt = f"""Ты - персональный ассистент d-brain.
+
+CONTEXT:
+- Текущая дата: {today}
+- Vault path: {self.vault_path}
+
+=== TODOIST REFERENCE ===
+{todoist_ref}
+=== END REFERENCE ===
+
+ПЕРВЫМ ДЕЛОМ: вызови mcp__todoist__user-info чтобы убедиться что MCP работает.
+
+CRITICAL MCP RULE:
+- ТЫ ИМЕЕШЬ ДОСТУП к mcp__todoist__* tools — ВЫЗЫВАЙ ИХ НАПРЯМУЮ
+- НИКОГДА не пиши "MCP недоступен" или "добавь вручную"
+- Если tool вернул ошибку — покажи ТОЧНУЮ ошибку в отчёте
+
+USER REQUEST:
+{user_prompt}
+
+CRITICAL OUTPUT FORMAT:
+- Return ONLY raw HTML for Telegram (parse_mode=HTML)
+- NO markdown: no **, no ##, no ```, no tables, no -
+- Start with emoji and <b>header</b>
+- Allowed tags: <b>, <i>, <code>, <s>, <u>
+- Be concise - Telegram has 4096 char limit
+
+EXECUTION:
+1. Analyze the request
+2. Call MCP tools directly (mcp__todoist__*, read/write files)
+3. Return HTML status report with results"""
+
+ try:
+ env = os.environ.copy()
+ if self.todoist_api_key:
+ env["TODOIST_API_KEY"] = self.todoist_api_key
+
+ result = subprocess.run(
+ [
+ "/home/shima/.local/bin/claude",
+ "--print",
+ "--dangerously-skip-permissions",
+ "--mcp-config",
+ str(self._mcp_config_path),
+ "-p",
+ prompt,
+ ],
+ cwd=self.vault_path.parent,
+ capture_output=True,
+ text=True,
+ timeout=DEFAULT_TIMEOUT,
+ check=False,
+ env=env,
+ )
+
+ if result.returncode != 0:
+ logger.error("Claude execution failed: %s", result.stderr)
+ return {
+ "error": result.stderr or "Claude execution failed",
+ "processed_entries": 0,
+ }
+
+ return {
+ "report": result.stdout.strip(),
+ "processed_entries": 1,
+ }
+
+ except subprocess.TimeoutExpired:
+ logger.error("Claude execution timed out")
+ return {"error": "Execution timed out", "processed_entries": 0}
+ except FileNotFoundError:
+ logger.error("Claude CLI not found")
+ return {"error": "Claude CLI not installed", "processed_entries": 0}
+ except Exception as e:
+ logger.exception("Unexpected error during execution")
+ return {"error": str(e), "processed_entries": 0}
+
+ def generate_weekly(self) -> dict[str, Any]:
+ """Generate weekly digest with Claude.
+
+ Returns:
+ Weekly digest report as dict
+ """
+ today = date.today()
+
+ prompt = f"""Сегодня {today}. Сгенерируй недельный дайджест.
+
+ПЕРВЫМ ДЕЛОМ: вызови mcp__todoist__user-info чтобы убедиться что MCP работает.
+
+CRITICAL MCP RULE:
+- ТЫ ИМЕЕШЬ ДОСТУП к mcp__todoist__* tools — ВЫЗЫВАЙ ИХ НАПРЯМУЮ
+- НИКОГДА не пиши "MCP недоступен" или "добавь вручную"
+- Для выполненных задач: вызови mcp__todoist__find-completed-tasks tool
+- Если tool вернул ошибку — покажи ТОЧНУЮ ошибку в отчёте
+
+WORKFLOW:
+1. Собери данные за неделю (daily файлы в vault/daily/, completed tasks через MCP)
+2. Проанализируй прогресс по целям (goals/3-weekly.md)
+3. Определи победы и вызовы
+4. Сгенерируй HTML отчёт
+
+CRITICAL OUTPUT FORMAT:
+- Return ONLY raw HTML for Telegram (parse_mode=HTML)
+- NO markdown: no **, no ##, no ```, no tables
+- Start with 📅 <b>Недельный дайджест</b>
+- Allowed tags: <b>, <i>, <code>, <s>, <u>
+- Be concise - Telegram has 4096 char limit"""
+
+ try:
+ env = os.environ.copy()
+ if self.todoist_api_key:
+ env["TODOIST_API_KEY"] = self.todoist_api_key
+
+ result = subprocess.run(
+ [
+ "/home/shima/.local/bin/claude",
+ "--print",
+ "--dangerously-skip-permissions",
+ "--mcp-config",
+ str(self._mcp_config_path),
+ "-p",
+ prompt,
+ ],
+ cwd=self.vault_path.parent,
+ capture_output=True,
+ text=True,
+ timeout=DEFAULT_TIMEOUT,
+ check=False,
+ env=env,
+ )
+
+ if result.returncode != 0:
+ logger.error("Weekly digest failed: %s", result.stderr)
+ return {
+ "error": result.stderr or "Weekly digest failed",
+ "processed_entries": 0,
+ }
+
+ output = result.stdout.strip()
+
+ # Save to summaries/ and update MOC
+ try:
+ summary_path = self._save_weekly_summary(output, today)
+ self._update_weekly_moc(summary_path)
+ except Exception as e:
+ logger.warning("Failed to save weekly summary: %s", e)
+
+ return {
+ "report": output,
+ "processed_entries": 1,
+ }
+
+ except subprocess.TimeoutExpired:
+ logger.error("Weekly digest timed out")
+ return {"error": "Weekly digest timed out", "processed_entries": 0}
+ except FileNotFoundError:
+ logger.error("Claude CLI not found")
+ return {"error": "Claude CLI not installed", "processed_entries": 0}
+ except Exception as e:
+ logger.exception("Unexpected error during weekly digest")
+ return {"error": str(e), "processed_entries": 0}
diff --git a/src/d_brain/services/storage.py b/src/d_brain/services/storage.py
new file mode 100644
index 0000000..4655e38
--- /dev/null
+++ b/src/d_brain/services/storage.py
@@ -0,0 +1,85 @@
+"""Vault storage service for saving entries."""
+
+from datetime import date, datetime
+from pathlib import Path
+
+
+class VaultStorage:
+ """Service for storing entries in Obsidian vault."""
+
+ def __init__(self, vault_path: Path) -> None:
+ self.vault_path = Path(vault_path)
+ self.daily_path = self.vault_path / "daily"
+ self.attachments_path = self.vault_path / "attachments"
+
+ def _ensure_dirs(self) -> None:
+ """Ensure required directories exist."""
+ self.daily_path.mkdir(parents=True, exist_ok=True)
+ self.attachments_path.mkdir(parents=True, exist_ok=True)
+
+ def get_daily_file(self, day: date) -> Path:
+ """Get path to daily file for given date."""
+ self._ensure_dirs()
+ return self.daily_path / f"{day.isoformat()}.md"
+
+ def read_daily(self, day: date) -> str:
+ """Read content of daily file."""
+ file_path = self.get_daily_file(day)
+ if not file_path.exists():
+ return ""
+ return file_path.read_text(encoding="utf-8")
+
+ def append_to_daily(
+ self,
+ text: str,
+ timestamp: datetime,
+ msg_type: str,
+ ) -> None:
+ """Append entry to daily file.
+
+ Args:
+ text: Content to append
+ timestamp: Entry timestamp
+ msg_type: Type marker like [voice], [text], [photo], [forward from: Name]
+ """
+ self._ensure_dirs()
+ file_path = self.get_daily_file(timestamp.date())
+
+ time_str = timestamp.strftime("%H:%M")
+ entry = f"\n## {time_str} {msg_type}\n{text}\n"
+
+ with file_path.open("a", encoding="utf-8") as f:
+ f.write(entry)
+
+ def get_attachments_dir(self, day: date) -> Path:
+ """Get attachments directory for given date."""
+ dir_path = self.attachments_path / day.isoformat()
+ dir_path.mkdir(parents=True, exist_ok=True)
+ return dir_path
+
+ def save_attachment(
+ self,
+ data: bytes,
+ day: date,
+ timestamp: datetime,
+ extension: str = "jpg",
+ ) -> str:
+ """Save attachment and return relative path for Obsidian embed.
+
+ Args:
+ data: File bytes
+ day: Date for organizing
+ timestamp: Timestamp for filename
+ extension: File extension
+
+ Returns:
+ Relative path for Obsidian embed: attachments/YYYY-MM-DD/img-HHMMSS.ext
+ """
+ dir_path = self.get_attachments_dir(day)
+ time_str = timestamp.strftime("%H%M%S")
+ filename = f"img-{time_str}.{extension}"
+ file_path = dir_path / filename
+
+ file_path.write_bytes(data)
+
+ return f"attachments/{day.isoformat()}/{filename}"
diff --git a/src/d_brain/services/transcription.py b/src/d_brain/services/transcription.py
new file mode 100644
index 0000000..5b55c04
--- /dev/null
+++ b/src/d_brain/services/transcription.py
@@ -0,0 +1,47 @@
+"""Deepgram transcription service."""
+
+import logging
+
+from deepgram import AsyncDeepgramClient
+
+logger = logging.getLogger(__name__)
+
+
+class DeepgramTranscriber:
+ """Service for transcribing audio using Deepgram Nova-3."""
+
+ def __init__(self, api_key: str) -> None:
+ self.client = AsyncDeepgramClient(api_key=api_key)
+
+ async def transcribe(self, audio_bytes: bytes) -> str:
+ """Transcribe audio bytes to text.
+
+ Args:
+ audio_bytes: Audio file content
+
+ Returns:
+ Transcribed text
+
+ Raises:
+ Exception: If transcription fails
+ """
+ logger.info("Starting transcription, audio size: %d bytes", len(audio_bytes))
+
+ response = await self.client.listen.v1.media.transcribe_file(
+ request=audio_bytes,
+ model="nova-3",
+ language="ru",
+ punctuate=True,
+ smart_format=True,
+ )
+
+ transcript = (
+ response.results.channels[0].alternatives[0].transcript
+ if response.results
+ and response.results.channels
+ and response.results.channels[0].alternatives
+ else ""
+ )
+
+ logger.info("Transcription complete: %d chars", len(transcript))
+ return transcript
diff --git a/vault/.claude-plugin/plugin.json b/vault/.claude-plugin/plugin.json
new file mode 100644
index 0000000..7746e3c
--- /dev/null
+++ b/vault/.claude-plugin/plugin.json
@@ -0,0 +1,31 @@
+{
+ "name": "d-brain",
+ "version": "2.0.0",
+ "description": "Voice-first personal assistant for capturing thoughts and tasks via Telegram, with goal tracking and Obsidian integration",
+ "author": {
+ "name": "Shima",
+ "url": "https://github.com/shima"
+ },
+ "license": "MIT",
+ "capabilities": {
+ "agents": true,
+ "skills": true,
+ "rules": true
+ },
+ "integrations": {
+ "telegram": "Voice/text/photo capture",
+ "todoist": "Task management via MCP",
+ "obsidian": "PKM vault storage",
+ "deepgram": "Voice transcription"
+ },
+ "keywords": [
+ "voice-capture",
+ "telegram-bot",
+ "todoist",
+ "obsidian",
+ "pkm",
+ "goals",
+ "productivity",
+ "personal-assistant"
+ ]
+}
diff --git a/vault/.claude/CLAUDE.md b/vault/.claude/CLAUDE.md
new file mode 100644
index 0000000..caa1578
--- /dev/null
+++ b/vault/.claude/CLAUDE.md
@@ -0,0 +1,162 @@
+# Agent Second Brain
+
+Voice-first personal assistant for capturing thoughts and managing tasks via Telegram.
+
+## Mission
+
+Help user stay aligned with goals, capture valuable insights, and maintain clarity.
+
+## Directory Structure
+
+| Folder | Purpose |
+|--------|---------|
+| `daily/` | Raw daily entries (YYYY-MM-DD.md) |
+| `goals/` | Goal cascade (3y → yearly → monthly → weekly) |
+| `thoughts/` | Processed notes by category |
+| `MOC/` | Maps of Content indexes |
+| `attachments/` | Photos by date |
+
+## Current Focus
+
+See [[goals/3-weekly]] for this week's ONE Big Thing.
+See [[goals/2-monthly]] for monthly priorities.
+
+## Goals Hierarchy
+
+```
+goals/0-vision-3y.md → 3-year vision by life areas
+goals/1-yearly-2025.md → Annual goals + quarterly breakdown
+goals/2-monthly.md → Current month's top 3 priorities
+goals/3-weekly.md → This week's focus + ONE Big Thing
+```
+
+## Entry Format
+
+```markdown
+## HH:MM [type]
+Content
+```
+
+Types: `[voice]`, `[text]`, `[forward from: Name]`, `[photo]`
+
+## Processing Workflow
+
+Run daily processing via `/process` command or automatically at 21:00.
+
+### Process Flow:
+1. Read goals/ → understand priorities
+2. Check Todoist → know workload
+3. Read daily/ → classify entries
+4. Create tasks → aligned with goals
+5. Save thoughts → build [[links]]
+6. Generate HTML report → send to Telegram
+
+## Available Skills
+
+| Skill | Purpose |
+|-------|---------|
+| `dbrain-processor` | Main daily processing |
+| `todoist-ai` | Task management via MCP |
+
+## Available Agents
+
+| Agent | Purpose |
+|-------|---------|
+| `weekly-digest` | Weekly review with goal progress |
+| `goal-aligner` | Check task-goal alignment |
+| `note-organizer` | Organize vault, fix links |
+| `inbox-processor` | GTD-style inbox processing |
+
+## Path-Specific Rules
+
+See `.claude/rules/` for format requirements:
+- `daily-format.md` — daily files format
+- `thoughts-format.md` — thought notes format
+- `goals-format.md` — goals format
+- `telegram-report.md` — HTML report format
+
+## MCP Servers
+
+- `todoist` — Task management (add, find, complete tasks)
+- `filesystem` — Vault file access
+
+## CRITICAL: Tool Usage Policy
+
+**ТЫ ОБЯЗАН ВЫЗЫВАТЬ MCP TOOLS НАПРЯМУЮ.**
+
+Не существует ситуации, когда MCP tools "недоступны". Если ты получил эту инструкцию — у тебя есть доступ к:
+
+- `mcp__todoist__*` — все Todoist операции
+- File read/write — все файловые операции
+
+ЗАПРЕЩЁННЫЕ ПАТТЕРНЫ (НИКОГДА не делай это):
+- "MCP недоступен в текущем режиме"
+- "Не удалось добавить автоматически"
+- "Добавь вручную: ..."
+- Любые инструкции для ручного выполнения
+
+ПРАВИЛЬНЫЙ ПАТТЕРН:
+1. Вызвать mcp__todoist__add-tasks tool
+2. Получить результат (успех или ошибка)
+3. Включить результат в HTML отчёт
+
+При ошибке — показать ТОЧНУЮ ошибку от tool, не придумывать отговорки.
+
+## Report Format
+
+Reports use Telegram HTML:
+- `<b>bold</b>` for headers
+- `<i>italic</i>` for metadata
+- Only allowed tags: b, i, code, pre, a
+
+## Quick Commands
+
+| Command | Action |
+|---------|--------|
+| `/process` | Run daily processing |
+| `/do` | Execute arbitrary request |
+| `/weekly` | Generate weekly digest |
+| `/align` | Check goal alignment |
+| `/organize` | Organize vault |
+
+## /do Command Context
+
+When invoked via /do, Claude receives arbitrary user requests. Common patterns:
+
+**Task Management:**
+- "перенеси просроченные задачи на понедельник"
+- "покажи задачи на сегодня"
+- "добавь задачу: позвонить клиенту"
+- "что срочного на этой неделе?"
+
+**Vault Queries:**
+- "найди заметки про AI"
+- "что я записал сегодня?"
+- "покажи итоги недели"
+
+**Combined:**
+- "создай задачу из первой записи сегодня"
+- "перенеси всё с сегодня на завтра"
+
+## MCP Tools Available
+
+**Todoist (mcp__todoist__*):**
+- `add-tasks` — создать задачи
+- `find-tasks` — найти задачи по тексту
+- `find-tasks-by-date` — задачи за период
+- `update-tasks` — изменить задачи
+- `complete-tasks` — завершить задачи
+- `user-info` — информация о пользователе
+
+**Filesystem:**
+- Read/write vault files
+- Access daily/, goals/, thoughts/
+
+## Customization
+
+For personal overrides: create `CLAUDE.local.md`
+
+---
+
+*System Version: 2.0*
+*Updated: 2024-12-20*
diff --git a/vault/.claude/agents/goal-aligner.md b/vault/.claude/agents/goal-aligner.md
new file mode 100644
index 0000000..ef14461
--- /dev/null
+++ b/vault/.claude/agents/goal-aligner.md
@@ -0,0 +1,141 @@
+---
+name: goal-aligner
+description: Check alignment between tasks in Todoist and goals in vault. Find orphan tasks and stale goals.
+---
+
+# Goal Aligner Agent
+
+Ensures tasks and goals stay in sync.
+
+## When to Run
+
+- Weekly during digest
+- On demand via `/align` command
+- When too many unaligned tasks detected
+
+## Workflow
+
+### Step 1: Load All Goals
+
+```
+Read goals/0-vision-3y.md → Life areas
+Read goals/1-yearly-2025.md → Yearly goals
+Read goals/2-monthly.md → Monthly priorities
+Read goals/3-weekly.md → ONE Big Thing
+```
+
+Extract goal keywords for matching.
+
+### Step 2: Get All Active Tasks
+
+```
+mcp__todoist__find-tasks
+ responsibleUserFiltering: "all"
+ limit: 100
+```
+
+### Step 3: Analyze Alignment
+
+For each task:
+
+1. **Check description** for goal references
+2. **Match keywords** against goals
+3. **Classify:**
+ - ✅ Aligned — has goal reference
+ - 🔶 Possibly aligned — keyword match
+ - ❌ Orphan — no connection
+
+### Step 4: Find Stale Goals
+
+For each yearly goal:
+
+1. **Count recent activity:**
+ - Tasks completed in last 7 days
+ - Notes saved with goal tag
+ - Progress updates
+
+2. **Classify:**
+ - ✅ Active — activity in 7 days
+ - 🟡 Quiet — no activity 7-14 days
+ - 🔴 Stale — no activity 14+ days
+
+### Step 5: Generate Report
+
+Format: Telegram HTML
+
+```html
+🎯 <b>Alignment Check</b>
+
+<b>📋 Задачи без связи с целями:</b>
+{if orphan tasks:}
+• {task_name} — <i>Предложение: {goal}</i>
+{else:}
+✅ Все задачи связаны с целями
+
+<b>🎯 Цели без активности:</b>
+{if stale goals:}
+• 🔴 {goal} — {days} дней без активности
+• 🟡 {goal} — {days} дней без активности
+{else:}
+✅ Все цели активны
+
+<b>📊 Распределение по целям:</b>
+• {goal}: {N} активных задач
+• {goal}: {M} активных задач
+• Без цели: {K} задач
+
+<b>💡 Рекомендации:</b>
+{recommendations based on analysis}
+
+<b>Действия:</b>
+• <b>Начать:</b> {goal to focus on}
+• <b>Остановить:</b> {tasks not aligned}
+• <b>Продолжить:</b> {aligned work}
+```
+
+### Step 6: Suggest Fixes
+
+For orphan tasks, suggest:
+1. Which goal it might relate to
+2. Or mark as "operational"
+
+For stale goals:
+1. Suggest next action
+2. Or reconsider goal relevance
+
+## Alignment Scoring
+
+| Score | Meaning |
+|-------|---------|
+| 90-100% | Excellent alignment |
+| 70-89% | Good, minor gaps |
+| 50-69% | Needs attention |
+| <50% | Serious misalignment |
+
+```
+Score = (Aligned Tasks / Total Tasks) × 100
+```
+
+## Auto-Fix Options
+
+If enabled, agent can:
+
+1. **Add goal references** to task descriptions
+2. **Create follow-up tasks** for stale goals
+3. **Archive** completed goals
+
+## Start/Stop/Continue Framework
+
+Based on analysis, recommend:
+
+**Start:**
+- Goals with low activity that matter
+- New initiatives from stale areas
+
+**Stop:**
+- Tasks not aligned with any goal
+- Goals that no longer resonate
+
+**Continue:**
+- Well-aligned, progressing work
+- High-impact activities
diff --git a/vault/.claude/agents/inbox-processor.md b/vault/.claude/agents/inbox-processor.md
new file mode 100644
index 0000000..e3600cd
--- /dev/null
+++ b/vault/.claude/agents/inbox-processor.md
@@ -0,0 +1,171 @@
+---
+name: inbox-processor
+description: GTD-style processing of incoming entries. Decide action for each item - do now, schedule, delegate, save, or delete.
+---
+
+# Inbox Processor Agent
+
+Applies GTD methodology to process unhandled items.
+
+## When to Run
+
+- When daily file has many unprocessed entries
+- During weekly review
+- On demand via `/inbox` command
+
+## GTD Decision Tree
+
+For each entry, ask:
+
+```
+Is it actionable?
+├─ NO → Is it useful?
+│ ├─ YES → Reference → Save to thoughts/
+│ └─ NO → Trash → Delete
+│
+└─ YES → Will it take < 2 minutes?
+ ├─ YES → Do it now
+ └─ NO → Is it a single action?
+ ├─ YES → Schedule in Todoist
+ └─ NO → Create project
+```
+
+## Workflow
+
+### Step 1: Load Unprocessed Items
+
+```
+Read daily/{today}.md
+Find entries without "processed" marker
+```
+
+### Step 2: Classify Each Item
+
+Apply GTD decision tree:
+
+| Decision | Action |
+|----------|--------|
+| Do Now | Execute immediately, report done |
+| Schedule | Create task in Todoist |
+| Project | Create task + note in thoughts/projects/ |
+| Reference | Save to thoughts/{category}/ |
+| Waiting | Create task with "waiting" label |
+| Trash | Mark for deletion |
+
+### Step 3: Execute Actions
+
+**Do Now (<2 min):**
+- Simple lookups, quick replies
+- Report completion immediately
+
+**Schedule (single task):**
+```
+mcp__todoist__add-tasks
+ content: {task}
+ dueString: {date}
+ priority: {p1-p4}
+```
+
+**Project (multi-step):**
+1. Create parent task in Todoist
+2. Add subtasks for first steps
+3. Create note in thoughts/projects/
+4. Link task and note
+
+**Reference:**
+1. Classify: idea/learning/reflection
+2. Save to thoughts/{category}/
+3. Build links
+4. Update MOC
+
+**Waiting:**
+```
+mcp__todoist__add-tasks
+ content: "Waiting: {description}"
+ labels: ["waiting"]
+ dueString: "in 3 days" # follow-up
+```
+
+**Trash:**
+- Mark entry with ~~strikethrough~~
+- Or move to archive section
+
+### Step 4: Mark as Processed
+
+Add marker to each entry:
+```markdown
+## 14:30 [voice] ✓
+Content...
+```
+
+Or add footer:
+```markdown
+---
+processed: 2024-12-20T21:00:00
+```
+
+### Step 5: Generate Report
+
+Format: Telegram HTML
+
+```html
+📥 <b>Inbox Processing Complete</b>
+
+<b>📊 Обработано записей:</b> {N}
+
+<b>⚡ Сделано сразу:</b> {quick_actions}
+• {action 1}
+• {action 2}
+
+<b>📅 Запланировано:</b> {scheduled}
+• {task} <i>({date})</i>
+
+<b>🎯 Создано проектов:</b> {projects}
+• {project_name}
+
+<b>📓 Сохранено:</b> {saved}
+• {note} → {category}/
+
+<b>⏳ Ожидание:</b> {waiting}
+• {item}
+
+<b>🗑️ Удалено:</b> {deleted}
+
+<b>📭 Inbox теперь:</b> {remaining} items
+{if remaining == 0: ✨ Inbox Zero!}
+```
+
+## Quick Actions
+
+Things that can be "Done Now":
+- Simple web searches
+- Quick calculations
+- Short answers to questions
+- File organization
+- Quick message replies
+
+## Project Indicators
+
+Entry needs project if:
+- Multiple steps mentioned
+- "Need to research"
+- "Then... after that..."
+- Timeline spans days/weeks
+- Multiple people involved
+
+## Reference Categories
+
+| Keywords | Category |
+|----------|----------|
+| "интересная идея", "что если" | idea |
+| "узнал", "оказывается", "TIL" | learning |
+| "понял", "осознал", "урок" | reflection |
+| "проект", "задумка", "план" | project |
+
+## Inbox Zero Philosophy
+
+Goal is not just empty inbox, but:
+- Every item has a home
+- Decisions are made, not deferred
+- Nothing falls through cracks
+- Mind is clear for focus work
diff --git a/vault/.claude/agents/note-organizer.md b/vault/.claude/agents/note-organizer.md
new file mode 100644
index 0000000..d0467b1
--- /dev/null
+++ b/vault/.claude/agents/note-organizer.md
@@ -0,0 +1,158 @@
+---
+name: note-organizer
+description: Organize vault, find orphan notes, suggest connections, update MOC indexes, consolidate duplicates.
+---
+
+# Note Organizer Agent
+
+Keeps the vault organized and connected.
+
+## When to Run
+
+- Weekly maintenance
+- When vault grows cluttered
+- On demand via `/organize` command
+
+## Workflow
+
+### Step 1: Scan Vault
+
+```
+Glob thoughts/**/*.md
+Glob daily/**/*.md
+Glob goals/**/*.md
+```
+
+Build index of all notes with:
+- File path
+- Title
+- Tags
+- Links (outgoing)
+- Frontmatter
+
+### Step 2: Find Orphan Notes
+
+A note is orphan if:
+- No incoming links from other notes
+- Not listed in any MOC
+- Has no related notes in frontmatter
+
+```
+For each note in thoughts/:
+ Check if any other note links to it
+ Check if listed in MOC/
+ If neither → mark as orphan
+```
+
+### Step 3: Suggest Connections
+
+For each orphan note:
+
+1. **Extract keywords** from title and content
+2. **Search for related notes** using keywords
+3. **Check goals** for topic overlap
+4. **Suggest links** ranked by relevance
+
+### Step 4: Find Duplicates
+
+Look for similar notes:
+
+1. **Title similarity** — fuzzy match
+2. **Content overlap** — key phrases
+3. **Same topic** — tag match
+
+Flag potential duplicates for review.
+
+### Step 5: Update MOC Indexes
+
+For each MOC file:
+
+1. **List all notes** in corresponding category
+2. **Group by topic** or date
+3. **Add missing entries**
+4. **Remove dead links**
+
+MOC structure:
+```markdown
+# MOC: Ideas
+
+## Recent
+- [[2024-12-20-new-idea]] — Brief description
+
+## By Topic
+### AI & Voice
+- [[voice-agents-architecture]]
+- [[chatterbox-tts]]
+
+### Productivity
+- [[daily-routine-optimization]]
+```
+
+### Step 6: Generate Report
+
+Format: Telegram HTML
+
+```html
+🗂️ <b>Vault Organization Report</b>
+
+<b>📊 Статистика:</b>
+• Всего заметок: {N}
+• В thoughts/: {M}
+• В daily/: {K}
+
+<b>🔗 Связность:</b>
+• Связанных: {connected}%
+• Изолированных: {orphans}
+
+<b>📭 Orphan Notes:</b>
+{for each orphan:}
+• {note_title}
+ → Предложение: [[{suggested_link}]]
+
+<b>🔄 Возможные дубликаты:</b>
+{for each duplicate pair:}
+• {note1} ≈ {note2}
+
+<b>📑 MOC Updates:</b>
+• {moc_name}: +{added} / -{removed}
+
+<b>💡 Рекомендации:</b>
+{actionable suggestions}
+```
+
+### Step 7: Optional Auto-Fix
+
+If enabled:
+
+1. **Add backlinks** to orphan notes
+2. **Update MOC** with new entries
+3. **Merge duplicates** (with confirmation)
+
+## Connection Quality Score
+
+```
+Score = (Notes with 2+ links / Total Notes) × 100
+```
+
+| Score | Quality |
+|-------|---------|
+| 80%+ | Excellent |
+| 60-79% | Good |
+| 40-59% | Needs work |
+| <40% | Fragmented |
+
+## MOC Categories
+
+| MOC | Covers |
+|-----|--------|
+| MOC-ideas.md | thoughts/ideas/ |
+| MOC-learnings.md | thoughts/learnings/ |
+| MOC-projects.md | thoughts/projects/ |
+| MOC-reflections.md | thoughts/reflections/ |
+
+## Link Discovery Strategies
+
+1. **Topic match** — same tags or keywords
+2. **Temporal proximity** — notes from same period
+3. **Goal alignment** — notes under same goal
+4. **Reference chain** — A links to B, B links to C → suggest A↔C
diff --git a/vault/.claude/agents/weekly-digest.md b/vault/.claude/agents/weekly-digest.md
new file mode 100644
index 0000000..702f7e7
--- /dev/null
+++ b/vault/.claude/agents/weekly-digest.md
@@ -0,0 +1,138 @@
+---
+name: weekly-digest
+description: Generate weekly digest with goal progress, wins, challenges, and next week planning. Run on Sundays.
+---
+
+# Weekly Digest Agent
+
+Analyzes the past week and generates comprehensive digest report.
+
+## When to Run
+
+- Every Sunday evening
+- On demand via `/weekly` command
+
+## Workflow
+
+### Step 1: Collect Week Data
+
+1. **Read all daily files for the week:**
+ ```
+ daily/YYYY-MM-DD.md (7 files)
+ ```
+
+2. **Get completed tasks from Todoist:**
+ ```
+ mcp__todoist__find-completed-tasks
+ since: {monday}
+ until: {sunday}
+ ```
+
+3. **Get current goals:**
+ ```
+ Read goals/1-yearly-2025.md
+ Read goals/2-monthly.md
+ Read goals/3-weekly.md
+ ```
+
+### Step 2: Analyze Progress
+
+Calculate for each yearly goal:
+- Tasks completed related to goal
+- Notes saved related to goal
+- Progress delta (this week vs last week)
+
+### Step 3: Identify Wins & Challenges
+
+**Wins:**
+- Completed tasks marked as important
+- Goals with progress increase
+- Streak maintained (habits)
+
+**Challenges:**
+- Overdue tasks
+- Goals without activity
+- Incomplete ONE Big Thing
+
+### Step 4: Plan Next Week
+
+1. **Update weekly focus:**
+ - Suggest new ONE Big Thing
+ - Based on goal alignment
+
+2. **Recommend priorities:**
+ - Top 3 tasks for next week
+ - Based on goals + overdue
+
+### Step 5: Generate Report
+
+Format: Telegram HTML
+
+```html
+📅 <b>Недельный дайджест: {WEEK}</b>
+
+<b>🎯 ONE Big Thing на прошлой неделе:</b>
+{status: ✅ Выполнено | ❌ Не выполнено | 🟡 Частично}
+{description}
+
+<b>🏆 Победы недели:</b>
+• {win 1}
+• {win 2}
+• {win 3}
+
+<b>⚔️ Вызовы:</b>
+• {challenge 1}
+• {challenge 2}
+
+<b>📊 Статистика:</b>
+• Задач выполнено: {N}
+• Заметок сохранено: {M}
+• Голосовых сообщений: {K}
+
+<b>📈 Прогресс по целям:</b>
+• {goal}: {old}% → {new}% {delta_emoji}
+• {goal}: {old}% → {new}% {delta_emoji}
+
+<b>⚠️ Требует внимания:</b>
+• {stale goals or overdue items}
+
+<b>🎯 ONE Big Thing на следующую неделю:</b>
+{suggested ONE thing}
+
+<b>⚡ Топ-3 приоритета:</b>
+1. {task}
+2. {task}
+3. {task}
+
+---
+<i>Неделя {week_number} завершена</i>
+```
+
+## Progress Delta Emojis
+
+| Change | Emoji |
+|--------|-------|
+| +10% or more | 🚀 |
+| +1% to +9% | 📈 |
+| No change | ➡️ |
+| -1% to -9% | 📉 |
+| -10% or more | 🔻 |
+
+## Update Files
+
+After generating digest:
+
+1. **Archive current weekly:**
+ ```
+ Rename goals/3-weekly.md → goals/archive/3-weekly-{WEEK}.md
+ ```
+
+2. **Create new weekly:**
+ ```
+ Create goals/3-weekly.md with new ONE Big Thing
+ ```
+
+3. **Update monthly if needed:**
+ ```
+ Update progress in goals/2-monthly.md
+ ```
diff --git a/vault/.claude/rules/daily-format.md b/vault/.claude/rules/daily-format.md
new file mode 100644
index 0000000..dd091bf
--- /dev/null
+++ b/vault/.claude/rules/daily-format.md
@@ -0,0 +1,72 @@
+---
+paths: "daily/**/*.md"
+---
+
+# Daily Notes Format
+
+Rules for daily capture files in `daily/` folder.
+
+## File Naming
+
+- Format: `YYYY-MM-DD.md`
+- Example: `2024-12-20.md`
+- One file per day
+
+## Entry Format
+
+Each entry follows this structure:
+
+```markdown
+## HH:MM [type]
+Content of the entry
+```
+
+### Entry Types
+
+| Type | Description |
+|------|-------------|
+| `[voice]` | Transcribed voice message |
+| `[text]` | Direct text message |
+| `[forward from: Name]` | Forwarded message with source |
+| `[photo]` | Image with embed |
+
+### Photo Entries
+
+Photos include Obsidian embed:
+
+```markdown
+## 14:30 [photo]
+![[attachments/2024-12-20/img-143025.jpg]]
+
+Optional description or transcribed text from photo
+```
+
+## Processing Rules
+
+When processing daily files:
+
+1. **Read chronologically** — entries are timestamped
+2. **Classify each entry** — task, idea, reflection, learning, project
+3. **Check for photos** — analyze with vision if present
+4. **Extract actionable items** — create tasks in Todoist
+5. **Save valuable thoughts** — move to `thoughts/` categories
+6. **Mark as processed** — after successful processing
+
+## Do NOT
+
+- Modify original entries
+- Delete entries before archiving
+- Change timestamps
+- Add content between entries
+
+## After Processing
+
+Add processing marker at end of file:
+
+```markdown
+---
+processed: 2024-12-20T21:00:00
+thoughts: 3
+tasks: 2
+---
+```
diff --git a/vault/.claude/rules/goals-format.md b/vault/.claude/rules/goals-format.md
new file mode 100644
index 0000000..e754abb
--- /dev/null
+++ b/vault/.claude/rules/goals-format.md
@@ -0,0 +1,103 @@
+---
+paths: "goals/**/*.md"
+---
+
+# Goals Format
+
+Rules for goal files in `goals/` folder.
+
+## File Structure
+
+```
+goals/
+├── 0-vision-3y.md # 3-year vision by life areas
+├── 1-yearly-2025.md # Annual goals with quarterly breakdown
+├── 2-monthly.md # Current month priorities
+└── 3-weekly.md # This week's focus + ONE Big Thing
+```
+
+## Hierarchy Principle
+
+Goals cascade from long-term to daily:
+
+```
+3-Year Vision (life direction)
+ → Yearly Goals (annual objectives)
+ → Monthly Focus (current priorities)
+ → Weekly Plan (this week's actions)
+ → Daily Tasks (today in Todoist)
+```
+
+## Required Frontmatter
+
+```yaml
+---
+type: vision | yearly | monthly | weekly
+period: 2025 | 2024-12 | 2024-W51
+updated: YYYY-MM-DD
+---
+```
+
+## Progress Tracking
+
+Use consistent progress format:
+
+| Symbol | Meaning |
+|--------|---------|
+| 🔴 | 0-25% — Not started |
+| 🟡 | 26-50% — In progress |
+| 🟢 | 51-75% — Good progress |
+| ✅ | 76-100% — Complete |
+
+Example:
+```markdown
+| Goal | Progress | Status |
+|------|----------|--------|
+| Ship MVP | 65% | 🟢 |
+| Fitness routine | 30% | 🟡 |
+```
+
+## ONE Big Thing
+
+Weekly file MUST contain ONE Big Thing:
+
+```markdown
+## ONE Big Thing
+
+> **If I accomplish nothing else, I will:**
+> [Single most important outcome]
+```
+
+This is read by dbrain-processor for context.
+
+## Goal Limits
+
+- **Yearly:** Max 3 goals per life area
+- **Monthly:** Max 3 top priorities
+- **Weekly:** ONE Big Thing + 3 Must Do tasks
+
+## Linking Goals to Tasks
+
+When creating tasks, reference goals:
+
+```markdown
+- [ ] [Task] — Связь: [[1-yearly-2025#Career]]
+```
+
+## Stale Goal Warning
+
+Goals without activity for 7+ days trigger warning in report.
+
+Track "last touched" via:
+- Task completion in Todoist
+- Note saved related to goal
+- Progress % update
+
+## Review Cadence
+
+| Level | Review Frequency |
+|-------|------------------|
+| Vision | Quarterly |
+| Yearly | Monthly |
+| Monthly | Weekly |
+| Weekly | Daily |
diff --git a/vault/.claude/rules/telegram-report.md b/vault/.claude/rules/telegram-report.md
new file mode 100644
index 0000000..153aae1
--- /dev/null
+++ b/vault/.claude/rules/telegram-report.md
@@ -0,0 +1,136 @@
+---
+paths: "**/REPORT*.md"
+---
+
+# Telegram Report Formatting
+
+Rules for generating HTML reports for Telegram.
+
+## CRITICAL: Output Format
+
+**Return RAW HTML only. No markdown wrappers.**
+
+WRONG:
+```html
+<b>Title</b>
+```
+
+CORRECT:
+<b>Title</b>
+
+The output goes directly to Telegram `parse_mode=HTML`. Any markdown syntax will break parsing.
+
+## Allowed Tags
+
+- `<b>` or `<strong>` — bold (section headers)
+- `<i>` or `<em>` — italic (metadata, clarifications)
+- `<code>` — inline code (commands, paths)
+- `<pre>` — code blocks (rarely needed)
+- `<s>`, `<strike>`, `<del>` — strikethrough
+- `<u>` — underline
+- `<a href="url">text</a>` — links
+
+## FORBIDDEN
+
+- Markdown syntax: `**`, `##`, `-`, `*`, backticks
+- Markdown code blocks: triple backticks
+- Tables (not supported by Telegram)
+- Unsupported tags: `<div>`, `<span>`, `<br>`, `<p>`, `<table>`
+- Unescaped `<` and `>` in text (use `&lt;` `&gt;`)
+- Nested same tags: `<b><b>text</b></b>`
+
+## Report Template
+
+📊 <b>Обработка за {DATE}</b>
+
+<b>🎯 Текущий фокус:</b>
+{ONE_BIG_THING from goals/3-weekly.md}
+
+<b>📓 Сохранено мыслей:</b> {N}
+• {emoji} {title} → {category}/
+
+<b>✅ Создано задач:</b> {M}
+• {task_name} <i>({priority}, {due_date})</i>
+
+<b>📅 Загрузка на неделю:</b>
+Пн: {n} | Вт: {n} | Ср: {n} | Чт: {n} | Пт: {n} | Сб: {n} | Вс: {n}
+
+<b>⚠️ Требует внимания:</b>
+• {count} просроченных задач
+• Цель "{goal}" без активности {days} дней
+
+<b>🔗 Новые связи:</b>
+• [[Note A]] ↔ [[Note B]]
+
+<b>⚡ Топ-3 приоритета на завтра:</b>
+1. {task} <i>({goal link if exists})</i>
+2. {task}
+3. {task}
+
+<b>📈 Прогресс по целям:</b>
+• {goal}: {progress}% {status_emoji}
+
+---
+<i>Обработано за {time}</i>
+
+## Section Emojis
+
+📊 Title
+🎯 Focus
+📓 Thoughts saved
+✅ Tasks created
+📅 Week load
+⚠️ Attention needed
+🔗 New links
+⚡ Priorities
+📈 Goal progress
+
+## Category Emojis (Thoughts)
+
+💡 idea
+🪞 reflection
+🎯 project
+📚 learning
+
+## Priority Format
+
+p1 → <i>(p1, urgent)</i>
+p2 → <i>(p2, {date})</i>
+p3 → <i>(p3, {date})</i>
+p4 → <i>(no priority)</i>
+
+## Progress Emojis
+
+🔴 0-25%
+🟡 26-50%
+🟢 51-75%
+✅ 76-100%
+
+## Error Report
+
+❌ <b>Ошибка обработки</b>
+
+<b>Причина:</b> {error_message}
+
+<b>Файл:</b> <code>{file_path}</code>
+
+<i>Попробуйте /process снова или проверьте логи</i>
+
+## Empty Report
+
+📭 <b>Нет записей для обработки</b>
+
+Файл <code>daily/{date}.md</code> пуст или не найден.
+
+<i>Добавьте голосовые сообщения или текст в течение дня</i>
+
+## Validation Rules
+
+Before sending report:
+1. All tags are properly closed
+2. No raw < or > in text
+3. No markdown syntax anywhere
+4. No tables
+5. Total length under 4096 characters
+
+If over 4096 chars, truncate "Новые связи" section first.
diff --git a/vault/.claude/rules/thoughts-format.md b/vault/.claude/rules/thoughts-format.md
new file mode 100644
index 0000000..f620354
--- /dev/null
+++ b/vault/.claude/rules/thoughts-format.md
@@ -0,0 +1,109 @@
+---
+paths: "thoughts/**/*.md"
+---
+
+# Thoughts Format
+
+Rules for notes in `thoughts/` folder and its subfolders.
+
+## Folder Structure
+
+```
+thoughts/
+├── ideas/ # Creative ideas, concepts
+├── reflections/ # Personal reflections, lessons
+├── projects/ # Project-related notes
+└── learnings/ # Knowledge, discoveries
+```
+
+## File Naming
+
+- Format: `YYYY-MM-DD-slug.md`
+- Slug: lowercase, hyphens, descriptive
+- Example: `2024-12-20-voice-agent-architecture.md`
+
+## Frontmatter (Required)
+
+```yaml
+---
+date: 2024-12-20
+type: idea | reflection | project | learning
+tags: [relevant, tags]
+source: daily/2024-12-20.md
+related: []
+---
+```
+
+## Content Structure
+
+```markdown
+# Title
+
+## Summary
+One paragraph summary of the key insight.
+
+## Details
+Full content of the thought.
+
+## Action Items
+- [ ] Any tasks that emerged
+- [ ] Follow-up actions
+
+## Related
+- [[Link to related note]]
+- [[goals/1-yearly-2025#Section]]
+```
+
+## Tags Convention
+
+Use hierarchical tags:
+
+```
+#type/idea
+#type/learning
+#topic/ai
+#topic/productivity
+#project/d-brain
+#status/active
+```
+
+## Wiki-Links
+
+When saving a thought:
+
+1. **Search for related notes** in thoughts/
+2. **Check MOC indexes** for topic clusters
+3. **Link to relevant goals** in goals/
+4. **Add backlinks** to source daily note
+
+Example:
+```markdown
+Extracted from [[daily/2024-12-20]].
+Related to [[Voice Agents]] and [[goals/1-yearly-2025#AI Development]].
+```
+
+## Category Guidelines
+
+### ideas/
+- Novel concepts, inventions
+- Business ideas
+- Creative solutions
+- "What if..." thoughts
+
+### reflections/
+- Personal insights
+- Lessons learned
+- Emotional processing
+- Gratitude, wins
+
+### projects/
+- Project-specific notes
+- Meeting notes
+- Status updates
+- Decisions made
+
+### learnings/
+- New knowledge
+- Book/article insights
+- Technical discoveries
+- "TIL" moments
diff --git a/vault/.claude/skills/dbrain-processor/SKILL.md b/vault/.claude/skills/dbrain-processor/SKILL.md
new file mode 100644
index 0000000..0c51d51
--- /dev/null
+++ b/vault/.claude/skills/dbrain-processor/SKILL.md
@@ -0,0 +1,182 @@
+---
+name: second-brain-processor
+description: Personal assistant for processing daily voice/text entries from Telegram. Classifies content, creates Todoist tasks aligned with goals, saves thoughts to Obsidian with wiki-links, generates HTML reports. Triggers on /process command or daily 21:00 cron.
+---
+
+# Second Brain Processor
+
+Process daily entries → tasks (Todoist) + thoughts (Obsidian) + HTML report (Telegram).
+
+## CRITICAL: Output Format
+
+**ALWAYS return RAW HTML. No exceptions. No markdown. Ever.**
+
+Your final output goes directly to Telegram with `parse_mode=HTML`.
+
+Rules:
+1. ALWAYS return HTML report — even if entries already processed
+2. ALWAYS use the template below — no free-form text
+3. NEVER use markdown syntax (**, ##, ```, -)
+4. NEVER explain what you did in plain text — put it in HTML report
+
+WRONG:
+```html
+<b>Title</b>
+```
+
+CORRECT:
+<b>Title</b>
+
+## MCP Tools Required
+
+mcp__todoist__add-tasks — Create tasks
+mcp__todoist__find-tasks — Check duplicates
+mcp__todoist__find-tasks-by-date — Check workload
+
+## CRITICAL: MCP Tool Usage
+
+**НИКАКИХ WORKAROUNDS. НИКАКИХ "добавь вручную". ТОЛЬКО ПРЯМЫЕ ВЫЗОВЫ.**
+
+У тебя ЕСТЬ доступ к MCP tools:
+- `mcp__todoist__add-tasks`
+- `mcp__todoist__find-tasks`
+- `mcp__todoist__find-tasks-by-date`
+- `mcp__todoist__complete-tasks`
+- `mcp__todoist__update-tasks`
+
+ЗАПРЕЩЕНО:
+- Писать "MCP недоступен"
+- Предлагать "добавь вручную"
+- Использовать subprocess для вызова CLI
+- Делать HTTP запросы к API напрямую
+- Выводить команды для копирования
+
+ОБЯЗАТЕЛЬНО:
+- Вызывать `mcp__todoist__add-tasks` tool напрямую
+- Если tool вернул ошибку — включить её в отчёт
+- Если task создан — включить task ID в отчёт
+
+При ошибке MCP tool — показать ТОЧНУЮ ошибку от tool, не придумывать отговорки.
+
+## Processing Flow
+
+1. Load context — Read goals/3-weekly.md (ONE Big Thing), goals/2-monthly.md
+2. Check workload — find-tasks-by-date for 7 days
+3. Read daily — daily/YYYY-MM-DD.md
+4. Process entries — Classify → task or thought
+5. Build links — Connect notes with [[wiki-links]]
+6. Generate HTML report — RAW HTML for Telegram
+
+## Entry Format
+
+## HH:MM [type]
+Content
+
+Types: [voice], [text], [forward from: Name], [photo]
+
+## Classification
+
+task → Todoist (see references/todoist.md)
+idea/reflection/learning → thoughts/ (see references/classification.md)
+
+## Priority Rules
+
+p1 — Client deadline, urgent
+p2 — Aligns with ONE Big Thing or monthly priority
+p3 — Aligns with yearly goal
+p4 — Operational, no goal alignment
+
+## Thought Categories
+
+💡 idea → thoughts/ideas/
+🪞 reflection → thoughts/reflections/
+🎯 project → thoughts/projects/
+📚 learning → thoughts/learnings/
+
+## HTML Report Template
+
+Output RAW HTML (no markdown, no code blocks):
+
+📊 <b>Обработка за {DATE}</b>
+
+<b>🎯 Текущий фокус:</b>
+{ONE_BIG_THING}
+
+<b>📓 Сохранено мыслей:</b> {N}
+• {emoji} {title} → {category}/
+
+<b>✅ Создано задач:</b> {M}
+• {task} <i>({priority}, {due})</i>
+
+<b>📅 Загрузка на неделю:</b>
+Пн: {n} | Вт: {n} | Ср: {n} | Чт: {n} | Пт: {n} | Сб: {n} | Вс: {n}
+
+<b>⚠️ Требует внимания:</b>
+• {overdue or stale goals}
+
+<b>🔗 Новые связи:</b>
+• [[Note A]] ↔ [[Note B]]
+
+<b>⚡ Топ-3 приоритета:</b>
+1. {task}
+2. {task}
+3. {task}
+
+<b>📈 Прогресс:</b>
+• {goal}: {%} {emoji}
+
+---
+<i>Обработано за {duration}</i>
+
+## If Already Processed
+
+If all entries have `<!-- ✓ processed -->` marker, return status report:
+
+📊 <b>Статус за {DATE}</b>
+
+<b>🎯 Текущий фокус:</b>
+{ONE_BIG_THING}
+
+<b>📅 Загрузка на неделю:</b>
+Пн: {n} | Вт: {n} | Ср: {n} | Чт: {n} | Пт: {n} | Сб: {n} | Вс: {n}
+
+<b>⚠️ Требует внимания:</b>
+• {overdue count} просроченных
+• {today count} на сегодня
+
+<b>⚡ Топ-3 приоритета:</b>
+1. {task}
+2. {task}
+3. {task}
+
+---
+<i>Записи уже обработаны ранее</i>
+
+## Allowed HTML Tags
+
+<b> — bold (headers)
+<i> — italic (metadata)
+<code> — commands, paths
+<s> — strikethrough
+<u> — underline
+<a href="url">text</a> — links
+
+## FORBIDDEN in Output
+
+NO markdown: **, ##, -, *, backticks
+NO code blocks (triple backticks)
+NO tables
+NO unsupported tags: div, span, br, p, table
+
+Max length: 4096 characters.
+
+## References
+
+Read these files as needed:
+- references/about.md — User profile, decision filters
+- references/classification.md — Entry classification rules
+- references/todoist.md — Task creation details
+- references/goals.md — Goal alignment logic
+- references/links.md — Wiki-links building
+- references/rules.md — Mandatory processing rules
+- references/report-template.md — Full HTML report spec
diff --git a/vault/.claude/skills/dbrain-processor/references/about.md b/vault/.claude/skills/dbrain-processor/references/about.md
new file mode 100644
index 0000000..40254bd
--- /dev/null
+++ b/vault/.claude/skills/dbrain-processor/references/about.md
@@ -0,0 +1,81 @@
+# About User - System Profile
+
+## Core Identity
+
+**[Your Name], [Age]** — [Your Role/Position]
+
+- [Your company/occupation]
+- [Key clients or projects]
+- [Years of experience]
+- [Primary role description]
+
+## Primary Operating Mode
+
+- [How you think and work]
+- [Your decision-making style]
+- [What you value in work]
+- [Communication preferences]
+
+## Strategic Focus
+
+1. [Primary goal]
+2. [Secondary goal]
+3. [Third goal]
+
+## Work Domains
+
+Key contexts for classifying notes:
+
+| Domain | Examples |
+|--------|----------|
+| **Work** | projects, tasks, meetings, deadlines |
+| **Learning** | courses, books, insights, skills |
+| **Ideas** | product ideas, improvements, innovations |
+| **Personal** | health, family, hobbies, routines |
+
+## Personal Context
+
+- Family: [situation]
+- Interests: [hobbies]
+- Work style: [morning person, etc.]
+- Languages: [languages you use]
+
+## Goals Hierarchy
+
+1. [Primary life goal]
+2. [Secondary goal]
+3. [Third goal]
+4. [Fourth goal]
+
+## Decision Filters
+
+When evaluating ideas and tasks:
+- [Question 1]
+- [Question 2]
+- [Question 3]
+- [Question 4]
+
+## Notes Processing Preferences
+
+### Language and Style
+- [Your language preferences]
+- [Terminology preferences]
+- [Formatting preferences]
+
+### Structure
+Preferred format:
+```
+Context → Insight → Implication → Next Action
+```
+
+### Prioritization
+- **Urgent**: [what counts as urgent] → p1-p2
+- **Strategic**: [what counts as strategic] → p3-p4
+
+## Anti-Patterns (AVOID)
+
+When processing entries DO NOT:
+- Create abstract notes without action items
+- Make tasks too vague like "think about..."
+- Duplicate content without synthesis
+- Create lists without priorities
diff --git a/vault/.claude/skills/dbrain-processor/references/classification.md b/vault/.claude/skills/dbrain-processor/references/classification.md
new file mode 100644
index 0000000..14ad7f4
--- /dev/null
+++ b/vault/.claude/skills/dbrain-processor/references/classification.md
@@ -0,0 +1,177 @@
+# Entry Classification
+
+## Work Domains → Categories
+
+Based on user's work context (see [ABOUT.md](ABOUT.md)):
+
+### Client Work
+Брифы, стратегии, креатив, кампании, KPI, предложения
+
+**Keywords:** Pepsi, Haval, Lactalis, Chevrolet, OQ, Beeline, Honor, клиент, бриф, презентация, дедлайн, KPI
+
+**→ Category:** task (p1-p2) → Todoist
+
+### AI & Tech
+Инструменты, модели, промпты, пайплайны, агенты
+
+**Keywords:** GPT, Claude, модель, агент, API, пайплайн, автоматизация, интеграция
+
+**→ Category:** learning или project → thoughts/
+
+### Product
+Идеи, гипотезы, MVP, юнит-экономика
+
+**Keywords:** продукт, SaaS, MVP, гипотеза, монетизация, юнит-экономика, стартап
+
+**→ Category:** idea или project → thoughts/
+
+### Agency Ops
+Команда, процессы, автоматизация, найм, управление, финансы
+
+**Keywords:** команда, найм, процесс, HR, финансы, TDI, агентство
+
+**→ Category:** task или project (depends on urgency)
+
+### Content
+Посты, идеи, тезисы для Telegram и LinkedIn
+
+**Keywords:** пост, @aimastersme, LinkedIn, контент, тезис, статья
+
+**→ Category:** idea → thoughts/ideas/ или task если с дедлайном
+
+---
+
+## Decision Tree
+
+```
+Entry text contains...
+│
+├─ Client brand or deadline? ────────────────────> TASK (p1-p2)
+│ (Pepsi, Haval, клиент, дедлайн, презентация)
+│
+├─ Operational/urgent? ──────────────────────────> TASK (p2-p3)
+│ (нужно сделать, не забыть, позвонить, встреча)
+│
+├─ AI/tech learning? ────────────────────────────> LEARNING
+│ (узнал, модель, агент, интеграция)
+│
+├─ Product/SaaS idea? ───────────────────────────> IDEA или PROJECT
+│ (продукт, MVP, гипотеза, SaaS)
+│
+├─ Strategic thinking? ──────────────────────────> PROJECT
+│ (стратегия, план, R&D, долгосрочно)
+│
+├─ Personal insight? ────────────────────────────> REFLECTION
+│ (понял, осознал, философия)
+│
+└─ Content idea? ────────────────────────────────> IDEA
+ (пост, тезис, контент)
+```
+
+## Apply Decision Filters
+
+Перед сохранением спроси:
+- Это масштабируется?
+- Это можно автоматизировать?
+- Это усиливает экспертизу или бренд?
+- Это приближает к продукту или SaaS?
+
+Если да на 2+ вопроса → повысить приоритет.
+
+---
+
+## Photo Entries
+
+For `[photo]` entries:
+
+1. Analyze image content via vision
+2. Determine domain:
+ - Screenshot клиентского материала → Client Work
+ - Схема/диаграмма → AI & Tech или Product
+ - Текст/статья → Learning
+3. Add description to daily file
+
+---
+
+## Output Locations
+
+| Category | Destination | Priority |
+|----------|-------------|----------|
+| task (client) | Todoist | p1-p2 |
+| task (ops) | Todoist | p2-p3 |
+| task (content) | Todoist | p3-p4 |
+| idea | thoughts/ideas/ | — |
+| reflection | thoughts/reflections/ | — |
+| project | thoughts/projects/ | — |
+| learning | thoughts/learnings/ | — |
+
+---
+
+## File Naming
+
+```
+thoughts/{category}/{YYYY-MM-DD}-short-title.md
+```
+
+Examples:
+```
+thoughts/ideas/2024-12-16-saas-pricing-model.md
+thoughts/projects/2024-12-16-ai-agents-pipeline.md
+thoughts/learnings/2024-12-16-claude-mcp-setup.md
+```
+
+---
+
+## Thought Structure
+
+Use preferred format:
+
+```markdown
+---
+date: {YYYY-MM-DD}
+type: {category}
+domain: {Client Work|AI & Tech|Product|Agency Ops|Content}
+tags: [tag1, tag2]
+---
+
+## Context
+[Что привело к мысли]
+
+## Insight
+[Ключевая идея]
+
+## Implication
+[Что это значит для TDI/продукта/стратегии]
+
+## Next Action
+[Конкретный шаг — не абстрактный]
+```
+
+---
+
+## Anti-Patterns (ИЗБЕГАТЬ)
+
+При создании мыслей НЕ делать:
+- Абстрактные рассуждения без Next Action
+- Академическая теория без применения к TDI/продукту
+- Повторы без синтеза (кластеризуй похожие!)
+- Хаотичные списки без приоритетов
+- Задачи типа "подумать о..." (конкретизируй!)
+
+---
+
+## MOC Updates
+
+After creating thought file, add link to:
+```
+MOC/MOC-{category}s.md
+```
+
+Group by domain when relevant:
+```markdown
+## AI & Tech
+- [[2024-12-16-claude-mcp-setup]] - MCP integration
+
+## Product
+- [[2024-12-16-saas-pricing-model]] - Pricing research
+```
diff --git a/vault/.claude/skills/dbrain-processor/references/goals.md b/vault/.claude/skills/dbrain-processor/references/goals.md
new file mode 100644
index 0000000..79fd7ad
--- /dev/null
+++ b/vault/.claude/skills/dbrain-processor/references/goals.md
@@ -0,0 +1,135 @@
+# Goals Integration
+
+## ALWAYS Do First
+
+Before processing daily entries:
+
+1. **Read current focus:**
+ ```
+ Read goals/3-weekly.md → Extract ONE Big Thing
+ ```
+
+2. **Read yearly goals:**
+ ```
+ Read goals/1-yearly-2025.md → Know active goals by area
+ ```
+
+3. **Check monthly priorities:**
+ ```
+ Read goals/2-monthly.md → Top 3 priorities
+ ```
+
+## Goal Alignment
+
+When creating a task, ask:
+
+1. **Does it connect to ONE Big Thing?**
+ - Yes → add to task description: `→ Weekly focus`
+ - No → continue checking
+
+2. **Does it connect to monthly priority?**
+ - Yes → add: `→ Monthly: [Priority name]`
+ - No → continue checking
+
+3. **Does it connect to yearly goal?**
+ - Yes → add: `→ Goal: [Goal name]`
+ - No → mark as "operational"
+
+## Task Priority Boost
+
+If task aligns with goals, consider priority bump:
+
+| Alignment | Default | Boost to |
+|-----------|---------|----------|
+| ONE Big Thing | p3 | p2 |
+| Monthly priority | p3 | p2-p3 |
+| Yearly goal | p4 | p3 |
+| No alignment | p4 | p4 |
+
+## Saving Thoughts
+
+When saving to thoughts/:
+
+1. **Check goal relevance:**
+ - Scan goals/1-yearly-2025.md for matching areas
+ - If matches → add link in frontmatter:
+ ```yaml
+ related:
+ - "[[goals/1-yearly-2025#Career & Business]]"
+ ```
+
+2. **Tag with goal area:**
+ ```
+ #goal/career
+ #goal/health
+ #goal/learning
+ ```
+
+## Goal Progress Tracking
+
+Track goal activity by:
+
+- Task created → goal is "active"
+- Thought saved → goal is "active"
+- No activity 7+ days → "stale"
+- No activity 14+ days → "warning"
+
+## Report Section
+
+Add to report:
+
+```
+<b>📈 Прогресс по целям:</b>
+{for each active yearly goal with recent activity:}
+• {goal}: {progress}% {status_emoji}
+
+{if stale goals:}
+<b>⚠️ Требует внимания:</b>
+• Цель "{goal}" без активности {days} дней
+```
+
+## Goal File Parsing
+
+### 3-weekly.md — Find ONE Big Thing
+
+Look for pattern:
+```markdown
+> **If I accomplish nothing else, I will:**
+> [THE ONE THING]
+```
+
+### 1-yearly-2025.md — Find Active Goals
+
+Look for tables:
+```markdown
+| Goal | Progress | Status |
+|------|----------|--------|
+| Goal name | X% | 🟡 |
+```
+
+### 2-monthly.md — Find Top 3
+
+Look for section:
+```markdown
+## Top 3 Priorities
+
+1. **[Priority 1]**
+2. **[Priority 2]**
+3. **[Priority 3]**
+```
+
+## Example Alignment
+
+Entry: "Нужно подготовить презентацию для клиента X"
+
+Check:
+- ONE Big Thing: "Ship MVP" → Not related
+- Monthly #1: "Client deliverables" → ✅ Related
+- Yearly: "Client Revenue" → ✅ Related
+
+Result:
+```
+Task: Подготовить презентацию для клиента X
+Description: → Monthly: Client deliverables → Goal: Client Revenue
+Priority: p2 (boosted from p3)
+```
diff --git a/vault/.claude/skills/dbrain-processor/references/links.md b/vault/.claude/skills/dbrain-processor/references/links.md
new file mode 100644
index 0000000..e5f1d9e
--- /dev/null
+++ b/vault/.claude/skills/dbrain-processor/references/links.md
@@ -0,0 +1,161 @@
+# Wiki-Links Building
+
+## Purpose
+
+Build connections between notes to create a knowledge graph.
+
+## When Saving a Thought
+
+### Step 1: Search for Related Notes
+
+Search thoughts/ for related content:
+
+```
+Grep "keyword1" in thoughts/**/*.md
+Grep "keyword2" in thoughts/**/*.md
+```
+
+Keywords to search:
+- Main topic of the thought
+- Key entities (people, projects, technologies)
+- Domain terms
+
+### Step 2: Check MOC Indexes
+
+Read relevant MOC files:
+
+```
+MOC/
+├── MOC-ideas.md
+├── MOC-projects.md
+├── MOC-learnings.md
+└── MOC-reflections.md
+```
+
+Find related entries.
+
+### Step 3: Link to Goals
+
+Check if thought relates to goals:
+
+```
+Read goals/1-yearly-2025.md
+Find matching goal areas
+```
+
+### Step 4: Add Links to Note
+
+In the thought file, add:
+
+**In frontmatter:**
+```yaml
+related:
+ - "[[thoughts/ideas/2024-12-15-voice-agents.md]]"
+ - "[[goals/1-yearly-2025#AI Development]]"
+```
+
+**In content (inline):**
+```markdown
+This connects to [[Voice Agents Architecture]] we explored earlier.
+```
+
+**In Related section:**
+```markdown
+## Related
+- [[Previous related thought]]
+- [[Project this belongs to]]
+- [[Goal this supports]]
+```
+
+### Step 5: Update MOC Index
+
+Add new note to appropriate MOC:
+
+```markdown
+# MOC: Ideas
+
+## Recent
+- [[thoughts/ideas/2024-12-20-new-idea.md]] — Brief description
+
+## By Topic
+### AI & Voice
+- [[thoughts/ideas/2024-12-20-new-idea.md]]
+- [[thoughts/ideas/2024-12-15-voice-agents.md]]
+```
+
+### Step 6: Add Backlinks
+
+In related notes, add backlink to new note if highly relevant.
+
+## Link Format
+
+### Internal Links
+```markdown
+[[Note Name]] # Simple link
+[[Note Name|Display Text]] # With alias
+[[folder/Note Name]] # With path
+[[Note Name#Section]] # To heading
+```
+
+### Link to Goals
+```markdown
+[[goals/1-yearly-2025#Career & Business]]
+[[goals/3-weekly]] — ONE Big Thing
+```
+
+## Report Section
+
+Track new links created:
+
+```
+<b>🔗 Новые связи:</b>
+• [[Note A]] ↔ [[Note B]]
+• [[New Thought]] → [[Related Project]]
+```
+
+## Example Workflow
+
+New thought: "Chatterbox TTS can be used for voice agents"
+
+1. **Search:**
+ - Grep "voice" in thoughts/ → finds [[Voice Agents Architecture]]
+ - Grep "TTS" in thoughts/ → no results
+ - Grep "Chatterbox" → no results
+
+2. **Check MOC:**
+ - MOC-learnings.md has "AI & Voice" section
+
+3. **Goals:**
+ - 1-yearly-2025.md has "AI Development" goal
+
+4. **Create links:**
+ ```yaml
+ related:
+ - "[[thoughts/ideas/voice-agents-architecture.md]]"
+ - "[[goals/1-yearly-2025#AI Development]]"
+ ```
+
+5. **Update MOC-learnings.md:**
+ ```markdown
+ ### AI & Voice
+ - [[thoughts/learnings/2024-12-20-chatterbox-tts.md]] — TTS for voice agents
+ ```
+
+6. **Report:**
+ ```
+ <b>🔗 Новые связи:</b>
+ • [[Chatterbox TTS]] ↔ [[Voice Agents Architecture]]
+ ```
+
+## Orphan Detection
+
+A note is "orphan" if:
+- No incoming links from other notes
+- No related notes in frontmatter
+- Not listed in any MOC
+
+Flag orphans for review:
+```
+<b>⚠️ Изолированные заметки:</b>
+• [[thoughts/ideas/orphan-note.md]]
+```
diff --git a/vault/.claude/skills/dbrain-processor/references/report-template.md b/vault/.claude/skills/dbrain-processor/references/report-template.md
new file mode 100644
index 0000000..6103607
--- /dev/null
+++ b/vault/.claude/skills/dbrain-processor/references/report-template.md
@@ -0,0 +1,130 @@
+# HTML Report Template
+
+## CRITICAL: Output Format
+
+**Return RAW HTML text only. No markdown wrappers.**
+
+WRONG (markdown code block):
+```html
+<b>Title</b>
+```
+
+CORRECT (raw HTML):
+<b>Title</b>
+
+Output goes directly to Telegram `parse_mode=HTML`.
+
+## Allowed Tags
+
+<b> or <strong> — bold
+<i> or <em> — italic
+<code> — inline code
+<pre> — code blocks
+<s> or <strike> or <del> — strikethrough
+<u> — underline
+<a href="url">text</a> — links
+
+## FORBIDDEN
+
+NO markdown: **, ##, -, *, backticks
+NO code blocks with triple backticks
+NO tables (Telegram doesn't support)
+NO unsupported tags: div, span, br, p, table, tr, td
+
+## Template
+
+📊 <b>Обработка за {DATE}</b>
+
+<b>🎯 Текущий фокус:</b>
+{ONE_BIG_THING from goals/3-weekly.md}
+
+<b>📓 Сохранено мыслей:</b> {N}
+• {emoji} {title} → {category}/
+
+<b>✅ Создано задач:</b> {M}
+• {task_name} <i>({priority}, {due})</i>
+
+<b>📅 Загрузка на неделю:</b>
+Пн: {n} | Вт: {n} | Ср: {n} | Чт: {n} | Пт: {n} | Сб: {n} | Вс: {n}
+
+<b>⚠️ Требует внимания:</b>
+• {count} просроченных задач
+• Цель "{goal}" без активности {days} дней
+
+<b>🔗 Новые связи:</b>
+• [[Note A]] ↔ [[Note B]]
+
+<b>⚡ Топ-3 приоритета на завтра:</b>
+1. {task} <i>({goal if aligned})</i>
+2. {task}
+3. {task}
+
+<b>📈 Прогресс по целям:</b>
+• {goal_name}: {progress}% {emoji}
+
+---
+<i>Обработано за {duration}</i>
+
+## Section Rules
+
+### Focus (🎯)
+Read from goals/3-weekly.md, find "ONE Big Thing" section.
+If not found: "Не задан — обновите goals/3-weekly.md"
+
+### Thoughts (📓)
+Count saved, list with category emoji:
+💡 idea, 🪞 reflection, 🎯 project, 📚 learning
+
+### Tasks (✅)
+Count created, list with priority and due date.
+Format: • Task name <i>(p2, friday)</i>
+
+### Week Load (📅)
+Call find-tasks-by-date for 7 days.
+Format: Пн: 4 | Вт: 2 | ...
+
+### Attention (⚠️)
+Show only if issues exist.
+Check overdue tasks and stale goals (7+ days no activity).
+
+### Links (🔗)
+Show only if new links created.
+Format: • [[Note A]] ↔ [[Note B]]
+
+### Priorities (⚡)
+Get tomorrow's tasks from Todoist, sort by priority, show top 3.
+
+### Goals Progress (📈)
+Read goals/1-yearly-2026.md, show goals with recent activity.
+Emojis: 🔴 0-25%, 🟡 26-50%, 🟢 51-75%, ✅ 76-100%
+
+## Error Report
+
+❌ <b>Ошибка обработки</b>
+
+<b>Причина:</b> {error_message}
+<b>Файл:</b> <code>{file_path}</code>
+
+<i>Попробуйте /process снова</i>
+
+## Empty Report
+
+📭 <b>Нет записей для обработки</b>
+
+Файл <code>daily/{date}.md</code> пуст.
+
+<i>Добавьте записи в течение дня</i>
+
+## Length Limit
+
+Telegram max: 4096 characters.
+If exceeds: truncate "Новые связи" first, then keep only top 3 goals.
+
+## Validation Checklist
+
+Before returning report:
+1. All tags closed
+2. No raw < or > in text (use &lt; &gt;)
+3. No markdown syntax
+4. No tables
+5. Length under 4096 chars
diff --git a/vault/.claude/skills/dbrain-processor/references/rules.md b/vault/.claude/skills/dbrain-processor/references/rules.md
new file mode 100644
index 0000000..4f2fe0e
--- /dev/null
+++ b/vault/.claude/skills/dbrain-processor/references/rules.md
@@ -0,0 +1,85 @@
+# Critical Processing Rules
+
+See [ABOUT.md](ABOUT.md) for user context and preferences.
+
+## Rule 1: Skip Processed Entries
+
+```
+If entry contains `<!-- ✓ processed` → SKIP COMPLETELY
+```
+
+Check AFTER each `## HH:MM` header for the marker.
+
+## Rule 2: Every Task = Date
+
+**NEVER create a task without `dueString`:**
+
+| Text | dueString |
+|------|-----------|
+| завтра | tomorrow |
+| в пятницу | friday |
+| на этой неделе | friday |
+| в четверг | thursday |
+| 15 января | January 15 |
+| NOT SPECIFIED | in 3 days |
+
+## Rule 3: Check Duplicates
+
+**BEFORE creating any task:**
+
+1. Call `find-tasks` with key words from task
+2. If similar task exists → **DO NOT CREATE**
+3. Mark as: `<!-- ✓ processed: task (duplicate) -->`
+
+## Rule 4: Consider Workload
+
+**BEFORE creating tasks:**
+
+1. Call `find-tasks-by-date` with `startDate: "today"`, `daysCount: 7`
+2. Count tasks per day
+3. If target day has 3+ tasks → shift to next day with less load
+
+## Rule 5: Mark After Processing
+
+After EACH processed entry, add marker:
+
+```markdown
+<!-- ✓ processed: {category} -->
+```
+
+For tasks with details:
+```markdown
+<!-- ✓ processed: task → Todoist: {name} {priority} {date} -->
+```
+
+## Rule 6: Apply Decision Filters
+
+Before saving any thought or task, check:
+- Это масштабируется?
+- Это можно автоматизировать?
+- Это усиливает экспертизу TDI?
+- Это приближает к продукту/SaaS?
+
+If 2+ yes → boost priority.
+
+## Rule 7: Avoid Anti-Patterns
+
+NEVER create:
+- Абстрактные задачи без Next Action ("Подумать о...")
+- Хаотичные списки без приоритетов
+- Повторы без синтеза
+- Академическая теория без применения
+
+See [ABOUT.md](ABOUT.md) → Anti-Patterns section.
+
+---
+
+## Checklist Before Completion
+
+- [ ] All new entries processed
+- [ ] No duplicates in Todoist
+- [ ] All tasks have dates and concrete actions
+- [ ] Decision filters applied
+- [ ] Anti-patterns avoided
+- [ ] MOC files updated
+- [ ] Report generated
diff --git a/vault/.claude/skills/dbrain-processor/references/todoist.md b/vault/.claude/skills/dbrain-processor/references/todoist.md
new file mode 100644
index 0000000..70dfceb
--- /dev/null
+++ b/vault/.claude/skills/dbrain-processor/references/todoist.md
@@ -0,0 +1,184 @@
+# Todoist Integration
+
+## Available MCP Tools
+
+### Reading Tasks
+- `get-overview` — all projects with hierarchy
+- `find-tasks` — search by text, project, section
+- `find-tasks-by-date` — tasks by date range
+
+### Writing Tasks
+- `add-tasks` — create new tasks
+- `complete-tasks` — mark as done
+- `update-tasks` — modify existing
+
+---
+
+## Pre-Creation Checklist
+
+### 1. Check Workload (REQUIRED)
+
+```
+find-tasks-by-date:
+ startDate: "today"
+ daysCount: 7
+ limit: 50
+```
+
+Build workload map:
+```
+Mon: 2 tasks
+Tue: 4 tasks ← overloaded
+Wed: 1 task
+Thu: 3 tasks ← at limit
+Fri: 2 tasks
+Sat: 0 tasks
+Sun: 0 tasks
+```
+
+### 2. Check Duplicates (REQUIRED)
+
+```
+find-tasks:
+ searchText: "key words from new task"
+```
+
+If similar exists → mark as duplicate, don't create.
+
+---
+
+## Priority by Domain
+
+Based on user's work context (see [ABOUT.md](ABOUT.md)):
+
+| Domain | Default Priority | Override |
+|--------|-----------------|----------|
+| Client Work | p1-p2 | — |
+| Agency Ops (urgent) | p2 | — |
+| Agency Ops (regular) | p3 | — |
+| Content (with deadline) | p2-p3 | — |
+| Product/R&D | p4 | масштабируемость → p3 |
+| AI & Tech | p4 | автоматизация → p3 |
+
+### Priority Keywords
+
+| Keywords in text | Priority |
+|-----------------|----------|
+| срочно, критично, дедлайн клиента | p1 |
+| важно, приоритет, до конца недели | p2 |
+| нужно, надо, не забыть | p3 |
+| (strategic, R&D, long-term) | p4 |
+
+### Apply Decision Filters for Priority Boost
+
+If entry matches 2+ filters → boost priority by 1 level:
+- Это масштабируется?
+- Это можно автоматизировать?
+- Это усиливает экспертизу TDI?
+- Это приближает к продукту/SaaS?
+
+---
+
+## Date Mapping
+
+| Context | dueString |
+|---------|-----------|
+| **Client deadline** | exact date |
+| **Urgent ops** | today / tomorrow |
+| **This week** | friday |
+| **Next week** | next monday |
+| **Strategic/R&D** | in 7 days |
+| **Not specified** | in 3 days |
+
+### Russian → dueString
+
+| Russian | dueString |
+|---------|-----------|
+| сегодня | today |
+| завтра | tomorrow |
+| послезавтра | in 2 days |
+| в понедельник | monday |
+| в пятницу | friday |
+| на этой неделе | friday |
+| на следующей неделе | next monday |
+| через неделю | in 7 days |
+| 15 января | January 15 |
+
+---
+
+## Task Creation
+
+```
+add-tasks:
+ tasks:
+ - content: "Task title"
+ dueString: "friday" # MANDATORY
+ priority: "p4" # based on domain
+ projectId: "..." # if known
+```
+
+### Task Title Style
+
+User prefers: прямота, ясность, конкретика
+
+✅ Good:
+- "Отправить презентацию Pepsi"
+- "Созвон с командой по AI-агентам"
+- "Написать пост про Claude MCP"
+
+❌ Bad:
+- "Подумать о презентации"
+- "Что-то с клиентом"
+- "Разобраться с AI"
+
+### Workload Balancing
+
+If target day has 3+ tasks:
+1. Find next day with < 3 tasks
+2. Use that day instead
+3. Mention in report: "сдвинуто на {day} (перегрузка)"
+
+---
+
+## Project Detection
+
+Based on TDI work domains:
+
+| Keywords | Project |
+|----------|---------|
+| Pepsi, Haval, Lactalis, Chevrolet, OQ, Honor | Client Work |
+| TDI, агентство, команда, найм | Agency Ops |
+| продукт, SaaS, MVP | Product |
+| пост, @aimastersme, контент | Content |
+
+If unclear → use Inbox (no projectId).
+
+---
+
+## Anti-Patterns (НЕ СОЗДАВАТЬ)
+
+Based on user preferences:
+
+- ❌ "Подумать о..." → конкретизируй действие
+- ❌ "Разобраться с..." → что именно сделать?
+- ❌ Абстрактные задачи без Next Action
+- ❌ Дубликаты существующих задач
+- ❌ Задачи без дат
+
+---
+
+## Error Handling
+
+CRITICAL: Никогда не предлагай "добавить вручную".
+
+If `add-tasks` fails:
+1. Include EXACT error message in report
+2. Continue with next entry
+3. Don't mark as processed
+4. User will see error and can debug
+
+WRONG output:
+ "Не удалось добавить (MCP недоступен). Добавь вручную: Task title"
+
+CORRECT output:
+ "Ошибка создания задачи: [exact error from MCP tool]"
diff --git a/vault/.claude/skills/todoist-ai/SKILL.md b/vault/.claude/skills/todoist-ai/SKILL.md
new file mode 100644
index 0000000..6cc2fb0
--- /dev/null
+++ b/vault/.claude/skills/todoist-ai/SKILL.md
@@ -0,0 +1,59 @@
+---
+name: todoist-ai
+description: MCP server and tools for connecting AI agents to Todoist
+---
+
+# todoist-ai
+
+MCP server and tools for connecting AI agents to Todoist
+
+## Description
+
+A set of tools to connect to AI agents, to allow them to use Todoist on a user's behalf. Includes MCP support.
+
+**Repository:** [Doist/todoist-ai](https://github.com/Doist/todoist-ai)
+**Language:** TypeScript
+**Stars:** 212
+**License:** MIT License
+
+## When to Use This Skill
+
+Use this skill when you need to:
+- Understand how to use todoist-ai
+- Look up API documentation
+- Find usage examples
+- Check for known issues or recent changes
+- Review release history
+
+## Quick Reference
+
+### Repository Info
+- **Homepage:**
+- **Topics:**
+- **Open Issues:** 18
+- **Last Updated:** 2025-12-13
+
+### Languages
+- **TypeScript:** 98.0%
+- **JavaScript:** 2.0%
+
+### Recent Releases
+- **v5.2.0** (2025-11-27): v5.2.0
+- **v5.1.1** (2025-11-27): v5.1.1
+- **v5.1.0** (2025-11-20): v5.1.0
+
+## Available References
+
+- `references/README.md` - Complete README documentation
+- `references/CHANGELOG.md` - Version history and changes
+- `references/issues.md` - Recent GitHub issues
+- `references/releases.md` - Release notes
+- `references/file_structure.md` - Repository structure
+
+## Usage
+
+See README.md for complete usage instructions and examples.
+
+---
+
+**Generated by Skill Seeker** | GitHub Repository Scraper
diff --git a/vault/.claude/skills/todoist-ai/references/CHANGELOG.md b/vault/.claude/skills/todoist-ai/references/CHANGELOG.md
new file mode 100644
index 0000000..099ae9f
--- /dev/null
+++ b/vault/.claude/skills/todoist-ai/references/CHANGELOG.md
@@ -0,0 +1,461 @@
+# Changelog
+
+## [5.2.0](https://github.com/Doist/todoist-ai/compare/v5.1.1...v5.2.0) (2025-11-27)
+
+
+### Features
+
+* Add isUncompletable parameter support to add/update tools ([#230](https://github.com/Doist/todoist-ai/issues/230)) ([0c295ac](https://github.com/Doist/todoist-ai/commit/0c295ac7d7d1b81f5512b1c782eaba4ef24aeafd))
+
+## [5.1.1](https://github.com/Doist/todoist-ai/compare/v5.1.0...v5.1.1) (2025-11-27)
+
+
+### Bug Fixes
+
+* **deps:** Update `@doist/todoist-api-typescript` to 6.1.12 ([#229](https://github.com/Doist/todoist-ai/issues/229)) ([54e3552](https://github.com/Doist/todoist-ai/commit/54e3552b68d648a042bac9991cb600fd8f8f5be1))
+* **deps:** update dependency @modelcontextprotocol/sdk to v1.22.0 ([#227](https://github.com/Doist/todoist-ai/issues/227)) ([b20c05e](https://github.com/Doist/todoist-ai/commit/b20c05e3273ff6a565380cdddb9be5743ba7bb66))
+
+## [5.1.0](https://github.com/Doist/todoist-ai/compare/v5.0.2...v5.1.0) (2025-11-20)
+
+
+### Features
+
+* add read-only and destructive hints to all tools ([#222](https://github.com/Doist/todoist-ai/issues/222)) ([5d8ce22](https://github.com/Doist/todoist-ai/commit/5d8ce225c92a688834881bde13d5956bbe7e59ff))
+
+## [5.0.2](https://github.com/Doist/todoist-ai/compare/v5.0.1...v5.0.2) (2025-11-19)
+
+
+### Bug Fixes
+
+* **find-projects:** resolve search pagination issue and update PROJECTS_MAX ([#223](https://github.com/Doist/todoist-ai/issues/223)) ([b0772d1](https://github.com/Doist/todoist-ai/commit/b0772d1dd688188cc70dcdd50989208fd18f9c39))
+
+## [5.0.1](https://github.com/Doist/todoist-ai/compare/v5.0.0...v5.0.1) (2025-11-18)
+
+
+### Bug Fixes
+
+* **deps:** update production dependencies ([#220](https://github.com/Doist/todoist-ai/issues/220)) ([f6121b0](https://github.com/Doist/todoist-ai/commit/f6121b0fcc7bf432e07df7a8ef9c11291ba09dfb))
+
+## [5.0.0](https://github.com/Doist/todoist-ai/compare/v4.17.4...v5.0.0) (2025-11-14)
+
+
+### ⚠ BREAKING CHANGES
+
+* semantic priority values (P1, P2, P3, P4) instead of numeric ([#217](https://github.com/Doist/todoist-ai/issues/217))
+
+### Features
+
+* semantic priority values (P1, P2, P3, P4) instead of numeric ([#217](https://github.com/Doist/todoist-ai/issues/217)) ([9bb906b](https://github.com/Doist/todoist-ai/commit/9bb906b48d836898bf616df60cef38aaa7ae2894))
+
+## [4.17.4](https://github.com/Doist/todoist-ai/compare/v4.17.3...v4.17.4) (2025-11-13)
+
+
+### Bug Fixes
+
+* correct priority inversion for task outputs ([#216](https://github.com/Doist/todoist-ai/issues/216)) ([b4b4809](https://github.com/Doist/todoist-ai/commit/b4b4809f129d6aa029f0ef4aa28352760c879aee))
+* **deps:** pin dependencies ([#212](https://github.com/Doist/todoist-ai/issues/212)) ([2049ebf](https://github.com/Doist/todoist-ai/commit/2049ebf4e5eedd2465650c79c16e39f04a5e4ddd))
+
+## [4.17.3](https://github.com/Doist/todoist-ai/compare/v4.17.2...v4.17.3) (2025-11-06)
+
+
+### Bug Fixes
+
+* **deps:** Bump `@doist/todoist-api-typescript` package ([#210](https://github.com/Doist/todoist-ai/issues/210)) ([85fbfb5](https://github.com/Doist/todoist-ai/commit/85fbfb591f2e4ee165b71ff1386a39ab96d7e31a))
+
+## [4.17.2](https://github.com/Doist/todoist-ai/compare/v4.17.1...v4.17.2) (2025-11-06)
+
+
+### Bug Fixes
+
+* enforce output schemas for tools (follow-up) ([#208](https://github.com/Doist/todoist-ai/issues/208)) ([c83772a](https://github.com/Doist/todoist-ai/commit/c83772a7c29314891b1e031dce9f07d954b4e4a5))
+
+## [4.17.1](https://github.com/Doist/todoist-ai/compare/v4.17.0...v4.17.1) (2025-11-06)
+
+
+### Bug Fixes
+
+* enforce output schemas for tools ([#205](https://github.com/Doist/todoist-ai/issues/205)) ([9b1d593](https://github.com/Doist/todoist-ai/commit/9b1d59317dbe5277b6f4126388a2402cf3c35e8e))
+
+## [4.17.0](https://github.com/Doist/todoist-ai/compare/v4.16.1...v4.17.0) (2025-11-05)
+
+
+### Features
+
+* Add output schema to all tools ([#203](https://github.com/Doist/todoist-ai/issues/203)) ([7663388](https://github.com/Doist/todoist-ai/commit/76633886dde65880cd049733431aa9d4a5038b84))
+
+## [4.16.1](https://github.com/Doist/todoist-ai/compare/v4.16.0...v4.16.1) (2025-11-05)
+
+
+### Bug Fixes
+
+* Show next steps only for paginated tools and clarify as suggestions ([#201](https://github.com/Doist/todoist-ai/issues/201)) ([f969615](https://github.com/Doist/todoist-ai/commit/f9696155fe931b6c40859c1a2f7e82a859253288))
+
+## [4.16.0](https://github.com/Doist/todoist-ai/compare/v4.15.1...v4.16.0) (2025-11-03)
+
+
+### Features
+
+* Extend "inbox" project ID support to 7 additional tools ([#198](https://github.com/Doist/todoist-ai/issues/198)) ([5bab0f9](https://github.com/Doist/todoist-ai/commit/5bab0f94ab2d997d71870202294af3c5d3ac7784))
+
+## [4.15.1](https://github.com/Doist/todoist-ai/compare/v4.15.0...v4.15.1) (2025-10-31)
+
+
+### Bug Fixes
+
+* Allow `inbox` as a project id ([#193](https://github.com/Doist/todoist-ai/issues/193)) ([fe4a91f](https://github.com/Doist/todoist-ai/commit/fe4a91fe2daa7f97473b97de54385e03358a8122))
+
+## [4.15.0](https://github.com/Doist/todoist-ai/compare/v4.14.5...v4.15.0) (2025-10-26)
+
+
+### Features
+
+* Add deadline support to add-tasks and update-tasks ([#186](https://github.com/Doist/todoist-ai/issues/186)) ([8f795c8](https://github.com/Doist/todoist-ai/commit/8f795c8949f40d10bf629933793d8cb4607dcb58))
+* Add parentId support to update-projects tool ([#184](https://github.com/Doist/todoist-ai/issues/184)) ([0185b83](https://github.com/Doist/todoist-ai/commit/0185b836fff1359c8303de20bcc37c8f86138180))
+
+## [4.14.5](https://github.com/Doist/todoist-ai/compare/v4.14.4...v4.14.5) (2025-10-25)
+
+
+### Bug Fixes
+
+* Remove nullable type from update_tasks to fix Gemini API compatibility ([#181](https://github.com/Doist/todoist-ai/issues/181)) ([c97be7f](https://github.com/Doist/todoist-ai/commit/c97be7f39ae48d837562fd303b67ed81e8935c18))
+
+## [4.14.4](https://github.com/Doist/todoist-ai/compare/v4.14.3...v4.14.4) (2025-10-24)
+
+
+### Bug Fixes
+
+* Add actions: write permission to trigger workflows ([6863953](https://github.com/Doist/todoist-ai/commit/6863953b6e92fd8b35f4692b5c609ad42631722a))
+
+## [4.14.3](https://github.com/Doist/todoist-ai/compare/v4.14.2...v4.14.3) (2025-10-24)
+
+
+### Bug Fixes
+
+* Add --repo flag to gh workflow run command ([f61caa8](https://github.com/Doist/todoist-ai/commit/f61caa8c7aabce166484b95b70886aa4049c904c))
+
+## [4.14.2](https://github.com/Doist/todoist-ai/compare/v4.14.1...v4.14.2) (2025-10-24)
+
+
+### Bug Fixes
+
+* Trigger publish workflow automatically from release-please ([#174](https://github.com/Doist/todoist-ai/issues/174)) ([081bc2b](https://github.com/Doist/todoist-ai/commit/081bc2ba5abfdc3bf4bfe3c282f29570877b977c))
+
+## [4.14.1](https://github.com/Doist/todoist-ai/compare/v4.14.0...v4.14.1) (2025-10-24)
+
+
+### Bug Fixes
+
+* Update todoist-typescript-sdk to 5.7.1 (follow-up) ([#172](https://github.com/Doist/todoist-ai/issues/172)) ([b4f8dc3](https://github.com/Doist/todoist-ai/commit/b4f8dc3ffa4c3dd7489ece03be5a0f391130a2ce))
+
+## [4.14.0](https://github.com/Doist/todoist-ai/compare/v4.13.5...v4.14.0) (2025-10-23)
+
+
+### Features
+
+* Add find-activity tool ([#169](https://github.com/Doist/todoist-ai/issues/169)) ([1abf67f](https://github.com/Doist/todoist-ai/commit/1abf67f3a99191582cf0b5ea2516420f1278dc9a))
+
+## [4.13.5](https://github.com/Doist/todoist-ai/compare/v4.13.4...v4.13.5) (2025-10-23)
+
+
+### Bug Fixes
+
+* clarify find-completed-tasks scope ([#167](https://github.com/Doist/todoist-ai/issues/167)) ([f110669](https://github.com/Doist/todoist-ai/commit/f11066934d4f6b790599d0f89db416a32437edd3))
+
+## [4.13.4](https://github.com/Doist/todoist-ai/compare/v4.13.3...v4.13.4) (2025-10-23)
+
+
+### Bug Fixes
+
+* Test publish workflow (no functional changes) ([#164](https://github.com/Doist/todoist-ai/issues/164)) ([68afb4c](https://github.com/Doist/todoist-ai/commit/68afb4ce06366cc022a1718e6cd0c3525c5aab48))
+
+## [4.13.3](https://github.com/Doist/todoist-ai/compare/v4.13.2...v4.13.3) (2025-10-23)
+
+
+### Bug Fixes
+
+* Switch to using `moveTask` instead of `moveTasks` ([#160](https://github.com/Doist/todoist-ai/issues/160)) ([34e3fc6](https://github.com/Doist/todoist-ai/commit/34e3fc67922379bf0aef39a9e7f1939ded5f0e08))
+
+## [4.13.2](https://github.com/Doist/todoist-ai/compare/v4.13.1...v4.13.2) (2025-10-22)
+
+
+### Bug Fixes
+
+* Output `checked` for the `fetch` tool ([#158](https://github.com/Doist/todoist-ai/issues/158)) ([f0a6eaf](https://github.com/Doist/todoist-ai/commit/f0a6eaf62a915cfab289f1b5181770ccd11d0bdb))
+
+## [4.13.1](https://github.com/Doist/todoist-ai/compare/v4.13.0...v4.13.1) (2025-10-22)
+
+
+### Bug Fixes
+
+* Remove `updatedAt` ([#155](https://github.com/Doist/todoist-ai/issues/155)) ([3f3f345](https://github.com/Doist/todoist-ai/commit/3f3f3458f9d54f4f347dfb7c34892fb3cda7ff3b))
+
+## [4.13.0](https://github.com/Doist/todoist-ai/compare/v4.12.0...v4.13.0) (2025-10-21)
+
+
+### Features
+
+* Expose completion and modification metadata in task mapping ([#153](https://github.com/Doist/todoist-ai/issues/153)) ([1e2d3b3](https://github.com/Doist/todoist-ai/commit/1e2d3b3f461e75be8cc63ae3a4e070d113f5c4da))
+* extend responsibleUser filtering to more tools ([#149](https://github.com/Doist/todoist-ai/issues/149)) ([c146d74](https://github.com/Doist/todoist-ai/commit/c146d749eb097e1d383dda00e6a09e05389969dd))
+
+## [4.12.0](https://github.com/Doist/todoist-ai/compare/v4.11.0...v4.12.0) (2025-10-14)
+
+
+### Features
+
+* In find-tasks-by-date use backend filtering for responsible user ([#145](https://github.com/Doist/todoist-ai/issues/145)) ([5d1e140](https://github.com/Doist/todoist-ai/commit/5d1e1400f639e8c802019421eb0437ef39c67a64))
+
+## [4.11.0](https://github.com/Doist/todoist-ai/compare/v4.10.0...v4.11.0) (2025-10-13)
+
+
+### Features
+
+* Improve findCompletedTasks to handle user timezones ([#143](https://github.com/Doist/todoist-ai/issues/143)) ([c27d897](https://github.com/Doist/todoist-ai/commit/c27d8973d0ea9342f8b1e56659fca900f920ddb3))
+
+## [4.10.0](https://github.com/Doist/todoist-ai/compare/v4.9.4...v4.10.0) (2025-10-10)
+
+
+### Features
+
+* add OpenAI-compliant `search` and `fetch` tools ([#134](https://github.com/Doist/todoist-ai/issues/134)) ([153289c](https://github.com/Doist/todoist-ai/commit/153289c5cf02b2da6b3f4cf6e8a7c681b3ee3aec))
+* Clarify content vs description usage and Markdown support ([#139](https://github.com/Doist/todoist-ai/issues/139)) ([cb410a2](https://github.com/Doist/todoist-ai/commit/cb410a2c16670ec07ee2d812ba961075c3f20dda))
+
+## [4.9.4](https://github.com/Doist/todoist-ai/compare/v4.9.3...v4.9.4) (2025-10-06)
+
+
+### Bug Fixes
+
+* Ensures null fields are not returned ([#130](https://github.com/Doist/todoist-ai/issues/130)) ([a016011](https://github.com/Doist/todoist-ai/commit/a0160115b6fff4b96751056506494e43f582527c))
+
+## [4.9.3](https://github.com/Doist/todoist-ai/compare/v4.9.2...v4.9.3) (2025-10-02)
+
+
+### Bug Fixes
+
+* dayCount and overdue only fixes ([#128](https://github.com/Doist/todoist-ai/issues/128)) ([d020c06](https://github.com/Doist/todoist-ai/commit/d020c0622fb5c9a71b5f666406529236db76bdef))
+
+## [4.9.2](https://github.com/Doist/todoist-ai/compare/v4.9.1...v4.9.2) (2025-10-02)
+
+
+### Bug Fixes
+
+* allow add-tasks to work with only content parameter ([#126](https://github.com/Doist/todoist-ai/issues/126)) ([27bda34](https://github.com/Doist/todoist-ai/commit/27bda346f465a1a2ab7a0ab833c151093a4d7044))
+
+## [4.9.1](https://github.com/Doist/todoist-ai/compare/v4.9.0...v4.9.1) (2025-10-01)
+
+
+### Bug Fixes
+
+* Enhance task filtering by responsible user and update related tools ([#121](https://github.com/Doist/todoist-ai/issues/121)) ([cea0917](https://github.com/Doist/todoist-ai/commit/cea0917a8b2bd1f056e1b08f14e9cb858b9711a5))
+* preserve markdown in tasks content and description ([#124](https://github.com/Doist/todoist-ai/issues/124)) ([0cc48fe](https://github.com/Doist/todoist-ai/commit/0cc48fe93595213729d794b7b6c92d54072cf6d5))
+
+## [4.9.0](https://github.com/Doist/todoist-ai/compare/v4.8.0...v4.9.0) (2025-09-30)
+
+
+### Features
+
+* add parentId support to add-projects tool ([#122](https://github.com/Doist/todoist-ai/issues/122)) ([84019d1](https://github.com/Doist/todoist-ai/commit/84019d1403fff67d33de5bf756a40da28b88171e))
+
+## [4.8.0](https://github.com/Doist/todoist-ai/compare/v4.7.1...v4.8.0) (2025-09-29)
+
+
+### Features
+
+* merge overdue into today's tasks in find-tasks-by-date tool ([#108](https://github.com/Doist/todoist-ai/issues/108)) ([f86e69d](https://github.com/Doist/todoist-ai/commit/f86e69d3ac4861a1b99ebdc8f25f135c6d6adeeb))
+
+## [4.7.1](https://github.com/Doist/todoist-ai/compare/v4.7.0...v4.7.1) (2025-09-29)
+
+
+### Bug Fixes
+
+* Convert the API priorities into a consumable priority ([#115](https://github.com/Doist/todoist-ai/issues/115)) ([e4cc62f](https://github.com/Doist/todoist-ai/commit/e4cc62f5e456c517995aaf9b8e22153923a55ff7))
+
+## [4.7.0](https://github.com/Doist/todoist-ai/compare/v4.6.1...v4.7.0) (2025-09-25)
+
+
+### Features
+
+* Document the MCP setup better, including the remote endpoint ([#109](https://github.com/Doist/todoist-ai/issues/109)) ([e1e69e2](https://github.com/Doist/todoist-ai/commit/e1e69e27e91675775e7f4ea0bef709a17722131c))
+
+## [4.6.1](https://github.com/Doist/todoist-ai/compare/v4.6.0...v4.6.1) (2025-09-24)
+
+
+### Bug Fixes
+
+* Update package.json with `mcpName` ([#106](https://github.com/Doist/todoist-ai/issues/106)) ([df19306](https://github.com/Doist/todoist-ai/commit/df19306adb13ff6416a37e4b49a6d2e5ab5c459f))
+
+## [4.6.0](https://github.com/Doist/todoist-ai/compare/v4.5.2...v4.6.0) (2025-09-24)
+
+
+### Features
+
+* add label support for add-tasks and update-tasks tools ([#103](https://github.com/Doist/todoist-ai/issues/103)) ([a4bc708](https://github.com/Doist/todoist-ai/commit/a4bc7085b5a63402970841e586ce985cab9022d0))
+
+## [4.5.2](https://github.com/Doist/todoist-ai/compare/v4.5.1...v4.5.2) (2025-09-24)
+
+
+### Miscellaneous Chores
+
+* Release 4.5.2 ([11df6f2](https://github.com/Doist/todoist-ai/commit/11df6f2c03e31bffd02a6c4f1a5176158e434e05))
+
+## [4.5.1](https://github.com/Doist/todoist-ai/compare/v4.5.0...v4.5.1) (2025-09-23)
+
+
+### Bug Fixes
+
+* fix priority levels ([#98](https://github.com/Doist/todoist-ai/issues/98)) ([64db2ff](https://github.com/Doist/todoist-ai/commit/64db2ff97f3ede0c5cff14d1c58f8fed63a9d742))
+
+## [4.5.0](https://github.com/Doist/todoist-ai/compare/v4.4.0...v4.5.0) (2025-09-11)
+
+
+### Features
+
+* add task assignment management ([#81](https://github.com/Doist/todoist-ai/issues/81)) ([b9b1691](https://github.com/Doist/todoist-ai/commit/b9b16916dec8f18efc37631d77f97354fae2194a))
+
+## [4.4.0](https://github.com/Doist/todoist-ai/compare/v4.3.0...v4.4.0) (2025-09-10)
+
+
+### Features
+
+* Add user's id to user_info tool ([#84](https://github.com/Doist/todoist-ai/issues/84)) ([706ed8f](https://github.com/Doist/todoist-ai/commit/706ed8fdfd11199808ca9824d4c66e8211d773c1))
+
+## [4.3.0](https://github.com/Doist/todoist-ai/compare/v4.2.0...v4.3.0) (2025-09-09)
+
+
+### Features
+
+* Add user-info tool and upgrade Todoist API ([#82](https://github.com/Doist/todoist-ai/issues/82)) ([b583fe1](https://github.com/Doist/todoist-ai/commit/b583fe1045ea38fbe25dfa804df9ebe958f2881d))
+
+## [4.2.0](https://github.com/Doist/todoist-ai/compare/v4.1.0...v4.2.0) (2025-08-29)
+
+
+### Features
+
+* Add support for filtering by label ([#71](https://github.com/Doist/todoist-ai/issues/71)) ([b608d32](https://github.com/Doist/todoist-ai/commit/b608d32f7636a175dc62ca388892e9aef0834712))
+
+## [4.1.0](https://github.com/Doist/todoist-ai/compare/v4.0.0...v4.1.0) (2025-08-23)
+
+
+### Features
+
+* export comment tools ([#63](https://github.com/Doist/todoist-ai/issues/63)) ([cec2999](https://github.com/Doist/todoist-ai/commit/cec2999b8ca1f660f26b37cffb3803e863f60be0))
+
+## [4.0.0](https://github.com/Doist/todoist-ai/compare/v3.0.0...v4.0.0) (2025-08-22)
+
+
+### ⚠ BREAKING CHANGES
+
+* restructure management tools into specialized add/update tools ([#59](https://github.com/Doist/todoist-ai/issues/59))
+
+### Features
+
+* add comment tools ([#58](https://github.com/Doist/todoist-ai/issues/58)) ([7d6ffca](https://github.com/Doist/todoist-ai/commit/7d6ffcacd326ef755aba691436d44d6b534f6b4b))
+* add todoist base url to dev setup, plus doc improvements ([#62](https://github.com/Doist/todoist-ai/issues/62)) ([e0e5a78](https://github.com/Doist/todoist-ai/commit/e0e5a78d1358b82d5f2661a41ffe193015296154))
+* parallelize add-tasks with per-task context ([#60](https://github.com/Doist/todoist-ai/issues/60)) ([816d099](https://github.com/Doist/todoist-ai/commit/816d099551974bad3e0663c1d77334b692aaa76a))
+* restructure management tools into specialized add/update tools ([#59](https://github.com/Doist/todoist-ai/issues/59)) ([0c4dcf7](https://github.com/Doist/todoist-ai/commit/0c4dcf7c4e420eadea15bf825599f4c3cd72cbfc))
+
+## [3.0.0](https://github.com/Doist/todoist-ai/compare/v2.2.2...v3.0.0) (2025-08-21)
+
+
+### ⚠ BREAKING CHANGES
+
+* verb-first tool names, unify find-by-container into find-tasks ([#53](https://github.com/Doist/todoist-ai/issues/53))
+* Remove single update task and replace with multiple ([#47](https://github.com/Doist/todoist-ai/issues/47))
+
+### Features
+
+* Improve tool output UX with LLM-readable responses ([#49](https://github.com/Doist/todoist-ai/issues/49)) ([7c25696](https://github.com/Doist/todoist-ai/commit/7c25696926bbaee158482cbc75595e80959e1c12))
+* Remove single update task and replace with multiple ([#47](https://github.com/Doist/todoist-ai/issues/47)) ([8a9b7cf](https://github.com/Doist/todoist-ai/commit/8a9b7cf119a405a2849ab95c437a344961790686))
+* verb-first tool names, unify find-by-container into find-tasks ([#53](https://github.com/Doist/todoist-ai/issues/53)) ([dbada71](https://github.com/Doist/todoist-ai/commit/dbada719d98df4bb91a52a0a7af8afb6ad6f3fae))
+
+## [2.2.2](https://github.com/Doist/todoist-ai/compare/v2.2.1...v2.2.2) (2025-08-16)
+
+
+### Bug Fixes
+
+* correct bin path in package.json for npx support ([#39](https://github.com/Doist/todoist-ai/issues/39)) ([816021d](https://github.com/Doist/todoist-ai/commit/816021dc3572dd476818981388fac634794d7e21))
+
+## [2.2.1](https://github.com/Doist/todoist-ai/compare/v2.2.0...v2.2.1) (2025-08-16)
+
+
+### Bug Fixes
+
+* correct bin field format in package.json for npx support ([#37](https://github.com/Doist/todoist-ai/issues/37)) ([a50fa75](https://github.com/Doist/todoist-ai/commit/a50fa75d737bc6f4503442830565c3d4a942c9af))
+
+## [2.2.0](https://github.com/Doist/todoist-ai/compare/v2.1.0...v2.2.0) (2025-08-16)
+
+
+### Features
+
+* Add npx support for MCP server usage ([#33](https://github.com/Doist/todoist-ai/issues/33)) ([5ed0c5f](https://github.com/Doist/todoist-ai/commit/5ed0c5f40615ab4afb61d0fcd9796c97e666b1f9))
+
+## [2.1.0](https://github.com/Doist/todoist-ai/compare/v2.0.1...v2.1.0) (2025-08-15)
+
+
+### Features
+
+* add support for task duration when adding or updating tasks ([#28](https://github.com/Doist/todoist-ai/issues/28)) ([a0c6702](https://github.com/Doist/todoist-ai/commit/a0c6702dd446173c86675ecadd975506ce594c42))
+
+## [2.0.1](https://github.com/Doist/todoist-ai/compare/v2.0.0...v2.0.1) (2025-08-14)
+
+
+### Bug Fixes
+
+* convert project from CommonJS to ES modules to resolve MCP initialization ([#24](https://github.com/Doist/todoist-ai/issues/24)) ([f817e04](https://github.com/Doist/todoist-ai/commit/f817e045a711f90b4f74464a480dd1aa8f7e1027))
+* resolve task move operations using correct Todoist API methods ([#22](https://github.com/Doist/todoist-ai/issues/22)) ([3b8f509](https://github.com/Doist/todoist-ai/commit/3b8f50943f517ae76b754923f7a8c5563880e9ba))
+
+## [2.0.0](https://github.com/Doist/todoist-ai/compare/v1.1.0...v2.0.0) (2025-08-13)
+
+
+### ⚠ BREAKING CHANGES
+
+* Consolidate MCP tools to reduce tool count ([#14](https://github.com/Doist/todoist-ai/issues/14))
+
+### Features
+
+* Consolidate MCP tools to reduce tool count ([#14](https://github.com/Doist/todoist-ai/issues/14)) ([f0ccdf8](https://github.com/Doist/todoist-ai/commit/f0ccdf8fd17f046fdb8d0938dea94163fd916a7c))
+
+
+### Bug Fixes
+
+* update release-please action to googleapis/release-please-action@v4 ([7fbb5fd](https://github.com/Doist/todoist-ai/commit/7fbb5fdd3f435e68a9b2ba054247d29e82fcc465))
+
+## [1.1.0](https://github.com/Doist/todoist-ai/compare/v1.0.0...v1.1.0) (2025-08-13)
+
+
+### Features
+
+* Adds completed tasks tool ([#8](https://github.com/Doist/todoist-ai/issues/8)) ([d0ffad1](https://github.com/Doist/todoist-ai/commit/d0ffad10a331c16f14b4d738ed7ac368fd8e44b4))
+
+
+### Bug Fixes
+
+* add issues permission for release-please workflow ([0974fa4](https://github.com/Doist/todoist-ai/commit/0974fa45aa8578eafd2e9e1355a997ee09dce391))
+
+## 1.0.0 (2025-08-12)
+
+
+### Features
+
+* add tasks-add-multiple and tasks-update-one tools ([f7432e7](https://github.com/Doist/todoist-ai/commit/f7432e7f8c4121ed2bf71b424fe17d03e59aed23))
+* add tasks-complete-one and tasks-delete-one tools ([1ef6a99](https://github.com/Doist/todoist-ai/commit/1ef6a99e2733226d85932b930a41dc9ff92d0ef9))
+* allow configuring the base URL for the Todoist API ([332c11a](https://github.com/Doist/todoist-ai/commit/332c11aec34ace9890fda36ef9356a7c417b22d1))
+* allow configuring the base URL for the Todoist API ([c56b3a3](https://github.com/Doist/todoist-ai/commit/c56b3a36207fb211188737f05f472ebcee6e7fc5))
+
+## [0.1.4](https://github.com/doist/todoist-ai/compare/v0.1.3...v0.1.4) (2025-01-XX)
+
+### Features
+
+* allow configuring the base URL for the Todoist API ([332c11a](https://github.com/doist/todoist-ai/commit/332c11a))
+
+### Bug Fixes
+
+* remove esm build, use single tsconfig for cjs ([24a1336](https://github.com/doist/todoist-ai/commit/24a1336))
+* remove tools subpath, export tools from index.ts ([2e13489](https://github.com/doist/todoist-ai/commit/2e13489))
+
+### Miscellaneous Chores
+
+* rename tool files to match the tool name ([997780a](https://github.com/doist/todoist-ai/commit/997780a))
+
+---
+
+*Note: This changelog will be automatically maintained by [release-please](https://github.com/googleapis/release-please) starting from the next release.*
diff --git a/vault/.claude/skills/todoist-ai/references/README.md b/vault/.claude/skills/todoist-ai/references/README.md
new file mode 100644
index 0000000..acec81a
--- /dev/null
+++ b/vault/.claude/skills/todoist-ai/references/README.md
@@ -0,0 +1,189 @@
+# Todoist AI and MCP SDK
+
+Library for connecting AI agents to Todoist. Includes tools that can be integrated into LLMs,
+enabling them to access and modify a Todoist account on the user's behalf.
+
+These tools can be used both through an MCP server, or imported directly in other projects to
+integrate them to your own AI conversational interfaces.
+
+## Using tools
+
+### 1. Add this repository as a dependency
+
+```sh
+npm install @doist/todoist-ai
+```
+
+### 2. Import the tools and plug them to an AI
+
+Here's an example using [Vercel's AI SDK](https://ai-sdk.dev/docs/ai-sdk-core/generating-text#streamtext).
+
+```js
+import { findTasksByDate, addTasks } from "@doist/todoist-ai";
+import { TodoistApi } from "@doist/todoist-api-typescript";
+import { streamText } from "ai";
+
+// Create Todoist API client
+const client = new TodoistApi(process.env.TODOIST_API_KEY);
+
+// Helper to wrap tools with the client
+function wrapTool(tool, todoistClient) {
+ return {
+ ...tool,
+ execute(args) {
+ return tool.execute(args, todoistClient);
+ },
+ };
+}
+
+const result = streamText({
+ model: yourModel,
+ system: "You are a helpful Todoist assistant",
+ tools: {
+ findTasksByDate: wrapTool(findTasksByDate, client),
+ addTasks: wrapTool(addTasks, client),
+ },
+});
+```
+
+## Using as an MCP server
+
+### Quick Start
+
+You can run the MCP server directly with npx:
+
+```bash
+npx @doist/todoist-ai
+```
+
+### Setup Guide
+
+The Todoist AI MCP server is available as a streamable HTTP service for easy integration with various AI clients:
+
+**Primary URL (Streamable HTTP):** `https://ai.todoist.net/mcp`
+
+#### Claude Desktop
+
+1. Open Settings → Connectors → Add custom connector
+2. Enter `https://ai.todoist.net/mcp` and complete OAuth authentication
+
+#### Cursor
+
+Create a configuration file:
+- **Global:** `~/.cursor/mcp.json`
+- **Project-specific:** `.cursor/mcp.json`
+
+```json
+{
+ "mcpServers": {
+ "todoist": {
+ "command": "npx",
+ "args": ["-y", "mcp-remote", "https://ai.todoist.net/mcp"]
+ }
+ }
+}
+```
+
+Then enable the server in Cursor settings if prompted.
+
+#### Claude Code (CLI)
+
+Firstly configure Claude so it has a new MCP available using this command:
+
+```bash
+claude mcp add --transport http todoist https://ai.todoist.net/mcp
+```
+
+Then launch `claude`, execute `/mcp`, then select the `todoist` MCP server.
+
+This will take you through a wizard to authenticate using your browser with Todoist. Once complete you will be able to use todoist in `claude`.
+
+
+#### Visual Studio Code
+
+1. Open Command Palette → MCP: Add Server
+2. Select HTTP transport and use:
+
+```json
+{
+ "servers": {
+ "todoist": {
+ "type": "http",
+ "url": "https://ai.todoist.net/mcp"
+ }
+ }
+}
+```
+
+#### Other MCP Clients
+
+```bash
+npx -y mcp-remote https://ai.todoist.net/mcp
+```
+
+For more details on setting up and using the MCP server, including creating custom servers, see [docs/mcp-server.md](docs/mcp-server.md).
+
+## Features
+
+A key feature of this project is that tools can be reused, and are not written specifically for use in an MCP server. They can be hooked up as tools to other conversational AI interfaces (e.g. Vercel's AI SDK).
+
+This project is in its early stages. Expect more and/or better tools soon.
+
+Nevertheless, our goal is to provide a small set of tools that enable complete workflows, rather than just atomic actions, striking a balance between flexibility and efficiency for LLMs.
+
+For our design philosophy, guidelines, and development patterns, see [docs/tool-design.md](docs/tool-design.md).
+
+### Available Tools
+
+For a complete list of available tools, see the [src/tools](src/tools) directory.
+
+#### OpenAI MCP Compatibility
+
+This server includes `search` and `fetch` tools that follow the [OpenAI MCP specification](https://platform.openai.com/docs/mcp), enabling seamless integration with OpenAI's MCP protocol. These tools return JSON-encoded results optimized for OpenAI's requirements while maintaining compatibility with the broader MCP ecosystem.
+
+## Dependencies
+
+- MCP server using the official [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk?tab=readme-ov-file#installation)
+- Todoist Typescript API client [@doist/todoist-api-typescript](https://github.com/Doist/todoist-api-typescript)
+
+## MCP Server Setup
+
+See [docs/mcp-server.md](docs/mcp-server.md) for full instructions on setting up the MCP server.
+
+## Local Development Setup
+
+See [docs/dev-setup.md](docs/dev-setup.md) for full instructions on setting up this repository locally for development and contributing.
+
+### Quick Start
+
+After cloning and setting up the repository:
+
+- `npm start` - Build and run the MCP inspector for testing
+- `npm run dev` - Development mode with auto-rebuild and restart
+
+## Releasing
+
+This project uses [release-please](https://github.com/googleapis/release-please) to automate version management and package publishing.
+
+### How it works
+
+1. Make your changes using [Conventional Commits](https://www.conventionalcommits.org/):
+
+ - `feat:` for new features (minor version bump)
+ - `fix:` for bug fixes (patch version bump)
+ - `feat!:` or `fix!:` for breaking changes (major version bump)
+ - `docs:` for documentation changes
+ - `chore:` for maintenance tasks
+ - `ci:` for CI changes
+
+2. When commits are pushed to `main`:
+
+ - Release-please automatically creates/updates a release PR
+ - The PR includes version bump and changelog updates
+ - Review the PR and merge when ready
+
+3. After merging the release PR:
+ - A new GitHub release is automatically created
+ - A new tag is created
+ - The `publish` workflow is triggered
+ - The package is published to npm
diff --git a/vault/.claude/skills/todoist-ai/references/file_structure.md b/vault/.claude/skills/todoist-ai/references/file_structure.md
new file mode 100644
index 0000000..c90a169
--- /dev/null
+++ b/vault/.claude/skills/todoist-ai/references/file_structure.md
@@ -0,0 +1,139 @@
+# Repository File Structure
+
+Total items: 133
+
+```
+📁 .claude
+📁 .cursor
+📄 .cursorrules
+📄 .env.example
+📁 .github
+📄 .gitignore
+📁 .husky
+📄 .nvmrc
+📁 .vscode
+📄 CHANGELOG.md
+📄 LICENSE.txt
+📄 README.md
+📄 biome.json
+📁 docs
+📄 openai-mcp-tools.md
+📄 package-lock.json
+📄 package.json
+📄 renovate.json
+📁 scripts
+📁 src
+📄 tsconfig.json
+📄 vite.config.ts
+ 📄 claude.md
+ 📄 settings.json
+ 📄 mcp.json
+ 📁 rules
+ 📄 PULL_REQUEST_TEMPLATE.md
+ 📄 release-please-config.json
+ 📄 release-please-manifest.json
+ 📁 workflows
+ 📄 pre-commit
+ 📄 pre-push
+ 📄 extensions.json
+ 📄 settings.json
+ 📄 dev-setup.md
+ 📄 mcp-server.md
+ 📄 tool-design.md
+ 📄 test-executable.cjs
+ 📄 validate-schemas.ts
+ 📄 filter-helpers.ts
+ 📄 index.ts
+ 📄 main.ts
+ 📄 mcp-helpers.ts
+ 📄 mcp-server.ts
+ 📄 todoist-tool.ts
+ 📄 tool-helpers.test.ts
+ 📄 tool-helpers.ts
+ 📁 tools
+ 📁 utils
+ 📄 context7.mdc
+ 📄 typescript.mdc
+ 📄 check-semantic-pull-request.yml
+ 📄 ci.yml
+ 📄 publish.yml
+ 📄 release-please.yml
+ 📁 __tests__
+ 📄 add-comments.ts
+ 📄 add-projects.ts
+ 📄 add-sections.ts
+ 📄 add-tasks.ts
+ 📄 complete-tasks.ts
+ 📄 delete-object.ts
+ 📄 fetch.ts
+ 📄 find-activity.ts
+ 📄 find-comments.ts
+ 📄 find-completed-tasks.ts
+ 📄 find-project-collaborators.ts
+ 📄 find-projects.ts
+ 📄 find-sections.ts
+ 📄 find-tasks-by-date.ts
+ 📄 find-tasks.ts
+ 📄 get-overview.ts
+ 📄 manage-assignments.ts
+ 📄 search.ts
+ 📄 update-comments.ts
+ 📄 update-projects.ts
+ 📄 update-sections.ts
+ 📄 update-tasks.ts
+ 📄 user-info.ts
+ 📄 assignment-validator.ts
+ 📄 constants.ts
+ 📄 duration-parser.test.ts
+ 📄 duration-parser.ts
+ 📄 labels.ts
+ 📄 output-schemas.ts
+ 📄 priorities.ts
+ 📄 response-builders.ts
+ 📄 sanitize-data.test.ts
+ 📄 sanitize-data.ts
+ 📄 test-helpers.ts
+ 📄 tool-names.ts
+ 📄 user-resolver.ts
+ 📁 __snapshots__
+ 📄 add-comments.test.ts
+ 📄 add-projects.test.ts
+ 📄 add-sections.test.ts
+ 📄 add-tasks.test.ts
+ 📄 assignment-integration.test.ts
+ 📄 complete-tasks.test.ts
+ 📄 delete-object.test.ts
+ 📄 fetch.test.ts
+ 📄 find-activity.test.ts
+ 📄 find-comments.test.ts
+ 📄 find-completed-tasks.test.ts
+ 📄 find-projects.test.ts
+ 📄 find-sections.test.ts
+ 📄 find-tasks-by-date.test.ts
+ 📄 find-tasks.test.ts
+ 📄 get-overview.test.ts
+ 📄 search.test.ts
+ 📄 tool-annotations.test.ts
+ 📄 update-comments.test.ts
+ 📄 update-projects.test.ts
+ 📄 update-sections.test.ts
+ 📄 update-tasks.test.ts
+ 📄 user-info.test.ts
+ 📄 add-comments.test.ts.snap
+ 📄 add-projects.test.ts.snap
+ 📄 add-sections.test.ts.snap
+ 📄 add-tasks.test.ts.snap
+ 📄 complete-tasks.test.ts.snap
+ 📄 delete-object.test.ts.snap
+ 📄 find-activity.test.ts.snap
+ 📄 find-comments.test.ts.snap
+ 📄 find-completed-tasks.test.ts.snap
+ 📄 find-projects.test.ts.snap
+ 📄 find-sections.test.ts.snap
+ 📄 find-tasks-by-date.test.ts.snap
+ 📄 find-tasks.test.ts.snap
+ 📄 get-overview.test.ts.snap
+ 📄 update-comments.test.ts.snap
+ 📄 update-projects.test.ts.snap
+ 📄 update-sections.test.ts.snap
+```
diff --git a/vault/.claude/skills/todoist-ai/references/issues.md b/vault/.claude/skills/todoist-ai/references/issues.md
new file mode 100644
index 0000000..f97883e
--- /dev/null
+++ b/vault/.claude/skills/todoist-ai/references/issues.md
@@ -0,0 +1,65 @@
+# GitHub Issues
+
+Recent issues from the repository (18 total).
+
+## Open Issues (4)
+
+### #26: Dependency Dashboard
+**Labels:** No labels | **Created:** 2025-08-14
+[View on GitHub](https://github.com/Doist/todoist-ai/issues/26)
+
+### #241: Is there a OpenAPI json spec available?
+**Labels:** No labels | **Created:** 2025-12-12
+[View on GitHub](https://github.com/Doist/todoist-ai/issues/241)
+
+### #239: server times out frequently, needs frequent reauthentication in claude code
+**Labels:** No labels | **Created:** 2025-12-08
+[View on GitHub](https://github.com/Doist/todoist-ai/issues/239)
+
+### #162: Remove Zod v4 dependency blocker
+**Labels:** No labels | **Created:** 2025-10-23
+[View on GitHub](https://github.com/Doist/todoist-ai/issues/162)
+
+
+## Recently Closed Issues (14)
+
+### #240: Cannot connect with [email protected]
+**Labels:** No labels | **Closed:** 2025-12-08
+[View on GitHub](https://github.com/Doist/todoist-ai/issues/240)
+
+### #192: Claude Code requires reconnection too frequently
+**Labels:** No labels | **Closed:** 2025-11-13
+[View on GitHub](https://github.com/Doist/todoist-ai/issues/192)
+
+### #215: Claude Code : Adding Task "P1" vs reading tasks are inverted
+**Labels:** No labels | **Closed:** 2025-11-13
+[View on GitHub](https://github.com/Doist/todoist-ai/issues/215)
+
+### #206: MCPs are not working
+**Labels:** No labels | **Closed:** 2025-11-06
+[View on GitHub](https://github.com/Doist/todoist-ai/issues/206)
+
+### #94: This MCP server can't be used by ChatGPT to search information because it doesn't implement our specification: search action not found
+**Labels:** No labels | **Closed:** 2025-09-17
+[View on GitHub](https://github.com/Doist/todoist-ai/issues/94)
+
+### #76: parentId parameter ignored in add-projects and update-projects - fails to create/update project hierarchy
+**Labels:** No labels | **Closed:** 2025-10-26
+[View on GitHub](https://github.com/Doist/todoist-ai/issues/76)
+
+### #179: Bug: update_tasks tool schema appears incompatible with Gemini API
+**Labels:** No labels | **Closed:** 2025-10-25
+[View on GitHub](https://github.com/Doist/todoist-ai/issues/179)
+
+### #35: Release-Please v4 publish workflow not triggering automatically - requires manual re-tagging
+**Labels:** No labels | **Closed:** 2025-10-26
+[View on GitHub](https://github.com/Doist/todoist-ai/issues/35)
+
+### #42: # Feature Request: Add Deadline Support
+**Labels:** enhancement, good first issue | **Closed:** 2025-10-26
+[View on GitHub](https://github.com/Doist/todoist-ai/issues/42)
+
+### #136: TypeError: client.getUser is not a function when following Vercel AI SDK example
+**Labels:** No labels | **Closed:** 2025-10-26
+[View on GitHub](https://github.com/Doist/todoist-ai/issues/136)
+
diff --git a/vault/.claude/skills/todoist-ai/references/releases.md b/vault/.claude/skills/todoist-ai/references/releases.md
new file mode 100644
index 0000000..b11fdfc
--- /dev/null
+++ b/vault/.claude/skills/todoist-ai/references/releases.md
@@ -0,0 +1,688 @@
+# Releases
+
+Version history for this repository (47 releases).
+
+## v5.2.0: v5.2.0
+**Published:** 2025-11-27
+
+## [5.2.0](https://github.com/Doist/todoist-ai/compare/v5.1.1...v5.2.0) (2025-11-27)
+
+
+### Features
+
+* Add isUncompletable parameter support to add/update tools ([#230](https://github.com/Doist/todoist-ai/issues/230)) ([0c295ac](https://github.com/Doist/todoist-ai/commit/0c295ac7d7d1b81f5512b1c782eaba4ef24aeafd))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v5.2.0)
+
+---
+
+## v5.1.1: v5.1.1
+**Published:** 2025-11-27
+
+## [5.1.1](https://github.com/Doist/todoist-ai/compare/v5.1.0...v5.1.1) (2025-11-27)
+
+
+### Bug Fixes
+
+* **deps:** Update `@doist/todoist-api-typescript` to 6.1.12 ([#229](https://github.com/Doist/todoist-ai/issues/229)) ([54e3552](https://github.com/Doist/todoist-ai/commit/54e3552b68d648a042bac9991cb600fd8f8f5be1))
+* **deps:** update dependency @modelcontextprotocol/sdk to v1.22.0 ([#227](https://github.com/Doist/todoist-ai/issues/227)) ([b20c05e](https://github.com/Doist/todoist-ai/commit/b20c05e3273ff6a565380cdddb9be5743ba7bb66))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v5.1.1)
+
+---
+
+## v5.1.0: v5.1.0
+**Published:** 2025-11-20
+
+## [5.1.0](https://github.com/Doist/todoist-ai/compare/v5.0.2...v5.1.0) (2025-11-20)
+
+
+### Features
+
+* add read-only and destructive hints to all tools ([#222](https://github.com/Doist/todoist-ai/issues/222)) ([5d8ce22](https://github.com/Doist/todoist-ai/commit/5d8ce225c92a688834881bde13d5956bbe7e59ff))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v5.1.0)
+
+---
+
+## v5.0.2: v5.0.2
+**Published:** 2025-11-19
+
+## [5.0.2](https://github.com/Doist/todoist-ai/compare/v5.0.1...v5.0.2) (2025-11-19)
+
+
+### Bug Fixes
+
+* **find-projects:** resolve search pagination issue and update PROJECTS_MAX ([#223](https://github.com/Doist/todoist-ai/issues/223)) ([b0772d1](https://github.com/Doist/todoist-ai/commit/b0772d1dd688188cc70dcdd50989208fd18f9c39))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v5.0.2)
+
+---
+
+## v5.0.1: v5.0.1
+**Published:** 2025-11-18
+
+## [5.0.1](https://github.com/Doist/todoist-ai/compare/v5.0.0...v5.0.1) (2025-11-18)
+
+
+### Bug Fixes
+
+* **deps:** update production dependencies ([#220](https://github.com/Doist/todoist-ai/issues/220)) ([f6121b0](https://github.com/Doist/todoist-ai/commit/f6121b0fcc7bf432e07df7a8ef9c11291ba09dfb))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v5.0.1)
+
+---
+
+## v5.0.0: v5.0.0
+**Published:** 2025-11-14
+
+## [5.0.0](https://github.com/Doist/todoist-ai/compare/v4.17.4...v5.0.0) (2025-11-14)
+
+
+### ⚠ BREAKING CHANGES
+
+* semantic priority values (P1, P2, P3, P4) instead of numeric ([#217](https://github.com/Doist/todoist-ai/issues/217))
+
+### Features
+
+* semantic priority values (P1, P2, P3, P4) instead of numeric ([#217](https://github.com/Doist/todoist-ai/issues/217)) ([9bb906b](https://github.com/Doist/todoist-ai/commit/9bb906b48d836898bf616df60cef38aaa7ae2894))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v5.0.0)
+
+---
+
+## v4.17.4: v4.17.4
+**Published:** 2025-11-13
+
+## [4.17.4](https://github.com/Doist/todoist-ai/compare/v4.17.3...v4.17.4) (2025-11-13)
+
+
+### Bug Fixes
+
+* correct priority inversion for task outputs ([#216](https://github.com/Doist/todoist-ai/issues/216)) ([b4b4809](https://github.com/Doist/todoist-ai/commit/b4b4809f129d6aa029f0ef4aa28352760c879aee))
+* **deps:** pin dependencies ([#212](https://github.com/Doist/todoist-ai/issues/212)) ([2049ebf](https://github.com/Doist/todoist-ai/commit/2049ebf4e5eedd2465650c79c16e39f04a5e4ddd))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.17.4)
+
+---
+
+## v4.17.3: v4.17.3
+**Published:** 2025-11-06
+
+## [4.17.3](https://github.com/Doist/todoist-ai/compare/v4.17.2...v4.17.3) (2025-11-06)
+
+
+### Bug Fixes
+
+* **deps:** Bump `@doist/todoist-api-typescript` package ([#210](https://github.com/Doist/todoist-ai/issues/210)) ([85fbfb5](https://github.com/Doist/todoist-ai/commit/85fbfb591f2e4ee165b71ff1386a39ab96d7e31a))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.17.3)
+
+---
+
+## v4.17.2: v4.17.2
+**Published:** 2025-11-06
+
+## [4.17.2](https://github.com/Doist/todoist-ai/compare/v4.17.1...v4.17.2) (2025-11-06)
+
+
+### Bug Fixes
+
+* enforce output schemas for tools (follow-up) ([#208](https://github.com/Doist/todoist-ai/issues/208)) ([c83772a](https://github.com/Doist/todoist-ai/commit/c83772a7c29314891b1e031dce9f07d954b4e4a5))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.17.2)
+
+---
+
+## v4.17.1: v4.17.1
+**Published:** 2025-11-06
+
+## [4.17.1](https://github.com/Doist/todoist-ai/compare/v4.17.0...v4.17.1) (2025-11-06)
+
+
+### Bug Fixes
+
+* enforce output schemas for tools ([#205](https://github.com/Doist/todoist-ai/issues/205)) ([9b1d593](https://github.com/Doist/todoist-ai/commit/9b1d59317dbe5277b6f4126388a2402cf3c35e8e))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.17.1)
+
+---
+
+## v4.17.0: v4.17.0
+**Published:** 2025-11-05
+
+## [4.17.0](https://github.com/Doist/todoist-ai/compare/v4.16.1...v4.17.0) (2025-11-05)
+
+
+### Features
+
+* Add output schema to all tools ([#203](https://github.com/Doist/todoist-ai/issues/203)) ([7663388](https://github.com/Doist/todoist-ai/commit/76633886dde65880cd049733431aa9d4a5038b84))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.17.0)
+
+---
+
+## v4.16.1: v4.16.1
+**Published:** 2025-11-05
+
+## [4.16.1](https://github.com/Doist/todoist-ai/compare/v4.16.0...v4.16.1) (2025-11-05)
+
+
+### Bug Fixes
+
+* Show next steps only for paginated tools and clarify as suggestions ([#201](https://github.com/Doist/todoist-ai/issues/201)) ([f969615](https://github.com/Doist/todoist-ai/commit/f9696155fe931b6c40859c1a2f7e82a859253288))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.16.1)
+
+---
+
+## v4.16.0: v4.16.0
+**Published:** 2025-11-03
+
+## [4.16.0](https://github.com/Doist/todoist-ai/compare/v4.15.1...v4.16.0) (2025-11-03)
+
+
+### Features
+
+* Extend "inbox" project ID support to 7 additional tools ([#198](https://github.com/Doist/todoist-ai/issues/198)) ([5bab0f9](https://github.com/Doist/todoist-ai/commit/5bab0f94ab2d997d71870202294af3c5d3ac7784))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.16.0)
+
+---
+
+## v4.15.1: v4.15.1
+**Published:** 2025-10-31
+
+## [4.15.1](https://github.com/Doist/todoist-ai/compare/v4.15.0...v4.15.1) (2025-10-31)
+
+
+### Bug Fixes
+
+* Allow `inbox` as a project id ([#193](https://github.com/Doist/todoist-ai/issues/193)) ([fe4a91f](https://github.com/Doist/todoist-ai/commit/fe4a91fe2daa7f97473b97de54385e03358a8122))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.15.1)
+
+---
+
+## v4.15.0: v4.15.0
+**Published:** 2025-10-26
+
+## [4.15.0](https://github.com/Doist/todoist-ai/compare/v4.14.5...v4.15.0) (2025-10-26)
+
+
+### Features
+
+* Add deadline support to add-tasks and update-tasks ([#186](https://github.com/Doist/todoist-ai/issues/186)) ([8f795c8](https://github.com/Doist/todoist-ai/commit/8f795c8949f40d10bf629933793d8cb4607dcb58))
+* Add parentId support to update-projects tool ([#184](https://github.com/Doist/todoist-ai/issues/184)) ([0185b83](https://github.com/Doist/todoist-ai/commit/0185b836fff1359c8303de20bcc37c8f86138180))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.15.0)
+
+---
+
+## v4.14.5: v4.14.5
+**Published:** 2025-10-25
+
+## [4.14.5](https://github.com/Doist/todoist-ai/compare/v4.14.4...v4.14.5) (2025-10-25)
+
+
+### Bug Fixes
+
+* Remove nullable type from update_tasks to fix Gemini API compatibility ([#181](https://github.com/Doist/todoist-ai/issues/181)) ([c97be7f](https://github.com/Doist/todoist-ai/commit/c97be7f39ae48d837562fd303b67ed81e8935c18))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.14.5)
+
+---
+
+## v4.14.4: v4.14.4
+**Published:** 2025-10-24
+
+## [4.14.4](https://github.com/Doist/todoist-ai/compare/v4.14.3...v4.14.4) (2025-10-24)
+
+
+### Bug Fixes
+
+* Add actions: write permission to trigger workflows ([6863953](https://github.com/Doist/todoist-ai/commit/6863953b6e92fd8b35f4692b5c609ad42631722a))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.14.4)
+
+---
+
+## v4.14.3: v4.14.3
+**Published:** 2025-10-24
+
+## [4.14.3](https://github.com/Doist/todoist-ai/compare/v4.14.2...v4.14.3) (2025-10-24)
+
+
+### Bug Fixes
+
+* Add --repo flag to gh workflow run command ([f61caa8](https://github.com/Doist/todoist-ai/commit/f61caa8c7aabce166484b95b70886aa4049c904c))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.14.3)
+
+---
+
+## v4.14.2: v4.14.2
+**Published:** 2025-10-24
+
+## [4.14.2](https://github.com/Doist/todoist-ai/compare/v4.14.1...v4.14.2) (2025-10-24)
+
+
+### Bug Fixes
+
+* Trigger publish workflow automatically from release-please ([#174](https://github.com/Doist/todoist-ai/issues/174)) ([081bc2b](https://github.com/Doist/todoist-ai/commit/081bc2ba5abfdc3bf4bfe3c282f29570877b977c))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.14.2)
+
+---
+
+## v4.14.1: v4.14.1
+**Published:** 2025-10-24
+
+## [4.14.1](https://github.com/Doist/todoist-ai/compare/v4.14.0...v4.14.1) (2025-10-24)
+
+
+### Bug Fixes
+
+* Update todoist-typescript-sdk to 5.7.1 (follow-up) ([#172](https://github.com/Doist/todoist-ai/issues/172)) ([b4f8dc3](https://github.com/Doist/todoist-ai/commit/b4f8dc3ffa4c3dd7489ece03be5a0f391130a2ce))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.14.1)
+
+---
+
+## v4.14.0: v4.14.0
+**Published:** 2025-10-23
+
+## [4.14.0](https://github.com/Doist/todoist-ai/compare/v4.13.5...v4.14.0) (2025-10-23)
+
+
+### Features
+
+* Add find-activity tool ([#169](https://github.com/Doist/todoist-ai/issues/169)) ([1abf67f](https://github.com/Doist/todoist-ai/commit/1abf67f3a99191582cf0b5ea2516420f1278dc9a))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.14.0)
+
+---
+
+## v4.13.5: v4.13.5
+**Published:** 2025-10-23
+
+## [4.13.5](https://github.com/Doist/todoist-ai/compare/v4.13.4...v4.13.5) (2025-10-23)
+
+
+### Bug Fixes
+
+* clarify find-completed-tasks scope ([#167](https://github.com/Doist/todoist-ai/issues/167)) ([f110669](https://github.com/Doist/todoist-ai/commit/f11066934d4f6b790599d0f89db416a32437edd3))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.13.5)
+
+---
+
+## v4.13.4: v4.13.4
+**Published:** 2025-10-23
+
+## [4.13.4](https://github.com/Doist/todoist-ai/compare/v4.13.3...v4.13.4) (2025-10-23)
+
+
+### Bug Fixes
+
+* Test publish workflow (no functional changes) ([#164](https://github.com/Doist/todoist-ai/issues/164)) ([68afb4c](https://github.com/Doist/todoist-ai/commit/68afb4ce06366cc022a1718e6cd0c3525c5aab48))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.13.4)
+
+---
+
+## v4.13.3: v4.13.3
+**Published:** 2025-10-23
+
+## [4.13.3](https://github.com/Doist/todoist-ai/compare/v4.13.2...v4.13.3) (2025-10-23)
+
+
+### Bug Fixes
+
+* Switch to using `moveTask` instead of `moveTasks` ([#160](https://github.com/Doist/todoist-ai/issues/160)) ([34e3fc6](https://github.com/Doist/todoist-ai/commit/34e3fc67922379bf0aef39a9e7f1939ded5f0e08))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.13.3)
+
+---
+
+## v4.13.2: v4.13.2
+**Published:** 2025-10-22
+
+## [4.13.2](https://github.com/Doist/todoist-ai/compare/v4.13.1...v4.13.2) (2025-10-22)
+
+
+### Bug Fixes
+
+* Output `checked` for the `fetch` tool ([#158](https://github.com/Doist/todoist-ai/issues/158)) ([f0a6eaf](https://github.com/Doist/todoist-ai/commit/f0a6eaf62a915cfab289f1b5181770ccd11d0bdb))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.13.2)
+
+---
+
+## v4.13.1: v4.13.1
+**Published:** 2025-10-22
+
+## [4.13.1](https://github.com/Doist/todoist-ai/compare/v4.13.0...v4.13.1) (2025-10-22)
+
+
+### Bug Fixes
+
+* Remove `updatedAt` ([#155](https://github.com/Doist/todoist-ai/issues/155)) ([3f3f345](https://github.com/Doist/todoist-ai/commit/3f3f3458f9d54f4f347dfb7c34892fb3cda7ff3b))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.13.1)
+
+---
+
+## v4.13.0: v4.13.0
+**Published:** 2025-10-21
+
+## [4.13.0](https://github.com/Doist/todoist-ai/compare/v4.12.0...v4.13.0) (2025-10-21)
+
+
+### Features
+
+* Expose completion and modification metadata in task mapping ([#153](https://github.com/Doist/todoist-ai/issues/153)) ([1e2d3b3](https://github.com/Doist/todoist-ai/commit/1e2d3b3f461e75be8cc63ae3a4e070d113f5c4da))
+* extend responsibleUser filtering to more tools ([#149](https://github.com/Doist/todoist-ai/issues/149)) ([c146d74](https://github.com/Doist/todoist-ai/commit/c146d749eb097e1d383dda00e6a09e05389969dd))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.13.0)
+
+---
+
+## v4.12.0: v4.12.0
+**Published:** 2025-10-14
+
+## [4.12.0](https://github.com/Doist/todoist-ai/compare/v4.11.0...v4.12.0) (2025-10-14)
+
+
+### Features
+
+* In find-tasks-by-date use backend filtering for responsible user ([#145](https://github.com/Doist/todoist-ai/issues/145)) ([5d1e140](https://github.com/Doist/todoist-ai/commit/5d1e1400f639e8c802019421eb0437ef39c67a64))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.12.0)
+
+---
+
+## v4.11.0: v4.11.0
+**Published:** 2025-10-13
+
+## [4.11.0](https://github.com/Doist/todoist-ai/compare/v4.10.0...v4.11.0) (2025-10-13)
+
+
+### Features
+
+* Improve findCompletedTasks to handle user timezones ([#143](https://github.com/Doist/todoist-ai/issues/143)) ([c27d897](https://github.com/Doist/todoist-ai/commit/c27d8973d0ea9342f8b1e56659fca900f920ddb3))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.11.0)
+
+---
+
+## v4.10.0: v4.10.0
+**Published:** 2025-10-10
+
+## [4.10.0](https://github.com/Doist/todoist-ai/compare/v4.9.4...v4.10.0) (2025-10-10)
+
+
+### Features
+
+* add OpenAI-compliant `search` and `fetch` tools ([#134](https://github.com/Doist/todoist-ai/issues/134)) ([153289c](https://github.com/Doist/todoist-ai/commit/153289c5cf02b2da6b3f4cf6e8a7c681b3ee3aec))
+* Clarify content vs description usage and Markdown support ([#139](https://github.com/Doist/todoist-ai/issues/139)) ([cb410a2](https://github.com/Doist/todoist-ai/commit/cb410a2c16670ec07ee2d812ba961075c3f20dda))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.10.0)
+
+---
+
+## v4.9.4: v4.9.4
+**Published:** 2025-10-06
+
+## [4.9.4](https://github.com/Doist/todoist-ai/compare/v4.9.3...v4.9.4) (2025-10-06)
+
+
+### Bug Fixes
+
+* Ensures null fields are not returned ([#130](https://github.com/Doist/todoist-ai/issues/130)) ([a016011](https://github.com/Doist/todoist-ai/commit/a0160115b6fff4b96751056506494e43f582527c))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.9.4)
+
+---
+
+## v4.9.3: v4.9.3
+**Published:** 2025-10-02
+
+## [4.9.3](https://github.com/Doist/todoist-ai/compare/v4.9.2...v4.9.3) (2025-10-02)
+
+
+### Bug Fixes
+
+* dayCount and overdue only fixes ([#128](https://github.com/Doist/todoist-ai/issues/128)) ([d020c06](https://github.com/Doist/todoist-ai/commit/d020c0622fb5c9a71b5f666406529236db76bdef))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.9.3)
+
+---
+
+## v4.9.2: v4.9.2
+**Published:** 2025-10-02
+
+## [4.9.2](https://github.com/Doist/todoist-ai/compare/v4.9.1...v4.9.2) (2025-10-02)
+
+
+### Bug Fixes
+
+* allow add-tasks to work with only content parameter ([#126](https://github.com/Doist/todoist-ai/issues/126)) ([27bda34](https://github.com/Doist/todoist-ai/commit/27bda346f465a1a2ab7a0ab833c151093a4d7044))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.9.2)
+
+---
+
+## v4.9.1: v4.9.1
+**Published:** 2025-10-01
+
+## [4.9.1](https://github.com/Doist/todoist-ai/compare/v4.9.0...v4.9.1) (2025-10-01)
+
+
+### Bug Fixes
+
+* Enhance task filtering by responsible user and update related tools ([#121](https://github.com/Doist/todoist-ai/issues/121)) ([cea0917](https://github.com/Doist/todoist-ai/commit/cea0917a8b2bd1f056e1b08f14e9cb858b9711a5))
+* preserve markdown in tasks content and description ([#124](https://github.com/Doist/todoist-ai/issues/124)) ([0cc48fe](https://github.com/Doist/todoist-ai/commit/0cc48fe93595213729d794b7b6c92d54072cf6d5))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.9.1)
+
+---
+
+## v4.8.0: v4.8.0
+**Published:** 2025-09-29
+
+## [4.8.0](https://github.com/Doist/todoist-ai/compare/v4.7.1...v4.8.0) (2025-09-29)
+
+
+### Features
+
+* merge overdue into today's tasks in find-tasks-by-date tool ([#108](https://github.com/Doist/todoist-ai/issues/108)) ([f86e69d](https://github.com/Doist/todoist-ai/commit/f86e69d3ac4861a1b99ebdc8f25f135c6d6adeeb))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.8.0)
+
+---
+
+## v4.7.1: v4.7.1
+**Published:** 2025-09-29
+
+## [4.7.1](https://github.com/Doist/todoist-ai/compare/v4.7.0...v4.7.1) (2025-09-29)
+
+
+### Bug Fixes
+
+* Convert the API priorities into a consumable priority ([#115](https://github.com/Doist/todoist-ai/issues/115)) ([e4cc62f](https://github.com/Doist/todoist-ai/commit/e4cc62f5e456c517995aaf9b8e22153923a55ff7))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.7.1)
+
+---
+
+## v4.7.0: v4.7.0
+**Published:** 2025-09-25
+
+## [4.7.0](https://github.com/Doist/todoist-ai/compare/v4.6.1...v4.7.0) (2025-09-25)
+
+
+### Features
+
+* Document the MCP setup better, including the remote endpoint ([#109](https://github.com/Doist/todoist-ai/issues/109)) ([e1e69e2](https://github.com/Doist/todoist-ai/commit/e1e69e27e91675775e7f4ea0bef709a17722131c))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.7.0)
+
+---
+
+## v4.6.1: v4.6.1
+**Published:** 2025-09-24
+
+## [4.6.1](https://github.com/Doist/todoist-ai/compare/v4.6.0...v4.6.1) (2025-09-24)
+
+
+### Bug Fixes
+
+* Update package.json with `mcpName` ([#106](https://github.com/Doist/todoist-ai/issues/106)) ([df19306](https://github.com/Doist/todoist-ai/commit/df19306adb13ff6416a37e4b49a6d2e5ab5c459f))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.6.1)
+
+---
+
+## v4.6.0: v4.6.0
+**Published:** 2025-09-24
+
+## [4.6.0](https://github.com/Doist/todoist-ai/compare/v4.5.2...v4.6.0) (2025-09-24)
+
+
+### Features
+
+* add label support for add-tasks and update-tasks tools ([#103](https://github.com/Doist/todoist-ai/issues/103)) ([a4bc708](https://github.com/Doist/todoist-ai/commit/a4bc7085b5a63402970841e586ce985cab9022d0))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.6.0)
+
+---
+
+## v4.5.2: v4.5.2
+**Published:** 2025-09-24
+
+## [4.5.2](https://github.com/Doist/todoist-ai/compare/v4.5.1...v4.5.2) (2025-09-24)
+
+
+### Miscellaneous Chores
+
+* Release 4.5.2 ([11df6f2](https://github.com/Doist/todoist-ai/commit/11df6f2c03e31bffd02a6c4f1a5176158e434e05))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.5.2)
+
+---
+
+## v4.5.0: v4.5.0
+**Published:** 2025-09-11
+
+## [4.5.0](https://github.com/Doist/todoist-ai/compare/v4.4.0...v4.5.0) (2025-09-11)
+
+
+### Features
+
+* add task assignment management ([#81](https://github.com/Doist/todoist-ai/issues/81)) ([b9b1691](https://github.com/Doist/todoist-ai/commit/b9b16916dec8f18efc37631d77f97354fae2194a))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.5.0)
+
+---
+
+## v4.4.0: v4.4.0
+**Published:** 2025-09-10
+
+## [4.4.0](https://github.com/Doist/todoist-ai/compare/v4.3.0...v4.4.0) (2025-09-10)
+
+
+### Features
+
+* Add user's id to user_info tool ([#84](https://github.com/Doist/todoist-ai/issues/84)) ([706ed8f](https://github.com/Doist/todoist-ai/commit/706ed8fdfd11199808ca9824d4c66e8211d773c1))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.4.0)
+
+---
+
+## v4.3.0: v4.3.0
+**Published:** 2025-09-09
+
+## [4.3.0](https://github.com/Doist/todoist-ai/compare/v4.2.0...v4.3.0) (2025-09-09)
+
+
+### Features
+
+* Add user-info tool and upgrade Todoist API ([#82](https://github.com/Doist/todoist-ai/issues/82)) ([b583fe1](https://github.com/Doist/todoist-ai/commit/b583fe1045ea38fbe25dfa804df9ebe958f2881d))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.3.0)
+
+---
+
+## v4.2.0: v4.2.0
+**Published:** 2025-08-29
+
+## [4.2.0](https://github.com/Doist/todoist-ai/compare/v4.1.0...v4.2.0) (2025-08-29)
+
+
+### Features
+
+* Add support for filtering by label ([#71](https://github.com/Doist/todoist-ai/issues/71)) ([b608d32](https://github.com/Doist/todoist-ai/commit/b608d32f7636a175dc62ca388892e9aef0834712))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v4.2.0)
+
+---
+
+## v3.0.0: v3.0.0
+**Published:** 2025-08-22
+
+## [3.0.0](https://github.com/Doist/todoist-ai/compare/v2.2.2...v3.0.0) (2025-08-21)
+
+
+### ⚠ BREAKING CHANGES
+
+* verb-first tool names, unify find-by-container into find-tasks ([#53](https://github.com/Doist/todoist-ai/issues/53))
+* Remove single update task and replace with multiple ([#47](https://github.com/Doist/todoist-ai/issues/47))
+
+### Features
+
+* Improve tool output UX with LLM-readable responses ([#49](https://github.com/Doist/todoist-ai/issues/49)) ([7c25696](https://github.com/Doist/todoist-ai/commit/7c25696926bbaee158482cbc75595e80959e1c12))
+* Remove single update task and replace with multiple ([#47](https://github.com/Doist/todoist-ai/issues/47)) ([8a9b7cf](https://github.com/Doist/todoist-ai/commit/8a9b7cf119a405a2849ab95c437a344961790686))
+* verb-first tool names, unify find-by-container into find-tasks ([#53](https://github.com/Doist/todoist-ai/issues/53)) ([dbada71](https://github.com/Doist/todoist-ai/commit/dbada719d98df4bb91a52a0a7af8afb6ad6f3fae))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v3.0.0)
+
+---
+
+## v2.0.0: v2.0.0
+**Published:** 2025-08-13
+
+## [2.0.0](https://github.com/Doist/todoist-ai/compare/v1.1.0...v2.0.0) (2025-08-13)
+
+
+### ⚠ BREAKING CHANGES
+
+* Consolidate MCP tools to reduce tool count ([#14](https://github.com/Doist/todoist-ai/issues/14))
+
+### Features
+
+* Consolidate MCP tools to reduce tool count ([#14](https://github.com/Doist/todoist-ai/issues/14)) ([f0ccdf8](https://github.com/Doist/todoist-ai/commit/f0ccdf8fd17f046fdb8d0938dea94163fd916a7c))
+
+
+### Bug Fixes
+
+* update release-please action to googleapis/release-please-action@v4 ([7fbb5fd](https://github.com/Doist/todoist-ai/commit/7fbb5fdd3f435e68a9b2ba054247d29e82fcc465))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v2.0.0)
+
+---
+
+## v1.1.0: v1.1.0
+**Published:** 2025-08-13
+
+## [1.1.0](https://github.com/Doist/todoist-ai/compare/v1.0.0...v1.1.0) (2025-08-13)
+
+
+### Features
+
+* Adds completed tasks tool ([#8](https://github.com/Doist/todoist-ai/issues/8)) ([d0ffad1](https://github.com/Doist/todoist-ai/commit/d0ffad10a331c16f14b4d738ed7ac368fd8e44b4))
+
+[View on GitHub](https://github.com/Doist/todoist-ai/releases/tag/v1.1.0)
+
+---
+
diff --git a/vault/MOC/MOC-ideas.md b/vault/MOC/MOC-ideas.md
new file mode 100644
index 0000000..b0520c5
--- /dev/null
+++ b/vault/MOC/MOC-ideas.md
@@ -0,0 +1,9 @@
+# Ideas
+
+## Recent
+
+<!-- Recent ideas will be added here -->
+
+## By Topic
+
+<!-- Ideas organized by topic -->
diff --git a/vault/MOC/MOC-learnings.md b/vault/MOC/MOC-learnings.md
new file mode 100644
index 0000000..b3716de
--- /dev/null
+++ b/vault/MOC/MOC-learnings.md
@@ -0,0 +1,19 @@
+# Learnings
+
+Map of Content for learnings and insights.
+
+## Recent
+
+<!-- New learnings will appear here -->
+
+## By Topic
+
+### Topic 1
+<!-- Links to related learnings -->
+
+### Topic 2
+<!-- Links to related learnings -->
+
+---
+
+*Updated automatically by the processor*
diff --git a/vault/MOC/MOC-projects.md b/vault/MOC/MOC-projects.md
new file mode 100644
index 0000000..a5e6743
--- /dev/null
+++ b/vault/MOC/MOC-projects.md
@@ -0,0 +1,15 @@
+# Projects
+
+Map of Content for project notes.
+
+## Active
+
+<!-- Active project thoughts -->
+
+## Archive
+
+<!-- Completed projects -->
+
+---
+
+*Updated automatically by the processor*
diff --git a/vault/MOC/MOC-reflections.md b/vault/MOC/MOC-reflections.md
new file mode 100644
index 0000000..a12e1b3
--- /dev/null
+++ b/vault/MOC/MOC-reflections.md
@@ -0,0 +1,19 @@
+# Reflections
+
+Map of Content for personal reflections.
+
+## Recent
+
+<!-- Recent reflections will appear here -->
+
+## By Theme
+
+### Theme 1
+<!-- Links to related reflections -->
+
+### Theme 2
+<!-- Links to related reflections -->
+
+---
+
+*Updated automatically by the processor*
diff --git a/vault/MOC/MOC-weekly.md b/vault/MOC/MOC-weekly.md
new file mode 100644
index 0000000..c8dddc0
--- /dev/null
+++ b/vault/MOC/MOC-weekly.md
@@ -0,0 +1,15 @@
+# Weekly Summary
+
+Map of Content for weekly summaries.
+
+## Current Week
+
+<!-- Link to current week summary -->
+
+## Previous Weeks
+
+<!-- Links to past week summaries -->
+
+---
+
+*Updated automatically by the processor*
diff --git a/vault/attachments/.gitkeep b/vault/attachments/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/vault/daily/.gitkeep b/vault/daily/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/vault/goals/0-vision-3y.md b/vault/goals/0-vision-3y.md
new file mode 100644
index 0000000..6879d3d
--- /dev/null
+++ b/vault/goals/0-vision-3y.md
@@ -0,0 +1,108 @@
+---
+type: vision
+horizon: 3-years
+period: 2025-2027
+updated: YYYY-MM-DD
+---
+
+# Vision 2025-2027
+
+## Life Mission
+
+<!-- Your life direction in one sentence -->
+<!-- Example: "Build meaningful technology while maintaining balance across health, relationships, and personal growth." -->
+
+---
+
+## Life Areas
+
+### Career & Business
+
+**3-Year Vision:**
+<!-- Where do you want to be professionally in 3 years? -->
+
+**Key Milestones:**
+- [ ] Milestone 1
+- [ ] Milestone 2
+- [ ] Milestone 3
+
+---
+
+### Health & Energy
+
+**3-Year Vision:**
+<!-- What does your ideal health look like? -->
+
+**Key Milestones:**
+- [ ] Milestone 1
+- [ ] Milestone 2
+- [ ] Milestone 3
+
+---
+
+### Relationships & Family
+
+**3-Year Vision:**
+<!-- How do you want your relationships to evolve? -->
+
+**Key Milestones:**
+- [ ] Milestone 1
+- [ ] Milestone 2
+- [ ] Milestone 3
+
+---
+
+### Personal Growth
+
+**3-Year Vision:**
+<!-- What skills, habits, or mindset changes do you want? -->
+
+**Key Milestones:**
+- [ ] Milestone 1
+- [ ] Milestone 2
+- [ ] Milestone 3
+
+---
+
+### Financial
+
+**3-Year Vision:**
+<!-- What does financial security look like for you? -->
+
+**Key Milestones:**
+- [ ] Milestone 1
+- [ ] Milestone 2
+- [ ] Milestone 3
+
+---
+
+### Creativity & Joy
+
+**3-Year Vision:**
+<!-- What brings you joy? How will you nurture it? -->
+
+**Key Milestones:**
+- [ ] Milestone 1
+- [ ] Milestone 2
+- [ ] Milestone 3
+
+---
+
+## Quarterly Review Questions
+
+1. Which goals still align with my values?
+2. What has changed that affects these goals?
+3. What am I willing to sacrifice to achieve these?
+4. Who can help me?
+
+---
+
+## Links
+
+- [[1-yearly-2025]] - This year's goals
+- [[2-monthly]] - Current month focus
+- [[3-weekly]] - This week's plan
+
+---
+
+*Next Review: Q1 2025*
diff --git a/vault/goals/1-yearly-2025.md b/vault/goals/1-yearly-2025.md
new file mode 100644
index 0000000..4f8c293
--- /dev/null
+++ b/vault/goals/1-yearly-2025.md
@@ -0,0 +1,107 @@
+---
+type: yearly
+period: 2025
+updated: YYYY-MM-DD
+---
+
+# Goals 2025
+
+## Annual Theme
+
+<!-- One word or phrase that defines this year -->
+<!-- Example: "Foundation", "Growth", "Balance" -->
+
+---
+
+## Career & Business
+
+### Goal 1: [Your Goal]
+<!-- What do you want to achieve professionally? -->
+
+**Success Metrics:**
+- [ ] Metric 1
+- [ ] Metric 2
+
+**Quarterly Milestones:**
+- Q1: [milestone]
+- Q2: [milestone]
+- Q3: [milestone]
+- Q4: [milestone]
+
+---
+
+## Health & Energy
+
+### Goal 1: [Your Goal]
+<!-- What health habits do you want to build? -->
+
+**Success Metrics:**
+- [ ] Metric 1
+- [ ] Metric 2
+
+---
+
+## Relationships
+
+### Goal 1: [Your Goal]
+<!-- How do you want to improve your relationships? -->
+
+**Success Metrics:**
+- [ ] Metric 1
+- [ ] Metric 2
+
+---
+
+## Personal Growth
+
+### Goal 1: [Your Goal]
+<!-- What skills or habits do you want to develop? -->
+
+**Success Metrics:**
+- [ ] Metric 1
+- [ ] Metric 2
+
+---
+
+## Financial
+
+### Goal 1: [Your Goal]
+<!-- What financial milestones do you want to reach? -->
+
+**Success Metrics:**
+- [ ] Metric 1
+- [ ] Metric 2
+
+---
+
+## Progress Dashboard
+
+| Area | Goal | Progress | Status |
+|------|------|----------|--------|
+| Career | [goal] | 0% | --- |
+| Health | [goal] | 0% | --- |
+| Relationships | [goal] | 0% | --- |
+| Growth | [goal] | 0% | --- |
+| Financial | [goal] | 0% | --- |
+
+---
+
+## Monthly Review Log
+
+| Month | Key Wins | Adjustments |
+|-------|----------|-------------|
+| Jan | | |
+| Feb | | |
+| Mar | | |
+
+---
+
+## Links
+
+- [[0-vision-3y]] - 3-year vision
+- [[2-monthly]] - Current month focus
+- [[3-weekly]] - This week's plan
+
+---
+
+*Next Review: End of January*
diff --git a/vault/goals/2-monthly.md b/vault/goals/2-monthly.md
new file mode 100644
index 0000000..67e7e6c
--- /dev/null
+++ b/vault/goals/2-monthly.md
@@ -0,0 +1,95 @@
+---
+type: monthly
+period: YYYY-MM
+updated: YYYY-MM-DD
+---
+
+# Monthly Focus
+
+## Top 3 Priorities
+
+### Priority 1: [Your Top Priority]
+<!-- What MUST happen this month? -->
+
+**Why it matters:** [connection to yearly goal]
+
+**Key Actions:**
+- [ ] Action 1
+- [ ] Action 2
+- [ ] Action 3
+
+**Definition of Done:** [clear outcome]
+
+---
+
+### Priority 2: [Second Priority]
+
+**Why it matters:** [connection to yearly goal]
+
+**Key Actions:**
+- [ ] Action 1
+- [ ] Action 2
+- [ ] Action 3
+
+**Definition of Done:** [clear outcome]
+
+---
+
+### Priority 3: [Third Priority]
+
+**Why it matters:** [connection to yearly goal]
+
+**Key Actions:**
+- [ ] Action 1
+- [ ] Action 2
+- [ ] Action 3
+
+**Definition of Done:** [clear outcome]
+
+---
+
+## NOT Doing This Month
+
+<!-- What are you consciously saying NO to? -->
+-
+-
+-
+
+---
+
+## Weekly Check-ins
+
+| Week | Progress | Blockers | Adjustments |
+|------|----------|----------|-------------|
+| W1 | | | |
+| W2 | | | |
+| W3 | | | |
+| W4 | | | |
+
+---
+
+## End of Month Review
+
+**What worked:**
+-
+
+**What didn't work:**
+-
+
+**Key learnings:**
+-
+
+**Next month focus:**
+-
+
+---
+
+## Links
+
+- [[0-vision-3y]] - 3-year vision
+- [[1-yearly-2025]] - Annual goals
+- [[3-weekly]] - This week's plan
+
+---
+
+*Next Review: End of month*
diff --git a/vault/goals/3-weekly.md b/vault/goals/3-weekly.md
new file mode 100644
index 0000000..7a1a559
--- /dev/null
+++ b/vault/goals/3-weekly.md
@@ -0,0 +1,127 @@
+---
+type: weekly
+week: YYYY-WWW
+updated: YYYY-MM-DD
+---
+
+# Weekly Focus
+
+## ONE Big Thing
+
+> **If I accomplish nothing else, I will:**
+> [Single most important outcome for this week]
+
+<!-- This is read by the bot during daily processing -->
+
+---
+
+## Week at a Glance
+
+**Week:** [X] of 52
+**Energy Level:** [High/Medium/Low]
+**Available Hours:** [X] hours focused work
+
+---
+
+## Priority Tasks
+
+### Must Do (Non-negotiable)
+
+- [ ] Task 1 — Связь: [[1-yearly-2025#Goal]]
+- [ ] Task 2
+- [ ] Task 3
+
+### Should Do (Important)
+
+- [ ] Task 1
+- [ ] Task 2
+
+### Could Do (If time permits)
+
+- [ ] Task 1
+- [ ] Task 2
+
+---
+
+## Daily Plan
+
+### Monday
+
+- [ ] Task 1
+- [ ] Task 2
+
+### Tuesday
+
+- [ ] Task 1
+- [ ] Task 2
+
+### Wednesday
+
+- [ ] Task 1
+- [ ] Task 2
+
+### Thursday
+
+- [ ] Task 1
+- [ ] Task 2
+
+### Friday
+
+- [ ] Task 1
+- [ ] Task 2
+
+### Weekend
+
+- [ ] Rest / Family time
+- [ ] Optional task
+
+---
+
+## Key Meetings & Events
+
+| Day | Time | Event | Prep |
+|-----|------|-------|------|
+| Mon | | | |
+| Tue | | | |
+
+---
+
+## Habits Tracker
+
+| Habit | Mon | Tue | Wed | Thu | Fri | Sat | Sun |
+|-------|-----|-----|-----|-----|-----|-----|-----|
+| [Habit 1] | | | | | | | |
+| [Habit 2] | | | | | | | |
+| [Habit 3] | | | | | | | |
+
+---
+
+## End of Week Review
+
+### What Worked
+
+-
+
+### What Didn't Work
+
+-
+
+### Lessons Learned
+
+-
+
+### Next Week Focus
+
+>
+
+---
+
+## Links
+
+- [[2-monthly]] - Monthly priorities
+- [[1-yearly-2025]] - Yearly goals
+- Previous: [[3-weekly-YYYY-WXX]]
+
+---
+
+*Week Started: YYYY-MM-DD*
diff --git a/vault/summaries/.gitkeep b/vault/summaries/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/vault/templates/daily-template.md b/vault/templates/daily-template.md
new file mode 100644
index 0000000..43ac756
--- /dev/null
+++ b/vault/templates/daily-template.md
@@ -0,0 +1,4 @@
+# {{date}}
+
+<!-- Daily file for {{date}} -->
+<!-- Entries are added automatically by d-brain bot -->
diff --git a/vault/thoughts/ideas/.gitkeep b/vault/thoughts/ideas/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/vault/thoughts/learnings/.gitkeep b/vault/thoughts/learnings/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/vault/thoughts/projects/.gitkeep b/vault/thoughts/projects/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/vault/thoughts/reflections/.gitkeep b/vault/thoughts/reflections/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/vault/thoughts/tasks/.gitkeep b/vault/thoughts/tasks/.gitkeep
new file mode 100644
index 0000000..e69de29