πͺ’ Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
chore(agent-dx): scope agent guidance to packages and validate it in CI (#15653)
Tobias Wochinger937e4777afb6
diff --git a/.agents/AGENTS.md b/.agents/AGENTS.mdindex 668485063a..afec113733 100644--- a/.agents/AGENTS.md+++ b/.agents/AGENTS.md@@ -7,10 +7,6 @@ evaluating, and debugging AI applications.- Read the minimal local context required for the task.- Keep changes scoped and avoid unrelated refactors.-- If you are about to write a `useEffect` β or sync fetched data into state, or- wire form initial values from loaded data β read- `.agents/skills/frontend-large-feature-architecture/SKILL.md` first. Most- such effects should not exist.- For bug fixes, first write the smallest failing test that proves the reportedbehavior and confirm it fails against the buggy behavior before changingproduction code. Add another test only when it exercises a distinct adapter,@@ -21,13 +17,9 @@ evaluating, and debugging AI applications.seeder scenario so the bug stays cheaply reproducible(`packages/shared/scripts/seeder/AGENTS.md`), or note why a seed cannotexpress it.-- For user-visible frontend changes in `web/**`, review the affected flow in a- real browser before signoff. Prefill the data the flow needs with the seed- CLI (`pnpm run seed -- list` shows scenarios; runs print UI deep links) β- never with ad-hoc scripts or raw ClickHouse inserts.-- When fixing an isolated styling issue in an individual component, read- `.agents/skills/storybook/SKILL.md` create or update a component story following its- guidance first.+- Prefill local test data with the seed CLI (`pnpm run seed -- list` shows+ scenarios; runs print UI deep links) β never with ad-hoc scripts or raw+ ClickHouse inserts.- Every PR auto-builds (via GitHub Actions) a disposable, full-stack preview at`pr-<N>.preview.langfuse.com` β nothing to spin up. Use the `langfuse-previews`skill to use or debug one, e.g. read a preview's web/worker error logs with@@ -35,16 +27,6 @@ evaluating, and debugging AI applications.- For documentation screenshots in Markdown, avoid fixed `height` on `<img>`tags; prefer Markdown images or width-only HTML so previews preserve aspectratio.-- When working on the search bar or any filtering UI/grammar, read- `web/src/features/search-bar/README.md` first. It owns the grammar β- `FilterState` contract, the validate/lower parity invariants, and the- cross-view extension playbook β the bar is intended to become the primary- filter interface for every filterable view, so new filtering work extends it- through that contract rather than forking it.-- When adding or modifying any chart, dashboard, or chart formatter, read- `web/src/features/widgets/chart-library/ARCHITECTURE.md` first β the charts- manifesto. It owns the data β preparer β visualiser contract: presentation- decisions live in the preparer, not the chart components.- Do not add or widen ESLint disable comments or config overrideswithout explicit user approval for the exact rule and scope.- Always quote file paths in shell commands, or use `noglob` for path-heavy@@ -156,11 +138,16 @@ regenerated outputs. Never hand-edit `generated/**`.- `.agents/AGENTS.md` is the canonical root guide.- Root `AGENTS.md` is a symlink to `.agents/AGENTS.md`.- Root `CLAUDE.md` is a compatibility symlink to `AGENTS.md`.+- After changing skills / AGENTS.md, run `pnpm run agents:sync` and+ `pnpm run agents:check`.+- **Write agent guidance only in `AGENTS.md`, never in a `CLAUDE.md`.** Every+ `AGENTS.md` in the tree gets a generated sibling `CLAUDE.md` symlink when running+ `pnpm run agents:sync`.+- Put package-local guidance in the narrowest `AGENTS.md` that owns it so that it's only+ loaded into context when needed.- When creating or editing `.agents/skills/**`, use`.agents/skills/skill-creator/SKILL.md`; keep skills concise withprogressive disclosure.-- After changing shared agent setup, run `pnpm run agents:sync` and- `pnpm run agents:check`.- Generated provider config and shim outputs under `.claude/`, `.cursor/`,`.codex/`, `.vscode/`, or `.mcp.json` are local artifacts, not source oftruth files.diff --git a/.agents/README.md b/.agents/README.mdindex 37732263a1..327b357934 100644--- a/.agents/README.md+++ b/.agents/README.md@@ -107,14 +107,41 @@ Generated local artifacts:- `.codex/config.toml`- `.codex/environments/environment.toml`-The repo root discovery files remain committed as symlinks:+Discovery files are committed as symlinks, not generated locally, so a fresh+clone has guidance before `pnpm install` runs:- `AGENTS.md` -> `.agents/AGENTS.md`- `CLAUDE.md` -> `AGENTS.md`+- a sibling `CLAUDE.md` -> `AGENTS.md` next to **every** `AGENTS.md` in the+ tree, discovered by walking it (currently `web/`, `worker/`, `ee/`,+ `packages/shared/`, `packages/shared/scripts/seeder/`)++Claude reads a nested `CLAUDE.md` when it opens a file in that directory, so+package-local guidance loads only when it is relevant. Dot-directories are+skipped during discovery, which keeps vendored skill bundles such as+`web/.agents/skills/vercel-*/AGENTS.md` from becoming directory-scoped+instructions. A shim whose `AGENTS.md` is deleted or moved is swept on the next+sync. Add an `AGENTS.md` anywhere and you must commit its generated shim β+CI fails otherwise.This keeps provider discovery stable while `.agents/` remains the source oftruth.+## Validation++Two levels, deliberately separated:++- `node scripts/agents/sync-agent-shims.mjs --check` verifies the generated+ config files and shims. This is what `postinstall` runs.+- `pnpm run agents:check` adds `--check-paths`, which resolves every path an+ `AGENTS.md` cites and fails on a broken one. The lint job runs this.++Path validation is kept out of `postinstall` on purpose: failing it there would+break `pnpm i`, and with it every CI job that installs, over a documentation+typo. References that escape upward (`../langfuse-docs/**`) are reported only+when they resolve, since a standalone clone legitimately lacks sibling+checkouts.+## When To Edit `config.json`Edit `.agents/config.json` when you need to:@@ -190,7 +217,8 @@ After editing `.agents/config.json`:4. Update `AGENTS.md` or `CONTRIBUTING.md` if the shared workflow materiallychanged-`pnpm install` also runs the sync/check flow via `postinstall`.+`pnpm install` also runs the sync and the shim check via `postinstall`. It does+not run path validation β see [Validation](#validation).## Adding Shared Skillsdiff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.ymlindex 14391d4cb1..e1debec586 100644--- a/.github/workflows/pipeline.yml+++ b/.github/workflows/pipeline.yml@@ -140,6 +140,21 @@ jobs:- name: install dependenciesrun: |pnpm i+ # postinstall regenerates the shims, so a repairable drift is silently+ # fixed in the working tree rather than reported. Fail if that repair+ # changed anything tracked or produced a missing shim, so the committed+ # state has to be correct.+ - name: agent shims are committed and current+ run: |+ if [[ -n "$(git status --porcelain)" ]]; then+ echo "::error::Agent shims are stale. Run 'pnpm run agents:sync' and commit the result."+ git status --porcelain+ exit 1+ fi+ # postinstall runs shim verification only; this is where the paths cited+ # by every AGENTS.md are resolved.+ - name: agent guidance paths resolve+ run: pnpm run agents:check- name: Load default envrun: |cp .env.dev.example .envdiff --git a/ee/AGENTS.md b/ee/AGENTS.mdindex 393627ba2c..8ed25c0cd2 100644--- a/ee/AGENTS.md+++ b/ee/AGENTS.md@@ -1,26 +1,23 @@-# Codex Guidelines for `ee`--This file covers package-local guidance for this package.-Use root [AGENTS.md](../AGENTS.md) for monorepo-level rules.+# Agent Guidelines for `ee`## Purpose+- Enterprise Edition package consumed by `web` and `worker`.- Contains EE-specific logic and licensing-related integrations.## Maintenance Contract-- `AGENTS.md` is a living document.-- Update this file in the same PR when material EE package changes happen:- - new/renamed EE entry points- - changed EE build/typecheck/lint commands- - changed integration contracts consumed by `web` or `worker`-- If the change impacts monorepo workflows, update root `AGENTS.md` too.++- Update this file in the same PR when entry points, commands, or contracts+ change.## High-Signal Entry Points+- Package root exports: `src/index.ts`- License check module: `src/ee-license-check/index.ts`- Environment parsing: `src/env.ts`## Quick Commands+- Dev watch build: `pnpm --filter @langfuse/ee run dev`- Lint: `pnpm --filter @langfuse/ee run lint`- Lint fix: `pnpm --filter @langfuse/ee run lint:fix`@@ -28,10 +25,12 @@ Use root [AGENTS.md](../AGENTS.md) for monorepo-level rules.- Build: `pnpm --filter @langfuse/ee run build`## Integration Notes+- `ee` depends on `@langfuse/shared`; coordinate shared type changes carefully.- Validate downstream usage in `../web/src/ee/*` and `../worker/src/ee/*` when EEexports change.## Package-Specific Rules+- Do not hand-edit `dist/*`.- Keep EE-only concerns isolated from OSS package code paths.diff --git a/ee/CLAUDE.md b/ee/CLAUDE.mdnew file mode 120000index 0000000000..47dc3e3d86--- /dev/null+++ b/ee/CLAUDE.md@@ -0,0 +1 @@+AGENTS.md\ No newline at end of filediff --git a/package.json b/package.jsonindex ef6baf574e..7566edc0ef 100644--- a/package.json+++ b/package.json@@ -8,7 +8,7 @@"node": "24"},"scripts": {- "agents:check": "node scripts/agents/sync-agent-shims.mjs --check",+ "agents:check": "node scripts/agents/sync-agent-shims.mjs --check --check-paths","agents:sync": "node scripts/agents/sync-agent-shims.mjs","postinstall": "node -e \"const fs = require('node:fs'); const cp = require('node:child_process'); if (!fs.existsSync('scripts/postinstall.sh')) { console.log('Skipping repo postinstall helper: scripts/postinstall.sh is not present in this install context.'); process.exit(0); } cp.execSync('bash scripts/postinstall.sh', { stdio: 'inherit' });\"","preinstall": "npx only-allow pnpm",diff --git a/packages/shared/AGENTS.md b/packages/shared/AGENTS.mdindex 21e095d548..8002ab6a06 100644--- a/packages/shared/AGENTS.md+++ b/packages/shared/AGENTS.md@@ -1,7 +1,4 @@-# Codex Guidelines for `@langfuse/shared`--This file covers package-local guidance for this package.-Use root [AGENTS.md](../../AGENTS.md) for monorepo-level rules.+# Agent Guidelines for `@langfuse/shared`## Purpose@@ -12,13 +9,9 @@ Use root [AGENTS.md](../../AGENTS.md) for monorepo-level rules.## Maintenance Contract-- `AGENTS.md` is a living document.-- Update this file in the same PR for material shared-package changes:- - new/renamed schema or migration workflows- - new/renamed queue contracts- - changed exported surfaces or validation commands-- Because this package is consumed by both `web` and `worker`, cross-package- changes usually require updates in root `AGENTS.md` too.+- Update this file in the same PR when entry points, commands, or contracts+ change. Because both `web` and `worker` consume this package, exported-surface+ changes usually need their `AGENTS.md` too.## High-Signal Entry Pointsdiff --git a/packages/shared/CLAUDE.md b/packages/shared/CLAUDE.mdnew file mode 120000index 0000000000..47dc3e3d86--- /dev/null+++ b/packages/shared/CLAUDE.md@@ -0,0 +1 @@+AGENTS.md\ No newline at end of filediff --git a/packages/shared/scripts/seeder/CLAUDE.md b/packages/shared/scripts/seeder/CLAUDE.mdnew file mode 120000index 0000000000..47dc3e3d86--- /dev/null+++ b/packages/shared/scripts/seeder/CLAUDE.md@@ -0,0 +1 @@+AGENTS.md\ No newline at end of filediff --git a/scripts/agents/sync-agent-shims.mjs b/scripts/agents/sync-agent-shims.mjsindex 927ec2110f..948bf09d78 100644--- a/scripts/agents/sync-agent-shims.mjs+++ b/scripts/agents/sync-agent-shims.mjs@@ -17,6 +17,11 @@ const sourcePath = resolve(repoRoot, ".agents/config.json");const config = JSON.parse(readFileSync(sourcePath, "utf8"));const servers = config.mcpServers;const checkMode = process.argv.includes("--check");+// Path validation is a lint concern, not an install concern. `postinstall` runs+// this script without the flag so a stale doc path cannot fail `pnpm i` (and+// with it every CI job that installs); the lint job opts in via+// `pnpm run agents:check`.+const checkPaths = process.argv.includes("--check-paths");const sortObject = (value) =>Object.fromEntries(@@ -99,7 +104,9 @@ const formatCodexToml = () => {}if (server.env) {lines.push(`[mcp_servers.${name}.env]`);- for (const [envName, envValue] of Object.entries(sortObject(server.env))) {+ for (const [envName, envValue] of Object.entries(+ sortObject(server.env),+ )) {lines.push(`${envName} = ${JSON.stringify(envValue)}`);}}@@ -110,7 +117,9 @@ const formatCodexToml = () => {for (const [headerName, headerValue] of Object.entries(sortObject(server.headers),)) {- lines.push(`${JSON.stringify(headerName)} = ${JSON.stringify(headerValue)}`);+ lines.push(+ `${JSON.stringify(headerName)} = ${JSON.stringify(headerValue)}`,+ );}}}@@ -192,11 +201,57 @@ const skillsRoot = resolve(repoRoot, ".agents/skills");const sharedSkillNames = readdirSync(skillsRoot, { withFileTypes: true }).filter((entry) =>- entry.isDirectory() && existsSync(resolve(skillsRoot, entry.name, "SKILL.md")),+ entry.isDirectory() &&+ existsSync(resolve(skillsRoot, entry.name, "SKILL.md")),).map((entry) => entry.name).sort((left, right) => left.localeCompare(right));+// Directory names never worth walking into when discovering package-local+// `AGENTS.md` files. Dot-directories are skipped separately, which also keeps+// vendored skill bundles (for example `web/.agents/skills/*/AGENTS.md`) from+// being treated as directory-scoped instructions.+const ignoredDirectoryNames = new Set([+ "node_modules",+ "dist",+ "build",+ "generated",+ "skills",+]);++const findDirectoriesWithAgentsFile = (startDirectory) => {+ const directories = [];++ const walk = (directory) => {+ for (const entry of readdirSync(directory, { withFileTypes: true })) {+ if (!entry.isDirectory() || entry.isSymbolicLink()) {+ continue;+ }++ if (entry.name.startsWith(".") || ignoredDirectoryNames.has(entry.name)) {+ continue;+ }++ const child = resolve(directory, entry.name);++ if (existsSync(resolve(child, "AGENTS.md"))) {+ directories.push(child);+ }++ walk(child);+ }+ };++ walk(startDirectory);++ return directories.sort((left, right) => left.localeCompare(right));+};++// Every `AGENTS.md` below the repo root gets a sibling `CLAUDE.md` symlink so+// Claude picks up package-local guidance when it reads a file in that+// directory. The repo root is handled explicitly above.+const packageAgentsDirectories = findDirectoriesWithAgentsFile(repoRoot);+const symlinkOutputs = [{path: resolve(repoRoot, "AGENTS.md"),@@ -206,12 +261,70 @@ const symlinkOutputs = [path: resolve(repoRoot, "CLAUDE.md"),target: resolve(repoRoot, "AGENTS.md"),},+ ...packageAgentsDirectories.map((directory) => ({+ path: resolve(directory, "CLAUDE.md"),+ target: resolve(directory, "AGENTS.md"),+ })),...sharedSkillNames.map((name) => ({path: resolve(repoRoot, ".claude/skills", name),target: resolve(skillsRoot, name),})),];+const expectedClaudeShims = new Set(+ symlinkOutputs+ .filter((output) => output.path.endsWith("CLAUDE.md"))+ .map((output) => output.path),+);++// A `CLAUDE.md` symlink whose `AGENTS.md` was deleted or moved would otherwise+// linger and keep feeding stale guidance into context. Hand-written regular+// `CLAUDE.md` files are left alone; only generated symlinks are swept.+const isSymbolicLink = (path) => {+ try {+ return lstatSync(path).isSymbolicLink();+ } catch (error) {+ if (+ error &&+ typeof error === "object" &&+ "code" in error &&+ error.code === "ENOENT"+ ) {+ return false;+ }++ throw error;+ }+};++const findStaleClaudeShims = (startDirectory) => {+ const stale = [];++ const visit = (directory) => {+ const candidate = resolve(directory, "CLAUDE.md");++ if (!expectedClaudeShims.has(candidate) && isSymbolicLink(candidate)) {+ stale.push(candidate);+ }++ for (const entry of readdirSync(directory, { withFileTypes: true })) {+ if (!entry.isDirectory() || entry.isSymbolicLink()) {+ continue;+ }++ if (entry.name.startsWith(".") || ignoredDirectoryNames.has(entry.name)) {+ continue;+ }++ visit(resolve(directory, entry.name));+ }+ };++ visit(startDirectory);++ return stale;+};+const managedDirectoryEntries = [{path: resolve(repoRoot, ".claude/skills"),@@ -219,6 +332,108 @@ const managedDirectoryEntries = [},];+// Agent guidance rots silently: a file gets moved and the instructions keep+// pointing at the old path, which is worse than no pointer at all. These checks+// resolve every concrete path an `AGENTS.md` cites.+const markdownLinkPattern = /\[[^\]]*\]\(([^)]+)\)/g;+const backtickedPathPattern =+ /`([A-Za-z0-9_./-]+\.(?:ts|tsx|js|jsx|mjs|json|prisma|sql|md|mdx|css|yaml|yml))`/g;+const placeholderPattern = /[*{}[\]<>?]/;++const collectReferencedPaths = (filePath, contents) => {+ const fileDirectory = dirname(filePath);+ const references = [];++ for (const [, target] of contents.matchAll(markdownLinkPattern)) {+ const cleaned = target.split("#")[0].trim();++ if (+ !cleaned ||+ cleaned.startsWith("http://") ||+ cleaned.startsWith("https://") ||+ cleaned.startsWith("mailto:") ||+ placeholderPattern.test(cleaned)+ ) {+ continue;+ }++ references.push({+ raw: target,+ escapesUpward: cleaned.startsWith("../"),+ candidates: [resolve(fileDirectory, cleaned)],+ });+ }++ for (const [, target] of contents.matchAll(backtickedPathPattern)) {+ if (placeholderPattern.test(target) || !target.includes("/")) {+ continue;+ }++ // Backticked paths are written either repo-relative or package-relative,+ // and both conventions are in use. Accept whichever resolves.+ references.push({+ raw: target,+ escapesUpward: target.startsWith("../"),+ candidates: [resolve(repoRoot, target), resolve(fileDirectory, target)],+ });+ }++ return references;+};++// True when `candidate` sits under a top-level repo directory that exists, so+// a missing file below it is rot rather than an unfetched sibling checkout.+const isInsideRepoDirectory = (candidate) => {+ const relativePath = relative(repoRoot, candidate);++ if (!relativePath || relativePath.startsWith("..")) {+ return false;+ }++ const [topLevel] = relativePath.split("/");++ return existsSync(resolve(repoRoot, topLevel));+};++const findBrokenReferences = () => {+ const broken = [];+ const guidanceFiles = [+ resolve(repoRoot, ".agents/AGENTS.md"),+ ...packageAgentsDirectories.map((directory) =>+ resolve(directory, "AGENTS.md"),+ ),+ ];++ for (const filePath of guidanceFiles) {+ const contents = readFileSync(filePath, "utf8");++ for (const reference of collectReferencedPaths(filePath, contents)) {+ if (reference.candidates.some((candidate) => existsSync(candidate))) {+ continue;+ }++ // A `../`-relative reference is reported only when it resolves, because+ // it usually points at a sibling checkout (`../langfuse-docs/**`) that a+ // standalone clone legitimately lacks.+ if (reference.escapesUpward) {+ continue;+ }++ // Otherwise police anything landing under a top-level directory that+ // exists. Testing the immediate parent instead would miss a path whose+ // entire directory was renamed or removed, which is exactly the rot+ // worth catching.+ if (!reference.candidates.some(isInsideRepoDirectory)) {+ continue;+ }++ broken.push({ filePath, raw: reference.raw });+ }+ }++ return broken;+};+const isMatchingSymlink = (path, target) => {const stats = lstatSync(path);if (!stats.isSymbolicLink()) {@@ -252,7 +467,12 @@ for (const output of fileOutputs) {continue;}- if (error && typeof error === "object" && "code" in error && error.code === "ENOENT") {+ if (+ error &&+ typeof error === "object" &&+ "code" in error &&+ error.code === "ENOENT"+ ) {hasMismatch = true;console.error(`Missing generated config: ${output.path}. Run "pnpm run agents:sync".`,@@ -287,9 +507,16 @@ for (const output of symlinkOutputs) {console.error(`Out of sync symlink: ${output.path}`);}} catch (error) {- if (error && typeof error === "object" && "code" in error && error.code === "ENOENT") {+ if (+ error &&+ typeof error === "object" &&+ "code" in error &&+ error.code === "ENOENT"+ ) {hasMismatch = true;- console.error(`Missing symlink shim: ${output.path}. Run "pnpm run agents:sync".`);+ console.error(+ `Missing symlink shim: ${output.path}. Run "pnpm run agents:sync".`,+ );continue;}@@ -306,7 +533,14 @@ for (const output of symlinkOutputs) {continue;}} catch (error) {- if (!(error && typeof error === "object" && "code" in error && error.code === "ENOENT")) {+ if (+ !(+ error &&+ typeof error === "object" &&+ "code" in error &&+ error.code === "ENOENT"+ )+ ) {throw error;}}@@ -320,6 +554,19 @@ for (const output of symlinkOutputs) {console.log(`Linked ${output.path}`);}+for (const staleShim of findStaleClaudeShims(repoRoot)) {+ if (checkMode) {+ hasMismatch = true;+ console.error(+ `Stale CLAUDE.md shim: ${staleShim}. Run "pnpm run agents:sync".`,+ );+ continue;+ }++ rmSync(staleShim, { force: true });+ console.log(`Removed stale CLAUDE.md shim ${staleShim}`);+}+for (const directory of managedDirectoryEntries) {const unexpectedChildren = findUnexpectedChildren(directory);@@ -330,7 +577,9 @@ for (const directory of managedDirectoryEntries) {if (checkMode) {hasMismatch = true;for (const child of unexpectedChildren) {- console.error(`Unexpected generated shim: ${resolve(directory.path, child)}`);+ console.error(+ `Unexpected generated shim: ${resolve(directory.path, child)}`,+ );}continue;}@@ -342,6 +591,15 @@ for (const directory of managedDirectoryEntries) {}}-if (checkMode && hasMismatch) {+if (checkPaths) {+ for (const { filePath, raw } of findBrokenReferences()) {+ hasMismatch = true;+ console.error(+ `Broken path reference in ${relative(repoRoot, filePath)}: ${raw} does not exist.`,+ );+ }+}++if (hasMismatch) {process.exitCode = 1;}diff --git a/scripts/postinstall.sh b/scripts/postinstall.shindex 083f2018cb..0fffb60121 100644--- a/scripts/postinstall.sh+++ b/scripts/postinstall.sh@@ -18,4 +18,9 @@ if [[ ! -f "scripts/agents/sync-agent-shims.mjs" || ! -f ".agents/config.json" ]fipnpm run agents:sync-pnpm run agents:check++# Verify the shims only. Deliberately not `pnpm run agents:check`, which also+# validates that every path cited by an `AGENTS.md` resolves: that is a lint+# concern, and failing it here would break `pnpm i` and with it every CI job+# that installs. The lint job runs the full check.+node scripts/agents/sync-agent-shims.mjs --checkdiff --git a/web/AGENTS.md b/web/AGENTS.mdindex 606796cac5..f97d469f22 100644--- a/web/AGENTS.md+++ b/web/AGENTS.md@@ -1,7 +1,4 @@-# Codex Guidelines for `web`--This file covers package-local guidance for this package.-Use root [AGENTS.md](../AGENTS.md) for monorepo-level rules.+# Agent Guidelines for `web`## Purpose@@ -12,13 +9,8 @@ Use root [AGENTS.md](../AGENTS.md) for monorepo-level rules.## Maintenance Contract-- `AGENTS.md` is a living document.-- Update this file in the same PR when material web-local changes occur:- - new/renamed web entry points- - new API route families- - changed web-specific verification commands-- If the change also affects monorepo workflows or other packages, update root- `AGENTS.md` too.+- Update this file in the same PR when entry points, commands, or contracts+ change.## High-Signal Entry Points@@ -103,11 +95,23 @@ Sentry instrumentation skill first and decide whether it should capture at allmanifesto. It owns the data β preparer β visualiser contract: presentationdecisions (formatting, colors, axis scale, overload) live in the preparer,not the chart components.+- **When working on the search bar or any filtering UI/grammar, read+ `src/features/search-bar/README.md` first.** It owns the grammar β+ `FilterState` contract, the validate/lower parity invariants, and the+ cross-view extension playbook β the bar is intended to become the primary+ filter interface for every filterable view, so new filtering work extends it+ through that contract rather than forking it.+- When fixing an isolated styling issue in an individual component, create or+ update a component story first, following+ `../.agents/skills/storybook/SKILL.md`.- Put net-new feature code under `src/features/<feature>/*`; put broadly reusablecomponents under `src/components/*`.- We use tRPC for full-stack web features; register routers in`src/server/api/root.ts`.-- Authentication and RBAC guidance lives in `src/features/rbac/README.md`.+- RBAC lives in `src/features/rbac`: role definitions in+ `src/features/rbac/constants`, access checks in+ `src/features/rbac/utils/checkProjectAccess.ts` and+ `src/features/rbac/utils/checkOrganizationAccess.ts`.- Entitlements guidance lives in `src/features/entitlements/README.md`.- Prefer Shadcn/ui primitives from `src/components/ui`; if a missing componentmust be installed, ask the user before doing so.diff --git a/web/CLAUDE.md b/web/CLAUDE.mddeleted file mode 100644index 1d39c7336c..0000000000--- a/web/CLAUDE.md+++ /dev/null@@ -1,8 +0,0 @@-# CLAUDE.md--Claude Code should treat this file as the package entrypoint for `web/`.--Start here:-- Read @AGENTS.md for package-local guidance, shared package import rules, and- package-local skills.-- Then read @../AGENTS.md for monorepo-level rules.diff --git a/web/CLAUDE.md b/web/CLAUDE.mdnew file mode 120000index 0000000000..47dc3e3d86--- /dev/null+++ b/web/CLAUDE.md@@ -0,0 +1 @@+AGENTS.md\ No newline at end of filediff --git a/worker/AGENTS.md b/worker/AGENTS.mdindex 52a6499ff0..d638e0a769 100644--- a/worker/AGENTS.md+++ b/worker/AGENTS.md@@ -1,7 +1,4 @@-# Codex Guidelines for `worker`--This file covers package-local guidance for the worker.-Use root [AGENTS.md](../AGENTS.md) for monorepo-level rules.+# Agent Guidelines for `worker`## Purpose@@ -10,13 +7,9 @@ Use root [AGENTS.md](../AGENTS.md) for monorepo-level rules.## Maintenance Contract-- `AGENTS.md` is a living document.-- Update this file in the same PR for material worker-local changes:- - new/renamed queue processors- - new worker bootstrapping points- - changed worker verification commands-- If queue contracts or shared workflows change, update root `AGENTS.md` and- likely `../packages/shared/AGENTS.md` too.+- Update this file in the same PR when entry points, commands, or contracts+ change. Queue-contract changes usually need `../packages/shared/AGENTS.md`+ too.## High-Signal Entry Pointsdiff --git a/worker/CLAUDE.md b/worker/CLAUDE.mdnew file mode 120000index 0000000000..47dc3e3d86--- /dev/null+++ b/worker/CLAUDE.md@@ -0,0 +1 @@+AGENTS.md\ No newline at end of file