You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improvement: Consolidate system prompt prefix and suffix into one field #2793
Governance “system prompt” is split into a mandatory prefix and mandatory suffix. Authors think in one wrap-around policy text; two fields add friction without a clear product win.
Current behaviour
Schema: systemPromptConfigSchema with mandatoryPrefixPrompt + mandatorySuffixPrompt (lib/shared/schemas/governance.ts, policy system_prompt).
Consolidate to a single system-prompt field in schema, org config, and the governance editor.
Define apply semantics once (e.g. entire string prepended, or a documented wrap convention) and migrate existing prefix+suffix pairs into that field without dropping content (versioned org-config / data migration as required by migrations:check).
Update i18n, docs, and e2e selectors.
Acceptance criteria
Governance UI shows one system-prompt field; prefix/suffix controls are gone.
Existing orgs keep equivalent effective prompt text after migration (prefix+suffix content preserved).
Chat / openai-compat paths apply the single field consistently.
Fixed by #2857: a single mandatoryInstructions field (packages/shared/src/schemas/governance.ts) replaced the prefix/suffix pair, and effectiveMandatoryInstructions folds legacy values into it. The editor has one textarea and drops the legacy pair on save, and chat applies the field (backend/core/chat/guardrails.ts).
Activity
yannickmonney commentedon Sep 27, 2026
Fixed by #2857: a single
mandatoryInstructionsfield (packages/shared/src/schemas/governance.ts) replaced the prefix/suffix pair, andeffectiveMandatoryInstructionsfolds legacy values into it. The editor has one textarea and drops the legacy pair on save, and chat applies the field (backend/core/chat/guardrails.ts).