Skip to content

feat(slack): implement thread ownership policy for multi-bot scenarios #241

@aaronwong1989

Description

@aaronwong1989

Summary

In channels with multiple HotPlex bots, when a user creates a Thread, multiple bots responding simultaneously creates noise. Implement Thread Ownership Policy: first bot mentioned in a Thread owns that thread. owner responds to all messages, other bots stay silent unless explicitly @mentioned.

Design Doc

Scope

Phase 1: MVP (Required) ✅ COMPLETE

  • @mention detection and response
  • Respond in thread (not channel message)
  • Owner policy configuration
  • Thread ownership tracking (bot-centric model)
  • Ownership transfer on @mention (R3)
  • Multi-owner support (independent bot tracking)
  • TTL expiration

Phase 2: Enhanced UX

  • Implicit trigger detection
  • Silence commands
  • Thread lifecycle (done/continue)
  • DM behavior

Phase 3: Advanced

  • Multi-bot coordination
  • Proactive behavior

Core Rules (from Spec)

Context @ Mention No @
Main Channel Mentioned bots respond (per policy) All bots silent
Owned Thread Owner + mentioned bots respond Owner responds
Unowned Thread Mentioned bots claim & respond All bots silent

Config

bot:
  owner:
    primary: "U12345"
    trusted: []
    policy: owner_only  # owner_only | trusted | public

  thread_ownership:
    enabled: true
    ttl: 24h
    persist: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/adapter🔌 Adapter - 平台适配器platform/slack💬 Slack - Slack 平台相关priority/high🟠 P1 - 严重影响用户体验、频繁出现的问题size/large📏 Large - > 3 天工作量status/ready-for-work✅ Ready for Work - 信息完整,可以开始type/feature✨ Feature - 新功能请求

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions