summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/archive/system-prompt.md (renamed from docs/system-prompt.md)30
1 files changed, 20 insertions, 10 deletions
diff --git a/docs/system-prompt.md b/docs/archive/system-prompt.md
index df296f6..e44f953 100644
--- a/docs/system-prompt.md
+++ b/docs/archive/system-prompt.md
@@ -1,6 +1,8 @@
# System Prompt
-Status: design / not yet implemented.
+Status: implemented (libpanto data model + serializers + session store +
+CLI sourcing & resume reconciliation). See `src/system_prompt.zig` and the
+seeding/reconciliation wiring in `src/main.zig`.
This document specifies first-class support for the system prompt across
libpanto (the conversation + session-store data model and provider
@@ -275,15 +277,23 @@ wanted right now — consistent ordering is the contract.
## Implementation order
-1. **libpanto data model:** `SystemMode`, `SystemBlock`, `ContentBlock`
+1. ✅ **libpanto data model:** `SystemMode`, `SystemBlock`, `ContentBlock`
arm + `deinit`; `addSystemMessage` (mode-aware) + `replaceSystemMessage`;
- shared append/replace derivation helper.
-2. **Serializers:** OpenAI leading-system hoist (separate messages);
+ shared `effectiveSystemBlocks` derivation helper.
+2. ✅ **Serializers:** OpenAI leading-system hoist (separate messages);
Anthropic strip-trailing-newlines + `\n\n---\n\n` join. Both via the
- shared derivation. Add/extend tests.
-3. **Session store:** optional `mode` field on system entries (read +
+ shared derivation. Tests added.
+3. ✅ **Session store:** optional `mode` field on system entries (read +
write, default `append`); rebuild reconstructs `.System` blocks. Tests.
-4. **CLI sourcing:** discover `SYSTEM.md` / `APPEND_SYSTEM.md` across the
- three layers; resolve + order per §2.2–§2.3; seed fresh sessions.
-5. **CLI resume reconciliation:** positional first-`K` comparison; append
- `replace + N×append` on any difference. Tests.
+4. ✅ **CLI sourcing** (`src/system_prompt.zig`): discover `SYSTEM.md` /
+ `APPEND_SYSTEM.md` across the three layers (base = `$PANTO_HOME/agent`,
+ user = `${XDG_CONFIG_HOME:-$HOME/.config}/panto`, project = `./.panto`);
+ resolve + order per §2.2–§2.3; seed fresh sessions.
+5. ✅ **CLI resume reconciliation:** positional comparison against the
+ current effective config window (anchored to the latest `replace`);
+ append `replace + N×append` on any difference. Tests.
+
+> Note: the base layer directory is `$PANTO_HOME/agent` (i.e.
+> `$XDG_DATA_HOME/panto/agent`), matching the convention used for extension
+> and tool discovery, rather than the bare `$XDG_DATA_HOME/panto/` sketched
+> in §2.1.