{"owner":"ueberdosis","repo":"tiptap","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md"],"files":{"AGENTS.md":"# Tiptap\n\nHeadless rich text editor toolkit built on ProseMirror. A monorepo of small packages: a framework-agnostic core and extensions, plus React and Vue bindings.\n\nPublished 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`.\n\n## Rules\n\n- Small, single-purpose diffs. Ask the user to review. Never autocommit.\n- Add a changeset for user-facing changes. Public API breaks need a major bump and migration notes.\n- Add or update a demo and tests for user-visible behavior. Prefer unit tests over e2e when deterministic.\n- Fix fallow findings your change introduced. Don't suppress them.\n\n## Before opening a PR\n\n```bash\npnpm lint\npnpm build\npnpm test:unit\npnpm test:e2e\npnpm fallow:audit   # verdict must be pass or warn, never fail\n```\n\nSingle package failing types: `pnpm -w -F @tiptap/core build`.\nDependency or lockfile errors: `pnpm reset`, then rebuild.\n\n## Code style\n\noxlint lints, oxfmt formats. Husky and lint-staged run both on commit.\n\nPrefer 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.\n\n### Files\n\n- Keep files small and focused. Split unrelated utilities, types, constants and logic apart.\n- One reusable utility per file, named after its export: `findDecorations.ts`, `addDecoration.ts`. Not `utils.ts`, `helpers.ts`, `decorations.ts`.\n- A helper used in one file only can stay local.\n\n### Naming\n\n- Short, clear, recognizable. Never shorten just to save characters. No unclear abbreviations.\n- `index` for numeric indexes, the item's real name for collection values. Single letters only in small math contexts like `x` and `y`.\n- Use existing project terminology.\n\n```ts\n// good\nitems.map((item, index) => createNode(item, index))\ndecorations.filter(decoration => decoration.visible)\n\n// bad\nitems.map((i, idx) => createNode(i, idx))\ndecorations.filter(d => d.visible)\n```\n\n### Comments\n\n- Comment only when the reason is not visible in the code. Never restate what the lines below already say.\n- Two lines max. Only genuinely complex or hard to follow code earns more.\n- Say why, not what: `// We keep the old value because the transaction may be reverted.`\n- JSDoc on public APIs with `@param`, `@returns` and a runnable example. Those examples generate our API docs.\n\n### Writing\n\nShort, simple English in comments, docs, changesets and PRs. Most important information first. Assume the reader is new to the project or not a native speaker. No filler.\n\n### Before you finish\n\nSimplify what is hard to follow. Remove needless nesting and abstractions. Split large or unfocused files. Move reusable utilities into their own files. Drop redundant comments.\n\nThen run `pnpm fallow` for complexity and dead code, `pnpm fallow:health` for refactor targets, and `pnpm fallow:audit` on your changes.\n\n## Tests\n\n- Unit: Vitest, in `packages/**/__tests__/`, running on happy-dom.\n- E2E: Playwright, next to the demo it drives as `demos/src/**/index.spec.ts`. Playwright starts the demo server itself on port 4080, no separate terminal. Helpers live in `demos/test/helpers.ts`. Copy `demos/src/Commands/Cut/index.spec.ts` as a template.\n\n## Demos\n\n- Path pattern is `demos/src/<Category>/<DemoName>/<Variant>`, for example `demos/src/Marks/Bold/React`. Scaffold with `pnpm make:demo`.\n- Every demo needs an empty `index.html`. Vite routes by filesystem and ignores folders without it.\n- Import from `@tiptap/core` and friends, never relative paths. The demos `tsconfig.json` aliases those to the local package sources.\n- Reuse the global styles in `demos/setup/style.scss`: `.button-group` for rows of buttons, `.control-group` to wrap a toolbar, `.output-group` for demo output. Don't style `.tiptap`, that is the editor content itself.\n\n## Changesets\n\nRun `pnpm changeset`, or write the file yourself as `.changeset/YYYY-MM-DD-short-description.md`:\n\n```markdown\n---\n'@tiptap/core': patch\n---\n\nOne short sentence on what changed for the user.\n```\n\nDescribe behavior users notice. No internals, no root-cause detail. `.github/publish-config.json` decides which branches publish and under which npm tag.\n\n## Docs\n\nUser-facing documentation lives in the separate `ueberdosis/tiptap-docs` repo. Ask the user for the local path when you need to change it.\n"}}