@bleedingdev/modern-js-create 3.2.0-ultramodern.97 → 3.2.0-ultramodern.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/run.js +0 -0
- package/package.json +3 -3
- package/template/.agents/skills-lock.json +0 -34
- package/template/.browserslistrc +0 -4
- package/template/.codex/hooks.json +0 -16
- package/template/.github/renovate.json +0 -53
- package/template/.github/workflows/ultramodern-gates.yml.handlebars +0 -54
- package/template/.gitignore.handlebars +0 -30
- package/template/.mise.toml.handlebars +0 -2
- package/template/.nvmrc +0 -2
- package/template-workspace/.agents/agent-reference-repos.json +0 -24
- package/template-workspace/.agents/rstackjs-agent-skills-LICENSE +0 -21
- package/template-workspace/.agents/skills/rsbuild-best-practices/SKILL.md +0 -57
- package/template-workspace/.agents/skills/rsdoctor-analysis/SKILL.md +0 -96
- package/template-workspace/.agents/skills/rsdoctor-analysis/references/command-map.md +0 -113
- package/template-workspace/.agents/skills/rsdoctor-analysis/references/common-analysis-patterns.md +0 -190
- package/template-workspace/.agents/skills/rsdoctor-analysis/references/install-rsdoctor-common.md +0 -88
- package/template-workspace/.agents/skills/rsdoctor-analysis/references/install-rsdoctor-rspack.md +0 -138
- package/template-workspace/.agents/skills/rsdoctor-analysis/references/install-rsdoctor-webpack.md +0 -71
- package/template-workspace/.agents/skills/rsdoctor-analysis/references/install-rsdoctor.md +0 -39
- package/template-workspace/.agents/skills/rsdoctor-analysis/references/rsdoctor-data-types.md +0 -103
- package/template-workspace/.agents/skills/rslib-best-practices/SKILL.md +0 -58
- package/template-workspace/.agents/skills/rslib-modern-package/SKILL.md +0 -173
- package/template-workspace/.agents/skills/rspack-best-practices/SKILL.md +0 -70
- package/template-workspace/.agents/skills/rspack-tracing/SKILL.md +0 -75
- package/template-workspace/.agents/skills/rspack-tracing/references/bottlenecks.md +0 -47
- package/template-workspace/.agents/skills/rspack-tracing/references/tracing-guide.md +0 -38
- package/template-workspace/.agents/skills/rspack-tracing/scripts/analyze_trace.js +0 -184
- package/template-workspace/.agents/skills/rstest-best-practices/SKILL.md +0 -133
- package/template-workspace/.agents/skills-lock.json +0 -114
- package/template-workspace/.codex/hooks.json +0 -16
- package/template-workspace/.github/renovate.json +0 -29
- package/template-workspace/.github/workflows/ultramodern-workspace-gates.yml.handlebars +0 -54
- package/template-workspace/.gitignore.handlebars +0 -5
- package/template-workspace/.mise.toml.handlebars +0 -2
package/bin/run.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"engines": {
|
|
22
22
|
"node": ">=20"
|
|
23
23
|
},
|
|
24
|
-
"version": "3.2.0-ultramodern.
|
|
24
|
+
"version": "3.2.0-ultramodern.98",
|
|
25
25
|
"types": "./dist/types/index.d.ts",
|
|
26
26
|
"main": "./dist/index.js",
|
|
27
27
|
"bin": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@types/node": "^25.9.1",
|
|
42
42
|
"@typescript/native-preview": "7.0.0-dev.20260527.2",
|
|
43
43
|
"tsx": "^4.22.3",
|
|
44
|
-
"@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.
|
|
44
|
+
"@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.98"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -54,6 +54,6 @@
|
|
|
54
54
|
"start": "node ./dist/index.js"
|
|
55
55
|
},
|
|
56
56
|
"ultramodern": {
|
|
57
|
-
"frameworkVersion": "3.2.0-ultramodern.
|
|
57
|
+
"frameworkVersion": "3.2.0-ultramodern.98"
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": 2,
|
|
3
|
-
"installDir": ".agents/skills",
|
|
4
|
-
"sources": [
|
|
5
|
-
{
|
|
6
|
-
"id": "techsiocz-private",
|
|
7
|
-
"visibility": "private",
|
|
8
|
-
"repository": "https://github.com/TechsioCZ/skills",
|
|
9
|
-
"install": "clone-if-authorized",
|
|
10
|
-
"baseline": [
|
|
11
|
-
{
|
|
12
|
-
"name": "plan-graph",
|
|
13
|
-
"reason": "Build and validate DAGs from .plan.md files"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"name": "dag",
|
|
17
|
-
"reason": "Inspect current plan frontiers and blocked lanes"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"name": "subagent-graph",
|
|
21
|
-
"reason": "Design dependency-aware multi-agent launch graphs"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"name": "helm",
|
|
25
|
-
"reason": "Steer already-running multi-agent work"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"name": "debugger-mode",
|
|
29
|
-
"reason": "Run hypothesis-driven debugging with runtime evidence"
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
}
|
package/template/.browserslistrc
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"Stop": [
|
|
3
|
-
{
|
|
4
|
-
"command": "pnpm format && pnpm lint:fix && pnpm ultramodern:check",
|
|
5
|
-
"timeout": 600000,
|
|
6
|
-
"statusMessage": "Running UltraModern quality gates"
|
|
7
|
-
}
|
|
8
|
-
],
|
|
9
|
-
"SubagentStop": [
|
|
10
|
-
{
|
|
11
|
-
"command": "pnpm format && pnpm lint:fix && pnpm ultramodern:check",
|
|
12
|
-
"timeout": 600000,
|
|
13
|
-
"statusMessage": "Running UltraModern quality gates"
|
|
14
|
-
}
|
|
15
|
-
]
|
|
16
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
3
|
-
"extends": [
|
|
4
|
-
"config:recommended",
|
|
5
|
-
"helpers:pinGitHubActionDigests"
|
|
6
|
-
],
|
|
7
|
-
"dependencyDashboard": true,
|
|
8
|
-
"minimumReleaseAge": "1 day",
|
|
9
|
-
"prConcurrentLimit": 5,
|
|
10
|
-
"prHourlyLimit": 2,
|
|
11
|
-
"rangeStrategy": "bump",
|
|
12
|
-
"schedule": [
|
|
13
|
-
"before 5am on monday"
|
|
14
|
-
],
|
|
15
|
-
"timezone": "Etc/UTC",
|
|
16
|
-
"packageRules": [
|
|
17
|
-
{
|
|
18
|
-
"matchManagers": [
|
|
19
|
-
"github-actions"
|
|
20
|
-
],
|
|
21
|
-
"groupName": "github-actions",
|
|
22
|
-
"labels": [
|
|
23
|
-
"dependencies",
|
|
24
|
-
"github-actions",
|
|
25
|
-
"security"
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"matchManagers": [
|
|
30
|
-
"npm"
|
|
31
|
-
],
|
|
32
|
-
"matchUpdateTypes": [
|
|
33
|
-
"patch",
|
|
34
|
-
"minor"
|
|
35
|
-
],
|
|
36
|
-
"groupName": "npm minor and patch updates",
|
|
37
|
-
"labels": [
|
|
38
|
-
"dependencies",
|
|
39
|
-
"npm"
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"matchUpdateTypes": [
|
|
44
|
-
"major"
|
|
45
|
-
],
|
|
46
|
-
"dependencyDashboardApproval": true,
|
|
47
|
-
"labels": [
|
|
48
|
-
"dependencies",
|
|
49
|
-
"major"
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
name: Ultramodern Gates
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
pull_request:
|
|
6
|
-
|
|
7
|
-
permissions:
|
|
8
|
-
contents: read
|
|
9
|
-
|
|
10
|
-
defaults:
|
|
11
|
-
run:
|
|
12
|
-
shell: bash
|
|
13
|
-
|
|
14
|
-
env:
|
|
15
|
-
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
16
|
-
|
|
17
|
-
concurrency:
|
|
18
|
-
group: ultramodern-gates-${{ github.workflow }}-${{ github.ref }}
|
|
19
|
-
cancel-in-progress: true
|
|
20
|
-
|
|
21
|
-
jobs:
|
|
22
|
-
ultramodern-gates:
|
|
23
|
-
runs-on: ubuntu-latest
|
|
24
|
-
timeout-minutes: 20
|
|
25
|
-
steps:
|
|
26
|
-
- name: Harden Runner
|
|
27
|
-
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2
|
|
28
|
-
with:
|
|
29
|
-
egress-policy: audit
|
|
30
|
-
|
|
31
|
-
- name: Checkout
|
|
32
|
-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
33
|
-
with:
|
|
34
|
-
fetch-depth: 1
|
|
35
|
-
persist-credentials: false
|
|
36
|
-
|
|
37
|
-
- name: Setup Node.js
|
|
38
|
-
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
39
|
-
with:
|
|
40
|
-
node-version: 24
|
|
41
|
-
|
|
42
|
-
- name: Setup mise
|
|
43
|
-
uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
|
|
44
|
-
|
|
45
|
-
- name: Install Dependencies
|
|
46
|
-
run: mise exec -- pnpm install --frozen-lockfile
|
|
47
|
-
|
|
48
|
-
- name: Validate Ultramodern Contract
|
|
49
|
-
run: mise exec -- pnpm run ultramodern:check
|
|
50
|
-
|
|
51
|
-
- name: Build
|
|
52
|
-
env:
|
|
53
|
-
MODERN_PUBLIC_SITE_URL: http://localhost:8080
|
|
54
|
-
run: mise exec -- pnpm run build
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
.DS_Store
|
|
2
|
-
|
|
3
|
-
.pnp
|
|
4
|
-
.pnp.js
|
|
5
|
-
.env.local
|
|
6
|
-
.env.*.local
|
|
7
|
-
.history
|
|
8
|
-
*.log*
|
|
9
|
-
|
|
10
|
-
node_modules/
|
|
11
|
-
.yarn-integrity
|
|
12
|
-
.pnpm-store/
|
|
13
|
-
*.tsbuildinfo
|
|
14
|
-
.changeset/pre.json
|
|
15
|
-
|
|
16
|
-
dist/
|
|
17
|
-
coverage/
|
|
18
|
-
release/
|
|
19
|
-
output/
|
|
20
|
-
output_resource/
|
|
21
|
-
log/
|
|
22
|
-
|
|
23
|
-
.vscode/**/*
|
|
24
|
-
!.vscode/settings.json
|
|
25
|
-
!.vscode/extensions.json
|
|
26
|
-
.idea/
|
|
27
|
-
|
|
28
|
-
**/*/typings/auto-generated
|
|
29
|
-
|
|
30
|
-
modern.config.local.*
|
package/template/.nvmrc
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": 1,
|
|
3
|
-
"defaultEnabled": true,
|
|
4
|
-
"strategy": "git-subtree-squash",
|
|
5
|
-
"installDir": "repos",
|
|
6
|
-
"repositories": [
|
|
7
|
-
{
|
|
8
|
-
"id": "effect",
|
|
9
|
-
"name": "Effect",
|
|
10
|
-
"url": "https://github.com/Effect-TS/effect.git",
|
|
11
|
-
"ref": "main",
|
|
12
|
-
"path": "repos/effect",
|
|
13
|
-
"readOnly": true
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"id": "ultramodern-js",
|
|
17
|
-
"name": "UltraModern.js",
|
|
18
|
-
"url": "https://github.com/BleedingDev/ultramodern.js.git",
|
|
19
|
-
"ref": "main-ultramodern",
|
|
20
|
-
"path": "repos/ultramodern.js",
|
|
21
|
-
"readOnly": true
|
|
22
|
-
}
|
|
23
|
-
]
|
|
24
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 RstackJS Contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: rsbuild-best-practices
|
|
3
|
-
description: Rsbuild best practices for config, CLI workflow, type checking, bundle optimization, assets, and debugging. Use when writing, reviewing, or troubleshooting Rsbuild projects.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Rsbuild Best Practices
|
|
7
|
-
|
|
8
|
-
Apply these rules when writing or reviewing Rsbuild projects.
|
|
9
|
-
|
|
10
|
-
## Configuration
|
|
11
|
-
|
|
12
|
-
- Use `rsbuild.config.ts` and `defineConfig`
|
|
13
|
-
- Use `tools.rspack` or `tools.bundlerChain` only when no first-class Rsbuild option exists
|
|
14
|
-
- Define explicit `source.entry` values for multi-page applications
|
|
15
|
-
- In TypeScript projects, prefer `tsconfig.json` path aliases first
|
|
16
|
-
|
|
17
|
-
## CLI
|
|
18
|
-
|
|
19
|
-
- Use `rsbuild` for local development
|
|
20
|
-
- Use `rsbuild build` for production build
|
|
21
|
-
- Use `rsbuild preview` only for local production preview
|
|
22
|
-
- Use `rsbuild inspect` to inspect final Rsbuild/Rspack configs
|
|
23
|
-
|
|
24
|
-
## Type checking
|
|
25
|
-
|
|
26
|
-
- Use `@rsbuild/plugin-type-check` for integrated dev/build type checks
|
|
27
|
-
- Or run `tsc --noEmit`/`vue-tsc --noEmit` as an explicit script step
|
|
28
|
-
|
|
29
|
-
## Bundle size optimization
|
|
30
|
-
|
|
31
|
-
- Prefer dynamic `import()` for non-critical code paths
|
|
32
|
-
- Prefer lightweight libraries where possible
|
|
33
|
-
- Keep browserslist aligned with real compatibility requirements
|
|
34
|
-
|
|
35
|
-
## Asset management
|
|
36
|
-
|
|
37
|
-
- Import source-managed assets from project source directories, not from `public`
|
|
38
|
-
- Reference `public` files by absolute URL path
|
|
39
|
-
|
|
40
|
-
## Security
|
|
41
|
-
|
|
42
|
-
- Do not publish `.map` files to public servers/CDNs when production source maps are enabled
|
|
43
|
-
|
|
44
|
-
## Debugging
|
|
45
|
-
|
|
46
|
-
- Run with `DEBUG=rsbuild` when diagnosing config resolution or plugin behavior
|
|
47
|
-
- Read generated files in `dist/.rsbuild` to confirm final config, not assumed config
|
|
48
|
-
|
|
49
|
-
## Profiling
|
|
50
|
-
|
|
51
|
-
- Use Node CPU profiling (`--cpu-prof`) when JavaScript-side overhead is suspected
|
|
52
|
-
- Use `RSPACK_PROFILE=OVERVIEW` and analyze trace output for compiler-phase bottlenecks
|
|
53
|
-
|
|
54
|
-
## Documentation
|
|
55
|
-
|
|
56
|
-
- For the latest (v2) docs, read http://rsbuild.rs/llms.txt
|
|
57
|
-
- For Rsbuild v1 docs, read http://v1.rsbuild.rs/llms.txt
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: rsdoctor-analysis
|
|
3
|
-
description: Use when analyzing Rspack/Webpack bundles from local `rsdoctor-data.json` and producing evidence-based optimization recommendations.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Rsdoctor Analysis Assistant Skill
|
|
7
|
-
|
|
8
|
-
Use the globally installed `rsdoctor-agent` CLI from `@rsdoctor/agent-cli` only after a real `rsdoctor-data.json` path exists. Keep analysis read-only unless the user explicitly asks for install/config setup.
|
|
9
|
-
|
|
10
|
-
Response order (required): High-Priority Issues -> Proposed Solutions -> Optional Reference-Chain Follow-up Choices -> Next Deep-Dive Issue Categories (Not commands).
|
|
11
|
-
|
|
12
|
-
## Core Workflow
|
|
13
|
-
|
|
14
|
-
1. Reuse current-session results and valid `.rsdoctor-analysis-cache.json` entries before doing new work.
|
|
15
|
-
2. Locate `rsdoctor-data.json` fast: user-provided path, then `dist/rsdoctor-data.json`, `output/rsdoctor-data.json`, `static/rsdoctor-data.json`, `.rsdoctor/rsdoctor-data.json`, then one bounded `rg --files` search excluding `node_modules` and `.git`. Treat `manifest.json` only as an index.
|
|
16
|
-
3. If data exists, skip all plugin version/config/build generation logic. Update cache when useful.
|
|
17
|
-
4. If data is missing, stop analysis: do not run `rsdoctor-agent` analysis commands, do not run the Analysis Gate, and either ask for the data path or run the Generation Gate below only when setup/generation is required.
|
|
18
|
-
5. After a real data file exists, run Analysis Gate at most once before the first `rsdoctor-agent` data-fetch command: verify global `@rsdoctor/agent-cli` with `npm view @rsdoctor/agent-cli version` and `rsdoctor-agent --version`; install latest only if missing/outdated, a version-related error occurs, or the user asks to refresh.
|
|
19
|
-
6. Fetch only the Default Evidence Set first; run independent fetches in parallel when possible; synthesize findings in the required response order.
|
|
20
|
-
|
|
21
|
-
Performance rules: parallelize independent checks, cache only derived facts (`dataFile`, `dataFileMtime`, `pluginName`, `pluginVersion`, dependency/config/plugin modification times), and invalidate cache when paths disappear, modification times change, the user asks to refresh, or cached values fail. Speculative plugin checks must not trigger generation; use them only after confirming the data file is missing.
|
|
22
|
-
|
|
23
|
-
## Generation Gate
|
|
24
|
-
|
|
25
|
-
Identify `pluginName` (`@rsdoctor/rspack-plugin` or `@rsdoctor/webpack-plugin`) and determine `pluginVersion` from local files first: `package.json`, lockfile, then `node_modules/<plugin>/package.json`; use `pnpm why` / `npm ls` only as fallback.
|
|
26
|
-
|
|
27
|
-
Use this exact if/else decision tree; do not merge branches:
|
|
28
|
-
|
|
29
|
-
```text
|
|
30
|
-
if pluginName is missing:
|
|
31
|
-
install/register the matching Rsdoctor plugin, then configure output.mode='brief' and output.options.type=['json']; build with RSDOCTOR=true only
|
|
32
|
-
else if pluginVersion is unknown:
|
|
33
|
-
resolve pluginVersion first; if still unknown, configure output.mode='brief' and output.options.type=['json']; build with RSDOCTOR=true only
|
|
34
|
-
else if pluginVersion >= 1.5.11:
|
|
35
|
-
do not edit plugin config just for JSON; build with RSDOCTOR_OUTPUT=json and RSDOCTOR=true if needed
|
|
36
|
-
else: # pluginVersion < 1.5.11
|
|
37
|
-
MUST configure output.mode='brief' and output.options.type=['json']; build with RSDOCTOR=true only
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Preflight every build command: `RSDOCTOR_OUTPUT=json` is allowed only in the `pluginVersion >= 1.5.11` branch. For missing, unknown, or `< 1.5.11`, it is forbidden. For `< 1.5.11`, generating `rsdoctor-data.json` requires the plugin config below:
|
|
41
|
-
|
|
42
|
-
```ts
|
|
43
|
-
output: {
|
|
44
|
-
mode: 'brief',
|
|
45
|
-
options: {
|
|
46
|
-
type: ['json'],
|
|
47
|
-
},
|
|
48
|
-
}
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Evidence and Command Bounds
|
|
52
|
-
|
|
53
|
-
Default Evidence Set:
|
|
54
|
-
|
|
55
|
-
| Summary key | Evidence source | Bounds |
|
|
56
|
-
| -------------------- | ------------------------------------------ | --------------------------------------------- |
|
|
57
|
-
| `buildCost` | `build summary` | filtered fields only |
|
|
58
|
-
| `assetsTop` | top assets by raw/gzip size | fixed Top-N |
|
|
59
|
-
| `packagesTop` | top packages by gzip size | fixed Top-N; avoid full `packages list` pages |
|
|
60
|
-
| `duplicatePackages` | E1001 duplicate package summary | first-pass summary only |
|
|
61
|
-
| `crossChunkPackages` | E1002 cross-chunk duplication summary | first-pass summary only |
|
|
62
|
-
| `retainedModulesTop` | `tree-shaking retained-modules --limit 10` | filtered fields only; no `--compact` |
|
|
63
|
-
|
|
64
|
-
Scope rules:
|
|
65
|
-
|
|
66
|
-
- Use `rsdoctor-agent` for bundle data access only after `rsdoctor-data.json` exists; prefer parallel independent fetches; bound output with `--filter`, pagination, and `--limit`.
|
|
67
|
-
- Default analysis stays within the Default Evidence Set. For non-default analysis, choose minimal fields from [references/rsdoctor-data-types.md](references/rsdoctor-data-types.md) and patterns from [references/common-analysis-patterns.md](references/common-analysis-patterns.md).
|
|
68
|
-
- Treat chain tracing, broad commands, optimization edits, splitChunks experiments, and build re-runs as opt-in follow-ups that require user confirmation.
|
|
69
|
-
- For duplicate packages and tree-shaking issues, identify issues first; trace reference/import chains only after user confirmation.
|
|
70
|
-
- Prefer `tree-shaking retained-modules --emitted-only --category side-effects --limit 10` with narrow `--filter` for side-effects investigations.
|
|
71
|
-
- For retained emitted modules, use `tree-shaking retained-modules` with `--emitted-only`, bounded `--category`, `--sort gzipSize`, `--limit`, and narrow `--filter`; do not pass `--compact`.
|
|
72
|
-
- Use `tree-shaking summary` only as fallback for missing fields or aggregate context. Treat `tree-shaking bailout-reasons` as high-volume; run it only when explicitly requested and pass target `--modules` (max 100).
|
|
73
|
-
- If any command exceeds `5k` tokens, `500 KB` raw output, or a few hundred transcript lines, stop broad fetching and switch to targeted compact queries.
|
|
74
|
-
|
|
75
|
-
## Output and Recovery
|
|
76
|
-
|
|
77
|
-
Output format:
|
|
78
|
-
|
|
79
|
-
1. Issues found in the current build and recommended fixes:
|
|
80
|
-
- Group each issue with its fix recommendation.
|
|
81
|
-
- Include concrete evidence (size/time/count/path/rule code) and priority.
|
|
82
|
-
- For duplicate packages and tree-shaking issues, include a short "continue tracing vs stop here" choice.
|
|
83
|
-
2. Whether deeper analysis is still needed:
|
|
84
|
-
- List remaining issue categories only, not commands.
|
|
85
|
-
|
|
86
|
-
For Top-N insights, prefer a table: `Name | Volume/Time | Count | Recommendation`.
|
|
87
|
-
|
|
88
|
-
Recovery rules:
|
|
89
|
-
|
|
90
|
-
- `rsdoctor-data.json` missing: do not run `rsdoctor-agent`; ask for the data path or run Generation Gate, then use the matching install reference if setup is needed.
|
|
91
|
-
- Command not found: run Analysis Gate, then retry with `rsdoctor-agent`.
|
|
92
|
-
- `query` reports unknown tool: run `list` and use a catalog tool name, or switch to direct `<group> <subcommand>` mode.
|
|
93
|
-
- JSON read error: verify file path, JSON validity, and permissions.
|
|
94
|
-
- In Codex, do not run `install`, `build`, global CLI installation, version checks, or `rsdoctor-agent...` inside sandbox. Run Rsdoctor CLI setup and data-fetch commands outside sandbox so they can access project files and dependencies normally.
|
|
95
|
-
|
|
96
|
-
References: commands/options [references/command-map.md](references/command-map.md); install/config/data location [references/install-rsdoctor.md](references/install-rsdoctor.md), [references/install-rsdoctor-rspack.md](references/install-rsdoctor-rspack.md), [references/install-rsdoctor-webpack.md](references/install-rsdoctor-webpack.md), [references/install-rsdoctor-common.md](references/install-rsdoctor-common.md); raw data fields [references/rsdoctor-data-types.md](references/rsdoctor-data-types.md); common patterns [references/common-analysis-patterns.md](references/common-analysis-patterns.md).
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
# Rsdoctor Skill Command Map
|
|
2
|
-
|
|
3
|
-
Stable CLI entry:
|
|
4
|
-
|
|
5
|
-
- Install and verify the global CLI first:
|
|
6
|
-
- `npm view @rsdoctor/agent-cli version`
|
|
7
|
-
- `rsdoctor-agent --version`
|
|
8
|
-
- If missing or outdated: `npm install -g @rsdoctor/agent-cli@latest`
|
|
9
|
-
- Run data-fetch commands directly with `rsdoctor-agent <group> <subcommand> [options]`.
|
|
10
|
-
|
|
11
|
-
Top-level command mode:
|
|
12
|
-
|
|
13
|
-
- `list`
|
|
14
|
-
- `query <tool-name> --data-file <path> [--input <json>]`
|
|
15
|
-
|
|
16
|
-
`query` catalog (current):
|
|
17
|
-
|
|
18
|
-
- `chunks_list`
|
|
19
|
-
- `packages_direct_dependencies`
|
|
20
|
-
- `packages_duplicates`
|
|
21
|
-
- `packages_similar`
|
|
22
|
-
- `build_summary`
|
|
23
|
-
- `bundle_optimize`
|
|
24
|
-
- `errors_list`
|
|
25
|
-
- `tree_shaking_summary`
|
|
26
|
-
|
|
27
|
-
Option scopes:
|
|
28
|
-
|
|
29
|
-
- `--data-file <path>`:
|
|
30
|
-
- required for `query`, direct `<group> <subcommand>`, and `ai <group> <subcommand>`
|
|
31
|
-
- not required for `list`, `ai --describe`, `ai --schema`
|
|
32
|
-
- `--input <json>`: optional for `query`
|
|
33
|
-
- `--filter <...>`: supported by every data-fetch function; use it to return only required fields selected from `@rsdoctor/types` / [rsdoctor-data-types.md](rsdoctor-data-types.md)
|
|
34
|
-
- `--compact`: add whenever possible to keep CLI JSON compact. Do not use it with `tree-shaking retained-modules`; use `--filter` and `--limit` instead.
|
|
35
|
-
|
|
36
|
-
## Chunks
|
|
37
|
-
|
|
38
|
-
- `chunks list` -> List all chunks. Pagination: `--page-number`, `--page-size`
|
|
39
|
-
- `chunks by-id --id <n>` -> Get chunk detail by numeric id
|
|
40
|
-
- `chunks large` -> Find oversized chunks. High-noise in default analysis; avoid unless the user asks for chunk deep dive.
|
|
41
|
-
|
|
42
|
-
## Modules
|
|
43
|
-
|
|
44
|
-
- `modules by-id --id <id>` -> Module detail by id
|
|
45
|
-
- `modules by-path --path "<path>"` -> Module lookup by path
|
|
46
|
-
- `modules issuer --id <id>` -> Issuer/import chain (recommended as second-pass, after user confirms chain tracing)
|
|
47
|
-
- `modules exports` -> Module exports info
|
|
48
|
-
- `modules side-effects` -> Non-tree-shakeable modules. Fallback only for side-effects analysis; use `--page-size 10`, narrow filters, and stop if output exceeds `5k` tokens or `500 KB`.
|
|
49
|
-
|
|
50
|
-
## Packages
|
|
51
|
-
|
|
52
|
-
- `packages list` -> Package list with size/duplication info. Do not read full pages in default analysis; use fixed Top-N package summaries or narrowly filtered/package-targeted queries.
|
|
53
|
-
- `packages by-name --name <pkg>` -> Package lookup by name
|
|
54
|
-
- `packages dependencies` -> Dependency graph. Pagination: `--page-number`, `--page-size`
|
|
55
|
-
- `packages direct-dependencies` -> Direct third-party package dependencies imported by project/local packages. Tool name: `packages_direct_dependencies`
|
|
56
|
-
- `packages duplicates` -> Duplicate package detection (first-pass summary before optional chain tracing)
|
|
57
|
-
- `packages similar` -> Similar package detection
|
|
58
|
-
|
|
59
|
-
## Assets
|
|
60
|
-
|
|
61
|
-
- `assets list` -> Asset list with size info
|
|
62
|
-
- `assets diff --baseline <path> --current <path>` -> Compare two builds
|
|
63
|
-
- `assets media` -> Media optimization guidance
|
|
64
|
-
|
|
65
|
-
## Loaders
|
|
66
|
-
|
|
67
|
-
- `loaders hot-files` -> Slowest loader/file pairs. Options: `--page-number`, `--page-size`, `--min-costs`
|
|
68
|
-
- `loaders directories` -> Loader times by directory. Options: `--page-number`, `--page-size`, `--min-total-costs`
|
|
69
|
-
|
|
70
|
-
## Build
|
|
71
|
-
|
|
72
|
-
- `build summary` -> Build summary and costs
|
|
73
|
-
- `build entrypoints` -> Entrypoints
|
|
74
|
-
- `build config` -> Build config snapshot
|
|
75
|
-
- `build optimize` -> Bundle optimization inputs. High-noise in default analysis; avoid unless the user asks for bundle optimization deep dive or default evidence is insufficient. Options: `--step`, `--side-effects-page-number`, `--side-effects-page-size` (recommend `--side-effects-page-size 10`).
|
|
76
|
-
|
|
77
|
-
## Bundle
|
|
78
|
-
|
|
79
|
-
- `bundle optimize` -> Alias of `build optimize`
|
|
80
|
-
|
|
81
|
-
## Errors
|
|
82
|
-
|
|
83
|
-
- `errors list` -> All errors and warnings
|
|
84
|
-
- `errors by-code --code <code>` -> Filter by code. For default E1001/E1002 summaries, prefer local JSON summarization.
|
|
85
|
-
- `errors by-level --level <level>` -> Filter by level
|
|
86
|
-
|
|
87
|
-
## Rules
|
|
88
|
-
|
|
89
|
-
- `rules list` -> Rule scan results
|
|
90
|
-
|
|
91
|
-
## Server
|
|
92
|
-
|
|
93
|
-
- `server port` -> Current JSON data file path
|
|
94
|
-
|
|
95
|
-
## Tree-Shaking
|
|
96
|
-
|
|
97
|
-
- `tree-shaking summary` -> Overall tree-shaking health summary (can be very large; filter with fields from `rsdoctor-data-types`, compact where useful, and use aggregated results)
|
|
98
|
-
- `tree-shaking retained-modules` -> Retained emitted modules by category for tree-shaking diagnosis. Useful options: `--emitted-only`, `--category cjs,barrel,side-effects`, `--sort gzipSize`, `--limit <n>`, and `--filter id,path,packageName,version,category,size,chunks,bailoutReason,recommendation`. Does not support `--compact`.
|
|
99
|
-
- `tree-shaking bailout-reasons --modules <module-list>` -> Non-tree-shakeable modules by bailout reason for the provided modules. High-volume; only run when explicitly requested, always pass `--modules`, and include at most 100 modules per command.
|
|
100
|
-
- `tree-shaking exports-analysis` -> Export-level tree-shaking opportunities
|
|
101
|
-
|
|
102
|
-
`tree-shaking retained-modules` returns retained module rows with:
|
|
103
|
-
|
|
104
|
-
| Field | Meaning |
|
|
105
|
-
| ------------------------- | --------------------------------------------- |
|
|
106
|
-
| `id` | Module id |
|
|
107
|
-
| `path` | Module path |
|
|
108
|
-
| `packageName` / `version` | Owning package |
|
|
109
|
-
| `category` | `cjs`, `barrel`, `side-effects`, or `unknown` |
|
|
110
|
-
| `size` | Source, parsed, and gzip sizes when available |
|
|
111
|
-
| `chunks` | Chunk id/name/assets |
|
|
112
|
-
| `bailoutReason` | Original bailout/retention reason |
|
|
113
|
-
| `recommendation` | Optional short recommendation |
|