Deployment Runbook
Stand up Prism Refactory without guessing through first boot.
Operator path for a fresh Prism Stack deployment: Railway template, site initialization, Discord setup, GitHub access, and first smoke checks.
Deploy the template
Actions
- Deploy https://railway.com/deploy/prism-agent-stack into the target Railway workspace.
- Provide required variables during deploy or defer optional service values until after first boot.
- Discord requires application, bot, guild, and channel values. Codex runtime requires a GitHub token.
Expected State
Railway creates the site, Prism Memory, Codex runtime, Discord adapter, and scheduled services.
Validation
Project canvas includes site, prism-memory, codex-runtime, discord-adapter, and scheduled services.
Confirm site initialization
Actions
- Use the site service public URL and ADMIN_PASSWORD from Railway variables.
- Authenticate to the admin view and let first-boot migrations complete.
Expected State
Admin loads without manual database setup.
Validation
Board renders and health reports the expected migration state.
Configure the Discord bot integration
Actions
- Create or reuse a Discord application at https://discord.com/developers.
- Enable the bot with Message Content Intent and install it with bot plus applications.commands scopes.
- Set the Discord application, bot, guild, and channel variables on discord-adapter.
Expected State
The bot is present in the target guild with access to configured channels.
Validation
PING returns pong in the configured channel.
Configure your GitHub integration
Actions
- Create a fine-grained GitHub PAT for the Prism runtime account.
- Grant target repo access plus metadata, contents, issues, and pull requests permissions.
- Set TARGET_REPO_GITHUB_TOKEN on codex-runtime and register the first target repo in admin settings.
Expected State
Codex runtime can authenticate to GitHub and the site has an initial repo target.
Validation
The repository appears as an available target for new change requests.
Configure your Codex runtime
Actions
- Authenticate Railway CLI locally.
- SSH into codex-runtime and run Codex device auth with CODEX_HOME on persistent storage.
railway ssh -s codex-runtime
mkdir -p /data/codex
export CODEX_HOME=/data/codex
export PATH="/app/node_modules/.bin:$PATH"
codex login --device-authExpected State
Device auth stores Codex credentials under /data/codex so restarts do not require re-login.
Validation
Reconnect, export CODEX_HOME=/data/codex, and run codex status.
Run the first smoke pass
Actions
- Create a low-risk change request against the target repo.
- Verify clone, branch, edit, push, and pull request creation.
- Run PING and /prism-health in Discord if enabled.
- Exercise one test recording flow if meeting capture is enabled.
Expected State
Site, runtime, GitHub token, Discord adapter, and optional recording flow prove end-to-end wiring.
Validation
Pull request exists, bot responds, /prism-health is ready, and recording outputs links when enabled.
Required Env Checks
- SITE_USE_LOCAL_APP_API=true on site
- PRISM_AGENT_DATA_ROOT=/data on site
- NEXT_PUBLIC_API_BASE_URL points to the site public domain
- TARGET_REPO_GITHUB_TOKEN is set on codex-runtime
- Discord application, bot, server, and channel variables are set on discord-adapter when Discord is enabled
- VOICE_DAVE_ENCRYPTION=true unless you have a proven reason to change it
First Smoke Checks
- Admin login works with the configured password
- The board loads instead of returning admin API errors
- A CR can clone, branch, push, and open a PR against the target repo
- The bot returns pong on ping
- /prism-health reports ready state and current voice permissions
- A recording session produces transcript and summary links in Discord
Next
Once the stack is healthy, move into real workflows.
Add production repositories, run real change requests, and move Discord plus meeting capture out of the test channels.