services/satori-bot/docs/PROMPTS.md
The bot implements a "State-Aware Agentic Loop" rather than a simple Chat-QA structure. The prompt is constructed dynamically at every tick of the loop.
src/core/planner/prompts/*.velin.mdsrc/core/planner/prompts/index.tssystem-action-gen-v1): Hardcodes the JSON schema for available tools (send_message, read_unread_messages, sleep) and logic flow (e.g., "Must check unread messages after sending").personality-v1): Defines the character "AIRI" (tone, brevity, naturalness).messages array (ChatContext).src/core/planner/llm-client.ts (Runtime generated)scheduler).unreadEvents).graph TD
A[Static Markdown] -->|Velin Render| B(System Message)
C[Chat History] -->|Sliding Window| D(Context Body)
E[Runtime State] -->|Unread/Time/Results| F(State Injection)
B --> G[Final Prompt]
D --> G
F --> G
G -->|LLM API| H{Decision}
H -->|JSON| I[Action Dispatcher]
best-effort-json-parser.History actions, allowing the LLM to "see" the result of its previous attempt (e.g., if a read action returned empty, it knows to stop).