trellis-channel
trellis channel 是本地多智能体协作运行时。当智能体需要通过持久化事件日志进行交流、需要将工作进程作为对等进程派生、需要对运行中的工作进程进行中断或调试、或者需要将反馈记录到持久化的 --type forum 频道中时,请使用它。
典型用户信号:"和 codex/claude 讨论","brainstorm with another agent","spawn an implement/check worker","let agent review","open an issue board / changelog forum","look at this thread","channel is stuck / no output","progress was truncated","how do I write that channel command"。
此技能是一个索引。仅加载当前任务所需的参考文件——不要预加载所有文件。
初始命令
trellis --version
trellis channel --help
trellis channel list --all
trellis channel list --scope global --all
如果用户提到了某个频道或线程,在询问背景信息之前先检查它:
trellis channel forum <board> --scope global
trellis channel thread <board> <thread> --scope global
trellis channel context list <board> --scope global --thread <thread>
根据用户意图路由
| 用户意图 | 参考文件 |
|---|---|
| "和 codex/claude 讨论一下","brainstorm with another agent" | references/workflows.md |
| "派一个 implement/check agent","让 agent review","spawn a worker" | references/workflows.md,然后 references/workers.md |
| "开 issue 区 / topic 群 / changelog / board","make a forum" | references/forum.md |
| "看看这个 thread / linked context","inspect a thread" | references/forum.md |
| "channel 卡住了 / 没输出 / progress 被截断","worker stalled" | references/progress-debugging.md |
| "具体命令怎么写","what flags does X take" | references/command-reference.md |
核心规则
- 新的论坛频道使用
--type forum。一个thread是论坛频道内的一条项目。 - 使用
--context-file/--context-raw和trellis channel context add/delete/list。--linked-context-*是已弃用的术语。 - 使用
--stdin或--text-file发送长消息。不要将长中英文混合文本放在位置 shell 参数中。 - 美观的
messages输出是操作员仪表板,并且可能截断进度。请使用--raw进行审计。 --as是发言者或工作进程句柄,具体取决于命令。当涉及多个智能体或会话时,请使用明确、稳定的名称。--scope project(默认)对当前工作目录的项目桶进行操作;--scope global对共享的__global__桶进行操作。请谨慎选择作用域——除非传递了--scope global,否则全局频道在项目列表中不可见。- 对于头脑风暴,请进行多轮压力测试。一个答案加一次确认是审查,不是头脑风暴。
- 分发器等待模式:使用
--kind done/--kind turn_finished(trellis 发出的系统事件),而不要使用用户--tag作为完成信号。CLI 帮助中列出了phase_done/question作为--tag示例,但只有interrupt是保留标签并具有硬编码的 trellis 行为;其他标签都是不透明的用户标签。依赖工作进程运行send --tag <my_signal>是不可靠的——LLM 工作进程通常会将标签字符串写入散文而不是实际运行 CLI 命令。请参见references/command-reference.md中的 "tag vs kind"。 - 论坛频道是事件溯源的。不要首先解析
events.jsonl;请使用forum、thread、messages --thread和context list。 @mindfoldhq/trellis-core拥有可复用的频道/线程状态、事件追加、序列号分配、上下文/标题投影、归约器和任务助手。CLI 拥有标志位、终端渲染、提示、工作进程生命周期和进程退出。
参考文件
references/workflows.md— 标准协作模式 A–F(对等头脑风暴、派生审查、分发并等待、论坛问题捕获、中断并重定向、一次性运行)。references/forum.md— 论坛频道、上下文、标题、重命名、变更日志论坛、线程过滤。references/workers.md— 派生、智能体卡片、上下文注入(--file/--jsonl)、中断、终止语义。references/progress-debugging.md— 进度/原始检查、工作进程卡住诊断、OOM 防护、退出代码。references/command-reference.md— 当前 CLI 命令参考(每个子命令、每个标志、输出约定、作用域/类型模型)。
不适用于
- 一次性的静态审查,其中 markdown 文件和提示就足够了。
- 用自我日志记录替代正常的工具调用。
- 长期记忆检索。使用持久化论坛频道处理可操作的问题,并使用
trellis mem(trellis-session-insight技能)进行会话/历史搜索。