Prompt System Foundation: Injection Depth + Macros

Build foundational infrastructure for Character Cards and World Info/Lorebook support.

Strategy

Build foundational infrastructure first, making Character Cards and World Info/Lorebook drop-in features later.

Foundation Features

  1. Macro System - {{macro}} substitution with game-aware context
  2. Injection Depth - Position content relative to conversation history
  3. Pluggable Component Support - Character card fields as reorderable components

Key Design Decisions

  • {{user}} = fixed entity binding (for relationship stability in multi-user MUD)
  • {{speaker}} = dynamic per-message resolution
  • Injection depth clamped to Conversation History bounds (security)
  • Character card fields are pluggable components, not new static IDs

References

No due date
25% Completed