Infinity-API AGENTS.md

A repository guide for a Python web API built with FastAPI, a framework for creating web services. It describes the code layout, development commands, style rules, testing, and container-based setup with MongoDB.

In plain words
What is it for?
Use it when adding API controllers, services, repositories, models, or routes; formatting and linting Python; running tests; starting development; or running the API with MongoDB in containers.
Why use it?
It removes guesswork about where code belongs, which commands to run, and how to check changes before deploying. It also separates focused unit tests from broader integration tests.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/rocketpy-team/infinity-api/agents-md
Clone the repo
git clone --depth 1 https://github.com/RocketPy-Team/Infinity-API

Made for: Codex, OpenCode.

Per session 647 This file is loaded in full into every session.
When invoked 647 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00647 $0.00647
Opus 5 $0.00324 $0.00324
Sonnet 5 $0.00129 $0.00129
Haiku 4.5 $0.00065 $0.00065

Measured yesterday against content hash ac0e5bb076ce, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Infinity-API AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 25 lines

How it starts

The opening of the file, as written. The whole thing — 25 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Repository Guidelines

Project Structure & Module Organization

Source code lives in src/, with FastAPI entrypoints in src/api.py and domain layers grouped by concern (controllers/, services/, repositories/, models/, routes/, views/). Shared settings and helpers sit in src/settings/ and src/utils.py. Tests mirror this layout under tests/unit/ and tests/integration/ for focused and end-to-end coverage. Deployment assets stay at the root (Dockerfile, compose.yaml, Makefile), while virtualenv tooling is kept in infinity_env/.

Build, Test, and Development Commands

  • python3 -m pip install -r requirements.txt prepares runtime dependencies; add requirements-dev.txt for local tooling.
  • make format runs Black and Ruff autofixes across src/ and tests/.
  • make lint executes Flake8 and Pylint with the repository presets.
  • make test wraps pytest with the configured tests/ path.
  • make dev starts Uvicorn on http://localhost:3000 with hot reload.
  • docker-compose up --build -d (from compose.yaml) builds and runs the API plus MongoDB in containers; use make clean to prune stacks.

Coding Style & Naming Conventions

Target Python 3.12 and a 79-character line length (Black, Ruff, and Pylint enforce this). Prefer module-level functions in snake_case, classes in PascalCase, and constants in UPPER_SNAKE_CASE. Keep FastAPI routers named <feature>_router inside src/routes/, and align Pydantic models with CamelCase class names under src/models/. Run make format before opening a PR to avoid stylistic churn.

Testing Guidelines

Pytest drives both unit and integration suites; name files test_<feature>.py and group fixtures near usage. Place pure-function tests in tests/unit/ and API or database flows in tests/integration/. Execute pytest tests/integration/test_environment.py -k simulate to target scenarios while keeping --import-mode=importlib behavior intact. New features should include happy-path and failure-case coverage, plus integration smoke tests when touching MongoDB writes.

Read the full file on GitHub · 25 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 25 lines · 647 tokens per session scan A ac0e5bb076ce

Subscribe to this mod's changes

Infinity-API AGENTS.md is an instructions file published in the GitHub repository RocketPy-Team/Infinity-API (10 stars, last pushed 27d ago), licensed MIT. It adds 647 tokens to every session, about $0.0032 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.