diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..ff60351 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,36 @@ +# Agent Guidelines + +Instructions for AI agents working on this repository. + +## Branch Naming and Commit Conventions + +Branch names must use a conventional commit prefix (e.g., `feat/`, `fix/`, `chore/`). This is enforced by CI. See `CONTRIBUTING.md` for the full list of allowed types and commit message format. + +## Do Not Commit Build Artifacts + +The `dist/` folder, `CHANGELOG.md`, and version bumps in `package.json`/`package-lock.json` are all generated by the CI/CD release process. Only commit changes to source (`src/`) and test (`test/`) files. + +## Git Push (SAML SSO) + +The `mparticle-integrations` GitHub org enforces SAML SSO. SSH push will fail. To push: + +1. Run `gh auth setup-git` to configure the git credential helper. +2. Temporarily switch the remote to HTTPS: `git remote set-url origin https://github.com/mparticle-integrations/mparticle-javascript-integration-rokt.git` +3. Push the branch. +4. Restore the SSH remote: `git remote set-url origin git@github.com:mparticle-integrations/mparticle-javascript-integration-rokt.git` + +## Running Tests + +```bash +npm install +npm test -- --browsers ChromeHeadless # FirefoxHeadless may not be available +``` + +## Linting + +```bash +npm run lint # check +npm run lint:fix # auto-fix +``` + +Always run lint before pushing. The CI enforces Prettier formatting.