Invoked as /agiflow:run-task. In hosts without slash-prompts, this skill is triggered by matching intent and drives AgiFlow via its MCP tools.
Usage:
/agiflow:run-task <task-slug-or-id> - Execute specific task
/agiflow:run-task - List and select from available tasks
Examples:
/agiflow:run-task DXX-2 (using slug)
/agiflow:run-task 01K8FABMNEJG1XTA9JGHSNFV40 (using ID)
/agiflow:run-task (interactive selection)
Guardrails
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
- Keep changes tightly scoped to the requested outcome within the task scope.
- A task represents a single, focused unit of work that can be completed in one session.
If a task slug/id is provided, load it with get_task; otherwise list available tasks with list_tasks for selection.
AgiFlow Project Management Guidelines
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
Tasks move through these statuses in order:
Planning → Todo → In Progress → Testing → Review → Done
Exception paths: Blocked (requires human intervention), Cancelled (terminal).
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.
1. Task Selection & Loading
If task slug/id NOT provided:
- Use
list_tasks MCP tool to show available tasks:
- For the ready queue, filter by
status: "Todo" (sorted by priority automatically)
- Do NOT pick up tasks in "Planning" status — they have not been groomed yet
- Display: slug, title, priority, assignee, acceptance criteria count
- Ask user to select which task to work on.
- Once user selects, proceed with the selected task slug/id.
If task slug/id IS provided: 4. Use get_task MCP tool with the provided slug/id to retrieve:
- Task: title, description, priority, status, acceptance criteria
- Comments: Previous progress updates and discussions
- Review the task details to understand:
- Complete requirements and deliverables
- Acceptance criteria that must be met
- Any blockers or dependencies noted in comments
5b. PLANNING STATUS GUARD (MANDATORY):
- If task status is "Planning": REFUSE to execute
- Report: "Cannot execute task [SLUG]: still in Planning status. Use backlog-grooming to promote it to Todo first."
- STOP execution — do not proceed
2. Start Task Execution
- If task status is "Todo", use
update_task MCP tool to set status to "In Progress".
- Create a TODO list of acceptance criteria in execution order (use TodoWrite tool).
- Document execution start in task via
update_task devInfo:devInfo: {
currentSession: "<current-session-id>",
startedAt: "<timestamp>"
}
3. Implement Task
For each acceptance criterion:
- Review the specific requirement
- BEFORE editing any code: Use
vibe-lint MCP get-file-design-pattern (MANDATORY)
- Implement the criterion keeping changes minimal and focused
- AFTER editing code: Use
vibe-lint MCP review-code-change (MANDATORY)
- Update task
devInfo with implementation notes:devInfo: {
filesChanged: ["path/to/file.ts:42"],
testResults: { passed: true, coverage: "85%" },
notes: "Implementation notes here",
currentSession: "<session-id>"
}
- Mark acceptance criterion as checked via
update_task
- Update your TODO list (mark criterion as completed)
Between acceptance criteria:
- Commit changes with meaningful commit messages
- Run tests to ensure no regressions
- Update task devInfo with progress
4. Testing Phase
When ALL acceptance criteria are met:
- Verify all criteria have status checked
- Use
update_task to move status to "Testing"
- Run the full test suite for affected code:
- Unit tests
- Integration tests
- Type checking and lint
If tests PASS:
- Update devInfo with passing test results
- Proceed to step 13 (Task Completion)
If tests FAIL:
5. Task Completion
After tests pass, review all files changed (use git diff).
Draft a PR description for the task (DO NOT create the PR yet - just draft the text):
- Title format:
[TASK-SLUG] Task title (e.g., [DXX-2] Add user authentication)
- Body should include:
- Task reference and summary
- List of changes made
- Files modified (use
file.ts:42 format)
- Test results
Use update_task to set status to "Review" and save draft PR text and commit message:
{
status: "Review",
devInfo: {
...existing,
draftCommitMessage: "feat(auth): add user authentication\n\n- Add login endpoint with session management\n- Add password validation\n- Add unit tests for auth flow",
draftPr: {
title: "[DXX-2] Add user authentication",
body: "## Summary\n\nImplemented user authentication feature.\n\n## Changes\n\n- Added login endpoint\n- Added session management\n\n## Files Modified\n\n- src/auth/login.ts:42\n- src/auth/session.ts:15\n\n## Test Results\n\nAll tests passing."
},
finalNotes: "All acceptance criteria met. Files changed: [...]. Tests passing.",
completedBy: "<member-id>",
totalDuration: "45 minutes"
}
}
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.
Use create_task_comment to add final summary:
- Task scope and goals achieved
- All files created/modified (use
file.ts:42 format)
- Test coverage and results
- Any follow-up work needed
6. Handle Blockers
- If blocked at any point:
Reference
- Use
get_task to review task details before starting
- Use
list_task_comments to see previous progress updates
- Use
update_task to track devInfo and acceptance criteria progress
Integration with Other Tools
- vibe-lint MCP: ALWAYS use before/after editing files for pattern compliance
- Scaffolding MCP: Document scaffolded code in task comments
Common Mistakes to Avoid
- ❌ Starting work without reviewing task details with
get_task
- ❌ Not moving task to "In Progress" before starting
- ❌ Skipping vibe-lint MCP validation (MANDATORY for every file)
- ❌ Not tracking devInfo (files changed, tests, session ID)
- ❌ Marking acceptance criteria checked before actually completing them
- ❌ Moving to "Review" without going through "Testing" first
- ❌ Not documenting progress in comments
- ❌ Forgetting to add file references (file.ts:42 format) in final comment
- ❌ Not running tests before moving to "Review"
- ❌ Not committing changes incrementally
- ❌ Moving to "Blocked" without explaining what human intervention is needed
- ❌ Skipping retryCount increment when moving failed task back to "Todo"
- ❌ Starting work on a task in "Planning" status (must be promoted to "Todo" via
backlog-grooming first)
1---2name: run-task3description: "Execute a single Todo task through In Progress to Review, meeting every acceptance criterion with tests and vibe-lint checks. Refuses Planning-status tasks. Invoked as /agiflow:run-task <task>. Uses get_task, update_task, create_task_comment."4tags:5 - agiflow6 - mcp7 - execution8 - task9metadata:10 source: https://skillmd.com/skills/hashgraph-online/run-task11 mirrors: backend/apis/agiflow-api .../prompts/task.md12---1314> Invoked as `/agiflow:run-task`. In hosts without slash-prompts, this skill is triggered by matching intent and drives AgiFlow via its MCP tools.1516**Usage**:1718- `/agiflow:run-task <task-slug-or-id>` - Execute specific task19- `/agiflow:run-task` - List and select from available tasks2021**Examples**:2223- `/agiflow:run-task DXX-2` (using slug)24- `/agiflow:run-task 01K8FABMNEJG1XTA9JGHSNFV40` (using ID)25- `/agiflow:run-task` (interactive selection)2627---2829**Guardrails**3031- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.32- Keep changes tightly scoped to the requested outcome within the task scope.33- A task represents a single, focused unit of work that can be completed in one session.3435If a task slug/id is provided, load it with `get_task`; otherwise list available tasks with `list_tasks` for selection.3637---3839## AgiFlow Project Management Guidelines4041Follow the shared AgiFlow project-management guidelines in [`references/agiflow-agents.md`](../../references/agiflow-agents.md) — agent assignment, the task status workflow and transitions, work-unit best practices, and the tags strategy apply to this workflow.424344---4546**Task Status Workflow**47Tasks move through these statuses in order:48`Planning → Todo → In Progress → Testing → Review → Done`49Exception paths: `Blocked` (requires human intervention), `Cancelled` (terminal).5051**IMPORTANT: Planning Status Guard**52This 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.5354**Steps**55Track these steps as TODOs and complete them one by one.5657## 1. Task Selection & Loading5859**If task slug/id NOT provided:**60611. Use `list_tasks` MCP tool to show available tasks:62 - For the ready queue, filter by `status: "Todo"` (sorted by priority automatically)63 - Do NOT pick up tasks in "Planning" status — they have not been groomed yet64 - Display: slug, title, priority, assignee, acceptance criteria count652. Ask user to select which task to work on.663. Once user selects, proceed with the selected task slug/id.6768**If task slug/id IS provided:** 4. Use `get_task` MCP tool with the provided slug/id to retrieve:6970- Task: title, description, priority, status, acceptance criteria71- Comments: Previous progress updates and discussions72735. Review the task details to understand:74 - Complete requirements and deliverables75 - Acceptance criteria that must be met76 - Any blockers or dependencies noted in comments7778**5b. PLANNING STATUS GUARD (MANDATORY):**7980- If task status is "Planning": **REFUSE to execute**81- Report: "Cannot execute task [SLUG]: still in Planning status. Use **backlog-grooming** to promote it to Todo first."82- **STOP execution** — do not proceed8384## 2. Start Task Execution85866. If task status is "Todo", use `update_task` MCP tool to set status to "In Progress".877. Create a TODO list of acceptance criteria in execution order (use TodoWrite tool).888. Document execution start in task via `update_task` devInfo:89 ```typescript90 devInfo: {91 currentSession: "<current-session-id>",92 startedAt: "<timestamp>"93 }94 ```9596## 3. Implement Task97989. For each acceptance criterion:99 - Review the specific requirement100 - **BEFORE editing any code**: Use `vibe-lint` MCP `get-file-design-pattern` (MANDATORY)101 - Implement the criterion keeping changes minimal and focused102 - **AFTER editing code**: Use `vibe-lint` MCP `review-code-change` (MANDATORY)103 - Update task `devInfo` with implementation notes:104 ```typescript105 devInfo: {106 filesChanged: ["path/to/file.ts:42"],107 testResults: { passed: true, coverage: "85%" },108 notes: "Implementation notes here",109 currentSession: "<session-id>"110 }111 ```112 - Mark acceptance criterion as checked via `update_task`113 - Update your TODO list (mark criterion as completed)11411510. Between acceptance criteria:116 - Commit changes with meaningful commit messages117 - Run tests to ensure no regressions118 - Update task devInfo with progress119120## 4. Testing Phase12112211. When ALL acceptance criteria are met:123 - Verify all criteria have status checked124 - Use `update_task` to move status to "Testing"125 - Run the full test suite for affected code:126 - Unit tests127 - Integration tests128 - Type checking and lint12913012. **If tests PASS:**131 - Update devInfo with passing test results132 - Proceed to step 13 (Task Completion)13313413. **If tests FAIL:**135 - Increment `retryCount` in devInfo:136 ```typescript137 devInfo: {138 ...existing,139 retryCount: (existing.retryCount ?? 0) + 1,140 lastFailureReason: "<description of what failed>"141 }142 ```143 - If `retryCount >= maxRetries` (default maxRetries = 2):144 - Use `update_task` to move status to "Blocked"145 - Use `create_task_comment` to document the repeated failure and what human intervention is needed146 - Stop — do not retry147 - If `retryCount < maxRetries`:148 - Use `update_task` to move status back to "Todo"149 - Use `create_task_comment` to document the failure reason150 - Stop — agent will re-pick from Todo queue on next cycle151152## 5. Task Completion15315414. After tests pass, review all files changed (use git diff).15515615. Draft a PR description for the task (DO NOT create the PR yet - just draft the text):157 - Title format: `[TASK-SLUG] Task title` (e.g., `[DXX-2] Add user authentication`)158 - Body should include:159 - Task reference and summary160 - List of changes made161 - Files modified (use `file.ts:42` format)162 - Test results16316416. Use `update_task` to set status to "Review" and save draft PR text and commit message:165166 ```typescript167 {168 status: "Review",169 devInfo: {170 ...existing,171 draftCommitMessage: "feat(auth): add user authentication\n\n- Add login endpoint with session management\n- Add password validation\n- Add unit tests for auth flow",172 draftPr: {173 title: "[DXX-2] Add user authentication",174 body: "## Summary\n\nImplemented user authentication feature.\n\n## Changes\n\n- Added login endpoint\n- Added session management\n\n## Files Modified\n\n- src/auth/login.ts:42\n- src/auth/session.ts:15\n\n## Test Results\n\nAll tests passing."175 },176 finalNotes: "All acceptance criteria met. Files changed: [...]. Tests passing.",177 completedBy: "<member-id>",178 totalDuration: "45 minutes"179 }180 }181 ```182183 **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.18418517. Use `create_task_comment` to add final summary:186 - Task scope and goals achieved187 - All files created/modified (use `file.ts:42` format)188 - Test coverage and results189 - Any follow-up work needed190191## 6. Handle Blockers19219318. If blocked at any point:194 - Use `update_task` to set status to "Blocked"195 - Use `update_task` to update devInfo with blocker details:196 ```typescript197 devInfo: {198 ...existing,199 blockedReason: "<why the task is blocked>",200 blockedBy: "<memberId or 'system'>"201 }202 ```203 - Use `create_task_comment` on task with blocker information explaining what human intervention is needed204205**Reference**206207- Use `get_task` to review task details before starting208- Use `list_task_comments` to see previous progress updates209- Use `update_task` to track devInfo and acceptance criteria progress210211**Integration with Other Tools**212213- **vibe-lint MCP**: ALWAYS use before/after editing files for pattern compliance214- **Scaffolding MCP**: Document scaffolded code in task comments215216**Common Mistakes to Avoid**217218- ❌ Starting work without reviewing task details with `get_task`219- ❌ Not moving task to "In Progress" before starting220- ❌ Skipping vibe-lint MCP validation (MANDATORY for every file)221- ❌ Not tracking devInfo (files changed, tests, session ID)222- ❌ Marking acceptance criteria checked before actually completing them223- ❌ Moving to "Review" without going through "Testing" first224- ❌ Not documenting progress in comments225- ❌ Forgetting to add file references (file.ts:42 format) in final comment226- ❌ Not running tests before moving to "Review"227- ❌ Not committing changes incrementally228- ❌ Moving to "Blocked" without explaining what human intervention is needed229- ❌ Skipping retryCount increment when moving failed task back to "Todo"230- ❌ Starting work on a task in "Planning" status (must be promoted to "Todo" via `backlog-grooming` first)