moo.agent.tests.test_soul

Tests for moo/agent/soul.py.

These tests do not require DJANGO_SETTINGS_MODULE and do not import from moo.core.

Functions

test_append_patch_creates_file(tmp_path)

test_append_patch_directive_dedups_through_append_patch(...)

test_append_patch_directive_empty_half_rule(...)

test_append_patch_directive_empty_note(tmp_path)

test_append_patch_directive_malformed_no_arrow(...)

test_append_patch_directive_note(tmp_path)

test_append_patch_directive_parse_soul_roundtrip(...)

test_append_patch_directive_rule_ascii_arrow(...)

test_append_patch_directive_rule_unicode_arrow(...)

test_append_patch_directive_strips_whitespace(...)

test_append_patch_directive_verb(tmp_path)

test_append_patch_no_duplicate(tmp_path)

test_append_patch_note_creates_lessons_learned_section(...)

test_append_patch_note_no_duplicate(tmp_path)

test_append_patch_verb_section(tmp_path)

test_baseline_loaded_into_context(tmp_path)

test_baseline_rules_and_verbs_merged(tmp_path)

test_compile_rules_empty_list()

test_compile_rules_returns_patterns(tmp_path)

test_context_empty_when_no_section(tmp_path)

test_context_in_system_prompt(tmp_path)

test_context_inline_text(tmp_path)

test_context_link_resolves_to_file_content(...)

test_context_missing_link_target_uses_display_text(...)

test_context_multiple_links_all_resolved(...)

test_context_not_included_in_rules(tmp_path)

test_fenced_code_in_context_section_included(...)

test_fenced_code_in_unknown_h2_folded_into_context(...)

test_missing_name_returns_empty_string(tmp_path)

test_missing_rules_section_returns_empty(...)

test_parse_mission(tmp_path)

test_parse_name(tmp_path)

test_parse_persona(tmp_path)

test_parse_rules(tmp_path)

test_parse_soul_merges_patch_context(tmp_path)

test_parse_soul_merges_patch_verbs(tmp_path)

test_parse_verb_mappings(tmp_path)

test_patch_notes_do_not_become_rules(tmp_path)

test_patch_notes_folded_into_context(tmp_path)

test_patch_rules_appended_after_base(tmp_path)

test_response_format_not_in_context(tmp_path)

test_response_format_section_parsed_as_addendum(...)

test_tools_not_folded_into_context(tmp_path)

test_tools_section_deduplicates_with_patch(...)

test_tools_section_empty_by_default(tmp_path)

test_tools_section_parsed(tmp_path)

test_tools_section_strips_backtick_formatting(...)

test_unicode_arrow_separator(tmp_path)

test_unknown_h2_section_does_not_become_rule(...)

test_unknown_h2_section_folded_into_context(...)