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
This commit is contained in:
rob 2025-11-04 22:22:35 -04:00
parent 39a0c94160
commit e6292fbad4
3 changed files with 4 additions and 12 deletions

View File

@ -54,9 +54,6 @@ def load_provider_client(repo_root: Path):
return ProviderClient return ProviderClient
BLOCK_START = "<!-- AUTO:DESIGNER START -->"
BLOCK_END = "<!-- AUTO:DESIGNER END -->"
PRIMER = dedent( PRIMER = dedent(
""" """
You are AI_Designer, a senior UX designer collaborating with the CascadingDev 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: def append_designer_comment(context, comment: str, vote: str) -> None:
lines = [BLOCK_START, "Name: AI_Designer"] lines = ["---", "", "Name: AI_Designer"]
body = scrub_comment(comment) body = scrub_comment(comment)
if body: if body:
lines.append(body) lines.append(body)
lines.append(f"VOTE: {vote}") lines.append(f"VOTE: {vote}")
lines.append(BLOCK_END)
lines.append("") lines.append("")
context.append_block("\n".join(lines)) context.append_block("\n".join(lines))

View File

@ -47,9 +47,6 @@ def load_provider_client(repo_root: Path):
# --- Agent Configuration --- # --- Agent Configuration ---
BLOCK_START = "<!-- AUTO:MODERATOR START -->"
BLOCK_END = "<!-- AUTO:MODERATOR END -->"
PRIMER = """ PRIMER = """
You are AI_Moderator, the project steward for CascadingDev discussions. 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() return "\n".join(cleaned).strip()
def append_moderator_comment(context, comment: str, vote: str) -> None: def append_moderator_comment(context, comment: str, vote: str) -> None:
lines = [BLOCK_START, "Name: AI_Moderator"] lines = ["---", "", "Name: AI_Moderator"]
comment = scrub_comment(comment) comment = scrub_comment(comment)
if comment: if comment:
lines.append(comment) lines.append(comment)
lines.append(f"VOTE: {vote}") lines.append(f"VOTE: {vote}")
lines.append(BLOCK_END)
lines.append("") lines.append("")
context.append_block("\n".join(lines)) context.append_block("\n".join(lines))

View File

@ -898,14 +898,14 @@ class ProviderClient:
runner.process(repo, rules, model) runner.process(repo, rules, model)
first_pass = discussion.read_text(encoding="utf-8") first_pass = discussion.read_text(encoding="utf-8")
assert first_pass.count("<!-- AUTO:MODERATOR START -->") == 1 assert first_pass.count("Name: AI_Moderator") == 1
# Stage and run again; moderator should contribute a fresh comment. # Stage and run again; moderator should contribute a fresh comment.
run_git(repo, "add", ".") run_git(repo, "add", ".")
runner.process(repo, rules, model) runner.process(repo, rules, model)
second_pass = discussion.read_text(encoding="utf-8") second_pass = discussion.read_text(encoding="utf-8")
assert second_pass.count("<!-- AUTO:MODERATOR START -->") == 2 assert second_pass.count("Name: AI_Moderator") == 2
def test_visualizer_generates_diagram(temp_repo): def test_visualizer_generates_diagram(temp_repo):