fix(prompts): prefer Bun over Deno for TypeScript runtime selection (#10253)

Make the AI prompting instructions explicitly pick Bun as the default and
preferred TypeScript runtime, and treat Deno as the exception (only when a
script specifically requires the Deno runtime: Deno stdlib or deno.land URL
imports).

Previously the `write-script-bun` and `write-script-deno` skill descriptions
both read as equally valid TypeScript defaults ("MUST use when writing
Bun/TypeScript scripts" vs "MUST use when writing Deno/TypeScript scripts"),
giving no signal on which to choose for a generic TypeScript request.

Source-of-truth edits (system_prompts/utils.py LANGUAGE_METADATA,
languages/bun.md, languages/deno.md, cli/src/guidance/core.ts) then
regenerated via system_prompts/generate.py into the auto-generated skills,
prompts, and cli/src/guidance/skills.gen.ts.

Fixes WIN-2220

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-07-22 11:12:31 +02:00
committed by GitHub
parent b948efd3c8
commit 380cf752ca
9 changed files with 26 additions and 16 deletions
+1 -1
View File
@@ -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-<language>\` skill to write or modify scripts in the language specified by the user. Use bun by default.
You MUST use the \`write-script-<language>\` 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
+7 -5
View File
@@ -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\`:
+3 -1
View File
@@ -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\`:
+3 -1
View File
@@ -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`:
@@ -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
@@ -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`:
+1 -1
View File
@@ -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
+2
View File
@@ -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`:
+4 -4
View File
@@ -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