_general-rules

A set of project rules for developing and documenting the Langfuse website, a documentation site. It covers where content and app code live, frontend styling, formatting, and checks before commits or pull requests.

In plain words
What is it for?
It is for editing Langfuse documentation, blog posts, guides, and frontend code built with Fumadocs, Next.js App Router, Tailwind CSS, and MDX.
Why use it?
It gives contributors clear conventions to follow and helps prevent formatting or documentation-structure failures in continuous integration checks.

Cursor rule for Codex

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 rules/langfuse/langfuse-docs/_general-rules
Clone the repo
git clone --depth 1 https://github.com/langfuse/langfuse-docs

Made for: Codex.

Per session 353 This file is loaded in full into every session.
When invoked 353 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.00353 $0.00353
Opus 5 $0.00177 $0.00177
Sonnet 5 $0.00071 $0.00071
Haiku 4.5 $0.00035 $0.00035

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

Security

Grade A, and why

_general-rules 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/cursor/rules/_general-rules.mdc · 25 lines

What it actually says

General rules

  • This is the documentation for the Langfuse website.
  • We use Fumadocs (App Router). Docs: https://www.fumadocs.dev/docs
  • Content lives in the /content folder, organized by section (docs, blog, changelog, guides, etc.).
  • App routes are in the /app folder.
  • Reusable markdown components are in the /components-mdx folder.
  • The devserver is running on http://localhost:3333.

Frontend

  • When using tailwindcss, never use explicit colors, always use the default semantic color tokens.

Before committing or opening a PR

  • Run pnpm run format if you edited any file Prettier formats (.js, .jsx, .mjs, .cjs, .ts, .tsx, .json, .css, .scss, .md, .mdx, .yaml/.yml, .html). CI runs pnpm run format:check and fails on a single unformatted file — this is the format check that most often fails on the first try.
  • Files in .prettierignore (content/guides/cookbook/**, content/workshop/**, generated assets in public/, lockfiles) are skipped, as are source notebooks (.ipynb in cookbook/) since Prettier has no parser for them. If you only touched those, no format step is needed.
  • Each .md/.mdx file must have exactly one H1 (# ) heading; CI's check_h1 job rejects multiples.
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 First seen · 25 lines · 353 tokens per session scan A d1c9adddca94

Subscribe to this mod's changes

_general-rules is a cursor rule published in the GitHub repository langfuse/langfuse-docs (237 stars, last pushed 2d ago), licensed MIT. It adds 353 tokens to every session, about $0.0018 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.