[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7586XWZQ8B2XYGKCJA381XN":3,"skill-same:01M7586XWZQ8B2XYGKCJA381XN":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":31,"ownerDescription":33,"updatedAt":34,"install":35,"resources":47},"01M7586XWZQ8B2XYGKCJA381XN","dev-loop",null,"Build and test nub during development. Invoke (via the Skill tool) whenever you need to compile the dev `nub` binary, set up a worktree for fast incremental iteration, run a specific test file or a single test, or get oriented in the codebase (the crate map). Encodes the measured fast-build loop: the `fast` profile built through `scripts\u002Frust-build.sh`, which shares ONE CARGO_TARGET_DIR across worktrees (`~\u002F.cache\u002Fnub\u002Fshared-target`) so deps are reused and only the workspace crates recompile — but auto-isolates a worktree to a private target dir the moment it diverges a depended-on crate (vendor\u002Faube, nub-core, …), which is when a shared dir would clobber a sibling and fail with a phantom compile error on correct source (the `rust-build` skill). A shared cross-worktree compiler-WRAPPER cache (sccache) was separately measured to give 0% Rust speedup and is NOT used. Covers the real incantations (`cargo build -p nub-cli --profile fast`, `make install-dev`, `make addon-fast`), the test invocations, and the exact CI cheap gates. SCOPE — the local loop is the EXCEPTION, not the default: a cold build, `clippy --all-targets --all-features`, a full `cargo test`, a `release` build or a multi-fixture sweep goes OFF-HOST, via a CI-run test or the `remote-build` skill. This skill covers only what must stay local — the ~5s warm rebuild you are actively iterating against, and macOS-native checks.","nubjs\u002Fnub","nubjs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6785695?v=4","01M7583N3EYYHSNB6FJQXCDMQH","Nub","01M7583N44MVMSN8385QEF3C8V",4440,"MIT","https:\u002F\u002Fgithub.com\u002Fnubjs\u002Fnub\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdev-loop\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: dev-loop\ndescription: >-\n  Build and test nub during development. Invoke (via the Skill tool) whenever\n  you need to compile the dev `nub` binary, set up a worktree for fast\n  incremental iteration, run a specific test file or a single test, or get\n  oriented in the codebase (the crate map). Encodes the measured fast-build\n  loop: the `fast` profile built through `scripts\u002Frust-build.sh`, which shares\n  ONE CARGO_TARGET_DIR across worktrees (`~\u002F.cache\u002Fnub\u002Fshared-target`) so deps\n  are reused and only the workspace crates recompile — but auto-isolates a\n  worktree to a private target dir the moment it diverges a depended-on crate\n  (vendor\u002Faube, nub-core, …), which is when a shared dir would clobber a sibling\n  and fail with a phantom compile error on correct source (the `rust-build`\n  skill). A shared cross-worktree compiler-WRAPPER cache (sccache) was\n  separately measured to give 0% Rust speedup and is NOT used. Covers the real\n  incantations (`cargo\n  build -p nub-cli --profile fast`, `make install-dev`, `make addon-fast`), the\n  test invocations, and the exact CI cheap gates. SCOPE — the local loop is the\n  EXCEPTION, not the default: a cold build, `clippy --all-targets\n  --all-features`, a full `cargo test`, a `release` build or a multi-fixture\n  sweep goes OFF-HOST, via a CI-run test or the `remote-build` skill. This skill\n  covers only what must stay local — the ~5s warm rebuild you are actively\n  iterating against, and macOS-native checks.\nmetadata:\n  internal: true\n---\n\n# Building & testing nub\n\n**Before you build anything here: does this belong on the local box at all?** The default home for a build, a gate, or a test run is off-host — a committed test that CI runs, or an ephemeral spot VM via the `remote-build` skill (`--job clippy|test|adhoc --detach`, collected with `--attach`). What stays local is the ~5s warm incremental rebuild you are actively iterating against, and macOS-native behavior. A cold build, `clippy --all-targets --all-features`, a full `cargo test`, a `release` build or a multi-fixture sweep goes remote unless you have a stated reason. See `AGENTS.md` → \"Builds and tests go REMOTE by default\".\n\nnub is a Rust workspace — `nub-cli`, `nub-core`, `nub-native` plus the vendored aube PM engine (`vendor\u002Faube`, plain in-tree files, its own Cargo workspace, linked in-process as a library).\n\n**The rule that makes iteration fast:** build with `--profile fast` (never `release`), through `scripts\u002Frust-build.sh`, which points `CARGO_TARGET_DIR` at the shared dir `~\u002F.cache\u002Fnub\u002Fshared-target` — cold ≈ 3 min, every rebuild after ≈ 5s. Don't clean the shared dir between iterations.\n\n**Use the wrapper, not a raw `export CARGO_TARGET_DIR`.** The shared dir is safe only while every worktree agrees on the depended-on crates; two that diverge the same one (classically `vendor\u002Faube`) clobber each other's rlib and fail with a phantom `E0063`-class error on correct source. The wrapper auto-isolates exactly then. **The `rust-build` skill owns the target-dir decision.**\n\n## Step 1 — Set up a worktree\n\nCreate one with the `worktree` skill (`nub scripts\u002Fnew-worktree.ts \u003Cslug>`), then build through the wrapper:\n\n```bash\ncd ~\u002F.cache\u002Fnub\u002Fworktrees\u002F\u003Cslug>\nscripts\u002Frust-build.sh build -p nub-cli --profile fast          # shared cache; auto-isolates on divergence\n```\n\nTwo sharing worktrees serialize on cargo's build lock — a latency cost, never a correctness one.\n\n## Step 2 — Build the dev binary (the `fast` profile)\n\n```bash\n# The dev CLI binary -> target\u002Ffast\u002Fnub. This is the iteration build.\ncargo build -p nub-cli --profile fast\n\n# Full dev binary + N-API addon, symlinked on PATH as nub-dev \u002F nubx-dev:\nmake install-dev        # addon-fast, then `scripts\u002Frust-build.sh build --profile fast`, then symlinks\n                        # nub-dev\u002Fnubx-dev -> $(scripts\u002Frust-build.sh --print-target)\u002Ffast\u002Fnub — the\n                        # wrapper's hashed bucket under ~\u002F.cache\u002Fnub\u002F, NOT the repo's target\u002F. The bucket\n                        # id tracks depended-on crate content, so a change under vendor\u002Faube or nub-core\n                        # moves it: re-run install-dev or nub-dev keeps resolving to the previous bucket.\n\n# Just the native addon (oxc transpiler), fast profile:\nmake addon-fast         # -> runtime\u002Faddons\u002Fnub-native.node\n# Release-profile addon (only when you specifically need release behavior):\nmake addon\n```\n\nThere is **no `nub build` command**.\n\n**Build politeness — the maintainer works on this machine.**\n\n- **The machine-wide governor does the clamping, not you.** `~\u002F.cargo\u002Fconfig.toml` binds `scripts\u002Frustc-qos.sh` as the rustc wrapper (`make qos-global`; `install-dev` re-runs it), which runs every rustc at utility QoS, lets at most two builds compile at once (the rest queue first-come-first-served), and caps the host at six rustc. So a build that sits at `Compiling` with no CPU is queued, not hung: `make build-status` shows who holds the slots and who is waiting. Do not wrap builds in `taskpolicy`\u002F`nice` yourself, and never set `NUB_BUILD_FG=1` or blank `RUSTC_WRAPPER` from an agent — the `rust-build-hygiene` skill has the rules. `~\u002F.cargo\u002Fconfig.toml` also pins `[build] jobs = 6`; CI is unaffected. Leave both in place.\n\n**Why `fast`, never `release`, for iteration** (measured, macOS arm64):\n\n| build | wall time |\n|---|---|\n| `--profile fast`, cold, empty shared target dir | **~3 min** |\n| `--profile fast`, fresh worktree against a WARM shared target dir | only the ~10 workspace crates recompile |\n| `--profile fast`, rebuild after a 1-file change, same target dir | **~5s** |\n| `--profile release`, cold | **~15 min** (and re-LTOs the whole binary on every change) |\n\n`fast` (defined in `Cargo.toml`) inherits `dev` — debug-assertions + overflow checks stay on — drops LTO, uses `codegen-units=256`, line-tables-only debuginfo, `incremental=true`. `release` is a ship profile.\n\n**sccache is NOT used** — measured at a 0% Rust cache-hit rate across separate target dirs (rustc embeds per-target-dir artifact paths in its cache keys; `--remap-path-prefix` + `CARGO_INCREMENTAL=0` doesn't fix it). One shared target dir sidesteps it entirely.\n\n## Step 3 — Run tests\n\n```bash\n# A specific integration-test file (file stem under crates\u002Fnub-cli\u002Ftests\u002F):\ncargo test -p nub-cli --test pm_verbs\ncargo test -p nub-cli --test install_engine\n\n# A single test by name substring (across the crate):\ncargo test -p nub-cli \u003Csubstring>\n# Pin exactly one test:\ncargo test -p nub-cli -- --exact \u003Cfull::module::path::to::test>\n\n# A core crate's tests:\ncargo test -p nub-core\n\n# nub-native is its OWN workspace (excluded from the root one), so `-p nub-native`\n# from the repo root fails — run it from inside the crate. The cdylib sets\n# `test = false`, so this just compiles the addon; its unit-testable logic lives\n# in the napi-free nub-cache-key crate (`cargo test -p nub-cache-key`).\n(cd crates\u002Fnub-native && cargo test)\n\n# The VENDORED AUBE crates are their own workspace, and here the CWD is load-bearing\n# for CORRECTNESS. `vendor\u002Faube\u002F.cargo\u002Fconfig.toml` pins RUST_TEST_THREADS = \"1\" because\n# several aube-util tests mutate the process env and setenv\u002Fgetenv are not thread-safe.\n# Cargo discovers config from the CWD, NOT from --manifest-path, so running from the repo\n# root silently bypasses the pin, runs those tests in parallel, and produces failures CI\n# never sees (`set_allow_builds_*`, `pnpmfile::tests::detect_*`) that look like real bugs.\n(cd vendor\u002Faube && cargo test -p aube-resolver)   # RIGHT — inherits the serial pin\n# cargo test --manifest-path vendor\u002Faube\u002FCargo.toml -p aube-resolver\n#   ^ WRONG from the repo root: resolves the crate but drops the pin.\n\n# Everything (slow):\ncargo test          # or `make test`\n```\n\nThe `nub-cli` integration suite lives in `crates\u002Fnub-cli\u002Ftests\u002F*.rs` — `pm_verbs`, `install_engine`, `info_engine`, `cli_grammar_parity`, `pm_identity`, `pm_two_mode`, `resolution_compat`, `node_compat`, `version_tiers`, `workspace_run`, the `pm_shim*` \u002F `*_config` files. Use the file stem as `--test \u003Cstem>`.\n\n### NEVER judge pass\u002Ffail from a piped `cargo test`\n\n```bash\ncargo test 2>&1 | tail -80        # ← the pipe's status is tail's, not cargo's\necho $?                           # 0, even with failures above\n```\n\nA pipeline reports the LAST command's status, so `| tail`, `| grep`, `| head` all\nreport success while tests were failing. The failure lines scroll past the window\nyou kept, and a green-looking `$?` is what you act on. This has produced a\nconfident \"all green\" on a red suite in this repo more than once.\n\nJudge from the process itself:\n\n```bash\ncargo test; echo \"EXIT=$?\"                      # status is cargo's\ncargo test > \u002Ftmp\u002Ft.log 2>&1; echo \"EXIT=$?\"    # then grep the file at leisure\nset -o pipefail                                 # if you must pipe\n```\n\nSame trap for `clippy` and any gate whose verdict is its exit code. Grepping the\noutput for `FAILED` is not equivalent either: a suite that fails to COMPILE prints\n`error[E…]` and no `FAILED` line at all, so a grep-based check reads it as clean.\n\n## Step 4 — Before pushing: the exact CI cheap gates\n\nMatch `.github\u002Fworkflows\u002Fci.yml` exactly — a scoped `-p` without `--all-targets` misses test-code lints:\n\n```bash\nNUB_ALLOW_INCOMPLETE_RUNTIME=1 cargo clippy --all-targets --all-features --profile fast -- -D warnings\ncargo fmt --check\ncargo test -p \u003Ccrate>        # scoped to what you changed; DEFAULT profile, as CI runs it\n```\n\n`--all-features` turns on `embed-runtime`, which requires a fully staged `runtime\u002F` — the addon plus the vendored `node_modules`. A lint ships nothing, so it opts out, exactly as CI's clippy job and `make verify` do. The `rust-build` skill carries the detail and the placeholder-addon recipe.\n\nKeep `--profile fast` on clippy — it is what CI's check and clippy jobs run and it keeps the gates in the same artifact universe as the dev loop; without it, gating drives a second full dependency build under `dev`. `cargo test` stays on the default profile, matching CI's test jobs.\n\n**The heavy gates run on a remote builder BY DEFAULT — local is the exception.** `cargo clippy --all-targets --all-features`, a full `cargo test`, and any cold build are what saturate the host when many worktrees are building (the bottleneck is disk churn on one APFS volume, not cores). The same tool also runs ad-hoc fixture probes off-box: `--job adhoc --script \u003Cfile>` builds the fast-profile `nub` on the VM and runs your script against it (the `ad-hoc-test` skill). Run the gates off-box — `nub scripts\u002Fremote-build.ts --job clippy --detach`, then `--attach \u003Cvm-name>` to collect (the `remote-build` skill) — for a few cents each, with the byte-identical CI invocation. **Use `--detach`\u002F`--attach`, not the plain foreground form**: a foreground run is SIGKILLed at the agent harness's timeout, which no handler can catch, so cleanup is skipped and the builder leaks until its server-side TTL. The `--profile fast` inner loop stays local. For a macOS binary, `nub scripts\u002Fmac-build.ts` builds natively on a real macOS runner and pulls the signed artifact back.\n\nThen run the full [pre-push local verification loop in AGENTS.md](..\u002F..\u002F..\u002FAGENTS.md). For the e2e probe loop, use the `ad-hoc-test` skill. Get it green locally and push ONCE.\n\n---\n\n## Crate map\n\n**`crates\u002Fnub-cli`** — the CLI (clap dispatch + PM verb routing).\n- `src\u002Fcli.rs` — the clap command grammar + dispatch (the pnpm-compatible PM surface, `run`\u002F`watch`\u002F`nubx`\u002F`upgrade`\u002F`node`, the top-level file runner).\n- `src\u002Fmain.rs` — entry point.\n- `src\u002Fpm_engine\u002F` — routes PM verbs into the vendored aube engine in-process. `mod.rs` (`ENGINE_VERBS`), `present.rs` (rebrands engine output: `ERR_AUBE_*`→`ERR_NUB_*`, `aube`→`nub`), `config_scope.rs` (mirror-active-PM \u002F brand-boundary config policy), `identity.rs` (PM-identity inference), `install_family.rs`, `info_family.rs`, `publish_family.rs`, `store_config_family.rs`, `use_*.rs`, and `bun_config.rs` \u002F `yarn_*` \u002F `unsupported_config.rs` for incumbent-PM compat.\n- `src\u002Fagent\u002F` — agent surface.\n- `tests\u002F*.rs` — integration tests.\n\n**`crates\u002Fnub-core`** — runtime\u002Forchestration.\n- `src\u002Fnode\u002F` — `discovery.rs` (find the user's Node on PATH), `version.rs`, `flags.rs` (V8 \u002F Node flag injection), `feature_matrix.rs` (tier + Node-version gating — the source of truth for version-gated feature claims), `spawn.rs`, `mod.rs`.\n- `src\u002Fpm\u002F`, `src\u002Fworkspace\u002F`, `src\u002Fversion_management\u002F`.\n- `src\u002Fpnp.rs` — Yarn PnP support.\n\n**`crates\u002Fnub-native`** — the N-API addon (a cdylib loaded into the user's Node process). oxc-based transpiler + resolver: `transform.rs`, `resolve.rs`, `tsconfig.rs`, `cache.rs`, `detect.rs`.\n\n**`vendor\u002Faube`** — the vendored PM engine. Its own Cargo workspace; nub takes path deps into `vendor\u002Faube\u002Fcrates\u002F*` and calls `aube::commands::\u003Cverb>::run(...)` in-process, never as a subprocess. Changes are normal nub edits\u002FPRs (no pin, no submodule). For upstream sync, see the `aube-bump` skill.\n\n---\n\n## Quick reference\n\n```bash\n# fresh worktree (see the `worktree` skill: nub scripts\u002Fnew-worktree.ts \u003Cslug>)\ncd ~\u002F.cache\u002Fnub\u002Fworktrees\u002F\u003Cslug>\nscripts\u002Frust-build.sh build -p nub-cli --profile fast\nscripts\u002Frust-build.sh test  -p nub-cli --test \u003Cfile_stem>\n\n# build (fast profile)\ncargo build -p nub-cli --profile fast          # -> target\u002Ffast\u002Fnub  (~3 min cold, ~5s incremental)\nmake install-dev                                # full binary + addon on PATH as nub-dev\u002Fnubx-dev\nmake addon-fast                                 # native addon only\n\n# test\ncargo test -p nub-cli --test \u003Cfile_stem>        # one file\ncargo test -p nub-cli \u003Csubstring>               # one test by name\n\n# CI cheap gates\nNUB_ALLOW_INCOMPLETE_RUNTIME=1 cargo clippy --all-targets --all-features --profile fast -- -D warnings\ncargo fmt --check\n```\n","# Building & testing nub\n\n**Before you build anything here: does this belong on the local box at all?** The default home for a build, a gate, or a test run is off-host — a committed test that CI runs, or an ephemeral spot VM via the `remote-build` skill (`--job clippy|test|adhoc --detach`, collected with `--attach`). What stays local is the ~5s warm incremental rebuild you are actively iterating against, and macOS-native behavior. A cold build, `clippy --all-targets --all-features`, a full `cargo test`, a `release` build or a multi-fixture sweep goes remote unless you have a stated reason. See `AGENTS.md` → \"Builds and tests go REMOTE by default\".\n\nnub is a Rust workspace — `nub-cli`, `nub-core`, `nub-native` plus the vendored aube PM engine (`vendor\u002Faube`, plain in-tree files, its own Cargo workspace, linked in-process as a library).\n\n**The rule that makes iteration fast:** build with `--profile fast` (never `release`), through `scripts\u002Frust-build.sh`, which points `CARGO_TARGET_DIR` at the shared dir `~\u002F.cache\u002Fnub\u002Fshared-target` — cold ≈ 3 min, every rebuild after ≈ 5s. Don't clean the shared dir between iterations.\n\n**Use the wrapper, not a raw `export CARGO_TARGET_DIR`.** The shared dir is safe only while every worktree agrees on the depended-on crates; two that diverge the same one (classically `vendor\u002Faube`) clobber each other's rlib and fail with a phantom `E0063`-class error on correct source. The wrapper auto-isolates exactly then. **The `rust-build` skill owns the target-dir decision.**\n\n## Step 1 — Set up a worktree\n\nCreate one with the `worktree` skill (`nub scripts\u002Fnew-worktree.ts \u003Cslug>`), then build through the wrapper:\n\n```bash\ncd ~\u002F.cache\u002Fnub\u002Fworktrees\u002F\u003Cslug>\nscripts\u002Frust-build.sh build -p nub-cli --profile fast          # shared cache; auto-isolates on divergence\n```\n\nTwo sharing worktrees serialize on cargo's build lock — a latency cost, never a correctness one.\n\n## Step 2 — Build the dev binary (the `fast` profile)\n\n```bash\n# The dev CLI binary -> target\u002Ffast\u002Fnub. This is the iteration build.\ncargo build -p nub-cli --profile fast\n\n# Full dev binary + N-API addon, symlinked on PATH as nub-dev \u002F nubx-dev:\nmake install-dev        # addon-fast, then `scripts\u002Frust-build.sh build --profile fast`, then symlinks\n                        # nub-dev\u002Fnubx-dev -> $(scripts\u002Frust-build.sh --print-target)\u002Ffast\u002Fnub — the\n                        # wrapper's hashed bucket under ~\u002F.cache\u002Fnub\u002F, NOT the repo's target\u002F. The bucket\n                        # id tracks depended-on crate content, so a change under vendor\u002Faube or nub-core\n                        # moves it: re-run install-dev or nub-dev keeps resolving to the previous bucket.\n\n# Just the native addon (oxc transpiler), fast profile:\nmake addon-fast         # -> runtime\u002Faddons\u002Fnub-native.node\n# Release-profile addon (only when you specifically need release behavior):\nmake addon\n```\n\nThere is **no `nub build` command**.\n\n**Build politeness — the maintainer works on this machine.**\n\n- **The machine-wide governor does the clamping, not you.** `~\u002F.cargo\u002Fconfig.toml` binds `scripts\u002Frustc-qos.sh` as the rustc wrapper (`make qos-global`; `install-dev` re-runs it), which runs every rustc at utility QoS, lets at most two builds compile at once (the rest queue first-come-first-served), and caps the host at six rustc. So a build that sits at `Compiling` with no CPU is queued, not hung: `make build-status` shows who holds the slots and who is waiting. Do not wrap builds in `taskpolicy`\u002F`nice` yourself, and never set `NUB_BUILD_FG=1` or blank `RUSTC_WRAPPER` from an agent — the `rust-build-hygiene` skill has the rules. `~\u002F.cargo\u002Fconfig.toml` also pins `[build] jobs = 6`; CI is unaffected. Leave both in place.\n\n**Why `fast`, never `release`, for iteration** (measured, macOS arm64):\n\n| build | wall time |\n|---|---|\n| `--profile fast`, cold, empty shared target dir | **~3 min** |\n| `--profile fast`, fresh worktree against a WARM shared target dir | only the ~10 workspace crates recompile |\n| `--profile fast`, rebuild after a 1-file change, same target dir | **~5s** |\n| `--profile release`, cold | **~15 min** (and re-LTOs the whole binary on every change) |\n\n`fast` (defined in `Cargo.toml`) inherits `dev` — debug-assertions + overflow checks stay on — drops LTO, uses `codegen-units=256`, line-tables-only debuginfo, `incremental=true`. `release` is a ship profile.\n\n**sccache is NOT used** — measured at a 0% Rust cache-hit rate across separate target dirs (rustc embeds per-target-dir artifact paths in its cache keys; `--remap-path-prefix` + `CARGO_INCREMENTAL=0` doesn't fix it). One shared target dir sidesteps it entirely.\n\n## Step 3 — Run tests\n\n```bash\n# A specific integration-test file (file stem under crates\u002Fnub-cli\u002Ftests\u002F):\ncargo test -p nub-cli --test pm_verbs\ncargo test -p nub-cli --test install_engine\n\n# A single test by name substring (across the crate):\ncargo test -p nub-cli \u003Csubstring>\n# Pin exactly one test:\ncargo test -p nub-cli -- --exact \u003Cfull::module::path::to::test>\n\n# A core crate's tests:\ncargo test -p nub-core\n\n# nub-native is its OWN workspace (excluded from the root one), so `-p nub-native`\n# from the repo root fails — run it from inside the crate. The cdylib sets\n# `test = false`, so this just compiles the addon; its unit-testable logic lives\n# in the napi-free nub-cache-key crate (`cargo test -p nub-cache-key`).\n(cd crates\u002Fnub-native && cargo test)\n\n# The VENDORED AUBE crates are their own workspace, and here the CWD is load-bearing\n# for CORRECTNESS. `vendor\u002Faube\u002F.cargo\u002Fconfig.toml` pins RUST_TEST_THREADS = \"1\" because\n# several aube-util tests mutate the process env and setenv\u002Fgetenv are not thread-safe.\n# Cargo discovers config from the CWD, NOT from --manifest-path, so running from the repo\n# root silently bypasses the pin, runs those tests in parallel, and produces failures CI\n# never sees (`set_allow_builds_*`, `pnpmfile::tests::detect_*`) that look like real bugs.\n(cd vendor\u002Faube && cargo test -p aube-resolver)   # RIGHT — inherits the serial pin\n# cargo test --manifest-path vendor\u002Faube\u002FCargo.toml -p aube-resolver\n#   ^ WRONG from the repo root: resolves the crate but drops the pin.\n\n# Everything (slow):\ncargo test          # or `make test`\n```\n\nThe `nub-cli` integration suite lives in `crates\u002Fnub-cli\u002Ftests\u002F*.rs` — `pm_verbs`, `install_engine`, `info_engine`, `cli_grammar_parity`, `pm_identity`, `pm_two_mode`, `resolution_compat`, `node_compat`, `version_tiers`, `workspace_run`, the `pm_shim*` \u002F `*_config` files. Use the file stem as `--test \u003Cstem>`.\n\n### NEVER judge pass\u002Ffail from a piped `cargo test`\n\n```bash\ncargo test 2>&1 | tail -80        # ← the pipe's status is tail's, not cargo's\necho $?                           # 0, even with failures above\n```\n\nA pipeline reports the LAST command's status, so `| tail`, `| grep`, `| head` all\nreport success while tests were failing. The failure lines scroll past the window\nyou kept, and a green-looking `$?` is what you act on. This has produced a\nconfident \"all green\" on a red suite in this repo more than once.\n\nJudge from the process itself:\n\n```bash\ncargo test; echo \"EXIT=$?\"                      # status is cargo's\ncargo test > \u002Ftmp\u002Ft.log 2>&1; echo \"EXIT=$?\"    # then grep the file at leisure\nset -o pipefail                                 # if you must pipe\n```\n\nSame trap for `clippy` and any gate whose verdict is its exit code. Grepping the\noutput for `FAILED` is not equivalent either: a suite that fails to COMPILE prints\n`error[E…]` and no `FAILED` line at all, so a grep-based check reads it as clean.\n\n## Step 4 — Before pushing: the exact CI cheap gates\n\nMatch `.github\u002Fworkflows\u002Fci.yml` exactly — a scoped `-p` without `--all-targets` misses test-code lints:\n\n```bash\nNUB_ALLOW_INCOMPLETE_RUNTIME=1 cargo clippy --all-targets --all-features --profile fast -- -D warnings\ncargo fmt --check\ncargo test -p \u003Ccrate>        # scoped to what you changed; DEFAULT profile, as CI runs it\n```\n\n`--all-features` turns on `embed-runtime`, which requires a fully staged `runtime\u002F` — the addon plus the vendored `node_modules`. A lint ships nothing, so it opts out, exactly as CI's clippy job and `make verify` do. The `rust-build` skill carries the detail and the placeholder-addon recipe.\n\nKeep `--profile fast` on clippy — it is what CI's check and clippy jobs run and it keeps the gates in the same artifact universe as the dev loop; without it, gating drives a second full dependency build under `dev`. `cargo test` stays on the default profile, matching CI's test jobs.\n\n**The heavy gates run on a remote builder BY DEFAULT — local is the exception.** `cargo clippy --all-targets --all-features`, a full `cargo test`, and any cold build are what saturate the host when many worktrees are building (the bottleneck is disk churn on one APFS volume, not cores). The same tool also runs ad-hoc fixture probes off-box: `--job adhoc --script \u003Cfile>` builds the fast-profile `nub` on the VM and runs your script against it (the `ad-hoc-test` skill). Run the gates off-box — `nub scripts\u002Fremote-build.ts --job clippy --detach`, then `--attach \u003Cvm-name>` to collect (the `remote-build` skill) — for a few cents each, with the byte-identical CI invocation. **Use `--detach`\u002F`--attach`, not the plain foreground form**: a foreground run is SIGKILLed at the agent harness's timeout, which no handler can catch, so cleanup is skipped and the builder leaks until its server-side TTL. The `--profile fast` inner loop stays local. For a macOS binary, `nub scripts\u002Fmac-build.ts` builds natively on a real macOS runner and pulls the signed artifact back.\n\nThen run the full [pre-push local verification loop in AGENTS.md](..\u002F..\u002F..\u002FAGENTS.md). For the e2e probe loop, use the `ad-hoc-test` skill. Get it green locally and push ONCE.\n\n---\n\n## Crate map\n\n**`crates\u002Fnub-cli`** — the CLI (clap dispatch + PM verb routing).\n- `src\u002Fcli.rs` — the clap command grammar + dispatch (the pnpm-compatible PM surface, `run`\u002F`watch`\u002F`nubx`\u002F`upgrade`\u002F`node`, the top-level file runner).\n- `src\u002Fmain.rs` — entry point.\n- `src\u002Fpm_engine\u002F` — routes PM verbs into the vendored aube engine in-process. `mod.rs` (`ENGINE_VERBS`), `present.rs` (rebrands engine output: `ERR_AUBE_*`→`ERR_NUB_*`, `aube`→`nub`), `config_scope.rs` (mirror-active-PM \u002F brand-boundary config policy), `identity.rs` (PM-identity inference), `install_family.rs`, `info_family.rs`, `publish_family.rs`, `store_config_family.rs`, `use_*.rs`, and `bun_config.rs` \u002F `yarn_*` \u002F `unsupported_config.rs` for incumbent-PM compat.\n- `src\u002Fagent\u002F` — agent surface.\n- `tests\u002F*.rs` — integration tests.\n\n**`crates\u002Fnub-core`** — runtime\u002Forchestration.\n- `src\u002Fnode\u002F` — `discovery.rs` (find the user's Node on PATH), `version.rs`, `flags.rs` (V8 \u002F Node flag injection), `feature_matrix.rs` (tier + Node-version gating — the source of truth for version-gated feature claims), `spawn.rs`, `mod.rs`.\n- `src\u002Fpm\u002F`, `src\u002Fworkspace\u002F`, `src\u002Fversion_management\u002F`.\n- `src\u002Fpnp.rs` — Yarn PnP support.\n\n**`crates\u002Fnub-native`** — the N-API addon (a cdylib loaded into the user's Node process). oxc-based transpiler + resolver: `transform.rs`, `resolve.rs`, `tsconfig.rs`, `cache.rs`, `detect.rs`.\n\n**`vendor\u002Faube`** — the vendored PM engine. Its own Cargo workspace; nub takes path deps into `vendor\u002Faube\u002Fcrates\u002F*` and calls `aube::commands::\u003Cverb>::run(...)` in-process, never as a subprocess. Changes are normal nub edits\u002FPRs (no pin, no submodule). For upstream sync, see the `aube-bump` skill.\n\n---\n\n## Quick reference\n\n```bash\n# fresh worktree (see the `worktree` skill: nub scripts\u002Fnew-worktree.ts \u003Cslug>)\ncd ~\u002F.cache\u002Fnub\u002Fworktrees\u002F\u003Cslug>\nscripts\u002Frust-build.sh build -p nub-cli --profile fast\nscripts\u002Frust-build.sh test  -p nub-cli --test \u003Cfile_stem>\n\n# build (fast profile)\ncargo build -p nub-cli --profile fast          # -> target\u002Ffast\u002Fnub  (~3 min cold, ~5s incremental)\nmake install-dev                                # full binary + addon on PATH as nub-dev\u002Fnubx-dev\nmake addon-fast                                 # native addon only\n\n# test\ncargo test -p nub-cli --test \u003Cfile_stem>        # one file\ncargo test -p nub-cli \u003Csubstring>               # one test by name\n\n# CI cheap gates\nNUB_ALLOW_INCOMPLETE_RUNTIME=1 cargo clippy --all-targets --all-features --profile fast -- -D warnings\ncargo fmt --check\n```\n",{"name":5,"metadata":24,"description":7},{"internal":25},true,"main","9b734566fd36ceed8379f67a92291bc68af60801",".claude\u002Fskills\u002Fdev-loop",71,"https:\u002F\u002Fgithub.com\u002Fnubjs\u002Fnub","https:\u002F\u002Fnubjs.com","https:\u002F\u002Fgithub.com\u002Fnubjs","The all-in-one Node.js toolkit","2026-11-14 14:11:35",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":25},[37,40,43],{"tool":38,"command":39},"npx","npx skills add nubjs\u002Fnub --skill dev-loop",{"tool":41,"command":42},"bunx","bunx skills add nubjs\u002Fnub --skill dev-loop",{"tool":44,"command":45},"pnpm","pnpm dlx skills add nubjs\u002Fnub --skill dev-loop","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnubjs\u002Fnub\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdev-loop\u002FSKILL.md",[],[49,55,61,68,75,82],{"skillNo":50,"name":51,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M758BSH88RVXBG8TPCT427TY","nub","https:\u002F\u002Fgithub.com\u002Fnubjs\u002Fnub\u002Fblob\u002Fmain\u002Fskills\u002Fnub\u002FSKILL.md",[],[],{"skillNo":56,"name":51,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M758BKPRHXS5MS27WG908PBG","This project uses nub, a single Rust CLI that runs on the project's installed Node and replaces the everyday Node toolchain. ALWAYS prefer nub over node, bun, npm, npx, pnpm, and yarn for: executing JS\u002FTS files, running package.json scripts, the npx-equivalent, installing dependencies, watch mode, and Node version management. Surfaces whenever you would otherwise reach for node\u002Fbun\u002Fnpm\u002Fnpx or a package manager.","https:\u002F\u002Fgithub.com\u002Fnubjs\u002Fnub\u002Fblob\u002Fmain\u002Fsite\u002Fpublic\u002Fskill.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M758BCR8A21H8P4TQ0YRHTC7","worktree","Create and manage isolated git worktrees for parallel build\u002Ftest\u002Flanding work on the nub repo. Invoke (via the Skill tool) whenever you need a fresh worktree to land a change, when you want to know what `.worktreeinclude` does or how to add an entry, or when cleaning up after a merge. Encodes the one-command setup (`nub scripts\u002Fnew-worktree.ts \u003Cslug>` or `node …`) that bakes in the proven recipe — worktree off origin\u002Fmain (vendor\u002Faube is plain in-tree files now, no submodule init), the shared CARGO_TARGET_DIR (`~\u002F.cache\u002Fnub\u002Fshared-target`) that all worktrees reuse, and applying `.worktreeinclude` — plus the eagerly-pull-the-shared-tree discipline and the safe cleanup path. Pairs with the `dev-loop` build skill.","https:\u002F\u002Fgithub.com\u002Fnubjs\u002Fnub\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fworktree\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M758B9NZ1GQMD1A6B25NK0D9","windows-vm-test","Run ad-hoc Nub tests and debugging probes in the maintainer's existing local Windows 11 ARM64 QEMU\u002FHVF VM when its external disk and runbook are present. Use for interactive win32-arm64 or Windows-on-ARM x64-emulation checks; use ci-adhoc-test for true x64-native behavior or when the local VM is unavailable.","https:\u002F\u002Fgithub.com\u002Fnubjs\u002Fnub\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fwindows-vm-test\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M758B2JHMBB6YJTGYSJR65S4","visual-review","Verify UI\u002Flayout\u002Fstyling changes are correct by computing occlusion, clipping, and alignment from the browser's resolved paint order via the chrome-devtools MCP `evaluate_script` tool — instead of eyeballing a flat screenshot. Invoke BEFORE declaring any UI, site, or styling\u002Flayout change correct. Screenshots have no depth buffer, so z-index\u002Focclusion\u002Fclip bugs are exactly where \"just look at it\" fails; the `evaluate_script` routines below turn those fuzzy visual judgments into deterministic measurements — including optical center-of-mass, which measures the glyph ink's true visual center so differently-sized labels can be aligned by more than eye.","https:\u002F\u002Fgithub.com\u002Fnubjs\u002Fnub\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fvisual-review\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M758AWPM7CE440NBAYJHD44J","type-declarations","Add, audit, or update @nubjs\u002Ftypes declarations for Nub runtime APIs. Use whenever Nub adds or changes a user-visible global, built-in method, module loader type, or TC39 proposal; when TypeScript or @types\u002Fnode gains an overlapping declaration; and before every release to reconcile runtime changes since the previous tag. Covers conflict-safe global augmentation, compiler-version routing, fixture matrices, and package verification.","https:\u002F\u002Fgithub.com\u002Fnubjs\u002Fnub\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ftype-declarations\u002FSKILL.md",[],[]]