diff --git a/.changeset/thirty-frogs-repeat.md b/.changeset/thirty-frogs-repeat.md deleted file mode 100644 index f631cd2318..0000000000 --- a/.changeset/thirty-frogs-repeat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@tiptap/extension-find-and-replace": patch ---- - -Ensure only the active find-and-replace result keeps the current-result highlight while navigating matches. \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md index a902eaa1dd..aa99f710a6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,103 +1,100 @@ # Tiptap -How to work on the Tiptap monorepo. Written for humans and AI coding assistants. +Headless rich text editor toolkit built on ProseMirror. A monorepo of small packages: a framework-agnostic core and extensions, plus React and Vue bindings. -**IMPORTANT for AI agents**: Read the [Resources](#resources) sub-pages before contributing. They cover repo layout, scripts, coding standards, tests, demos, docs, and versioning. Come back to them when unsure. +Published packages live in `packages/*`. `demos/` is a Vite app used as playground and as the target for e2e tests. All scripts are in the root `package.json`. ---- +## Rules -## What is Tiptap +- Small, single-purpose diffs. Ask the user to review. Never autocommit. +- Add a changeset for user-facing changes. Public API breaks need a major bump and migration notes. +- Add or update a demo and tests for user-visible behavior. Prefer unit tests over e2e when deterministic. +- Fix fallow findings your change introduced. Don't suppress them. -- Headless rich text editor toolkit built on ProseMirror. Small Core + opt-in Extensions for React, Vue, or vanilla. -- A collection of focused packages. Many are framework-agnostic with separate bindings for React and Vue. -- Favor small pure utilities, deterministic code, explicit side effects. -- Keep packages modular. Breaking changes need a major bump and a migration path. -- Add or update demos and tests when introducing a feature. +## Before opening a PR ---- +```bash +pnpm lint +pnpm build +pnpm test:unit +pnpm test:e2e +pnpm fallow:audit # verdict must be pass or warn, never fail +``` -## AI contributor rules +Single package failing types: `pnpm -w -F @tiptap/core build`. +Dependency or lockfile errors: `pnpm reset`, then rebuild. -- Work in small, iterative steps. If a task is too broad, say so and propose smaller steps. -- After changes, ask the user to review them. -- Keep PR descriptions short, clear, and easy to read. Use simple English and explain why the change is needed. -- Make single-purpose, small diffs. No sweeping changes in one PR. -- Never autocommit. Ask before committing or opening PRs. -- Run the [validation checklist](#validation-run-before-opening-a-pr) after edits. -- Add a Changeset for user-facing changes. No public API changes without a major bump and migration notes. -- Add or update a demo and tests for user-visible behavior. Prefer unit tests over e2e when deterministic. +## Code style ---- +oxlint lints, oxfmt formats. Husky and lint-staged run both on commit. -## Key scripts +Prefer simple, readable code over clever code. Use early returns. Avoid deep nesting, nested ternaries, and abstractions you don't need yet. Keep functions focused. Apply DRY and SOLID pragmatically, not blindly. -Run from the repo root with `pnpm