Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/types/src/experiment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import type { Keys, Equals, AssertEqual } from "./type-fu.js"
* ExperimentId
*/

export const experimentIds = ["powerSteering", "multiFileApplyDiff", "preventFocusDisruption", "assistantMessageParser"] as const
export const experimentIds = [
"powerSteering",
"multiFileApplyDiff",
"preventFocusDisruption",
"assistantMessageParser",
] as const

export const experimentIdsSchema = z.enum(experimentIds)

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/core/prompts/__tests__/system-prompt.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ describe("SYSTEM_PROMPT", () => {
maxConcurrentFileReads: 5,
todoListEnabled: false,
useAgentRules: true,
newTaskRequireTodos: false,
}

const prompt = await SYSTEM_PROMPT(
Expand Down Expand Up @@ -612,6 +613,7 @@ describe("SYSTEM_PROMPT", () => {
maxConcurrentFileReads: 5,
todoListEnabled: true,
useAgentRules: true,
newTaskRequireTodos: false,
}

const prompt = await SYSTEM_PROMPT(
Expand Down Expand Up @@ -643,6 +645,7 @@ describe("SYSTEM_PROMPT", () => {
maxConcurrentFileReads: 5,
todoListEnabled: true,
useAgentRules: true,
newTaskRequireTodos: false,
}

const prompt = await SYSTEM_PROMPT(
Expand Down
72 changes: 64 additions & 8 deletions src/core/prompts/sections/__tests__/custom-instructions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,14 @@ describe("addCustomInstructions", () => {
"global instructions",
"/fake/path",
"test-mode",
{ settings: { maxConcurrentFileReads: 5, todoListEnabled: true, useAgentRules: true } },
{
settings: {
maxConcurrentFileReads: 5,
todoListEnabled: true,
useAgentRules: true,
newTaskRequireTodos: false,
},
},
)

expect(result).toContain("# Agent Rules Standard (AGENTS.md):")
Expand All @@ -560,7 +567,14 @@ describe("addCustomInstructions", () => {
"global instructions",
"/fake/path",
"test-mode",
{ settings: { maxConcurrentFileReads: 5, todoListEnabled: true, useAgentRules: false } },
{
settings: {
maxConcurrentFileReads: 5,
todoListEnabled: true,
useAgentRules: false,
newTaskRequireTodos: false,
},
},
)

expect(result).not.toContain("# Agent Rules Standard (AGENTS.md):")
Expand Down Expand Up @@ -614,7 +628,14 @@ describe("addCustomInstructions", () => {
"global instructions",
"/fake/path",
"test-mode",
{ settings: { maxConcurrentFileReads: 5, todoListEnabled: true, useAgentRules: true } },
{
settings: {
maxConcurrentFileReads: 5,
todoListEnabled: true,
useAgentRules: true,
newTaskRequireTodos: false,
},
},
)

expect(result).toContain("Global Instructions:\nglobal instructions")
Expand Down Expand Up @@ -653,7 +674,14 @@ describe("addCustomInstructions", () => {
"global instructions",
"/fake/path",
"test-mode",
{ settings: { maxConcurrentFileReads: 5, todoListEnabled: true, useAgentRules: true } },
{
settings: {
maxConcurrentFileReads: 5,
todoListEnabled: true,
useAgentRules: true,
newTaskRequireTodos: false,
},
},
)

// Should contain both AGENTS.md and .roorules content
Expand Down Expand Up @@ -714,7 +742,14 @@ describe("addCustomInstructions", () => {
"global instructions",
"/fake/path",
"test-mode",
{ settings: { maxConcurrentFileReads: 5, todoListEnabled: true, useAgentRules: true } },
{
settings: {
maxConcurrentFileReads: 5,
todoListEnabled: true,
useAgentRules: true,
newTaskRequireTodos: false,
},
},
)

expect(result).toContain("# Agent Rules Standard (AGENTS.md):")
Expand Down Expand Up @@ -759,7 +794,14 @@ describe("addCustomInstructions", () => {
"global instructions",
"/fake/path",
"test-mode",
{ settings: { maxConcurrentFileReads: 5, todoListEnabled: true, useAgentRules: true } },
{
settings: {
maxConcurrentFileReads: 5,
todoListEnabled: true,
useAgentRules: true,
newTaskRequireTodos: false,
},
},
)

expect(result).toContain("# Agent Rules Standard (AGENTS.md):")
Expand Down Expand Up @@ -806,7 +848,14 @@ describe("addCustomInstructions", () => {
"global instructions",
"/fake/path",
"test-mode",
{ settings: { maxConcurrentFileReads: 5, todoListEnabled: true, useAgentRules: true } },
{
settings: {
maxConcurrentFileReads: 5,
todoListEnabled: true,
useAgentRules: true,
newTaskRequireTodos: false,
},
},
)

expect(result).toContain("# Agent Rules Standard (AGENT.md):")
Expand Down Expand Up @@ -845,7 +894,14 @@ describe("addCustomInstructions", () => {
"global instructions",
"/fake/path",
"test-mode",
{ settings: { maxConcurrentFileReads: 5, todoListEnabled: true, useAgentRules: true } },
{
settings: {
maxConcurrentFileReads: 5,
todoListEnabled: true,
useAgentRules: true,
newTaskRequireTodos: false,
},
},
)

// Should contain AGENTS.md content (preferred) and not AGENT.md
Expand Down
6 changes: 6 additions & 0 deletions src/core/prompts/sections/tool-use.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ For example, to use the new_task tool:
<new_task>
<mode>code</mode>
<message>Implement a new feature for the application.</message>
<todos>
[ ] Design the feature architecture
[ ] Implement core functionality
[ ] Add error handling
[ ] Write tests
</todos>
</new_task>

Always use the actual tool name as the XML tag name for proper parsing and execution.`
Expand Down
Loading
Loading