Files
roboco/tests/unit/agents/test_prompter_history_layer.py
T
29335f4732 feat(prompter): make the intake actually use its task-history digest (#592)
The history-digest pipeline (PR #297) injected past-task data but nothing
told the intake agent what to do with it: prompter.md now carries an
explicit don't-re-propose section (cite duplicates by short id, reference
precedent in notes, let history inform depends_on sequencing), and
list_recent_for_project excludes cancelled tasks so dead work can't pose
as precedent.

Co-authored-by: Renn F <rennf93@users.noreply.github.com>
2026-07-19 17:25:41 +02:00

23 lines
916 B
Python

"""compose_prompt includes the Task history guidance section for the intake role."""
from __future__ import annotations
from roboco.agents.factories._base import compose_prompt
from roboco.models import AgentRole
def test_task_history_guidance_present_for_prompter() -> None:
prompt = compose_prompt(AgentRole.PROMPTER, None, "intake-1")
assert "## Task history" in prompt
def test_task_history_guidance_names_the_search_tool_and_duplicate_avoidance() -> None:
"""The static guidance names the ambient heading, the search tool, and the
three explicit uses the CEO asked for: avoid duplicates, cite precedent by
short id, and let history inform sequencing."""
prompt = compose_prompt(AgentRole.PROMPTER, None, "intake-1")
assert "search_past_tasks" in prompt
assert "Avoid duplicates" in prompt
assert "Cite precedent" in prompt
assert "Sequence with judgment" in prompt