Summary
A chat-scan step type that queries a chat platform for recent messages in a set of configured channels and includes a structured summary in the routine report.
Motivation
Team awareness is a common morning-routine need: what happened in the support channel overnight, are there any unresolved escalations, did a key decision land in the team channel. Without a native step this requires either a bespoke script or wiring the full chat platform into a custom step. A generic chat-scan step with a pluggable transport covers the pattern once.
Proposed design
Step type: chat-scan
Config shape:
[[routines.morning.steps]]
name = "team channel"
type = "chat-scan"
platform = "slack" # slack | msteams | discord (transport)
channels = ["#support", "#team-main"]
look_back_h = 24 # hours of history to fetch
max_results = 20
env = { CHAT_TOKEN = { file = "~/.keys/chat-token" } }
Data contract (data field):
{
"schema": "chat-scan/1",
"channels": [
{
"name": "#support",
"message_count": 12,
"unresolved": 3,
"latest_ts": "ISO 8601",
"messages": [
{ "ts": "ISO 8601", "author": "string", "text": "string", "thread_count": 0 }
]
}
]
}
Behavior:
- Auth failure or unreachable platform:
skipped = true — routine continues.
- Each channel is fetched independently; one channel failing does not skip others.
- All network I/O through agent-bridle net Caveats axis.
output field contains a human-readable summary (counts + flagged threads); data carries the full payload.
Transport model
Platforms differ enough that each transport is a feature-gated sub-module:
slack transport: Slack Web API conversations.history
msteams transport: MS Graph chats/messages (future)
discord transport: Discord REST API (future)
The platform key selects the transport; unavailable platforms produce a compile-time feature-gate error with a clear message.
Alternatives considered
script wrapper per channel: works today but produces opaque text and doesn't compose.
harness calling a chat CLI: viable; mcp-client could cover CLI-wrapped chat MCP servers, but a native step enables structured output without a separate CLI dependency.
Acceptance criteria
Summary
A
chat-scanstep type that queries a chat platform for recent messages in a set of configured channels and includes a structured summary in the routine report.Motivation
Team awareness is a common morning-routine need: what happened in the support channel overnight, are there any unresolved escalations, did a key decision land in the team channel. Without a native step this requires either a bespoke script or wiring the full chat platform into a custom step. A generic
chat-scanstep with a pluggable transport covers the pattern once.Proposed design
Step type:
chat-scanConfig shape:
Data contract (
datafield):{ "schema": "chat-scan/1", "channels": [ { "name": "#support", "message_count": 12, "unresolved": 3, "latest_ts": "ISO 8601", "messages": [ { "ts": "ISO 8601", "author": "string", "text": "string", "thread_count": 0 } ] } ] }Behavior:
skipped = true— routine continues.outputfield contains a human-readable summary (counts + flagged threads);datacarries the full payload.Transport model
Platforms differ enough that each transport is a feature-gated sub-module:
slacktransport: Slack Web APIconversations.historymsteamstransport: MS Graphchats/messages(future)discordtransport: Discord REST API (future)The
platformkey selects the transport; unavailable platforms produce a compile-time feature-gate error with a clear message.Alternatives considered
scriptwrapper per channel: works today but produces opaque text and doesn't compose.harnesscalling a chat CLI: viable;mcp-clientcould cover CLI-wrapped chat MCP servers, but a native step enables structured output without a separate CLI dependency.Acceptance criteria
chat-scanstep type inmodulex-core(or a plugin crate)slacktransport behind a feature flagdataschema pinned with golden file testmodulex doctorreports platform reachability and token validity