From 907bc198e12df47efd034d05c8b21d05b2167874 Mon Sep 17 00:00:00 2001 From: Shuxin Lin Date: Fri, 2 Oct 2026 16:32:53 -0400 Subject: [PATCH 1/4] refactor(agent): make shared system prompt tool-agnostic Drop the MCP-tools framing so the prompt no longer assumes how domain data is exposed, and list the domains the current servers cover. Signed-off-by: Shuxin Lin --- src/agent/_prompts.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/agent/_prompts.py b/src/agent/_prompts.py index b6dcdae5a..36cb9a22d 100644 --- a/src/agent/_prompts.py +++ b/src/agent/_prompts.py @@ -7,11 +7,11 @@ from __future__ import annotations AGENT_SYSTEM_PROMPT = """\ -You are an industrial asset operations assistant with access to MCP tools for -querying IoT sensor data, failure mode and symptom records, time-series -forecasting models, and work order management. +You are an industrial asset operations assistant. You answer questions about +industrial assets: their sites, sensors and telemetry, vibration, failure modes +and symptoms, forecasting and anomaly detection, and maintenance work orders. -Answer the user's question concisely and accurately using the available tools. -Follow the user's requested output format exactly. If only a value, JSON, list, -or fixed lines are requested, return only that content with no extra text. +Answer concisely and accurately. Follow the user's requested output format +exactly. If only a value, JSON, list, or fixed lines are requested, return only +that content with no extra text. """ From 33b02cb7850c05df9622f4a1f31977e39b26b010 Mon Sep 17 00:00:00 2001 From: Shuxin Lin Date: Fri, 2 Oct 2026 16:34:59 -0400 Subject: [PATCH 2/4] refactor(stirrup): trim MCP-authority and overuse lines from code-exec prompt Signed-off-by: Shuxin Lin --- src/agent/stirrup_agent/runner.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/agent/stirrup_agent/runner.py b/src/agent/stirrup_agent/runner.py index 07ae5961f..8367d5c5c 100644 --- a/src/agent/stirrup_agent/runner.py +++ b/src/agent/stirrup_agent/runner.py @@ -55,12 +55,10 @@ _CONTEXT_SUMMARIZATION_CUTOFF = 0.75 _CODE_EXEC_SYSTEM_PROMPT = """\ Code execution: -- MCP tools and their definitions are authoritative for domain data and semantics. - Never use code to query backing services or bypass an available MCP tool. -- Do not overuse code_exec. Answer directly from MCP results, domain knowledge, - and basic reasoning or arithmetic when sufficient. Use code_exec only for - necessary computation, data processing, workspace inspection, or validation. - Never use it for planning, comments, placeholders, or empty scripts. +- Answer directly from MCP results, domain knowledge, and basic reasoning or + arithmetic when sufficient. Use code_exec only for necessary computation, + data processing, workspace inspection, or validation. Never use it for + planning, comments, placeholders, or empty scripts. - Prefer one complete script that inspects, analyzes, and verifies. Do not repeat equivalent experiments; correct failures directly. - Stay inside the execution workspace and use relative paths. Workspace state From fff0e829ce42aeca14a0b1335a9661853f690118 Mon Sep 17 00:00:00 2001 From: Shuxin Lin Date: Fri, 2 Oct 2026 16:38:23 -0400 Subject: [PATCH 3/4] refactor(stirrup): make code-exec prompt tool-agnostic and soften artifact limits Signed-off-by: Shuxin Lin --- src/agent/stirrup_agent/runner.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/agent/stirrup_agent/runner.py b/src/agent/stirrup_agent/runner.py index 8367d5c5c..4d5330362 100644 --- a/src/agent/stirrup_agent/runner.py +++ b/src/agent/stirrup_agent/runner.py @@ -55,17 +55,17 @@ _CONTEXT_SUMMARIZATION_CUTOFF = 0.75 _CODE_EXEC_SYSTEM_PROMPT = """\ Code execution: -- Answer directly from MCP results, domain knowledge, and basic reasoning or - arithmetic when sufficient. Use code_exec only for necessary computation, +- Answer directly from tool results, domain knowledge, and basic reasoning or + arithmetic when sufficient. Use code_exec for necessary computation, data processing, workspace inspection, or validation. Never use it for planning, comments, placeholders, or empty scripts. - Prefer one complete script that inspects, analyzes, and verifies. Do not repeat equivalent experiments; correct failures directly. - Stay inside the execution workspace and use relative paths. Workspace state persists across code_exec calls. -- For artifacts, inspect only the schema, counts, a small sample, or the specific +- For artifacts, inspect the schema, counts, a small sample, or the specific rows or fields needed, then process in place. If an artifact exceeds 200 KiB, - never print it in full; extract and process the relevant subset in bounded + avoid printing it in full; extract and process the relevant subset in bounded batches. Avoid large record lists and verbose diagnostics. Reuse snapshots unless domain state has changed. """ From b207d9f62268435e292e76cf73d70c9e62aceb1c Mon Sep 17 00:00:00 2001 From: Shuxin Lin Date: Fri, 2 Oct 2026 16:38:53 -0400 Subject: [PATCH 4/4] refactor(stirrup): drop code_exec misuse sentence from code-exec prompt Signed-off-by: Shuxin Lin --- src/agent/stirrup_agent/runner.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/agent/stirrup_agent/runner.py b/src/agent/stirrup_agent/runner.py index 4d5330362..430a2c641 100644 --- a/src/agent/stirrup_agent/runner.py +++ b/src/agent/stirrup_agent/runner.py @@ -57,8 +57,7 @@ Code execution: - Answer directly from tool results, domain knowledge, and basic reasoning or arithmetic when sufficient. Use code_exec for necessary computation, - data processing, workspace inspection, or validation. Never use it for - planning, comments, placeholders, or empty scripts. + data processing, workspace inspection, or validation. - Prefer one complete script that inspects, analyzes, and verifies. Do not repeat equivalent experiments; correct failures directly. - Stay inside the execution workspace and use relative paths. Workspace state