plugins/tools/task/skills/exec/SKILL.md
DAG 任务执行引擎。plan 完成后触发,2 个 worker 协程并发调度子任务,按依赖拓扑排序执行,支持部分完成恢复
npx skillsauth add lazygophers/ccplugin plugins/tools/task/skills/execInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
基于 DAG 调度并执行子任务。2 个协程并发执行,自动解析依赖。
读取以下文件,后续所有 worker 共享,不再重复读取:
.lazygophers/tasks/{task_id}/task.json — 子任务列表、code_style.lazygophers/tasks/{task_id}/align.json — behavior_spec(行为规约).lazygophers/tasks/{task_id}/context.json — toolchain(测试/lint 命令)遍历所有子任务,根据 dependencies 字段构建有向无环图:
支持部分完成恢复:
每个 worker 从共享队列中取任务执行,Worker 的详细逻辑见 worker.md。
核心循环:取任务 → 标记 running → 构建 prompt → 调用 Agent → 验证结果 → 更新状态 → 解锁后继。
两个 worker 都退出后(队列空 + 无执行中 + 无可执行),写入执行检查点到 task.json:
{
"checkpoint": {
"state": "exec",
"completed_subtasks": ["A", "B"],
"failed_subtasks": ["C"],
"pending_subtasks": [],
"last_update": "ISO8601"
}
}
输出 [flow·{task_id}·exec] 任务执行完成:N/M 成功。
development
Go 数据库规范——GORM Model 命名 ModelXxx、表名单数、枚举 uint8 + 常量、索引 idx_ 前缀 + deleted_at leading column、禁 time.Time 统一 int64 unix、禁指针/nullable 字段、TEXT/BLOB/JSON 禁 default、AutoMigrate 禁改主键。设计 DB model、写 GORM tag、建索引、做 migration 审查时触发。
development
Go HTTP API 规范——响应始终 200 + body code 字段、路由 /api/* 全 POST 单段 <Action><Model>、中间件逐路由注册禁 Group(prefix,mw...)、handler 仅返回 (rsp,error)、认证走 header。设计 HTTP API、写路由/handler/中间件时触发。
development
Go 项目结构规范——三层架构(API → Impl → State)、全局状态模式、internal/ 私有包、cmd/ 仅 main.go、go.work 多模块、禁止 Repository 接口和 DI 容器、struct 公共字段开头全 omitempty、handler var rsp 顶声明、禁 legacy migration。设计项目骨架、新建目录、组织包、做架构评审时触发。
development
Go 命名规范——Id/Uid 字段(非 ID)、IsActive/HasMFA 布尔前缀、CreatedAt 时间字段、接收者统一用 p、包名全小写无下划线、泛型类型参数描述性命名、集合字段 xxx_list 禁 xxxs 复数、Enum 0 值 XxxNil 禁 Unknown、禁 Status 统一 State、Set/Update 语义区分。定义结构体字段、函数、变量、包、接收者名、泛型、枚举时触发。