genefoundry-router
AGENTS.md6 starsChanged 4 months agoMITView on GitHub
Shared instructions for AI coding agents working in this repository. genefoundry-router is a thin FastMCP 3.x aggregator (a router/gateway), NOT a data server. It federates the GeneFoundry *-link MCP fleet behind one Streamable-HTTP endpoint (genefoundry) with collision-free namespacing, BM25 tool-search, pluggable auth, and a config-driven registry. It is a client to each backend and a server to hosts. Other useful targets: make test, make test-integration, make test-cov (coverage ≥70), make lint, make typecheck, make run, make validate, make doctor, make…
- Reads credentials
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 40
Namespacing is the gateway's job: Keep per-backend transform blocks minimal and delete them from servers.yaml as source repos adopt …
- Very specific: line 42
No token passthrough: never forward the caller's Authorization header to backends.
- Very specific: line 55
Every service there declares user: "<uid>:<gid>" numerically — this image's own value from docker/Dockerfile (10001:10001), never copied …
≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Shared instructions for AI coding agents working in this repository.
What this project is
genefoundry-router is a thin FastMCP 3.x aggregator (a router/gateway), NOT a data
server. It federates the GeneFoundry *-link MCP fleet behind one Streamable-HTTP endpoint
(genefoundry) with collision-free namespacing, BM25 tool-search, pluggable auth, and a
config-driven registry. It is a client to each backend and a server to hosts.
- Primary code area:
genefoundry_router/ - Source of truth for backends:
servers.yaml(structure) +.env(URLs/secrets) +uv.lock - Design spec:
docs/specs/2026-06-13-genefoundry-router-design.md - Implementation plan:
docs/plans/2026-06-13-genefoundry-router-implementation.md
Required check before handoff
make ci-local # format-check, lint, lint-loc (600-LOC budget), mypy, unit + integration testsOther useful targets: make test, make test-integration, make test-cov (coverage ≥70),
make lint, make typecheck, make run, make validate, make doctor, make list-tools,
make docker-build, make docker-prod-config, make docker-npm-config.
Coding standards
- Python 3.12+; dependency + venv management via uv (
uv sync --group dev,uv run). - Modern typing (
X | None, builtin generics);ruff(lint + format) andmypymust pass. - 600-LOC per module budget, enforced by
scripts/check_file_size.py(make lint-loc). - TDD: write a failing test, see it fail, implement minimally, see it pass; one atomic commit per change.
- FastMCP 3.x symbols are post-training-cutoff and fast-moving — verify imports against the installed package before relying on them (see the import smoke in the implementation plan, Task 2). Adapt to the installed API; the integration test is the contract.
Project-specific guidance
- Namespacing is the gateway's job. Keep per-backend
transformblocks minimal and delete them fromservers.yamlas source repos adopt Tool-Naming Standard v1. - No token passthrough: never forward the caller's
Authorizationheader to backends. - Streamable HTTP only (
transport="http"); SSE is not offered. - Container & deployment hardening is a fleet standard. The router and every
-linkserver followdocs/CONTAINER-HARDENING-STANDARD-v1.md(non-root, read-only rootfs,cap_drop: ALL,no-new-privileges, resource limits, expose-only behind the proxy, digest-pinned base, CI image scan + SBOM). The router'sdocker/is the reference implementation; copy it, don't reinvent. - Backends are unauthenticated by design (the router owns edge auth at the trust boundary) — they MUST be reachable only through the router/reverse proxy, never published directly.
Fleet deploy contract
docker/docker-compose.npm.ymlis the file the fleet controller (strato_v6_docker_npm,scripts/utils/deployment_preflight.py) deploys and validates. Every service there declaresuser: "<uid>:<gid>"numerically — this image's own value fromdocker/Dockerfile(10001:10001), never copied from a sibling-linkrepo.usermust NOT appear in the Compose files listed incontainer-release.json(docker/docker-compose.yml,docker/docker-compose.prod.yml) — the shared release gate forbids it there.- Guard test:
tests/unit/docker/test_compose.py(test_npm_overlay_declares_numeric_deploy_user,test_release_compose_files_omit_user). - The deployed overlay is gated centrally:
container_release.py validate-deployed-overlayruns in the shared release workflow'spreparejob, before any image is built, for every repository that calls it. The rules, thecontainer-release.jsonfields (service.deployed_compose_files,deployed_seed_binds,deployed_sidecars) and the waiver path are documented indocs/deployment.md. - Release checklist this repo enforces: bump
pyproject.toml,uv lock,CHANGELOG.mdheading## [x.y.z] - YYYY-MM-DD,CITATION.cffversion:(generated file — this repo'sdate-releasedis release-driven, set byscripts/gen_citation_cff.py --writefrom the repo's actual latest GitHub release date, not from the CHANGELOG; leave it alone in a PR and let the fleet-levelmake citation-writerefresh it after the tag lands), tagvx.y.z, then approve thereleaseenvironment gate viagh api repos/berntpopp/genefoundry-router/actions/runs/<id>/pending_deployments(it can gate twice;status: waitingis the gate, not a slow build).
Fleet standards (apply repo-wide; each -link repo has a tracking issue)
- Tool-Naming & Normalization —
docs/TOOL-NAMING-STANDARD-v1.md - Response-Envelope —
docs/RESPONSE-ENVELOPE-STANDARD-v1.md - Tool-Surface Budget —
docs/TOOL-SURFACE-BUDGET-STANDARD-v1.md(make lint-surface) - Tool-Schema Documentation —
docs/TOOL-SCHEMA-DOCUMENTATION-STANDARD-v1.md(make lint-surface) - Container & Deployment Hardening —
docs/CONTAINER-HARDENING-STANDARD-v1.md - Versioning (single-source) —
docs/VERSIONING-STANDARD-v1.md - Logging & CLI Standard v1 (sibling; canonical text tracked per-repo)
Conformance is gated, not just documented. docs/conformance/ is the canonical source vendored
byte-identical into every -link repo: conformance.py gates transport, behaviour.py gates the
contract an agent relies on (no silently-empty filter, honest total/truncated, an error that
names the parameter, isError on every error envelope). Behaviour probes are derived from each
server's own advertised schema — there is no per-repo probe list to write, and none to forget.
Boundary
Research use only. Not clinical decision support. Mirror the backends' disclaimers.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository11 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- auth-changeSkill
- backend-registry-changeSkill
- ci-failure-triageSkill
- code-quality-reviewSkill
- dependency-cve-sweepSkill
- fleet-drift-conformanceSkill
- fleet-standard-adoptionSkill
- release-readinessSkill
- security-reviewSkill
- tool-search-changeSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

