Skip to content
13 changes: 13 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,19 @@ When a branch or PR review completes, record the reviewed branch/ref, HEAD SHA,

<!-- END:supabase-project-safety -->

<!-- BEGIN:railway-project-safety -->

# Railway project safety

- This repo deploys to the live Railway project `Database` (`5deaad0b-675a-4c13-978e-5ca2b5b877f9`) in workspace `bigsimmo's Projects`. Full topology: `docs/deployment-architecture.md` §1.
- Production services `Database` (Next.js app tier, serves `https://psychiatry.tools`) and `worker` (ingestion) auto-deploy from `BigSimmo/Database` pushes to `main`; the `staging` environment runs the `app` service.
- The older Railway project `clinical-kb` (`4361c04f-dd3c-4ee9-9e97-49e4e5707b70`) is superseded with zero active deployments; treat it as stale — never `railway link` to it or deploy there.
- The similarly named Supabase project `Clinical KB Database` is the database/auth tier, not a Railway project; see "Supabase project safety" above.
- Railway CLI/MCP auth uses `RAILWAY_API_TOKEN` (personal account token; see `.env.example`). The project-scoped `RAILWAY_TOKEN` is for CI deploys only and cannot list or link projects. The project-scoped Railway MCP server is registered in `.mcp.json`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Match the token wording to .env.example.

.env.example documents RAILWAY_API_TOKEN as account- or workspace-scoped, not strictly a personal account token, and documents RAILWAY_TOKEN for CI/remote-agent deploys, redeploys, and logs—not only CI deploys. Please align this guidance to avoid incorrect credential selection.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` at line 196, Update the Railway authentication guidance in
AGENTS.md to match .env.example: describe RAILWAY_API_TOKEN as account- or
workspace-scoped, and describe RAILWAY_TOKEN as supporting CI or remote-agent
deploys, redeploys, and logs rather than only CI deploys; preserve the existing
MCP registration guidance.

- Railway deploys and mutations fall under the "API and provider confirmation boundary" below; verify target project/environment IDs before any mutation.

<!-- END:railway-project-safety -->

<!-- BEGIN:api-confirmation-boundary -->

# API and provider confirmation boundary
Expand Down
Loading