| name | mycelium-work |
| description | Executes implementation tasks following strict TDD methodology with evidence-based verification. Use when user says "implement this", "work on [task]", "execute the plan", "build task [id]", or "run all tasks". Enforces RED→GREEN→REFACTOR cycle, shows actual test output, supports parallel execution via worktrees. |
| license | MIT |
| version | 0.9.0 |
| argument-hint | [task_id or 'all'] |
| allowed-tools | ["Skill","Read","Write","Edit","Bash","Glob","Grep","Task"] |
| metadata | {"author":"Jason Hsieh","category":"implementation","tags":["tdd","evidence-based","parallel-execution","git-worktrees"],"documentation":"https://github.com/jason-hchsieh/mycelium"} |
Workflow Work
Execute implementation tasks following strict TDD methodology.
Your Task
-
Update session state - Write invocation_mode: "single" to .mycelium/state.json
-
Load execution skills:
- Use Skill tool to load
tdd (mandatory)
- Use Skill tool to load
verification (mandatory)
-
Parse arguments:
task_id: Specific task (e.g., "1.1")
all: Execute all unblocked tasks (parallel)
- Default: Next available task
-
Load active plan:
- Read
current_track.plan_file from state.json to locate the active plan
- Fall back to latest plan in
.mycelium/plans/ if current_track is null (backward compat)
- Read
state.json for progress
-
Execute tasks - Follow TDD and verification skills which handle:
- TDD cycle: RED → GREEN → REFACTOR (mandatory)
- Evidence-based verification: Show actual test output
- Incremental commits: After each task completion
- Plan marker updates:
[ ] → [~] → [x]
- Parallel execution: Worktrees for independent tasks (automatic)
- Solution capture: For novel problems (as needed)
-
After completion: Suggest /mycelium-review for code review
Skills Used
- tdd: Iron Law TDD - tests first, always (MANDATORY)
- verification: Evidence-based validation (MANDATORY)
- mycelium-capture: Capture learnings from novel problems (as needed)
Quick Example
/mycelium-work
/mycelium-work 1.1
/mycelium-work all
Critical Rules
- NO CODE WITHOUT TESTS FIRST - TDD is non-negotiable
- SHOW EVIDENCE - All verification requires actual test output
- UPDATE MARKERS - Plans updated in real-time during execution
- SAVE STATE - Frequent saves enable resume on interruption
Parallel Execution
When executing "all" tasks:
- Independent tasks (blockedBy: []) run in parallel
- Each task gets its own worktree
- Automatic merge on completion
- Full test suite runs after merge
References
Examples
Example 1: Execute Specific Task
Command: /mycelium-work 1.1
Workflow:
- Marks task 1.1 as
[~] in progress
- Loads TDD skill - enforces test-first
- Executes: Write test → Verify RED → Implement → Verify GREEN
- Commits with evidence
- Marks task as
[x] complete
Result: Task 1.1 done with passing tests
Example 2: Execute All Tasks
Command: /mycelium-work all
Workflow:
- Identifies unblocked tasks (blockedBy: [])
- Creates worktrees for parallel execution
- Spawns agents per task
- Each agent follows TDD cycle
- Merges on completion, runs full test suite
Result: All independent tasks complete in parallel
Troubleshooting
Error: "Baseline tests failing"
Cause: Existing tests broken before new work
Solution: Fix existing tests first, then proceed with new work
Error: "Tests still failing after 3 attempts"
Cause: Implementation approach or test is incorrect
Solution: Use /recovery skill for systematic debugging
Issue: "Cannot create worktree"
Cause: Branch already has a worktree or git repository issue
Solution: Check git worktree list, remove stale worktrees with git worktree remove