Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

Commit c8464fb

Browse files
feat: add Kilo soul prompt for consistent personality across all models (#214)
* feat: add Kilo soul prompt for consistent personality across all models * fix: gate soul prompt behind Codex check to match existing prompt delivery pattern Codex sessions deliver prompts via options.instructions, not system messages. Prepend the soul to options.instructions for Codex, and skip it from the system array, matching how SystemPrompt.provider() is already handled.
1 parent 2c893f4 commit c8464fb

3 files changed

Lines changed: 29 additions & 1 deletion

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
You are Kilo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.
2+
3+
# Personality
4+
5+
- Your goal is to accomplish the user's task, NOT engage in a back and forth conversation.
6+
- You accomplish tasks iteratively, breaking them down into clear steps and working through them methodically.
7+
- Do not ask for more information than necessary. Use the tools provided to accomplish the user's request efficiently and effectively.
8+
- You are STRICTLY FORBIDDEN from starting your messages with "Great", "Certainly", "Okay", "Sure". You should NOT be conversational in your responses, but rather direct and to the point. For example you should NOT say "Great, I've updated the CSS" but instead something like "I've updated the CSS". It is important you be clear and technical in your messages.
9+
- NEVER end your result with a question or request to engage in further conversation. Formulate the end of your result in a way that is final and does not require further input from the user.
10+
- The user may provide feedback, which you can use to make improvements and try again. But DO NOT continue in pointless back and forth conversations, i.e. don't end your responses with questions or offers for further assistance.
11+
12+
# Code
13+
14+
- When making changes to code, always consider the context in which the code is being used. Ensure that your changes are compatible with the existing codebase and that they follow the project's coding standards and best practices.

packages/opencode/src/session/llm.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ export namespace LLM {
6969
const system = []
7070
system.push(
7171
[
72+
// kilocode_change start - soul defines core identity and personality
73+
...(isCodex ? [] : [SystemPrompt.soul()]),
74+
// kilocode_change end
7275
// use agent prompt otherwise provider prompt
7376
// For Codex sessions, skip SystemPrompt.provider() since it's sent via options.instructions
7477
...(input.agent.prompt ? [input.agent.prompt] : isCodex ? [] : SystemPrompt.provider(input.model)),
@@ -114,7 +117,9 @@ export namespace LLM {
114117
mergeDeep(variant),
115118
)
116119
if (isCodex) {
117-
options.instructions = SystemPrompt.instructions()
120+
// kilocode_change start - prepend soul to codex instructions
121+
options.instructions = SystemPrompt.soul() + "\n" + SystemPrompt.instructions()
122+
// kilocode_change end
118123
}
119124

120125
const params = await Plugin.trigger(

packages/opencode/src/session/system.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,22 @@ import PROMPT_BEAST from "./prompt/beast.txt"
88
import PROMPT_GEMINI from "./prompt/gemini.txt"
99

1010
import PROMPT_CODEX from "./prompt/codex_header.txt"
11+
// kilocode_change start
12+
import SOUL from "../kilocode/soul.txt"
13+
// kilocode_change end
1114
import type { Provider } from "@/provider/provider"
1215

1316
export namespace SystemPrompt {
1417
export function instructions() {
1518
return PROMPT_CODEX.trim()
1619
}
1720

21+
// kilocode_change start
22+
export function soul() {
23+
return SOUL.trim()
24+
}
25+
// kilocode_change end
26+
1827
export function provider(model: Provider.Model) {
1928
if (model.api.id.includes("gpt-5")) return [PROMPT_CODEX]
2029
if (model.api.id.includes("gpt-") || model.api.id.includes("o1") || model.api.id.includes("o3"))

0 commit comments

Comments
 (0)