# AGENTS.md

A tool for writing better scripts

## Setup

```
npm ci
```

## Commands

```
npm run build            # produce a build
npm run test             # run the test suite, must pass before any commit
npm run fmt
npm run fmt:check
npm run prebuild
npm run build:js
npm run build:vendor
npm run build:versions
```

## Layout

- `test/`     33 source files
- `build/`    31 source files
- `src/`      17 source files
- `scripts/`  12 source files
- `examples/` 7 source files
- `docs/`     3 source files

## Conventions

- Tests live alongside the code they cover, following `test/all.test.js`.
- TypeScript runs in strict mode. Type errors are the fastest feedback available, so do not weaken it.
- CI defines what passing means. See `.github/workflows/codeql.yml`, and keep it green.
- TODO: add the two or three conventions a newcomer always gets wrong here.

## Gotchas

- Generated output is committed (`build/`). Search will return the compiled copy, so edit the source, not that.
- `build/vendor-extra.cjs` is 745KB. It will not fit comfortably in context, so read it in parts.

---

Drafted by agentreadme.com from what is in this repository. Everything marked TODO
needs a human. Check it in as AGENTS.md at the root.
