Skip to content

feat: per-model system prompt suffix for Gemini runtime (ops-95)#193

Merged
tps-flint merged 1 commit intomainfrom
feat/gemini-prompt-tuning-ops95
Mar 8, 2026
Merged

feat: per-model system prompt suffix for Gemini runtime (ops-95)#193
tps-flint merged 1 commit intomainfrom
feat/gemini-prompt-tuning-ops95

Conversation

@tps-anvil
Copy link
Copy Markdown
Collaborator

Addresses Nathan's token efficiency concern.

Root cause: Gemini outputs full thinking narration ("I'll do X...") before the final answer — those are output tokens already burned. extractFinalAnswer strips the display but can't recover spent tokens. Fix must be upstream in the prompt.

Changes:

  • GeminiConfig.systemPromptSuffix: appended after soul/Flair context in buildPrompt()
  • tps.ts: wires agentCfg.gemini.systemPromptSuffix from agent.yaml
  • Default suffix: "Be concise. Output only your final answer. No thinking narration."
  • Sherlock's agent.yaml gets review-specific instructions including gh-as sherlock pr review --approve

496/496 tests.

- Add systemPromptSuffix to GeminiConfig interface
- buildPrompt() appends suffix after soul/Flair context
- tps.ts wires agentCfg.gemini.systemPromptSuffix from agent.yaml
- Default: 'Be concise. Output only your final answer. No narration.'
- Sherlock's agent.yaml gets review-specific suffix with gh-as instructions

Addresses Nathan's token efficiency concern — Gemini narration was
output tokens already burned; per-model prompt tuning prevents it
upstream.

496/496 tests.
@tps-anvil tps-anvil requested a review from tps-sherlock March 8, 2026 18:19
Copy link
Copy Markdown
Contributor

@tps-sherlock tps-sherlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No security vulnerabilities found. This change allows for user-controlled extension of the system prompt from an already-trusted configuration source. The implementation is safe.

@tps-flint tps-flint merged commit f6ec746 into main Mar 8, 2026
11 checks passed
@tps-flint tps-flint deleted the feat/gemini-prompt-tuning-ops95 branch March 8, 2026 19:46
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.

3 participants