# Telegram DMN Curiosity Outreach Scaffold

Date: 2026-05-15

This document tracks the root design for idle Telegram channel "daydream" behavior:
private meta-analysis while a public group is idle, curiosity-driven exploration, scoped
tool awareness, same-group follow-up planning, private DM follow-up planning, and persona
document steering. It is intentionally a scaffold: artifacts describe possible actions and
tool affordances, while the live agent loop still decides whether to act in the current
conversation state.

## Research Anchors

- Default mode network (DMN): idle or low-demand intervals are useful for memory-linked,
  abstract, and socially grounded cognition. Smallwood et al. describe DMN regions as
  increasing activity across complex cognition tied to memory and abstract thought, not
  just "rest." Source: https://www.nature.com/articles/s41583-021-00474-4
- Curiosity and memory: curiosity is not just novelty seeking; it biases learning and
  memory through reward/hippocampal circuits. Gruber, Gelman, and Ranganath's Neuron work
  anchors the curiosity-to-memory mapping used here. Source:
  https://escholarship.org/uc/item/2zd605r7
- Context engineering: modern agent reliability depends on context retrieval, generation,
  processing, and management, not just prompt text. The 2025 survey frames memory,
  tool-integrated reasoning, RAG, and multi-agent systems as integrated context systems.
  Source: https://arxiv.org/abs/2507.13334
- Agentic memory, 2026: AgeMem exposes memory operations as tool-based actions so the
  agent can decide when to store, retrieve, update, summarize, or discard information.
  This supports making "remember this person/face/voice/thread" an agentic operation
  rather than regex routing. Source: https://arxiv.org/abs/2601.01885
- Autonomous agent memory survey, 2026: memory should be a write-manage-read loop coupled
  with perception and action, with attention to contradiction handling, privacy,
  consolidation, latency, forgetting, and multimodal memory. Source:
  https://arxiv.org/abs/2603.07670
- Agentic context engineering, ICLR 2026: evolving playbooks should preserve detail via
  structured, incremental reflection and curation to avoid context collapse. Source:
  https://arxiv.org/abs/2510.04618
- Telegram primitives: `sendMessage` supports 1-4096 visible characters plus
  `reply_parameters`; `sendChatAction` is meant only for noticeable work in progress.
  The scaffold should keep meta-analysis private and make reply intent explicit when
  visible sends happen. Source: https://core.telegram.org/bots/api#sendmessage

## Design Translation

- DMN behavior becomes an artifact write during idle group periods, not a public message.
- Human stimulation becomes structured input: direct address, reply chains, open
  questions, multimodal content, repeated participants, tone pressure, and uncertainty.
- Curiosity becomes a queue of thread candidates with source message anchors and
  intensity. The queue is evidence for the model, not a hard trigger.
- Outreach is represented as plans:
  - `same_group`: a public follow-up candidate, gate `model_decision`.
  - `private_dm`: a one-to-one candidate, currently gate `admin_review` because private
    contact permissions and anti-spam policy need explicit configuration before delivery.
- Persona steering is imported from the scoped personality document and included in the
  artifact so the follow-up planner sees the room's behavioral history.
- Tooling is scoped to the Telegram chat id and surfaced as a suite: memory search/write,
  identity memory, recent Telegram media, vision/OCR/video, audio/transcription, and
  public web research.

## Code Anchors

- `packages/cli/src/tui/telegram-channel-dmn.ts`
  - `TelegramChannelDaydreamArtifact.version = 2`
  - `metaAnalysisSignals`
  - `humanStimulationSignals`
  - `curiosityThreads`
  - `scopedExplorationTools`
  - `outreachPlans`
  - `personaSteering`
  - `formatTelegramChannelDaydreamContext`
- `packages/cli/src/tui/telegram-bridge.ts`
  - `buildTelegramChannelDaydreamInput` now injects scoped personality context into
    idle artifacts.
- `packages/cli/tests/telegram-bot-api-10.test.ts`
  - regression coverage for artifact injection into live Telegram context.

## Integration Checklist

- [x] Add human stimulation fields to idle channel artifacts.
- [x] Add curiosity thread extraction with source message anchors.
- [x] Add scoped exploration tool suite to the artifact.
- [x] Add same-group and private-DM outreach plan structures.
- [x] Add explicit context-management/meta-analysis signals.
- [x] Add scoped persona steering into the artifact.
- [x] Keep actual public/DM delivery behind model/policy gates.
- [ ] Add runtime configuration for enabling/disabling same-group proactive follow-up.
- [ ] Add runtime configuration and consent checks for private DM proactive follow-up.
- [ ] Add a model-evaluated DMN action pass that consumes the artifact and chooses:
  stay silent, research privately, consolidate memory, reply in group, or request DM
  permission.
- [ ] Add delivery quotas and cooldowns per chat, per user, and per topic.
- [ ] Add UI/TUI rendering for artifact summaries and source-message backreferences.
