NuRec / nurec-onboard
CLAUDE.md33 starsChanged 16 days agoApache-2.0View on GitHub
Project-level conventions for autonomous workflow execution. Never use system python3 (or python) to import ncore. The converter repos pin nvidia-ncore via Bazel; system Python does not have access to this version. Any python3 -c "import ncore ..." or python3 <script> that imports ncore will silently pick up the wrong version or fail. Use bazel run targets inside the converter repo for all NCore operations. Both have the same fix: write the command body to /tmp/claude/<name>.sh (or .py for Python) and…
- Deletes or force-pushes
In this repository10 other files it gives its agents.
- nurec/libs/losses/AGENTS.mdAGENTS.md
- skills/nurec-onboard/AGENTS.mdAGENTS.md
- nurec-onboardSkill
- audit-datasetSkill
- build-ncore-converterSkill
- run-nurecSkill
- validate-ncore-dataSkill
- nurecSkill
- physical-ai-av-benchmarkSkill
- physical-ai-datasetsSkill
The file
We split this CLAUDE.md into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Never use
-d(detached mode): when presenting docker run commands to the operator. - Very specific: line 13
Always assign container names (--name) for easier monitoring and cleanup.
- Very specific: line 49
When a workflow SKILL.md says to run a command, adapt the execution strategy (foreground vs.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!--
SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->CLAUDE.md
Project-level conventions for autonomous workflow execution.
Docker conventions
- Never use
-d(detached mode) when presentingdocker runcommands to the operator. The operator wants to see container output directly in the terminal. Run all containers in foreground (no-dflag). - Always assign container names (
--name) for easier monitoring and cleanup. - Do not modify resource/runtime flags in SKILL
docker runtemplates — specifically--shm-size,--gpus,-eenv vars,--user, and the container-side mount points referenced elsewhere in the command. Substitute only placeholder values (host paths, uid/gid, sequence/container names, sensor IDs). Reducing--shm-size=64gbelow 64g, in particular, will crash PyTorch dataloader workers withNo space left on device. Dropping--user <uid>:<gid>leaves outputs owned byroot:rootand forces an operator-sidesudo chownrecovery before normal cleanup can proceed.
System Python and NCore
Never use system python3 (or python) to import ncore. The converter repos pin nvidia-ncore via Bazel; system Python does not have access to this version. Any python3 -c "import ncore ..." or python3 <script> that imports ncore will silently pick up the wrong version or fail. Use bazel run targets inside the converter repo for all NCore operations.
# CORRECT
cd "$NUREC_ONBOARD_DIR" && bazel run //skills/nurec-onboard/ncore_validation:validate -- ...
cd "$ncore_converter_dir" && bazel run //ncore_<dataset>:convert -- ...
# WRONG — system python sees wrong/missing ncore version
python3 -c "import ncore; ..."
python3 ncore_validation/validate.pyBash tool constraints
- The Bash tool has a maximum timeout of 10 minutes (
BASH_MAX_TIMEOUT_MSceiling of 600000ms per the Bash tool docs). Never run long Docker training commands in foreground Bash tasks. - For commands expected to complete within 10 minutes, use
run_in_background: true(same docs). - For longer commands the agent needs to run itself, use
docker run -dand monitor withdocker logs. This does not apply to commands presented to the operator (see Docker conventions above). Avoid
!in any Bash-tool command line; write the script to/tmp/claude/<name>.{sh,py}and invoke that file. Claude Code's Bash tool unconditionally escapes!→\!at the transport layer (theshell-quotelibrary'squote()function), regardless of quoting context, before passing the command tobash -c. Upstream tracking is broken: the canonical root-cause writeup anthropics/claude-code#35701 was stale-bot-closed despite proposing a one-line regex fix, and the most-upvoted symptom report #10153 was closed in Apr 2026 with "fixed in 2.1.75" — a claim contradicted by direct binary inspection of every cached version through 2.1.145. The only currently-open public tracker is the broad "crazy escaping" meta #7387, kept alive only by the author defeating the stale bot every two weeks. The\!leaks into the eventual command and breaks downstream parsers. Two observed cases:python3 -c '... b"itar" != foo ...'→ Python (orjq,gh, etc.) receives the literal\!=token and rejects it as a syntax error; burns a round-trip.nohup foo & echo $!→ the$!PID expansion arrives as literal$!, the launch silently no-ops, and a downstream "wait for PID" hangs.
Both have the same fix: write the command body to
/tmp/claude/<name>.sh(or.pyfor Python) and invoke that file -- file contents arrive via the filesystem, not via the command-line escape. Quoting tricks (single quotes,set +H, manual\!) do not help; the documented inline alternative is ANSI-C hex ($'\x21'), but a file is cleaner. For background launches, the cleaner pattern is the runner's ownrun_in_background: trueargument, which avoids needing$!at all.- Never bundle non-
dockerwork into adocker-bearing Bash call. Issue eachdocker ...invocation as its own Bash call. Pre-docker setup (mkdir,rm,cp), post-docker reads (docker logs,docker inspect), and cleanup (docker rm) each go in separate Bash calls. The Claude Code sandbox treatsdockeras incompatible and routes any Bash call containingdocker *outside the sandbox (per Sandboxing docs --dockeris the documented example of an incompatible tool, typically placed inexcludedCommandsor escaped viadangerouslyDisableSandbox), which bypassessandbox.filesystem.allowWrite; bundling pulls cleanup-shaped commands out of the sandbox and exposes them to the host filesystem. - Avoid
rm -rf $VAR/*and${VAR}/*shell forms. Bash glob expansion plus an empty/unset$VARbecomesrm -rf /*, which Claude Code's built-in safety layer detects on shape (not on dataflow) and prompts on -- even inbypassPermissionsmode (per the Permissions docs: "Removals targeting the filesystem root or home directory, such asrm -rf /andrm -rf ~, still prompt as a circuit breaker against model error"). When clearing a directory's contents userm -rf "$VAR" && mkdir -p "$VAR"(no glob; target is a fully-qualified path string) orfind "$VAR" -mindepth 1 -delete(no glob; walks contents). Both also abort cleanly if$VARis unset underset -u. - Never invoke
sudo rm(or anysudo-elevated destructive command) autonomously. SKILL prose that mentions root-owned artifacts requiring elevation describes an operator task, not an agent task --sudobypasses the shape-detection heuristics that catchrm -rf $VAR/*and similar footguns. When the agent encounters root-owned outputs (typically because adocker runfallback dropped--user), the recovery path issudo chown -R $(id -u):$(id -g) <path>(run by the operator), after which a normal user-moderm -rf <path>from the agent runs under the standard sandbox/safety layer. Pair thechownwith the path narrowing rule above ("$VAR-free", fully-qualified path) regardless of who runs it.
Workflow execution
- Workflows are fully autonomous -- do not prompt the user for input.
- When a workflow SKILL.md says to run a command, adapt the execution strategy (foreground vs. detached) based on expected runtime.
Sub-agent policy
- When executing the
nurec-onboardworkflow (or any of its steps:build-ncore-converter,validate-ncore-data,run-nurec), do not delegate implementation work to subagents via theAgenttool (Claude Code's Task tool). Execute every step inline in the main session: probe the raw data, write the converter, run conversion, run validation, author the NuRec custom config, launch training, build the diagnosis. Subagent prompts re-scope the SKILL's context behind a written brief, which has caused implementation deviations (e.g. operator-scoped sensor lists leaking from "runtime output filter" into the converter's implementation domain, leaving the code unable to handle non-listed sensors on a future run). The SKILL is the contract; an inline executor can read it directly, a subagent can only read what the orchestrator paraphrases. Inline execution costs more main-context tokens but trades that against deviation risk on a multi-step workflow that can't easily be re-run. - The built-in
ExploreandPlansubagents are exempt from this rule — they are read-only / planning helpers that don't execute SKILL steps, so they can't deviate from the SKILL contract.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

