The open-source agent harness - the runtime layer that turns an LLM into a working agent.
Add recommended first option to AskUserAQuestion (#265)
Srajan Asthana7783fc0ae27a
diff --git a/.changeset/20260817061700-ask-user-recommended-option.md b/.changeset/20260817061700-ask-user-recommended-option.mdnew file mode 100644index 000000000..f64364230--- /dev/null+++ b/.changeset/20260817061700-ask-user-recommended-option.md@@ -0,0 +1,5 @@+---+'@truefoundry/trueforge-core': patch+---++Instruct ask_user_question to mark a first option as (Recommended) when context clearly favors one.diff --git a/packages/trueforge-core/src/core/capabilities/builtins/AskUserQuestion.ts b/packages/trueforge-core/src/core/capabilities/builtins/AskUserQuestion.tsindex 4f8fe262b..42c99da4c 100644--- a/packages/trueforge-core/src/core/capabilities/builtins/AskUserQuestion.ts+++ b/packages/trueforge-core/src/core/capabilities/builtins/AskUserQuestion.ts@@ -37,6 +37,7 @@ export class AskUserQuestion extends ClientSideTool {'- The user picks exactly one option — multi-select is not available.','- Options must be mutually exclusive. If a valid choice is a combination of other options, include it as a separate option with the combined data.','- Every option must commit the user to a specific outcome. Do not add an option whose purpose is to let the user describe, specify, or type their own answer. Do not add an option like "Other" or "Something else".',+ '- If you have enough context to confidently recommend one option, put it first with the exact suffix " (Recommended)" — no other wording. If no option clearly stands out, mark nothing.','','Example (distinct options):','question: "<your question>"',@@ -46,6 +47,10 @@ export class AskUserQuestion extends ClientSideTool {'question: "<your question>"','options: ["<Option A>", "<Option B>", "<Option A and B — combined details>"]','',+ 'Example (context clearly favors A):',+ 'question: "<your question>"',+ 'options: ["<Option A> (Recommended)", "<Option B>", "<Option C>"]',+ '','Avoid:','options: ["<Option A>", "<Option B>", "Other"]',].join('\n'),