# ADR 0003: Read Feishu Context On Demand

## Status

Proposed.

## Context

The system needs to give Claude enough context when a teacher invokes it from a project group. Storing full Feishu group history in the Hub adds retention and privacy concerns, while fixed time windows such as "recent 24 hours" are brittle.

Feishu provides message history APIs, so the Hub can keep stable anchors and read nearby context when needed.

## Decision

For the first architecture, the Hub stores minimal anchors and project memory instead of full Feishu message history:

- chat id and project binding;
- trigger message id;
- run id and status card id;
- reply/thread anchors;
- project memory, decisions and artifact references.

Claude gets seed context from the current trigger message, project memory and recent anchors. If more context is needed, Claude calls MCP tools to read current message, reply chain, thread history or recent group messages through Feishu APIs.

## Consequences

- The Hub avoids becoming a full chat history store.
- Search over old vague discussions is limited until we add summary or indexing.
- MCP tools must authorize by run/project context; Claude cannot pass arbitrary chat ids.
