Skip to content

Commit fb045ce

Browse files
Merge pull request #64 from simpleanalytics/codex/create-agents.md-file [no ci]
Add AGENTS instructions
2 parents 779661a + fbdd6ee commit fb045ce

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

.cursorrules

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Check AGENTS.md for instructions specifically for AI
2+
- Check README.md for instructions

AGENTS.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Agent Instructions
2+
3+
This repository contains the public scripts for Simple Analytics. When making changes keep the following points in mind.
4+
5+
## Development
6+
7+
- Use **Node.js 22.16** (see `.nvmrc`).
8+
- Run `npm run build` to compile the scripts. This generates the files in `dist/` which should be committed.
9+
- Format code with Prettier before committing. You can run `npx prettier -w .` or validate with `npm run prettier`.
10+
11+
## Testing
12+
13+
- Execute `npm run test:unit` to run the unit tests
14+
- When adding a new feature or fixing a bug, please add a test.
15+
- For every change, run `npm run build` to ensure the test uses the latest compiled version.
16+
- Ignore most files in the `dist/` directory when checking for diffs, just check `dist/latest/latest.dev.js` and `dist/latest/auto-events.js` (whichever is relevant).
17+
- Only tests in `test/unit/` are relevant for the AI and agents (it can run without internet access).
18+
19+
## References
20+
21+
Most work happens in `src/` with `compile.js` creating the distributable versions. Read `README.md` for more details about contributing and running scripts locally.

0 commit comments

Comments
 (0)