agentleFS
web-infra-devweb-infra-dev/rstest/.agents/skills/development/SKILL.md

development

Skill514 starsChanged 8 days agoMITView on GitHub

Feature and bug-fix development checklist for the Rstest monorepo. Use when implementing a new feature, fixing a bug, changing public APIs/config/CLI behavior, addressing a GitHub issue or PR request, or assessing cross-package impact before a PR.

  • Reads credentials

9 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use issue-campaign, contracts and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • samchonSkill

    issue-campaign

    Defines the default solo repository-wide issue campaign for typia: exhaustive discovery, lead-vetted issue publication, one unified CI-validated implementation pull request per cycle, solo Self-Review, and repeated rediscovery until a full clean round. Use for broad audits, many issue candidates, or repeated issue-to-pull-request campaigns unless the user explicitly requests parallel or multi-agent execution; do not use for one already-defined issue or an ordinary pull request.

    Also in 3 projects that use this

  • AnthropicSkill

    contracts

    Answer a question across a corpus of contract documents with verified citations. Use when the user asks what a contract says, which contracts have a clause, what changed between amendments, or any question that needs reading and citing across a set of contract files. The corpus must be on the local filesystem (see README).

    Also in 3 projects that use this

  • MicrosoftSkill

    pull-request

    Write concise, focused pull request descriptions for Wassette — at most three sentences on the what and why, with an explicit note on any breaking public-API change and how users adapt. Use when opening or editing a Wassette pull request.

    Also in 3 projects that use this

  • dragonflydbSkill

    benchmark

    Benchmark Dragonfly (and compare against Valkey/Redis) on local or remote cloud instances, then produce a performance + memory report with charts and a raw-data appendix. Use this whenever the user runs /benchmark, or asks to benchmark / load-test / measure throughput, QPS, latency, or memory efficiency of Dragonfly or another Redis-compatible server, to compare Dragonfly vs Valkey or Redis, or to generate a benchmark report. Trigger it even when the user just describes the goal ("see how fast Dragonfly is on this box", "compare memory per key vs Valkey") without saying the word "benchmark".

    Also in 3 projects that use this

  • AnthropicSkill

    documentation

    Write and maintain technical documentation. Trigger with "write docs for", "document this", "create a README", "write a runbook", "onboarding guide", or when the user needs help with any form of technical writing — API docs, architecture docs, or operational runbooks.

    Also in 3 projects that use this

  • SentrySkill

    review

    Fixture review skill.

    Also in 4 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

28 rules. 0 are common, 15 are distinctive, and 13 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 15

    Distinctive

    This author's own choices. Worth a look.

  • 13

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the request is phrased as "review / verify / assess", treat it as investigation — report findings and confirm before implementing …

    line 16
  2. Distinctive:

    When the user enumerates a subset ("only the low items", "core field only", "先只加 skip"), implement exactly that subset and stop.

    line 17
  3. Distinctive:

    If a fix would span multiple clusters or packages, estimate file/PR size and confirm scope before writing code.

    line 18
  4. Distinctive:

    If you cannot verify, say so explicitly instead of guessing.

    line 29
  5. Distinctive:

    Before writing code, determine what the change reaches:

    line 33
  6. Distinctive:

    Do not add new config knobs, buffers, heuristics, timeouts, dependencies, abstractions, or mode-specific hacks (e.g.

    line 58
  7. Very specific:

    Before adding a top-level config option, prove the existing channel (inlineConfig / run params) cannot express it.

    line 59
  8. Very specific:

    When aligning behavior with another tool, match the reference impl as the parity target — read its source (the latest upstream clone, per …

    line 60
  9. Distinctive:

    Every behavioral change — feature or bug fix — must have a corresponding e2e test.

    line 64
  10. Very specific:

    Run the repro against origin/main (unfixed) → confirm it fails.

    line 78
  11. Distinctive:

    Run the same repro with your fix applied → confirm it passes.

    line 79
  12. Distinctive:

    Add the regression test that captures this delta.

    line 80
  13. Distinctive:

    Never present a hypothesis as a conclusion — state confidence explicitly.

    line 82
  14. Distinctive:

    Not every feature needs browser mode support, but you must consciously decide rather than ignore it.

    line 86
  15. Very specific:

    Keep ownership clear: @rstest/browser = host/protocol/scheduling, @rstest/browser-ui = UI, runner/runtime = execution semantics, provider …

    line 101
  16. Very specific:

    Update packages/browser/ if the runtime behavior differs.

    line 102
  17. Very specific:

    Add or update browser e2e coverage via the testing skill.

    line 103
  18. Very specific:

    If the feature requires a new browser fixture, follow the pattern in e2e/browser-mode/fixtures/.

    line 104
  19. Very specific:

    If the feature involves React component testing, check @rstest/browser-react as well.

    line 105
  20. Distinctive:

    Add a brief note in the PR explaining why browser mode is unaffected, so reviewers don't have to ask.

    line 109
  21. Very specific:

    If the new or changed configuration option also exists in Rsbuild, check whether the adapters (@rstest/adapter-rsbuild, …

    line 113
  22. Very specific:

    If @rstest/core already has an e2e test covering the underlying feature, do not duplicate it in the adapter package.

    line 122
  23. Very specific:

    Only add a separate adapter e2e test (e2e/adapterTransformImport/) when the transformation itself has complex behavior that unit tests …

    line 123
  24. Distinctive:

    Update adapter-specific documentation when a new transform is added, so users know which Rsbuild configs are auto-converted.

    line 127
  25. Very specific:

    Treat this as the routing step: identify that docs must be updated, then inspect the existing docs structure under website/docs/en/ and …

    line 136
  26. Very specific:

    If the change introduces a new docs surface or convention, follow the established structure in the surrounding guide/config/api pages …

    line 137
  27. Distinctive:

    Run through this before you consider the work done:

    line 146
  28. Distinctive:

    When 2+ review comments hit the same code region or invariant, stop and assess for a single root-cause redesign before applying more local …

    line 163

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Feature / Bug-Fix development checklist

This skill is a checklist of guardrails for feature and bug-fix work — reminders to catch missing work during development, then hand off to the more specific workflow when needed. The sections roughly follow a task's lifecycle for easy reading, but treat them as prompts to apply where relevant, not a rigid pipeline.

Confirm intent & scope

Decide what the task actually is before doing any work.

  • If the request is phrased as "review / verify / assess", treat it as investigation — report findings and confirm before implementing anything.
  • When the user enumerates a subset ("only the low items", "core field only", "先只加 skip"), implement exactly that subset and stop.
  • If a fix would span multiple clusters or packages, estimate file/PR size and confirm scope before writing code. Keep one PR per coherent seam.

Build verified context

Gather the real inputs and ground every claim in something you read this session — never answer from memory or impression.

  • For GitHub issues/PRs/checks/reviews, read the linked context before editing; do not implement from the title alone.
  • For external repros, reproduce with the smallest command first (workflow: testing → External repro projects).
  • Identify the smallest user-visible behavior, the affected package(s), and the validation path.
  • Behavioral, root-cause, version, or package-name claims must cite path:line — never answer from recall.
  • To answer "how does vitest/jest/rsbuild/rspack behave?", read the latest upstream source, not the built node_modules dist: if a local clone exists (e.g. ~/Projects/vitest), bring it up to the latest default branch before reading (git pull — a git fetch alone leaves the working tree stale); otherwise shallow-clone fresh (vitest → vitest-dev/vitest; rsbuild/rspack → web-infra-dev/{rsbuild,rspack}; npm view <pkg> repository finds others). Prefer a subagent for the lookup.
  • If you cannot verify, say so explicitly instead of guessing.

Map the blast radius

Before writing code, determine what the change reaches:

QuestionAction
Which packages are touched?List them (@rstest/core, @rstest/browser, etc.)
Does it affect the public API or config schema?If yes → docs update required
Does it change behavior in Node mode?If yes → unit tests + e2e required
Does it change behavior in browser mode?If yes → browser e2e required; see Browser Mode Impact
Could it affect both Node and browser modes?Evaluate both; see Browser Mode Impact
Is the config option also present in Rsbuild?If yes → adapter sync required; see Adapter Impact

Public API / config / CLI checklist

For public API/config/CLI changes, check the full surface in one pass:

  1. Canonical type/default/normalization/runtime consumer.
  2. CLI flag/help/output/error text when applicable.
  3. Adapters (rsbuild, rslib, rspack), browser mode, and docs (en, zh, ApiMeta) impact.
  4. Unit tests for internals/transforms; e2e tests for user-facing behavior.

Implement the minimal Root-Cause fix

Make the smallest design change that resolves the root cause — this is where design-scope decisions belong. For in-file code quality (any/as, defensive checks, one-use abstractions, single source of truth, catch-and-rethrow), defer to the typescript skill rather than restating its rules here.

  • Fix at the single origin of the bug with the fewest lines. Find the one source, not N symptoms.
  • Do not add new config knobs, buffers, heuristics, timeouts, dependencies, abstractions, or mode-specific hacks (e.g. string-replacing the Rspack runtime) unless the user asks. Surface any such need as an explicit decision point or follow-up issue — never take the shortcut silently.
  • Before adding a top-level config option, prove the existing channel (inlineConfig / run params) cannot express it.
  • When aligning behavior with another tool, match the reference impl as the parity target — read its source (the latest upstream clone, per Build Verified Context), not the node_modules dist. Don't harden edges beyond it.

Prove it empirically

Every behavioral change — feature or bug fix — must have a corresponding e2e test. Unit tests alone are not enough; e2e tests verify the full CLI → runner → reporter pipeline.

Decide whether test work is required here. For test layout, fixture strategy, rebuild requirements, and exact commands, switch to the testing skill. For what counts as evidence that the change works — forbidden proxy signals, per-change-shape observation standards — defer to the verify skill rather than restating its rules here.

When test work is required

  • New feature or config behavior → add or extend an e2e test that exercises the user-facing flow.
  • Bug fix → add a regression test that fails before the fix and passes after it.
  • Internal refactor with no observable behavior change → evaluate whether existing coverage is enough, and note why if no new test is added.

Bug-Fix Tests (Flip-and-Verify)

Prove the repro both ways before claiming a fix:

  1. Run the repro against origin/main (unfixed) → confirm it fails.
  2. Run the same repro with your fix applied → confirm it passes.
  3. Add the regression test that captures this delta.

Never present a hypothesis as a conclusion — state confidence explicitly; "I believe" is not "verified".

Browser mode impact

Not every feature needs browser mode support, but you must consciously decide rather than ignore it.

When browser mode needs changes

  • The feature touches test execution, module resolution, or runtime APIs → likely affects browser mode.
  • The feature adds a new config option → check if it should apply in browser mode too.
  • The feature modifies the reporter, CLI output, or test filtering → usually Node-only, but verify.

When browser mode does NOT need changes

  • Pure Node-specific features (e.g., process.env handling, Node module mocking).
  • Internal refactors that don't change the runtime contract.

If browser mode is affected

  1. Keep ownership clear: @rstest/browser = host/protocol/scheduling, @rstest/browser-ui = UI, runner/runtime = execution semantics, provider packages = provider behavior.
  2. Update packages/browser/ if the runtime behavior differs.
  3. Add or update browser e2e coverage via the testing skill.
  4. If the feature requires a new browser fixture, follow the pattern in e2e/browser-mode/fixtures/.
  5. If the feature involves React component testing, check @rstest/browser-react as well.

If browser mode is not affected

Add a brief note in the PR explaining why browser mode is unaffected, so reviewers don't have to ask.

Adapter impact

If the new or changed configuration option also exists in Rsbuild, check whether the adapters (@rstest/adapter-rsbuild, @rstest/adapter-rslib) need to transform it.

When adapters need updates

  • The config option maps to an equivalent Rsbuild/Rslib config field → the adapter must translate it so users' existing Rsbuild configs work seamlessly.
  • A new rstest config is introduced that overlaps with Rsbuild concepts (e.g., resolve, output, source) → evaluate whether the adapter should auto-convert.

Testing adapters

  • If @rstest/core already has an e2e test covering the underlying feature, do not duplicate it in the adapter package. Prefer a unit test inside the adapter package (packages/adapter-rsbuild/ or packages/adapter-rslib/) that verifies the config transformation logic.
  • Only add a separate adapter e2e test (e2e/adapterTransformImport/) when the transformation itself has complex behavior that unit tests cannot adequately cover.

Adapter docs

  • Update adapter-specific documentation when a new transform is added, so users know which Rsbuild configs are auto-converted.

Keep docs in sync

Documentation is not a follow-up task — it ships with the code. Do not merge features without docs.

Route the docs work

  • Public API, config, CLI, or behavior changes usually require docs updates.
  • Treat this as the routing step: identify that docs must be updated, then inspect the existing docs structure under website/docs/en/ and website/docs/zh/ to edit the right pages.
  • If the change introduces a new docs surface or convention, follow the established structure in the surrounding guide/config/api pages instead of guessing a new location.

Docs conventions

  • Writing style, format, bilingual sync, and ApiMeta marker rules are owned by website/AGENTS.md — read it before editing docs rather than restating its rules here.
  • Signature fidelity: if you changed a public type in packages/core/src/types/, or edited a **Type:** / **类型:** block, run the api-doc-sync skill. The doc signatures are hand-written copies of the real types and drift silently (missing overloads, wrong arg order, en/zh divergence); api-doc-sync grounds them against source and tsc.

Self-Check Before committing

Run through this before you consider the work done:

  • Unit tests cover the new/changed logic in the relevant package
  • E2E test covers the feature/fix end-to-end (see Prove It Empirically)
  • Browser mode impact evaluated — either updated or noted as unaffected
  • Adapter sync evaluated — config transforms updated or noted as N/A
  • Docs updated in both en/ and zh/
  • Public type surface matches docs — TS declarations and website/docs/{en,zh} agree (e.g. TestOptions.timeout?: number is reflected for describe/test)
  • Types are correct — no new any leaking into public APIs (rule owned by the typescript skill)
  • Unused exports / files checked — run pnpm run check-unused before wrapping up (rule owned by the testing skill's validation pass)
  • Build passes — pnpm --filter <package> build succeeds
  • Existing tests still pass — pnpm test and relevant e2e tests green

Handle review feedback by redesign

Review feedback arrives after you commit — resolve it by redesign, not more local patches.

  • When 2+ review comments hit the same code region or invariant, stop and assess for a single root-cause redesign before applying more local patches.
  • Flag any fix that creates the next finding (self-inflicted), and any field/option consumed only by tests — both are smells that the patch moved the bug rather than fixing it.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.