diff --git a/AGENTS.md b/AGENTS.md index b59ff39..b831ef6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -38,6 +38,22 @@ just ci # format → lint → build → test - `src/types.ts` — payloads/responses - `action.yml` — inputs/outputs +## Pre-commit / pre-PR gate (required) + +Mirrors GitHub Actions `ci.yml` on PRs: lint, test, build, and **committed `dist/` must match build**. + +| When | Command | Notes | +|------|---------|--------| +| **Final handoff (required)** | `just ci` | format → lint → build → tests | +| CI-equivalent | `npm ci && npm run lint && npm test && npm run build` then ensure `dist/` clean | CI also fails if dist dirty / out of date | +| After source changes | `just build` and **commit `dist/`** | required for Action consumers | + +**Rules for agents** +1. Run **`just ci`** before commit/push. +2. If `src/` changed, rebuild and **include `dist/`** in the commit (excluding flaky absolute-path `.map` noise if tooling touches them — CI ignores `.map` diffs in one check but still requires up-to-date bundle). +3. Do not hand off with an outdated `dist/`. +4. Note commands + results on the card/PR. + ## Local conventions - Follow existing patterns