Read AGENTS.md first. This file is durable gotchas and decisions that are easy to miss — not a second copy of the architecture guide.
Pointer files (CLAUDE.md, GEMINI.md, CODEX.md, .cursorrules) all lead
here via AGENTS.md.
| Path | What it is |
|---|---|
| AGENTS.md | Canonical agent instructions (Nx, NativeScript, plugins, testing) |
| README.md | Human-facing overview and commands |
packages/<name>/AGENTS.md |
Package-specific workflow and invariants |
| packages/ns-rspack/MEMORY.md | Bundler decisions and pitfalls |
| packages/ns-rspack/AGENTS.md | Bundler layout, CLI/IPC contract, invariants |
- Run NativeScript through
npx nsfrom the app directory. Never a globalns. - Sandboxed shells often lack
pnpmonPATH. Put~/.local/share/mise/shimsfirst, thenpnpm exec nx …. code-review-graphMCP is review-only (registered at user scope). Ordinary “where does this live” work uses Grep/Glob/Read, not that graph.- Do not run
nx run ns-rspack:format. The installed oxfmt restyles the whole tree (semicolons, double quotes) away from the committed prettier--no-semi --single-quotestyle. ns typings androiddumps underpackages/*/typings/android/are not source-of-truth until curated and referenced from adapters. Generated files can contain invalid TypeScript and Kotlin-mangled parameter names — do not commit them raw.ns-lynxcannot currently finish a stockns build ios: NativeScript’s metadata generator parses PrimJS public C++ headers as Objective-C. Seepackages/ns-lynx/AGENTS.md.- Device rstest suites on iOS and Android share port 17878. Run them serially.
- Buck2 Android genrules write AARs into the srcs sandbox (
.buck-out/.../srcs). NativeScript only picks uppackages/<pkg>/platforms/android/**/*.aar. The genrule must runtools/install-nativescript-aar.shafterdeployAaror device tests fail with "native runtime not found" while the app still builds (it will have linkedgradle-wrapper.jarinstead). apps/ns-lynx-app,apps/ns-wasm-test, andapps/ns-wry-appeach have their own pnpm lockfile. A dependency change in a linked workspace package (for examplepackages/ns-rspack/package.json) needspnpm installat the repo root and in every nested app that links it — then commit eachpnpm-lock.yaml. CI runspnpm run verify:lockfilesto catch stale nested lockfiles before the device jobs installapps/ns-wasm-test.- NativeScript host apps must stay in the
@nx/js/typescriptpluginexcludelist (apps/ns-wasm-test/*,apps/ns-wry-app/*,apps/ns-lynx-app/*). The plugin inferstsc --build --emitDeclarationOnly, which is wrong for a nested-lockfile NS app.ns-lynx-app-lynx(the rspeedy subproject) is a different folder and should keep plugin inference.