refactor(agents): 改回2层架构,StrictSpec 直接调 SubCoding

- StrictSpec 精简为~60行,stage 4 直接调 SubCoding(绕过 SpecPlan 中间层)
- 移除 SpecPlan 注册(3层嵌套对外部用户不可用,ALL_AGENT_DISALLOWED_TOOLS 限制)
- SubCoding 自带探索/实施能力,无需上层准备 proposal/task.md
- 支持 teammates 并行调用 SubCoding,自动降级串行

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
yhangf 2026-04-10 09:32:21 +08:00
parent 7ee0b3a6a2
commit 0d1754614a
2 changed files with 16 additions and 7 deletions

View File

@ -24,9 +24,19 @@ function getStrictSpecSystemPrompt(): string {
- \`Agent\` 工具启动 \`TaskPlan\`subagent_type: "TaskPlan"
- prompt参数输入{user_input}
4. **** (SpecPlan模式)
- \`Agent\` 工具启动 \`SpecPlan\`subagent_type: "SpecPlan"
- prompt参数输入{user_input}
4. ****
- \`.cospec/spec/<feature>/plan.md\`,对每个未完成任务调用 \`SubCoding\`subagent_type: "SubCoding"
- **** \`SubCoding\`(提供 \`name\`\`team_name\` 参数)
- Agent "Agent Teams is not yet available"退
- SubCoding plan.md \`- [x]\`
SubCoding prompt
\`\`\`
: <plan.md 中的任务名>
: <plan.md 中的任务内容>
需求文档: .cospec/spec/<feature>/spec.md
设计文档: .cospec/spec/<feature>/tech.md
\`\`\`
##
@ -40,7 +50,8 @@ function getStrictSpecSystemPrompt(): string {
###
-
- `
-
- SubCoding 2 使 \`AskUserQuestion\` 向用户报告`
}
export const STRICT_SPEC_AGENT: BuiltInAgentDefinition = {

View File

@ -5,7 +5,6 @@ import { isEnvTruthy } from '../../utils/envUtils.js'
import { DESIGN_AGENT } from '../../costrict/agents/designAgent.js'
import { QUICK_EXPLORE_AGENT } from '../../costrict/agents/quickExplore.js'
import { REQUIREMENT_AGENT } from '../../costrict/agents/requirement.js'
import { SPEC_PLAN_AGENT } from '../../costrict/agents/specPlan.js'
import { STRICT_PLAN_AGENT } from '../../costrict/agents/strictPlan.js'
import { STRICT_SPEC_AGENT } from '../../costrict/agents/strictSpec.js'
import { SUB_CODING_AGENT } from '../../costrict/agents/subCoding.js'
@ -64,12 +63,11 @@ export function getBuiltInAgents(): AgentDefinition[] {
GENERAL_PURPOSE_AGENT,
STATUSLINE_SETUP_AGENT,
PLAN_AGENT,
// StrictSpec workflow: 4-stage pipeline (Requirement → DesignAgent → TaskPlan → SpecPlan)
// StrictSpec workflow: 4-stage pipeline (Requirement → DesignAgent → TaskPlan → SubCoding)
STRICT_SPEC_AGENT,
REQUIREMENT_AGENT,
DESIGN_AGENT,
TASK_PLAN_AGENT,
SPEC_PLAN_AGENT,
// StrictPlan workflow: lightweight plan → implement pipeline
STRICT_PLAN_AGENT,
SUB_CODING_AGENT,