Imported from afahy/fluent-measures (
AGENTS.md). Install upstream withnpx skills add afahy/fluent-measures. Copyright stays with the author.
Repository instructions for coding agents
Commands
Run these commands from the repository root:
pnpm installinstalls dependencies.pnpm lintruns ESLint, Prettier checks, and the spell checker.pnpm testruns the unit tests and TypeScript (tsc) checks.pnpm test:unit:coverageruns the unit tests with coverage.pnpm buildbuilds the package.
Pull request rules
- Use one Linear ticket per PR. Reference it only on the
Fixesline of the PR template, asFixes AFA-n. If the PR covers only part of the ticket, writePart of AFA-ninstead, so Linear doesn't close the ticket when the PR merges. Don't put the ticket ID in the PR title. - Every bug fix must add a regression test built from the ticket's failure inputs. Confirm
that the test fails on
mainand passes with the fix, and say that you checked this in the PR body. - Never skip, delete, loosen, or mark an existing test as expected to fail just to make CI pass.
- Add a changeset with
pnpm changesetfor any change tosrc/or topackage.jsonfields that affect consumers. - Commit messages and PR titles follow Conventional Commits, as configured in
commitlint.config.js. CI checks both, and checks titles againstcommitlint.pr-title.config.jsas well. Write PR titles astype: summary, for examplefix: make the changeset reminder non-blocking. Allowed types arefeat,fix,docs,style,refactor,perf,test,build,ci,choreandrevert. A scope is optional, and the only allowed scopes arecore,docs,deps,ciandconfig. Keep titles to 65 characters or fewer: squash merging appends(#NN), and the commit onmainmust fit in 72. - The ESLint config is
eslint.config.js..eslintrc.jsonis unused; do not edit it. - README examples are the public specification. When code and README disagree, follow the ticket's direction about which one changes. If the ticket does not say, ask on the ticket.
- Do not edit files listed in
.github/CODEOWNERSunless the ticket asks for it. - Never merge a PR or use a branch-protection bypass. Do not enable auto-merge until AFA-29 is complete. Agents open PRs from the maintainer's GitHub account, so this rule keeps merging a human step.
- Write every PR description from
.github/pull_request_template.md. Keep all of its headings in the same order and fill in each section; don't replace it with your own format. Fill in theFixesline as rule 1 says. Under "Type of change", delete the options that don't apply. Under "How Has This Been Tested?", replaceTest AandTest Bwith the commands you ran and, for a bug fix, the check from rule 2. Tick only the checklist items that are true. Don't change the version inpackage.json; changesets sets it at release time.