Skip to content

docs(agents): spell out tooling conventions (bunx, Bun-native APIs)#358

Merged
brianmhunt merged 2 commits into
mainfrom
docs/agents-tooling-bun-native
Apr 22, 2026
Merged

docs(agents): spell out tooling conventions (bunx, Bun-native APIs)#358
brianmhunt merged 2 commits into
mainfrom
docs/agents-tooling-bun-native

Conversation

@brianmhunt
Copy link
Copy Markdown
Member

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:

  • `bunx` over `npx`.
  • Prefer native Bun APIs (`Bun.Glob`, `Bun.file`, `Bun.write`, `Bun.$`) over `node:fs` / `node:fs/promises.glob` / ad-hoc `child_process` in repo scripts. Runtime is pinned by `.tool-versions` so there's no Node-portability concern.
  • Browser automation uses `bunx @playwright/cli ` (not `playwright-cli` (deprecated), not `npx playwright`).

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

  • No code changes; docs only.

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`).
Copilot AI review requested due to automatic review settings April 22, 2026 14:52
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 22, 2026

Warning

Rate limit exceeded

@brianmhunt has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 48 minutes and 12 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 11a17994-4324-4b86-8362-70230ee4e34c

📥 Commits

Reviewing files that changed from the base of the PR and between 4e20972 and a5e3efe.

📒 Files selected for processing (1)
  • AGENTS.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/agents-tooling-bun-native

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 bunx as the preferred runner over npx.
  • Add guidance to prefer Bun-native APIs in repo scripts over Node FS/child_process patterns.
  • Specify the intended Playwright/browser-automation invocation.

Comment thread AGENTS.md Outdated
- 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).
Comment thread AGENTS.md Outdated
- **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.
Comment thread AGENTS.md Outdated
- **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>
@brianmhunt brianmhunt merged commit 9baee6b into main Apr 22, 2026
9 checks passed
@brianmhunt brianmhunt deleted the docs/agents-tooling-bun-native branch April 22, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants