协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
run-work【开发与工程】Execute a work unit end-to-end: sequence tasks by dependency, implement, test between tasks, commit, and track progress. Use to deliver a complete feature in one session. Invoked as /agiflow:run-work <work-unit>. Uses get_work_unit, list_tasks, update_task, get_work_unit_progress.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: run-work description: "Execute a work unit end-to-end: sequence tasks by dependency, implement, test between tasks, commit, and track progress. Use to deliver a complete feature in one session. Invoked as /agiflow:run-work . Uses get_work_unit, list_tasks, update_task, get_work_unit_progress." tags:
Invoked as
/agiflow:run-work. In hosts without slash-prompts, this skill is triggered by matching intent and drives AgiFlow via its MCP tools.
Usage:
/agiflow:run-work <work-unit-slug-or-id> - Execute specific work unit/agiflow:run-work - List and select from available work unitsExamples:
/agiflow:run-work DXX-WU-1 (using slug)/agiflow:run-work 01K8FABMNEJG1XTA9JGHSNFV40 (using ID)/agiflow:run-work (interactive selection)Guardrails
If a work unit slug/id is provided, load it with get_work_unit; otherwise list available work units with list_work_units for selection.
Follow the shared AgiFlow project-management guidelines in references/agiflow-agents.md — agent assignment, the task status workflow and transitions, work-unit best practices, and the tags strategy apply to this workflow.
Task Status Workflow (per task)
Each task moves individually through: Todo → In Progress → Testing → Review
The work unit stays in_progress until all tasks reach Review or Done.
If any task hits Blocked, consider setting the work unit to blocked too.
IMPORTANT: Planning Status Guard
This skill ONLY executes tasks in "Todo" or later status. Tasks in "Planning" have NOT been groomed and are NOT ready for execution. Use backlog-grooming to promote Planning tasks to Todo first.
Steps Track these steps as TODOs and complete them one by one.
If work unit slug/id NOT provided:
list_work_units MCP tool to show available work units:
status: "in_progress" for active work, or work units with tasks in "Todo"If work unit slug/id IS provided: 4. Use get_work_unit MCP tool with the provided slug/id to retrieve:
get_work_unit returns tasks automatically - no separate list_tasks call needed5b. PLANNING STATUS GUARD (MANDATORY):
update_work_unit MCP tool to set status to "in_progress"backlog-groomingupdate_work_unit devInfo:
devInfo: {
executionPlan: "Backend API → Frontend UI → Tests → Documentation",
sessionId: "<current-session-id>",
startedAt: "<timestamp>"
}
For each task in the work unit (in dependency order from the tasks array):
update_task MCP tool to set status to "In Progress"architect MCP get_file_design_pattern (MANDATORY)architect MCP review_code_change (MANDATORY)devInfo with implementation notes:
devInfo: {
filesChanged: ["path/to/file.ts:42"],
testResults: { passed: true, coverage: "85%" },
notes: "Implementation notes here"
}
update_taskTesting phase for each task:
Use update_task to move status to "Testing"
Run unit tests, integration tests, type check and lint for affected code
If tests PASS: proceed to move task to "Review"
If tests FAIL:
retryCount in devInforetryCount >= maxRetries (default: 2): move task to "Blocked", set work unit to "blocked", stopretryCount < maxRetries: move task back to "Todo", document failure, continue to next task or stop sessionUse update_task to set status to "Review" when tests pass
Update your TODO list (mark task as completed)
Between tasks:
The work unit tasks array automatically updates as tasks are completed.
get_work_unit to check current state and task statusesin_progress until all tasks reach Review or DoneUpdate work unit devInfo as you progress via update_work_unit:
devInfo: {
executionPlan: "...",
sessionId: "<session-id>",
startedAt: "<timestamp>",
progress: {
completedTasks: 3,
totalTasks: 8,
lastTaskCompleted: "Implement cart API",
currentTask: "Add cart UI component"
},
testResults: {
unitTests: "passing",
integrationTests: "passing",
coverage: "85%"
},
blockers: [] // or list any blockers encountered
}
When ALL tasks in work unit are in "Review" or "Done":
Draft a PR description for the work unit (DO NOT create the PR yet - just draft the text):
[WORK-UNIT-SLUG] Work unit title (e.g., [DXX-WU-1] Shopping cart feature)file.ts:42 format)Use update_work_unit to set status to "completed" and save draft PR text and commit message:
{
status: "completed",
completedAt: new Date(),
devInfo: {
...existing,
draftCommitMessage: "feat(cart): implement shopping cart feature\n\n- Add cart API endpoints\n- Add cart UI components\n- Add integration tests\n\nCloses: DXX-WU-1",
draftPr: {
title: "[DXX-WU-1] Shopping cart feature",
body: "## Summary\n\nImplemented shopping cart feature.\n\n## Tasks Completed\n\n- [DXX-1] Add cart API\n- [DXX-2] Add cart UI\n- [DXX-3] Add cart tests\n\n## Changes\n\n- Added cart endpoints\n- Added cart components\n- Added integration tests\n\n## Files Modified\n\n- src/api/cart.ts:42\n- src/components/Cart.tsx:15\n- tests/cart.test.ts:1\n\n## Test Results\n\nAll tests passing. Coverage: 85%"
},
finalNotes: "All tasks completed. Files changed: [...]. Tests passing.",
completedBy: "<member-id>",
totalDuration: "3.5 hours"
}
}
Note on draftCommitMessage: Write a conventional commit message that will be used for the final git commit. Format: type(scope): description with optional body listing changes.
Create final summary comment documenting:
file.ts:42 format)If blocked on a task:
update_task to set task status to "Blocked"update_work_unit to set status to "blocked"create_task_comment on blocked task with details explaining what human intervention is neededIf scope changes during execution:
create_task to add new tasks to work unitCommon Mistakes to Avoid
backlog-grooming first)