Run work

From hashgraph-online/awesome-codex-plugins · View interactive version

Run work is an AI agent skill from the GitHub repository hashgraph-online/awesome-codex-plugins. 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.

How to use this skill

Skill file

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:

Examples:


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.


AgiFlow Project Management Guidelines

Follow the shared AgiFlow project-management guidelines in CODE0 — 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.

1. Work Unit Selection & Loading

If work unit slug/id NOT provided:

  1. Use list_work_units MCP tool to show available work units:
  1. Ask user to select which work unit to work on.
  2. Once user selects, proceed with the selected work unit slug/id.

If work unit slug/id IS provided: 4. Use get_work_unit MCP tool with the provided slug/id to retrieve:

  1. Review the work unit and all its tasks to understand:

5b. PLANNING STATUS GUARD (MANDATORY):

2. Start Work Unit Execution

  1. If work unit status is "planning":
  1. Create a TODO list of all tasks in execution order (use TodoWrite tool).
  2. Document execution plan in work unit via update_work_unit devInfo:

```typescript

devInfo: {

executionPlan: "Backend API → Frontend UI → Tests → Documentation",

sessionId: "<current-session-id>",

startedAt: "<timestamp>"

}

```

3. Execute Tasks Sequentially

  1. For each task in the work unit (in dependency order from the tasks array):

```typescript

devInfo: {

filesChanged: ["path/to/file.ts:42"],

testResults: { passed: true, coverage: "85%" },

notes: "Implementation notes here"

}

```

Testing phase for each task:

  1. Between tasks:

4. Work Unit Progress Tracking

  1. The work unit tasks array automatically updates as tasks are completed.
  1. Update work unit devInfo as you progress via update_work_unit:

```typescript

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

}

```

5. Work Unit Completion

  1. When ALL tasks in work unit are in "Review" or "Done":
  1. Draft a PR description for the work unit (DO NOT create the PR yet - just draft the text):
  1. Use update_work_unit to set status to "completed" and save draft PR text and commit message:

```typescript

{

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.

  1. Create final summary comment documenting:

6. Handle Blockers or Scope Changes

  1. If blocked on a task:
  1. If scope changes during execution:

Common Mistakes to Avoid

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.