AGENTS.md
This file
AGENTS.md
Conventions
nullis not an accepted value anywhere in this project. Options, hook lists, arguments and hook state all useundefinedto mean absent, and passingnullis a mistake that should be reported as one rather than quietly treated asundefined. Do not addnull-tolerant branches, do not widen a type to includenull, and do not default anullparameter to another value. When a caller can plausibly writenull, the fix is a clear error that names the option, not a fallback. The one exception is thesignaloption, which acceptsnullforRequestInitcompatibility and treats it as absent.
Contributing to github.com/sindresorhus/ky
This project takes changes through Myr: an answer to one of its asks lands only by passing the gate. This block is generated from the config folder, and the gate decides what lands. The full guide is the ky-contribute skill (.agents/skills/ky-contribute/SKILL.md).
It needs the Myr CLI (the install script on the platform's /install page) signed in with myr login --url <platform>, and runs in a clone of the project, git clone <platform>/github.com/sindresorhus/ky.git, where <platform> is the host this project lives on: in such a clone, git remote get-url origin names it.
- Read the ask, then claim it:
myr ask <ask>, thenmyr claim <ask>. The claim prints your fork's remote; add it withgit remote add myr <remote>. - Work inside the ask's territory until its check passes.
- Run
myr check. It gives the refusals a push would get, then runs the ask's check and the project's lanes; fix everything it reports. - Push your answer to your fork:
git push myr HEAD:main. The push itself can be refused, on git'sremote:lines. - Wait for the verdict: the rest of the checks run on the platform after git returns. Run
myr status --jsonuntil your answer'soutcome._tagis no longerChecking, then read the verdict on your head:git fetch myr refs/notes/myr:refs/notes/myr, thengit notes --ref=myr show HEAD. It is JSON: match on its_tag, and run a refusal'snext.
- Change only files in the ask's territory; a push that changes anything else is refused with
OutOfScope. - Never change the judge closure (
.myr/**,**/.env.schema,**/.env.*,!**/.env.local,!**/.env.*.local,.github/workflows/**,.github/actions/**,.forgejo/**,**/vitest.config.*,**/vitest.*.config.*,**/vitest.workspace.*,**/vite.config.*,**/oxlint.config.*,**/oxlint.*.config.*,**/.oxlintrc*,**/eslint.config.*,**/eslint.*.config.*,**/.eslintrc*,**/tsconfig*.json,tools/oxlint/**,.agents/skills/*-contribute/**,.claude/skills/*-contribute/**,**/bunfig.toml,pnpm-workspace.yaml,**/turbo.json,**/turbo.jsonc,nx.json,.yarnrc.yml,.yarn/plugins/**,.yarn/releases/**,**/oxfmt.config.*,**/.oxfmtrc*,**/biome.json*,**/.prettierrc*,**/prettier.config.*,.claude/settings*.json,.cursor/hooks.json,.codex/hooks.json,.codex/config.toml,.github/hooks/*.json,.github/copilot/settings.json,.gemini/settings.json,.pi/**,.opencode/plugins/**,.amp/plugins/**,lefthook.yml,lefthook.yaml,.lefthook.yml,.lefthook.yaml,.lefthook/**,.husky/**,.pre-commit-config.yaml,test/browser.ts,test/helpers/create-http-test-server.ts,test/helpers/parse-body.ts,test/helpers/with-page.ts,tsconfig.json,package.json#/scripts); a push that does is refused withTouchedJudge. - Test one file with
npx ava 'test/**' '!test/browser.ts' {path}. The lanes arebuild(npm run build),test(npm test -- test/browser.ts) andunit(npx ava 'test/**' '!test/browser.ts'). - Every refusal has a
_tag,retryableandnext: runnext. Add--jsonto any command for JSON.
No fence yet: nothing checks these, so the gate won't refuse you for them.
- Keep an answer to its ask's want. The gate holds the files you change to the territory, but nothing measures how much you change inside it.
- Name the agent you work through. A landing carries an
Assisted-by:trailer for the agent your harness's environment names; a harness that names none goes unnamed.