Skip to content

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

Open
grim-susemi wants to merge 3 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 3 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 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

    • New presets (gemini.ts, muse-spark.ts) are thin tuningSection wrappers over buildDynamicSystemPrompt() with workstationDialect: "default" and a trailing model-family: <name> token.
    • Routing (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.
    • Settings add "gemini" and "muse-spark" to PromptPresetName/VALID_PRESETS; users can force via promptPreset.
    • Muse Spark hardening: 9 typed rules now include injected-directive-authority and korean-easy-report (sentinel report-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.
    • Global style (style.ts): default language now matches the user’s language/project context instead of ASCII.
    • Tests (prompt-presets-gemini-muse.test.ts) cover routing boundaries, catalog coverage via @earendil-works/pi-ai, settings forcing, model-family token stamping, Muse Spark’s 9 rule ids + sentinel tokens, and the style language default.
  • Rollout

    • No migration. If an id doesn’t auto‑match, set promptPreset to "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.

Review in cubic

@grim-susemi
grim-susemi force-pushed the feat/add-gemini-muse-presets branch from 0a7dc71 to 6cfefaf Compare August 16, 2026 22:56
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/
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