War Room is a hackathon MVP for AI-assisted incident operations. It is an engineering operations copilot that turns fragmented operational signals into an auditable incident workflow with visible evidence, Coral SQL, reasoning, timelines, Slack coordination, tickets, and reports.
It is not a generic chatbot, a passive observability dashboard, or an autonomous remediation system.
Incident response is slow because the truth is scattered:
- Deployments and pull requests are in GitHub.
- Errors and alerts are in Sentry, Datadog, Grafana, and PagerDuty.
- Coordination is in Slack.
- Follow-up work is in Jira or Linear.
- Runbooks, postmortems, and operational notes live elsewhere.
During an outage, engineers lose time switching tools, copying context, asking "what changed?", and trying to prove whether a deployment, alert, Slack escalation, or ticket is actually related. AI can help, but only if it shows its work. A black-box summary is not enough for incident response.
War Room solves this by making investigation evidence first-class. It keeps the SQL, source tables, timeline, confidence, reasoning, and actions visible so responders can move from detection to investigation, coordination, remediation planning, and postmortem generation without losing the audit trail.
War Room combines incident management, connected source querying, AI reasoning, and workflow actions in one project-scoped web app.
- Authenticated workspaces: Supabase Auth, organizations, current-project selection, project settings, project services, and dependencies.
- Incident lifecycle: incident history, incident workbench, status transitions, evidence, timeline events, Coral queries, agent steps, action records, reports, postmortems, and ticket actions.
- Incident intake: manual/API intake, selected Coral query result intake, user-triggered Coral ingestion, verified provider webhooks, and request-driven Coral polling through trigger policies.
- Investigation workflow: incident RCA can sample available Coral tables, attach SQL/evidence to an incident, call the FastAPI LLM analysis endpoint when available, and use rule-based synthesis when external AI is unavailable.
- Slack coordination: project Slack OAuth, channel sync, notification preferences, signed interactive actions, app mention handling, owner assignment, incident status updates, ticket creation, timeline responses, and postmortem actions.
- Ticketing and artifacts: Jira/Linear incident tickets, incident reports, postmortem drafts, runbook helpers, blast-radius utilities, impact simulation, and remediation suggestions.
Coral is the investigation substrate in War Room. Provider APIs are still used for setup and write workflows, but cross-source evidence retrieval is modeled as Coral catalog discovery and read-only Coral SQL.
The important design choice is that War Room does not hide Coral behind a generic AI answer. The app stores and renders the generated SQL, touched tables, source systems, rows, evidence, confidence, and reasoning context.
Each project can connect Coral-backed sources from the integration settings UI. The implementation:
- Reads the source catalog and config fields from packages/shared/src/integrations.ts.
- Encrypts project credentials before storing them in
ProjectIntegration.config. - Materializes project-local Coral state under
CORAL_PROJECT_CONFIG_ROOTor an OS temp fallback. - Runs
coral source add,coral source test, and verifies provider tables throughcoral.tables. - Rehydrates connected project sources before query execution if local Coral state is missing.
Core code:
- apps/web/lib/coral/project-sources.ts handles install, test, remove, status, credential decryption, project config dirs, table counting, and rehydration.
- apps/web/app/api/integrations/route.ts validates integration payloads, installs/tests Coral sources, stores encrypted config, and returns redacted status to the browser.
- packages/db/src/integrations.ts persists project integrations and audit events.
War Room exposes source readiness and catalog metadata instead of assuming sources are available.
- apps/web/app/api/coral/sources/route.ts rehydrates project sources, checks Coral source health, reads catalog tables via MCP when available, falls back to CLI SQL over
coral.tables, and applies project filter defaults. - apps/web/components/settings-integrations-section.tsx surfaces connection status, required fields, test output, and Coral source state in the UI.
- docs/Coral_Production_Runtime.md documents how project credentials become project-scoped Coral source state.
War Room treats Coral SQL as an auditable evidence query layer.
- apps/web/lib/coral/query-runtime.ts asserts read-only SQL, ensures project sources exist, checks referenced tables against the active project catalog, tries Coral MCP SQL first, and falls back to the Coral CLI.
- apps/web/app/api/coral/query/route.ts exposes authenticated project Coral SQL execution for the console.
- packages/coral/src/index.ts and packages/coral/src/mcp.ts provide the shared Coral execution and MCP helpers.
This is why the incident workbench can show the exact SQL that supported a conclusion rather than only an AI paragraph.
When a project has an enabled BYOK AI model, War Room can turn an operator question into Coral SQL:
- apps/web/app/api/coral/ask/route.ts loads project catalog metadata, applies required filter defaults, calls the configured AI model, validates the generated SQL as read-only, verifies required filters, runs the query, and summarizes the rows.
- apps/web/lib/coral/ask-sql.ts contains the SQL generation and answer summarization logic.
The output includes the question, answer, generated SQL, returned rows, explanation, and transport used (mcp or cli).
War Room can promote Coral rows into incident candidates.
- apps/web/app/api/incidents/ingest/coral/route.ts is the authenticated ingestion endpoint.
- apps/web/lib/coral/incident-ingestion.ts discovers provider tables, reads columns through MCP or
coral.columns, builds provider-aware SELECT queries, maps rows into incident intake payloads, infers severity, attaches evidence, and preserves the Coral SQL on the incident.
Current Coral ingestion providers are GitHub, Sentry, Datadog, Grafana, PagerDuty, and Notion. It handles missing required filters, unsupported catalog entries, source-not-installed states, query failures, duplicate incidents, and persistence failures explicitly.
The FastAPI backend remains independently runnable, but it can run project-scoped Coral investigations above the same source setup:
- apps/api/orchestration/coral_client.py wraps the Coral CLI, validates read-only SELECT SQL, lists sources, lists catalog tables/columns, and resolves project Coral config directories.
- apps/api/orchestration/coral_runtime.py loads project incident context, lists installed sources, inspects the Coral catalog, chooses relevant tables, runs read-only Coral SQL, turns rows into evidence, and emits observations.
- apps/api/orchestration/engine.py places Coral evidence correlation into the orchestration flow.
This keeps orchestration in FastAPI while source retrieval and cross-source context remain Coral-native.
War Room includes reusable Coral SQL builders for investigation patterns:
- services/coral/query-builder/index.ts builds JOIN-heavy queries for deployment correlation, Slack incident threads, Linear follow-up, recurring incidents, noisy deploys, and blast-radius analysis.
- services/coral/query-builder/optimizer.ts consolidates fragmented query candidates into richer Coral investigation SQL.
- docs/Coral_Architecture_Foundation.md describes the Coral-first architecture rule: prefer Coral SQL joins over repeated provider fetches when investigation needs more than one source.
For incident-grade correlation, Coral should join sources when the question is causal: "what changed before the alert?", "which deploy introduced this error?", "which conversation or ticket confirms impact?", or "which follow-up already exists?" Single-source Coral queries are still valid for provider-specific signals, but cross-source RCA is strongest when the SQL ties deploys, errors, alerts, chat, incidents, tickets, and operational knowledge together in one auditable query.
The most relevant join patterns for the connected sources, assuming everything is connected, are:
-- Deployment -> pull request -> Sentry error regression.
SELECT
d.repo,
d.sha,
d.environment,
d.created_at AS deployed_at,
pr.title AS pull_request_title,
pr.state AS pull_request_state,
s.title AS sentry_issue_title,
s.level AS sentry_level,
s.first_seen
FROM github.repo_deployments d
LEFT JOIN github.pulls pr
ON pr.owner = d.owner
AND pr.repo = d.repo
AND (pr.head__sha = d.sha OR pr.merge_commit_sha = d.sha)
LEFT JOIN sentry.issues s
ON (s.release = d.sha OR s.release = pr.head__sha OR s.project = d.repo)
AND s.first_seen BETWEEN d.created_at AND d.created_at + INTERVAL '60 minutes';-- Deployment -> Datadog monitor/event spike.
SELECT
d.repo,
d.sha,
d.created_at AS deployed_at,
m.name AS monitor_name,
m.status AS monitor_status,
m.last_triggered_ts,
e.title AS event_title,
e.timestamp AS event_timestamp
FROM github.repo_deployments d
LEFT JOIN datadog.monitors m
ON (m.service = d.repo OR m.service_name = d.repo)
AND m.last_triggered_ts BETWEEN d.created_at AND d.created_at + INTERVAL '60 minutes'
LEFT JOIN datadog.events e
ON (e.service = d.repo OR e.service_name = d.repo)
AND e.timestamp BETWEEN d.created_at AND d.created_at + INTERVAL '60 minutes';-- Alert -> PagerDuty incident -> Slack incident conversation.
SELECT
g.title AS grafana_alert,
g.state AS grafana_state,
g.starts_at,
p.title AS pagerduty_incident,
p.status AS pagerduty_status,
sl.channel,
sl.thread_ts,
sl.text
FROM grafana.alerts g
LEFT JOIN pagerduty.incidents p
ON (p.service = g.service OR p.service_name = g.service)
AND p.created_at BETWEEN g.starts_at - INTERVAL '15 minutes'
AND g.starts_at + INTERVAL '90 minutes'
LEFT JOIN slack.messages sl
ON LOWER(sl.text) LIKE '%' || LOWER(g.service) || '%'
AND sl.created_at BETWEEN g.starts_at - INTERVAL '15 minutes'
AND g.starts_at + INTERVAL '90 minutes';-- Incident/service context -> Jira and Linear follow-up coverage.
SELECT
i.service,
i.title AS incident_title,
j.key AS jira_key,
j.summary AS jira_summary,
j.status AS jira_status,
li.identifier AS linear_identifier,
li.title AS linear_title,
li.state AS linear_state
FROM incident.events i
LEFT JOIN jira.issues j
ON (LOWER(j.summary) LIKE '%' || LOWER(i.service) || '%'
OR LOWER(j.description) LIKE '%' || LOWER(i.service) || '%')
LEFT JOIN linear.issues li
ON (LOWER(li.title) LIKE '%' || LOWER(i.service) || '%'
OR LOWER(li.description) LIKE '%' || LOWER(i.service) || '%');-- Feature flag or operational note -> deploy and incident context.
SELECT
d.repo,
d.sha,
d.created_at AS deployed_at,
ld.name AS flag_name,
ld.updated_at AS flag_updated_at,
n.title AS note_title,
n.updated_at AS note_updated_at
FROM github.repo_deployments d
LEFT JOIN launchdarkly.feature_flags ld
ON (ld.project = d.repo OR ld.key = d.repo)
AND ld.updated_at BETWEEN d.created_at - INTERVAL '30 minutes'
AND d.created_at + INTERVAL '60 minutes'
LEFT JOIN notion.pages n
ON LOWER(n.title) LIKE '%' || LOWER(d.repo) || '%'
AND n.updated_at >= d.created_at - INTERVAL '7 days';War Room supports project-scoped integrations with different roles:
- Coral read sources: GitHub, Slack, Sentry, Datadog, Jira, Linear, Notion, PagerDuty, Grafana, and LaunchDarkly.
- Incident trigger webhooks: GitHub, Sentry, Datadog, Grafana, and PagerDuty.
- Request-driven Coral polling triggers: GitHub, Sentry, Datadog, Grafana, and PagerDuty.
- Slack workflow integration: Slack OAuth, channel sync, notifications, interactions, app mentions, and action routing.
- Ticket write integrations: Jira and Linear ticket creation.
- Repository correlation helpers: GitHub REST/GraphQL utilities under services/github.
- Provider helper services: Sentry, tickets, Slack workflow service, and Coral query-builder packages under services.
Integration configuration is project-scoped. Secrets are encrypted before storage, redacted before returning to the browser, and used to materialize Coral source state only when needed.
- Node.js 20+
- npm 11+
- Python 3.12+
- Supabase project with Auth and Postgres
- Coral CLI installed and available as
coral, or setCORAL_CLI_PATH
npm installStart from the example file:
cp .env.example .env.local
cp .env.example apps/web/.env.localPowerShell:
Copy-Item .env.example .env.local
Copy-Item .env.example apps/web/.env.localThe web app reads apps/web/.env.local. The database scripts also load .env.local from the repo root or apps/web/.env.local.
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=
DATABASE_URL=
DIRECT_URL=
WAR_ROOM_PUBLIC_URL=http://localhost:3000
WAR_ROOM_API_URL=http://localhost:3000
WAR_ROOM_FASTAPI_URL=http://localhost:8000
WAR_ROOM_API_TOKEN=
CREDENTIAL_ENCRYPTION_KEY=Use the pooled Supabase connection string for DATABASE_URL and the direct connection string for DIRECT_URL when running migrations. CREDENTIAL_ENCRYPTION_KEY is required before War Room can store encrypted project credentials such as Coral source tokens, Slack tokens, and BYOK model keys.
CREDENTIAL_ENCRYPTION_KEY=
WAR_ROOM_API_TOKEN=
WAR_ROOM_API_URL=http://localhost:3000
WAR_ROOM_FASTAPI_URL=http://localhost:8000AI is optional for core incident workflows, but required for natural-language Coral questions and model-backed report generation.
Provider API keys are normally configured in the product under Settings -> AI Models. War Room stores those BYOK model records in Postgres as encrypted AiModelConfiguration rows, then decrypts them only at runtime for Coral ask, report generation, postmortems, and FastAPI validation. CREDENTIAL_ENCRYPTION_KEY must be present before those encrypted model credentials can be saved or read.
The variables below are optional fallback/runtime variables for standalone agent package execution or FastAPI analysis when no project-scoped active model is available:
LITELLM_BASE_URL=http://localhost:4000/v1
LITELLM_API_KEY=
LITELLM_MODEL=gemini/gemini-2.5-flash
GEMINI_API_KEY=
GOOGLE_API_KEY=
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
VERCEL_AI_GATEWAY_API_KEY=SLACK_CLIENT_ID=
SLACK_CLIENT_SECRET=
SLACK_OAUTH_STATE_SECRET=
SLACK_SIGNING_SECRET=
WAR_ROOM_PUBLIC_URL=http://localhost:3000Slack notification OAuth is separate from Slack as a Coral read source. Coral Slack read access is configured per project with a SLACK_TOKEN in the settings UI.
GITHUB_TOKEN=
SENTRY_ORG=
SENTRY_TOKEN=
DD_SITE=datadoghq.com
DD_API_KEY=
DD_APPLICATION_KEY=
LINEAR_API_KEY=
PAGERDUTY_API_TOKEN=
GRAFANA_URL=
GRAFANA_TOKEN=
LAUNCHDARKLY_TOKEN=
CORAL_CLI_PATH=coral
CORAL_PROJECT_CONFIG_ROOT=
CORAL_QUERY_TIMEOUT_MS=15000
CORAL_MCP_TIMEOUT_MS=15000
CORAL_SOURCE_TIMEOUT_MS=30000
WAR_ROOM_GITHUB_OWNER=
WAR_ROOM_GITHUB_REPO=See .env.example for the full list, including Jira, Linear workflow fields, report timeouts, and standalone Slack service settings.
npm --workspace @workspace/db run migrate:deploynpm run dev:webOpen:
http://localhost:3000In a second terminal:
cd apps/api
python -m venv .venv
.venv\Scripts\activate
pip install -e .
uvicorn main:app --reloadOpen:
http://localhost:8000/docsflowchart LR
Web[Next.js web app] --> DB[Supabase Postgres + Prisma]
Web --> Shared[Shared TypeScript contracts]
Web --> Coral[Coral source/query layer]
Web --> FastAPI[FastAPI orchestration API]
FastAPI --> Agents[LangChain/LangGraph analysis]
Web --> Slack[Slack OAuth, events, interactions]
Web --> Tickets[Jira and Linear ticket services]
Coral --> Sources[GitHub, Slack, Sentry, Datadog, Grafana, PagerDuty, Jira, Linear, Notion, LaunchDarkly]
apps/web Next.js app, UI, auth, settings, incidents, Slack routes, Coral routes, API handlers
apps/api independently runnable FastAPI orchestration and LLM-analysis backend
packages/db Prisma schema, migrations, and database helpers
packages/shared shared incident, trigger, integration, workspace, and AI-model contracts
packages/ui shared shadcn/ui primitives and Tailwind global styles
packages/coral Coral metadata and SQL execution helpers
packages/agents reports, postmortems, runbooks, risk, remediation, and analysis helpers
services/coral Coral query-builder service package
services/github GitHub REST/GraphQL correlation helpers
services/sentry Sentry signal helpers
services/tickets Jira and Linear ticket clients
services/slack optional standalone Slack development service
docs architecture notes, MVP boundaries, setup docs, and planning materialnpm run dev
npm run lint
npm run typecheck
npm run test
npm run build
npm --workspace web run build
npm --workspace @workspace/db run generate
npm --workspace @workspace/db run migrate:dev
npm --workspace @workspace/db run migrate:deployFastAPI syntax check:
cd apps/api
python -m py_compile main.py- Open
/dashboardfor project overview, incidents, source status, and action-center context. - Open
/incidentsto inspect project incident history. - Open an incident workbench to review evidence, timeline, Coral SQL, agents, actions, tickets, reports, and postmortems.
- Open
/coralfor the source query console and AI-assisted Coral query path. - Open
/settingsto configure project integrations, Slack, AI models, services, dependencies, and trigger policies.
- There is no in-repo background worker or distributed queue. Scheduled trigger polling is exposed as a token-protected HTTP endpoint and must be called by an external scheduler.
- Remediation actions are approval-oriented. War Room does not autonomously change production infrastructure.
- The standalone
services/slackpackage is an optional development service; the primary Slack product path is implemented in the Next.js app routes.
- Incident triggering current state
- Incident trigger webhook setup
- Slack setup
- Coral architecture foundation
- Coral production runtime
- Coral OpenTelemetry setup
The repository includes a Prisma migration workflow at .github/workflows/prisma-migrations.yml. It runs on pushes to master only when files under packages/db/prisma/migrations/** change, then applies migrations with:
npm --workspace @workspace/db run migrate:deployRequired repository secrets:
DATABASE_URL
DIRECT_URL- Replace the Coral Investigation Flow and Incident Lifecycle placeholder assets with final product diagrams or screenshots.
- Add richer provider-specific Coral query plans for each connected source so every integration becomes incident-grade, not just connectable.
- Expand trigger coverage with more verified webhook providers and scheduler integrations while keeping polling request-driven unless a worker is explicitly introduced.
- Add stronger project-level permission controls without turning the MVP into enterprise RBAC.
- Improve deployment and trace correlation with more OpenTelemetry-backed Coral tables.
- Add more post-incident learning loops that write durable operational memory from completed postmortems.
- Package a shorter hackathon operator guide with screenshots and a fixed narrative path.
- Deploy
apps/webas the Next.js frontend. - Deploy
apps/apias an independently runnable FastAPI service. - Configure Supabase Auth redirect URLs for the deployed web origin.
- Set
WAR_ROOM_PUBLIC_URL,WAR_ROOM_API_URL, andWAR_ROOM_FASTAPI_URLto public deployment URLs. - Configure Slack redirect URLs and request signing if Slack workflows are enabled.
- Keep provider credentials in deployment secrets or project-scoped encrypted records, not in committed files.
Made as part of Pirates of the CoralBean hackathon!

