feat: prompt hierarchy and system/user skills - #25
Draft
CamiloValderruten wants to merge 3 commits into
Draft
Conversation
Add [skills] system_dir alongside dir so shipped skills (repo mount) and per-agent installs stay separate. Catalog renders System/User subsections; skill_install targets the user root only.
Put identity/core.md in every rebuilt system message, add prompts/agent.md as the personal overlay, treat system.md as the shared rulebook, and keep journals/meta as searchable memories only. Ships migration 002 for existing agents.
Always load the embedded system rulebook and refuse memory-tool mutations to it. Soften migration 002 to only seed prompts/agent.md. Keep identity/overlay intact for existing agents; never truncate identity; preserve subagent SystemPromptOverride across rebuilds; fail closed on system/user skill name collisions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
identity/core.mdis injected into the system message on every rebuild (start / migration / compaction), not via cycle-startmemory_readprompts/system.mdis the shared operating contract;prompts/agent.mdis the personal overlay agents should editprompts/system.md. On-disk copy is a refreshed mirror for operatorsprompts/agent.mdif missing — does not overwrite existingidentity/core.md, cycle-start, continue, or other agent-owned prompts[skills] system_dir+dir; catalog shows### System/### User; compose mounts reposkills/read-only; name collisions fail closed (system wins)identity/excluded from recent memories to avoid double-injectionSystemPromptOverridesurvives compaction; primary identity/overlay are not injected into subagent system messagesDeploy note
Recreate containers for the compose volume. On first start after upgrade, migration 002 runs once per agent (seeds
prompts/agent.mdonly when absent).Test plan
go test ./...go vet ./...## Identitywith core.md body (unchanged for existing agents)memory_write/memory_editofprompts/system.mdis refused## Agent Overlayappears after seeding/editingprompts/agent.mdsystem_dirsetprompts/migrations.mdwithout rewriting identity