diff --git a/cli/src/guidance/core.ts b/cli/src/guidance/core.ts index c43ff8c6c0..100bea6e53 100644 --- a/cli/src/guidance/core.ts +++ b/cli/src/guidance/core.ts @@ -74,7 +74,7 @@ You are a helpful assistant that can help with Windmill scripts, flows, apps, an ## Script Writing Guide -You MUST use the \`write-script-\` skill to write or modify scripts in the language specified by the user. Use bun by default. +You MUST use the \`write-script-\` skill to write or modify scripts in the language specified by the user. Use bun by default. For TypeScript, always prefer bun (\`write-script-bun\`) over deno unless the script specifically requires the Deno runtime. For Workflow-as-Code scripts, use the \`write-workflow-as-code\` skill. ## Flow Writing Guide diff --git a/cli/src/guidance/skills.gen.ts b/cli/src/guidance/skills.gen.ts index 69e4338d22..cc51106162 100644 --- a/cli/src/guidance/skills.gen.ts +++ b/cli/src/guidance/skills.gen.ts @@ -10,10 +10,10 @@ export const SKILLS: SkillMetadata[] = [ { name: "write-script-ansible", description: "MUST use when writing Ansible playbooks.", languageKey: "ansible" }, { name: "write-script-bash", description: "MUST use when writing Bash scripts.", languageKey: "bash" }, { name: "write-script-bigquery", description: "MUST use when writing BigQuery queries.", languageKey: "bigquery" }, - { name: "write-script-bun", description: "MUST use when writing Bun/TypeScript scripts.", languageKey: "bun" }, + { name: "write-script-bun", description: "MUST use when writing TypeScript scripts. Bun is the default and preferred TypeScript runtime — pick it for TypeScript unless the script specifically needs Deno.", languageKey: "bun" }, { name: "write-script-bunnative", description: "MUST use when writing Bun Native scripts. The script must start with //native to run on the native worker.", languageKey: "bunnative" }, { name: "write-script-csharp", description: "MUST use when writing C# scripts.", languageKey: "csharp" }, - { name: "write-script-deno", description: "MUST use when writing Deno/TypeScript scripts.", languageKey: "deno" }, + { name: "write-script-deno", description: "Use ONLY when a TypeScript script specifically requires the Deno runtime (Deno stdlib or deno.land URL imports). For all other TypeScript, use write-script-bun instead.", languageKey: "deno" }, { name: "write-script-duckdb", description: "MUST use when writing DuckDB queries.", languageKey: "duckdb" }, { name: "write-script-go", description: "MUST use when writing Go scripts.", languageKey: "go" }, { name: "write-script-graphql", description: "MUST use when writing GraphQL queries.", languageKey: "graphql" }, @@ -374,7 +374,7 @@ being buffered, bypassing the 10000-row return cap. `, "write-script-bun": `--- name: write-script-bun -description: MUST use when writing Bun/TypeScript scripts. +description: MUST use when writing TypeScript scripts. Bun is the default and preferred TypeScript runtime — pick it for TypeScript unless the script specifically needs Deno. --- ## CLI Commands @@ -424,7 +424,7 @@ Use \`wmill resource-type list --schema\` to discover available resource types. # TypeScript (Bun) -Bun runtime with full npm ecosystem and fastest execution. +Bun runtime with full npm ecosystem and fastest execution. **Bun is the default and preferred TypeScript runtime** — choose it for any TypeScript script unless there is a major reason to use Deno for that specific use-case. ## Structure @@ -1994,7 +1994,7 @@ public class Script `, "write-script-deno": `--- name: write-script-deno -description: MUST use when writing Deno/TypeScript scripts. +description: Use ONLY when a TypeScript script specifically requires the Deno runtime (Deno stdlib or deno.land URL imports). For all other TypeScript, use write-script-bun instead. --- ## CLI Commands @@ -2046,6 +2046,8 @@ Use \`wmill resource-type list --schema\` to discover available resource types. Deno runtime with npm support via \`npm:\` prefix and native Deno libraries. +**Prefer Bun (\`write-script-bun\`) for TypeScript.** Only use Deno when the script specifically requires the Deno runtime — Deno's standard library or \`deno.land\` URL imports that have no npm equivalent. For all other TypeScript, use Bun instead. + ## Structure Export a single **async** function called \`main\`: diff --git a/system_prompts/auto-generated/prompts.ts b/system_prompts/auto-generated/prompts.ts index fb2e40e6ec..5670c53fcd 100644 --- a/system_prompts/auto-generated/prompts.ts +++ b/system_prompts/auto-generated/prompts.ts @@ -3729,7 +3729,7 @@ being buffered, bypassing the 10000-row return cap. export const LANG_BUN = `# TypeScript (Bun) -Bun runtime with full npm ecosystem and fastest execution. +Bun runtime with full npm ecosystem and fastest execution. **Bun is the default and preferred TypeScript runtime** — choose it for any TypeScript script unless there is a major reason to use Deno for that specific use-case. ## Structure @@ -4016,6 +4016,8 @@ export const LANG_DENO = `# TypeScript (Deno) Deno runtime with npm support via \`npm:\` prefix and native Deno libraries. +**Prefer Bun (\`write-script-bun\`) for TypeScript.** Only use Deno when the script specifically requires the Deno runtime — Deno's standard library or \`deno.land\` URL imports that have no npm equivalent. For all other TypeScript, use Bun instead. + ## Structure Export a single **async** function called \`main\`: diff --git a/system_prompts/auto-generated/script.md b/system_prompts/auto-generated/script.md index 9d393d2c7f..f5a6fd99ba 100644 --- a/system_prompts/auto-generated/script.md +++ b/system_prompts/auto-generated/script.md @@ -215,7 +215,7 @@ being buffered, bypassing the 10000-row return cap. # TypeScript (Bun) -Bun runtime with full npm ecosystem and fastest execution. +Bun runtime with full npm ecosystem and fastest execution. **Bun is the default and preferred TypeScript runtime** — choose it for any TypeScript script unless there is a major reason to use Deno for that specific use-case. ## Structure @@ -502,6 +502,8 @@ public class Script Deno runtime with npm support via `npm:` prefix and native Deno libraries. +**Prefer Bun (`write-script-bun`) for TypeScript.** Only use Deno when the script specifically requires the Deno runtime — Deno's standard library or `deno.land` URL imports that have no npm equivalent. For all other TypeScript, use Bun instead. + ## Structure Export a single **async** function called `main`: diff --git a/system_prompts/auto-generated/skills/write-script-bun/SKILL.md b/system_prompts/auto-generated/skills/write-script-bun/SKILL.md index 44cccc7ba8..21aafa55d0 100644 --- a/system_prompts/auto-generated/skills/write-script-bun/SKILL.md +++ b/system_prompts/auto-generated/skills/write-script-bun/SKILL.md @@ -1,6 +1,6 @@ --- name: write-script-bun -description: MUST use when writing Bun/TypeScript scripts. +description: MUST use when writing TypeScript scripts. Bun is the default and preferred TypeScript runtime — pick it for TypeScript unless the script specifically needs Deno. --- ## CLI Commands @@ -50,7 +50,7 @@ Use `wmill resource-type list --schema` to discover available resource types. # TypeScript (Bun) -Bun runtime with full npm ecosystem and fastest execution. +Bun runtime with full npm ecosystem and fastest execution. **Bun is the default and preferred TypeScript runtime** — choose it for any TypeScript script unless there is a major reason to use Deno for that specific use-case. ## Structure diff --git a/system_prompts/auto-generated/skills/write-script-deno/SKILL.md b/system_prompts/auto-generated/skills/write-script-deno/SKILL.md index ea2bfd4421..55c7bf7155 100644 --- a/system_prompts/auto-generated/skills/write-script-deno/SKILL.md +++ b/system_prompts/auto-generated/skills/write-script-deno/SKILL.md @@ -1,6 +1,6 @@ --- name: write-script-deno -description: MUST use when writing Deno/TypeScript scripts. +description: Use ONLY when a TypeScript script specifically requires the Deno runtime (Deno stdlib or deno.land URL imports). For all other TypeScript, use write-script-bun instead. --- ## CLI Commands @@ -52,6 +52,8 @@ Use `wmill resource-type list --schema` to discover available resource types. Deno runtime with npm support via `npm:` prefix and native Deno libraries. +**Prefer Bun (`write-script-bun`) for TypeScript.** Only use Deno when the script specifically requires the Deno runtime — Deno's standard library or `deno.land` URL imports that have no npm equivalent. For all other TypeScript, use Bun instead. + ## Structure Export a single **async** function called `main`: diff --git a/system_prompts/languages/bun.md b/system_prompts/languages/bun.md index c505b6cf97..22aeb2fb74 100644 --- a/system_prompts/languages/bun.md +++ b/system_prompts/languages/bun.md @@ -1,6 +1,6 @@ # TypeScript (Bun) -Bun runtime with full npm ecosystem and fastest execution. +Bun runtime with full npm ecosystem and fastest execution. **Bun is the default and preferred TypeScript runtime** — choose it for any TypeScript script unless there is a major reason to use Deno for that specific use-case. ## Structure diff --git a/system_prompts/languages/deno.md b/system_prompts/languages/deno.md index c84e5e772a..fddd08efb2 100644 --- a/system_prompts/languages/deno.md +++ b/system_prompts/languages/deno.md @@ -2,6 +2,8 @@ Deno runtime with npm support via `npm:` prefix and native Deno libraries. +**Prefer Bun (`write-script-bun`) for TypeScript.** Only use Deno when the script specifically requires the Deno runtime — Deno's standard library or `deno.land` URL imports that have no npm equivalent. For all other TypeScript, use Bun instead. + ## Structure Export a single **async** function called `main`: diff --git a/system_prompts/utils.py b/system_prompts/utils.py index 9666b6cf0c..e2fa77d3b6 100644 --- a/system_prompts/utils.py +++ b/system_prompts/utils.py @@ -87,13 +87,13 @@ CLI_EXCLUDED_FIELDS = [ LANGUAGE_METADATA = { 'bun': { 'name': 'TypeScript (Bun)', - 'description': 'MUST use when writing Bun/TypeScript scripts.', - 'use_cases': 'TypeScript automation, npm packages, data processing, API integrations' + 'description': 'MUST use when writing TypeScript scripts. Bun is the default and preferred TypeScript runtime — pick it for TypeScript unless the script specifically needs Deno.', + 'use_cases': 'TypeScript automation, npm packages, data processing, API integrations — the default choice for TypeScript' }, 'deno': { 'name': 'TypeScript (Deno)', - 'description': 'MUST use when writing Deno/TypeScript scripts.', - 'use_cases': 'TypeScript with Deno stdlib, secure sandboxed execution' + 'description': 'Use ONLY when a TypeScript script specifically requires the Deno runtime (Deno stdlib or deno.land URL imports). For all other TypeScript, use write-script-bun instead.', + 'use_cases': 'TypeScript that specifically needs the Deno runtime (Deno stdlib or deno.land imports); prefer Bun otherwise' }, # 'nativets' is intentionally omitted: it is a legacy duplicate of # 'bunnative' (a Bun script with a leading //native marker). No