--- name: tuturuuu-cli-resources description: "Queue heavy local Tuturuuu validation and diagnose competing CPU or RAM workloads with ttr resources." --- # TTR Resource Control Keep concurrent editing responsive by admitting heavy validation through one per-user queue. Check `ttr resources help` and `ttr resources status --json` before a broad test, build, type check, database setup, or browser suite. These commands are local and require no login. ## Choose execution - Prefer a verified remote runner for broad validation: `ttr box run --runner -- `. Confirm its actual host and checkout; same-machine runners and containers do not offload CPU or RAM. - For local work, use `ttr resources run -- `. Sequence lint, tests, and browser QA. Do not start independent heavy commands with Promise.all, parallel shells, or background operators merely because separate threads own them. - Run focused checks first. The queue does not excuse skipping required checks. Persistent development servers and custom subprocess fan-out still consume resources; start only services needed for the task and clean up your own. ## Setup and inspect When machine setup is authorized, use: ```sh ttr resources setup --root --shell zsh --dry-run ttr resources setup --root --shell zsh ttr resources status --json ``` Repeat `--root` for other repositories. Linked Git worktrees inherit repository scope. Zsh/Bash hooks apply to new shells; `--shell none` avoids shell edits and supports explicit queue use. Installation backs up shell files. Setup does not modify repository source, Docker settings, credentials, or runner registrations. The queue runs one job per user. Turbo runs one task; Vitest/Cargo workers adapt to host RAM/CPU. Use `--workers` only for a justified override. Turbo task concurrency alone does not cap Vitest's worker pool. Do not use separate `TTR_RESOURCES_HOME` values across projects: that creates independent queues. Elevated host memory pressure delays new admission. Keep the wait observable; continue lightweight editing while it clears. Do not kill an owner, delete a live lock, or routinely use `TTR_RESOURCES_BYPASS=1` / `--ignore-pressure` to avoid waiting. A bypass is a deliberate exception for a known small operation. ## Diagnose and recover `ttr resources monitor --seconds 60` emits bounded JSONL samples of memory pressure, T3 descendants, and top processes, without command arguments or env values. RSS differs from Activity Monitor's footprint. A snapshot does not prove a historical leak. Identify the owning thread before interrupting active work. If an older CLI lacks this command, report its version and use one serialized validation command with explicit worker limits until the new CLI is installed; do not silently launch unrestricted parallel validation. `disable` / `enable` toggle future automatic admission. `uninstall` requires an idle queue and removes only owned hooks/shims, preserving shell content and backups. Existing processes, absolute binary paths, and replaced PATH values can bypass automatic shims; explicitly wrap unrecognized commands. The queue is cooperative scheduling, not an OS-enforced memory limit.