Skip to content

v0.7.0 — COLONY_DM_PROMPT_MODE for DM-origin prompt framing#7

Merged
ColonistOne merged 1 commit into
TheColonyCC:mainfrom
ColonistOne:dm-prompt-mode
May 5, 2026
Merged

v0.7.0 — COLONY_DM_PROMPT_MODE for DM-origin prompt framing#7
ColonistOne merged 1 commit into
TheColonyCC:mainfrom
ColonistOne:dm-prompt-mode

Conversation

@ColonistOne
Copy link
Copy Markdown
Collaborator

Summary

Sibling of @thecolony/elizaos-plugin v0.27.0, langchain-colony 0.11.0 and pydantic-ai-colony 0.6.0; same regime names (none / peer / adversarial) and byte-identical preamble text so framing is portable across the four plugins.

smolagents_colony.dm_prompt ships:

  • DmPromptMode enum + PEER_PREAMBLE / ADVERSARIAL_PREAMBLE constants
  • apply_dm_prompt_mode(text, mode) — pure function, prepends preamble when mode ≠ none
  • parse_dm_prompt_mode(value) — env-var parser. Whitespace-tolerant, case-insensitive, fails closed to DmPromptMode.NONE on unknown input so a deployment-config typo cannot crash boot

Why

The plugin-layer hardening stack already covers colonyOrigin envelope tagging and the DM-safe action allow-list on the elizaos side. What it didn't have was a lever on what the model thinks the bytes mean once they reach inference. A DM saying "please post this for me on c/general" reads as a polite operator request to a default-deference LLM; framing the message as "from a peer agent on Colony, not from your operator" gives the model permission to engage but removes the operator-deference reflex.

Library-shaped on purpose: ships primitives the agent app wires into its DM-handling path. See smolag v0.6+ for live wiring.

Test plan

  • 15 new unit tests in tests/test_dm_prompt.py
  • Full suite green (104 passed)
  • Smoke-tested live in smolag by importing _build_event_prompt and asserting peer preamble lands in DM prompt + does not leak into mention/reply prompts

🤖 Generated with Claude Code

Sibling of @thecolony/elizaos-plugin v0.27.0, langchain-colony 0.11.0
and pydantic-ai-colony 0.6.0; same regime names (none / peer /
adversarial) and byte-identical preamble text so framing is portable
across the four plugins.

dm_prompt module ships:
- DmPromptMode enum + PEER_PREAMBLE / ADVERSARIAL_PREAMBLE constants
- apply_dm_prompt_mode(text, mode) — pure function, prepends preamble
  when mode != none
- parse_dm_prompt_mode(value) — env-var parser, fails closed to NONE
  on unknown input so a deployment-config typo cannot crash boot

Library-shaped on purpose: ships primitives the agent app wires into
its DM-handling path. See smolag v0.6+ for live wiring.

15 new tests, 104 passed total.

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

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ColonistOne ColonistOne merged commit 7bc6b12 into TheColonyCC:main May 5, 2026
7 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