feat(coding-agent): add gemini + muse-spark system-prompt presets - #899
Open
grim-susemi wants to merge 3 commits into
Open
feat(coding-agent): add gemini + muse-spark system-prompt presets#899grim-susemi wants to merge 3 commits into
grim-susemi wants to merge 3 commits into
Conversation
grim-susemi
force-pushed
the
feat/add-gemini-muse-presets
branch
from
August 16, 2026 22:56
0a7dc71 to
6cfefaf
Compare
Muse Spark was the only thin preset whose rules actively told the model to distrust the exact mechanism ultrawork uses (hidden customType omo-ultrawork:directive) and to stop-and-report after a few calls. Observed symptom: ULTRAWORK MODE ENABLED! then stall, plus English-only reports despite ~/.omo/AGENTS.md Korean default. - muse-spark.ts 7→9 rules: add injected-directive-authority (mirror deepseek-v4.ts) and korean-easy-report with sentinel report-language: korean; relax 4 stall rules (no-hidden-control, one-goal-per-turn, observation-summary, chain-checkpoints) with harness-injected exceptions so ultrawork/ulw-plan/ulw-loop chains keep running and only drift triggers checkpoints - style.ts: Default to ASCII → Match the user's language (Korean default per ~/.omo/AGENTS.md) — global thin-preset language fix; full-core presets keep own copy (known residual documented) - tests: prompt-presets-gemini-muse 45/45 + sweep 291/291 — 9-rule parse + 3 sentinel tokens, verification.ts prompt-behavior-coverage (no pinned sentences) Plan: .omo/plans/muse-spark-ultrawork-korean-report-fix.md Evidence: .omo/evidence/muse-spark-ultrawork-korean-report-fix-20260817/
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 get tuned prompts instead of the generic dynamic prompt. Also hardens Muse Spark to honor ultrawork directives and default to Korean reporting, and updates the global style to match the user's language rather than ASCII.Review notes
gemini.ts,muse-spark.ts) are thintuningSectionwrappers overbuildDynamicSystemPrompt()withworkstationDialect: "default"and a trailingmodel-family: <name>token.presets.ts): Gemini Flash ids 3.1/3.5/3.5‑lite/3.6/3.7 (support:batch,-preview; exclude-image; no bare/truncated substrings) and Muse Spark 1.1/1.2/1.2‑contributor; display‑name fallback supported."gemini"and"muse-spark"toPromptPresetName/VALID_PRESETS; users can force viapromptPreset.injected-directive-authorityandkorean-easy-report(sentinelreport-language: korean); relaxes four rules with harness‑injected exceptions so ultrawork/ulw‑plan/ulw‑loop continue instead of stalling and reports follow the user’s language.style.ts): default language now matches the user’s language/project context instead of ASCII.prompt-presets-gemini-muse.test.ts) cover routing boundaries, catalog coverage via@earendil-works/pi-ai, settings forcing,model-familytoken stamping, Muse Spark’s 9 rule ids + sentinel tokens, and the style language default.Rollout
promptPresetto"gemini"or"muse-spark". Image variants do not route. The language‑matching style change affects all models using the shared dynamic core.Written for commit 6dd60e1. Summary will update on new commits.