スキル一覧に戻る
mnthe

worker-workflow

by mnthe

Hardwork plugin for Claude Code (ultrawork / teamwork)

2🍴 0📅 2026年1月21日
GitHubで見るManusで実行

SKILL.md


name: worker-workflow description: Core task execution workflow for teamwork workers (Phase 1-5). Ensures workers properly claim, execute, and update task status.

Task Execution Workflow

This skill provides the complete workflow for executing teamwork tasks. Follow these phases in order.

Input Format

Your prompt includes:

TEAMWORK_DIR: {path to teamwork directory}
PROJECT: {project name}
SUB_TEAM: {sub-team name}
SCRIPTS_PATH: {path to scripts directory}

Options:
- role_filter: {role} (optional)
- strict_mode: true|false

The value SCRIPTS_PATH: /path/to/scripts in your prompt is text. When writing bash commands:

WRONG (will fail):

bun "$SCRIPTS_PATH/task-list.js"  # Shell cannot expand $SCRIPTS_PATH

CORRECT (substitute the actual value):

bun "/path/to/scripts/task-list.js"  # Use the value from your prompt directly

Always extract the path from your prompt and use it literally in commands.


Phase 1: Find Task

List available tasks (open, unblocked, unclaimed):

bun "$SCRIPTS_PATH/task-list.js" --project {PROJECT} --team {SUB_TEAM} --available --format json

Or filter by your role:

bun "$SCRIPTS_PATH/task-list.js" --project {PROJECT} --team {SUB_TEAM} --available --role {role_filter}

If no task found: Report "No available tasks" and exit.

Phase 2: Claim Task

Atomically claim the task before starting work:

bun "$SCRIPTS_PATH/task-claim.js" --project {PROJECT} --team {SUB_TEAM} --id {TASK_ID} --owner ${CLAUDE_SESSION_ID}

If claim fails (conflict): Another worker took it. Find a different task.

Phase 3: Implement

Execute the task using your specialization:

  1. Read the task description carefully
  2. Use tools (Read, Write, Edit, Bash)
  3. Follow existing patterns in the codebase
  4. Keep changes focused on the task scope

Phase 4: Verify & Collect Evidence

For each deliverable, collect concrete evidence:

Bad EvidenceGood Evidence
"Tests pass""npm test: 15/15 passed, exit code 0"
"API works""curl /api/users: 200 OK, 5 users returned, exit 0"
"File created""Created src/auth.ts (127 lines)"

Exit code requirement: All command evidence MUST include exit code.

Phase 5: Update Task Status (CRITICAL)

This phase is MANDATORY. Never skip it.

On Success

Mark task as resolved with evidence:

bun "$SCRIPTS_PATH/task-update.js" --project {PROJECT} --team {SUB_TEAM} --id {TASK_ID} \
  --status resolved \
  --add-evidence "Created src/models/User.ts (85 lines)" \
  --add-evidence "npm test: 12/12 passed, exit code 0" \
  --owner ${CLAUDE_SESSION_ID}

On Failure

Add failure evidence and release the task for another worker:

# Add evidence of what went wrong
bun "$SCRIPTS_PATH/task-update.js" --project {PROJECT} --team {SUB_TEAM} --id {TASK_ID} \
  --add-evidence "FAILED: npm test exited with code 1 - TypeError in auth.ts:42" \
  --owner ${CLAUDE_SESSION_ID}

# Release task for retry by another worker
bun "$SCRIPTS_PATH/task-update.js" --project {PROJECT} --team {SUB_TEAM} --id {TASK_ID} \
  --release --owner ${CLAUDE_SESSION_ID}

Do NOT mark as resolved if failed - release for retry.


Phase 6: Commit Changes

After task is marked resolved, commit ONLY the files you modified:

⚠️ CRITICAL: Selective File Staging

# ❌ FORBIDDEN - NEVER use these:
git add -A        # Stages ALL files
git add .         # Stages ALL files
git add --all     # Stages ALL files
git add *         # Glob expansion - dangerous

# ✅ REQUIRED - Only add files YOU modified during this task:
git add path/to/file1.ts path/to/file2.ts && git commit -m "$(cat <<'EOF'
<type>(<scope>): <short description>

[teamwork] Project: {PROJECT} | Team: {SUB_TEAM} | Task: {TASK_ID}

{TASK_TITLE}

Evidence:
- {evidence 1}
- {evidence 2}

Files changed:
- path/to/file1.ts
- path/to/file2.ts
EOF
)"

Why selective staging?

  • Other workers may have uncommitted changes in the repo
  • Only YOUR task changes should be in this commit
  • Enables clean rollback per task if needed

Angular Commit Message Types:

TypeWhen to Use
featNew feature or functionality
fixBug fix
refactorCode refactoring without behavior change
testAdding or modifying tests
docsDocumentation changes
styleCode style changes (formatting, etc.)
choreBuild, config, or maintenance tasks

Skip commit if:

  • No files changed (git status --porcelain is empty)
  • Task not resolved (failed/released)

Summary Checklist

Before ending your work, verify:

  • Phase 1: Found an available task
  • Phase 2: Successfully claimed it
  • Phase 3: Implemented the solution
  • Phase 4: Collected concrete evidence with exit codes
  • Phase 5: Called task-update.js with --status resolved OR --release
  • Phase 6: Committed ONLY your modified files (if task resolved)

If you skip Phase 5, the task will remain stuck in in_progress status forever. If you skip Phase 6, your changes may be lost or mixed with other workers' changes.

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です