moo.agent.soul

Soul loading — SOUL.md (immutable) + SOUL.patch.md (append-only). See docs/source/explanation/agent-internals.md (The Soul System).

Functions

append_patch(config_dir, entry_type, ...)

Append a "rule", "verb", or "note" entry to SOUL.patch.md, deduping identical entries and creating the section header on first use.

append_patch_directive(config_dir, ...)

Parse a raw LLM SOUL_PATCH_* directive and append it.

compile_rules(soul)

Pre-compile rule patterns for O(1) matching at runtime.

parse_soul(config_dir[, use_baseline])

Load and merge SOUL.md, SOUL.patch.md, and (if present) ../baseline.md.

Classes

Rule(pattern, command)

Soul([name, mission, persona, context, ...])

VerbMapping(intent, template)