Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(agents): harden shared setup docs (#13548)

Max Deichmannbf6e490b9245
diff --git a/.agents/AGENTS.md b/.agents/AGENTS.md
index c3405f9ff6..5613c20075 100644
--- a/.agents/AGENTS.md
+++ b/.agents/AGENTS.md
@@ -11,7 +11,7 @@ evaluating, and debugging AI applications.
- `AGENTS.md` is a living document.
- Keep this file concise and router-like. Push narrow or conditional workflows
- into package-local `AGENTS.md` files or shared skills under `skills/`.
+ into package-local `AGENTS.md` files or shared skills under `.agents/skills/`.
- Update this file in the same PR when monorepo-level architecture, workflows,
dependency boundaries, mandatory verification commands, or release/security
processes materially change.
@@ -24,44 +24,44 @@ evaluating, and debugging AI applications.
## Start Here By Task
- Repo-wide agent setup, `.agents/**`, provider shims, or MCP/bootstrap config:
- [`README.md`](README.md),
- [`skills/agent-setup-maintenance/SKILL.md`](skills/agent-setup-maintenance/SKILL.md)
+ `.agents/README.md`,
+ `.agents/skills/agent-setup-maintenance/SKILL.md`
- Backend/API work in `web/src/server/**`, `web/src/pages/api/public/**`,
`worker/src/**`, or `packages/shared/src/**`:
- [`skills/backend-dev-guidelines/SKILL.md`](skills/backend-dev-guidelines/SKILL.md)
+ `.agents/skills/backend-dev-guidelines/SKILL.md`
- Model pricing work in `worker/src/constants/default-model-prices.json`,
`packages/shared/src/server/llm/types.ts`, or related pricing files:
- [`skills/add-model-price/SKILL.md`](skills/add-model-price/SKILL.md)
+ `.agents/skills/add-model-price/SKILL.md`
- Code review tasks:
- [`skills/code-review/SKILL.md`](skills/code-review/SKILL.md)
+ `.agents/skills/code-review/SKILL.md`
- Debugging a Linear issue, GitHub issue, or incident report using Datadog
(APM, logs, metrics) to establish a root cause:
- [`skills/debug-issue-with-datadog/SKILL.md`](skills/debug-issue-with-datadog/SKILL.md)
+ `.agents/skills/debug-issue-with-datadog/SKILL.md`
- Measured bug or regression evidence that needs Linear deduplication, evidence
comments, or Triage bug issue creation:
- [`skills/linear-bug-triage/SKILL.md`](skills/linear-bug-triage/SKILL.md)
+ `.agents/skills/linear-bug-triage/SKILL.md`
- Proactive production regression sweeps across Datadog errors, logs, spans, and
API latency with Linear handoff:
- [`skills/detect-prod-regressions/SKILL.md`](skills/detect-prod-regressions/SKILL.md)
+ `.agents/skills/detect-prod-regressions/SKILL.md`
- Changelog drafting for completed feature branches:
- [`skills/changelog-writing/SKILL.md`](skills/changelog-writing/SKILL.md)
+ `.agents/skills/changelog-writing/SKILL.md`
- ClickHouse schema/query review:
- [`skills/clickhouse-best-practices/SKILL.md`](skills/clickhouse-best-practices/SKILL.md)
+ `.agents/skills/clickhouse-best-practices/SKILL.md`
- Monorepo/Turbo task graph changes:
- [`skills/turborepo/SKILL.md`](skills/turborepo/SKILL.md)
+ `.agents/skills/turborepo/SKILL.md`
- pnpm dependency upgrades, package-version bumps, or `minimumReleaseAgeExclude`
decisions in `pnpm-workspace.yaml`:
- [`skills/pnpm-upgrade-package/SKILL.md`](skills/pnpm-upgrade-package/SKILL.md)
+ `.agents/skills/pnpm-upgrade-package/SKILL.md`
- User-visible frontend changes, Playwright review, or browser signoff:
- [`skills/frontend-browser-review/SKILL.md`](skills/frontend-browser-review/SKILL.md)
+ `.agents/skills/frontend-browser-review/SKILL.md`
- Web UI and frontend entry points:
- `../web/AGENTS.md`
+ `web/AGENTS.md`
- Worker queues and processors:
- `../worker/AGENTS.md`
+ `worker/AGENTS.md`
- Shared contracts, exports, schema, and migrations:
- `../packages/shared/AGENTS.md`
+ `packages/shared/AGENTS.md`
- EE-only work:
- `../ee/AGENTS.md`
+ `ee/AGENTS.md`
Read the minimal set required for the task. More-specific package guides and
shared skills take precedence over this root file for their scoped areas.
@@ -93,7 +93,7 @@ langfuse/
`packages/shared/clickhouse/migrations/{clustered,unclustered}/*.sql`
- Architecture handbook:
[langfuse.com/handbook/product-engineering/architecture](https://langfuse.com/handbook/product-engineering/architecture)
- with source markdown in
+ with source markdown in the sibling docs checkout at
`../langfuse-docs/content/handbook/product-engineering/architecture.mdx`
## Core Commands
@@ -141,7 +141,7 @@ Minimum verification matrix:
bug.
- For user-visible frontend changes in `web/**`, review the affected flow in a
real browser with the Playwright MCP server before signoff. Use
- `skills/frontend-browser-review/SKILL.md` and `../web/AGENTS.md` for the
+ `.agents/skills/frontend-browser-review/SKILL.md` and `web/AGENTS.md` for the
browser-review loop.
- Never commit secrets or credentials. Keep `.env*.example` files in sync with
required env vars.
@@ -151,19 +151,19 @@ Minimum verification matrix:
- `.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`.
-- Shared agent/tool config lives in `config.json` and shared skills live in
- `skills/`.
+- Shared agent/tool config lives in `.agents/config.json` and shared skills
+ live in `.agents/skills/`.
- Project-scoped provider discovery files are generated local artifacts. Edit
the canonical files under `.agents/` instead of editing generated tool
directories by hand.
-- If you change `.agents/config.json`, `skills/**`, or the shim-generation
- workflow, run:
+- If you change `.agents/config.json`, `.agents/skills/**`, or the
+ shim-generation workflow, run:
- `pnpm run agents:sync`
- `pnpm run agents:check`
- Do not commit generated provider config or shim outputs under `.claude/`,
`.cursor/`, `.codex/`, `.vscode/`, or `.mcp.json`.
- Durable cross-tool guidance belongs in root/package `AGENTS.md` files or
- `skills/**`, not only in tool-specific config directories.
+ `.agents/skills/**`, not only in tool-specific config directories.
## Commit, PR, and Release Rules
diff --git a/.agents/README.md b/.agents/README.md
index 0746072308..0fc1307574 100644
--- a/.agents/README.md
+++ b/.agents/README.md
@@ -38,15 +38,42 @@ Current shape:
"playwright": {
"transport": "stdio",
"command": "npx",
- "args": ["-y", "@playwright/mcp@latest"]
+ "args": [
+ "-y",
+ "@playwright/mcp@latest",
+ "--isolated",
+ "--save-trace",
+ "--output-dir",
+ ".playwright-mcp",
+ "--test-id-attribute",
+ "data-testid"
+ ]
},
- "datadog": {
+ "langfuse-docs": {
"transport": "http",
- "url": "https://mcp.datadoghq.com/api/unstable/mcp-server/mcp"
+ "url": "https://langfuse.com/api/mcp"
+ },
+ "linear": {
+ "transport": "http",
+ "url": "https://mcp.linear.app/mcp"
}
},
"claude": {
- "settings": {}
+ "settings": {
+ "permissions": {
+ "allow": [
+ "Bash(find:*)",
+ "Bash(rg:*)",
+ "Bash(grep:*)",
+ "Bash(ls:*)",
+ "Bash(cat:*)",
+ "Bash(head:*)",
+ "Bash(tail:*)"
+ ],
+ "deny": []
+ },
+ "enableAllProjectMcpServers": true
+ }
},
"codex": {
"environment": {
diff --git a/.agents/skills/README.md b/.agents/skills/README.md
index d15cc02dff..d985c70b1b 100644
--- a/.agents/skills/README.md
+++ b/.agents/skills/README.md
@@ -99,6 +99,24 @@ Use for:
Open: [changelog-writing/SKILL.md](changelog-writing/SKILL.md)
+### clickhouse-best-practices
+
+Use for:
+- ClickHouse schema, query, or configuration review
+- ClickHouse migrations under `packages/shared/clickhouse/**`
+- applying the repo-specific ClickHouse rules layered on top of upstream best practices
+
+Open: [clickhouse-best-practices/SKILL.md](clickhouse-best-practices/SKILL.md)
+
+### debug-issue-with-datadog
+
+Use for:
+- root-causing Linear, GitHub, or incident reports with Datadog evidence
+- production debugging across APM spans, logs, metrics, and monitors
+- mapping observed error clusters back to Langfuse code paths
+
+Open: [debug-issue-with-datadog/SKILL.md](debug-issue-with-datadog/SKILL.md)
+
### pnpm-upgrade-package
Use for:
@@ -110,6 +128,15 @@ Use for:
Open: [pnpm-upgrade-package/SKILL.md](pnpm-upgrade-package/SKILL.md)
+### turborepo
+
+Use for:
+- `turbo.json` task graph, caching, filtering, or affected-run changes
+- root/package script organization for Turborepo workflows
+- monorepo package boundaries and shared-code layout decisions
+
+Open: [turborepo/SKILL.md](turborepo/SKILL.md)
+
## Adding a New Shared Skill
1. Codex may create or refine shared skills under `.agents/skills/` when a
diff --git a/scripts/postinstall.sh b/scripts/postinstall.sh
index e67cbce54e..083f2018cb 100644
--- a/scripts/postinstall.sh
+++ b/scripts/postinstall.sh
@@ -10,9 +10,10 @@ set -euo pipefail
#
# Root `postinstall` still runs during that pruned install step, but generating
# agent shims is only useful in a full repo checkout. Skip cleanly when the
-# shared agent sync script is not available so Docker builds can continue.
-if [[ ! -f "scripts/agents/sync-agent-shims.mjs" ]]; then
- echo "Skipping agent shim sync: scripts/agents/sync-agent-shims.mjs is not present in this install context."
+# shared agent sync script or config is not available so Docker builds can
+# continue.
+if [[ ! -f "scripts/agents/sync-agent-shims.mjs" || ! -f ".agents/config.json" ]]; then
+ echo "Skipping agent shim sync: scripts/agents/sync-agent-shims.mjs or .agents/config.json is not present in this install context."
exit 0
fi