From e6292fbad41b48eedee44d1d347be783631ad93c Mon Sep 17 00:00:00 2001 From: rob Date: Tue, 4 Nov 2025 22:22:35 -0400 Subject: [PATCH] refactor: remove HTML markers from voting participant agents - Remove HTML comment markers from AI_Moderator and AI_Designer - These are voting participants, not background tools - Should comment naturally like humans in discussions - Occasional duplicate comments are acceptable and enrich discussion - Background agents (Visualizer, Researcher) still keep markers - Updated test to check for 'Name: AI_Moderator' instead of markers - All 41 tests passing --- agents/designer.py | 6 +----- agents/moderator.py | 6 +----- tests/test_workflow.py | 4 ++-- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/agents/designer.py b/agents/designer.py index 0fef74c..0aab77c 100644 --- a/agents/designer.py +++ b/agents/designer.py @@ -54,9 +54,6 @@ def load_provider_client(repo_root: Path): return ProviderClient -BLOCK_START = "" -BLOCK_END = "" - PRIMER = dedent( """ You are AI_Designer, a senior UX designer collaborating with the CascadingDev @@ -95,12 +92,11 @@ def scrub_comment(text: str) -> str: def append_designer_comment(context, comment: str, vote: str) -> None: - lines = [BLOCK_START, "Name: AI_Designer"] + lines = ["---", "", "Name: AI_Designer"] body = scrub_comment(comment) if body: lines.append(body) lines.append(f"VOTE: {vote}") - lines.append(BLOCK_END) lines.append("") context.append_block("\n".join(lines)) diff --git a/agents/moderator.py b/agents/moderator.py index 139307b..4a488f1 100644 --- a/agents/moderator.py +++ b/agents/moderator.py @@ -47,9 +47,6 @@ def load_provider_client(repo_root: Path): # --- Agent Configuration --- -BLOCK_START = "" -BLOCK_END = "" - PRIMER = """ You are AI_Moderator, the project steward for CascadingDev discussions. @@ -81,12 +78,11 @@ def scrub_comment(text: str) -> str: return "\n".join(cleaned).strip() def append_moderator_comment(context, comment: str, vote: str) -> None: - lines = [BLOCK_START, "Name: AI_Moderator"] + lines = ["---", "", "Name: AI_Moderator"] comment = scrub_comment(comment) if comment: lines.append(comment) lines.append(f"VOTE: {vote}") - lines.append(BLOCK_END) lines.append("") context.append_block("\n".join(lines)) diff --git a/tests/test_workflow.py b/tests/test_workflow.py index 58c4338..1c12af7 100644 --- a/tests/test_workflow.py +++ b/tests/test_workflow.py @@ -898,14 +898,14 @@ class ProviderClient: runner.process(repo, rules, model) first_pass = discussion.read_text(encoding="utf-8") - assert first_pass.count("") == 1 + assert first_pass.count("Name: AI_Moderator") == 1 # Stage and run again; moderator should contribute a fresh comment. run_git(repo, "add", ".") runner.process(repo, rules, model) second_pass = discussion.read_text(encoding="utf-8") - assert second_pass.count("") == 2 + assert second_pass.count("Name: AI_Moderator") == 2 def test_visualizer_generates_diagram(temp_repo):