# A small, reproducible AI-editor exercise

Requires Node.js 22 or later. No dependencies, account, API key or network access is needed to run the tests. An editor's AI assistance may consume your account allowance; it is optional for the exercise itself.

Unzip this folder, open it in an editor, then run:

```sh
node --test slugify.test.mjs
```

The intentionally incomplete starter passes 2 of 9 cases and fails 7. Ask the editor to read AGENTS.md and the tests, propose a minimal fix, implement only starter.mjs, then rerun the command. Do not let it remove assertions or change expected outputs. Review the full diff before accepting the change. For a Git diff, create a local exercise repository before editing:

```sh
git init
git add .
git -c user.name='Exercise' -c user.email='exercise@example.invalid' commit -m 'Exercise starter'
```

After implementing, run `git diff --check` and `git diff -- starter.mjs`. These are local commands: they do not publish anything.

To check the supplied reference, preserve your attempt first, then run:

```sh
cp starter.mjs my-attempt.mjs
cp reference.mjs starter.mjs
node --test slugify.test.mjs
```

The reference passes all 9 examples. Expected output is an ASCII URL slug, with Latin accents normalized and non-Latin-only input mapped to an empty string. Do not use this as a complete international slug library, an input validator, or a uniqueness guarantee. Browser demo uses the same cases.mjs, starter.mjs and reference.mjs. Local baseline logs were captured 2026-09-21. Those logs verify this exercise; they are not measurements of Cursor or Devin performance.
