Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
## Critical rules

- **Target branch:** `unstable` (never `stable`)
- **Pre-push:** run `pnpm lint`, `pnpm check-types`, `pnpm test:unit` before every push
Comment thread
nflaig marked this conversation as resolved.
- **Pre-push:** run only checks relevant to the change; prefer targeted tests and do not run the full
`pnpm test:unit` suite by default
- **Relative imports:** use `.js` extension in TypeScript ESM imports
- **No `any`:** avoid `any` / `as any`; use proper types or justified `biome-ignore`
- **No `lib/` edits:** never edit `packages/*/lib/` — these are build outputs
Expand Down Expand Up @@ -346,29 +347,32 @@ refactor(reqresp)!: support byte based handlers

## Pre-push checklist

Before pushing any commit, verify:
Before pushing any commit, run only the checks relevant to the changed files and behavior:

1. `pnpm lint` — Biome enforces formatting; CI catches failures but wastes a round-trip
2. `pnpm check-types` — catch type errors before CI
3. `pnpm docs:lint` — if you edited any `.md` files, check Prettier formatting
4. No edits in `packages/*/lib/` — these are build outputs; edit `src/` instead
1. `pnpm lint` — when changing files covered by Biome
2. `pnpm check-types` — when changing TypeScript, public APIs, or types
3. Targeted tests for the changed behavior, when applicable. Do not run the full `pnpm test:unit` suite
by default; reserve it for broad changes that cannot be covered adequately by targeted tests or when
explicitly requested
4. `pnpm docs:lint` — if you edited any `.md` files, check Prettier formatting
5. No edits in `packages/*/lib/` — these are build outputs; edit `src/` instead

## Common tasks

### Adding a new feature

1. Create a feature branch from `unstable`
2. Implement the feature with tests
3. Run `pnpm lint` and `pnpm check-types`
4. Run `pnpm test:unit` to verify tests pass
3. Run `pnpm lint` and `pnpm check-types` when applicable
4. Run the targeted tests for the feature
5. Open PR with clear description and any AI disclosure

### Fixing a bug

1. Write a failing test that reproduces the bug
2. Fix the bug
3. Verify the test passes
4. Run checks: `pnpm lint`, `pnpm check-types`, `pnpm test:unit`
4. Run targeted tests for the affected area, plus `pnpm lint` and `pnpm check-types` when applicable

### Adding a new SSZ type

Expand Down
Loading