From 4883df961e3ae13f4a6b6bb1e3fdab06cf76c8cc Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 6 Apr 2026 20:49:23 +0000 Subject: [PATCH 1/3] docs: add AGENTS.md with Cursor Cloud specific instructions --- AGENTS.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..fee3f2c5 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,45 @@ +# AGENTS.md + +## Cursor Cloud specific instructions + +This is the Node.js API documentation generator (`@node-core/doc-kit`). It is a single-package Node.js CLI tool (no monorepo, no Docker, no external services). + +### Runtime + +- Requires **Node.js 24** (see `.nvmrc`). Use `nvm install 24 && nvm use 24` if not already active. +- Package manager is **npm** (lockfile: `package-lock.json`). + +### Key commands + +All standard dev commands are in `package.json` `scripts` and documented in `CONTRIBUTING.md`: + +| Task | Command | +|---|---| +| Install deps | `npm install` | +| Lint | `node --run lint` | +| Format check | `node --run format` | +| Tests | `node --run test` | +| Tests + coverage | `node --run test:coverage` | +| Run CLI | `node bin/cli.mjs` | + +### Running the tool locally + +To actually generate docs you need Node.js API markdown sources. Sparse-clone them: + +```bash +git clone --depth 1 --sparse https://github.com/nodejs/node.git /tmp/node +cd /tmp/node && git sparse-checkout set --skip-checks doc/api lib CHANGELOG.md +``` + +Then run against a single file for fast iteration: + +```bash +node bin/cli.mjs generate -t legacy-html -i /tmp/node/doc/api/fs.md -o /tmp/out --index /tmp/node/doc/api/index.md -c /tmp/node/CHANGELOG.md +``` + +### Non-obvious caveats + +- The `git sparse-checkout set` command needs `--skip-checks` when including individual files like `CHANGELOG.md` (not directories). +- Pre-commit hook (`npx lint-staged`) runs ESLint + Prettier on staged `.js`/`.mjs`/`.jsx` files. Use `--no-verify` to bypass if needed. +- Tests use Node.js built-in test runner with `--experimental-test-module-mocks` flag (already configured in `package.json` scripts). +- ESLint produces 2 warnings in `src/generators/web/ui/hooks/useOrama.mjs` — these are pre-existing and not errors. From 4d8a571b3542a0d6a985b41b2c7e6beab7248190 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 6 Apr 2026 20:51:07 +0000 Subject: [PATCH 2/3] style: format AGENTS.md with Prettier --- AGENTS.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index fee3f2c5..ad852a2c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -13,14 +13,14 @@ This is the Node.js API documentation generator (`@node-core/doc-kit`). It is a All standard dev commands are in `package.json` `scripts` and documented in `CONTRIBUTING.md`: -| Task | Command | -|---|---| -| Install deps | `npm install` | -| Lint | `node --run lint` | -| Format check | `node --run format` | -| Tests | `node --run test` | +| Task | Command | +| ---------------- | -------------------------- | +| Install deps | `npm install` | +| Lint | `node --run lint` | +| Format check | `node --run format` | +| Tests | `node --run test` | | Tests + coverage | `node --run test:coverage` | -| Run CLI | `node bin/cli.mjs` | +| Run CLI | `node bin/cli.mjs` | ### Running the tool locally From 8246a147664465fa426a387e2a3727d79c3e873f Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 6 Apr 2026 20:54:29 +0000 Subject: [PATCH 3/3] docs: use LTS instead of hardcoded Node 24 in AGENTS.md --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index ad852a2c..c5be84e9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -6,7 +6,7 @@ This is the Node.js API documentation generator (`@node-core/doc-kit`). It is a ### Runtime -- Requires **Node.js 24** (see `.nvmrc`). Use `nvm install 24 && nvm use 24` if not already active. +- Requires the **Node.js LTS** version specified in `.nvmrc`. Use `nvm install --lts && nvm use --lts` if not already active. - Package manager is **npm** (lockfile: `package-lock.json`). ### Key commands