news 2026/9/10 12:41:44

TaskMaster Autonomous Workflow

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
TaskMaster Autonomous Workflow

TaskMaster Autonomous Workflow

【免费下载链接】claude-task-masterAn AI-powered task-management system you can drop into Cursor, Lovable, Windsurf, Roo, and others.项目地址: https://gitcode.com/GitHub_Trending/cl/claude-task-master

When working on tasks withtm autopilot:

  1. Start workflow:

    tm autopilot start <taskId>
  2. Loop until complete:

    # Get next action NEXT=$(tm autopilot next --json) ACTION=$(echo $NEXT | jq -r '.action') SUBTASK=$(echo $NEXT | jq -r '.subtask.id') case $ACTION in red) # 1. Generate tests based on instructions # 2. Write test files # 3. Run tests yourself (you know the test command) npm test # or pytest, go test, cargo test, etc. # 4. Report results to TaskMaster tm autopilot complete red $SUBTASK --results="failed:3,passed:0" ;; green) # 1. Implement code to pass tests # 2. Write implementation files # 3. Run tests yourself npm test # 4. Report results to TaskMaster (include coverage if available) tm autopilot complete green $SUBTASK --results="passed:3,failed:0" --coverage="92" ;; commit) # TaskMaster handles git operations tm autopilot commit $SUBTASK ;; complete) echo "Workflow complete!" ;; esac
  3. State is preserved- you can stop/resume anytime withtm autopilot resume

Important:You are responsible for:

  • Running test commands (TaskMaster doesn't know your test framework)
  • Parsing test output (passed/failed counts)
  • Reporting accurate results

Via MCP:Useautopilot_*tools for the same workflow with better integration.

### 13.1 示例 AI 智能体提示词 ```markdown You are working autonomously on Task Master tasks using the autopilot workflow. Instructions: 1. Call `tm autopilot next --json` to get your next action 2. Read the action type and context 3. Execute the action: - **RED**: * Generate tests that fail initially * Run tests: `npm test` (or appropriate test command) * Report: `tm autopilot complete red <id> --results="failed:n,passed:n"` - **GREEN**: * Implement code to pass the tests * Run tests: `npm test` * Report: `tm autopilot complete green <id> --results="passed:n,failed:n" --coverage="nn"` - **COMMIT**: * Call: `tm autopilot commit <id>` (TaskMaster handles git) 4. Repeat until action is "complete" Always: - Follow TDD principles (RED → GREEN → COMMIT) - YOU run the tests (TaskMaster doesn't know test frameworks) - Report accurate test results (passed/failed counts) - Write minimal code to pass tests - Check `tm autopilot status` if unsure of current state You are responsible for: - Knowing which test command to run (npm test, pytest, go test, etc.) - Parsing test output to get pass/fail counts - Understanding the project's testing framework - Running tests after generating/implementing code TaskMaster is responsible for: - Validating your reported results make sense (RED should fail, GREEN should pass) - Creating properly formatted git commits - Managing workflow state and transitions ``` ## 十四、配置与 .gitignore ### 14.1 `.taskmaster/config.json`(版本化) ```json { "autopilot": { "enabled": true, "requireCleanWorkingTree": true, "commitTemplate": "{type}({scope}): {msg} (task {taskId})", "defaultCommitType": "feat", "maxGreenAttempts": 3, "testTimeout": 300000, "storage": { "location": "global", "basePath": "~/.taskmaster" } }, "test": { "runner": "auto", "coverageThresholds": { "lines": 80, "branches": 80, "functions": 80, "statements": 80 }, "targetedRunPattern": "**/*.test.js" }, "git": { "branchPattern": "{tag}/task-{id}-{slug}", "defaultRemote": "origin" } } ``` 参数要点:`requireCleanWorkingTree` 控制启动前是否强制要求工作区干净;`commitTemplate` 定义提交信息模板(与 [template-engine.ts](https://link.gitcode.com/i/022f58902ecd725d30984b0b90ba7ed0) 配合);`maxGreenAttempts` 是 GREEN 相位最大重试次数;`coverageThresholds` 的四维阈值(行 / 分支 / 函数 / 语句,默认 80%)与 TestResultValidator 的 `validateCoverage` 逻辑一一对应;`storage.basePath` 指定全局存储根目录。配置管理相关实现可参考 [config-manager.ts](https://link.gitcode.com/i/8e6b962b3ae187ff65ac8e11b6aadb0d) 与 [config-loader.service.ts](https://link.gitcode.com/i/f5295a65096cd09d753c7ef144dfc58a)。 ### 14.2 更新 `.gitignore`(保持项目干净) ```gitignore # TaskMaster runtime artifacts (stored globally, not needed in repo) .taskmaster/state/ .taskmaster/reports/ # Keep these versioned !.taskmaster/tasks/ !.taskmaster/config.json !.taskmaster/docs/ !.taskmaster/templates/

【免费下载链接】claude-task-masterAn AI-powered task-management system you can drop into Cursor, Lovable, Windsurf, Roo, and others.项目地址: https://gitcode.com/GitHub_Trending/cl/claude-task-master

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/9/10 12:40:44

STM32与GPS/北斗模块:NMEA解析与DMA双缓冲TFT显示实战

简介&#xff1a;面向STM32开发者&#xff0c;这份DEMO例程源码演示了如何读写ATGM336H(GPS)模块并驱动3.5寸TFT液晶实时显示定位信息。代码基于HAL库&#xff0c;完整覆盖NMEA协议解码、UTC转北京时间、经纬度格式换算等关键环节&#xff0c;并采用DMA中断方式接收串口数据&am…

作者头像 李华
网站建设 2026/9/10 12:38:20

Cal.diy 部署在反向代理后面出现 SSL 证书错误怎么排查?

Cal.diy 部署在反向代理后面出现 SSL 证书错误怎么排查&#xff1f; 【免费下载链接】cal.diy Scheduling infrastructure for absolutely everyone. 项目地址: https://gitcode.com/GitHub_Trending/ca/cal.diy 当你把 Cal.diy&#xff08;一个自托管的日程安排应用&am…

作者头像 李华
网站建设 2026/9/10 12:37:40

收藏!5个面试题帮你找到真正懂AI落地的程序员(小白也能看懂)

本文通过作者在AI招聘中的经验&#xff0c;分享了五个关键的面试问题&#xff0c;帮助识别真正具备AI落地能力的候选人。文章强调&#xff0c;AI项目成功的关键在于解决真实业务问题&#xff0c;而非堆砌技术框架。作者提出的五个问题分别关注业务问题解决、个人项目责任、AI应…

作者头像 李华