latitude-llm AGENTS.md

latitude-llm AGENTS.md is an instructions file for Codex, OpenCode from latitude-dev/latitude-llm. It costs 4,006 tokens per session, scanned A, original, MIT.

Repository instructions for a multi-tenant language-model monitoring platform, where one service hosts data for multiple organizations while keeping their data separate. They describe the workspace structure and require organization identifiers in shared cache keys.

In plain words
What is it for?
Changing APIs, authentication, business rules, infrastructure adapters, telemetry, organization-scoped caches, and services backed by PostgreSQL, ClickHouse, Redis, or object storage.
Why use it?
They help agents preserve separation between organizations and place code in the correct application, domain, or infrastructure package.

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/latitude-dev/latitude-llm/agents-md
Clone the repo
git clone --depth 1 https://github.com/latitude-dev/latitude-llm

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for latitude-llm AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/latitude-dev/latitude-llm/agents-md.svg)](https://agentmods.dev/instructions/latitude-dev/latitude-llm/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/latitude-dev/latitude-llm/agents-md"><img src="https://agentmods.dev/badge/instructions/latitude-dev/latitude-llm/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 4,006 This file is loaded in full into every session.
When invoked 4,006 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.04006 $0.04006
Opus 5 $0.02003 $0.02003
Sonnet 5 $0.00801 $0.00801
Haiku 4.5 $0.00401 $0.00401

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

Security

Grade A, and why

latitude-llm 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 2d ago.

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 · 77 lines

How it starts

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

AGENTS.md

High-level guide for coding agents working in this repository.

Product scope

Multi-tenant LLM observability platform. The repo is a pnpm workspace orchestrated with Turbo.

At a glance: apps/* own transport (middleware, authn, mounting); @repo/operations owns the public API's operation contracts (validation, public schemas, routing to use-cases) shared by HTTP/MCP/SDK/CLI and in-process agent tools; packages/domain/* own business rules and ports; packages/platform/* implement infrastructure adapters; @repo/utils holds cross-cutting pure helpers. Telemetry and control data flow through Postgres, ClickHouse, Redis, and object storage, with organization-scoped access everywhere at the boundary.

Repo-wide conventions

  • Organization-scoped Redis or cache keys must start with the organization prefix: org:${organizationId}:.... Put the org id first so tenancy is obvious and keyspaces stay consistently partitioned.
  • Code comments are rare, and one line when they exist. Default to no comment — naming and structure should carry the meaning; a comment explaining what code does is a signal to rewrite the code, not to annotate it. Write a comment only for something the code cannot show: a trap (code that looks wrong, removable, or simplifiable but breaks something — ordering requirements, magic values, workarounds for framework/library quirks), a non-obvious external constraint, or contract docs where the file's existing convention documents every sibling (e.g. JSDoc on every method of a port). Never narrate the change you just made, restate what the next line does, paraphrase a well-named identifier, add section-header comments, or explain design rationale in the code — rationale belongs in the commit or PR description. When editing existing code, don't add comments describing your edit, and feel free to delete comments your change made stale or redundant. A comment describes the code as it stands, not the development process that produced it: never anchor one to transient context like a rollout phase, ticket id, or "new"/"now" framing (e.g. // Phase 2 (LAT-749): ...) — that reads as stale the moment the phase lands; state what the code does and put the ticket in the commit/PR. The only comments that may name a ticket are actionable TODO/FIXME markers for work not yet done.
  • Never invoke tsc directly. Typechecking goes through tsgo via the package typecheck script — use pnpm --filter <pkg> typecheck for one package or pnpm typecheck for the whole workspace. tsc would diverge from CI.
  • ClickHouse migrations must be created with pnpm --filter @platform/db-clickhouse ch:create <migration_name>. Do not create ClickHouse migration files manually.
  • PR base branch follows the branch's origin. Branches forked from development (v2 work, default) PR into development; branches forked from latitude-v1 (v1 maintenance) PR into latitude-v1. Never start a branch from main without confirmation — if the working branch is based on main, or the user asks to branch from main, confirm with the user first. Detect an existing branch's base by testing ancestry in order: if git merge-base --is-ancestor origin/latitude-v1 HEAD is true → latitude-v1; else if git merge-base --is-ancestor origin/development HEAD is true → development; else the branch is likely based on main (or something unusual) — stop and confirm with the user before opening a PR. When the user asks to start a new branch, take the base from their wording (mentions of v1 → latitude-v1; otherwise default to development).
  • Production deploys use the single-branch release-tag flow: development is trunk and deploys to staging by default; production is triggered only by pushing a vX.Y.Z tag that points at the latest origin/development commit. Before tagging a production release, update CHANGELOG.md with a human-readable diff of the code being pushed to production since the previous production deploy, focusing on the major aspects rather than every commit. Use scripts/release.sh [version] to fetch and tag the latest origin/development commit; without a version it bumps the latest vX.Y.Z tag to the next patch version, with --minor / --major available for larger bumps. Do not promote by merging development into main.
  • Keep the product cleanly OSS and self-hostable. Shipped runtime dependencies must be permissively licensed (MIT/Apache-2.0/BSD/ISC) — no AGPL/SSPL/source-available code in the application bundle; audit a new dependency's license (and its transitive additions) before adding it. The self-host object store is SeaweedFS (Apache-2.0) — never reintroduce MinIO or any AGPL store as a bundled default. Keep every infra dependency isolatable and bring-your-own-able (dedicated schema/db/namespace/bucket; Redis keys namespaced under latitude:) so a self-hoster can swap any bundle for a managed instance. Rationale + full audit: dev-docs/licensing.md; self-host architecture: dev-docs/self-hosting.md.
  • Private partner endpoints live under /v1/private/* and are plain Hono routes. They serve vetted, staff-registered partners, are authenticated by per-partner HMAC request signing (never a bearer token), and must stay off every generated surface — use a plain app.post(...), never app.openapi/createRoute, never defineOperation. Every pre-scope refusal returns an identical 401 {"error":"unauthorized"} so the surface can't be used to enumerate partner ids; only a scope failure gets a distinct 403. Details: dev-docs/partners.md.
  • Two image registries, distinct jobs. Public self-host images go to Docker Hub latitudedata/<service> — env-neutral, multi-arch, for the six build targets (api, ingest, workers, workflows, web, migrations) — tagged to the release flow: :X.Y.Z + :latest on a release (git vX.Y.Z with the v stripped) are the stable tags self-hosters pin, :development is the trunk edge tag. GHCR (latitude-<env>-<service>, sha-tagged) stays Latitude's private own-deploy registry and is never the self-host source.

Read the full file on GitHub · 77 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. 2d ago Changed · +1 lines · +132 tokens per session 2a8f3dc5fbd9
  2. 4d ago First seen · 76 lines · 3,874 tokens per session scan A 83ed205aa6d5

Subscribe to this mod's changes

latitude-llm AGENTS.md is an instructions file published in the GitHub repository latitude-dev/latitude-llm (4,619 stars, last pushed today), licensed MIT. It adds 4,006 tokens to every session, about $0.0200 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-30.