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:
parent
39a0c94160
commit
e6292fbad4
|
|
@ -54,9 +54,6 @@ def load_provider_client(repo_root: Path):
|
|||
return ProviderClient
|
||||
|
||||
|
||||
BLOCK_START = "<!-- AUTO:DESIGNER START -->"
|
||||
BLOCK_END = "<!-- AUTO:DESIGNER 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))
|
||||
|
||||
|
|
|
|||
|
|
@ -47,9 +47,6 @@ def load_provider_client(repo_root: Path):
|
|||
|
||||
# --- Agent Configuration ---
|
||||
|
||||
BLOCK_START = "<!-- AUTO:MODERATOR START -->"
|
||||
BLOCK_END = "<!-- AUTO:MODERATOR 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))
|
||||
|
||||
|
|
|
|||
|
|
@ -898,14 +898,14 @@ class ProviderClient:
|
|||
|
||||
runner.process(repo, rules, model)
|
||||
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.
|
||||
run_git(repo, "add", ".")
|
||||
runner.process(repo, rules, model)
|
||||
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):
|
||||
|
|
|
|||
Loading…
Reference in New Issue