Skip to content

Commit 4883df9

Browse files
committed
docs: add AGENTS.md with Cursor Cloud specific instructions
1 parent b2330d9 commit 4883df9

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# AGENTS.md
2+
3+
## Cursor Cloud specific instructions
4+
5+
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).
6+
7+
### Runtime
8+
9+
- Requires **Node.js 24** (see `.nvmrc`). Use `nvm install 24 && nvm use 24` if not already active.
10+
- Package manager is **npm** (lockfile: `package-lock.json`).
11+
12+
### Key commands
13+
14+
All standard dev commands are in `package.json` `scripts` and documented in `CONTRIBUTING.md`:
15+
16+
| Task | Command |
17+
|---|---|
18+
| Install deps | `npm install` |
19+
| Lint | `node --run lint` |
20+
| Format check | `node --run format` |
21+
| Tests | `node --run test` |
22+
| Tests + coverage | `node --run test:coverage` |
23+
| Run CLI | `node bin/cli.mjs` |
24+
25+
### Running the tool locally
26+
27+
To actually generate docs you need Node.js API markdown sources. Sparse-clone them:
28+
29+
```bash
30+
git clone --depth 1 --sparse https://github.com/nodejs/node.git /tmp/node
31+
cd /tmp/node && git sparse-checkout set --skip-checks doc/api lib CHANGELOG.md
32+
```
33+
34+
Then run against a single file for fast iteration:
35+
36+
```bash
37+
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
38+
```
39+
40+
### Non-obvious caveats
41+
42+
- The `git sparse-checkout set` command needs `--skip-checks` when including individual files like `CHANGELOG.md` (not directories).
43+
- Pre-commit hook (`npx lint-staged`) runs ESLint + Prettier on staged `.js`/`.mjs`/`.jsx` files. Use `--no-verify` to bypass if needed.
44+
- Tests use Node.js built-in test runner with `--experimental-test-module-mocks` flag (already configured in `package.json` scripts).
45+
- ESLint produces 2 warnings in `src/generators/web/ui/hooks/useOrama.mjs` — these are pre-existing and not errors.

0 commit comments

Comments
 (0)