Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions documents/patterns/yak-shave-delegation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
authors: [ivett_ordog]
---

# 🐃 Yak Shave Delegation

## Problem

Yak shaving breaks flow and context for both you and your primary agent. Environment issues derail focus even though they're often trivial to fix.

## Pattern

When a tangential issue blocks your main work, spawn a separate agent to handle it instead of switching context yourself.

1. Hit an environment/tooling issue (compiler error, missing dependency, config problem)
2. Recognize it's yak shaving - not your core task
3. Spawn a separate agent to handle it (error messages usually contain the fix instructions)
4. Continue your main work with your primary agent
5. Check back when the yak-shave agent signals it's done

This keeps both you and your main agent focused on the core problem while the yak shave gets resolved in parallel.

## Example

Returning to a project after some time, the codebase has moved on. Running the app fails - needs a new Ruby runtime, recompiled libraries, and config changes.

Instead of context-switching to fix these, spawn an agent with the error output. The agent installs Ruby, recompiles dependencies, and updates config while you and your primary agent continue exploring the codebase and planning the next feature.
3 changes: 3 additions & 0 deletions documents/relationships.mmd
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ graph LR
patterns/happy-to-delete <-->|similar| patterns/playgrounds
patterns/approved-fixtures <-->|similar| patterns/check-alignment
patterns/approved-fixtures <-->|similar| patterns/approved-logs
patterns/yak-shave-delegation -->|uses| patterns/background-agent
patterns/yak-shave-delegation -->|uses| patterns/focused-agent
patterns/yak-shave-delegation -->|solves| anti-patterns/distracted-agent

%% Anti-pattern → Obstacle relationships (causes)
anti-patterns/distracted-agent -->|causes| obstacles/limited-focus
Expand Down