Skip to content

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

chore(agents): use AGENTS.md directly for folder instructions (#17719)

Nikita Kabardin1357013dee16
diff --git a/.agents/AGENTS.md b/.agents/AGENTS.md
index 2b4abbbec3..c518b0d044 100644
--- a/.agents/AGENTS.md
+++ b/.agents/AGENTS.md
@@ -276,12 +276,10 @@ 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`.
+- **Write folder instructions directly in `AGENTS.md`.** Harnesses read these
+ files without provider-specific copies or compatibility symlinks.
- 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
diff --git a/.agents/README.md b/.agents/README.md
index b88562bf77..3c93d87646 100644
--- a/.agents/README.md
+++ b/.agents/README.md
@@ -124,25 +124,17 @@ to the repository. Generate it from `.agents/config.json`; never edit it by
hand. `.cursor/Dockerfile` is also committed because it is an intentionally
Cursor-specific runtime definition.
-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 of
-truth.
+Folder instructions use `AGENTS.md` directly. The root `AGENTS.md` is a
+committed symlink to `.agents/AGENTS.md`; package-local files live in the
+directories they describe. A fresh clone has its instructions before install,
+and adding a folder guide needs no generated companion file.
+
+Claude Code requires [2.1.277 or later](https://github.com/anthropics/claude-code/releases/tag/v2.1.277)
+with **Project instructions** set to the default `claude-md-or-agents-md`
+mode. That release does not support this mode on Bedrock, Vertex, or Foundry.
+Project-local `CLAUDE.md`, `.claude/CLAUDE.md`, or `CLAUDE.local.md` files can
+disable the fallback; remove local compatibility files or choose the mode
+that loads both formats. See the [instruction loader documentation](https://github.com/anthropics/claude-code/blob/main/mods/agents-md/README.md).
## Validation
@@ -152,6 +144,11 @@ Two levels, deliberately separated:
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.
+ Dot-directories, dependencies, build outputs, and skill bundles are excluded
+ from folder-guide discovery.
+
+Run `node --test scripts/agents/sync-agent-shims.test.mjs` for the sync and
+path-validation regression tests.
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
diff --git a/.agents/skills/agent-setup-maintenance/SKILL.md b/.agents/skills/agent-setup-maintenance/SKILL.md
index cffa70bfcc..7a5ba1947a 100644
--- a/.agents/skills/agent-setup-maintenance/SKILL.md
+++ b/.agents/skills/agent-setup-maintenance/SKILL.md
@@ -26,8 +26,8 @@ Use this skill when changing the shared agent setup for the repository.
## Workflow
1. Edit the canonical files under `.agents/`, not generated provider outputs.
-2. Keep root `AGENTS.md` and `CLAUDE.md` as discovery symlinks; do not turn
- them back into manually maintained copies.
+2. Keep root `AGENTS.md` as a symlink to `.agents/AGENTS.md`. Write folder
+ instructions in `AGENTS.md` directly; do not generate `CLAUDE.md` companions.
3. Treat tool-specific directories such as `.claude/`, `.cursor/`, `.codex/`,
`.vscode/`, and `.mcp.json` as generated discovery surfaces unless the tool
requires a truly tool-specific feature.
@@ -56,6 +56,7 @@ Run after changing shared agent setup:
- `pnpm run agents:sync`
- `pnpm run agents:check`
+- `node --test scripts/agents/sync-agent-shims.test.mjs` when sync behavior changes
Run additional verification when relevant:
diff --git a/.github/workflows/ci-runtime-analyst.lock.yml b/.github/workflows/ci-runtime-analyst.lock.yml
index 6abcdd32fe..d4893a9a63 100644
--- a/.github/workflows/ci-runtime-analyst.lock.yml
+++ b/.github/workflows/ci-runtime-analyst.lock.yml
@@ -1,4 +1,4 @@
-# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"c03d8d0fcf3af75b9c686b56520acb3e2fc5a78466b296e99abae682a346ea70","body_hash":"7de39e31204fa1e77b060a0547eb5316de35287442ec90e7ff45c58b87f515c9","compiler_version":"v0.86.2","agent_id":"claude","agent_model":"claude-opus-5","engine_versions":{"claude":"2.1.227"}}
+# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"43b54f1482a75b574f9930a7bdcc3398d164ce4b9649dd8282d9163c4ccd3a8b","body_hash":"7de39e31204fa1e77b060a0547eb5316de35287442ec90e7ff45c58b87f515c9","compiler_version":"v0.86.2","agent_id":"claude","agent_model":"claude-opus-5","engine_versions":{"claude":"2.1.277"}}
# gh-aw-manifest: {"version":1,"secrets":["CLAUDE_API_KEY","COPILOT_GITHUB_TOKEN","GH_AW_CI_ANALYST_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"3d3c42e5aac5ba805825da76410c181273ba90b1","version":"v7.0.1"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"820762786026740c76f36085b0efc47a31fe5020","version":"v7.0.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"6aab9e5b5c91c615506061f09bedd81a23babe3c","version":"v0.86.2"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.27.44","digest":"sha256:0d727725c737b58c7bdf51f640cffb928385ec46517e0917c7f1a02f1bada8b4","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.27.44@sha256:0d727725c737b58c7bdf51f640cffb928385ec46517e0917c7f1a02f1bada8b4"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.44","digest":"sha256:b50fbadba138f6e9aba94aca09711335c489bb3b15861220cb66f6092e042dc7","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.44@sha256:b50fbadba138f6e9aba94aca09711335c489bb3b15861220cb66f6092e042dc7"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.27.44","digest":"sha256:83e48bbe12c634be8c228a576832fe45f66c529ac3659db92bddbcf2eeb6d627","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.27.44@sha256:83e48bbe12c634be8c228a576832fe45f66c529ac3659db92bddbcf2eeb6d627"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.4.9","digest":"sha256:e5a1569aeaf41820fa7bdee3e94468cae448133cdbf00119ad24f5b74db1ab9f","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.4.9@sha256:e5a1569aeaf41820fa7bdee3e94468cae448133cdbf00119ad24f5b74db1ab9f"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:0d9f1fb5fd6610c0ac1f5194a38e45a8a1e81f8a390d5142d8e4e6f26a4b3196","pinned_image":"ghcr.io/github/gh-aw-node@sha256:0d9f1fb5fd6610c0ac1f5194a38e45a8a1e81f8a390d5142d8e4e6f26a4b3196"},{"image":"ghcr.io/github/github-mcp-server:v1.9.0","digest":"sha256:881b53d6f75f69bdbc1b5b10fc2f1361717c19054143b3a8529fb5c32061a50e","pinned_image":"ghcr.io/github/github-mcp-server:v1.9.0@sha256:881b53d6f75f69bdbc1b5b10fc2f1361717c19054143b3a8529fb5c32061a50e"}]}
# This file was automatically generated by gh-aw (v0.86.2). DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md
#
@@ -106,7 +106,7 @@ jobs:
env:
GH_AW_SETUP_WORKFLOW_NAME: "Weekly CI runtime analyst"
GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/ci-runtime-analyst.lock.yml@${{ github.ref }}
- GH_AW_INFO_VERSION: "2.1.227"
+ GH_AW_INFO_VERSION: "2.1.277"
GH_AW_INFO_AWF_VERSION: "v0.27.44"
GH_AW_INFO_ENGINE_ID: "claude"
- name: Generate agentic run info
@@ -115,8 +115,8 @@ jobs:
GH_AW_INFO_ENGINE_ID: "claude"
GH_AW_INFO_ENGINE_NAME: "Claude Code"
GH_AW_INFO_MODEL: "claude-opus-5"
- GH_AW_INFO_VERSION: "2.1.227"
- GH_AW_INFO_AGENT_VERSION: "2.1.227"
+ GH_AW_INFO_VERSION: "2.1.277"
+ GH_AW_INFO_AGENT_VERSION: "2.1.277"
GH_AW_INFO_CLI_VERSION: "v0.86.2"
GH_AW_INFO_WORKFLOW_NAME: "Weekly CI runtime analyst"
GH_AW_INFO_EXPERIMENTAL: "false"
@@ -372,6 +372,7 @@ jobs:
GH_AW_ASSETS_ALLOWED_EXTS: ""
GH_AW_ASSETS_BRANCH: ""
GH_AW_ASSETS_MAX_SIZE_KB: 0
+ GH_AW_ENGINE_VERSION: "2.1.277"
GH_AW_MCP_LOG_DIR: /tmp/gh-aw/mcp-logs/safeoutputs
GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
GH_AW_WORKFLOW_ID_SANITIZED: ciruntimeanalyst
@@ -410,7 +411,7 @@ jobs:
env:
GH_AW_SETUP_WORKFLOW_NAME: "Weekly CI runtime analyst"
GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/ci-runtime-analyst.lock.yml@${{ github.ref }}
- GH_AW_INFO_VERSION: "2.1.227"
+ GH_AW_INFO_VERSION: "2.1.277"
GH_AW_INFO_AWF_VERSION: "v0.27.44"
GH_AW_INFO_ENGINE_ID: "claude"
- name: Set runtime paths
@@ -475,7 +476,7 @@ jobs:
- name: Install AWF binary
run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.27.44 --rootless
- name: Install Claude Code CLI
- run: npm install -g @anthropic-ai/[email protected]
+ run: npm install -g @anthropic-ai/[email protected]
- name: Determine automatic lockdown mode for GitHub MCP Server
id: determine-automatic-lockdown
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 (source v9)
@@ -1110,7 +1111,7 @@ jobs:
env:
GH_AW_SETUP_WORKFLOW_NAME: "Weekly CI runtime analyst"
GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/ci-runtime-analyst.lock.yml@${{ github.ref }}
- GH_AW_INFO_VERSION: "2.1.227"
+ GH_AW_INFO_VERSION: "2.1.277"
GH_AW_INFO_AWF_VERSION: "v0.27.44"
GH_AW_INFO_ENGINE_ID: "claude"
- name: Download agent output artifact
@@ -1362,7 +1363,7 @@ jobs:
env:
GH_AW_SETUP_WORKFLOW_NAME: "Weekly CI runtime analyst"
GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/ci-runtime-analyst.lock.yml@${{ github.ref }}
- GH_AW_INFO_VERSION: "2.1.227"
+ GH_AW_INFO_VERSION: "2.1.277"
GH_AW_INFO_AWF_VERSION: "v0.27.44"
GH_AW_INFO_ENGINE_ID: "claude"
- name: Download agent output artifact
@@ -1444,7 +1445,7 @@ jobs:
- name: Install AWF binary
run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.27.44
- name: Install Claude Code CLI
- run: npm install -g @anthropic-ai/[email protected]
+ run: npm install -g @anthropic-ai/[email protected]
- name: Execute Claude Code CLI
if: always() && steps.detection_guard.outputs.run_detection == 'true'
continue-on-error: true
@@ -1621,7 +1622,7 @@ jobs:
env:
GH_AW_SETUP_WORKFLOW_NAME: "Weekly CI runtime analyst"
GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/ci-runtime-analyst.lock.yml@${{ github.ref }}
- GH_AW_INFO_VERSION: "2.1.227"
+ GH_AW_INFO_VERSION: "2.1.277"
GH_AW_INFO_AWF_VERSION: "v0.27.44"
GH_AW_INFO_ENGINE_ID: "claude"
- name: Checkout repository
@@ -1685,6 +1686,7 @@ jobs:
GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens }}
GH_AW_ENGINE_ID: "claude"
GH_AW_ENGINE_MODEL: "claude-opus-5"
+ GH_AW_ENGINE_VERSION: "2.1.277"
GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
GH_AW_THREAT_DETECTION_AIC: ${{ needs.detection.outputs.aic }}
GH_AW_WORKFLOW_ID: "ci-runtime-analyst"
@@ -1719,7 +1721,7 @@ jobs:
env:
GH_AW_SETUP_WORKFLOW_NAME: "Weekly CI runtime analyst"
GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/ci-runtime-analyst.lock.yml@${{ github.ref }}
- GH_AW_INFO_VERSION: "2.1.227"
+ GH_AW_INFO_VERSION: "2.1.277"
GH_AW_INFO_AWF_VERSION: "v0.27.44"
GH_AW_INFO_ENGINE_ID: "claude"
- name: Download agent output artifact
diff --git a/.github/workflows/ci-runtime-analyst.md b/.github/workflows/ci-runtime-analyst.md
index ac110815e4..6bb947c257 100644
--- a/.github/workflows/ci-runtime-analyst.md
+++ b/.github/workflows/ci-runtime-analyst.md
@@ -29,6 +29,7 @@ model: claude-opus-5
engine:
id: claude
+ version: "2.1.277"
max-turns: 120
env:
ANTHROPIC_API_KEY: ${{ secrets.CLAUDE_API_KEY }}
diff --git a/.github/workflows/dependabot-security-maintainer.lock.yml b/.github/workflows/dependabot-security-maintainer.lock.yml
index ee0bfb1550..ecc1b7891f 100644
--- a/.github/workflows/dependabot-security-maintainer.lock.yml
+++ b/.github/workflows/dependabot-security-maintainer.lock.yml
@@ -1,4 +1,4 @@
-# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"345d3d47623ae702046b8adb73db81c30d36368ae7116fe7751bff62a1ddbe13","body_hash":"1bfa8a3708fecd4d99da392a80bcefd60fa2f6ea848d4cf5bc17b2d4292106d1","compiler_version":"v0.86.2","strict":true,"agent_id":"claude","agent_model":"claude-opus-5","engine_versions":{"claude":"2.1.227"}}
+# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"d12cd3d36a32367d2e254a90c02d17558ed7b27bb1546b2ef2642b94c7ba3186","body_hash":"1bfa8a3708fecd4d99da392a80bcefd60fa2f6ea848d4cf5bc17b2d4292106d1","compiler_version":"v0.86.2","strict":true,"agent_id":"claude","agent_model":"claude-opus-5","engine_versions":{"claude":"2.1.277"}}
# gh-aw-manifest: {"version":1,"secrets":["CLAUDE_API_KEY","COPILOT_GITHUB_TOKEN","GH_ACCESS_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GH_AW_LANGFUSE_OTLP_BASIC_AUTH","GITHUB_TOKEN"],"actions":[{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"3d3c42e5aac5ba805825da76410c181273ba90b1","version":"v7.0.1"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"820762786026740c76f36085b0efc47a31fe5020","version":"v7.0.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"6aab9e5b5c91c615506061f09bedd81a23babe3c","version":"v0.86.2"},{"repo":"pnpm/setup","sha":"703c52620218391530e48b9e8870d5c0082e1b9b","version":"v2.1.0"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.27.44","digest":"sha256:0d727725c737b58c7bdf51f640cffb928385ec46517e0917c7f1a02f1bada8b4","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.27.44@sha256:0d727725c737b58c7bdf51f640cffb928385ec46517e0917c7f1a02f1bada8b4"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.44","digest":"sha256:b50fbadba138f6e9aba94aca09711335c489bb3b15861220cb66f6092e042dc7","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.44@sha256:b50fbadba138f6e9aba94aca09711335c489bb3b15861220cb66f6092e042dc7"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.27.44","digest":"sha256:83e48bbe12c634be8c228a576832fe45f66c529ac3659db92bddbcf2eeb6d627","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.27.44@sha256:83e48bbe12c634be8c228a576832fe45f66c529ac3659db92bddbcf2eeb6d627"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.4.9","digest":"sha256:e5a1569aeaf41820fa7bdee3e94468cae448133cdbf00119ad24f5b74db1ab9f","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.4.9@sha256:e5a1569aeaf41820fa7bdee3e94468cae448133cdbf00119ad24f5b74db1ab9f"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:0d9f1fb5fd6610c0ac1f5194a38e45a8a1e81f8a390d5142d8e4e6f26a4b3196","pinned_image":"ghcr.io/github/gh-aw-node@sha256:0d9f1fb5fd6610c0ac1f5194a38e45a8a1e81f8a390d5142d8e4e6f26a4b3196"},{"image":"ghcr.io/github/github-mcp-server:v1.9.0","digest":"sha256:881b53d6f75f69bdbc1b5b10fc2f1361717c19054143b3a8529fb5c32061a50e","pinned_image":"ghcr.io/github/github-mcp-server:v1.9.0@sha256:881b53d6f75f69bdbc1b5b10fc2f1361717c19054143b3a8529fb5c32061a50e"}]}
# This file was automatically generated by gh-aw (v0.86.2). DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md
#
@@ -125,7 +125,7 @@ jobs:
env:
GH_AW_SETUP_WORKFLOW_NAME: "Dependabot security maintainer"
GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/dependabot-security-maintainer.lock.yml@${{ github.ref }}
- GH_AW_INFO_VERSION: "2.1.227"
+ GH_AW_INFO_VERSION: "2.1.277"
GH_AW_INFO_AWF_VERSION: "v0.27.44"
GH_AW_INFO_ENGINE_ID: "claude"
- name: Mask OTLP telemetry headers
@@ -138,8 +138,8 @@ jobs:
GH_AW_INFO_ENGINE_ID: "claude"
GH_AW_INFO_ENGINE_NAME: "Claude Code"
GH_AW_INFO_MODEL: "claude-opus-5"
- GH_AW_INFO_VERSION: "2.1.227"
- GH_AW_INFO_AGENT_VERSION: "2.1.227"
+ GH_AW_INFO_VERSION: "2.1.277"
+ GH_AW_INFO_AGENT_VERSION: "2.1.277"
GH_AW_INFO_CLI_VERSION: "v0.86.2"
GH_AW_INFO_WORKFLOW_NAME: "Dependabot security maintainer"
GH_AW_INFO_EXPERIMENTAL: "false"
@@ -383,6 +383,7 @@ jobs:
GH_AW_ASSETS_ALLOWED_EXTS: ""
GH_AW_ASSETS_BRANCH: ""
GH_AW_ASSETS_MAX_SIZE_KB: 0
+ GH_AW_ENGINE_VERSION: "2.1.277"
GH_AW_MCP_LOG_DIR: /tmp/gh-aw/mcp-logs/safeoutputs
GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
GH_AW_WORKFLOW_ID_SANITIZED: dependabotsecuritymaintainer
@@ -421,7 +422,7 @@ jobs:
env:
GH_AW_SETUP_WORKFLOW_NAME: "Dependabot security maintainer"
GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/dependabot-security-maintainer.lock.yml@${{ github.ref }}
- GH_AW_INFO_VERSION: "2.1.227"
+ GH_AW_INFO_VERSION: "2.1.277"
GH_AW_INFO_AWF_VERSION: "v0.27.44"
GH_AW_INFO_ENGINE_ID: "claude"
- name: Set runtime paths
@@ -498,7 +499,7 @@ jobs:
- name: Install AWF binary
run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.27.44 --rootless
- name: Install Claude Code CLI
- run: npm install -g @anthropic-ai/[email protected]
+ run: npm install -g @anthropic-ai/[email protected]
- name: Determine automatic lockdown mode for GitHub MCP Server
id: determine-automatic-lockdown
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 (source v9)
@@ -1140,7 +1141,7 @@ jobs:
env:
GH_AW_SETUP_WORKFLOW_NAME: "Dependabot security maintainer"
GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/dependabot-security-maintainer.lock.yml@${{ github.ref }}
- GH_AW_INFO_VERSION: "2.1.227"
+ GH_AW_INFO_VERSION: "2.1.277"
GH_AW_INFO_AWF_VERSION: "v0.27.44"
GH_AW_INFO_ENGINE_ID: "claude"
- name: Download agent output artifact
@@ -1377,7 +1378,7 @@ jobs:
env:
GH_AW_SETUP_WORKFLOW_NAME: "Dependabot security maintainer"
GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/dependabot-security-maintainer.lock.yml@${{ github.ref }}
- GH_AW_INFO_VERSION: "2.1.227"
+ GH_AW_INFO_VERSION: "2.1.277"
GH_AW_INFO_AWF_VERSION: "v0.27.44"
GH_AW_INFO_ENGINE_ID: "claude"
- name: Download agent output artifact
@@ -1459,7 +1460,7 @@ jobs:
- name: Install AWF binary
run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.27.44
- name: Install Claude Code CLI
- run: npm install -g @anthropic-ai/[email protected]
+ run: npm install -g @anthropic-ai/[email protected]
- name: Execute Claude Code CLI
if: always() && steps.detection_guard.outputs.run_detection == 'true'
continue-on-error: true
@@ -1627,6 +1628,7 @@ jobs:
GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens }}
GH_AW_ENGINE_ID: "claude"
GH_AW_ENGINE_MODEL: "claude-opus-5"
+ GH_AW_ENGINE_VERSION: "2.1.277"
GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
GH_AW_SAFE_OUTPUTS_STAGED: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.mode != 'live' }}
GH_AW_THREAT_DETECTION_AIC: ${{ needs.detection.outputs.aic }}
@@ -1664,7 +1666,7 @@ jobs:
env:
GH_AW_SETUP_WORKFLOW_NAME: "Dependabot security maintainer"
GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/dependabot-security-maintainer.lock.yml@${{ github.ref }}
- GH_AW_INFO_VERSION: "2.1.227"
+ GH_AW_INFO_VERSION: "2.1.277"
GH_AW_INFO_AWF_VERSION: "v0.27.44"
GH_AW_INFO_ENGINE_ID: "claude"
- name: Mask OTLP telemetry headers
diff --git a/.github/workflows/dependabot-security-maintainer.md b/.github/workflows/dependabot-security-maintainer.md
index cab2bfa2d8..84a77b506f 100644
--- a/.github/workflows/dependabot-security-maintainer.md
+++ b/.github/workflows/dependabot-security-maintainer.md
@@ -37,6 +37,7 @@ model: claude-opus-5
engine:
id: claude
+ version: "2.1.277"
max-turns: 180
env:
ANTHROPIC_API_KEY: ${{ secrets.CLAUDE_API_KEY }}
diff --git a/.github/workflows/model-price-audit.yml b/.github/workflows/model-price-audit.yml
index c2c94bb30c..623929423d 100644
--- a/.github/workflows/model-price-audit.yml
+++ b/.github/workflows/model-price-audit.yml
@@ -172,7 +172,7 @@ jobs:
- name: Run Claude price audit
id: claude-audit
if: steps.validate-inputs.outputs.dry_run_mode == 'disabled'
- uses: anthropics/claude-code-action@fa2b2666b747000bf42767d1f332065b375e3c8f # v1.0.214
+ uses: anthropics/claude-code-action@4036a180cf690f49529f5d8c79c998855287f590 # v1.0.230
env:
API_TIMEOUT_MS: "900000"
BASH_DEFAULT_TIMEOUT_MS: "120000"
diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml
index 79e45b1af4..1f376b4e41 100644
--- a/.github/workflows/pipeline.yml
+++ b/.github/workflows/pipeline.yml
@@ -262,6 +262,8 @@ jobs:
# by every AGENTS.md are resolved.
- name: agent guidance paths resolve
run: pnpm run agents:check
+ - name: agent setup tests
+ run: node --test scripts/agents/sync-agent-shims.test.mjs
- name: cursor PR label tests
run: node --test scripts/github/label-cursor-prs.test.mjs
- name: Load default env
diff --git a/CLAUDE.md b/CLAUDE.md
deleted file mode 120000
index 47dc3e3d86..0000000000
--- a/CLAUDE.md
+++ /dev/null
@@ -1 +0,0 @@
-AGENTS.md
\ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 8735cd30c5..aa8f798387 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -220,9 +220,8 @@ MCP server catalog.
- Canonical shared docs:
- `.agents/AGENTS.md`
-- Root discovery symlinks:
- - `AGENTS.md`
- - `CLAUDE.md`
+- Root discovery symlink: `AGENTS.md` -> `.agents/AGENTS.md`
+- Folder instructions: `AGENTS.md` in the directory they describe
- Shared agent setup overview: `.agents/README.md`
- Shared skills: `.agents/skills/`
- Shared tool/bootstrap/MCP config: `.agents/config.json`
@@ -241,6 +240,10 @@ MCP server catalog.
- `.claude/skills/*`
- Shared bootstrap for agent environments: `bash scripts/agents/setup.sh`
+Use a harness that reads `AGENTS.md` directly. For Claude Code, upgrade to
+2.1.277 or later and see the compatibility notes in `.agents/README.md`.
+Folder instructions need no `CLAUDE.md` copy or symlink.
+
When you change the shared MCP setup:
1. Edit `.agents/config.json`
diff --git a/ai-gateway/CLAUDE.md b/ai-gateway/CLAUDE.md
deleted file mode 120000
index 47dc3e3d86..0000000000
--- a/ai-gateway/CLAUDE.md
+++ /dev/null
@@ -1 +0,0 @@
-AGENTS.md
\ No newline at end of file
diff --git a/ee/CLAUDE.md b/ee/CLAUDE.md
deleted file mode 120000
index 47dc3e3d86..0000000000
--- a/ee/CLAUDE.md
+++ /dev/null
@@ -1 +0,0 @@
-AGENTS.md
\ No newline at end of file
diff --git a/packages/native/CLAUDE.md b/packages/native/CLAUDE.md
deleted file mode 120000
index 47dc3e3d86..0000000000
--- a/packages/native/CLAUDE.md
+++ /dev/null
@@ -1 +0,0 @@
-AGENTS.md
\ No newline at end of file
diff --git a/packages/shared/CLAUDE.md b/packages/shared/CLAUDE.md
deleted file mode 120000
index 47dc3e3d86..0000000000
--- a/packages/shared/CLAUDE.md
+++ /dev/null
@@ -1 +0,0 @@
-AGENTS.md
\ No newline at end of file
diff --git a/packages/shared/scripts/seeder/CLAUDE.md b/packages/shared/scripts/seeder/CLAUDE.md
deleted file mode 120000
index 47dc3e3d86..0000000000
--- a/packages/shared/scripts/seeder/CLAUDE.md
+++ /dev/null
@@ -1 +0,0 @@
-AGENTS.md
\ No newline at end of file
diff --git a/scripts/agents/sync-agent-shims.mjs b/scripts/agents/sync-agent-shims.mjs
index 67852d8fba..70607ba13a 100644
--- a/scripts/agents/sync-agent-shims.mjs
+++ b/scripts/agents/sync-agent-shims.mjs
@@ -246,84 +246,17 @@ const findDirectoriesWithAgentsFile = (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"),
target: resolve(repoRoot, ".agents/AGENTS.md"),
},
- {
- 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"),
@@ -398,7 +331,7 @@ const findBrokenReferences = () => {
const broken = [];
const guidanceFiles = [
resolve(repoRoot, ".agents/AGENTS.md"),
- ...packageAgentsDirectories.map((directory) =>
+ ...findDirectoriesWithAgentsFile(repoRoot).map((directory) =>
resolve(directory, "AGENTS.md"),
),
];
@@ -553,19 +486,6 @@ 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);
diff --git a/scripts/agents/sync-agent-shims.test.mjs b/scripts/agents/sync-agent-shims.test.mjs
new file mode 100644
index 0000000000..f270266517
--- /dev/null
+++ b/scripts/agents/sync-agent-shims.test.mjs
@@ -0,0 +1,88 @@
+import assert from "node:assert/strict";
+import { spawnSync } from "node:child_process";
+import {
+ copyFileSync,
+ mkdirSync,
+ mkdtempSync,
+ readFileSync,
+ readdirSync,
+ readlinkSync,
+ rmSync,
+ writeFileSync,
+} from "node:fs";
+import { tmpdir } from "node:os";
+import { dirname, join } from "node:path";
+import { test } from "node:test";
+
+const createFixture = (t) => {
+ const root = mkdtempSync(join(tmpdir(), "agent-sync-"));
+ t.after(() => rmSync(root, { recursive: true, force: true }));
+ const write = (path, contents) => {
+ mkdirSync(dirname(join(root, path)), { recursive: true });
+ writeFileSync(join(root, path), contents);
+ };
+ write(
+ ".agents/config.json",
+ readFileSync(new URL("../../.agents/config.json", import.meta.url)),
+ );
+ write(".agents/AGENTS.md", "# Repository instructions\n");
+ write(".agents/skills/example/SKILL.md", "# Example skill\n");
+ write("web/AGENTS.md", "# Web instructions\n");
+ write("web/src/feature/AGENTS.md", "# Feature instructions\n");
+ mkdirSync(join(root, "scripts/agents"), { recursive: true });
+ copyFileSync(
+ new URL("./sync-agent-shims.mjs", import.meta.url),
+ join(root, "scripts/agents/sync-agent-shims.mjs"),
+ );
+ const run = (...args) =>
+ spawnSync(
+ process.execPath,
+ [join(root, "scripts/agents/sync-agent-shims.mjs"), ...args],
+ { encoding: "utf8" },
+ );
+ return { root, write, run };
+};
+
+const assertSuccess = (result) => {
+ assert.equal(result.status, 0, result.error?.message ?? result.stderr);
+};
+
+test("sync keeps root and nested instructions in AGENTS.md without translation", (t) => {
+ const { root, run } = createFixture(t);
+ assertSuccess(run());
+ assertSuccess(run());
+ assertSuccess(run("--check", "--check-paths"));
+
+ assert.equal(readlinkSync(join(root, "AGENTS.md")), ".agents/AGENTS.md");
+ for (const directory of ["", "web", "web/src/feature"]) {
+ assert.ok(!readdirSync(join(root, directory)).includes("CLAUDE.md"));
+ }
+ assert.equal(
+ readlinkSync(join(root, ".claude/skills/example")),
+ "../../.agents/skills/example",
+ );
+ const mcp = JSON.parse(readFileSync(join(root, ".mcp.json"), "utf8"));
+ assert.ok(mcp.mcpServers["langfuse-docs"]);
+});
+
+test("nested guidance paths are validated only when requested", (t) => {
+ const { write, run } = createFixture(t);
+ write("web/src/feature/AGENTS.md", "Read `scripts/agents/missing.mjs`.\n");
+ write(
+ "web/.agents/skills/vendor/AGENTS.md",
+ "Read `scripts/agents/vendor.mjs`.\n",
+ );
+ assertSuccess(run());
+ assertSuccess(run("--check"));
+
+ const result = run("--check", "--check-paths");
+ assert.equal(result.status, 1);
+ assert.match(
+ result.stderr,
+ /Broken path reference in web\/src\/feature\/AGENTS.md/,
+ );
+ assert.doesNotMatch(result.stderr, /vendor.mjs/);
+
+ write("scripts/agents/missing.mjs", "// Referenced file.\n");
+ assertSuccess(run("--check", "--check-paths"));
+});
diff --git a/web/CLAUDE.md b/web/CLAUDE.md
deleted file mode 120000
index 47dc3e3d86..0000000000
--- a/web/CLAUDE.md
+++ /dev/null
@@ -1 +0,0 @@
-AGENTS.md
\ No newline at end of file
diff --git a/web/src/features/ai-gateway/CLAUDE.md b/web/src/features/ai-gateway/CLAUDE.md
deleted file mode 120000
index 47dc3e3d86..0000000000
--- a/web/src/features/ai-gateway/CLAUDE.md
+++ /dev/null
@@ -1 +0,0 @@
-AGENTS.md
\ No newline at end of file
diff --git a/web/src/features/evals/CLAUDE.md b/web/src/features/evals/CLAUDE.md
deleted file mode 120000
index 47dc3e3d86..0000000000
--- a/web/src/features/evals/CLAUDE.md
+++ /dev/null
@@ -1 +0,0 @@
-AGENTS.md
\ No newline at end of file
diff --git a/web/src/features/evals/v2/CLAUDE.md b/web/src/features/evals/v2/CLAUDE.md
deleted file mode 120000
index 47dc3e3d86..0000000000
--- a/web/src/features/evals/v2/CLAUDE.md
+++ /dev/null
@@ -1 +0,0 @@
-AGENTS.md
\ No newline at end of file
diff --git a/worker/CLAUDE.md b/worker/CLAUDE.md
deleted file mode 120000
index 47dc3e3d86..0000000000
--- a/worker/CLAUDE.md
+++ /dev/null
@@ -1 +0,0 @@
-AGENTS.md
\ No newline at end of file