Skip to content

feat(coding-agent): add gemini + muse-spark system-prompt presets - #899

Open
grim-susemi wants to merge 2 commits into
code-yeongyu:mainfrom
grim-susemi:feat/add-gemini-muse-presets
Open

feat(coding-agent): add gemini + muse-spark system-prompt presets#899
grim-susemi wants to merge 2 commits into
code-yeongyu:mainfrom
grim-susemi:feat/add-gemini-muse-presets

Conversation

@grim-susemi

@grim-susemi grim-susemi commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds two new model-family system-prompt presets to the builtin prompt-preset extension, following the post-2026-04-30 thin-wrapper architecture (tuningSection over the shared dynamic core, typed rule data per the gpt-5.6.ts/deepseek-v4.ts precedent):

  • gemini — covers the Gemini 3.x Flash line. Directives condense Google's Gemini 3 prompting guidance for a native reasoning model: concise/direct instructions (no chain-of-thought prompt engineering), lean output by default (verbosity only when asked), instruction-at-the-end anchoring for long-context tasks ("Based on the information above..."), behavior requirements treated as binding system-instruction-style rules, and stated action budgets treated as binding when tool calls would over-trigger.
  • muse-spark — covers Muse Spark. Directives from Meta's Muse Spark prompting guidance: use only client-exposed tools, no assumed hidden computer control or unlisted IDE, one goal per turn, concrete evidence (file paths, command output, observed state) before claiming success, never invent file contents or UI state (observe first with a real tool call), one-line observation summary after each tool call, and checkpoints capping long tool chains.

Both presets use workstationDialect: "default" and end their tuning block with a machine-consumed model-family: <name> token line.

Id matching

Matchers follow the existing has*Signal regex style with [/@:._-] boundaries, verified against the installed pi-ai provider catalogs (2026-08-16):

  • gemini: google/gemini-3.6-flash, google/gemini-3.1-flash-lite, google/gemini-3.5-flash, google/gemini-3.5-flash-lite, google/gemini-3.7-flash — plus the unprefixed shapes the catalogs carry (google, google-vertex, github-copilot, opencode), :batch trailing tags, and -preview suffixes. Truncated ids (google/gemini-3.6) and bare gemini substrings do not match; -image variants (Nano Banana image models) are explicitly excluded as a different modality.
  • muse-spark: meta/muse-spark-1.1, meta/muse-spark-1.2, meta/muse-spark-1.2-contributor. Truncated meta/muse-spark and bare spark substrings do not match.

Files

  • prompt-preset/gemini.ts, prompt-preset/muse-spark.ts (new): typed rule arrays (GEMINI_RULES, MUSE_SPARK_RULES) + thin buildDynamicSystemPrompt wrappers.
  • prompt-preset/presets.ts: hasGeminiSignal/hasMuseSparkSignal matchers, resolvePresetName branches, buildPreset cases.
  • prompt-preset/settings.ts: "gemini" + "muse-spark" in PromptPresetName and VALID_PRESETS.
  • test/suite/prompt-presets-gemini-muse.test.ts (new): routing decisions and model-family tokens only — exact-id tables, truncated-id/loose-substring negatives, image-variant exclusion, a deepseek-v4-pro negative control, settings-force + parsePromptPreset wiring, a catalog sweep asserting every built-in Gemini/Muse catalog model resolves correctly, and per-prompt token stamping with cross-token non-leakage. No prose assertions.
  • docs/settings.md, prompt-preset/AGENTS.md, builtin/AGENTS.md, prompt-preset/changes.md: preset lists + change entry.

Verification

  • npx vitest --run on the new test plus all prompt-preset-adjacent suites (deepseek-v4, glm-5.2, glm-5.3, extension, model-switch, startup-header, brand-identity): 8 files, 188 tests passed.
  • npx tsc --noEmit (repo root, the repo's typecheck gate): 0 errors.
  • npx biome check --write on all touched files: clean, no fixes needed.

Note: the five Gemini ids above come from the task's registry research; the installed catalogs currently carry four of them (gemini-3.7-flash is not yet present in the pinned pi-ai data) — the matcher covers it so the preset routes as soon as the catalog gains the id.


Summary by cubic

Adds gemini and muse-spark system‑prompt presets so Gemini 3.x Flash and Muse Spark models no longer fall back to the generic dynamic prompt. Gemini now favors direct, lean answers with binding action budgets; Muse Spark uses only exposed tools and claims success only with observed evidence.

  • Review notes

    • New preset files (gemini.ts, muse-spark.ts) are thin tuningSection wrappers over buildDynamicSystemPrompt() with workstationDialect: "default" and a trailing model-family: <name> token.
    • Routing: bounded regex matchers in presets.ts recognize exact Gemini Flash ids (3.1/3.5/3.5-lite/3.6/3.7; handles :batch and -preview; excludes -image; no truncated/bare substrings) and Muse Spark (1.1, 1.2, 1.2-contributor).
    • Settings: settings.ts and docs/settings.md add "gemini" and "muse-spark" to PromptPresetName; users can force via promptPreset.
    • Tests: new suite validates routing boundaries, catalog coverage via @earendil-works/pi-ai, settings forcing, and model-family token stamping.
    • Docs: preset lists updated in AGENTS.md; entries added in CHANGELOG.md and prompt-preset/changes.md.
  • Rollout

    • No migration. If a model doesn’t auto-match (e.g., truncated ids), set promptPreset to "gemini" or "muse-spark". Image variants do not route to these presets.

Written for commit 0a7dc71. Summary will update on new commits.

Review in cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant