agent: embed reasoning and memory skills into system prompt at render time

Read ollie/sk/reasoning.md and ollie/sk/memory.md from the 9P mount
and append them to the rendered system prompt. Removes dependency on
the model following a startup instruction.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Levi Neely 2026-04-14 15:52:19 +02:00
parent abe8ab76cc
commit aff2bbc65f
1 changed files with 13 additions and 0 deletions

View File

@ -46,6 +46,19 @@ func systemPrompt(cwd string) string {
"IsGitRepo": "unknown",
"SessionID": os.Getenv("OLLIE_SESSION_ID"),
})
mount := os.Getenv("OLLIE_9MOUNT")
if mount == "" {
home, _ := os.UserHomeDir()
mount = home + "/mnt/ollie"
}
for _, skill := range []string{"reasoning", "memory"} {
data, err := os.ReadFile(mount + "/sk/" + skill + ".md")
if err == nil {
fmt.Fprintf(&buf, "\n\n---\n\n%s", data)
}
}
return buf.String()
}