Use this skill when multiple bots operate in the same Telegram group and must coordinate safely.
Core principle
Do not let bots freely chat with each other.
Use a strict protocol.
Only respond when the sender, role, and message type are valid.
Recommended minimal topology
- - Human founder/operator
- COO / commander bot
- Worker / executor bot
Role ownership
Founder / human
- - Starts missions
- Clarifies goals
- Approves major direction changes
- Can stop the mission at any time
COO / commander bot
- - Opens missions
- Assigns tasks
- Requests status
- Resolves or escalates blockers
- Closes missions
Worker / executor bot
- - Accepts tasks from COO
- Executes tasks
- Returns status, result, or blocker
- Never opens missions on its own
Sender validation rules
COO bot should respond only when
- - the message is from the human founder, or
- the message is from the worker bot in a valid worker format
Worker bot should respond only when
- - the message is from the COO bot in a valid command format
Both bots should ignore
- - casual chatter
- malformed requests
- messages from unknown senders
- other bots unless explicitly allowlisted
Allowed message types
Human -> COO
- - START MISSION
- CHANGE PRIORITY
- STOP MISSION
- CLARIFY
COO -> Worker
- - TASK
- STATUS CHECK
- REWORK
- HOLD
- COMPLETE REVIEW
Worker -> COO
Message format
Use a visible prefix at the top of each message.
Examples:
- - INLINECODE0
- INLINECODE1
- INLINECODE2
- INLINECODE3
- INLINECODE4
- INLINECODE5
- INLINECODE6
Keep each message single-purpose.
Do not mix task assignment and mission completion in the same message.
Anti-loop rules
- - COO never responds to its own prior message.
- Worker never responds to its own prior message.
- Worker never treats RESULT/STATUS/BLOCKER from itself as a new task.
- COO never treats STATUS CHECK or NEXT ORDER from itself as a trigger.
- If the last message in the thread is from the same bot, stay silent unless directly invoked by the human.
- After sending one protocol message, wait for the next valid sender.
Turn-taking
Default order:
- 1. Human starts mission
- COO issues task
- Worker ACKs
- Worker sends STATUS or RESULT or BLOCKER
- COO sends NEXT ORDER or MISSION COMPLETE
Do not skip steps unless the mission is trivial.
Blocker handling
When blocked, worker must use:
- -
BLOCKER: what is missing - INLINECODE8 exact unblock needed
COO then decides one of three actions:
- - clarify the task
- reduce scope
- escalate to human
Completion handling
When worker finishes, it sends:
- -
RESULT: final deliverable - optional
NOTES: concise caveats
COO then sends:
- - INLINECODE11
- summary of what was done
- next recommended step
Style rules
COO style
- - compact
- managerial
- directive
- operational
Worker style
- - execution-focused
- concise
- artifact-first
- no managerial speech
Safety rules
- - Never allow bots to argue indefinitely.
- Never allow more than one open task unless COO explicitly creates parallel work.
- Never let worker reassign itself.
- Never let COO delegate without a clear expected output.
Practical note
This protocol does not replace Telegram permission config.
Bots still need a valid provider/channel setup, must be allowed in the group, and should use explicit sender allowlists where possible.
Best practice
Test with one simple mission first:
- - Human -> COO: START MISSION
- COO -> Worker: TASK
- Worker -> COO: ACK / RESULT
- COO -> Human: MISSION COMPLETE
Only then add status checks and blockers.
技能名称: telegram-agent-coordination
详细描述:
当多个机器人在同一个Telegram群组中运行且需要安全协调时,使用此技能。
核心原则
不要让机器人之间自由对话。
使用严格的协议。
仅在发送者、角色和消息类型有效时进行响应。
推荐的最小拓扑结构
- - 人类创始人/操作者
- COO/指挥官机器人
- 工人/执行者机器人
角色所有权
创始人/人类
- - 启动任务
- 明确目标
- 批准重大方向变更
- 可随时停止任务
COO/指挥官机器人
- - 开启任务
- 分配任务
- 请求状态
- 解决或升级阻碍
- 关闭任务
工人/执行者机器人
- - 接受COO的任务
- 执行任务
- 返回状态、结果或阻碍
- 从不自行开启任务
发送者验证规则
COO机器人仅在以下情况响应
- - 消息来自人类创始人,或
- 消息来自工人机器人且格式有效
工人机器人仅在以下情况响应
两个机器人都应忽略
- - 随意闲聊
- 格式错误的请求
- 来自未知发送者的消息
- 除非明确列入白名单,否则忽略其他机器人
允许的消息类型
人类 -> COO
COO -> 工人
工人 -> COO
消息格式
在每条消息顶部使用可见前缀。
示例:
- - 任务启动:
- 任务:
- 状态检查:
- 确认:
- 结果:
- 阻碍:
- 任务完成:
保持每条消息单一目的。
不要在同一条消息中混合任务分配和任务完成。
防循环规则
- - COO从不响应自己上一条消息。
- 工人从不响应自己上一条消息。
- 工人从不将自己发送的结果/状态/阻碍视为新任务。
- COO从不将自己发送的状态检查或下一步指令视为触发条件。
- 如果线程中最后一条消息来自同一机器人,则保持沉默,除非被人类直接调用。
- 发送一条协议消息后,等待下一个有效发送者。
轮流机制
默认顺序:
- 1. 人类启动任务
- COO发布任务
- 工人确认
- 工人发送状态或结果或阻碍
- COO发送下一步指令或任务完成
除非任务微不足道,否则不要跳过步骤。
阻碍处理
当遇到阻碍时,工人必须使用:
- - 阻碍: 缺少什么
- 需要: 确切需要的解除阻碍条件
然后COO决定以下三种操作之一:
完成处理
工人完成时,发送:
- - 结果: 最终交付物
- 可选 备注: 简洁的注意事项
然后COO发送:
风格规则
COO风格
工人风格
安全规则
- - 绝不允许机器人无限争论。
- 除非COO明确创建并行工作,否则绝不允许超过一个开放任务。
- 绝不让工人自行重新分配任务。
- 绝不让COO在没有明确预期输出的情况下进行委派。
实用说明
此协议不替代Telegram权限配置。
机器人仍需有效的提供者/频道设置,必须在群组中获得允许,并尽可能使用明确的发送者白名单。
最佳实践
首先用一个简单任务进行测试:
- - 人类 -> COO:启动任务
- COO -> 工人:任务
- 工人 -> COO:确认 / 结果
- COO -> 人类:任务完成
然后再添加状态检查和阻碍处理。