You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The correction machinery exists for email (api/email/inbound: Svix-verified reply → draft correction → revision call → re-delivery flagged "Revised draft"). This issue gives Slack the same loop:
Reporter replies in the draft message's thread with rework instructions ("shorter", "lead with the quote")
Slack Events subscription receives the reply; thread → draft mapping mirrors the plus-addressed email decoder pattern in lib/notify/email.ts — encode/decode in one file so they cannot drift
Tooling note (2026-07-26): Same tooling picture as #74 — no Slack app-dev CLI installed; claude.ai Slack connector MCP is available for in-channel verification of the reply→revision loop; vercel:chat-sdk covers Events API/webhook patterns but the repo convention is raw fetch in lib/slack (mirror api/slack/interactions' raw-body HMAC + 3s-ack pattern for the Events subscription).
Docs grounding + planning inputs (2026-07-26): Use the slack-docs agent (~/.claude/agents/slack-docs.md) for all Slack API grounding. Three findings that shape this issue's plan:
Scope expansion → re-consent: reading thread replies needs channels:history-family scopes beyond the current grant — adding them to the per-agent app likely forces a re-install/re-consent for every existing install; plan the migration UX.
The new Events endpoint must pass the url_verification challenge handshake (echo challenge within 3s) before Slack delivers anything — same raw-body HMAC verification as the interactions route.
thread_ts semantics are not fully specified on the message.channels event page — cross-check the message_replied subtype reference before writing thread-detection/dedupe logic. Events API retries make idempotency mandatory.
Optional development aid: claude plugin install slack connects Slack's hosted MCP (mcp.slack.com) to Claude Code sessions for live in-channel verification during QC.
The correction machinery exists for email (
api/email/inbound: Svix-verified reply → draft correction → revision call → re-delivery flagged "Revised draft"). This issue gives Slack the same loop:lib/notify/email.ts— encode/decode in one file so they cannot driftScope discipline: no free-form chat with the agent — one reply = one revision instruction.
Depends on #74.
Tooling note (2026-07-26): Same tooling picture as #74 — no Slack app-dev CLI installed; claude.ai Slack connector MCP is available for in-channel verification of the reply→revision loop; vercel:chat-sdk covers Events API/webhook patterns but the repo convention is raw fetch in
lib/slack(mirrorapi/slack/interactions' raw-body HMAC + 3s-ack pattern for the Events subscription).Docs grounding + planning inputs (2026-07-26): Use the
slack-docsagent (~/.claude/agents/slack-docs.md) for all Slack API grounding. Three findings that shape this issue's plan:channels:history-family scopes beyond the current grant — adding them to the per-agent app likely forces a re-install/re-consent for every existing install; plan the migration UX.url_verificationchallenge handshake (echochallengewithin 3s) before Slack delivers anything — same raw-body HMAC verification as the interactions route.thread_tssemantics are not fully specified on themessage.channelsevent page — cross-check themessage_repliedsubtype reference before writing thread-detection/dedupe logic. Events API retries make idempotency mandatory.Optional development aid:
claude plugin install slackconnects Slack's hosted MCP (mcp.slack.com) to Claude Code sessions for live in-channel verification during QC.