Files
2026-06-15 23:48:37 +08:00

41 lines
1.3 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
description: 禁止使用子流程(Task工具),所有任务必须在主流程中串行完成
alwaysApply: true
---
# 禁止子流程 — 主流程串行处理规则
## 核心规则
**绝对禁止** 使用 Task 工具(subagent)。所有任务必须由主流程直接完成,使用主流程的模型串行处理。
## 禁止行为
- 禁止调用 `Task` 工具(任何 subagent_typegeneralPurpose、explore、shell、best-of-n-runner 等)
- 禁止将工作委派给子代理
- 禁止并行启动多个子任务
## 正确做法
- 直接使用 Read、Grep、Glob、Shell 等工具自行完成搜索和探索
- 直接使用 Write、StrReplace 等工具自行完成文件编辑
- 所有代码阅读、分析、修改均在主对话流程中串行执行
- 需要探索代码库时,自己调用 Glob 找文件、Read 读文件、Grep 搜索内容
- 需要执行命令时,自己调用 Shell 执行
## 示例
```
❌ 错误:启动子流程探索代码
Task(subagent_type="explore", prompt="探索项目结构...")
❌ 错误:启动子流程执行任务
Task(subagent_type="generalPurpose", prompt="修改组件...")
✅ 正确:主流程直接操作
Glob("**/*.tsx") → Read(path) → StrReplace(path, old, new)
✅ 正确:主流程直接搜索
Grep(pattern="export function", glob="*.ts") → Read(匹配文件)
```