docs(agents): spell out tooling conventions (bunx, Bun-native APIs)#358
Conversation
Three short lines added under Prerequisites so these conventions live in the canonical agent context file instead of scattered session memory: - `bunx` over `npx`. - Prefer native Bun APIs (Bun.Glob, Bun.file, Bun.write, Bun.$) over node:fs in repo scripts. Runtime is pinned by .tool-versions, so there's no Node-portability concern. - Browser automation uses `bunx @playwright/cli` (not the deprecated `playwright-cli` package, not `npx playwright`).
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 48 minutes and 12 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Updates the contributor/agent canonical context (AGENTS.md) to explicitly document Bun-centric tooling conventions so future repo scripts and automation follow the established runtime/tooling assumptions.
Changes:
- Document
bunxas the preferred runner overnpx. - Add guidance to prefer Bun-native APIs in repo scripts over Node FS/child_process patterns.
- Specify the intended Playwright/browser-automation invocation.
| - Use `bun install` instead of `npm install`. | ||
| - Use `bun install` instead of `npm install`; `bunx` instead of `npx`. | ||
| - In repo scripts (`tko.io/scripts`, `tools/`, `builds/*/build.ts`), prefer native Bun APIs — `Bun.Glob`, `Bun.file`, `Bun.write`, `Bun.$` — over `node:fs`, `node:fs/promises.glob`, or ad-hoc `child_process`. Runtime is pinned by `.tool-versions`, so there's no Node-version portability concern. | ||
| - Browser automation uses `bunx @playwright/cli <cmd>` (not `npx playwright`, not the deprecated `playwright-cli` package). |
| - **Bun** — package manager and script runner. Install via [mise](https://mise.jdx.dev/): `mise install` (reads `.tool-versions`), or [bun.sh](https://bun.sh). | ||
| - Use `bun install` instead of `npm install`. | ||
| - Use `bun install` instead of `npm install`; `bunx` instead of `npx`. | ||
| - In repo scripts (`tko.io/scripts`, `tools/`, `builds/*/build.ts`), prefer native Bun APIs — `Bun.Glob`, `Bun.file`, `Bun.write`, `Bun.$` — over `node:fs`, `node:fs/promises.glob`, or ad-hoc `child_process`. Runtime is pinned by `.tool-versions`, so there's no Node-version portability concern. |
| - **Bun** — package manager and script runner. Install via [mise](https://mise.jdx.dev/): `mise install` (reads `.tool-versions`), or [bun.sh](https://bun.sh). | ||
| - Use `bun install` instead of `npm install`. | ||
| - Use `bun install` instead of `npm install`; `bunx` instead of `npx`. | ||
| - In repo scripts (`tko.io/scripts`, `tools/`, `builds/*/build.ts`), prefer native Bun APIs — `Bun.Glob`, `Bun.file`, `Bun.write`, `Bun.$` — over `node:fs`, `node:fs/promises.glob`, or ad-hoc `child_process`. Runtime is pinned by `.tool-versions`, so there's no Node-version portability concern. |
- Drop `builds/*/build.ts` from the Bun-native scope (no such file exists; only `tools/build.ts` does). - Rename `node:fs/promises.glob` to "the `glob` export from `node:fs/promises`" so the API path is unambiguous. - Switch Playwright CLI from the nonexistent `@playwright/cli` to the repo's actual `playwright` dependency: `bunx playwright <cmd>`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Three short lines under Prerequisites in `AGENTS.md` so these conventions live in the canonical agent-context file instead of being scattered across session memory:
Motivated by the PR #357 cleanup — when I originally reached for `fs.readdir` instead of `Bun.Glob` in bundle-tests.mjs. Writing the rule down here means the next agent reading AGENTS.md doesn't have to learn it by correction.
Test plan