This repository was archived by the owner on May 26, 2026. It is now read-only.
feat(kora): KR-FEAT-SLACK-DM ST3 — Slack app runbook - #123
Merged
rafe-walker merged 1 commit intoMay 22, 2026
Conversation
Final ST of Feature 5. Pure docs; closes the KR-FEAT-SLACK-DM arc.
Operator-facing checklist from "no Slack app" to "Joshua DMs Kora's
bot and gets an echo reply."
## Single deliverable
`kora_docs/15_status_and_roadmap/slack_app_setup_runbook.md`
(405 lines)
## Sections
1. **Slack app creation** — two paths:
- Path A: Manual UI walkthrough (Create New App → From scratch)
- Path B: **Paste-ready app manifest YAML** (recommended) with
all OAuth scopes (chat:write / im:history / im:read /
im:write) + bot_events (message.im) + display_information +
event_subscriptions request_url placeholder
2. **Install to workspace + bot token grab** — covers OAuth
consent flow + where to find the xoxb-... token
3. **Signing secret grab** — Basic Information → App Credentials
path with security framing
4. **Doppler secrets setup** — three envs (KORA_SLACK_SIGNING_SECRET,
KORA_SLACK_BOT_TOKEN, KORA_SLACK_JOSHUA_USER_ID) into
`kora-runtime-gateways` project; flyctl secrets import + shred
cleanup pattern from the first-deploy runbook. Calls out the
KORA_SLACK_JOSHUA_USER_ID fail-CLOSED behavior (unset → ALL
messages dropped).
5. **Smoke test** — DM → echo within 5s. Operator-side log
verification with the three expected log lines + the JSONL
round-trip schema (received + ok pair).
6. **Troubleshooting matrix** — diagnoses + fixes for:
- Slack URL-verification "Failed" (signing-secret mismatch /
daemon down / TLS cert / timestamp skew)
- No reply received (7 distinct failure modes, each tied to a
specific [kora.slack_dm.*] log line so operator can
self-diagnose)
- Reply content wrong/truncated (echo-format-locked framing)
- Reply in wrong thread (thread_ts fallback explained)
7. **§4 Q4 — Dual signing-secret env transition note**:
- Legacy `gateway/platforms/slack.py` reads
`SLACK_SIGNING_SECRET`
- New daemon listener reads `KORA_SLACK_SIGNING_SECRET`
- Both come from the same Slack app's Basic Information page
→ same value, different consumer paths
- Operator sets BOTH env vars to the same value during the
transition; rotates BOTH simultaneously
- Post-KR-2 cleanup path documented (legacy env removable
once gateway/platforms/slack.py is retired or refactored)
8. **Promotion to production** — same sequence with -c prd against
kora-runtime app; Slack app Event Subscriptions Request URL
update; Joshua-decides-when gate
9. **Operator obligations (ongoing)** — monitor reply_failed rate,
PAUSED-state communication, rotation cadence, JSONL rotation
(logrotate / Fly log-tailing — deferred from this bucket per
ST1 non-scope)
10. **What's NOT in this feature (deferred)** — AI-driven response
(KR-FEAT-AI-RESPONSE-LOOP), multi-turn state, kora__send_slack_dm
MCP tool (KR-MCP-SEND-TOOLS), multi-user support, Slack
interactivity
11. **Cross-references** — wires the runbook to:
- kora_cli/listeners/webhooks.py:_handle_slack (KR-D-DAEMON ST3 +
KR-FEAT-SLACK-DM ST1)
- kora_cli/handlers/slack_dm_handler.py (ST1+ST2)
- kora_cli/clients/slack_client.py (ST2)
- kora_cli/listeners/webhook_signing.py:verify_slack_signature
- kora_runtime_doppler_env_mapping.md
- r2_amendments.md (Amendment 1 — why port 9118 exists)
## §5 ship checklist
- [x] Base `feature/phase2-upgrades`
- [x] Title format `feat(kora): KR-FEAT-SLACK-DM STn — <scope>`
- [x] No code changes (pure docs)
- [x] App manifest YAML paste-ready into Slack's import flow
- [x] §4 Q4 dual signing-secret note covered
- [x] Cross-references woven so operator can navigate without
re-grepping
## Feature 5 closes
After this PR merges, the KR-FEAT-SLACK-DM 3-ST cascade is
complete (ST1 inbound + identity + JSONL + state-gate; ST2
outbound + echo + retry; ST3 operator runbook). Joshua can DM
Kora and get echo replies once the operator walks the runbook
through staging + prod.
The AI-driven response generation that replaces the echo is the
deferred KR-FEAT-AI-RESPONSE-LOOP follow-on; the Slack-DM scaffold
is the stable interface that follow-on consumes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Final ST of Feature 5. Pure docs; closes the KR-FEAT-SLACK-DM arc. Operator-facing checklist from "no Slack app" to "Joshua DMs Kora's bot and gets an echo reply."
Bucket spec: `kora_docs/17_cc_bucket_prompts/KR-FEAT-SLACK-DM_kora_joshua_dm.md`.
Base: `feature/phase2-upgrades` — NOT main.
Single deliverable
`kora_docs/15_status_and_roadmap/slack_app_setup_runbook.md` (405 lines)
Sections
§5 ship checklist
Test plan
Feature 5 closes
After this PR merges, the KR-FEAT-SLACK-DM 3-ST cascade is complete:
Joshua can DM Kora and get echo replies once the operator walks the runbook through staging + prod. The AI-driven response generation that replaces the echo is the deferred `KR-FEAT-AI-RESPONSE-LOOP` follow-on; the Slack-DM scaffold is the stable interface that follow-on consumes.
Next bucket candidates (PM's call)
🤖 Generated with Claude Code