{"owner":"microsoft","repo":"rushstack","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["skills/rushstack-best-practices/CHANGELOG.md","skills/rushstack-best-practices/SKILL.md"],"skills":{"skills/rushstack-best-practices/CHANGELOG.md":"# Change Log - Rush Stack Skills\n\nThis log was last generated on Tue, 11 Feb 2026 00:00:00 GMT and should not be manually modified.\n\n## 1.0.0\nTue, 11 Feb 2026 00:00:00 GMT\n\n### Minor changes\n\n- Initial release of Rush Stack skills collection\n- `rushstack-best-practices` skill providing guidance for:\n  - Configuring Rush in a monorepo\n  - Common configuration patterns\n  - Package management best practices\n  - Build and toolchain recommendations\n\n","skills/rushstack-best-practices/SKILL.md":"---\nname: rushstack-best-practices\ndescription: Provides best practices and guidance for working with Rush monorepos. Use when the user is working in a Rush-based repository, asks about Rush commands (install, update, build, rebuild), needs help with project selection, dependency management, build caching, subspace configuration, or troubleshooting Rush-specific issues.\nlicense: MIT\nmetadata:\n  author: rushstack\n  version: \"1.0.0\"\n---\n\n# Rushstack Best Practices\n\nThis skill provides essential best practices for working with Rush monorepos. Following these guidelines ensures efficient dependency management, optimal build performance, and proper command usage.\n\n## Important Guidelines\n\n**When encountering unclear issues or questions:**\n\n1. **Never make assumptions** - If unsure about Rush behavior, configuration, or commands\n2. **Search official resources first** - Check documentation and existing issues before guessing\n3. **Provide accurate information** - Base responses on verified sources, not assumptions\n4. **Ask for clarification** - When the problem description is ambiguous or incomplete\n\n## Core Principles\n\n1. **Always use Rush commands** - Avoid npm/pnpm/yarn directly in a Rush monorepo\n2. **Use rushx for single projects** - Like npm run, but Rush-aware\n3. **rush install vs update** - install for CI, update after changes\n4. **rush build vs rebuild** - build for incremental, rebuild for clean\n5. **Projects at 2 levels** - Standard: apps/, libraries/, tools/\n6. **Selection flags reduce scope** - Use --to, --from, --impacted-by\n7. **Build cache is automatic** - Configure output folders to enable\n8. **Subspace for large repos** - Isolate dependencies when needed\n\n## Project Selection Best Practices\n\nWhen running commands like `install`, `update`, `build`, `rebuild`, etc., by default all projects under the entire repository are processed. Use these selection flags to improve efficiency:\n\n### --to <PROJECT>\nSelect specified project and all its dependencies.\n- Build specific project and its dependencies\n- Ensure complete dependency chain build\n```bash\nrush build --to @my-company/my-project\nrush build --to my-project  # If project name is unique\nrush build --to .            # Use current directory's project\n```\n\n### --to-except <PROJECT>\nSelect all dependencies of specified project, but not the project itself.\n- Update project dependencies without processing project itself\n- Pre-build dependencies\n```bash\nrush build --to-except @my-company/my-project\n```\n\n### --from <PROJECT>\nSelect specified project and all its downstream dependencies.\n- Validate changes' impact on downstream projects\n- Build all projects affected by specific project\n```bash\nrush build --from @my-company/my-library\n```\n\n### --impacted-by <PROJECT>\nSelect projects that might be affected by specified project changes, excluding dependencies.\n- Quick test of project change impacts\n- Use when dependency status is already correct\n```bash\nrush build --impacted-by @my-company/my-library\n```\n\n### --impacted-by-except <PROJECT>\nSimilar to `--impacted-by`, but excludes specified project itself.\n- Project itself has been manually built\n- Only need to test downstream impacts\n```bash\nrush build --impacted-by-except @my-company/my-library\n```\n\n### --only <PROJECT>\nOnly select specified project, completely ignore dependency relationships.\n- Dependency status is known to be correct\n- Combine with other selection parameters\n```bash\nrush build --only @my-company/my-project\nrush build --impacted-by projectA --only projectB\n```\n\n## Command Usage Guidelines\n\n### Command Tool Selection\n\nChoose the correct command tool based on different scenarios:\n\n1. **`rush` command** - Execute operations affecting the entire repository or multiple projects\n   - Strict parameter validation and documentation\n   - Support for global and batch commands\n   - Suitable for standardized workflows\n   - Use cases: Dependency installation, building, publishing\n\n2. **`rushx` command** - Execute specific scripts for a single project\n   - Similar to `npm run` or `pnpm run`\n   - Uses Rush version selector for toolchain consistency\n   - Prepares shell environment based on Rush configuration\n   - Use cases: Running project-specific build scripts, tests, dev servers\n\n3. **`rush-pnpm` command** - Replace direct use of pnpm in Rush repository\n   - Sets correct PNPM workspace context\n   - Supports Rush-specific enhancements\n   - Provides compatibility checks with Rush\n   - Use cases: When direct PNPM commands are needed\n\n### Install vs Update\n\n| Command | Behavior | When to Use |\n|---------|----------|-------------|\n| `rush update` | Updates shrinkwrap, installs new dependencies | After cloning, after git pull, after modifying package.json |\n| `rush install` | Read-only install from existing shrinkwrap | CI/CD pipelines, ensuring version consistency |\n\n### Build vs Rebuild\n\n| Command | Behavior | When to Use |\n|---------|----------|-------------|\n| `rush build` | Incremental build, only changed projects | Daily development, quick validation |\n| `rush rebuild` | Clean build all projects | Complete rebuild needed, investigating issues |\n\n## Dependency Management\n\n### Package Manager Selection\nChoose in `rush.json`:\n```json\n{\n  \"pnpmVersion\": \"8.x.x\"     // Preferred - efficient, strict\n  // \"npmVersion\": \"8.x.x\"   // Alternative\n  // \"yarnVersion\": \"1.x.x\"  // Alternative\n}\n```\n\n### Version Constraints\nConfigure in `common/config/subspaces/<subspace>/common-versions.json`:\n```json\n{\n  \"preferredVersions\": {\n    \"react\": \"17.0.2\",\n    \"typescript\": \"~4.5.0\"\n  },\n  \"implicitlyPreferredVersions\": true,\n  \"allowedAlternativeVersions\": {\n    \"typescript\": [\"~4.5.0\", \"~4.6.0\"]\n  }\n}\n```\n\n### Adding/Removing Dependencies\nAlways use Rush commands, not npm/pnpm directly:\n```bash\nrush add -p lodash --dev      # Add dev dependency\nrush add -p react --exact     # Add exact version\nrush remove -p lodash         # Remove dependency\n```\n\n## Build Cache Configuration\n\nConfigure in `<project>/config/rush-project.json`:\n```json\n{\n  \"operationSettings\": [\n    {\n      \"operationName\": \"build\",\n      \"outputFolderNames\": [\"lib\", \"dist\"],\n      \"disableBuildCacheForOperation\": false,\n      \"dependsOnEnvVars\": [\"MY_ENV_VAR\"]\n    }\n  ]\n}\n```\n\n**Cache Behavior:**\n- Cache stored in `common/temp/build-cache`\n- Invalidated by: source changes, dependency changes, env vars, command params\n- Parallel builds supported via `enableParallelism`\n\n## Troubleshooting\n\n### Dependency Issues\n- Avoid `npm`, `pnpm`, `yarn` - use Rush commands\n- Run `rush purge` to clean environment\n- Run `rush update --recheck` to force dependency check\n\n### Build Issues\n- Use `rush rebuild` to skip cache\n- Check `rushx build` output for specific errors\n- Use `--verbose` for detailed logs\n\n### Performance Issues\n- Use selection flags (`--to`, `--from`, etc.) to reduce scope\n- Enable build cache in rush-project.json\n- Consider subspace for very large monorepos\n\n## Subspace for Large Monorepos\n\n**What is Subspace:**\n- Allows multiple PNPM lock files in one Rush monorepo\n- Enables independent dependency management per team/project group\n- Reduces risk from dependency updates\n- Improves install/update performance\n\n**When to Use:**\n- Large monorepos (50+ projects)\n- Multiple teams with different dependency needs\n- Conflicting version requirements\n- Need for faster dependency operations\n\n## Official Resources\n\n### Documentation & References\n\n**Official Websites:**\n- [RushStack.io](https://rushstack.io/) - Main documentation site\n- [Rush.js.io](https://rushjs.io/) - Rush build orchestrator documentation\n- [Heft.rushstack.io](https://heft.rushstack.io/) - Heft build tool documentation\n- [API Extractor](https://api-extractor.com/) - API documentation and rollups\n\n**Search Existing Issues:**\n- Before creating new issues, search [rush-stack-builds issues](https://github.com/microsoft/rushstack/issues)\n\n### When to Search vs. Ask\n\n**Search these resources first when:**\n- Encountering error messages\n- Unsure about configuration options\n- Looking for examples or tutorials\n- Need to understand Rush behavior\n\n**Ask the user for clarification when:**\n- The specific use case is unclear\n- Multiple approaches are possible\n- Context is missing to provide accurate guidance\n- The issue might be environment-specific\n\n## Detailed References\n\nFor expanded information on specific domains, see:\n- `references/core-commands.md` - Detailed command reference\n- `references/project-configuration.md` - Configuration file specifications\n- `references/dependency-management.md` - Advanced dependency patterns\n- `references/build-system.md` - Build optimization and caching\n- `references/subspace.md` - Subspace setup and usage\n"},"files":{"skills/rushstack-best-practices/CHANGELOG.md":"# Change Log - Rush Stack Skills\n\nThis log was last generated on Tue, 11 Feb 2026 00:00:00 GMT and should not be manually modified.\n\n## 1.0.0\nTue, 11 Feb 2026 00:00:00 GMT\n\n### Minor changes\n\n- Initial release of Rush Stack skills collection\n- `rushstack-best-practices` skill providing guidance for:\n  - Configuring Rush in a monorepo\n  - Common configuration patterns\n  - Package management best practices\n  - Build and toolchain recommendations\n\n","skills/rushstack-best-practices/SKILL.md":"---\nname: rushstack-best-practices\ndescription: Provides best practices and guidance for working with Rush monorepos. Use when the user is working in a Rush-based repository, asks about Rush commands (install, update, build, rebuild), needs help with project selection, dependency management, build caching, subspace configuration, or troubleshooting Rush-specific issues.\nlicense: MIT\nmetadata:\n  author: rushstack\n  version: \"1.0.0\"\n---\n\n# Rushstack Best Practices\n\nThis skill provides essential best practices for working with Rush monorepos. Following these guidelines ensures efficient dependency management, optimal build performance, and proper command usage.\n\n## Important Guidelines\n\n**When encountering unclear issues or questions:**\n\n1. **Never make assumptions** - If unsure about Rush behavior, configuration, or commands\n2. **Search official resources first** - Check documentation and existing issues before guessing\n3. **Provide accurate information** - Base responses on verified sources, not assumptions\n4. **Ask for clarification** - When the problem description is ambiguous or incomplete\n\n## Core Principles\n\n1. **Always use Rush commands** - Avoid npm/pnpm/yarn directly in a Rush monorepo\n2. **Use rushx for single projects** - Like npm run, but Rush-aware\n3. **rush install vs update** - install for CI, update after changes\n4. **rush build vs rebuild** - build for incremental, rebuild for clean\n5. **Projects at 2 levels** - Standard: apps/, libraries/, tools/\n6. **Selection flags reduce scope** - Use --to, --from, --impacted-by\n7. **Build cache is automatic** - Configure output folders to enable\n8. **Subspace for large repos** - Isolate dependencies when needed\n\n## Project Selection Best Practices\n\nWhen running commands like `install`, `update`, `build`, `rebuild`, etc., by default all projects under the entire repository are processed. Use these selection flags to improve efficiency:\n\n### --to <PROJECT>\nSelect specified project and all its dependencies.\n- Build specific project and its dependencies\n- Ensure complete dependency chain build\n```bash\nrush build --to @my-company/my-project\nrush build --to my-project  # If project name is unique\nrush build --to .            # Use current directory's project\n```\n\n### --to-except <PROJECT>\nSelect all dependencies of specified project, but not the project itself.\n- Update project dependencies without processing project itself\n- Pre-build dependencies\n```bash\nrush build --to-except @my-company/my-project\n```\n\n### --from <PROJECT>\nSelect specified project and all its downstream dependencies.\n- Validate changes' impact on downstream projects\n- Build all projects affected by specific project\n```bash\nrush build --from @my-company/my-library\n```\n\n### --impacted-by <PROJECT>\nSelect projects that might be affected by specified project changes, excluding dependencies.\n- Quick test of project change impacts\n- Use when dependency status is already correct\n```bash\nrush build --impacted-by @my-company/my-library\n```\n\n### --impacted-by-except <PROJECT>\nSimilar to `--impacted-by`, but excludes specified project itself.\n- Project itself has been manually built\n- Only need to test downstream impacts\n```bash\nrush build --impacted-by-except @my-company/my-library\n```\n\n### --only <PROJECT>\nOnly select specified project, completely ignore dependency relationships.\n- Dependency status is known to be correct\n- Combine with other selection parameters\n```bash\nrush build --only @my-company/my-project\nrush build --impacted-by projectA --only projectB\n```\n\n## Command Usage Guidelines\n\n### Command Tool Selection\n\nChoose the correct command tool based on different scenarios:\n\n1. **`rush` command** - Execute operations affecting the entire repository or multiple projects\n   - Strict parameter validation and documentation\n   - Support for global and batch commands\n   - Suitable for standardized workflows\n   - Use cases: Dependency installation, building, publishing\n\n2. **`rushx` command** - Execute specific scripts for a single project\n   - Similar to `npm run` or `pnpm run`\n   - Uses Rush version selector for toolchain consistency\n   - Prepares shell environment based on Rush configuration\n   - Use cases: Running project-specific build scripts, tests, dev servers\n\n3. **`rush-pnpm` command** - Replace direct use of pnpm in Rush repository\n   - Sets correct PNPM workspace context\n   - Supports Rush-specific enhancements\n   - Provides compatibility checks with Rush\n   - Use cases: When direct PNPM commands are needed\n\n### Install vs Update\n\n| Command | Behavior | When to Use |\n|---------|----------|-------------|\n| `rush update` | Updates shrinkwrap, installs new dependencies | After cloning, after git pull, after modifying package.json |\n| `rush install` | Read-only install from existing shrinkwrap | CI/CD pipelines, ensuring version consistency |\n\n### Build vs Rebuild\n\n| Command | Behavior | When to Use |\n|---------|----------|-------------|\n| `rush build` | Incremental build, only changed projects | Daily development, quick validation |\n| `rush rebuild` | Clean build all projects | Complete rebuild needed, investigating issues |\n\n## Dependency Management\n\n### Package Manager Selection\nChoose in `rush.json`:\n```json\n{\n  \"pnpmVersion\": \"8.x.x\"     // Preferred - efficient, strict\n  // \"npmVersion\": \"8.x.x\"   // Alternative\n  // \"yarnVersion\": \"1.x.x\"  // Alternative\n}\n```\n\n### Version Constraints\nConfigure in `common/config/subspaces/<subspace>/common-versions.json`:\n```json\n{\n  \"preferredVersions\": {\n    \"react\": \"17.0.2\",\n    \"typescript\": \"~4.5.0\"\n  },\n  \"implicitlyPreferredVersions\": true,\n  \"allowedAlternativeVersions\": {\n    \"typescript\": [\"~4.5.0\", \"~4.6.0\"]\n  }\n}\n```\n\n### Adding/Removing Dependencies\nAlways use Rush commands, not npm/pnpm directly:\n```bash\nrush add -p lodash --dev      # Add dev dependency\nrush add -p react --exact     # Add exact version\nrush remove -p lodash         # Remove dependency\n```\n\n## Build Cache Configuration\n\nConfigure in `<project>/config/rush-project.json`:\n```json\n{\n  \"operationSettings\": [\n    {\n      \"operationName\": \"build\",\n      \"outputFolderNames\": [\"lib\", \"dist\"],\n      \"disableBuildCacheForOperation\": false,\n      \"dependsOnEnvVars\": [\"MY_ENV_VAR\"]\n    }\n  ]\n}\n```\n\n**Cache Behavior:**\n- Cache stored in `common/temp/build-cache`\n- Invalidated by: source changes, dependency changes, env vars, command params\n- Parallel builds supported via `enableParallelism`\n\n## Troubleshooting\n\n### Dependency Issues\n- Avoid `npm`, `pnpm`, `yarn` - use Rush commands\n- Run `rush purge` to clean environment\n- Run `rush update --recheck` to force dependency check\n\n### Build Issues\n- Use `rush rebuild` to skip cache\n- Check `rushx build` output for specific errors\n- Use `--verbose` for detailed logs\n\n### Performance Issues\n- Use selection flags (`--to`, `--from`, etc.) to reduce scope\n- Enable build cache in rush-project.json\n- Consider subspace for very large monorepos\n\n## Subspace for Large Monorepos\n\n**What is Subspace:**\n- Allows multiple PNPM lock files in one Rush monorepo\n- Enables independent dependency management per team/project group\n- Reduces risk from dependency updates\n- Improves install/update performance\n\n**When to Use:**\n- Large monorepos (50+ projects)\n- Multiple teams with different dependency needs\n- Conflicting version requirements\n- Need for faster dependency operations\n\n## Official Resources\n\n### Documentation & References\n\n**Official Websites:**\n- [RushStack.io](https://rushstack.io/) - Main documentation site\n- [Rush.js.io](https://rushjs.io/) - Rush build orchestrator documentation\n- [Heft.rushstack.io](https://heft.rushstack.io/) - Heft build tool documentation\n- [API Extractor](https://api-extractor.com/) - API documentation and rollups\n\n**Search Existing Issues:**\n- Before creating new issues, search [rush-stack-builds issues](https://github.com/microsoft/rushstack/issues)\n\n### When to Search vs. Ask\n\n**Search these resources first when:**\n- Encountering error messages\n- Unsure about configuration options\n- Looking for examples or tutorials\n- Need to understand Rush behavior\n\n**Ask the user for clarification when:**\n- The specific use case is unclear\n- Multiple approaches are possible\n- Context is missing to provide accurate guidance\n- The issue might be environment-specific\n\n## Detailed References\n\nFor expanded information on specific domains, see:\n- `references/core-commands.md` - Detailed command reference\n- `references/project-configuration.md` - Configuration file specifications\n- `references/dependency-management.md` - Advanced dependency patterns\n- `references/build-system.md` - Build optimization and caching\n- `references/subspace.md` - Subspace setup and usage\n"},"items":[{"name":"CHANGELOG.md","path":"skills/rushstack-best-practices/CHANGELOG.md","title":"CHANGELOG.md","content":"# Change Log - Rush Stack Skills\n\nThis log was last generated on Tue, 11 Feb 2026 00:00:00 GMT and should not be manually modified.\n\n## 1.0.0\nTue, 11 Feb 2026 00:00:00 GMT\n\n### Minor changes\n\n- Initial release of Rush Stack skills collection\n- `rushstack-best-practices` skill providing guidance for:\n  - Configuring Rush in a monorepo\n  - Common configuration patterns\n  - Package management best practices\n  - Build and toolchain recommendations\n\n","category":"skills","tokens":113},{"name":"SKILL.md","path":"skills/rushstack-best-practices/SKILL.md","title":"rushstack-best-practices Skill","content":"---\nname: rushstack-best-practices\ndescription: Provides best practices and guidance for working with Rush monorepos. Use when the user is working in a Rush-based repository, asks about Rush commands (install, update, build, rebuild), needs help with project selection, dependency management, build caching, subspace configuration, or troubleshooting Rush-specific issues.\nlicense: MIT\nmetadata:\n  author: rushstack\n  version: \"1.0.0\"\n---\n\n# Rushstack Best Practices\n\nThis skill provides essential best practices for working with Rush monorepos. Following these guidelines ensures efficient dependency management, optimal build performance, and proper command usage.\n\n## Important Guidelines\n\n**When encountering unclear issues or questions:**\n\n1. **Never make assumptions** - If unsure about Rush behavior, configuration, or commands\n2. **Search official resources first** - Check documentation and existing issues before guessing\n3. **Provide accurate information** - Base responses on verified sources, not assumptions\n4. **Ask for clarification** - When the problem description is ambiguous or incomplete\n\n## Core Principles\n\n1. **Always use Rush commands** - Avoid npm/pnpm/yarn directly in a Rush monorepo\n2. **Use rushx for single projects** - Like npm run, but Rush-aware\n3. **rush install vs update** - install for CI, update after changes\n4. **rush build vs rebuild** - build for incremental, rebuild for clean\n5. **Projects at 2 levels** - Standard: apps/, libraries/, tools/\n6. **Selection flags reduce scope** - Use --to, --from, --impacted-by\n7. **Build cache is automatic** - Configure output folders to enable\n8. **Subspace for large repos** - Isolate dependencies when needed\n\n## Project Selection Best Practices\n\nWhen running commands like `install`, `update`, `build`, `rebuild`, etc., by default all projects under the entire repository are processed. Use these selection flags to improve efficiency:\n\n### --to <PROJECT>\nSelect specified project and all its dependencies.\n- Build specific project and its dependencies\n- Ensure complete dependency chain build\n```bash\nrush build --to @my-company/my-project\nrush build --to my-project  # If project name is unique\nrush build --to .            # Use current directory's project\n```\n\n### --to-except <PROJECT>\nSelect all dependencies of specified project, but not the project itself.\n- Update project dependencies without processing project itself\n- Pre-build dependencies\n```bash\nrush build --to-except @my-company/my-project\n```\n\n### --from <PROJECT>\nSelect specified project and all its downstream dependencies.\n- Validate changes' impact on downstream projects\n- Build all projects affected by specific project\n```bash\nrush build --from @my-company/my-library\n```\n\n### --impacted-by <PROJECT>\nSelect projects that might be affected by specified project changes, excluding dependencies.\n- Quick test of project change impacts\n- Use when dependency status is already correct\n```bash\nrush build --impacted-by @my-company/my-library\n```\n\n### --impacted-by-except <PROJECT>\nSimilar to `--impacted-by`, but excludes specified project itself.\n- Project itself has been manually built\n- Only need to test downstream impacts\n```bash\nrush build --impacted-by-except @my-company/my-library\n```\n\n### --only <PROJECT>\nOnly select specified project, completely ignore dependency relationships.\n- Dependency status is known to be correct\n- Combine with other selection parameters\n```bash\nrush build --only @my-company/my-project\nrush build --impacted-by projectA --only projectB\n```\n\n## Command Usage Guidelines\n\n### Command Tool Selection\n\nChoose the correct command tool based on different scenarios:\n\n1. **`rush` command** - Execute operations affecting the entire repository or multiple projects\n   - Strict parameter validation and documentation\n   - Support for global and batch commands\n   - Suitable for standardized workflows\n   - Use cases: Dependency installation, building, publishing\n\n2. **`rushx` command** - Execute specific scripts for a single project\n   - Similar to `npm run` or `pnpm run`\n   - Uses Rush version selector for toolchain consistency\n   - Prepares shell environment based on Rush configuration\n   - Use cases: Running project-specific build scripts, tests, dev servers\n\n3. **`rush-pnpm` command** - Replace direct use of pnpm in Rush repository\n   - Sets correct PNPM workspace context\n   - Supports Rush-specific enhancements\n   - Provides compatibility checks with Rush\n   - Use cases: When direct PNPM commands are needed\n\n### Install vs Update\n\n| Command | Behavior | When to Use |\n|---------|----------|-------------|\n| `rush update` | Updates shrinkwrap, installs new dependencies | After cloning, after git pull, after modifying package.json |\n| `rush install` | Read-only install from existing shrinkwrap | CI/CD pipelines, ensuring version consistency |\n\n### Build vs Rebuild\n\n| Command | Behavior | When to Use |\n|---------|----------|-------------|\n| `rush build` | Incremental build, only changed projects | Daily development, quick validation |\n| `rush rebuild` | Clean build all projects | Complete rebuild needed, investigating issues |\n\n## Dependency Management\n\n### Package Manager Selection\nChoose in `rush.json`:\n```json\n{\n  \"pnpmVersion\": \"8.x.x\"     // Preferred - efficient, strict\n  // \"npmVersion\": \"8.x.x\"   // Alternative\n  // \"yarnVersion\": \"1.x.x\"  // Alternative\n}\n```\n\n### Version Constraints\nConfigure in `common/config/subspaces/<subspace>/common-versions.json`:\n```json\n{\n  \"preferredVersions\": {\n    \"react\": \"17.0.2\",\n    \"typescript\": \"~4.5.0\"\n  },\n  \"implicitlyPreferredVersions\": true,\n  \"allowedAlternativeVersions\": {\n    \"typescript\": [\"~4.5.0\", \"~4.6.0\"]\n  }\n}\n```\n\n### Adding/Removing Dependencies\nAlways use Rush commands, not npm/pnpm directly:\n```bash\nrush add -p lodash --dev      # Add dev dependency\nrush add -p react --exact     # Add exact version\nrush remove -p lodash         # Remove dependency\n```\n\n## Build Cache Configuration\n\nConfigure in `<project>/config/rush-project.json`:\n```json\n{\n  \"operationSettings\": [\n    {\n      \"operationName\": \"build\",\n      \"outputFolderNames\": [\"lib\", \"dist\"],\n      \"disableBuildCacheForOperation\": false,\n      \"dependsOnEnvVars\": [\"MY_ENV_VAR\"]\n    }\n  ]\n}\n```\n\n**Cache Behavior:**\n- Cache stored in `common/temp/build-cache`\n- Invalidated by: source changes, dependency changes, env vars, command params\n- Parallel builds supported via `enableParallelism`\n\n## Troubleshooting\n\n### Dependency Issues\n- Avoid `npm`, `pnpm`, `yarn` - use Rush commands\n- Run `rush purge` to clean environment\n- Run `rush update --recheck` to force dependency check\n\n### Build Issues\n- Use `rush rebuild` to skip cache\n- Check `rushx build` output for specific errors\n- Use `--verbose` for detailed logs\n\n### Performance Issues\n- Use selection flags (`--to`, `--from`, etc.) to reduce scope\n- Enable build cache in rush-project.json\n- Consider subspace for very large monorepos\n\n## Subspace for Large Monorepos\n\n**What is Subspace:**\n- Allows multiple PNPM lock files in one Rush monorepo\n- Enables independent dependency management per team/project group\n- Reduces risk from dependency updates\n- Improves install/update performance\n\n**When to Use:**\n- Large monorepos (50+ projects)\n- Multiple teams with different dependency needs\n- Conflicting version requirements\n- Need for faster dependency operations\n\n## Official Resources\n\n### Documentation & References\n\n**Official Websites:**\n- [RushStack.io](https://rushstack.io/) - Main documentation site\n- [Rush.js.io](https://rushjs.io/) - Rush build orchestrator documentation\n- [Heft.rushstack.io](https://heft.rushstack.io/) - Heft build tool documentation\n- [API Extractor](https://api-extractor.com/) - API documentation and rollups\n\n**Search Existing Issues:**\n- Before creating new issues, search [rush-stack-builds issues](https://github.com/microsoft/rushstack/issues)\n\n### When to Search vs. Ask\n\n**Search these resources first when:**\n- Encountering error messages\n- Unsure about configuration options\n- Looking for examples or tutorials\n- Need to understand Rush behavior\n\n**Ask the user for clarification when:**\n- The specific use case is unclear\n- Multiple approaches are possible\n- Context is missing to provide accurate guidance\n- The issue might be environment-specific\n\n## Detailed References\n\nFor expanded information on specific domains, see:\n- `references/core-commands.md` - Detailed command reference\n- `references/project-configuration.md` - Configuration file specifications\n- `references/dependency-management.md` - Advanced dependency patterns\n- `references/build-system.md` - Build optimization and caching\n- `references/subspace.md` - Subspace setup and usage\n","category":"skills","tokens":2176}]}