feat(coding-agent): add gemini + muse-spark system-prompt presets - #899
Open
grim-susemi wants to merge 2 commits into
Open
feat(coding-agent): add gemini + muse-spark system-prompt presets#899grim-susemi wants to merge 2 commits into
grim-susemi wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two new model-family system-prompt presets to the builtin
prompt-presetextension, following the post-2026-04-30 thin-wrapper architecture (tuningSectionover the shared dynamic core, typed rule data per thegpt-5.6.ts/deepseek-v4.tsprecedent):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-consumedmodel-family: <name>token line.Id matching
Matchers follow the existing
has*Signalregex 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),:batchtrailing tags, and-previewsuffixes. Truncated ids (google/gemini-3.6) and baregeminisubstrings do not match;-imagevariants (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. Truncatedmeta/muse-sparkand baresparksubstrings do not match.Files
prompt-preset/gemini.ts,prompt-preset/muse-spark.ts(new): typed rule arrays (GEMINI_RULES,MUSE_SPARK_RULES) + thinbuildDynamicSystemPromptwrappers.prompt-preset/presets.ts:hasGeminiSignal/hasMuseSparkSignalmatchers,resolvePresetNamebranches,buildPresetcases.prompt-preset/settings.ts:"gemini"+"muse-spark"inPromptPresetNameandVALID_PRESETS.test/suite/prompt-presets-gemini-muse.test.ts(new): routing decisions andmodel-familytokens only — exact-id tables, truncated-id/loose-substring negatives, image-variant exclusion, adeepseek-v4-pronegative control, settings-force +parsePromptPresetwiring, 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 --runon 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 --writeon 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-flashis 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
geminiandmuse-sparksystem‑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
gemini.ts,muse-spark.ts) are thintuningSectionwrappers overbuildDynamicSystemPrompt()withworkstationDialect: "default"and a trailingmodel-family: <name>token.presets.tsrecognize exact Gemini Flash ids (3.1/3.5/3.5-lite/3.6/3.7; handles:batchand-preview; excludes-image; no truncated/bare substrings) and Muse Spark (1.1,1.2,1.2-contributor).settings.tsanddocs/settings.mdadd"gemini"and"muse-spark"toPromptPresetName; users can force viapromptPreset.@earendil-works/pi-ai, settings forcing, andmodel-familytoken stamping.AGENTS.md; entries added inCHANGELOG.mdandprompt-preset/changes.md.Rollout
promptPresetto"gemini"or"muse-spark". Image variants do not route to these presets.Written for commit 0a7dc71. Summary will update on new commits.