mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
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>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
"""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
|
||||
Reference in New Issue
Block a user