Skip to content

Add Railway project safety section to AGENTS.md#962

Merged
BigSimmo merged 8 commits into
mainfrom
claude/install-claude-code-global-9ioe8n
Jul 20, 2026
Merged

Add Railway project safety section to AGENTS.md#962
BigSimmo merged 8 commits into
mainfrom
claude/install-claude-code-global-9ioe8n

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a Railway project safety section to AGENTS.md, mirroring the existing "Supabase project safety" section, so every agent session loads the canonical repo↔Railway link instead of rediscovering it:
    • Live project: Database (5deaad0b-675a-4c13-978e-5ca2b5b877f9), services Database (→ psychiatry.tools) and worker on main auto-deploy, staging env runs app — with a pointer to docs/deployment-architecture.md §1 for full topology.
    • Stale-project warning: clinical-kb (4361c04f…) is superseded, never link or deploy to it.
    • Disambiguates the similarly named Supabase project Clinical KB Database.
    • Token conventions (RAILWAY_API_TOKEN for CLI/MCP vs project-scoped RAILWAY_TOKEN for CI) and a reminder that Railway mutations fall under the repo's provider confirmation boundary.
  • Verified against live state before writing: project/environment IDs, service sources (BigSimmo/Database @ main), and the psychiatry.tools deployment (SUCCESS, HTTP 200) all match docs/deployment-architecture.md.

Note on branch history: PR #909 previously merged from this branch name; the branch was restarted from latest main per repo convention, and the pre-squash history is tied off with an ours-strategy merge (content unchanged) because force-push is not permitted in this session. The diff vs main is exactly the 13-line AGENTS.md addition.

Verification

  • Verification not run: docs-only change to AGENTS.md (13 added lines); no source, test, config, or build surface is touched, so the local verification gates do not apply.
  • Factual accuracy of the documented IDs/domains was verified against the live Railway API (read-only queries) at time of writing.

Risk and rollout

  • Risk: None to runtime — agent-instruction documentation only.
  • Rollback: Revert the section.
  • Provider or production effects: None.

Clinical Governance Preflight

Not applicable — no ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output is touched.

Notes

  • Follow-up candidates outside this PR's scope, from the same account review: the intelligent-joy Railway project has all six services failing their latest builds, and four dormant June projects (Forms, Yarning, Therapy, Medications) account for ~70% of the current Railway bill.

🤖 Generated with Claude Code

https://claude.ai/code/session_016UrrzgrBtQRXvshDhvz3Hs


Generated by Claude Code

Summary by CodeRabbit

  • Documentation
    • Added guidance for safely managing Railway projects, environments, and deployments.
    • Clarified the distinction between active and stale projects, Railway and Supabase resources, and authentication token usage.
    • Documented verification steps required before making configuration changes.

claude and others added 8 commits July 19, 2026 05:52
Registers the Railway MCP server (railway mcp via npx @railway/cli) in
.mcp.json so Claude Code sessions pick it up automatically. Requires
RAILWAY_API_TOKEN (or railway login) at runtime for the server to start.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016UrrzgrBtQRXvshDhvz3Hs
Addresses review: unpinned npx would fetch the latest CLI from npm at
runtime. Pin to the version verified against the MCP handshake.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016UrrzgrBtQRXvshDhvz3Hs
Documents the canonical repo-to-Railway link (project Database,
5deaad0b-675a-4c13-978e-5ca2b5b877f9, psychiatry.tools) in the
agent-loaded instructions, mirroring the Supabase project safety
section: stale clinical-kb project warning, token conventions, and
the provider confirmation boundary for deploys.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016UrrzgrBtQRXvshDhvz3Hs
@supabase

supabase Bot commented Jul 20, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

AGENTS.md adds Railway project safety guidance covering deployment topology, environment behavior, stale project references, token usage, provider naming, and confirmation of target IDs before mutations.

Changes

Railway project safety documentation

Layer / File(s) Summary
Document Railway project and credential boundaries
AGENTS.md
Documents the live Railway project and deployment behavior, marks clinical-kb as stale, distinguishes Railway and Supabase, separates CLI/MCP and CI token usage, and requires target ID verification before provider mutations.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a Railway project safety section to AGENTS.md.
Description check ✅ Passed The description covers the required summary, verification, risk, and governance sections and is mostly complete.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/install-claude-code-global-9ioe8n

Comment @coderabbitai help to get the list of available commands.

@BigSimmo
BigSimmo marked this pull request as ready for review July 20, 2026 07:43
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@BigSimmo
BigSimmo merged commit f633c58 into main Jul 20, 2026
18 checks passed
@BigSimmo
BigSimmo deleted the claude/install-claude-code-global-9ioe8n branch July 20, 2026 07:45

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🤖 Prompt for all review comments with 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.

Inline comments:
In `@AGENTS.md`:
- 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.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 362da071-d076-4677-8417-870a7d2215e3

📥 Commits

Reviewing files that changed from the base of the PR and between 51e747e and fc1d3d2.

📒 Files selected for processing (1)
  • AGENTS.md

Comment thread AGENTS.md
- 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants