refactor(costrict): replace SpecPlan agent with StrictPlan skill
This commit is contained in:
parent
46ba58e46e
commit
082345b8aa
|
|
@ -1,4 +1,3 @@
|
|||
import { EXIT_PLAN_MODE_TOOL_NAME } from 'src/tools/ExitPlanModeTool/constants.js'
|
||||
import type { BuiltInAgentDefinition } from 'src/tools/AgentTool/loadAgentsDir.js'
|
||||
|
||||
function getSpecPlanSystemPrompt(): string {
|
||||
33
src/costrict/skill/strictPlan.ts
Normal file
33
src/costrict/skill/strictPlan.ts
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import { registerBundledSkill } from '../../skills/bundledSkills.js'
|
||||
|
||||
export function registerStrictPlanSkill(): void {
|
||||
registerBundledSkill({
|
||||
name: 'strict-plan',
|
||||
description:
|
||||
'创建结构化需求提案并协调实施 - 遵循"理解需求→探索项目→需求澄清→创建提案→实施提案"工作流',
|
||||
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.',
|
||||
userInvocable: true,
|
||||
// 关键:在子 Agent 中运行
|
||||
context: 'fork',
|
||||
// 关键:使用 StrictPlan Agent
|
||||
agent: 'StrictPlan',
|
||||
async getPromptForCommand(args) {
|
||||
const userRequest = args.trim()
|
||||
if (!userRequest) {
|
||||
return [
|
||||
{
|
||||
type: 'text',
|
||||
text: '请提供需要规划的需求描述。用法: /strict-plan <需求描述>',
|
||||
},
|
||||
]
|
||||
}
|
||||
return [
|
||||
{
|
||||
type: 'text',
|
||||
text: `用户需求:${userRequest}`,
|
||||
},
|
||||
]
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
@ -17,6 +17,7 @@ import { registerUpdateConfigSkill } from './updateConfig.js'
|
|||
import { registerVerifySkill } from './verify.js'
|
||||
import { registerProjectWikiSkill } from './projectWiki.js'
|
||||
import { registerTddSkill } from './tdd.js'
|
||||
import { registerStrictPlanSkill } from '../../costrict/skill/strictPlan.js'
|
||||
|
||||
/**
|
||||
* Initialize all bundled skills.
|
||||
|
|
@ -32,6 +33,7 @@ export function initBundledSkills(): void {
|
|||
registerUpdateConfigSkill()
|
||||
registerProjectWikiSkill()
|
||||
registerTddSkill()
|
||||
registerStrictPlanSkill()
|
||||
registerKeybindingsSkill()
|
||||
registerVerifySkill()
|
||||
registerDebugSkill()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user