{"owner":"openzfs","repo":"zfs","hasSkills":true,"totalSkillsCount":5,"totalTokensCount":4480,"categories":["root-instruction","claude-rule","mcp-config","marketplace","plugin-manifest"],"hasMcp":true,"mcpConfig":{"mcpServers":{"zfs":{"command":"npx","args":["-y","@modelcontextprotocol/server-zfs"]}}},"found":["AGENTS.md","CLAUDE.md",".cursor/mcp.json",".claude-plugin/marketplace.json",".claude-plugin/plugin.json"],"skills":{"AGENTS.md":"# OpenZFS agent notes\n\nUse these notes for day-to-day changes. Consult `.github/CONTRIBUTING.md`\nfor PR, commit and detailed style requirements.\n\n## Portability and code\n\n- Common `module/` code targets Linux, FreeBSD and userspace `libzpool`.\n  Keep native kernel APIs in `module/os/{linux,freebsd}` and use portability\n  interfaces from `include/os/` and `lib/libspl/include/os/`.\n- Use Linux compatibility wrappers and `config/kernel-*.m4` feature checks;\n  kernel version checks alone miss distribution backports.\n- Follow SunOS C style in `CONTRIBUTING.md` and `.editorconfig`: tabs,\n  80 columns, 4-space continuations, `return (x)`, one declaration per line.\n- `ASSERT*` disappears without debug; `VERIFY*` remains. Never put required\n  side effects in `ASSERT`. Validate user input and corrupt disk data with\n  errors, not assertions that can panic the host.\n- Use `kmem_*`, `vmem_*` and `kmem_cache_*`, not bare `malloc` in common\n  kernel code. `KM_SLEEP` requires a context that permits sleeping;\n  justify `KM_NOSLEEP` and handle allocation failure.\n- Use `sys/zfs_context.h` locks and task queues so common code builds in\n  `libzpool`. Preserve lock order, ownership and reference lifetimes on\n  error paths too. Comment only non-obvious invariants and reasons, briefly.\n- Account for type widths, alignment, byte order and size overflow;\n  avoid arithmetic on `void *`.\n- Declare common module parameters with `ZFS_MODULE_PARAM`; follow existing\n  platform mechanisms elsewhere. Document new parameters in `man/man4/zfs.4`.\n- Follow `scripts/spdxcheck.pl` for license tags; preserve third-party licenses\n  and keep script shebangs first. Follow the component's update process for\n  vendored Lua, zstd and cryptographic code; avoid unrelated changes there.\n\n## Build and test safely\n\nUse a disposable VM for module reloads and ZTS, never a host with live ZFS\npools. `zfs.sh -r` replaces the module stack; ZTS creates and destroys pools,\ndevices and mounts. `$DISKS` may be overwritten without confirmation, and\n`zfs-tests.sh -x` destroys every pool whose name contains `testpool`.\nConfirm disposable devices and the test environment if uncertain.\n\n`zloop.sh`, `ztest` and unit tests run in userspace, but `zloop.sh` deletes its\nworking directory and may change system core-dump settings. Use dedicated\nscratch directories and minimal privileges.\n\n```sh\n./autogen.sh && ./configure --enable-debug && make -j$(nproc)\nmake checkstyle\nmake unit                                 # T=<name> selects one binary\nsudo ./scripts/zfs.sh -r                   # disposable VM only\nsudo ./scripts/zfs-tests.sh -t <test_name>  # disposable VM only\nzfs_source_dir=$(pwd -P)\nzfs_scratch_dir=$(mktemp -d /var/tmp/zfs-zloop.XXXXXX) || exit 1\n(\n    cd \"$zfs_scratch_dir\" || exit 1\n    \"$zfs_source_dir/scripts/zloop.sh\" -t 600 \\\n        -f \"$zfs_scratch_dir\" -c \"$zfs_scratch_dir/cores\"\n)\n```\n\n- Use debug builds for correctness testing; also check release builds.\n  `make checkstyle` must pass; do not bypass cstyle with exclusions.\n  Report actual platforms/tests, missing tools and skipped checks.\n- `vcscheck` rejects untracked files: stage intended additions, and remove\n  only scratch files you created.\n- Verify modules, tools and profiler symbols match the intended build.\n  When transferring sources, include working-tree edits: `git archive HEAD`\n  omits them.\n\n## Compatibility\n\n- Preserve imports of older pools and tolerate absent new data. If a format\n  change prevents older implementations from safely reading or writing,\n  add a feature in `include/zfeature_common.h`, register it in\n  `module/zcommon/zfeature_common.c`, and document it in\n  `man/man7/zpool-features.7`. Gate writes and follow existing activation and\n  `spa_feature_incr()`/`decr()` patterns; enabled is not the same as active.\n- Send streams are a wire ABI: coordinate incompatible `dmu_replay_record`\n  or `DRR_*` changes with maintainers and use appropriate stream flags.\n- Preserve ABI for `libzfs`, `libzfs_core`, `libnvpair` and `libzfsbootenv`.\n  `make checkabi` compares built libraries with `lib/*/*.abi` on x86_64\n  (libabigail >= 2.0). New exports are allowed; do not break existing\n  signatures. Run `make storeabi` only for intentional, reviewed ABI updates.\n- New ioctls use `zfs_ioctl_register()` and nvlist validation via\n  `zfs_keys_*` tables; `libzfs_core` provides stable `lzc_*` wrappers.\n- Preserve CLI options, exit status and script-facing output, especially\n  machine-readable modes. Property docs live in `man/man7/zfsprops.7` and\n  `man/man7/zpoolprops.7`; man pages use mdoc.\n\n## Tests and benchmarks\n\n- ZTS tests: executable `tests/zfs-tests/tests/functional/<area>/<name>.ksh`,\n  source `$STF_SUITE/include/libtest.shlib`, use `log_*` helpers,\n  `verify_runnable \"global\"|\"both\"`, and `log_onexit` cleanup.\n  `.cfg`, `.kshlib` and `.shlib` files must not be executable (`testscheck`).\n- Register tests in `tests/zfs-tests/tests/Makefile.am` (`make regen-tests`)\n  and `tests/runfiles/common.run` or the platform runfile. `make regen-tests`\n  runs `make clean` for the whole build; rebuild before testing, or edit the\n  entries manually to preserve built artifacts. Missing runfile entries\n  exclude tests from that suite, though explicit `-t` still works. Missing\n  `Makefile.am` entries prevent installation of the test.\n- Use harness devices and `$TESTDIR`/`$TESTPOOL`, never fixed host devices\n  or unrelated paths. Clean up pools, datasets, devices and mounts on failure.\n- Add behavioural regressions where feasible; check failure before the fix\n  and success after. Pure refactors need no artificial reproducer.\n  For asynchronous checks, use bounded condition waits and failure diagnostics.\n- Observe internals with `zinject`, `zdb`, events, `zfs_dbgmsg` and kstats\n  (`/proc/spl/kstat` on Linux, `sysctl kstat.zfs` on FreeBSD), rather than\n  adding debug-only ioctls or properties. Do not hide introduced failures in\n  `tests/test-runner/bin/zts-report.py.in` expected-failure/skip lists.\n- Benchmark performance claims under matching workloads, pool layouts,\n  tunables, build options and cache states. Avoid unrelated host/guest load;\n  alternate baseline/patch, repeat runs, report settings and variability.\n  Use matching release configurations for representative measurements:\n  `--enable-debuginfo` adds `-fno-inline` and changes performance.\n\n## Patch preparation\n\n- Before opening an upstream PR, push the final branch to your fork and\n  wait for CI to pass for the exact PR head SHA. Supported PR workflows can\n  then reuse the completed fork results.\n- Open no more than five upstream PRs per day unless agreed in advance\n  with the maintainers.\n- Base ordinary PRs on `master`; use commit subject/body lines <= 72 characters\n  and end the message with `Signed-off-by: Name <email>` (`git commit -s`).\n- Keep changes small and independently reviewable; avoid unrelated refactoring.\n  `make commitcheck` validates `HEAD`, not the uncommitted patch.\n- Override CI's path heuristic with `ZFS-CI-Type: full` or `quick` in the\n  commit body when needed; follow `CONTRIBUTING.md` for override precedence.\n- Do not commit generated `configure`, `Makefile.in`, `zfs_config.h`, editor\n  files or build output; `.abi` updates require the review described above.\n","CLAUDE.md":"# OpenZFS agent notes\n\nUse these notes for day-to-day changes. Consult `.github/CONTRIBUTING.md`\nfor PR, commit and detailed style requirements.\n\n## Portability and code\n\n- Common `module/` code targets Linux, FreeBSD and userspace `libzpool`.\n  Keep native kernel APIs in `module/os/{linux,freebsd}` and use portability\n  interfaces from `include/os/` and `lib/libspl/include/os/`.\n- Use Linux compatibility wrappers and `config/kernel-*.m4` feature checks;\n  kernel version checks alone miss distribution backports.\n- Follow SunOS C style in `CONTRIBUTING.md` and `.editorconfig`: tabs,\n  80 columns, 4-space continuations, `return (x)`, one declaration per line.\n- `ASSERT*` disappears without debug; `VERIFY*` remains. Never put required\n  side effects in `ASSERT`. Validate user input and corrupt disk data with\n  errors, not assertions that can panic the host.\n- Use `kmem_*`, `vmem_*` and `kmem_cache_*`, not bare `malloc` in common\n  kernel code. `KM_SLEEP` requires a context that permits sleeping;\n  justify `KM_NOSLEEP` and handle allocation failure.\n- Use `sys/zfs_context.h` locks and task queues so common code builds in\n  `libzpool`. Preserve lock order, ownership and reference lifetimes on\n  error paths too. Comment only non-obvious invariants and reasons, briefly.\n- Account for type widths, alignment, byte order and size overflow;\n  avoid arithmetic on `void *`.\n- Declare common module parameters with `ZFS_MODULE_PARAM`; follow existing\n  platform mechanisms elsewhere. Document new parameters in `man/man4/zfs.4`.\n- Follow `scripts/spdxcheck.pl` for license tags; preserve third-party licenses\n  and keep script shebangs first. Follow the component's update process for\n  vendored Lua, zstd and cryptographic code; avoid unrelated changes there.\n\n## Build and test safely\n\nUse a disposable VM for module reloads and ZTS, never a host with live ZFS\npools. `zfs.sh -r` replaces the module stack; ZTS creates and destroys pools,\ndevices and mounts. `$DISKS` may be overwritten without confirmation, and\n`zfs-tests.sh -x` destroys every pool whose name contains `testpool`.\nConfirm disposable devices and the test environment if uncertain.\n\n`zloop.sh`, `ztest` and unit tests run in userspace, but `zloop.sh` deletes its\nworking directory and may change system core-dump settings. Use dedicated\nscratch directories and minimal privileges.\n\n```sh\n./autogen.sh && ./configure --enable-debug && make -j$(nproc)\nmake checkstyle\nmake unit                                 # T=<name> selects one binary\nsudo ./scripts/zfs.sh -r                   # disposable VM only\nsudo ./scripts/zfs-tests.sh -t <test_name>  # disposable VM only\nzfs_source_dir=$(pwd -P)\nzfs_scratch_dir=$(mktemp -d /var/tmp/zfs-zloop.XXXXXX) || exit 1\n(\n    cd \"$zfs_scratch_dir\" || exit 1\n    \"$zfs_source_dir/scripts/zloop.sh\" -t 600 \\\n        -f \"$zfs_scratch_dir\" -c \"$zfs_scratch_dir/cores\"\n)\n```\n\n- Use debug builds for correctness testing; also check release builds.\n  `make checkstyle` must pass; do not bypass cstyle with exclusions.\n  Report actual platforms/tests, missing tools and skipped checks.\n- `vcscheck` rejects untracked files: stage intended additions, and remove\n  only scratch files you created.\n- Verify modules, tools and profiler symbols match the intended build.\n  When transferring sources, include working-tree edits: `git archive HEAD`\n  omits them.\n\n## Compatibility\n\n- Preserve imports of older pools and tolerate absent new data. If a format\n  change prevents older implementations from safely reading or writing,\n  add a feature in `include/zfeature_common.h`, register it in\n  `module/zcommon/zfeature_common.c`, and document it in\n  `man/man7/zpool-features.7`. Gate writes and follow existing activation and\n  `spa_feature_incr()`/`decr()` patterns; enabled is not the same as active.\n- Send streams are a wire ABI: coordinate incompatible `dmu_replay_record`\n  or `DRR_*` changes with maintainers and use appropriate stream flags.\n- Preserve ABI for `libzfs`, `libzfs_core`, `libnvpair` and `libzfsbootenv`.\n  `make checkabi` compares built libraries with `lib/*/*.abi` on x86_64\n  (libabigail >= 2.0). New exports are allowed; do not break existing\n  signatures. Run `make storeabi` only for intentional, reviewed ABI updates.\n- New ioctls use `zfs_ioctl_register()` and nvlist validation via\n  `zfs_keys_*` tables; `libzfs_core` provides stable `lzc_*` wrappers.\n- Preserve CLI options, exit status and script-facing output, especially\n  machine-readable modes. Property docs live in `man/man7/zfsprops.7` and\n  `man/man7/zpoolprops.7`; man pages use mdoc.\n\n## Tests and benchmarks\n\n- ZTS tests: executable `tests/zfs-tests/tests/functional/<area>/<name>.ksh`,\n  source `$STF_SUITE/include/libtest.shlib`, use `log_*` helpers,\n  `verify_runnable \"global\"|\"both\"`, and `log_onexit` cleanup.\n  `.cfg`, `.kshlib` and `.shlib` files must not be executable (`testscheck`).\n- Register tests in `tests/zfs-tests/tests/Makefile.am` (`make regen-tests`)\n  and `tests/runfiles/common.run` or the platform runfile. `make regen-tests`\n  runs `make clean` for the whole build; rebuild before testing, or edit the\n  entries manually to preserve built artifacts. Missing runfile entries\n  exclude tests from that suite, though explicit `-t` still works. Missing\n  `Makefile.am` entries prevent installation of the test.\n- Use harness devices and `$TESTDIR`/`$TESTPOOL`, never fixed host devices\n  or unrelated paths. Clean up pools, datasets, devices and mounts on failure.\n- Add behavioural regressions where feasible; check failure before the fix\n  and success after. Pure refactors need no artificial reproducer.\n  For asynchronous checks, use bounded condition waits and failure diagnostics.\n- Observe internals with `zinject`, `zdb`, events, `zfs_dbgmsg` and kstats\n  (`/proc/spl/kstat` on Linux, `sysctl kstat.zfs` on FreeBSD), rather than\n  adding debug-only ioctls or properties. Do not hide introduced failures in\n  `tests/test-runner/bin/zts-report.py.in` expected-failure/skip lists.\n- Benchmark performance claims under matching workloads, pool layouts,\n  tunables, build options and cache states. Avoid unrelated host/guest load;\n  alternate baseline/patch, repeat runs, report settings and variability.\n  Use matching release configurations for representative measurements:\n  `--enable-debuginfo` adds `-fno-inline` and changes performance.\n\n## Patch preparation\n\n- Before opening an upstream PR, push the final branch to your fork and\n  wait for CI to pass for the exact PR head SHA. Supported PR workflows can\n  then reuse the completed fork results.\n- Open no more than five upstream PRs per day unless agreed in advance\n  with the maintainers.\n- Base ordinary PRs on `master`; use commit subject/body lines <= 72 characters\n  and end the message with `Signed-off-by: Name <email>` (`git commit -s`).\n- Keep changes small and independently reviewable; avoid unrelated refactoring.\n  `make commitcheck` validates `HEAD`, not the uncommitted patch.\n- Override CI's path heuristic with `ZFS-CI-Type: full` or `quick` in the\n  commit body when needed; follow `CONTRIBUTING.md` for override precedence.\n- Do not commit generated `configure`, `Makefile.in`, `zfs_config.h`, editor\n  files or build output; `.abi` updates require the review described above.\n",".cursor/mcp.json":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/openzfs/zfs/HEAD/.cursor/mcp.json)",".claude-plugin/marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/openzfs/zfs/HEAD/.claude-plugin/marketplace.json)",".claude-plugin/plugin.json":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/openzfs/zfs/HEAD/.claude-plugin/plugin.json)"},"files":{"AGENTS.md":"# OpenZFS agent notes\n\nUse these notes for day-to-day changes. Consult `.github/CONTRIBUTING.md`\nfor PR, commit and detailed style requirements.\n\n## Portability and code\n\n- Common `module/` code targets Linux, FreeBSD and userspace `libzpool`.\n  Keep native kernel APIs in `module/os/{linux,freebsd}` and use portability\n  interfaces from `include/os/` and `lib/libspl/include/os/`.\n- Use Linux compatibility wrappers and `config/kernel-*.m4` feature checks;\n  kernel version checks alone miss distribution backports.\n- Follow SunOS C style in `CONTRIBUTING.md` and `.editorconfig`: tabs,\n  80 columns, 4-space continuations, `return (x)`, one declaration per line.\n- `ASSERT*` disappears without debug; `VERIFY*` remains. Never put required\n  side effects in `ASSERT`. Validate user input and corrupt disk data with\n  errors, not assertions that can panic the host.\n- Use `kmem_*`, `vmem_*` and `kmem_cache_*`, not bare `malloc` in common\n  kernel code. `KM_SLEEP` requires a context that permits sleeping;\n  justify `KM_NOSLEEP` and handle allocation failure.\n- Use `sys/zfs_context.h` locks and task queues so common code builds in\n  `libzpool`. Preserve lock order, ownership and reference lifetimes on\n  error paths too. Comment only non-obvious invariants and reasons, briefly.\n- Account for type widths, alignment, byte order and size overflow;\n  avoid arithmetic on `void *`.\n- Declare common module parameters with `ZFS_MODULE_PARAM`; follow existing\n  platform mechanisms elsewhere. Document new parameters in `man/man4/zfs.4`.\n- Follow `scripts/spdxcheck.pl` for license tags; preserve third-party licenses\n  and keep script shebangs first. Follow the component's update process for\n  vendored Lua, zstd and cryptographic code; avoid unrelated changes there.\n\n## Build and test safely\n\nUse a disposable VM for module reloads and ZTS, never a host with live ZFS\npools. `zfs.sh -r` replaces the module stack; ZTS creates and destroys pools,\ndevices and mounts. `$DISKS` may be overwritten without confirmation, and\n`zfs-tests.sh -x` destroys every pool whose name contains `testpool`.\nConfirm disposable devices and the test environment if uncertain.\n\n`zloop.sh`, `ztest` and unit tests run in userspace, but `zloop.sh` deletes its\nworking directory and may change system core-dump settings. Use dedicated\nscratch directories and minimal privileges.\n\n```sh\n./autogen.sh && ./configure --enable-debug && make -j$(nproc)\nmake checkstyle\nmake unit                                 # T=<name> selects one binary\nsudo ./scripts/zfs.sh -r                   # disposable VM only\nsudo ./scripts/zfs-tests.sh -t <test_name>  # disposable VM only\nzfs_source_dir=$(pwd -P)\nzfs_scratch_dir=$(mktemp -d /var/tmp/zfs-zloop.XXXXXX) || exit 1\n(\n    cd \"$zfs_scratch_dir\" || exit 1\n    \"$zfs_source_dir/scripts/zloop.sh\" -t 600 \\\n        -f \"$zfs_scratch_dir\" -c \"$zfs_scratch_dir/cores\"\n)\n```\n\n- Use debug builds for correctness testing; also check release builds.\n  `make checkstyle` must pass; do not bypass cstyle with exclusions.\n  Report actual platforms/tests, missing tools and skipped checks.\n- `vcscheck` rejects untracked files: stage intended additions, and remove\n  only scratch files you created.\n- Verify modules, tools and profiler symbols match the intended build.\n  When transferring sources, include working-tree edits: `git archive HEAD`\n  omits them.\n\n## Compatibility\n\n- Preserve imports of older pools and tolerate absent new data. If a format\n  change prevents older implementations from safely reading or writing,\n  add a feature in `include/zfeature_common.h`, register it in\n  `module/zcommon/zfeature_common.c`, and document it in\n  `man/man7/zpool-features.7`. Gate writes and follow existing activation and\n  `spa_feature_incr()`/`decr()` patterns; enabled is not the same as active.\n- Send streams are a wire ABI: coordinate incompatible `dmu_replay_record`\n  or `DRR_*` changes with maintainers and use appropriate stream flags.\n- Preserve ABI for `libzfs`, `libzfs_core`, `libnvpair` and `libzfsbootenv`.\n  `make checkabi` compares built libraries with `lib/*/*.abi` on x86_64\n  (libabigail >= 2.0). New exports are allowed; do not break existing\n  signatures. Run `make storeabi` only for intentional, reviewed ABI updates.\n- New ioctls use `zfs_ioctl_register()` and nvlist validation via\n  `zfs_keys_*` tables; `libzfs_core` provides stable `lzc_*` wrappers.\n- Preserve CLI options, exit status and script-facing output, especially\n  machine-readable modes. Property docs live in `man/man7/zfsprops.7` and\n  `man/man7/zpoolprops.7`; man pages use mdoc.\n\n## Tests and benchmarks\n\n- ZTS tests: executable `tests/zfs-tests/tests/functional/<area>/<name>.ksh`,\n  source `$STF_SUITE/include/libtest.shlib`, use `log_*` helpers,\n  `verify_runnable \"global\"|\"both\"`, and `log_onexit` cleanup.\n  `.cfg`, `.kshlib` and `.shlib` files must not be executable (`testscheck`).\n- Register tests in `tests/zfs-tests/tests/Makefile.am` (`make regen-tests`)\n  and `tests/runfiles/common.run` or the platform runfile. `make regen-tests`\n  runs `make clean` for the whole build; rebuild before testing, or edit the\n  entries manually to preserve built artifacts. Missing runfile entries\n  exclude tests from that suite, though explicit `-t` still works. Missing\n  `Makefile.am` entries prevent installation of the test.\n- Use harness devices and `$TESTDIR`/`$TESTPOOL`, never fixed host devices\n  or unrelated paths. Clean up pools, datasets, devices and mounts on failure.\n- Add behavioural regressions where feasible; check failure before the fix\n  and success after. Pure refactors need no artificial reproducer.\n  For asynchronous checks, use bounded condition waits and failure diagnostics.\n- Observe internals with `zinject`, `zdb`, events, `zfs_dbgmsg` and kstats\n  (`/proc/spl/kstat` on Linux, `sysctl kstat.zfs` on FreeBSD), rather than\n  adding debug-only ioctls or properties. Do not hide introduced failures in\n  `tests/test-runner/bin/zts-report.py.in` expected-failure/skip lists.\n- Benchmark performance claims under matching workloads, pool layouts,\n  tunables, build options and cache states. Avoid unrelated host/guest load;\n  alternate baseline/patch, repeat runs, report settings and variability.\n  Use matching release configurations for representative measurements:\n  `--enable-debuginfo` adds `-fno-inline` and changes performance.\n\n## Patch preparation\n\n- Before opening an upstream PR, push the final branch to your fork and\n  wait for CI to pass for the exact PR head SHA. Supported PR workflows can\n  then reuse the completed fork results.\n- Open no more than five upstream PRs per day unless agreed in advance\n  with the maintainers.\n- Base ordinary PRs on `master`; use commit subject/body lines <= 72 characters\n  and end the message with `Signed-off-by: Name <email>` (`git commit -s`).\n- Keep changes small and independently reviewable; avoid unrelated refactoring.\n  `make commitcheck` validates `HEAD`, not the uncommitted patch.\n- Override CI's path heuristic with `ZFS-CI-Type: full` or `quick` in the\n  commit body when needed; follow `CONTRIBUTING.md` for override precedence.\n- Do not commit generated `configure`, `Makefile.in`, `zfs_config.h`, editor\n  files or build output; `.abi` updates require the review described above.\n","CLAUDE.md":"# OpenZFS agent notes\n\nUse these notes for day-to-day changes. Consult `.github/CONTRIBUTING.md`\nfor PR, commit and detailed style requirements.\n\n## Portability and code\n\n- Common `module/` code targets Linux, FreeBSD and userspace `libzpool`.\n  Keep native kernel APIs in `module/os/{linux,freebsd}` and use portability\n  interfaces from `include/os/` and `lib/libspl/include/os/`.\n- Use Linux compatibility wrappers and `config/kernel-*.m4` feature checks;\n  kernel version checks alone miss distribution backports.\n- Follow SunOS C style in `CONTRIBUTING.md` and `.editorconfig`: tabs,\n  80 columns, 4-space continuations, `return (x)`, one declaration per line.\n- `ASSERT*` disappears without debug; `VERIFY*` remains. Never put required\n  side effects in `ASSERT`. Validate user input and corrupt disk data with\n  errors, not assertions that can panic the host.\n- Use `kmem_*`, `vmem_*` and `kmem_cache_*`, not bare `malloc` in common\n  kernel code. `KM_SLEEP` requires a context that permits sleeping;\n  justify `KM_NOSLEEP` and handle allocation failure.\n- Use `sys/zfs_context.h` locks and task queues so common code builds in\n  `libzpool`. Preserve lock order, ownership and reference lifetimes on\n  error paths too. Comment only non-obvious invariants and reasons, briefly.\n- Account for type widths, alignment, byte order and size overflow;\n  avoid arithmetic on `void *`.\n- Declare common module parameters with `ZFS_MODULE_PARAM`; follow existing\n  platform mechanisms elsewhere. Document new parameters in `man/man4/zfs.4`.\n- Follow `scripts/spdxcheck.pl` for license tags; preserve third-party licenses\n  and keep script shebangs first. Follow the component's update process for\n  vendored Lua, zstd and cryptographic code; avoid unrelated changes there.\n\n## Build and test safely\n\nUse a disposable VM for module reloads and ZTS, never a host with live ZFS\npools. `zfs.sh -r` replaces the module stack; ZTS creates and destroys pools,\ndevices and mounts. `$DISKS` may be overwritten without confirmation, and\n`zfs-tests.sh -x` destroys every pool whose name contains `testpool`.\nConfirm disposable devices and the test environment if uncertain.\n\n`zloop.sh`, `ztest` and unit tests run in userspace, but `zloop.sh` deletes its\nworking directory and may change system core-dump settings. Use dedicated\nscratch directories and minimal privileges.\n\n```sh\n./autogen.sh && ./configure --enable-debug && make -j$(nproc)\nmake checkstyle\nmake unit                                 # T=<name> selects one binary\nsudo ./scripts/zfs.sh -r                   # disposable VM only\nsudo ./scripts/zfs-tests.sh -t <test_name>  # disposable VM only\nzfs_source_dir=$(pwd -P)\nzfs_scratch_dir=$(mktemp -d /var/tmp/zfs-zloop.XXXXXX) || exit 1\n(\n    cd \"$zfs_scratch_dir\" || exit 1\n    \"$zfs_source_dir/scripts/zloop.sh\" -t 600 \\\n        -f \"$zfs_scratch_dir\" -c \"$zfs_scratch_dir/cores\"\n)\n```\n\n- Use debug builds for correctness testing; also check release builds.\n  `make checkstyle` must pass; do not bypass cstyle with exclusions.\n  Report actual platforms/tests, missing tools and skipped checks.\n- `vcscheck` rejects untracked files: stage intended additions, and remove\n  only scratch files you created.\n- Verify modules, tools and profiler symbols match the intended build.\n  When transferring sources, include working-tree edits: `git archive HEAD`\n  omits them.\n\n## Compatibility\n\n- Preserve imports of older pools and tolerate absent new data. If a format\n  change prevents older implementations from safely reading or writing,\n  add a feature in `include/zfeature_common.h`, register it in\n  `module/zcommon/zfeature_common.c`, and document it in\n  `man/man7/zpool-features.7`. Gate writes and follow existing activation and\n  `spa_feature_incr()`/`decr()` patterns; enabled is not the same as active.\n- Send streams are a wire ABI: coordinate incompatible `dmu_replay_record`\n  or `DRR_*` changes with maintainers and use appropriate stream flags.\n- Preserve ABI for `libzfs`, `libzfs_core`, `libnvpair` and `libzfsbootenv`.\n  `make checkabi` compares built libraries with `lib/*/*.abi` on x86_64\n  (libabigail >= 2.0). New exports are allowed; do not break existing\n  signatures. Run `make storeabi` only for intentional, reviewed ABI updates.\n- New ioctls use `zfs_ioctl_register()` and nvlist validation via\n  `zfs_keys_*` tables; `libzfs_core` provides stable `lzc_*` wrappers.\n- Preserve CLI options, exit status and script-facing output, especially\n  machine-readable modes. Property docs live in `man/man7/zfsprops.7` and\n  `man/man7/zpoolprops.7`; man pages use mdoc.\n\n## Tests and benchmarks\n\n- ZTS tests: executable `tests/zfs-tests/tests/functional/<area>/<name>.ksh`,\n  source `$STF_SUITE/include/libtest.shlib`, use `log_*` helpers,\n  `verify_runnable \"global\"|\"both\"`, and `log_onexit` cleanup.\n  `.cfg`, `.kshlib` and `.shlib` files must not be executable (`testscheck`).\n- Register tests in `tests/zfs-tests/tests/Makefile.am` (`make regen-tests`)\n  and `tests/runfiles/common.run` or the platform runfile. `make regen-tests`\n  runs `make clean` for the whole build; rebuild before testing, or edit the\n  entries manually to preserve built artifacts. Missing runfile entries\n  exclude tests from that suite, though explicit `-t` still works. Missing\n  `Makefile.am` entries prevent installation of the test.\n- Use harness devices and `$TESTDIR`/`$TESTPOOL`, never fixed host devices\n  or unrelated paths. Clean up pools, datasets, devices and mounts on failure.\n- Add behavioural regressions where feasible; check failure before the fix\n  and success after. Pure refactors need no artificial reproducer.\n  For asynchronous checks, use bounded condition waits and failure diagnostics.\n- Observe internals with `zinject`, `zdb`, events, `zfs_dbgmsg` and kstats\n  (`/proc/spl/kstat` on Linux, `sysctl kstat.zfs` on FreeBSD), rather than\n  adding debug-only ioctls or properties. Do not hide introduced failures in\n  `tests/test-runner/bin/zts-report.py.in` expected-failure/skip lists.\n- Benchmark performance claims under matching workloads, pool layouts,\n  tunables, build options and cache states. Avoid unrelated host/guest load;\n  alternate baseline/patch, repeat runs, report settings and variability.\n  Use matching release configurations for representative measurements:\n  `--enable-debuginfo` adds `-fno-inline` and changes performance.\n\n## Patch preparation\n\n- Before opening an upstream PR, push the final branch to your fork and\n  wait for CI to pass for the exact PR head SHA. Supported PR workflows can\n  then reuse the completed fork results.\n- Open no more than five upstream PRs per day unless agreed in advance\n  with the maintainers.\n- Base ordinary PRs on `master`; use commit subject/body lines <= 72 characters\n  and end the message with `Signed-off-by: Name <email>` (`git commit -s`).\n- Keep changes small and independently reviewable; avoid unrelated refactoring.\n  `make commitcheck` validates `HEAD`, not the uncommitted patch.\n- Override CI's path heuristic with `ZFS-CI-Type: full` or `quick` in the\n  commit body when needed; follow `CONTRIBUTING.md` for override precedence.\n- Do not commit generated `configure`, `Makefile.in`, `zfs_config.h`, editor\n  files or build output; `.abi` updates require the review described above.\n",".cursor/mcp.json":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/openzfs/zfs/HEAD/.cursor/mcp.json)",".claude-plugin/marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/openzfs/zfs/HEAD/.claude-plugin/marketplace.json)",".claude-plugin/plugin.json":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/openzfs/zfs/HEAD/.claude-plugin/plugin.json)"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","rawUrl":"https://raw.githubusercontent.com/openzfs/zfs/HEAD/AGENTS.md","title":"AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# OpenZFS agent notes\n\nUse these notes for day-to-day changes. Consult `.github/CONTRIBUTING.md`\nfor PR, commit and detailed style requirements.\n\n## Portability and code\n\n- Common `module/` code targets Linux, FreeBSD and userspace `libzpool`.\n  Keep native kernel APIs in `module/os/{linux,freebsd}` and use portability\n  interfaces from `include/os/` and `lib/libspl/include/os/`.\n- Use Linux compatibility wrappers and `config/kernel-*.m4` feature checks;\n  kernel version checks alone miss distribution backports.\n- Follow SunOS C style in `CONTRIBUTING.md` and `.editorconfig`: tabs,\n  80 columns, 4-space continuations, `return (x)`, one declaration per line.\n- `ASSERT*` disappears without debug; `VERIFY*` remains. Never put required\n  side effects in `ASSERT`. Validate user input and corrupt disk data with\n  errors, not assertions that can panic the host.\n- Use `kmem_*`, `vmem_*` and `kmem_cache_*`, not bare `malloc` in common\n  kernel code. `KM_SLEEP` requires a context that permits sleeping;\n  justify `KM_NOSLEEP` and handle allocation failure.\n- Use `sys/zfs_context.h` locks and task queues so common code builds in\n  `libzpool`. Preserve lock order, ownership and reference lifetimes on\n  error paths too. Comment only non-obvious invariants and reasons, briefly.\n- Account for type widths, alignment, byte order and size overflow;\n  avoid arithmetic on `void *`.\n- Declare common module parameters with `ZFS_MODULE_PARAM`; follow existing\n  platform mechanisms elsewhere. Document new parameters in `man/man4/zfs.4`.\n- Follow `scripts/spdxcheck.pl` for license tags; preserve third-party licenses\n  and keep script shebangs first. Follow the component's update process for\n  vendored Lua, zstd and cryptographic code; avoid unrelated changes there.\n\n## Build and test safely\n\nUse a disposable VM for module reloads and ZTS, never a host with live ZFS\npools. `zfs.sh -r` replaces the module stack; ZTS creates and destroys pools,\ndevices and mounts. `$DISKS` may be overwritten without confirmation, and\n`zfs-tests.sh -x` destroys every pool whose name contains `testpool`.\nConfirm disposable devices and the test environment if uncertain.\n\n`zloop.sh`, `ztest` and unit tests run in userspace, but `zloop.sh` deletes its\nworking directory and may change system core-dump settings. Use dedicated\nscratch directories and minimal privileges.\n\n```sh\n./autogen.sh && ./configure --enable-debug && make -j$(nproc)\nmake checkstyle\nmake unit                                 # T=<name> selects one binary\nsudo ./scripts/zfs.sh -r                   # disposable VM only\nsudo ./scripts/zfs-tests.sh -t <test_name>  # disposable VM only\nzfs_source_dir=$(pwd -P)\nzfs_scratch_dir=$(mktemp -d /var/tmp/zfs-zloop.XXXXXX) || exit 1\n(\n    cd \"$zfs_scratch_dir\" || exit 1\n    \"$zfs_source_dir/scripts/zloop.sh\" -t 600 \\\n        -f \"$zfs_scratch_dir\" -c \"$zfs_scratch_dir/cores\"\n)\n```\n\n- Use debug builds for correctness testing; also check release builds.\n  `make checkstyle` must pass; do not bypass cstyle with exclusions.\n  Report actual platforms/tests, missing tools and skipped checks.\n- `vcscheck` rejects untracked files: stage intended additions, and remove\n  only scratch files you created.\n- Verify modules, tools and profiler symbols match the intended build.\n  When transferring sources, include working-tree edits: `git archive HEAD`\n  omits them.\n\n## Compatibility\n\n- Preserve imports of older pools and tolerate absent new data. If a format\n  change prevents older implementations from safely reading or writing,\n  add a feature in `include/zfeature_common.h`, register it in\n  `module/zcommon/zfeature_common.c`, and document it in\n  `man/man7/zpool-features.7`. Gate writes and follow existing activation and\n  `spa_feature_incr()`/`decr()` patterns; enabled is not the same as active.\n- Send streams are a wire ABI: coordinate incompatible `dmu_replay_record`\n  or `DRR_*` changes with maintainers and use appropriate stream flags.\n- Preserve ABI for `libzfs`, `libzfs_core`, `libnvpair` and `libzfsbootenv`.\n  `make checkabi` compares built libraries with `lib/*/*.abi` on x86_64\n  (libabigail >= 2.0). New exports are allowed; do not break existing\n  signatures. Run `make storeabi` only for intentional, reviewed ABI updates.\n- New ioctls use `zfs_ioctl_register()` and nvlist validation via\n  `zfs_keys_*` tables; `libzfs_core` provides stable `lzc_*` wrappers.\n- Preserve CLI options, exit status and script-facing output, especially\n  machine-readable modes. Property docs live in `man/man7/zfsprops.7` and\n  `man/man7/zpoolprops.7`; man pages use mdoc.\n\n## Tests and benchmarks\n\n- ZTS tests: executable `tests/zfs-tests/tests/functional/<area>/<name>.ksh`,\n  source `$STF_SUITE/include/libtest.shlib`, use `log_*` helpers,\n  `verify_runnable \"global\"|\"both\"`, and `log_onexit` cleanup.\n  `.cfg`, `.kshlib` and `.shlib` files must not be executable (`testscheck`).\n- Register tests in `tests/zfs-tests/tests/Makefile.am` (`make regen-tests`)\n  and `tests/runfiles/common.run` or the platform runfile. `make regen-tests`\n  runs `make clean` for the whole build; rebuild before testing, or edit the\n  entries manually to preserve built artifacts. Missing runfile entries\n  exclude tests from that suite, though explicit `-t` still works. Missing\n  `Makefile.am` entries prevent installation of the test.\n- Use harness devices and `$TESTDIR`/`$TESTPOOL`, never fixed host devices\n  or unrelated paths. Clean up pools, datasets, devices and mounts on failure.\n- Add behavioural regressions where feasible; check failure before the fix\n  and success after. Pure refactors need no artificial reproducer.\n  For asynchronous checks, use bounded condition waits and failure diagnostics.\n- Observe internals with `zinject`, `zdb`, events, `zfs_dbgmsg` and kstats\n  (`/proc/spl/kstat` on Linux, `sysctl kstat.zfs` on FreeBSD), rather than\n  adding debug-only ioctls or properties. Do not hide introduced failures in\n  `tests/test-runner/bin/zts-report.py.in` expected-failure/skip lists.\n- Benchmark performance claims under matching workloads, pool layouts,\n  tunables, build options and cache states. Avoid unrelated host/guest load;\n  alternate baseline/patch, repeat runs, report settings and variability.\n  Use matching release configurations for representative measurements:\n  `--enable-debuginfo` adds `-fno-inline` and changes performance.\n\n## Patch preparation\n\n- Before opening an upstream PR, push the final branch to your fork and\n  wait for CI to pass for the exact PR head SHA. Supported PR workflows can\n  then reuse the completed fork results.\n- Open no more than five upstream PRs per day unless agreed in advance\n  with the maintainers.\n- Base ordinary PRs on `master`; use commit subject/body lines <= 72 characters\n  and end the message with `Signed-off-by: Name <email>` (`git commit -s`).\n- Keep changes small and independently reviewable; avoid unrelated refactoring.\n  `make commitcheck` validates `HEAD`, not the uncommitted patch.\n- Override CI's path heuristic with `ZFS-CI-Type: full` or `quick` in the\n  commit body when needed; follow `CONTRIBUTING.md` for override precedence.\n- Do not commit generated `configure`, `Makefile.in`, `zfs_config.h`, editor\n  files or build output; `.abi` updates require the review described above.\n","isInternal":false,"tokens":1790,"sizeBytes":7276},{"name":"CLAUDE.md","path":"CLAUDE.md","rawUrl":"https://raw.githubusercontent.com/openzfs/zfs/HEAD/CLAUDE.md","title":"Claude Agent Guidelines & System Prompt","category":"claude-rule","format":"markdown","content":"# OpenZFS agent notes\n\nUse these notes for day-to-day changes. Consult `.github/CONTRIBUTING.md`\nfor PR, commit and detailed style requirements.\n\n## Portability and code\n\n- Common `module/` code targets Linux, FreeBSD and userspace `libzpool`.\n  Keep native kernel APIs in `module/os/{linux,freebsd}` and use portability\n  interfaces from `include/os/` and `lib/libspl/include/os/`.\n- Use Linux compatibility wrappers and `config/kernel-*.m4` feature checks;\n  kernel version checks alone miss distribution backports.\n- Follow SunOS C style in `CONTRIBUTING.md` and `.editorconfig`: tabs,\n  80 columns, 4-space continuations, `return (x)`, one declaration per line.\n- `ASSERT*` disappears without debug; `VERIFY*` remains. Never put required\n  side effects in `ASSERT`. Validate user input and corrupt disk data with\n  errors, not assertions that can panic the host.\n- Use `kmem_*`, `vmem_*` and `kmem_cache_*`, not bare `malloc` in common\n  kernel code. `KM_SLEEP` requires a context that permits sleeping;\n  justify `KM_NOSLEEP` and handle allocation failure.\n- Use `sys/zfs_context.h` locks and task queues so common code builds in\n  `libzpool`. Preserve lock order, ownership and reference lifetimes on\n  error paths too. Comment only non-obvious invariants and reasons, briefly.\n- Account for type widths, alignment, byte order and size overflow;\n  avoid arithmetic on `void *`.\n- Declare common module parameters with `ZFS_MODULE_PARAM`; follow existing\n  platform mechanisms elsewhere. Document new parameters in `man/man4/zfs.4`.\n- Follow `scripts/spdxcheck.pl` for license tags; preserve third-party licenses\n  and keep script shebangs first. Follow the component's update process for\n  vendored Lua, zstd and cryptographic code; avoid unrelated changes there.\n\n## Build and test safely\n\nUse a disposable VM for module reloads and ZTS, never a host with live ZFS\npools. `zfs.sh -r` replaces the module stack; ZTS creates and destroys pools,\ndevices and mounts. `$DISKS` may be overwritten without confirmation, and\n`zfs-tests.sh -x` destroys every pool whose name contains `testpool`.\nConfirm disposable devices and the test environment if uncertain.\n\n`zloop.sh`, `ztest` and unit tests run in userspace, but `zloop.sh` deletes its\nworking directory and may change system core-dump settings. Use dedicated\nscratch directories and minimal privileges.\n\n```sh\n./autogen.sh && ./configure --enable-debug && make -j$(nproc)\nmake checkstyle\nmake unit                                 # T=<name> selects one binary\nsudo ./scripts/zfs.sh -r                   # disposable VM only\nsudo ./scripts/zfs-tests.sh -t <test_name>  # disposable VM only\nzfs_source_dir=$(pwd -P)\nzfs_scratch_dir=$(mktemp -d /var/tmp/zfs-zloop.XXXXXX) || exit 1\n(\n    cd \"$zfs_scratch_dir\" || exit 1\n    \"$zfs_source_dir/scripts/zloop.sh\" -t 600 \\\n        -f \"$zfs_scratch_dir\" -c \"$zfs_scratch_dir/cores\"\n)\n```\n\n- Use debug builds for correctness testing; also check release builds.\n  `make checkstyle` must pass; do not bypass cstyle with exclusions.\n  Report actual platforms/tests, missing tools and skipped checks.\n- `vcscheck` rejects untracked files: stage intended additions, and remove\n  only scratch files you created.\n- Verify modules, tools and profiler symbols match the intended build.\n  When transferring sources, include working-tree edits: `git archive HEAD`\n  omits them.\n\n## Compatibility\n\n- Preserve imports of older pools and tolerate absent new data. If a format\n  change prevents older implementations from safely reading or writing,\n  add a feature in `include/zfeature_common.h`, register it in\n  `module/zcommon/zfeature_common.c`, and document it in\n  `man/man7/zpool-features.7`. Gate writes and follow existing activation and\n  `spa_feature_incr()`/`decr()` patterns; enabled is not the same as active.\n- Send streams are a wire ABI: coordinate incompatible `dmu_replay_record`\n  or `DRR_*` changes with maintainers and use appropriate stream flags.\n- Preserve ABI for `libzfs`, `libzfs_core`, `libnvpair` and `libzfsbootenv`.\n  `make checkabi` compares built libraries with `lib/*/*.abi` on x86_64\n  (libabigail >= 2.0). New exports are allowed; do not break existing\n  signatures. Run `make storeabi` only for intentional, reviewed ABI updates.\n- New ioctls use `zfs_ioctl_register()` and nvlist validation via\n  `zfs_keys_*` tables; `libzfs_core` provides stable `lzc_*` wrappers.\n- Preserve CLI options, exit status and script-facing output, especially\n  machine-readable modes. Property docs live in `man/man7/zfsprops.7` and\n  `man/man7/zpoolprops.7`; man pages use mdoc.\n\n## Tests and benchmarks\n\n- ZTS tests: executable `tests/zfs-tests/tests/functional/<area>/<name>.ksh`,\n  source `$STF_SUITE/include/libtest.shlib`, use `log_*` helpers,\n  `verify_runnable \"global\"|\"both\"`, and `log_onexit` cleanup.\n  `.cfg`, `.kshlib` and `.shlib` files must not be executable (`testscheck`).\n- Register tests in `tests/zfs-tests/tests/Makefile.am` (`make regen-tests`)\n  and `tests/runfiles/common.run` or the platform runfile. `make regen-tests`\n  runs `make clean` for the whole build; rebuild before testing, or edit the\n  entries manually to preserve built artifacts. Missing runfile entries\n  exclude tests from that suite, though explicit `-t` still works. Missing\n  `Makefile.am` entries prevent installation of the test.\n- Use harness devices and `$TESTDIR`/`$TESTPOOL`, never fixed host devices\n  or unrelated paths. Clean up pools, datasets, devices and mounts on failure.\n- Add behavioural regressions where feasible; check failure before the fix\n  and success after. Pure refactors need no artificial reproducer.\n  For asynchronous checks, use bounded condition waits and failure diagnostics.\n- Observe internals with `zinject`, `zdb`, events, `zfs_dbgmsg` and kstats\n  (`/proc/spl/kstat` on Linux, `sysctl kstat.zfs` on FreeBSD), rather than\n  adding debug-only ioctls or properties. Do not hide introduced failures in\n  `tests/test-runner/bin/zts-report.py.in` expected-failure/skip lists.\n- Benchmark performance claims under matching workloads, pool layouts,\n  tunables, build options and cache states. Avoid unrelated host/guest load;\n  alternate baseline/patch, repeat runs, report settings and variability.\n  Use matching release configurations for representative measurements:\n  `--enable-debuginfo` adds `-fno-inline` and changes performance.\n\n## Patch preparation\n\n- Before opening an upstream PR, push the final branch to your fork and\n  wait for CI to pass for the exact PR head SHA. Supported PR workflows can\n  then reuse the completed fork results.\n- Open no more than five upstream PRs per day unless agreed in advance\n  with the maintainers.\n- Base ordinary PRs on `master`; use commit subject/body lines <= 72 characters\n  and end the message with `Signed-off-by: Name <email>` (`git commit -s`).\n- Keep changes small and independently reviewable; avoid unrelated refactoring.\n  `make commitcheck` validates `HEAD`, not the uncommitted patch.\n- Override CI's path heuristic with `ZFS-CI-Type: full` or `quick` in the\n  commit body when needed; follow `CONTRIBUTING.md` for override precedence.\n- Do not commit generated `configure`, `Makefile.in`, `zfs_config.h`, editor\n  files or build output; `.abi` updates require the review described above.\n","isInternal":false,"tokens":1790,"sizeBytes":7276},{"name":"marketplace.json","path":".claude-plugin/marketplace.json","rawUrl":"https://raw.githubusercontent.com/openzfs/zfs/HEAD/.claude-plugin/marketplace.json","title":"Claude Plugin Marketplace Catalog","category":"marketplace","format":"json","content":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/openzfs/zfs/HEAD/.claude-plugin/marketplace.json)","tokens":300,"sizeBytes":190},{"name":"plugin.json","path":".claude-plugin/plugin.json","rawUrl":"https://raw.githubusercontent.com/openzfs/zfs/HEAD/.claude-plugin/plugin.json","title":"claude-plugin Plugin Manifest","category":"plugin-manifest","format":"json","content":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/openzfs/zfs/HEAD/.claude-plugin/plugin.json)","tokens":300,"sizeBytes":176},{"name":"mcp.json","path":".cursor/mcp.json","rawUrl":"https://raw.githubusercontent.com/openzfs/zfs/HEAD/.cursor/mcp.json","title":"Model Context Protocol (MCP) Configuration","category":"mcp-config","format":"json","content":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/openzfs/zfs/HEAD/.cursor/mcp.json)","tokens":300,"sizeBytes":169}],"systemPromptSnippet":"<yakaai_skills repo=\"openzfs/zfs\">\n<!-- File: AGENTS.md (Tokens: ~1790 | Category: root-instruction) -->\n# OpenZFS agent notes\n\nUse these notes for day-to-day changes. Consult `.github/CONTRIBUTING.md`\nfor PR, commit and detailed style requirements.\n\n## Portability and code\n\n- Common `module/` code targets Linux, FreeBSD and userspace `libzpool`.\n  Keep native kernel APIs in `module/os/{linux,freebsd}` and use portability\n  interfaces from `include/os/` and `lib/libspl/include/os/`.\n- Use Linux compatibility wrappers and `config/kernel-*.m4` feature checks;\n  kernel version checks alone miss distribution backports.\n- Follow SunOS C style in `CONTRIBUTING.md` and `.editorconfig`: tabs,\n  80 columns, 4-space continuations, `return (x)`, one declaration per line.\n- `ASSERT*` disappears without debug; `VERIFY*` remains. Never put required\n  side effects in `ASSERT`. Validate user input and corrupt disk data with\n  errors, not assertions that can panic the host.\n- Use `kmem_*`, `vmem_*` and `kmem_cache_*`, not bare `malloc` in common\n  kernel code. `KM_SLEEP` requires a context that permits sleeping;\n  justify `KM_NOSLEEP` and handle allocation failure.\n- Use `sys/zfs_context.h` locks and task queues so common code builds in\n  `libzpool`. Preserve lock order, ownership and reference lifetimes on\n  error paths too. Comment only non-obvious invariants and reasons, briefly.\n- Account for type widths, alignment, byte order and size overflow;\n  avoid arithmetic on `void *`.\n- Declare common module parameters with `ZFS_MODULE_PARAM`; follow existing\n  platform mechanisms elsewhere. Document new parameters in `man/man4/zfs.4`.\n- Follow `scripts/spdxcheck.pl` for license tags; preserve third-party licenses\n  and keep script shebangs first. Follow the component's update process for\n  vendored Lua, zstd and cryptographic code; avoid unrelated changes there.\n\n## Build and test safely\n\nUse a disposable VM for module reloads and ZTS, never a host with live ZFS\npools. `zfs.sh -r` replaces the module stack; ZTS creates and destroys pools,\ndevices and mounts. `$DISKS` may be overwritten without confirmation, and\n`zfs-tests.sh -x` destroys every pool whose name contains `testpool`.\nConfirm disposable devices and the test environment if uncertain.\n\n`zloop.sh`, `ztest` and unit tests run in userspace, but `zloop.sh` deletes its\nworking directory and may change system core-dump settings. Use dedicated\nscratch directories and minimal privileges.\n\n```sh\n./autogen.sh && ./configure --enable-debug && make -j$(nproc)\nmake checkstyle\nmake unit                                 # T=<name> selects one binary\nsudo ./scripts/zfs.sh -r                   # disposable VM only\nsudo ./scripts/zfs-tests.sh -t <test_name>  # disposable VM only\nzfs_source_dir=$(pwd -P)\nzfs_scratch_dir=$(mktemp -d /var/tmp/zfs-zloop.XXXXXX) || exit 1\n(\n    cd \"$zfs_scratch_dir\" || exit 1\n    \"$zfs_source_dir/scripts/zloop.sh\" -t 600 \\\n        -f \"$zfs_scratch_dir\" -c \"$zfs_scratch_dir/cores\"\n)\n```\n\n- Use debug builds for correctness testing; also check release builds.\n  `make checkstyle` must pass; do not bypass cstyle with exclusions.\n  Report actual platforms/tests, missing tools and skipped checks.\n- `vcscheck` rejects untracked files: stage intended additions, and remove\n  only scratch files you created.\n- Verify modules, tools and profiler symbols match the intended build.\n  When transferring sources, include working-tree edits: `git archive HEAD`\n  omits them.\n\n## Compatibility\n\n- Preserve imports of older pools and tolerate absent new data. If a format\n  change prevents older implementations from safely reading or writing,\n  add a feature in `include/zfeature_common.h`, register it in\n  `module/zcommon/zfeature_common.c`, and document it in\n  `man/man7/zpool-features.7`. Gate writes and follow existing activation and\n  `spa_feature_incr()`/`decr()` patterns; enabled is not the same as active.\n- Send streams are a wire ABI: coordinate incompatible `dmu_replay_record`\n  or `DRR_*` changes with maintainers and use appropriate stream flags.\n- Preserve ABI for `libzfs`, `libzfs_core`, `libnvpair` and `libzfsbootenv`.\n  `make checkabi` compares built libraries with `lib/*/*.abi` on x86_64\n  (libabigail >= 2.0). New exports are allowed; do not break existing\n  signatures. Run `make storeabi` only for intentional, reviewed ABI updates.\n- New ioctls use `zfs_ioctl_register()` and nvlist validation via\n  `zfs_keys_*` tables; `libzfs_core` provides stable `lzc_*` wrappers.\n- Preserve CLI options, exit status and script-facing output, especially\n  machine-readable modes. Property docs live in `man/man7/zfsprops.7` and\n  `man/man7/zpoolprops.7`; man pages use mdoc.\n\n## Tests and benchmarks\n\n- ZTS tests: executable `tests/zfs-tests/tests/functional/<area>/<name>.ksh`,\n  source `$STF_SUITE/include/libtest.shlib`, use `log_*` helpers,\n  `verify_runnable \"global\"|\"both\"`, and `log_onexit` cleanup.\n  `.cfg`, `.kshlib` and `.shlib` files must not be executable (`testscheck`).\n- Register tests in `tests/zfs-tests/tests/Makefile.am` (`make regen-tests`)\n  and `tests/runfiles/common.run` or the platform runfile. `make regen-tests`\n  runs `make clean` for the whole build; rebuild before testing, or edit the\n  entries manually to preserve built artifacts. Missing runfile entries\n  exclude tests from that suite, though explicit `-t` still works. Missing\n  `Makefile.am` entries prevent installation of the test.\n- Use harness devices and `$TESTDIR`/`$TESTPOOL`, never fixed host devices\n  or unrelated paths. Clean up pools, datasets, devices and mounts on failure.\n- Add behavioural regressions where feasible; check failure before the fix\n  and success after. Pure refactors need no artificial reproducer.\n  For asynchronous checks, use bounded condition waits and failure diagnostics.\n- Observe internals with `zinject`, `zdb`, events, `zfs_dbgmsg` and kstats\n  (`/proc/spl/kstat` on Linux, `sysctl kstat.zfs` on FreeBSD), rather than\n  adding debug-only ioctls or properties. Do not hide introduced failures in\n  `tests/test-runner/bin/zts-report.py.in` expected-failure/skip lists.\n- Benchmark performance claims under matching workloads, pool layouts,\n  tunables, build options and cache states. Avoid unrelated host/guest load;\n  alternate baseline/patch, repeat runs, report settings and variability.\n  Use matching release configurations for representative measurements:\n  `--enable-debuginfo` adds `-fno-inline` and changes performance.\n\n## Patch preparation\n\n- Before opening an upstream PR, push the final branch to your fork and\n  wait for CI to pass for the exact PR head SHA. Supported PR workflows can\n  then reuse the completed fork results.\n- Open no more than five upstream PRs per day unless agreed in advance\n  with the maintainers.\n- Base ordinary PRs on `master`; use commit subject/body lines <= 72 characters\n  and end the message with `Signed-off-by: Name <email>` (`git commit -s`).\n- Keep changes small and independently reviewable; avoid unrelated refactoring.\n  `make commitcheck` validates `HEAD`, not the uncommitted patch.\n- Override CI's path heuristic with `ZFS-CI-Type: full` or `quick` in the\n  commit body when needed; follow `CONTRIBUTING.md` for override precedence.\n- Do not commit generated `configure`, `Makefile.in`, `zfs_config.h`, editor\n  files or build output; `.abi` updates require the review described above.\n\n<!-- File: CLAUDE.md (Tokens: ~1790 | Category: claude-rule) -->\n# OpenZFS agent notes\n\nUse these notes for day-to-day changes. Consult `.github/CONTRIBUTING.md`\nfor PR, commit and detailed style requirements.\n\n## Portability and code\n\n- Common `module/` code targets Linux, FreeBSD and userspace `libzpool`.\n  Keep native kernel APIs in `module/os/{linux,freebsd}` and use portability\n  interfaces from `include/os/` and `lib/libspl/include/os/`.\n- Use Linux compatibility wrappers and `config/kernel-*.m4` feature checks;\n  kernel version checks alone miss distribution backports.\n- Follow SunOS C style in `CONTRIBUTING.md` and `.editorconfig`: tabs,\n  80 columns, 4-space continuations, `return (x)`, one declaration per line.\n- `ASSERT*` disappears without debug; `VERIFY*` remains. Never put required\n  side effects in `ASSERT`. Validate user input and corrupt disk data with\n  errors, not assertions that can panic the host.\n- Use `kmem_*`, `vmem_*` and `kmem_cache_*`, not bare `malloc` in common\n  kernel code. `KM_SLEEP` requires a context that permits sleeping;\n  justify `KM_NOSLEEP` and handle allocation failure.\n- Use `sys/zfs_context.h` locks and task queues so common code builds in\n  `libzpool`. Preserve lock order, ownership and reference lifetimes on\n  error paths too. Comment only non-obvious invariants and reasons, briefly.\n- Account for type widths, alignment, byte order and size overflow;\n  avoid arithmetic on `void *`.\n- Declare common module parameters with `ZFS_MODULE_PARAM`; follow existing\n  platform mechanisms elsewhere. Document new parameters in `man/man4/zfs.4`.\n- Follow `scripts/spdxcheck.pl` for license tags; preserve third-party licenses\n  and keep script shebangs first. Follow the component's update process for\n  vendored Lua, zstd and cryptographic code; avoid unrelated changes there.\n\n## Build and test safely\n\nUse a disposable VM for module reloads and ZTS, never a host with live ZFS\npools. `zfs.sh -r` replaces the module stack; ZTS creates and destroys pools,\ndevices and mounts. `$DISKS` may be overwritten without confirmation, and\n`zfs-tests.sh -x` destroys every pool whose name contains `testpool`.\nConfirm disposable devices and the test environment if uncertain.\n\n`zloop.sh`, `ztest` and unit tests run in userspace, but `zloop.sh` deletes its\nworking directory and may change system core-dump settings. Use dedicated\nscratch directories and minimal privileges.\n\n```sh\n./autogen.sh && ./configure --enable-debug && make -j$(nproc)\nmake checkstyle\nmake unit                                 # T=<name> selects one binary\nsudo ./scripts/zfs.sh -r                   # disposable VM only\nsudo ./scripts/zfs-tests.sh -t <test_name>  # disposable VM only\nzfs_source_dir=$(pwd -P)\nzfs_scratch_dir=$(mktemp -d /var/tmp/zfs-zloop.XXXXXX) || exit 1\n(\n    cd \"$zfs_scratch_dir\" || exit 1\n    \"$zfs_source_dir/scripts/zloop.sh\" -t 600 \\\n        -f \"$zfs_scratch_dir\" -c \"$zfs_scratch_dir/cores\"\n)\n```\n\n- Use debug builds for correctness testing; also check release builds.\n  `make checkstyle` must pass; do not bypass cstyle with exclusions.\n  Report actual platforms/tests, missing tools and skipped checks.\n- `vcscheck` rejects untracked files: stage intended additions, and remove\n  only scratch files you created.\n- Verify modules, tools and profiler symbols match the intended build.\n  When transferring sources, include working-tree edits: `git archive HEAD`\n  omits them.\n\n## Compatibility\n\n- Preserve imports of older pools and tolerate absent new data. If a format\n  change prevents older implementations from safely reading or writing,\n  add a feature in `include/zfeature_common.h`, register it in\n  `module/zcommon/zfeature_common.c`, and document it in\n  `man/man7/zpool-features.7`. Gate writes and follow existing activation and\n  `spa_feature_incr()`/`decr()` patterns; enabled is not the same as active.\n- Send streams are a wire ABI: coordinate incompatible `dmu_replay_record`\n  or `DRR_*` changes with maintainers and use appropriate stream flags.\n- Preserve ABI for `libzfs`, `libzfs_core`, `libnvpair` and `libzfsbootenv`.\n  `make checkabi` compares built libraries with `lib/*/*.abi` on x86_64\n  (libabigail >= 2.0). New exports are allowed; do not break existing\n  signatures. Run `make storeabi` only for intentional, reviewed ABI updates.\n- New ioctls use `zfs_ioctl_register()` and nvlist validation via\n  `zfs_keys_*` tables; `libzfs_core` provides stable `lzc_*` wrappers.\n- Preserve CLI options, exit status and script-facing output, especially\n  machine-readable modes. Property docs live in `man/man7/zfsprops.7` and\n  `man/man7/zpoolprops.7`; man pages use mdoc.\n\n## Tests and benchmarks\n\n- ZTS tests: executable `tests/zfs-tests/tests/functional/<area>/<name>.ksh`,\n  source `$STF_SUITE/include/libtest.shlib`, use `log_*` helpers,\n  `verify_runnable \"global\"|\"both\"`, and `log_onexit` cleanup.\n  `.cfg`, `.kshlib` and `.shlib` files must not be executable (`testscheck`).\n- Register tests in `tests/zfs-tests/tests/Makefile.am` (`make regen-tests`)\n  and `tests/runfiles/common.run` or the platform runfile. `make regen-tests`\n  runs `make clean` for the whole build; rebuild before testing, or edit the\n  entries manually to preserve built artifacts. Missing runfile entries\n  exclude tests from that suite, though explicit `-t` still works. Missing\n  `Makefile.am` entries prevent installation of the test.\n- Use harness devices and `$TESTDIR`/`$TESTPOOL`, never fixed host devices\n  or unrelated paths. Clean up pools, datasets, devices and mounts on failure.\n- Add behavioural regressions where feasible; check failure before the fix\n  and success after. Pure refactors need no artificial reproducer.\n  For asynchronous checks, use bounded condition waits and failure diagnostics.\n- Observe internals with `zinject`, `zdb`, events, `zfs_dbgmsg` and kstats\n  (`/proc/spl/kstat` on Linux, `sysctl kstat.zfs` on FreeBSD), rather than\n  adding debug-only ioctls or properties. Do not hide introduced failures in\n  `tests/test-runner/bin/zts-report.py.in` expected-failure/skip lists.\n- Benchmark performance claims under matching workloads, pool layouts,\n  tunables, build options and cache states. Avoid unrelated host/guest load;\n  alternate baseline/patch, repeat runs, report settings and variability.\n  Use matching release configurations for representative measurements:\n  `--enable-debuginfo` adds `-fno-inline` and changes performance.\n\n## Patch preparation\n\n- Before opening an upstream PR, push the final branch to your fork and\n  wait for CI to pass for the exact PR head SHA. Supported PR workflows can\n  then reuse the completed fork results.\n- Open no more than five upstream PRs per day unless agreed in advance\n  with the maintainers.\n- Base ordinary PRs on `master`; use commit subject/body lines <= 72 characters\n  and end the message with `Signed-off-by: Name <email>` (`git commit -s`).\n- Keep changes small and independently reviewable; avoid unrelated refactoring.\n  `make commitcheck` validates `HEAD`, not the uncommitted patch.\n- Override CI's path heuristic with `ZFS-CI-Type: full` or `quick` in the\n  commit body when needed; follow `CONTRIBUTING.md` for override precedence.\n- Do not commit generated `configure`, `Makefile.in`, `zfs_config.h`, editor\n  files or build output; `.abi` updates require the review described above.\n\n<!-- File: .claude-plugin/marketplace.json (Tokens: ~300 | Category: marketplace) -->\n# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/openzfs/zfs/HEAD/.claude-plugin/marketplace.json)\n\n<!-- File: .claude-plugin/plugin.json (Tokens: ~300 | Category: plugin-manifest) -->\n# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/openzfs/zfs/HEAD/.claude-plugin/plugin.json)\n\n<!-- File: .cursor/mcp.json (Tokens: ~300 | Category: mcp-config) -->\n# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/openzfs/zfs/HEAD/.cursor/mcp.json)\n</yakaai_skills>"}