|
| 1 | +# AGENTS.md |
| 2 | + |
| 3 | +## Purpose |
| 4 | + |
| 5 | +This is a working guide for contributors and coding agents in this repository. |
| 6 | +It captures practical rules that prevent avoidable CI and PR churn. |
| 7 | + |
| 8 | +## Development Expectations |
| 9 | + |
| 10 | +- If a public API changes, update the relevant docs in the same PR. |
| 11 | +- Tests should verify observable behavior changes, not only internal/config state. |
| 12 | + - Example: for a security option, assert a real secure/insecure behavior difference. |
| 13 | + |
| 14 | +## Permission and Escalation |
| 15 | + |
| 16 | +- `npm install` requires escalated permissions for outbound network access to npm registries. |
| 17 | +- `npm test` commands should b`e run with escalation so tests can access the Docker socket. |
| 18 | + |
| 19 | +### Escalation hygiene |
| 20 | + |
| 21 | +- Use specific commands and clear justifications. |
| 22 | +- Prefer narrow reruns rather than broad full-suite reruns when iterating. |
| 23 | + |
| 24 | +## PR Process |
| 25 | + |
| 26 | +1. Start from `main`. |
| 27 | +2. Create a branch prefixed with `codex/`. |
| 28 | +3. Implement scoped changes only. |
| 29 | +4. Run required checks: `npm run format`, `npm run lint`, and targeted tests. |
| 30 | +5. Verify git diff only contains intended files. |
| 31 | +6. Commit with focused message(s). |
| 32 | +7. Push branch. |
| 33 | +8. Open PR against `main` using a human-readable title (no `feat(...)` / `fix(...)` prefixes). |
| 34 | +9. Add labels for both change type and semantic version impact. |
| 35 | +10. Ensure PR body includes: |
| 36 | + - summary of changes |
| 37 | + - verification commands run |
| 38 | + - test results summary |
| 39 | + - `Closes #<issue>` |
| 40 | + |
| 41 | +## Labels |
| 42 | + |
| 43 | +### Change type |
| 44 | + |
| 45 | +- `enhancement` |
| 46 | +- `bug` |
| 47 | +- `dependencies` |
| 48 | +- `documentation` |
| 49 | +- `maintenance` |
| 50 | + |
| 51 | +### Semver impact |
| 52 | + |
| 53 | +- `major` |
| 54 | +- `minor` |
| 55 | +- `patch` |
| 56 | + |
| 57 | +### Common mappings |
| 58 | + |
| 59 | +- backward-compatible feature: `enhancement` + `minor` |
| 60 | +- backward-compatible bug fix: `bug` + `patch` |
| 61 | +- breaking change: type label + `major` |
| 62 | +- docs-only change: `documentation` + usually `patch` |
| 63 | +- dependency update: `dependencies` + impact label based on user-facing effect |
| 64 | + |
| 65 | +## Practical Note |
| 66 | + |
| 67 | +- Recheck `package-lock.json` after `npm install` for unrelated drift and revert unrelated changes. |
0 commit comments