Skip to content

fix(prompt): always reply in English - #62

Closed
inf-quantavius wants to merge 1 commit into
context-labs:mainfrom
inf-quantavius:quant/english-output
Closed

inf-quantavius wants to merge 1 commit into
context-labs:mainfrom
inf-quantavius:quant/english-output

Conversation

@inf-quantavius

@inf-quantavius inf-quantavius commented Sep 29, 2026 •

Copy link
Copy Markdown

Why

The rollout-separation reviewer on context-labs/monorepo#6883 (model glm-5.3) posted its summary in Chinese. None of loupe's system prompts named an output language, so a model that drifts during long agentic runs (GLM does this) writes the drifted language straight into the GitHub comment.

Change

  • Adds LANGUAGE_DIRECTIVE ("Write every human-readable string in English…") to packages/core/src/prompt.ts.
  • Puts it in the output contract, which is always appended, so custom promptFile reviewers get it too. Also adds it to the verify, @loupe chat, and @loupe fix system prompts.
  • Adds a test that every system-prompt builder includes the directive, including when custom guidance is set.

bun run format && lint && tsc && test: all green, 486 tests passing.

Provenance


Note

Low Risk
Prompt-only change with no runtime logic, auth, or data handling; risk is limited to model output wording.

Overview
Adds a shared LANGUAGE_DIRECTIVE so Loupe’s model-facing outputs stay in English when models (e.g. GLM) drift on long agentic runs.

The directive is wired into the review output contract (so default and custom promptFile reviewers inherit it), plus verify, @loupe chat, and @loupe fix system prompts. A Vitest case asserts every system-prompt builder includes the string, including custom guidance.

Reviewed by Cursor Bugbot for commit fd7dc62. Bugbot is set up for automated code reviews on this repo. Configure here.

@anish-inf anish-inf closed this Sep 29, 2026
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.

2 participants