Skip to content

Security and data ​

TWD Design is designed to be easy to approve: it runs in your infrastructure, with your own Slack app, GitHub App and model key, and it stores nothing.

What it stores ​

Nothing. There is no database and no disk writes. Each turn:

  1. reads the Slack thread (messages and the latest prototype file),
  2. reads design/DESIGN.md from the linked repo, if any,
  3. calls the model,
  4. posts the result in the thread,

and then forgets everything. The only things kept in memory between turns are short-lived GitHub installation tokens (they expire after an hour) and which threads are busy right now.

Where data goes ​

DataRead fromSent to
Thread messages (text)SlackYour model provider
Current prototype (HTML)Slack (file in the thread)Your model provider
design/DESIGN.mdGitHub (linked repo)Your model provider
New prototypeModel providerSlack (file in the thread); GitHub (pull request, only when approved)
intent.mdModel providerGitHub (pull request, only when approved)

Nothing else from your repos is read. Prototypes contain only inline fake data: they make no network requests when opened.

Logs ​

Logs contain operational data only: thread IDs, repo names, durations, tool names, prototype sizes and token counts. They don't contain message text, prototype HTML, design guides or secrets.

Permissions ​

Slack: seven bot scopes, each explained in Create the Slack app. The bot only sees channels it was invited to and doesn't work in DMs.

GitHub: contents: write, pull_requests: write, metadata: read, only on the repos you select when installing the App. See Create the GitHub App.

  • It reads design/DESIGN.md on every turn, and other files of the linked repo when a request is about a screen that already exists (to rebuild it as it is). It skips .env files, keys and certificates, and never puts code in its Slack replies. But anyone who can talk to the bot can ask about a repo the App is installed on, so install it only on repos everyone in those channels may read.
  • It writes only through pull requests: a new design/<feature> branch with one commit. It never pushes to the default branch, so your branch protection and review rules apply.

Who can do what ​

Anyone in your Slack workspace who can talk to the bot can:

  • ask it for prototypes in channels it was invited to,
  • point it at any repo the GitHub App is installed on, which makes it read that repo's DESIGN.md,
  • ask it to open a pull request in that repo.

So: install the GitHub App only on repos your whole workspace may propose changes to, and invite the bot only to the channels where you want it used.

Secrets ​

SecretVariable
Slack bot tokenSLACK_BOT_TOKEN
Slack app-level tokenSLACK_APP_TOKEN
Slack signing secret (HTTP mode)SLACK_SIGNING_SECRET
Model provider keye.g. ANTHROPIC_API_KEY
GitHub App private keyGITHUB_PRIVATE_KEY

They are read from the environment only. Inject them from your secret manager (Kubernetes secrets, Docker secrets, your platform's environment settings) rather than committing an .env file. Rotating any of them is a restart with the new value.

Network ​

DirectionDestinationWhy
Outboundslack.com, wss://*.slack.comSlack API and Socket Mode
Outboundapi.github.comDesign guide and pull requests (optional)
OutboundYour model provider's APIThe model
Outboundcdn.jsdelivr.netThe headless browser that runs each version's scenarios loads Alpine.js, Tailwind and TWD, like a person opening the prototype (SCENARIO_CHECK=off skips it)
InboundNone in Socket ModeHTTP mode: Slack → POST /slack/events

People who open a prototype load Alpine.js, Tailwind and TWD from cdn.jsdelivr.net in their browser.

The scenarios run in a headless Chromium inside the bot's container, on a page served from 127.0.0.1 that exists only while they run. Prototypes carry only fake data and make no other requests.

MIT License · Part of TWD