Loading...

AI Guardrails — Pre-Submission Checks

RULES.md

Before editing in a repo, read its `AGENTS.md` and the `scripts` in its `package.json` to find the lint, format and test commands it expects; do not assume a check you ran elsewhere is the one it uses. Before pushing code or opening a PR, run the repo's `precheck` script (`npm run precheck`; `yarn precheck` in `webcomponents`), fix every failure it reports, and re-run until it passes (`precheck:fix` repairs formatting and fixable lint). Run it again after your last commit, not only after the first. Repos with a `precheck` script (`create`, `haxcms-nodejs`, `webcomponents`) also block `git push` and `gh pr create` via a Claude Code hook, but that hook only fires for those commands, run from inside that repo; a PR opened another way (for example `gh api` where GraphQL is unavailable) or from another working directory is not checked, so run `precheck` yourself first. Do not bypass it by loosening lint or format configs, adding ignore entries, or skipping hooks. ESLint alone is not a substitute: it commonly ignores test files, which Prettier still checks, so a new test file can pass lint and fail format. In a repo without `precheck` (for example `haxcms-php`), run its test suite and any lint or format-check scripts it has on the files you changed, and say in the PR description what you ran. In a sparse or partial checkout where `precheck` or its config is missing, run Prettier and ESLint directly with the repo's own config on the changed files, and say what could not be run. After pushing, check the PR's CI results (`gh pr checks`, or the REST API where GraphQL is unavailable) and, if a check fails, read its logs, fix the cause, and push again. In PRAW RULES.md (scope: global). Nothing enforces this yet.

Status: gap

Connects to

Links