1---2name: biome-23description: Use Biome in .NET repositories that ship Node-based frontend assets and want a fast combined formatter-linter-import organizer for JavaScript, TypeScript, CSS, JSON, GraphQL, or HTML. USE FOR: biome.json or @biomejs/biome setup; fast frontend formatting and linting; replacing overlapping frontend style tools deliberately. DO NOT USE FOR: ESLint-only plugin coverage; runtime site audits such as headers, accessibility, or browser behavior. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.4---56# Biome for Frontend Assets in .NET Repositories78## Trigger On910- the repo has `biome.json`, `@biomejs/biome`, or the user asks for a faster all-in-one frontend formatter-linter stack11- the repo wants one tool for formatting, linting, and import organization across JS, TS, CSS, JSON, GraphQL, or HTML12- the team is comparing Biome against ESLint plus Prettier or wants to simplify the current stack1314## Do Not Use For1516- repos that rely on ESLint plugins or framework-specific rules Biome does not cover yet17- runtime site audits such as headers, accessibility, and SEO; route that to `webhint`18- cases where a dedicated CSS or HTML tool is still the deliberate owner and no migration is requested1920## Inputs2122- the nearest `AGENTS.md`23- `package.json`24- `biome.json` or `biome.jsonc`25- current ownership across ESLint, Prettier, Stylelint, and import ordering2627## Workflow28291. Decide ownership first:30 - Biome as the main formatter and linter31 - Biome only for formatting32 - Biome in coexistence with ESLint for plugin gaps332. Prefer a repo-local pinned install so CI and developer machines use the same version.343. Generate `biome.json` only after confirming what the repo wants Biome to own.354. Add repeatable scripts to `package.json`, for example:36 - `biome check .`37 - `biome check . --write`385. Keep file ownership explicit:39 - Biome can own formatting, linting, and import sorting40 - webhint still owns site-runtime audits41 - ESLint may stay for plugin-heavy cases the repo intentionally keeps426. Start migrations with `check` and bounded folders before flipping the whole repo to `--write`.437. Re-run the frontend build and tests after broad formatting or lint-fix passes.4445## Current Upstream Notes4647- The watched Biome release is `@biomejs/js-api@6.0.0`, not a core CLI-only release. It adds `spanInBytesToSpanInCodeUnits` for converting Biome UTF-8 byte spans to JavaScript UTF-16 code unit spans.48- Use that helper when custom JavaScript tooling slices source text from Biome diagnostics, especially with non-ASCII content. Normal `.NET` repos that only run the Biome CLI usually need no config change for this release.49- Recent Biome changes also continue expanding CSS/SCSS, HTML accessibility, import sorting, watch mode, and upgrade-command surfaces; verify actual CLI ownership before replacing ESLint or Stylelint.5051## Bootstrap When Missing52531. Detect current state:54 - `rg --files -g 'package.json' -g 'biome.json*'`55 - `rg -n '"@biomejs/biome"|"eslint"|"prettier"|"stylelint"' --glob 'package.json' .`562. Prefer a repo-local pinned install:57 - `npm i -D -E @biomejs/biome`583. Create config deliberately:59 - `npx @biomejs/biome init`604. Add repeatable commands to `AGENTS.md` and `package.json`, then verify with:61 - `npx @biomejs/biome check .`62 - `npx @biomejs/biome check . --write`635. Return `status: configured` if Biome is now wired with explicit ownership, or `status: improved` if the existing setup was tightened.646. Return `status: not_applicable` when the repo intentionally stays on ESLint-centered ownership and no migration or comparison was requested.6566## Handle Failures6768- Missing-rule parity with specialized ESLint plugins is an ownership problem; keep ESLint for those files until the gap is intentionally closed.69- Overly broad `--write` runs can cause large churn; start with bounded folders or changed files first.70- Generated assets or vendored code should be excluded in `biome.json` before trusting the signal.71- If developers complain that Biome and ESLint disagree, define file ownership instead of running both broadly on the same surface by accident.7273## Deliver7475- explicit Biome ownership and version pinning76- checked-in config and repeatable `check` commands77- a migration or coexistence plan versus ESLint and other frontend tools7879## Validate8081- the chosen ownership model is documented82- CI and local runs use the same Biome version83- the target globs exclude generated and vendored assets84- downstream build or test flows still pass after `--write` runs8586## Ralph Loop87881. Plan: analyze current state, target outcome, constraints, and risks.892. Execute one step and produce a concrete delta.903. Review the result and capture findings.914. Apply fixes in small batches and rerun checks.925. Update the plan after each iteration.936. Repeat until outcomes are acceptable.947. If a dependency is missing, bootstrap it or return `status: not_applicable` with a reason.9596### Required Result Format9798- `status`: `complete` | `clean` | `improved` | `configured` | `not_applicable` | `blocked`99- `plan`: concise plan and current step100- `actions_taken`: concrete changes made101- `verification`: commands, checks, or review evidence102- `remaining`: unresolved items or `none`103104## Example Requests105106- "Replace Prettier and basic linting with Biome in this repo."107- "Add Biome to the frontend under ClientApp."108- "Explain whether we should keep ESLint after adding Biome."