Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

refactor(agent): keep finance tool decisions internal

Jiayuan Zhang5cccb066f106
diff --git a/packages/core/src/agent/system-prompt/sections.test.ts b/packages/core/src/agent/system-prompt/sections.test.ts
index 55daae5c96..00549efeb5 100644
--- a/packages/core/src/agent/system-prompt/sections.test.ts
+++ b/packages/core/src/agent/system-prompt/sections.test.ts
@@ -186,8 +186,8 @@ describe("buildConditionalToolSections", () => {
const text = result.join("\n");
expect(text).toContain("## Data Access");
expect(text).toContain("dynamic evidence decision");
- expect(text).toContain("Tool Decision");
- expect(text).toContain("plan (`data_only` | `hybrid` | `web_first`)");
+ expect(text).toContain("Make this evidence decision internally");
+ expect(text).toContain("user-facing research rationale");
});
it("returns empty when no conditional tools match", () => {
diff --git a/packages/core/src/agent/system-prompt/sections.ts b/packages/core/src/agent/system-prompt/sections.ts
index 2fe2cf8baa..52809aad8c 100644
--- a/packages/core/src/agent/system-prompt/sections.ts
+++ b/packages/core/src/agent/system-prompt/sections.ts
@@ -281,7 +281,7 @@ export function buildConditionalToolSections(
: "Use tool outputs as evidence, and clearly state assumptions when data is incomplete.",
...(hasWebTools
? [
- "Before final conclusions, include a short `Tool Decision` summary with: plan (`data_only` | `hybrid` | `web_first`), reason, and missing evidence impact.",
+ "Make this evidence decision internally. In final answers, present concise user-facing research rationale instead of technical decision labels unless the user asks for methodology details.",
]
: []),
"",