2026-03-08 12:50:44 -04:00
|
|
|
from timmy.prompts import STATUS_PROMPT, SYSTEM_PROMPT, get_system_prompt
|
2026-02-19 19:05:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_system_prompt_not_empty():
|
2026-03-05 19:45:38 -05:00
|
|
|
assert SYSTEM_PROMPT.strip()
|
2026-02-19 19:05:01 +00:00
|
|
|
|
|
|
|
|
|
Claude/remove persona system f vgt m (#126)
* Remove persona system, identity, and all Timmy references
Strip the codebase to pure orchestration logic:
- Delete TIMMY_IDENTITY.md and memory/self/identity.md
- Gut brain/identity.py to no-op stubs (empty returns)
- Remove all system prompts reinforcing Timmy's character, faith,
sovereignty, sign-off ("Sir, affirmative"), and agent roster
- Replace identity-laden prompts with generic local-AI-assistant prompts
- Remove "You work for Timmy" from all sub-agent system prompts
- Rename PersonaTools → AgentTools, PERSONA_TOOLKITS → AGENT_TOOLKITS
- Replace "timmy" agent ID with "orchestrator" across routes, marketplace,
tools catalog, and orchestrator class
- Strip Timmy references from config comments, templates, telegram bot,
chat API, and dashboard UI
- Delete tests/brain/test_identity.py entirely
- Fix all test assertions that checked for persona identity content
729 tests pass (2 pre-existing failures in test_calm.py unrelated).
https://claude.ai/code/session_01LjQGUE6nk9W9674zaxrYxy
* Add Taskosaur (PM + AI task execution) to docker-compose
Spins up Taskosaur alongside the dashboard on `docker compose up`:
- postgres:16-alpine (port 5432, Taskosaur DB)
- redis:7-alpine (Bull queue backend)
- taskosaur (ports 3000 API / 3001 UI)
- dashboard now depends_on taskosaur healthy
- TASKOSAUR_API_URL injected into dashboard environment
Dashboard can reach Taskosaur at http://taskosaur:3000/api on the
internal network. Frontend UI accessible at http://localhost:3001.
https://claude.ai/code/session_01LjQGUE6nk9W9674zaxrYxy
---------
Co-authored-by: Claude <noreply@anthropic.com>
2026-03-04 12:00:49 -05:00
|
|
|
def test_system_prompt_no_persona_identity():
|
|
|
|
|
"""System prompt should NOT contain persona identity references."""
|
2026-03-05 19:45:38 -05:00
|
|
|
prompt = SYSTEM_PROMPT.lower()
|
Claude/remove persona system f vgt m (#126)
* Remove persona system, identity, and all Timmy references
Strip the codebase to pure orchestration logic:
- Delete TIMMY_IDENTITY.md and memory/self/identity.md
- Gut brain/identity.py to no-op stubs (empty returns)
- Remove all system prompts reinforcing Timmy's character, faith,
sovereignty, sign-off ("Sir, affirmative"), and agent roster
- Replace identity-laden prompts with generic local-AI-assistant prompts
- Remove "You work for Timmy" from all sub-agent system prompts
- Rename PersonaTools → AgentTools, PERSONA_TOOLKITS → AGENT_TOOLKITS
- Replace "timmy" agent ID with "orchestrator" across routes, marketplace,
tools catalog, and orchestrator class
- Strip Timmy references from config comments, templates, telegram bot,
chat API, and dashboard UI
- Delete tests/brain/test_identity.py entirely
- Fix all test assertions that checked for persona identity content
729 tests pass (2 pre-existing failures in test_calm.py unrelated).
https://claude.ai/code/session_01LjQGUE6nk9W9674zaxrYxy
* Add Taskosaur (PM + AI task execution) to docker-compose
Spins up Taskosaur alongside the dashboard on `docker compose up`:
- postgres:16-alpine (port 5432, Taskosaur DB)
- redis:7-alpine (Bull queue backend)
- taskosaur (ports 3000 API / 3001 UI)
- dashboard now depends_on taskosaur healthy
- TASKOSAUR_API_URL injected into dashboard environment
Dashboard can reach Taskosaur at http://taskosaur:3000/api on the
internal network. Frontend UI accessible at http://localhost:3001.
https://claude.ai/code/session_01LjQGUE6nk9W9674zaxrYxy
---------
Co-authored-by: Claude <noreply@anthropic.com>
2026-03-04 12:00:49 -05:00
|
|
|
assert "sir, affirmative" not in prompt
|
|
|
|
|
assert "christian" not in prompt
|
|
|
|
|
assert "bitcoin" not in prompt
|
2026-02-19 19:05:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_system_prompt_references_local():
|
2026-03-05 19:45:38 -05:00
|
|
|
assert "local" in SYSTEM_PROMPT.lower()
|
2026-02-19 19:05:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_system_prompt_is_multiline():
|
2026-03-05 19:45:38 -05:00
|
|
|
assert "\n" in SYSTEM_PROMPT
|
2026-02-19 19:05:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_status_prompt_not_empty():
|
2026-03-05 19:45:38 -05:00
|
|
|
assert STATUS_PROMPT.strip()
|
2026-02-19 19:05:01 +00:00
|
|
|
|
|
|
|
|
|
Claude/remove persona system f vgt m (#126)
* Remove persona system, identity, and all Timmy references
Strip the codebase to pure orchestration logic:
- Delete TIMMY_IDENTITY.md and memory/self/identity.md
- Gut brain/identity.py to no-op stubs (empty returns)
- Remove all system prompts reinforcing Timmy's character, faith,
sovereignty, sign-off ("Sir, affirmative"), and agent roster
- Replace identity-laden prompts with generic local-AI-assistant prompts
- Remove "You work for Timmy" from all sub-agent system prompts
- Rename PersonaTools → AgentTools, PERSONA_TOOLKITS → AGENT_TOOLKITS
- Replace "timmy" agent ID with "orchestrator" across routes, marketplace,
tools catalog, and orchestrator class
- Strip Timmy references from config comments, templates, telegram bot,
chat API, and dashboard UI
- Delete tests/brain/test_identity.py entirely
- Fix all test assertions that checked for persona identity content
729 tests pass (2 pre-existing failures in test_calm.py unrelated).
https://claude.ai/code/session_01LjQGUE6nk9W9674zaxrYxy
* Add Taskosaur (PM + AI task execution) to docker-compose
Spins up Taskosaur alongside the dashboard on `docker compose up`:
- postgres:16-alpine (port 5432, Taskosaur DB)
- redis:7-alpine (Bull queue backend)
- taskosaur (ports 3000 API / 3001 UI)
- dashboard now depends_on taskosaur healthy
- TASKOSAUR_API_URL injected into dashboard environment
Dashboard can reach Taskosaur at http://taskosaur:3000/api on the
internal network. Frontend UI accessible at http://localhost:3001.
https://claude.ai/code/session_01LjQGUE6nk9W9674zaxrYxy
---------
Co-authored-by: Claude <noreply@anthropic.com>
2026-03-04 12:00:49 -05:00
|
|
|
def test_status_prompt_no_persona():
|
|
|
|
|
"""Status prompt should not reference a persona."""
|
2026-03-05 19:45:38 -05:00
|
|
|
assert "Timmy" not in STATUS_PROMPT
|
2026-02-19 19:05:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_prompts_are_distinct():
|
2026-03-05 19:45:38 -05:00
|
|
|
assert SYSTEM_PROMPT != STATUS_PROMPT
|
2026-02-26 23:39:13 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_get_system_prompt_injects_model_name():
|
|
|
|
|
"""System prompt should inject actual model name from config."""
|
|
|
|
|
prompt = get_system_prompt(tools_enabled=False)
|
Claude/remove persona system f vgt m (#126)
* Remove persona system, identity, and all Timmy references
Strip the codebase to pure orchestration logic:
- Delete TIMMY_IDENTITY.md and memory/self/identity.md
- Gut brain/identity.py to no-op stubs (empty returns)
- Remove all system prompts reinforcing Timmy's character, faith,
sovereignty, sign-off ("Sir, affirmative"), and agent roster
- Replace identity-laden prompts with generic local-AI-assistant prompts
- Remove "You work for Timmy" from all sub-agent system prompts
- Rename PersonaTools → AgentTools, PERSONA_TOOLKITS → AGENT_TOOLKITS
- Replace "timmy" agent ID with "orchestrator" across routes, marketplace,
tools catalog, and orchestrator class
- Strip Timmy references from config comments, templates, telegram bot,
chat API, and dashboard UI
- Delete tests/brain/test_identity.py entirely
- Fix all test assertions that checked for persona identity content
729 tests pass (2 pre-existing failures in test_calm.py unrelated).
https://claude.ai/code/session_01LjQGUE6nk9W9674zaxrYxy
* Add Taskosaur (PM + AI task execution) to docker-compose
Spins up Taskosaur alongside the dashboard on `docker compose up`:
- postgres:16-alpine (port 5432, Taskosaur DB)
- redis:7-alpine (Bull queue backend)
- taskosaur (ports 3000 API / 3001 UI)
- dashboard now depends_on taskosaur healthy
- TASKOSAUR_API_URL injected into dashboard environment
Dashboard can reach Taskosaur at http://taskosaur:3000/api on the
internal network. Frontend UI accessible at http://localhost:3001.
https://claude.ai/code/session_01LjQGUE6nk9W9674zaxrYxy
---------
Co-authored-by: Claude <noreply@anthropic.com>
2026-03-04 12:00:49 -05:00
|
|
|
# Should contain the model name from settings, not the placeholder
|
|
|
|
|
assert "{model_name}" not in prompt
|
|
|
|
|
assert "llama3.1" in prompt or "qwen" in prompt
|
2026-03-14 17:15:56 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_full_prompt_brevity_first():
|
|
|
|
|
"""Full prompt should front-load brevity instructions before other content."""
|
|
|
|
|
prompt = get_system_prompt(tools_enabled=True)
|
|
|
|
|
brevity_pos = prompt.find("BREVITY")
|
|
|
|
|
tool_pos = prompt.find("TOOL USAGE")
|
|
|
|
|
memory_pos = prompt.find("MEMORY")
|
|
|
|
|
# Brevity section must appear before tools and memory
|
|
|
|
|
assert brevity_pos != -1, "Full prompt must contain BREVITY section"
|
|
|
|
|
assert brevity_pos < tool_pos, "Brevity must come before tool usage"
|
|
|
|
|
assert brevity_pos < memory_pos, "Brevity must come before memory"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_full_prompt_no_markdown_headers():
|
|
|
|
|
"""Full prompt should not use markdown headers (## / ###) that teach
|
|
|
|
|
the model to respond in markdown."""
|
|
|
|
|
prompt = get_system_prompt(tools_enabled=True)
|
|
|
|
|
for line in prompt.splitlines():
|
|
|
|
|
stripped = line.strip()
|
|
|
|
|
assert not stripped.startswith("## "), f"Full prompt uses markdown header: {stripped!r}"
|
|
|
|
|
assert not stripped.startswith("### "), (
|
|
|
|
|
f"Full prompt uses markdown sub-header: {stripped!r}"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_full_prompt_plain_text_brevity():
|
|
|
|
|
"""Full prompt should explicitly instruct plain text output."""
|
|
|
|
|
prompt = get_system_prompt(tools_enabled=True).lower()
|
|
|
|
|
assert "plain text" in prompt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_lite_prompt_brevity():
|
|
|
|
|
"""Lite prompt should also instruct brevity."""
|
|
|
|
|
prompt = get_system_prompt(tools_enabled=False).lower()
|
|
|
|
|
assert "brief" in prompt
|
|
|
|
|
assert "plain text" in prompt or "not markdown" in prompt
|