{"owner":"loro-dev","repo":"loro","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md"],"skills":{"AGENTS.md":"# Repository Guidelines\n\n## Project Snapshot\n\nLoro is a Rust CRDT workspace with JS/WASM packaging and a MoonBit codec.\n\n- `crates/loro`: public Rust API; avoid breaking downstream users.\n- `crates/loro-internal`: core CRDT logic. Read its\n  [AGENTS.md](crates/loro-internal/AGENTS.md) before changing import/export,\n  encoding, state, diff, checkout, or replay behavior.\n- `crates/loro-wasm`: `loro-crdt` WASM/TypeScript package. Read its\n  [AGENTS.md](crates/loro-wasm/AGENTS.md) before changing bindings, exports,\n  wrappers, or build scripts.\n- `crates/delta`, `crates/rle`, `crates/kv-store`, `crates/fractional_index`,\n  `crates/loro-common`, and `packages/fractional-index`: shared primitives and\n  packages.\n- `moon/`: MoonBit Loro binary codec; use [skills/moonbit/SKILL.md](skills/moonbit/SKILL.md).\n\n## Context Index\n\n- Encoding/import/export modes, current vs outdated formats, shallow snapshots:\n  [context/internal-encoding.md](context/internal-encoding.md).\n- Mergeable container model, marker/cid rules, tests, and common pitfalls:\n  [context/mergeable-containers.md](context/mergeable-containers.md).\n- `import_batch` force-detach, batch-wide rollback scope, and the never-exit-detached\n  invariant: [context/import-batch-atomicity.md](context/import-batch-atomicity.md).\n- Shallow-snapshot dead-style redaction (null-only, both-expand exclusion,\n  root-whitelisted latest state):\n  [context/shallow-snapshot-style-redaction.md](context/shallow-snapshot-style-redaction.md).\n- User-facing Loro usage, sync, editor integration, and performance guidance:\n  [skills/loro/SKILL.md](skills/loro/SKILL.md).\n- Pure TypeScript runtime indexes, complexity contracts, benchmarks, and remaining gaps:\n  [context/loro-js-performance.md](context/loro-js-performance.md).\n- WASM panic/OOM reporting channels, `__wbindgen_start` glue invariant, and\n  trap-testing recipes:\n  [context/wasm-error-reporting.md](context/wasm-error-reporting.md).\n- Context backlog: [context/CONTEXT-GAPS.md](context/CONTEXT-GAPS.md).\n\n## Commands\n\n- JS deps: `pnpm install --frozen-lockfile`.\n- Rust build/check/format/lint: `cargo build`, `cargo check -p loro-internal`,\n  `cargo fmt --all`, `pnpm check`.\n- Rust tests: `pnpm test`; internal doctests: `cargo test -p loro-internal --doc`.\n- Loom: `pnpm test-loom`.\n- WASM: `pnpm release-wasm`, or `pnpm -C crates/loro-wasm build-dev`.\n- Bundlers after WASM packaging changes: `pnpm test-bundlers`; browser runtime:\n  `pnpm --dir examples/bundler-smoke-tests run test:browser`.\n- Fractional-index TS: `pnpm test-fractional-index`.\n- Fuzz smoke: `pnpm run-fuzz-corpus`.\n- MoonBit codec, when `moon` is available: from `moon/`, run `moon check`,\n  `moon test`, `moon fmt`.\n\nUse narrow checks first. Ask before broad fuzzing or long browser matrices.\n\n## Working Rules\n\n- Start with `git status --short --branch`; treat uncommitted changes as user\n  work unless you made them.\n- Before editing, read every `AGENTS.md` from root to target directory. Keep\n  `CLAUDE.md` as a symlink to the nearest `AGENTS.md`.\n- Use `rg` / `rg --files` for search.\n- Public API changes in `loro` or `loro-crdt` should be backward-compatible when\n  possible. Prefer new `try_*` APIs over breaking signatures.\n- Internal corruption should fail fast; invalid external input should return\n  `Err`. Returning wrong state is worse than panicking on an impossible internal\n  invariant.\n- Add regression tests near behavior: `crates/loro/tests`,\n  `crates/loro-internal/tests`, module tests, `crates/loro-wasm/tests`, or\n  `moon/loro_codec/*_test.mbt`.\n- Add a changeset for publishing behavior or package output changes.\n- Do not hand-edit generated WASM package output; regenerate it with package\n  scripts.\n\n## Self-Maintained Agent Context\n\n- Treat \"why was that hard to find?\" as a context bug. Add a nearby\n  `AGENTS.md` pointer or a `context/` article, or append a line to\n  [context/CONTEXT-GAPS.md](context/CONTEXT-GAPS.md).\n- Keep root context short. If an `AGENTS.md` grows past about 4000 characters, move\n  detail into a linked `context/` article.\n- Header context articles with `Verified against code YYYY-MM-DD`, anchor claims\n  to files/symbols, and link them from root plus the nearest per-directory\n  `AGENTS.md`.\n- If code changes make an `AGENTS.md` or context article stale, update the docs\n  in the same change.\n- When a commit needs non-obvious rationale, land that rationale in the nearest\n  context file and keep the commit message as a pointer.\n\n## Commit And PR Notes\n\nHistory uses short imperative commits, often prefixed by `fix:`, `test:`,\n`chore:`, or `refactor:`. PRs should include summary, rationale, validation, and\nlinked issues or traces when relevant.\n"},"files":{"AGENTS.md":"# Repository Guidelines\n\n## Project Snapshot\n\nLoro is a Rust CRDT workspace with JS/WASM packaging and a MoonBit codec.\n\n- `crates/loro`: public Rust API; avoid breaking downstream users.\n- `crates/loro-internal`: core CRDT logic. Read its\n  [AGENTS.md](crates/loro-internal/AGENTS.md) before changing import/export,\n  encoding, state, diff, checkout, or replay behavior.\n- `crates/loro-wasm`: `loro-crdt` WASM/TypeScript package. Read its\n  [AGENTS.md](crates/loro-wasm/AGENTS.md) before changing bindings, exports,\n  wrappers, or build scripts.\n- `crates/delta`, `crates/rle`, `crates/kv-store`, `crates/fractional_index`,\n  `crates/loro-common`, and `packages/fractional-index`: shared primitives and\n  packages.\n- `moon/`: MoonBit Loro binary codec; use [skills/moonbit/SKILL.md](skills/moonbit/SKILL.md).\n\n## Context Index\n\n- Encoding/import/export modes, current vs outdated formats, shallow snapshots:\n  [context/internal-encoding.md](context/internal-encoding.md).\n- Mergeable container model, marker/cid rules, tests, and common pitfalls:\n  [context/mergeable-containers.md](context/mergeable-containers.md).\n- `import_batch` force-detach, batch-wide rollback scope, and the never-exit-detached\n  invariant: [context/import-batch-atomicity.md](context/import-batch-atomicity.md).\n- Shallow-snapshot dead-style redaction (null-only, both-expand exclusion,\n  root-whitelisted latest state):\n  [context/shallow-snapshot-style-redaction.md](context/shallow-snapshot-style-redaction.md).\n- User-facing Loro usage, sync, editor integration, and performance guidance:\n  [skills/loro/SKILL.md](skills/loro/SKILL.md).\n- Pure TypeScript runtime indexes, complexity contracts, benchmarks, and remaining gaps:\n  [context/loro-js-performance.md](context/loro-js-performance.md).\n- WASM panic/OOM reporting channels, `__wbindgen_start` glue invariant, and\n  trap-testing recipes:\n  [context/wasm-error-reporting.md](context/wasm-error-reporting.md).\n- Context backlog: [context/CONTEXT-GAPS.md](context/CONTEXT-GAPS.md).\n\n## Commands\n\n- JS deps: `pnpm install --frozen-lockfile`.\n- Rust build/check/format/lint: `cargo build`, `cargo check -p loro-internal`,\n  `cargo fmt --all`, `pnpm check`.\n- Rust tests: `pnpm test`; internal doctests: `cargo test -p loro-internal --doc`.\n- Loom: `pnpm test-loom`.\n- WASM: `pnpm release-wasm`, or `pnpm -C crates/loro-wasm build-dev`.\n- Bundlers after WASM packaging changes: `pnpm test-bundlers`; browser runtime:\n  `pnpm --dir examples/bundler-smoke-tests run test:browser`.\n- Fractional-index TS: `pnpm test-fractional-index`.\n- Fuzz smoke: `pnpm run-fuzz-corpus`.\n- MoonBit codec, when `moon` is available: from `moon/`, run `moon check`,\n  `moon test`, `moon fmt`.\n\nUse narrow checks first. Ask before broad fuzzing or long browser matrices.\n\n## Working Rules\n\n- Start with `git status --short --branch`; treat uncommitted changes as user\n  work unless you made them.\n- Before editing, read every `AGENTS.md` from root to target directory. Keep\n  `CLAUDE.md` as a symlink to the nearest `AGENTS.md`.\n- Use `rg` / `rg --files` for search.\n- Public API changes in `loro` or `loro-crdt` should be backward-compatible when\n  possible. Prefer new `try_*` APIs over breaking signatures.\n- Internal corruption should fail fast; invalid external input should return\n  `Err`. Returning wrong state is worse than panicking on an impossible internal\n  invariant.\n- Add regression tests near behavior: `crates/loro/tests`,\n  `crates/loro-internal/tests`, module tests, `crates/loro-wasm/tests`, or\n  `moon/loro_codec/*_test.mbt`.\n- Add a changeset for publishing behavior or package output changes.\n- Do not hand-edit generated WASM package output; regenerate it with package\n  scripts.\n\n## Self-Maintained Agent Context\n\n- Treat \"why was that hard to find?\" as a context bug. Add a nearby\n  `AGENTS.md` pointer or a `context/` article, or append a line to\n  [context/CONTEXT-GAPS.md](context/CONTEXT-GAPS.md).\n- Keep root context short. If an `AGENTS.md` grows past about 4000 characters, move\n  detail into a linked `context/` article.\n- Header context articles with `Verified against code YYYY-MM-DD`, anchor claims\n  to files/symbols, and link them from root plus the nearest per-directory\n  `AGENTS.md`.\n- If code changes make an `AGENTS.md` or context article stale, update the docs\n  in the same change.\n- When a commit needs non-obvious rationale, land that rationale in the nearest\n  context file and keep the commit message as a pointer.\n\n## Commit And PR Notes\n\nHistory uses short imperative commits, often prefixed by `fix:`, `test:`,\n`chore:`, or `refactor:`. PRs should include summary, rationale, validation, and\nlinked issues or traces when relevant.\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","title":"AGENTS.md","content":"# Repository Guidelines\n\n## Project Snapshot\n\nLoro is a Rust CRDT workspace with JS/WASM packaging and a MoonBit codec.\n\n- `crates/loro`: public Rust API; avoid breaking downstream users.\n- `crates/loro-internal`: core CRDT logic. Read its\n  [AGENTS.md](crates/loro-internal/AGENTS.md) before changing import/export,\n  encoding, state, diff, checkout, or replay behavior.\n- `crates/loro-wasm`: `loro-crdt` WASM/TypeScript package. Read its\n  [AGENTS.md](crates/loro-wasm/AGENTS.md) before changing bindings, exports,\n  wrappers, or build scripts.\n- `crates/delta`, `crates/rle`, `crates/kv-store`, `crates/fractional_index`,\n  `crates/loro-common`, and `packages/fractional-index`: shared primitives and\n  packages.\n- `moon/`: MoonBit Loro binary codec; use [skills/moonbit/SKILL.md](skills/moonbit/SKILL.md).\n\n## Context Index\n\n- Encoding/import/export modes, current vs outdated formats, shallow snapshots:\n  [context/internal-encoding.md](context/internal-encoding.md).\n- Mergeable container model, marker/cid rules, tests, and common pitfalls:\n  [context/mergeable-containers.md](context/mergeable-containers.md).\n- `import_batch` force-detach, batch-wide rollback scope, and the never-exit-detached\n  invariant: [context/import-batch-atomicity.md](context/import-batch-atomicity.md).\n- Shallow-snapshot dead-style redaction (null-only, both-expand exclusion,\n  root-whitelisted latest state):\n  [context/shallow-snapshot-style-redaction.md](context/shallow-snapshot-style-redaction.md).\n- User-facing Loro usage, sync, editor integration, and performance guidance:\n  [skills/loro/SKILL.md](skills/loro/SKILL.md).\n- Pure TypeScript runtime indexes, complexity contracts, benchmarks, and remaining gaps:\n  [context/loro-js-performance.md](context/loro-js-performance.md).\n- WASM panic/OOM reporting channels, `__wbindgen_start` glue invariant, and\n  trap-testing recipes:\n  [context/wasm-error-reporting.md](context/wasm-error-reporting.md).\n- Context backlog: [context/CONTEXT-GAPS.md](context/CONTEXT-GAPS.md).\n\n## Commands\n\n- JS deps: `pnpm install --frozen-lockfile`.\n- Rust build/check/format/lint: `cargo build`, `cargo check -p loro-internal`,\n  `cargo fmt --all`, `pnpm check`.\n- Rust tests: `pnpm test`; internal doctests: `cargo test -p loro-internal --doc`.\n- Loom: `pnpm test-loom`.\n- WASM: `pnpm release-wasm`, or `pnpm -C crates/loro-wasm build-dev`.\n- Bundlers after WASM packaging changes: `pnpm test-bundlers`; browser runtime:\n  `pnpm --dir examples/bundler-smoke-tests run test:browser`.\n- Fractional-index TS: `pnpm test-fractional-index`.\n- Fuzz smoke: `pnpm run-fuzz-corpus`.\n- MoonBit codec, when `moon` is available: from `moon/`, run `moon check`,\n  `moon test`, `moon fmt`.\n\nUse narrow checks first. Ask before broad fuzzing or long browser matrices.\n\n## Working Rules\n\n- Start with `git status --short --branch`; treat uncommitted changes as user\n  work unless you made them.\n- Before editing, read every `AGENTS.md` from root to target directory. Keep\n  `CLAUDE.md` as a symlink to the nearest `AGENTS.md`.\n- Use `rg` / `rg --files` for search.\n- Public API changes in `loro` or `loro-crdt` should be backward-compatible when\n  possible. Prefer new `try_*` APIs over breaking signatures.\n- Internal corruption should fail fast; invalid external input should return\n  `Err`. Returning wrong state is worse than panicking on an impossible internal\n  invariant.\n- Add regression tests near behavior: `crates/loro/tests`,\n  `crates/loro-internal/tests`, module tests, `crates/loro-wasm/tests`, or\n  `moon/loro_codec/*_test.mbt`.\n- Add a changeset for publishing behavior or package output changes.\n- Do not hand-edit generated WASM package output; regenerate it with package\n  scripts.\n\n## Self-Maintained Agent Context\n\n- Treat \"why was that hard to find?\" as a context bug. Add a nearby\n  `AGENTS.md` pointer or a `context/` article, or append a line to\n  [context/CONTEXT-GAPS.md](context/CONTEXT-GAPS.md).\n- Keep root context short. If an `AGENTS.md` grows past about 4000 characters, move\n  detail into a linked `context/` article.\n- Header context articles with `Verified against code YYYY-MM-DD`, anchor claims\n  to files/symbols, and link them from root plus the nearest per-directory\n  `AGENTS.md`.\n- If code changes make an `AGENTS.md` or context article stale, update the docs\n  in the same change.\n- When a commit needs non-obvious rationale, land that rationale in the nearest\n  context file and keep the commit message as a pointer.\n\n## Commit And PR Notes\n\nHistory uses short imperative commits, often prefixed by `fix:`, `test:`,\n`chore:`, or `refactor:`. PRs should include summary, rationale, validation, and\nlinked issues or traces when relevant.\n","category":"root","tokens":1174}]}