Skip to content

Commit 9be465a

Browse files
committed
feat: add ultramodern smart suggest shell
1 parent c14ac4d commit 9be465a

93 files changed

Lines changed: 20773 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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.
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
{
2+
"schemaVersion": 1,
3+
"source": {
4+
"repository": "https://github.com/rstackjs/agent-skills",
5+
"commit": "61c948b42512e223bad44b83af4080eba48b2677",
6+
"license": "MIT",
7+
"licensePath": ".agents/rstackjs-agent-skills-LICENSE"
8+
},
9+
"installDir": ".agents/skills",
10+
"sources": [
11+
{
12+
"id": "rstack-agent-skills",
13+
"visibility": "public",
14+
"repository": "https://github.com/rstackjs/agent-skills",
15+
"commit": "61c948b42512e223bad44b83af4080eba48b2677",
16+
"license": "MIT",
17+
"licensePath": ".agents/rstackjs-agent-skills-LICENSE",
18+
"install": "vendored"
19+
},
20+
{
21+
"id": "module-federation-agent-skills",
22+
"visibility": "public",
23+
"repository": "https://github.com/module-federation/agent-skills",
24+
"commit": "07bb5b6c43ad457609e00c081b72d4c42508ec76",
25+
"install": "clone",
26+
"baseline": [
27+
{
28+
"name": "mf",
29+
"path": ".agents/skills/mf",
30+
"reason": "Module Federation docs, config inspection, type checking, shared dependency checks, and observability troubleshooting"
31+
}
32+
]
33+
},
34+
{
35+
"id": "techsiocz-private",
36+
"visibility": "private",
37+
"repository": "https://github.com/TechsioCZ/skills",
38+
"install": "clone-if-authorized",
39+
"baseline": [
40+
{
41+
"name": "plan-graph",
42+
"reason": "Build and validate DAGs from .plan.md files"
43+
},
44+
{
45+
"name": "dag",
46+
"reason": "Inspect current plan frontiers and blocked lanes"
47+
},
48+
{
49+
"name": "subagent-graph",
50+
"reason": "Design dependency-aware multi-agent launch graphs"
51+
},
52+
{
53+
"name": "helm",
54+
"reason": "Steer already-running multi-agent work"
55+
},
56+
{
57+
"name": "debugger-mode",
58+
"reason": "Run hypothesis-driven debugging with runtime evidence"
59+
}
60+
]
61+
}
62+
],
63+
"baseline": [
64+
{
65+
"name": "rsbuild-best-practices",
66+
"path": ".agents/skills/rsbuild-best-practices",
67+
"reason": "Modern.js application build configuration and Rsbuild troubleshooting"
68+
},
69+
{
70+
"name": "rspack-best-practices",
71+
"path": ".agents/skills/rspack-best-practices",
72+
"reason": "Rspack bundling, CSS, asset, profiling, and production behavior"
73+
},
74+
{
75+
"name": "rspack-tracing",
76+
"path": ".agents/skills/rspack-tracing",
77+
"reason": "Trace-backed Rspack failure and performance debugging"
78+
},
79+
{
80+
"name": "rsdoctor-analysis",
81+
"path": ".agents/skills/rsdoctor-analysis",
82+
"reason": "Evidence-backed bundle composition, duplication, and retained-module analysis"
83+
},
84+
{
85+
"name": "rslib-best-practices",
86+
"path": ".agents/skills/rslib-best-practices",
87+
"reason": "Rslib shared package and design-system library authoring"
88+
},
89+
{
90+
"name": "rslib-modern-package",
91+
"path": ".agents/skills/rslib-modern-package",
92+
"reason": "Modern package contracts, exports, declarations, side effects, and release readiness"
93+
},
94+
{
95+
"name": "rstest-best-practices",
96+
"path": ".agents/skills/rstest-best-practices",
97+
"reason": "Rstest configuration, test writing, mocking, snapshots, coverage, and CI behavior"
98+
},
99+
{
100+
"name": "mf",
101+
"path": ".agents/skills/mf",
102+
"reason": "Module Federation docs, config inspection, type checking, shared dependency checks, and observability troubleshooting"
103+
}
104+
],
105+
"excludedByDefault": [
106+
"migrate-to-rsbuild",
107+
"migrate-to-rslib",
108+
"migrate-to-rslint",
109+
"migrate-to-rstest",
110+
"rsbuild-v2-upgrade",
111+
"rspack-v2-upgrade",
112+
"rspress-v2-upgrade"
113+
]
114+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
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).

0 commit comments

Comments
 (0)