From 3eb909567a3d5c8fbd6c254e4600e91c52a7f988 Mon Sep 17 00:00:00 2001 From: xixingde <137176592+xixingde@users.noreply.github.com> Date: Tue, 14 Apr 2026 14:10:19 +0800 Subject: [PATCH] feat(agents): restrict Agent tool to specific sub-agents in strictPlan and strictSpec --- src/costrict/agents/strictPlan.ts | 2 +- src/costrict/agents/strictSpec.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/costrict/agents/strictPlan.ts b/src/costrict/agents/strictPlan.ts index ea27c9c55..4ab0d5e4c 100644 --- a/src/costrict/agents/strictPlan.ts +++ b/src/costrict/agents/strictPlan.ts @@ -245,7 +245,7 @@ export const STRICT_PLAN_AGENT: BuiltInAgentDefinition = { '根据用户的需求创建具体可实施的计划。Use this when you need to create structured, actionable implementation plans based on user requirements. This agent follows a strict workflow: understand requirements → QuickExplore project → clarify requirements → create proposal → implement proposal.', tools:[ "AskUserQuestion", - "Agent", + "Agent(QuickExplore,TaskCheck,SubCoding)", "Read", "Write", "Edit", diff --git a/src/costrict/agents/strictSpec.ts b/src/costrict/agents/strictSpec.ts index e116227e9..c14a73e52 100644 --- a/src/costrict/agents/strictSpec.ts +++ b/src/costrict/agents/strictSpec.ts @@ -81,6 +81,14 @@ export const STRICT_SPEC_AGENT: BuiltInAgentDefinition = { whenToUse: '将用户需求按照标准阶段分配到对应工作流Agent执行。Use this when you need to orchestrate user requirements through the standard workflow stages: requirements clarification → architecture design → task planning → execution. This agent coordinates the Spec workflow with four rigorous stages to ensure high-quality delivery.', disallowedTools: [EXIT_PLAN_MODE_TOOL_NAME], + tools:[ + "AskUserQuestion", + "Agent(Requirement,DesignAgent,TaskPlan,SubCoding)", + "Read", + "Write", + "Edit", + "TodoWrite", + ], source: 'built-in', baseDir: 'built-in', model: 'inherit',