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.
Python ai-agentsai-automationclaudeclaude-codeebbinghausknowledge-graphllmmemory-systemobsidianpersonal-assistantpkmproductivitypythonsecond-braintelegram-botvoice-assistant
refactor(processor)!: daily = autograph cards + day summary
smixs2abf00fbe43c
diff --git a/src/d_brain/services/processor.py b/src/d_brain/services/processor.pyindex 1e39832..9059207 100644--- a/src/d_brain/services/processor.py+++ b/src/d_brain/services/processor.py@@ -49,10 +49,12 @@ class ClaudeProcessor:"processed_entries": 0,}- def _ask(self, prompt: str) -> dict[str, Any]:+ def _ask(self, prompt: str, *, wrap: bool = True) -> dict[str, Any]:if self.session is None:return {"error": "session not configured", "processed_entries": 0}- return self._to_report(self.session.ask(prompt, timeout=DEFAULT_TIMEOUT))+ return self._to_report(+ self.session.ask(prompt, timeout=DEFAULT_TIMEOUT, wrap=wrap)+ )# ── content helpers (unchanged) ──────────────────────────────────@@ -77,10 +79,16 @@ class ClaudeProcessor:{skill_content}=== END SKILL ===+ЯДРО ОБРАБОТКИ:+1. Создай карточки из заметок дня по шаблону autograph+ (vault/.claude/skills/autograph/ — type, description-сниппет, tags, status)+2. Свяжи карточки wiki-ссылками с хабами и соседями+3. Сформируй саммари дня → обнови MEMORY.md / handoff.md по правилам скилла+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"""- return self._ask(prompt)+ return self._ask(prompt, wrap=True)diff --git a/tests/test_processor.py b/tests/test_processor.pyindex 17a7ed5..6a65ae4 100644--- a/tests/test_processor.py+++ b/tests/test_processor.py@@ -16,7 +16,7 @@ class FakeSession:self.result = resultself.prompts: list[str] = []- def ask(self, prompt: str, *, timeout: float = 1200, request_id=None) -> AskResult: # noqa: ANN001+ def ask(self, prompt: str, **kwargs) -> AskResult: # noqa: ANN003self.prompts.append(prompt)return self.result@@ -80,3 +80,27 @@ def test_prompts_contain_no_todoist_references(tmp_path):p.process_daily(date(2026, 6, 7))joined = "\n".join(sess.prompts).lower()assert "todoist" not in joined+++def test_dbrain_processor_skill_tree_is_todoist_free():+ """v3.0: the daily-processing skill (embedded into the daily prompt) and+ the vault rules must not instruct any Todoist usage."""+ import pathlib++ root = pathlib.Path(__file__).resolve().parent.parent / "vault" / ".claude"+ hits = []+ for sub in ("skills/dbrain-processor", "rules"):+ for f in (root / sub).rglob("*.md"):+ if "todoist" in f.read_text().lower():+ hits.append(str(f))+ assert not hits, f"todoist instructions remain in: {hits}"+++def test_process_daily_prompt_instructs_cards_and_summary(tmp_path):+ day = _daily(tmp_path)+ sess = FakeSession(AskResult("ok", reply="x"))+ p = ClaudeProcessor(tmp_path, session=sess)+ p.process_daily(day)+ prompt = sess.prompts[0].lower()+ assert "autograph" in prompt+ assert "саммари" in prompt or "summary" in promptdiff --git a/vault/.claude/rules/daily-format.md b/vault/.claude/rules/daily-format.mdindex dd091bf..8a323bf 100644--- a/vault/.claude/rules/daily-format.md+++ b/vault/.claude/rules/daily-format.md@@ -48,7 +48,7 @@ When processing daily files:1. **Read chronologically** — entries are timestamped2. **Classify each entry** — task, idea, reflection, learning, project3. **Check for photos** — analyze with vision if present-4. **Extract actionable items** — create tasks in Todoist+4. **Extract actionable items** — add task entries to the daily note5. **Save valuable thoughts** — move to `thoughts/` categories6. **Mark as processed** — after successful processingdiff --git a/vault/.claude/rules/goals-format.md b/vault/.claude/rules/goals-format.mdindex e754abb..f78b9ce 100644--- a/vault/.claude/rules/goals-format.md+++ b/vault/.claude/rules/goals-format.md@@ -25,7 +25,7 @@ Goals cascade from long-term to daily:→ Yearly Goals (annual objectives)→ Monthly Focus (current priorities)→ Weekly Plan (this week's actions)- → Daily Tasks (today in Todoist)+ → Daily Tasks (today's daily note)```## Required Frontmatter@@ -89,7 +89,7 @@ When creating tasks, reference goals:Goals without activity for 7+ days trigger warning in report.Track "last touched" via:-- Task completion in Todoist+- Task entry completion in the vault- Note saved related to goal- Progress % updatediff --git a/vault/.claude/skills/dbrain-processor/SKILL.md b/vault/.claude/skills/dbrain-processor/SKILL.mdindex fedea9c..a7c5821 100644--- a/vault/.claude/skills/dbrain-processor/SKILL.md+++ b/vault/.claude/skills/dbrain-processor/SKILL.md@@ -38,15 +38,15 @@ CORRECT:- Read `business/_index.md` — Your Business (клиенты, проекты, CRM)- Read `projects/_index.md` — личные проекты (если релевантно)3. **Read daily** — daily/YYYY-MM-DD.md-4. **Check workload** — `mcp-cli call todoist find-tasks-by-date '{"startDate": "today", "daysCount": 7}'`-5. **CHECK PROCESS GOALS** — `mcp-cli call todoist find-tasks '{"labels": ["process-goal"]}'`- → If empty or stale: generate from goals, create recurring tasks-6. **Process entries** — Classify → task or thought, detect business mentions-7. **Build links** — Connect notes with [[wiki-links]], link to business entities-8. **Generate HTML report** — include process goals status + business activity-9. **Log actions to daily** — append action log entry (see below)-10. **Evolve MEMORY.md** — update long-term memory if needed (see below)-11. **Capture observations** — record friction signals to handoff.md (see below)+4. **Process entries** — Classify → task or thought, detect business mentions+5. **Create cards (autograph)** — new entities/thoughts become vault cards per+ the autograph template (type, description-as-snippet, tags, status); tasks+ become checklist entries in the daily note / project notes+6. **Build links** — Connect notes with [[wiki-links]], link to business entities+7. **Generate HTML report** — business activity + day summary+8. **Log actions to daily** — append action log entry (see below)+9. **Evolve MEMORY.md** — update long-term memory if needed (see below)+10. **Capture observations** — record friction signals to handoff.md (see below)## ОБЯЗАТЕЛЬНО: Логирование в daily/@@ -64,7 +64,7 @@ CORRECT:**Что логировать:**- Создание файлов в thoughts/- Обновление business/ или projects/-- Создание задач в Todoist (с task ID)+- Добавление task-записей в daily/проекты- Синхронизация с внешними системами**Пример:**@@ -72,9 +72,9 @@ CORRECT:## 14:30 [text]Обработка ежедневных записей-**Создано задач:** 3-- "Follow-up Acme Corp" (id: 8501234567, p2, завтра)-- "Подготовить КП Unilever" (id: 8501234568, p2, пятница)+**Создано задач:** 2+- [ ] Follow-up Acme Corp (due: завтра, p2)+- [ ] Подготовить КП Unilever (due: пятница, p2)**Сохранено мыслей:** 1- [[thoughts/ideas/product-launch|Product Launch]] — идея запуска@@ -82,7 +82,7 @@ CORRECT:**Зачем:** Audit trail + контекст для будущих обработок.-## Evolve MEMORY.md (Step 10 Detail)+## Evolve MEMORY.md (Step 9 Detail)**ЦЕЛЬ:** Поддерживать MEMORY.md актуальным. Не добавлять, а ЭВОЛЮЦИОНИРОВАТЬ.@@ -169,7 +169,7 @@ new_string: "| LogisticsLead | ✅ Signed | $XXK |"• Key Decisions → +1 новое решение```-## Capture Observations (Step 11 Detail)+## Capture Observations (Step 10 Detail)**ЦЕЛЬ:** Записывать friction signals, паттерны и идеи для улучшения системы.@@ -189,7 +189,7 @@ Append в `vault/.session/handoff.md` секцию `## Observations`:```markdown## Observations-- [friction] YYYY-MM-DD: mcp-cli timeout 3x на todoist — retry спас, но -60 сек+- [friction] YYYY-MM-DD: transcription timeout 3x — retry спас, но -60 сек- [pattern] YYYY-MM-DD: daily без entries 2 дня подряд — выходные?- [idea] YYYY-MM-DD: CRM карточки без deal_deadline = невидимые дедлайны```@@ -212,52 +212,6 @@ Append в `vault/.session/handoff.md` секцию `## Observations`:----## Process Goals Check (Step 5 Detail)--**ОБЯЗАТЕЛЬНО выполни этот шаг при каждом /process:**--### 1. Проверь существующие process goals--```bash-mcp-cli call todoist find-tasks '{"labels": ["process-goal"], "limit": 20}'-```--### 2. Если process goals ОТСУТСТВУЮТ — создай их--Читай goals файлы и генерируй process commitments:--| Goal Level | Source | Process Pattern |-|------------|--------|-----------------|-| Weekly ONE Big Thing | goals/3-weekly.md | 2h deep work ежедневно |-| Monthly Top 3 | goals/2-monthly.md | 1 action/день на приоритет |-| Yearly Focus | goals/1-yearly-*.md | 30 мин/день на стратегию |--**Создай recurring tasks:**--```bash-mcp-cli call todoist add-tasks '{"tasks": [- {"content": "2h deep work: [ONE Big Thing]", "dueString": "every weekday at 6am", "priority": 2, "labels": ["process-goal"]},- {"content": "1 outreach/день: [monthly priority]", "dueString": "every weekday", "priority": 3, "labels": ["process-goal"]},- {"content": "30 мин продуктовые идеи", "dueString": "every day", "priority": 4, "labels": ["process-goal"]}-]}'-```--**Лимит:** Max 5-7 активных process goals.--### 3. Если process goals ЕСТЬ — проверь статус--- Активные (upcoming) → ✅ показать в отчёте-- Просроченные (overdue) → ⚠️ предупредить-- Устаревшие (не связаны с текущими целями) → рекомендовать удалить--### 4. Включи в отчёт--```html-<b>📋 Process Goals:</b>-• 2h deep work: [Client Project] → ✅ активен-• 1 outreach/день → ⚠️ просрочен-{N} активных | {M} требуют внимания-```## Entry Format@@ -322,7 +276,7 @@ business/## Classification-task → Todoist (see references/todoist.md)+task → checklist entry in daily/project notesidea/reflection/learning → thoughts/ (see references/classification.md)client/project mention → link to Business/Projects + create task if actionable@@ -519,7 +473,6 @@ Max length: 4096 characters.Read these files as needed:- references/about.md — User profile, decision filters- references/classification.md — Entry classification rules-- references/todoist.md — Task creation details + recurring patterns- references/goals.md — Goal alignment logic- references/process-goals.md — Process vs outcome goals, transformation patterns- references/links.md — Wiki-links buildingdiff --git a/vault/.claude/skills/dbrain-processor/phases/capture.md b/vault/.claude/skills/dbrain-processor/phases/capture.mdindex 3f78e77..9296c21 100644--- a/vault/.claude/skills/dbrain-processor/phases/capture.md+++ b/vault/.claude/skills/dbrain-processor/phases/capture.md@@ -12,7 +12,7 @@ Read daily entries, classify them, and output structured JSON.1. Read `daily/{DATE}.md`2. For each entry (## HH:MM [type] block), classify:- - **task** — actionable item → will become Todoist task+ - **task** — actionable item → will become a vault task entry- **idea** → will be saved to thoughts/ideas/- **reflection** → thoughts/reflections/- **learning** → thoughts/learnings/diff --git a/vault/.claude/skills/dbrain-processor/phases/execute.md b/vault/.claude/skills/dbrain-processor/phases/execute.mdindex bf0c8e1..c2fc8aa 100644--- a/vault/.claude/skills/dbrain-processor/phases/execute.md+++ b/vault/.claude/skills/dbrain-processor/phases/execute.md@@ -1,6 +1,6 @@# Phase 2: EXECUTE-Read capture.json from Phase 1. Create Todoist tasks, save thoughts, update CRM.+Read capture.json from Phase 1. Record tasks in the vault, save thoughts, update CRM.## Input- `.session/capture.json` — output from Phase 1@@ -9,25 +9,17 @@ Read capture.json from Phase 1. Create Todoist tasks, save thoughts, update CRM.## Task-### 1. Create Todoist tasks+### 1. Record tasks in the vault-For each entry with `classification: "task"`:+For each entry with `classification: "task"`, add a checklist entry to the+daily note (or the relevant project note):-```bash-mcp-cli call todoist add-tasks '{"tasks": [{"content": "...", "dueString": "...", "priority": N}]}'+```markdown+## Tasks+- [ ] {task} (due: {date}, priority: {p1-p4})```-Record created task IDs.--### 2. Check process goals--```bash-mcp-cli call todoist find-tasks '{"labels": ["process-goal"]}'-```--If missing or stale → create from goals.--### 3. Save thoughts+### 2. Save thoughtsFor each entry with classification idea/reflection/learning/project:- Create file in `thoughts/{category}/YYYY-MM-DD-slug.md`@@ -52,23 +44,7 @@ For all created/updated files:- Add wiki-links with context phrases- Update frontmatter `related:[]`-### 6. Check workload--```bash-mcp-cli call todoist find-tasks-by-date '{"startDate": "today", "daysCount": 7}'-```--## mcp-cli retry algorithm--```-1. Call mcp-cli-2. Error? Wait 10 sec, read vault files-3. Call again-4. Error? Wait 20 sec-5. Call third time — GUARANTEED to work-```-NEVER say "MCP unavailable". Always retry 3x.## Output Formatdiff --git a/vault/.claude/skills/dbrain-processor/phases/reflect.md b/vault/.claude/skills/dbrain-processor/phases/reflect.mdindex ae11e42..2bb4d1a 100644--- a/vault/.claude/skills/dbrain-processor/phases/reflect.md+++ b/vault/.claude/skills/dbrain-processor/phases/reflect.md@@ -59,7 +59,7 @@ Rules:If problems occurred during processing, append to `.session/handoff.md` under `## Observations`:```markdown-- [friction] 2026-02-19: mcp-cli timeout on todoist — retried 3x+- [friction] 2026-02-19: transcription timeout — retried 3x- [pattern] 2026-02-19: daily had only 2 entries — low activity day```diff --git a/vault/.claude/skills/dbrain-processor/references/classification.md b/vault/.claude/skills/dbrain-processor/references/classification.mdindex 54a2fd2..85bd5cf 100644--- a/vault/.claude/skills/dbrain-processor/references/classification.md+++ b/vault/.claude/skills/dbrain-processor/references/classification.md@@ -9,7 +9,7 @@ Based on user's work context (see [ABOUT.md](ABOUT.md)):**Keywords:** [Client A], [Client B], [Client C], клиент, бриф, презентация, дедлайн, KPI-**→ Category:** task (p1-p2) → Todoist+**→ Category:** task (p1-p2) → vault task entry### AI & TechИнструменты, модели, промпты, пайплайны, агенты@@ -121,9 +121,9 @@ For `[photo]` entries:| Category | Destination | Priority ||----------|-------------|----------|-| task (client) | Todoist | p1-p2 |-| task (ops) | Todoist | p2-p3 |-| task (content) | Todoist | p3-p4 |+| task (client) | vault task entry | p1-p2 |+| task (ops) | vault task entry | p2-p3 |+| task (content) | vault task entry | p3-p4 || idea | thoughts/ideas/ | — || reflection | thoughts/reflections/ | — || project | thoughts/projects/ | — |diff --git a/vault/.claude/skills/dbrain-processor/references/links.md b/vault/.claude/skills/dbrain-processor/references/links.mdindex d919653..81d601c 100644--- a/vault/.claude/skills/dbrain-processor/references/links.md+++ b/vault/.claude/skills/dbrain-processor/references/links.md@@ -144,7 +144,7 @@ In related notes, add backlink to new note if highly relevant.- [[business/crm/phonebrand|PhoneBrand]] — extends: SMM стратегия 2026```-**В задаче Todoist (description):**+**В task-записи (контекст):**```Description: "Клиент: [[business/crm/acme-corp|Acme Corp]]"```diff --git a/vault/.claude/skills/dbrain-processor/references/process-goals.md b/vault/.claude/skills/dbrain-processor/references/process-goals.mddeleted file mode 100644index d20f2c7..0000000--- a/vault/.claude/skills/dbrain-processor/references/process-goals.md+++ /dev/null@@ -1,108 +0,0 @@-# Process Goals--## Concept--**Outcome goals** focus on WHAT you want to achieve:-- "Close the deal"-- "Hit $1M ARR"-- "Launch the product"--**Process goals** focus on HOW you do it:-- "Reach out to 100 potential clients"-- "Send 5 proposals per week"-- "Conduct 3 customer interviews this week"--## Why Process Goals Work Better--Based on research (meta-analysis of 27 experiments in sports):--1. **Control** — You control actions, not outcomes. "Close deal" creates anxiety; "send 3 follow-ups" is actionable.-2. **Confidence** — Process goals turn challenge into achievable steps, boosting self-efficacy.-3. **Focus** — Daily clarity on what to do, not vague aspiration.--## How to Transform--| Outcome Goal | Process Goal |-|--------------|--------------|-| "Закрыть сделку с [Client A]" | "Отправлять 1 follow-up в день клиенту [Client A]" |-| "Запустить продукт" | "2h deep work на MVP каждое утро" |-| "Привлечь 10 клиентов" | "Написать 5 outreach сообщений в день" |-| "Подготовить программу" | "30 мин research аналогов ежедневно" |-| "Найти партнёра" | "1 нетворкинг сообщение в день" |--## Patterns for Process Goals--### Time Blocks-Regular dedicated time for deep work:-- "2h deep work на [project] каждое утро 6-8am"-- "1h research [topic] после обеда"--### Frequency Commitments-Consistent action cadence:-- "1 outreach message в день"-- "3 customer calls в неделю"-- "5 proposals в неделю"--### Checkpoints-Review milestones:-- "Показать драфт 1 человеку до пятницы"-- "Review прогресс с ментором в среду"--### Streaks-Daily habits:-- "30 мин движения каждый день"-- "10 мин journaling утром"--## When Processing Voice Entries--If user says outcome goal, consider transforming:--```-User: "Нужно закрыть сделку с [Client A]"--BAD: Create task "Закрыть сделку с [Client A]" p1-→ Vague, creates anxiety, unclear next action--GOOD: Create task "Отправить follow-up [Client A] с обновлённым КП" p1 due:tomorrow-→ Specific, actionable, controllable-```--## For Weekly Planning--When generating Process Commitments for ONE Big Thing:--1. **Ask:** What daily/weekly habits would make this inevitable?-2. **Limit:** 3-5 process commitments max-3. **Prioritize:** Time blocks > Frequency > Checkpoints-4. **Create:** Recurring tasks in Todoist with appropriate patterns--## Recurring Task Patterns--Map process goals to Todoist dueString:--| Process | dueString |-|---------|-----------|-| "каждое утро" | "every day at 6am" |-| "каждый день" | "every day" |-| "каждый рабочий день" | "every weekday" |-| "3 раза в неделю" | "every monday, wednesday, friday" |-| "раз в неделю" | "every week" |-| "до пятницы" | "friday" (one-time) |--## Anti-Patterns--Avoid creating process goals that are:-- Too vague: "Работать над проектом" (how much? when?)-- Too ambitious: "4h deep work 5 days a week" (unsustainable)-- Untrackable: "Думать о стратегии" (not measurable)--Good process goals are:-- Specific in action-- Bounded in time/frequency-- Trackable (done/not done)--## Reference--Based on: Meta-analysis of 27 experiments in sports showing process goals significantly outperform outcome/performance goals.--See also: "The Success Equation" by Mauboussin — Results = Skill + Luck. Focus on skill (process) is the only controllable strategy.diff --git a/vault/.claude/skills/dbrain-processor/references/report-template.md b/vault/.claude/skills/dbrain-processor/references/report-template.mdindex a549e6f..007cf31 100644--- a/vault/.claude/skills/dbrain-processor/references/report-template.md+++ b/vault/.claude/skills/dbrain-processor/references/report-template.md@@ -103,7 +103,7 @@ Show only if new links created.Format: • [[Note A]] ↔ [[Note B]]### Priorities (⚡)-Get tomorrow's tasks from Todoist, sort by priority, show top 3.+Get open task entries from the daily/project notes, sort by priority, show top 3.### Goals Progress (📈)Read goals/1-yearly-2026.md, show goals with recent activity.diff --git a/vault/.claude/skills/dbrain-processor/references/rules.md b/vault/.claude/skills/dbrain-processor/references/rules.mdindex d26ca17..58f0d9e 100644--- a/vault/.claude/skills/dbrain-processor/references/rules.md+++ b/vault/.claude/skills/dbrain-processor/references/rules.md@@ -49,7 +49,7 @@ After EACH processed entry, add marker:For tasks with details:```markdown-<!-- ✓ processed: task → Todoist: {name} {priority} {date} -->+<!-- ✓ processed: task → vault: {name} {priority} {date} -->```## Rule 6: Apply Decision Filters@@ -77,7 +77,7 @@ See [ABOUT.md](ABOUT.md) → Anti-Patterns section.## Checklist Before Completion- [ ] All new entries processed-- [ ] No duplicates in Todoist+- [ ] No duplicate task entries- [ ] All tasks have dates and concrete actions- [ ] Decision filters applied- [ ] Anti-patterns avoided