feat(costrict): enable StrictSpec workflow and refine strict skills
This commit is contained in:
parent
b58f5b72b0
commit
d74321180f
|
|
@ -6,7 +6,7 @@ import { DESIGN_AGENT } from 'src/costrict/agents/designAgent.js'
|
||||||
import { QUICK_EXPLORE_AGENT } from 'src/costrict/agents/quickExplore.js'
|
import { QUICK_EXPLORE_AGENT } from 'src/costrict/agents/quickExplore.js'
|
||||||
import { REQUIREMENT_AGENT } from 'src/costrict/agents/requirement.js'
|
import { REQUIREMENT_AGENT } from 'src/costrict/agents/requirement.js'
|
||||||
import { STRICT_PLAN_AGENT } from 'src/costrict/agents/strictPlan.js'
|
import { STRICT_PLAN_AGENT } from 'src/costrict/agents/strictPlan.js'
|
||||||
// import { STRICT_SPEC_AGENT } from 'src/costrict/agents/strictSpec.js'
|
import { STRICT_SPEC_AGENT } from 'src/costrict/agents/strictSpec.js'
|
||||||
import { SUB_CODING_AGENT } from 'src/costrict/agents/subCoding.js'
|
import { SUB_CODING_AGENT } from 'src/costrict/agents/subCoding.js'
|
||||||
import { TASK_CHECK_AGENT } from 'src/costrict/agents/taskCheck.js'
|
import { TASK_CHECK_AGENT } from 'src/costrict/agents/taskCheck.js'
|
||||||
import { TASK_PLAN_AGENT } from 'src/costrict/agents/taskPlan.js'
|
import { TASK_PLAN_AGENT } from 'src/costrict/agents/taskPlan.js'
|
||||||
|
|
@ -65,7 +65,7 @@ export function getBuiltInAgents(): AgentDefinition[] {
|
||||||
STATUSLINE_SETUP_AGENT,
|
STATUSLINE_SETUP_AGENT,
|
||||||
PLAN_AGENT,
|
PLAN_AGENT,
|
||||||
// StrictSpec workflow: 4-stage pipeline (Requirement → DesignAgent → TaskPlan → SubCoding)
|
// StrictSpec workflow: 4-stage pipeline (Requirement → DesignAgent → TaskPlan → SubCoding)
|
||||||
// STRICT_SPEC_AGENT,
|
STRICT_SPEC_AGENT,
|
||||||
REQUIREMENT_AGENT,
|
REQUIREMENT_AGENT,
|
||||||
DESIGN_AGENT,
|
DESIGN_AGENT,
|
||||||
TASK_PLAN_AGENT,
|
TASK_PLAN_AGENT,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import { EXIT_PLAN_MODE_TOOL_NAME } from '@claude-code-best/builtin-tools/tools/ExitPlanModeTool/constants.js'
|
|
||||||
import type { BuiltInAgentDefinition } from '@claude-code-best/builtin-tools/tools/AgentTool/loadAgentsDir.js'
|
import type { BuiltInAgentDefinition } from '@claude-code-best/builtin-tools/tools/AgentTool/loadAgentsDir.js'
|
||||||
|
|
||||||
function getStrictPlanSystemPrompt(): string {
|
function getStrictPlanSystemPrompt(): string {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import { EXIT_PLAN_MODE_TOOL_NAME } from '@claude-code-best/builtin-tools/tools/ExitPlanModeTool/constants.js'
|
|
||||||
import type { BuiltInAgentDefinition } from '@claude-code-best/builtin-tools/tools/AgentTool/loadAgentsDir.js'
|
import type { BuiltInAgentDefinition } from '@claude-code-best/builtin-tools/tools/AgentTool/loadAgentsDir.js'
|
||||||
|
|
||||||
function getStrictSpecSystemPrompt(): string {
|
function getStrictSpecSystemPrompt(): string {
|
||||||
|
|
@ -79,7 +78,6 @@ export const STRICT_SPEC_AGENT: BuiltInAgentDefinition = {
|
||||||
agentType: 'StrictSpec',
|
agentType: 'StrictSpec',
|
||||||
whenToUse:
|
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.',
|
'将用户需求按照标准阶段分配到对应工作流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:[
|
tools:[
|
||||||
"AskUserQuestion",
|
"AskUserQuestion",
|
||||||
"Agent(Requirement,DesignAgent,TaskPlan,SubCoding)",
|
"Agent(Requirement,DesignAgent,TaskPlan,SubCoding)",
|
||||||
|
|
|
||||||
|
|
@ -87,8 +87,7 @@ export async function* queryModelCoStrict(
|
||||||
// 5. 转换为 OpenAI 格式
|
// 5. 转换为 OpenAI 格式
|
||||||
const openaiMessages = anthropicMessagesToOpenAI(
|
const openaiMessages = anthropicMessagesToOpenAI(
|
||||||
messagesForAPI,
|
messagesForAPI,
|
||||||
systemPrompt,
|
systemPrompt
|
||||||
{ enableThinking: true },
|
|
||||||
)
|
)
|
||||||
const openaiTools = anthropicToolsToOpenAI(standardTools)
|
const openaiTools = anthropicToolsToOpenAI(standardTools)
|
||||||
const openaiToolChoice = anthropicToolChoiceToOpenAI(options.toolChoice)
|
const openaiToolChoice = anthropicToolChoiceToOpenAI(options.toolChoice)
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { registerBundledSkill } from 'src/skills/bundledSkills.js'
|
||||||
|
|
||||||
export function registerStrictPlanSkill(): void {
|
export function registerStrictPlanSkill(): void {
|
||||||
registerBundledSkill({
|
registerBundledSkill({
|
||||||
name: 'strict-plan',
|
name: 'strict:plan',
|
||||||
description:
|
description:
|
||||||
'创建结构化需求提案并协调实施 - 遵循"理解需求→探索项目→需求澄清→创建提案→实施提案"工作流',
|
'创建结构化需求提案并协调实施 - 遵循"理解需求→探索项目→需求澄清→创建提案→实施提案"工作流',
|
||||||
whenToUse:
|
whenToUse:
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { registerBundledSkill } from '../../skills/bundledSkills.js'
|
||||||
|
|
||||||
export function registerStrictSpecSkill(): void {
|
export function registerStrictSpecSkill(): void {
|
||||||
registerBundledSkill({
|
registerBundledSkill({
|
||||||
name: 'strict-spec',
|
name: 'strict:spec',
|
||||||
description:
|
description:
|
||||||
'将用户需求按照标准阶段分配到对应工作流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.',
|
'将用户需求按照标准阶段分配到对应工作流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.',
|
||||||
whenToUse:
|
whenToUse:
|
||||||
|
|
@ -11,6 +11,14 @@ export function registerStrictSpecSkill(): void {
|
||||||
disableModelInvocation: true,
|
disableModelInvocation: true,
|
||||||
// 关键:在子 Agent 中运行
|
// 关键:在子 Agent 中运行
|
||||||
context: 'fork',
|
context: 'fork',
|
||||||
|
allowedTools:[
|
||||||
|
"AskUserQuestion",
|
||||||
|
"Agent(Requirement,DesignAgent,TaskPlan,SubCoding)",
|
||||||
|
"Read",
|
||||||
|
"Write",
|
||||||
|
"Edit",
|
||||||
|
"TodoWrite",
|
||||||
|
],
|
||||||
// 关键:使用 StrictSpec Agent
|
// 关键:使用 StrictSpec Agent
|
||||||
agent: 'StrictSpec',
|
agent: 'StrictSpec',
|
||||||
async getPromptForCommand(args) {
|
async getPromptForCommand(args) {
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ export function initBundledSkills(): void {
|
||||||
registerProjectWikiSkill()
|
registerProjectWikiSkill()
|
||||||
registerTddSkill()
|
registerTddSkill()
|
||||||
registerStrictPlanSkill()
|
registerStrictPlanSkill()
|
||||||
// registerStrictSpecSkill()
|
registerStrictSpecSkill()
|
||||||
registerKeybindingsSkill()
|
registerKeybindingsSkill()
|
||||||
registerVerifySkill()
|
registerVerifySkill()
|
||||||
registerDebugSkill()
|
registerDebugSkill()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user