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)
Source: hashgraph-online/awesome-codex-plugins → plugins/AgiFlow/ai-plugin/skills/run-task/SKILL.md
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.4---5
6
7> Invoked as `/agiflow:run-task`. In hosts without slash-prompts, this skill is triggered by matching intent and drives AgiFlow via its MCP tools.
8
9**Usage**:
10
11- `/agiflow:run-task <task-slug-or-id>` - Execute specific task
12- `/agiflow:run-task` - List and select from available tasks
13
14**Examples**:
15
16- `/agiflow:run-task DXX-2` (using slug)
17- `/agiflow:run-task 01K8FABMNEJG1XTA9JGHSNFV40` (using ID)
18- `/agiflow:run-task` (interactive selection)
19
20---
21
22**Guardrails**
23
24- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
25- Keep changes tightly scoped to the requested outcome within the task scope.
26- A task represents a single, focused unit of work that can be completed in one session.
27
28If a task slug/id is provided, load it with `get_task`; otherwise list available tasks with `list_tasks` for selection.
29
30---
31
32## AgiFlow Project Management Guidelines
33
34Follow 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.
35
36
37---
38
39**Task Status Workflow**
40Tasks move through these statuses in order:
41`Planning → Todo → In Progress → Testing → Review → Done`
42Exception paths: `Blocked` (requires human intervention), `Cancelled` (terminal).
43
44**IMPORTANT: Planning Status Guard**
45This 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.
46
47**Steps**
48Track these steps as TODOs and complete them one by one.
49
50## 1. Task Selection & Loading
51
52**If task slug/id NOT provided:**
53
541. Use `list_tasks` MCP tool to show available tasks:
55 - For the ready queue, filter by `status: "Todo"` (sorted by priority automatically)
56 - Do NOT pick up tasks in "Planning" status — they have not been groomed yet
57 - Display: slug, title, priority, assignee, acceptance criteria count
582. Ask user to select which task to work on.
593. Once user selects, proceed with the selected task slug/id.
60
61**If task slug/id IS provided:** 4. Use `get_task` MCP tool with the provided slug/id to retrieve:
62
63- Task: title, description, priority, status, acceptance criteria
64- Comments: Previous progress updates and discussions
65
665. Review the task details to understand:
67 - Complete requirements and deliverables
68 - Acceptance criteria that must be met
69 - Any blockers or dependencies noted in comments
70
71**5b. PLANNING STATUS GUARD (MANDATORY):**
72
73- If task status is "Planning": **REFUSE to execute**
74- Report: "Cannot execute task [SLUG]: still in Planning status. Use **backlog-grooming** to promote it to Todo first."
75- **STOP execution** — do not proceed
76
77## 2. Start Task Execution
78
796. If task status is "Todo", use `update_task` MCP tool to set status to "In Progress".
807. Create a TODO list of acceptance criteria in execution order (use TodoWrite tool).
818. Document execution start in task via `update_task` devInfo:
82 ```typescript
83 devInfo: {
84 currentSession: "<current-session-id>",
85 startedAt: "<timestamp>"
86 }
87 ```
88
89## 3. Implement Task
90
919. For each acceptance criterion:
92 - Review the specific requirement
93 - **BEFORE editing any code**: Use `vibe-lint` MCP `get-file-design-pattern` (MANDATORY)
94 - Implement the criterion keeping changes minimal and focused
95 - **AFTER editing code**: Use `vibe-lint` MCP `review-code-change` (MANDATORY)
96 - Update task `devInfo` with implementation notes:
97 ```typescript
98 devInfo: {
99 filesChanged: ["path/to/file.ts:42"],
100 testResults: { passed: true, coverage: "85%" },
101 notes: "Implementation notes here",
102 currentSession: "<session-id>"
103 }
104 ```
105 - Mark acceptance criterion as checked via `update_task`
106 - Update your TODO list (mark criterion as completed)
107
10810. Between acceptance criteria:
109 - Commit changes with meaningful commit messages
110 - Run tests to ensure no regressions
111 - Update task devInfo with progress
112
113## 4. Testing Phase
114
11511. When ALL acceptance criteria are met:
116 - Verify all criteria have status checked
117 - Use `update_task` to move status to "Testing"
118 - Run the full test suite for affected code:
119 - Unit tests
120 - Integration tests
121 - Type checking and lint
122
12312. **If tests PASS:**
124 - Update devInfo with passing test results
125 - Proceed to step 13 (Task Completion)
126
12713. **If tests FAIL:**
128 - Increment `retryCount` in devInfo:
129 ```typescript
130 devInfo: {
131 ...existing,
132 retryCount: (existing.retryCount ?? 0) + 1,
133 lastFailureReason: "<description of what failed>"
134 }
135 ```
136 - If `retryCount >= maxRetries` (default maxRetries = 2):
137 - Use `update_task` to move status to "Blocked"
138 - Use `create_task_comment` to document the repeated failure and what human intervention is needed
139 - Stop — do not retry
140 - If `retryCount < maxRetries`:
141 - Use `update_task` to move status back to "Todo"
142 - Use `create_task_comment` to document the failure reason
143 - Stop — agent will re-pick from Todo queue on next cycle
144
145## 5. Task Completion
146
14714. After tests pass, review all files changed (use git diff).
148
14915. Draft a PR description for the task (DO NOT create the PR yet - just draft the text):
150 - Title format: `[TASK-SLUG] Task title` (e.g., `[DXX-2] Add user authentication`)
151 - Body should include:
152 - Task reference and summary
153 - List of changes made
154 - Files modified (use `file.ts:42` format)
155 - Test results
156
15716. Use `update_task` to set status to "Review" and save draft PR text and commit message:
158
159 ```typescript
160 {
161 status: "Review",
162 devInfo: {
163 ...existing,
164 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",
165 draftPr: {
166 title: "[DXX-2] Add user authentication",
167 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."
168 },
169 finalNotes: "All acceptance criteria met. Files changed: [...]. Tests passing.",
170 completedBy: "<member-id>",
171 totalDuration: "45 minutes"
172 }
173 }
174 ```
175
176 **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.
177
17817. Use `create_task_comment` to add final summary:
179 - Task scope and goals achieved
180 - All files created/modified (use `file.ts:42` format)
181 - Test coverage and results
182 - Any follow-up work needed
183
184## 6. Handle Blockers
185
18618. If blocked at any point:
187 - Use `update_task` to set status to "Blocked"
188 - Use `update_task` to update devInfo with blocker details:
189 ```typescript
190 devInfo: {
191 ...existing,
192 blockedReason: "<why the task is blocked>",
193 blockedBy: "<memberId or 'system'>"
194 }
195 ```
196 - Use `create_task_comment` on task with blocker information explaining what human intervention is needed
197
198**Reference**
199
200- Use `get_task` to review task details before starting
201- Use `list_task_comments` to see previous progress updates
202- Use `update_task` to track devInfo and acceptance criteria progress
203
204**Integration with Other Tools**
205
206- **vibe-lint MCP**: ALWAYS use before/after editing files for pattern compliance
207- **Scaffolding MCP**: Document scaffolded code in task comments
208
209**Common Mistakes to Avoid**
210
211- ❌ Starting work without reviewing task details with `get_task`
212- ❌ Not moving task to "In Progress" before starting
213- ❌ Skipping vibe-lint MCP validation (MANDATORY for every file)
214- ❌ Not tracking devInfo (files changed, tests, session ID)
215- ❌ Marking acceptance criteria checked before actually completing them
216- ❌ Moving to "Review" without going through "Testing" first
217- ❌ Not documenting progress in comments
218- ❌ Forgetting to add file references (file.ts:42 format) in final comment
219- ❌ Not running tests before moving to "Review"
220- ❌ Not committing changes incrementally
221- ❌ Moving to "Blocked" without explaining what human intervention is needed
222- ❌ Skipping retryCount increment when moving failed task back to "Todo"
223- ❌ Starting work on a task in "Planning" status (must be promoted to "Todo" via `backlog-grooming` first)
224
225---
226
227**Source:** [`hashgraph-online/awesome-codex-plugins`](https://github.com/hashgraph-online/awesome-codex-plugins) → `plugins/AgiFlow/ai-plugin/skills/run-task/SKILL.md`