Skip to content

Commit d6a4257

Browse files
carderneTrigger.dev RepoOps
authored andcommitted
chore: rename CLAUDE.md instructions to AGENTS.md
Rename agent instruction files to AGENTS.md and remove redundant CLAUDE.md import shims. Update documentation links and the instruction-audit workflow to use the new names. Mono-RevId: c9f48a907fc75e7e43f1d5bc801c2d986ce27ee1
1 parent 366671e commit d6a4257

17 files changed

Lines changed: 14 additions & 16 deletions

File tree

‎.claude/REVIEW.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Reserve 🔴 for things that would page someone or block a rollback. In this cod
1111
- A Redis data shape used by both versions changes in place. New shapes need a new key namespace.
1212
- A migration is not backward-compatible with the prior image.
1313
- **Schema / migration safety.** Prisma migrations must be backward-compatible with the prior deploy. Adding NOT NULL without a default, dropping a column an old image still reads, renaming a column — all 🔴.
14-
- **ClickHouse migration ordering + idempotency.** Goose runs in strict mode in the deploy pipeline and refuses to apply a missing version below the current version — slotting a new file in below the latest already-applied version blocks the deploy. New ClickHouse migration files MUST use the next available number (`max(files in internal-packages/clickhouse/schema/) + 1`); if main has added migrations while you've been on a branch, renumber yours. DDL must also be idempotent (`ADD COLUMN IF NOT EXISTS`, `DROP COLUMN IF EXISTS`, `CREATE TABLE IF NOT EXISTS`, `ADD INDEX IF NOT EXISTS`) so a partial / `--allow-missing` apply elsewhere doesn't fail on retry. Either fault is 🔴 — both break test/prod deploys. Rules live in `internal-packages/clickhouse/CLAUDE.md`.
14+
- **ClickHouse migration ordering + idempotency.** Goose runs in strict mode in the deploy pipeline and refuses to apply a missing version below the current version — slotting a new file in below the latest already-applied version blocks the deploy. New ClickHouse migration files MUST use the next available number (`max(files in internal-packages/clickhouse/schema/) + 1`); if main has added migrations while you've been on a branch, renumber yours. DDL must also be idempotent (`ADD COLUMN IF NOT EXISTS`, `DROP COLUMN IF EXISTS`, `CREATE TABLE IF NOT EXISTS`, `ADD INDEX IF NOT EXISTS`) so a partial / `--allow-missing` apply elsewhere doesn't fail on retry. Either fault is 🔴 — both break test/prod deploys. Rules live in `internal-packages/clickhouse/AGENTS.md`.
1515
- **Queue / concurrency correctness.** RunQueue, MarQS (V1, legacy), redis-worker — any change to enqueue / dequeue / locking semantics. Re-derive the invariant on paper before flagging or accepting.
1616
- **Missing index on a hot table.** New Prisma queries against `TaskRun`, `TaskRunExecutionSnapshot`, `JobRun`, `Project`, etc. must use an existing index. Check `internal-packages/database/prisma/schema.prisma` for the relevant `@@index` lines — don't guess and don't propose `EXPLAIN`.
1717
- **Recovery-path queries.** Any `TaskRun.findFirst` / `findMany` added to a schedule, run-recovery, or restart loop. Recovery fan-outs (Redis crash, restart storms) turn "rare indexed query" into a DB incident. 🔴 even if indexed.
@@ -32,7 +32,7 @@ Every PR gets a performance pass — not just the ones that look perf-sensitive.
3232

3333
**Hot paths — extra scrutiny on any added query or work:**
3434

35-
- **Trigger + batch trigger** (`triggerTask.server.ts`, `batchTriggerV3.server.ts`) — see `apps/webapp/CLAUDE.md`; do not add DB queries to these.
35+
- **Trigger + batch trigger** (`triggerTask.server.ts`, `batchTriggerV3.server.ts`) — see `apps/webapp/AGENTS.md`; do not add DB queries to these.
3636
- **Dequeue / RunQueue** (`dequeueSystem.ts`, run-queue read/lock paths) — runs on every execution.
3737
- **Execution-snapshot creation in the run engine** — any engine function that writes a `TaskRunExecutionSnapshot` runs per state transition; a new query there multiplies by run volume.
3838
- **OTEL ingestion** (`otel.v1.traces.ts`, `otel.v1.logs.ts`) — write volume scales with customer span counts.
@@ -75,7 +75,7 @@ Every PR gets a performance pass — not just the ones that look perf-sensitive.
7575

7676
## Things V1/legacy that should NOT block a PR
7777

78-
The `apps/webapp/app/v3/` directory name is misleading — most code there is V2. Only specific files are V1-only legacy: `MarQS` queue, `triggerTaskV1`, `cancelTaskRunV1`, and a handful of others (see `apps/webapp/CLAUDE.md` for the exact list). Don't flag "you should refactor this to use V2" on those — they're frozen.
78+
The `apps/webapp/app/v3/` directory name is misleading — most code there is V2. Only specific files are V1-only legacy: `MarQS` queue, `triggerTaskV1`, `cancelTaskRunV1`, and a handful of others (see `apps/webapp/AGENTS.md` for the exact list). Don't flag "you should refactor this to use V2" on those — they're frozen.
7979

8080
## Confidence calibration for this repo
8181

‎.github/workflows/claude-md-audit.yml‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,13 @@ jobs:
5252
5353
In this repo:
5454
- Root shared agent guidance lives in `AGENTS.md`.
55-
- Root `CLAUDE.md` is only a Claude Code adapter that imports `AGENTS.md`.
56-
- Subdirectories may still have scoped `CLAUDE.md` files.
55+
- Subdirectories may have scoped `AGENTS.md` files.
5756
- `.claude/rules/` contains additional Claude Code guidance.
5857
5958
## Your task
6059
6160
1. Run `git diff origin/main...HEAD --name-only` to see which files changed in this PR.
62-
2. For each changed directory, check the applicable instruction files: root `AGENTS.md`, any `CLAUDE.md` in that directory or a parent directory, and relevant `.claude/rules/` files.
61+
2. For each changed directory, check the applicable instruction files: root `AGENTS.md`, any `AGENTS.md` in that directory or a parent directory, and relevant `.claude/rules/` files.
6362
3. Determine if any instruction file should be updated based on the changes. Consider:
6463
- New files/directories that aren't covered by existing documentation
6564
- Changed architecture or patterns that contradict current agent guidance
@@ -75,9 +74,9 @@ jobs:
7574
If updates ARE needed, respond with a short list:
7675
📝 **Agent instruction updates suggested:**
7776
- `AGENTS.md`: [what should be added/changed]
78-
- `path/to/CLAUDE.md`: [what should be added/changed]
77+
- `path/to/AGENTS.md`: [what should be added/changed]
7978
- `.claude/rules/file.md`: [what should be added/changed]
8079
8180
Keep suggestions specific and brief. Only flag things that would actually mislead agents in future sessions.
8281
Do NOT suggest updates for trivial changes (bug fixes, small refactors within existing patterns).
83-
Do NOT suggest creating new CLAUDE.md files - only updates to existing instruction files.
82+
Do NOT suggest creating new AGENTS.md files - only updates to existing instruction files.

‎AGENTS.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# AGENTS.md
22

3-
This file provides guidance to Claude Code when working with this repository. Subdirectory CLAUDE.md files provide deeper context when you navigate into specific areas.
3+
This file provides guidance to Claude Code when working with this repository. Subdirectory AGENTS.md files provide deeper context when you navigate into specific areas.
44

55
## Build and Development Commands
66

@@ -167,11 +167,11 @@ User API call -> Webapp routes -> Services -> RunEngine -> Redis Queue -> Superv
167167

168168
### v3 (engine V1) removed
169169

170-
v3 (engine V1: MarQS + Graphile worker) is end-of-life and its execution code has been removed. The `apps/webapp/app/v3/` directory name is historical - everything there now serves V2 (Run Engine 2.0, `@internal/run-engine` + redis-worker). There is no V1 execution path: a `RunEngineVersion` `V1` branch only rejects or finalizes gracefully so v3 clients get a clean 4xx, never a 5xx. Do not reintroduce V1. See `apps/webapp/CLAUDE.md` and `.claude/rules/legacy-v3-code.md`.
170+
v3 (engine V1: MarQS + Graphile worker) is end-of-life and its execution code has been removed. The `apps/webapp/app/v3/` directory name is historical - everything there now serves V2 (Run Engine 2.0, `@internal/run-engine` + redis-worker). There is no V1 execution path: a `RunEngineVersion` `V1` branch only rejects or finalizes gracefully so v3 clients get a clean 4xx, never a 5xx. Do not reintroduce V1. See `apps/webapp/AGENTS.md` and `.claude/rules/legacy-v3-code.md`.
171171

172172
### Documentation
173173

174-
Docs live in `docs/` as a Mintlify site (MDX format). See `docs/CLAUDE.md` for conventions.
174+
Docs live in `docs/` as a Mintlify site (MDX format). See `docs/AGENTS.md` for conventions.
175175

176176
### Reference Projects
177177

‎CLAUDE.md‎

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pnpm run typecheck --filter webapp # ~1-2 minutes
1212

1313
Only run typecheck after major changes (new files, significant refactors, schema changes). For small edits, trust the types and let CI catch issues.
1414

15-
Note: Public packages (`packages/*`) use `build` instead. See the root CLAUDE.md for details.
15+
Note: Public packages (`packages/*`) use `build` instead. See the root AGENTS.md for details.
1616

1717
## Testing Dashboard Changes with Chrome DevTools MCP
1818

File renamed without changes.

‎internal-packages/observability-map/INTERNALS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ scoping, the same way `try { String(0); }` reads as error handling and for the s
261261
credits.
262262

263263
An `ability.can(...)` call in the handler is deliberately not a third way to be scoped.
264-
`apps/webapp/CLAUDE.md` says why: the OSS fallback ability is permissive
264+
`apps/webapp/AGENTS.md` says why: the OSS fallback ability is permissive
265265
(`internal-packages/rbac/src/fallback.ts` returns `permissiveAbility` for a PAT and
266266
`buildFallbackAbility(user.admin)` for a session, neither of which reads org membership), so an
267267
ability check enforces the role while the membership-scoped query is the tenant floor.

0 commit comments

Comments
 (0)