按照 FastAPI 最佳实践重构代码
Refactors FastAPI code according to best practices and development specifications.
/plugin marketplace add qufeng33/agents/plugin install fastapi-dev@nightx-agents<重构目标> | <task-id>使用 fastapi-developer agent 按照开发规范重构代码。
使用 Task 工具 调用 fastapi-developer agent:
Task 工具参数:
- subagent_type: "fastapi-developer"
- prompt: "..."
.agent/
├── tips.md # 经验文档(全局共享)
└── tasks/
└── {feature}-{seq}/
└── spec.md # 设计文档 + 任务状态
用户输入:
$ARGUMENTS
判断 $ARGUMENTS 的类型:
情况 A:输入为空
情况 B:输入是已存在的任务 ID
.agent/tasks/{输入}/ 目录是否存在情况 C:输入是重构描述
使用 Task 工具调用 fastapi-developer agent:
Task 工具参数:
- subagent_type: "fastapi-developer"
- prompt: |
## 文件
- 设计文档: .agent/tasks/{task-id}/spec.md
- 经验文档: .agent/tips.md
## 任务
在该任务上下文中进行重构。
完成后更新设计文档相关内容(如需)。
使用 Task 工具调用 fastapi-developer agent:
Task 工具参数:
- subagent_type: "fastapi-developer"
- prompt: |
## 文件
- 经验文档: .agent/tips.md
## 任务
重构目标:{$ARGUMENTS 或用户描述}
请按描述进行重构。
完成后询问用户是否将重构关联到某个任务。
每个 agent 按照其定义的流程执行。