From aff2bbc65fdfa06ce9af0484235a2f71437151b7 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Tue, 14 Apr 2026 15:52:19 +0200 Subject: [PATCH] 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 --- pkg/agent/core.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkg/agent/core.go b/pkg/agent/core.go index 01e9cf5..7cc8643 100644 --- a/pkg/agent/core.go +++ b/pkg/agent/core.go @@ -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() }