feat(costrict): enable StrictSpec workflow and refine strict skills

This commit is contained in:
yhangf 2026-04-20 15:17:36 +08:00
parent b58f5b72b0
commit d74321180f
7 changed files with 14 additions and 10 deletions

View File

@ -6,7 +6,7 @@ import { DESIGN_AGENT } from 'src/costrict/agents/designAgent.js'
import { QUICK_EXPLORE_AGENT } from 'src/costrict/agents/quickExplore.js'
import { REQUIREMENT_AGENT } from 'src/costrict/agents/requirement.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 { TASK_CHECK_AGENT } from 'src/costrict/agents/taskCheck.js'
import { TASK_PLAN_AGENT } from 'src/costrict/agents/taskPlan.js'
@ -65,7 +65,7 @@ export function getBuiltInAgents(): AgentDefinition[] {
STATUSLINE_SETUP_AGENT,
PLAN_AGENT,
// StrictSpec workflow: 4-stage pipeline (Requirement → DesignAgent → TaskPlan → SubCoding)
// STRICT_SPEC_AGENT,
STRICT_SPEC_AGENT,
REQUIREMENT_AGENT,
DESIGN_AGENT,
TASK_PLAN_AGENT,

View File

@ -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'
function getStrictPlanSystemPrompt(): string {

View File

@ -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'
function getStrictSpecSystemPrompt(): string {
@ -79,7 +78,6 @@ export const STRICT_SPEC_AGENT: BuiltInAgentDefinition = {
agentType: 'StrictSpec',
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)",

View File

@ -87,8 +87,7 @@ export async function* queryModelCoStrict(
// 5. 转换为 OpenAI 格式
const openaiMessages = anthropicMessagesToOpenAI(
messagesForAPI,
systemPrompt,
{ enableThinking: true },
systemPrompt
)
const openaiTools = anthropicToolsToOpenAI(standardTools)
const openaiToolChoice = anthropicToolChoiceToOpenAI(options.toolChoice)

View File

@ -2,7 +2,7 @@ import { registerBundledSkill } from 'src/skills/bundledSkills.js'
export function registerStrictPlanSkill(): void {
registerBundledSkill({
name: 'strict-plan',
name: 'strict:plan',
description:
'创建结构化需求提案并协调实施 - 遵循"理解需求→探索项目→需求澄清→创建提案→实施提案"工作流',
whenToUse:

View File

@ -2,7 +2,7 @@ import { registerBundledSkill } from '../../skills/bundledSkills.js'
export function registerStrictSpecSkill(): void {
registerBundledSkill({
name: 'strict-spec',
name: 'strict:spec',
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.',
whenToUse:
@ -11,6 +11,14 @@ export function registerStrictSpecSkill(): void {
disableModelInvocation: true,
// 关键:在子 Agent 中运行
context: 'fork',
allowedTools:[
"AskUserQuestion",
"Agent(Requirement,DesignAgent,TaskPlan,SubCoding)",
"Read",
"Write",
"Edit",
"TodoWrite",
],
// 关键:使用 StrictSpec Agent
agent: 'StrictSpec',
async getPromptForCommand(args) {

View File

@ -35,7 +35,7 @@ export function initBundledSkills(): void {
registerProjectWikiSkill()
registerTddSkill()
registerStrictPlanSkill()
// registerStrictSpecSkill()
registerStrictSpecSkill()
registerKeybindingsSkill()
registerVerifySkill()
registerDebugSkill()