Skip to content

feat: prompt hierarchy and system/user skills - #25

Draft
CamiloValderruten wants to merge 3 commits into
mainfrom
feat/system-user-skills
Draft

feat: prompt hierarchy and system/user skills#25
CamiloValderruten wants to merge 3 commits into
mainfrom
feat/system-user-skills

Conversation

@CamiloValderruten

@CamiloValderruten CamiloValderruten commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Identity in the backpack: identity/core.md is injected into the system message on every rebuild (start / migration / compaction), not via cycle-start memory_read
  • Shared rulebook vs overlay: prompts/system.md is the shared operating contract; prompts/agent.md is the personal overlay agents should edit
  • Code-owned system.md: content always comes from the binary embed (GitHub PRs only). Memory tools refuse writes/edits/deletes/moves of prompts/system.md. On-disk copy is a refreshed mirror for operators
  • Non-destructive upgrade: migration 002 only seeds prompts/agent.md if missing — does not overwrite existing identity/core.md, cycle-start, continue, or other agent-owned prompts
  • System vs user skills: [skills] system_dir + dir; catalog shows ### System / ### User; compose mounts repo skills/ read-only; name collisions fail closed (system wins)
  • Memories stay searchable: journals/meta remain recent-memory / search — identity/ excluded from recent memories to avoid double-injection
  • Subagents: SystemPromptOverride survives compaction; primary identity/overlay are not injected into subagent system messages

Deploy note

[skills]
enabled = true
dir = "/agent/skills"
system_dir = "/agent/system-skills"

Recreate containers for the compose volume. On first start after upgrade, migration 002 runs once per agent (seeds prompts/agent.md only when absent).

Test plan

  • go test ./...
  • go vet ./...
  • Deploy; confirm system message contains ## Identity with core.md body (unchanged for existing agents)
  • Confirm memory_write / memory_edit of prompts/system.md is refused
  • Confirm ## Agent Overlay appears after seeding/editing prompts/agent.md
  • Confirm skill catalog System/User split with system_dir set
  • Confirm migration 002 records under prompts/migrations.md without rewriting identity

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.
@CamiloValderruten CamiloValderruten changed the title feat(skills): split system and user skill roots feat: prompt hierarchy and system/user skills Aug 10, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant