Persist loaded skills through compaction

Store explicitly loaded skill IDs as chat-wide context data while keeping full skill bodies in normal tool-result history. Reattach any loaded skill body that is no longer visible after compaction by reimporting the current skill from its source, without revision hashes or protocol reinjection.

Update compaction and summary prompts to preserve loaded skill names only, refresh DOX contracts, and add focused coverage for context-data persistence, legacy agent-data migration, duplicate suppression, and post-compaction reattachment.
This commit is contained in:
Alessandro 2026-06-23 16:32:21 +02:00
parent bd584da2f4
commit 53ad7ba2dc
14 changed files with 559 additions and 81 deletions

View file

@ -18,6 +18,7 @@
- Preserve chat history integrity and persistence after compaction.
- Backup JSON and transcript artifacts must remain UTF-8 writable when chat content contains malformed Unicode such as lone surrogates.
- Keep generated summaries bounded by configured model and token limits.
- Preserve loaded skill names from `skill_instructions` metadata without copying full skill bodies into compacted summaries.
- Do not discard original context data unless the compaction flow explicitly owns that behavior.
## Work Guidance

View file

@ -6,6 +6,7 @@ Rules:
- Use terse bullet points, not prose
- Collapse related items into single lines
- Keep exact values: file paths, config values, code identifiers, credentials, URLs
- Preserve loaded skill names from skill_instructions metadata, but do not copy full skill bodies
- Omit anything that can be re-derived from context
- Group by topic, not chronology
- No meta-commentary about the summarization