zot/internal/agent
patriceckhart e425dbba59 feat(systemprompt): $ZOT_HOME/SYSTEM.md as a persistent override
Resolution order for the system prompt is now:

  1. --system-prompt <text>    (per-run override; highest)
  2. $ZOT_HOME/SYSTEM.md       (persistent user override; new)
  3. built-in defaultIdentity + defaultGuidelines

When SYSTEM.md exists and --system-prompt is empty, its contents
replace the entire identity + guidelines block (same semantics
as --system-prompt). The tool list + skill manifest + appended
sections + date/cwd footer are still added on top, so the file
should contain just the identity / behavior text.

readUserSystemPrompt swallows file errors on purpose: a missing
or unreadable SYSTEM.md falls back to the built-in default
rather than crashing the run. Cached on Resolved.systemCustom
so MergeExtensionTools' system-prompt rebuild path also picks
up the override.

End-to-end verified live:
  with SYSTEM.md (pirate persona): "Arrr, I be Zot, a scallywag..."
  without:                         "I'm zot, a lightweight terminal..."

Documented in README's $ZOT_HOME tree + the --system-prompt
flag note.
2026-04-19 15:47:57 +02:00
..
extensions fix(extensions): close ext.commands / ext.tools / lastFrameTime races 2026-04-19 15:27:09 +02:00
modes feat(extensions): --no-ext to skip discovery for one run 2026-04-19 15:42:34 +02:00
tools initial commit 2026-04-17 20:36:38 +02:00
args.go feat(extensions): --no-ext to skip discovery for one run 2026-04-19 15:42:34 +02:00
botcmd.go fix ci on windows: split detach helper into posix/windows variants 2026-04-18 10:58:10 +02:00
botcmd_unix.go fix ci on windows: split detach helper into posix/windows variants 2026-04-18 10:58:10 +02:00
botcmd_windows.go fix ci on windows: split detach helper into posix/windows variants 2026-04-18 10:58:10 +02:00
build.go feat(systemprompt): $ZOT_HOME/SYSTEM.md as a persistent override 2026-04-19 15:47:57 +02:00
cli.go feat(extensions): --no-ext to skip discovery for one run 2026-04-19 15:42:34 +02:00
config.go add telegram bot bridge 2026-04-18 09:15:46 +02:00
extcmd.go feat: extension system (subprocess + json-rpc, any language) 2026-04-19 14:09:43 +02:00
modelsync.go initial commit 2026-04-17 20:36:38 +02:00
rpc.go feat(extensions): --no-ext to skip discovery for one run 2026-04-19 15:42:34 +02:00
systemprompt.go initial commit 2026-04-17 20:36:38 +02:00
update.go tui: show 'update available' banner at top of chat 2026-04-18 11:49:22 +02:00