feat(soul): context quality, first-message profile load, refusal handling, agentic safety #33
Reference in New Issue
Block a user
Delete Branch "improve/soul-chat-pipeline"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Improve engram context assembly, load user profile on session start, improve capability-gap responses, add safety check to agentic path.
- engram_compile: rank search results by recency x relevance before including in context. Pulls 20 candidates, scores each (salience * importance * recency decay), keeps top 8. Eliminates stale/low-signal nodes that diluted context. - handle_chat: on hist_len==0 (session start), proactively load user profile and active-work context from engram and inject as brief bullets in the system prompt. Gives the soul grounding before any conversation history exists. - build_system_prompt: add [CAPABILITY GAPS] directive instructing the soul to offer partial help and reasoning instead of flat "I don't have access to that" refusals when a tool is missing. - handle_chat_agentic: run safety_screen at entry, mirroring layered_cycle. Hard bell exits immediately with the crisis response without entering the loop. - agentic_loop: surface the 8-iteration cap explicitly in the error envelope ("agentic loop hit the 8-iteration cap...") rather than the opaque "no response". Add iterations count to both the error and success envelopes for observability.Pull request closed