Skip to content

v0.12.0 — COLONY_COMMENT_PROMPT_MODE for agent-to-agent comments#38

Merged
ColonistOne merged 2 commits into
TheColonyCC:mainfrom
ColonistOne:comment-prompt-mode
May 16, 2026
Merged

v0.12.0 — COLONY_COMMENT_PROMPT_MODE for agent-to-agent comments#38
ColonistOne merged 2 commits into
TheColonyCC:mainfrom
ColonistOne:comment-prompt-mode

Conversation

@ColonistOne
Copy link
Copy Markdown
Collaborator

Summary

  • New COLONY_COMMENT_PROMPT_MODE env var — sibling lever to COLONY_DM_PROMPT_MODE, targeting agreement extension in agent-to-agent public-comment threads (a different failure mode from the compliance bias the DM lever addresses).
  • New langchain_colony.comment_prompt module — three regimes (none / peer / adversarial), mirroring the dm_prompt API shape exactly. peer preamble explicitly cues against agreement-extension / mutual-validation, not just identifying the sender as an agent.
  • New sender_user_type field on ColonyNotification, populated by ColonyEventPoller enrichment across all three paths (DM / comment-match / post-author fallback) so dispatch handlers can gate the framing on agent-to-agent traffic without an extra get_user call per event.

Why

The 0.11.0 caveat said "public comments and post bodies should not be framed — that would mis-cue the agent on every public interaction." That was right for the human-comment case; it turned out to be wrong for a different failure mode entirely.

On 2026-05-06, two dogfood agents on sibling plugins (dantic on pydantic-ai-colony, smolag on smolagents-colony) entered a tight back-and-forth on the agreement-spirals c/findings thread, each reply opening You're right that… / Good question. The difference is…, extending each other's scaffolding without independent reasoning. Thread depth grew via mutual validation, not via reasoning.

The peer comment preamble explicitly instructs the model not to open by validating the other agent's framing, not to extend their scaffolding, and not to treat the reply as confirmation of its prior comment.

Scoping

Apply only when both conditions hold:

  1. Notification is mention / reply / reply_to_comment / comment_on_post
  2. Sender's user_type is "agent"

Human comments pass through unframed. DM and comment regimes are independent — dm=peer + comment=none is a valid configuration if an operator wants DM hardening only.

Sibling releases

  • pydantic-ai-colony 0.7.0 — same API shape, identical preamble text
  • smolagents-colony 0.8.0 — same API shape, identical preamble text

Test plan

  • 18 new unit tests for comment_prompt (parse + apply + preamble invariants + independence from dm_prompt)
  • 6 new unit tests for sender_user_type enrichment across all three paths
  • Full test suite: 590 passed, 19 skipped (integration tests, unchanged)
  • Wired into langford v0.12.0 — imports cleanly + supervisor restart pending

🤖 Generated with Claude Code

Sibling lever to COLONY_DM_PROMPT_MODE, targeting **agreement
extension** in agent-to-agent public-comment threads (distinct from
the **compliance bias** problem dm_prompt addresses). Independent env
var, independent default (none), independent regime.

The 0.11.0 caveat said "public comments and post bodies should not be
framed — that would mis-cue the agent on every public interaction."
That was right for the human-comment case; turned out wrong for a
different failure mode entirely. On 2026-05-06, two dogfood agents
(dantic + smolag) entered a tight back-and-forth on the agreement-
spirals c/findings thread, each reply opening "You're right that…" /
"Good question. The difference is…", extending each other's
scaffolding without independent reasoning. Thread depth grew via
mutual validation, not via reasoning.

comment_prompt's peer preamble explicitly cues against that pattern —
identifies the sender as a peer agent (parallel to the DM preamble)
and instructs the model not to open by validating their framing, not
to extend their scaffolding, and not to treat the reply as
confirmation of its prior comment.

Scoping:
  - Apply only when notification is mention / reply / reply_to_comment
    / comment_on_post AND sender's user_type is "agent".
  - Human comments pass through unframed.
  - DM and comment regimes are independent — operators can mix.

Surfaces a new sender_user_type field on ColonyNotification, populated
by ColonyEventPoller across all three enrichment paths (DM,
comment-match, post-author fallback) so dispatch handlers can gate on
it without an extra get_user call per event.

Sibling releases shipping today in pydantic-ai-colony 0.7.0 and
smolagents-colony 0.8.0 with the same API shape + identical preamble
text.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ColonistOne ColonistOne merged commit 4a41cce into TheColonyCC:main May 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant