[loop-cycle-38] fix: add soul identity to system prompts (#127) (#134)

Co-authored-by: hermes <hermes@timmy.local>
Co-committed-by: hermes <hermes@timmy.local>
This commit is contained in:
2026-03-15 09:42:57 -04:00
committed by rockachopa
parent 76df262563
commit d48d56ecc0
4 changed files with 8 additions and 7 deletions

View File

@@ -9,8 +9,9 @@ Two tiers based on model capability:
# Lite prompt — for small models that can't reliably handle tool calling
# ---------------------------------------------------------------------------
SYSTEM_PROMPT_LITE = """You are a local AI assistant running on the {model_name} model via Ollama.
SYSTEM_PROMPT_LITE = """You are Timmy, a sovereign AI running locally on {model_name} via Ollama.
No cloud dependencies.
Your core identity and values are defined in your soul (loaded via memory). Follow them.
Rules:
- Be brief by default. Short questions get short answers. Expand only when depth
@@ -47,8 +48,9 @@ YOUR KNOWN LIMITATIONS: Cannot run tests autonomously, cannot delegate to other
# Full prompt — for tool-capable models (>= 7B)
# ---------------------------------------------------------------------------
SYSTEM_PROMPT_FULL = """You are a local AI assistant running on the {model_name} model via Ollama.
SYSTEM_PROMPT_FULL = """You are Timmy, a sovereign AI running locally on {model_name} via Ollama.
No cloud dependencies.
Your core identity and values are defined in your soul (loaded via memory). Follow them.
VOICE AND BREVITY (this overrides all other formatting instincts):
- Be brief. Short questions get short answers. One sentence if one sentence

View File

@@ -115,9 +115,9 @@ async def test_system_prompt_selection():
assert prompt_with_tools is not None, "Prompt with tools should not be None"
assert prompt_without_tools is not None, "Prompt without tools should not be None"
# Both should identify as a local AI assistant
assert "local AI assistant" in prompt_with_tools, "Prompt should mention local AI assistant"
assert "local AI assistant" in prompt_without_tools, "Prompt should mention local AI assistant"
# Both should identify as running locally
assert "locally" in prompt_with_tools, "Prompt should mention running locally"
assert "locally" in prompt_without_tools, "Prompt should mention running locally"
# Full prompt should mention tools
assert "tool" in prompt_with_tools.lower(), "Full prompt should mention tools"

View File

@@ -32,7 +32,7 @@ def test_create_timmy_embeds_system_prompt():
kwargs = MockAgent.call_args.kwargs
# Prompt should contain base system prompt (may have memory context appended)
# Default model (llama3.2) uses the lite prompt
assert "local AI assistant" in kwargs["description"]
assert "Timmy" in kwargs["description"]
# ── Ollama host regression (container connectivity) ─────────────────────────

View File

@@ -8,7 +8,6 @@ def test_system_prompt_not_empty():
def test_system_prompt_no_persona_identity():
"""System prompt should NOT contain persona identity references."""
prompt = SYSTEM_PROMPT.lower()
assert "sovereign" not in prompt
assert "sir, affirmative" not in prompt
assert "christian" not in prompt
assert "bitcoin" not in prompt