Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Builds: `@tko/build.knockout` (backwards-compatible) and
- **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`; `bunx` instead of `npx`.
- In repo scripts (`tko.io/scripts`, `tools/`), prefer native Bun APIs — `Bun.Glob`, `Bun.file`, `Bun.write`, `Bun.$` — over `node:fs`, the `glob` export from `node:fs/promises`, or ad-hoc `child_process`. Runtime is pinned by `.tool-versions`, so there's no Node-version portability concern.
- Browser automation uses `bunx playwright <cmd>` via the repo's `playwright` dependency (not `npx playwright`, not the deprecated `playwright-cli` package).
- Browser automation uses `bunx @playwright/cli <cmd>`.

## Build Commands

Expand Down
4 changes: 2 additions & 2 deletions tko.io/public/agents/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ Minimum (any docs change):

For pages with runnable TSX examples, also run the headless Playwright flow:

- Use `playwright-cli` in headless mode. Do not use headed/browser-stealing runs unless the user explicitly asks for them.
- Use `bunx @playwright/cli` in headless mode. Do not use headed/browser-stealing runs unless the user explicitly asks for them.
- Prefer a live Astro dev server on `127.0.0.1:4321` so markdown/plugin edits reload while you work (`bun run dev` in `tko.io/`).
- Verify each `Open in Playground` button on the page; if a page has multiple TSX examples, check every one, not just the first.
- Standard flow: `playwright-cli close-all`, `playwright-cli open http://127.0.0.1:4321/...`, inspect the snapshot for playground refs, click each button, switch to the playground tab, and confirm `[data-role="status"]` (shows "esbuild ready"), `[data-role="compile-time"]`, and `[data-role="error-bar"]`.
- Standard flow: `bunx @playwright/cli close-all`, `bunx @playwright/cli open http://127.0.0.1:4321/...`, inspect the snapshot for playground refs, click each button, switch to the playground tab, and confirm `[data-role="status"]` (shows "esbuild ready"), `[data-role="compile-time"]`, and `[data-role="error-bar"]`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Run the package's playwright-cli binary via bunx

For docs verification, these examples need to invoke the binary that @playwright/cli actually exposes. I checked Bun's bunx docs, which direct using --package <pkg> when the binary name differs from the package name, and @playwright/cli's package.json declares only the playwright-cli bin; in that context, bunx @playwright/cli close-all misleads agents into running a non-existent @playwright/cli executable instead of closing/opening the browser session. Use a form like bunx -p @playwright/cli playwright-cli close-all/open ... here and in the general AGENTS.md guidance.

Useful? React with 👍 / 👎.

- Treat docs example work as incomplete until the emitted playground payload compiles cleanly on the live site.

Generator-owned files: see the note at the top of this document under "Never ship docs that reference things that don't exist on the target branch."
Expand Down
Loading