From 28b0ecfaf298332e15ef4b415a4a8764a670176c Mon Sep 17 00:00:00 2001 From: xixingde <137176592+xixingde@users.noreply.github.com> Date: Wed, 15 Apr 2026 22:27:50 +0800 Subject: [PATCH] fix(agents): remove isMainThread flag and update agent descriptions and tool restrictions --- src/costrict/agents/strictPlan.ts | 1 + src/costrict/agents/tdd.ts | 4 ++-- src/costrict/agents/wiki.ts | 2 +- src/costrict/skills/projectWiki.ts | 2 +- src/costrict/skills/strictPlan.ts | 2 +- src/costrict/skills/tdd.ts | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/costrict/agents/strictPlan.ts b/src/costrict/agents/strictPlan.ts index bd8dffc6f..89906c581 100644 --- a/src/costrict/agents/strictPlan.ts +++ b/src/costrict/agents/strictPlan.ts @@ -258,5 +258,6 @@ export const STRICT_PLAN_AGENT: BuiltInAgentDefinition = { // 通过斜杠命令从主线程启动时,使 resolveAgentTools 跳过 filterToolsForAgent, // 从而保留主线程完整工具集(包括 Agent 工具)。 isMainThread: true, + visibleTo: ['None'], getSystemPrompt: () => getStrictPlanSystemPrompt(), } diff --git a/src/costrict/agents/tdd.ts b/src/costrict/agents/tdd.ts index cc935164b..c241eca72 100644 --- a/src/costrict/agents/tdd.ts +++ b/src/costrict/agents/tdd.ts @@ -117,10 +117,10 @@ Start by confirming the user requirements, then proceed with test case generatio export const TDD_AGENT: BuiltInAgentDefinition = { agentType: 'TDD', whenToUse: - '根据用户的需求创建具体可实施的计划。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.', + 'execute comprehensive testing workflow: confirm requirements, generate test cases, and execute tests with automated fixes', tools:[ "AskUserQuestion", - "Agent(QuickExplore,TaskCheck,SubCoding)", + "Agent", "Read", "Write", "Edit", diff --git a/src/costrict/agents/wiki.ts b/src/costrict/agents/wiki.ts index d36025838..7b1e5ed9b 100644 --- a/src/costrict/agents/wiki.ts +++ b/src/costrict/agents/wiki.ts @@ -207,7 +207,7 @@ function getWikiSystemPrompt(): string { export const WIKI_AGENT: BuiltInAgentDefinition = { agentType: 'WIKI', whenToUse: - '根据用户的需求创建具体可实施的计划。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:[ "Agent(WikiCatalogueDesign,WikiDocumentGenerate,WikiIndexGeneration,WikiProjectAnalyze)", "Read", diff --git a/src/costrict/skills/projectWiki.ts b/src/costrict/skills/projectWiki.ts index a3d4d588e..812e1ead6 100644 --- a/src/costrict/skills/projectWiki.ts +++ b/src/costrict/skills/projectWiki.ts @@ -17,7 +17,7 @@ export function registerProjectWikiSkill(): void { return [ { type: 'text', - text: '请提供需要规划的需求描述。用法: /strict-project-wiki <需求描述>', + text: '请提供技术文档的需求描述。用法: /strict-project-wiki', }, ] } diff --git a/src/costrict/skills/strictPlan.ts b/src/costrict/skills/strictPlan.ts index 06af75939..7995f4a48 100644 --- a/src/costrict/skills/strictPlan.ts +++ b/src/costrict/skills/strictPlan.ts @@ -11,7 +11,7 @@ export function registerStrictPlanSkill(): void { disableModelInvocation: true, allowedTools:[ "AskUserQuestion", - "Agent", + "Agent(QuickExplore,TaskCheck,SubCoding)", "Read", "Write", "Edit", diff --git a/src/costrict/skills/tdd.ts b/src/costrict/skills/tdd.ts index fc8b1e175..cb1814b7a 100644 --- a/src/costrict/skills/tdd.ts +++ b/src/costrict/skills/tdd.ts @@ -15,7 +15,7 @@ export function registerTddSkill(): void { return [ { type: 'text', - text: '请提供需要规划的需求描述。用法: /strict-test <需求描述>', + text: '请提供需要测试描述。用法: /strict-test <需求描述>', }, ] }