K Knowledge Assistant Documentation
GitHub ↗
SLACK → KNOWLEDGE BASE

Turn conversations into
documentation that ships.

Knowledge Assistant converts one or more Slack threads into a reviewable Knowledge Base article, then opens a GitHub draft PR after human approval.

✦
Human approval is always required.
Draft generation and publishing are deliberately separate steps. Nothing reaches GitHub or Confluence without an explicit approval.
START HERE

Onboarding

01

Run the Python 3.11+ service locally, connect it to Slack, and create your first draft.

01

Configure the environment

Copy .env.example to .env and add credentials through your approved secret manager.

Environment setup →
02

Connect Slack

Register the /knowledge slash command and enable Interactivity, or use Socket Mode for private networks.

Slack setup →
03

Create a draft

Send a Slack thread URL with /knowledge draft. Review the preview before publishing.

Command reference →
LOCAL DEVELOPMENT

Run the application

Install dependencies with uv, keep credentials in an untracked .env file, and start the FastAPI server on port 3000.

  1. Copy .env.example to .env.
  2. Run uv sync --extra dev.
  3. Run the tests and linter.
  4. Start the HTTP server.
cp .env.example .env
uv sync --extra dev
uv run pytest
uv run ruff check .
uv run uvicorn app.main:app \
  --host 0.0.0.0 --port 3000
CORE CONCEPT

The approval workflow

02

Every draft follows the same predictable path from source conversation to published article.

01CollectFetch and normalize Slack threads
→
02RedactRemove likely secrets before AI processing
→
03DraftGenerate structured Markdown or MDX
→
04ApproveHuman review in Slack
→
05PublishCreate a draft PR or page
INTEGRATION

Slack setup

Create the /knowledge slash command and grant the bot permission to read thread replies, respond to commands, and open modals. For HTTP mode, point the command to /slack/events and Interactivity to /slack/interactions. For private deployments, Socket Mode uses SLACK_APP_TOKEN and an outbound WebSocket.

See deployment options →
# HTTP callback
uv run uvicorn app.main:app \
  --host 0.0.0.0 --port 3000

# Private network / Socket Mode
uv run python -m app.slack_socket_app
INTEGRATION

GitHub setup

03

GitHub App

Configure the App ID, installation ID, client ID, client secret, and private key through environment variables. Install the app only on approved documentation repositories.

Repository policy

Set DEFAULT_KB_GITHUB_OWNER, DEFAULT_KB_GITHUB_REPO, and KB_ALLOWED_REPOS. The service validates every --repo override and always opens a draft PR.

PUBLISHING

Choose where knowledge lives

03
⌘

GitHub draft PR

The default destination. Render a Markdown or MDX article into an allowlisted documentation repository and open a draft pull request.

/knowledge create-pr <thread-link>
▤

Confluence page

Use the Confluence option to publish a reviewed page through the Roche MuleSoft MCP Synapse endpoint.

/knowledge draft <thread-link> --confluence
TRUST BY DESIGN

Security & authorization

Slack content is redacted before it reaches the model. Repository targets are restricted by an explicit allowlist, and user ownership checks protect draft actions.

  • Credentials come from environment variables or secret managers
  • GitHub OAuth uses one-time, user-bound state
  • Audit events exclude message content and tokens
  • Drafts never publish without approval
◇Safe by defaultLeast privilege across Slack, OpenAI, GitHub, Jira, and Confluence.
OPERATIONS

Deployment checklist

01SecretsSet Slack, OpenAI, and GitHub credentials without committing .env.
02Repository accessInstall the GitHub App only on repositories listed in KB_ALLOWED_REPOS.
03Health checkVerify GET /health returns { "status": "ok" }.
04PersistenceThe MVP store is in-memory; use Redis or Postgres for multi-instance deployments.
REFERENCE

Command reference

04
/knowledge draft <links...>Generate a preview for approval
/knowledge create-pr <links...>Generate a PR preview for approval
/knowledge approve <draft-id>Approve a pending draft
/knowledge edit <draft-id>Open the edit modal
/knowledge cancel <draft-id>Cancel without publishing
NEED HELP?

Something not working?

Start with the health endpoint and Slack interactivity settings. If buttons do not respond, confirm Interactivity & Shortcuts is enabled and points to /slack/interactions.

Open an issue ↗