This repository has been archived on 2026-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
ollie-core/pkg
Levi Neely 77dd5c6168 agent: refactor prompt architecture and session lifecycle
- Rename loopConfig→agentConfig, agentCore→agent, loopcfg→cfg, systemPrompt→preamble
  for clarity: the struct represents agent runtime config, the field is its config,
  and preamble accurately describes the compiled system+agent prompt sent as system role

- Separate preamble from agent context: preamble now contains only SYSTEM_PROMPT.md;
  agent prompt and agentSpawn hook output are injected into session history at
  context refresh points instead of being bolted onto the system role

- Replace fireAgentSpawn (mutated preamble once, guarded by agentSpawnFired flag)
  with spawnContext (assembles agent prompt + hook output, returns string for caller
  to inject); remove agentSpawnFired entirely — session==nil is the sufficient guard

- Three refresh points inject spawn context into session history:
  session start, post-clear (session=nil triggers same path), post-compaction
  (auto and manual)

- Move all preTurn tool primes (tools-file, tools-reasoning, tools-memory,
  tools-subagent, tools-elevate) to agentSpawn in all agent configs so they are
  injected at session refresh points alongside bd prime, not repeated every turn

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 19:38:18 +02:00
..
agent agent: refactor prompt architecture and session lifecycle 2026-04-25 19:38:18 +02:00
backend backend: mark codewhisperer as intentionally untested, remove test 2026-04-21 22:09:27 +02:00
config pkg/config, pkg/skills: accept io.Reader, remove filesystem access 2026-04-21 13:51:46 +02:00
env env: add OLLIE_ELEVATE_SOCKET to managed list and EnsureDefaults 2026-04-25 11:45:46 +02:00
log pkg/log: remove globals, inject Sink as dependency 2026-04-21 14:48:41 +02:00
paths expand ~ in cwd across agent core, hooks, and execute server 2026-04-24 20:10:42 +02:00
skills pkg/config, pkg/skills: accept io.Reader, remove filesystem access 2026-04-21 13:51:46 +02:00
store sort session index by ID for deterministic ordering 2026-04-24 21:44:42 +02:00
tools expand ~ in cwd across agent core, hooks, and execute server 2026-04-24 20:10:42 +02:00