docs(cli): document lib file placement map#3189
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
prekshivyas
left a comment
There was a problem hiding this comment.
Pure documentation, 165+/0- across 6 READMEs establishing the architectural vocabulary for the ongoing src/lib/ reorg work. Closes #3164.
The layering rules in src/lib/README.md accurately reflect the patterns that emerged through the recent extraction PRs (#3080, #3083, #3088, #3090, #3107, #3108) — commands parse argv, actions own workflow, domain stays pure, adapters isolate boundaries, state owns persistence, cli for framework, core for cross-cutting primitives. The 14 transitional feature folders (agent/credentials/dashboard/deploy/diagnostics/inference/messaging/onboard/policy/runtime/sandbox/security/shields/tunnel) are sensible intermediate homes for clusters too large to split directly into the primary layers yet.
Specific things that read well:
- High-import legacy files (
onboard.ts,runner.ts,policies.ts,nim.ts,services.ts) explicitly called out as either move-late or keep-compatibility-re-export. Matches the pattern actually used in #3098/#3101 (e.g.resolveSandboxOclifDispatchalias). core/README.mdincludes a scope-creep guard: "If a helper starts depending on Docker, OpenShell, filesystem state, or a specific command workflow, move it to an adapter, action, domain area, or feature folder instead."inference/README.mddocuments the longer-term destination (src/lib/domain/inference/**for pure decisions,src/lib/adapters/**for HTTP/process boundaries) without forcing the split now.onboard/README.mdwarns: "Do not movesrc/lib/onboard.tscasually. It is high-import and high-risk." Good — that file has been friction throughout the stack.security/README.mdcorrectly carves persistence (credentials) out of security helpers (redaction/patterns/filtering).- Migration sequence step (1) is this PR; steps 2-5 sequence low-risk clusters first (agent, dashboard, diagnostics, shields), then security/credentials/core, then inference/model, then onboarding support modules before tackling
onboard.tsitself. Right priority order.
CI: pr.yaml rollup checks pass (commit-lint, dco, layer-boundary, check-hash, changes, get-pr-info, markdown-links, CodeRabbit). checks / macos-e2e / build-sandbox-images and current self-hosted run still in progress at approval time.
## Summary - Bump the docs release metadata to `0.0.37`. - Document release-prep updates for messaging policy presets, sandbox runtime utilities, and the GPU CDI troubleshooting path. - Refresh generated `nemoclaw-user-*` skills from the updated docs. ## Source summary - #3159 -> `docs/reference/troubleshooting.md`: Documents the GPU CDI preflight warning and remediation for `nvidia.com/gpu=all` gateway start failures. - #2415 -> `docs/reference/network-policies.md`, `docs/manage-sandboxes/messaging-channels.md`, `docs/network-policy/customize-network-policy.md`: Clarifies that Telegram, Discord, and Slack egress comes from opt-in messaging presets, not the baseline policy. - #3091 -> `docs/deployment/sandbox-hardening.md`, `docs/network-policy/customize-network-policy.md`: Documents the retained sandbox utilities `vi`, `jq`, and `dos2unix` while keeping host-side policy files as the durable source of truth. ## Test plan - `python3 scripts/docs-to-skills.py docs/ .agents/skills/ --prefix nemoclaw-user` - `make docs` - `npm run build:cli` - `npm run typecheck:cli` - Commit and pre-push hooks: markdownlint, docs-to-skills verification, gitleaks, commitlint, CLI typecheck ## Skipped - #3193 and #3191 matched `docs/.docs-skip` entries for experimental shields/config paths. - #3200 and #3183 were test-only fixes. - #3189 and #3163 were internal documentation/refactor changes with no public docs impact. Made with [Cursor](https://cursor.com) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Clarified which utilities remain in the sandbox runtime for lightweight inspection and cleanup * Noted that messaging endpoints (Discord, Slack, Telegram) are not in the baseline policy and that channel presets are applied during onboarding * Added GPU passthrough troubleshooting for gateway startup * Updated release/version bump and release-prep workflow guidance, including Discord preset description updates <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
Documents the intended
src/libplacement map before moving more legacy TypeScript files. This gives the follow-up reorg PRs a shared vocabulary for commands, actions, domain helpers, adapters, state, core utilities, and transitional feature folders.Related Issue
Closes #3164
Changes
src/lib/README.mdwith the target layer rules and migration sequence.src/lib/core,src/lib/inference,src/lib/onboard,src/lib/sandbox, andsrc/lib/security.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesmake docsbuilds without warnings (doc changes only)Signed-off-by: Carlos Villela cvillela@nvidia.com
Summary by CodeRabbit