一键导入
yak-mapping
Surveying the herd. Use when planning work by approaching goals and discovering blockers — emergent planning through action, not top-down decomposition
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Surveying the herd. Use when planning work by approaching goals and discovering blockers — emergent planning through action, not top-down decomposition
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
The night crew. Unattended overnight session where Yakob works through a queue of well-defined yaks serially — shave, sniff-test, remediate if needed, push a PR — so the operator wakes up to reviewable PRs.
The shaver's field guide. The complete operating guide for shavers in the yakthang environment. Covers task lifecycle (yx show, start, shaver-message, done), message checking (yakob-message), heartbeat (via /loop), and notes for Yakob.
Sorting the herd at the gate. Session start ritual for Yakob. Establishes the time window and WIP limit, surveys the yak map, and helps the operator decide what to tackle this session — before acceleration flow begins.
Closing the barn. End-of-session wrap-up for Yakob. Harvests done yaks into a worklog summary, prunes the map, and reorganizes remaining work for the next session. Can be called at any natural break point — not just end of day.
Architecture Decision Records. Create, manage, and cross-reference ADRs — no external CLI needed.
Does this yak smell right? Use when a shaver reports done and Yakob needs to verify the work matches the brief using a fresh, independent reviewer agent before accepting or pruning the yak.
| name | yak-mapping |
| description | Surveying the herd. Use when planning work by approaching goals and discovering blockers — emergent planning through action, not top-down decomposition |
Yak mapping is emergent planning through action. You discover work structure by approaching goals and finding what blocks you, not by decomposing from the top down.
Core principle: "It is in the doing of the work that we discover the work that we must do." — Woody Zuill
Always start yak mapping by saying:
"I'm using yak-mapping to discover the work structure by approaching the goal. I'll add yaks one at a time and show the map after each addition."
This sets expectations that we're doing emergent discovery, not top-down planning.
Use when:
Don't use when:
Run yx add --help before your first add to confirm current syntax.
Key rules:
yx add my task (NOT yx add my/task)yx add child --under parentyx add parent, then yx add child --under parentyx add worker --under extract,
reference it as worker, not extract workerecho "description" | yx context my taskAfter EVERY yx add, immediately run yx ls to show what changed.
No exceptions:
yx add → yx ls is non-negotiable. This keeps the human in sync with your
thinking.
1. Add ONE yak
2. Show map with `yx ls`
3. Add context to that yak (pipe via stdin)
4. Pick ONE child to explore next
5. Repeat
1. Start with the Goal
yx add deploy to production
yx ls # Always show after adding
2. Approach It (Don't Decompose)
Ask yourself: "If we tried to implement this RIGHT NOW, what would we try first?"
Don't ask: "What are all the components?"
3. Discover ONE Blocker
When approaching reveals "we need X first", add X as a child:
yx add deployment script --under deploy to production
yx ls # Show the updated map
The nesting means: "deploy to production is BLOCKED BY deployment script"
4. Add Context Before Going Deeper
echo "Create a bash script that deploys the app to production.
- Entry point: scripts/deploy.sh
- Must handle rollback on failure
- Uses existing Docker images" | yx context deployment script
5. Approach This Blocker
Now explore this one level deeper:
# Approaching "deployment script" reveals we need Docker config first
yx add docker config --under deployment script
yx ls # Always show after adding
6. Continue ONE Level at a Time
Keep approaching and discovering until you hit a leaf node (can implement without discovering new blockers).
Stop when:
Then explore other branches or spawn workers for ready leaves.
Parent = blocked goal. Children = blockers. Work deepest-first.
When you approach goal B and discover you need A first, B becomes the parent of A. This is an artifact of discovery, not a planning decision.
yx enforces: parent cannot be marked done until children complete.
If approaching reveals 3 things blocking a goal, they ALL become children:
yx add deploy to production
yx ls
yx add deployment script --under deploy to production
yx ls
yx add configure secrets --under deploy to production
yx ls
yx add update docs --under deploy to production
yx ls
Work deepest-first (leaves before parents):
○ deploy to production
├─ ○ deployment script
│ ╰─ ○ docker config ← Start here (leaf)
├─ ○ configure secrets ← Or here (leaf)
╰─ ○ update docs ← Or here (leaf)
Leaf yaks should be completable by a single worker in one session.
Right-sized yaks:
Write contexts assuming a worker will implement — zero shared context.
Workers are spawned in isolated tabs. They only know what's in the yak context.
Include:
echo 'Fix assigned-to path resolution in yak-box spawn.
Source: repos/yakthang/yak-box/cmd/spawn.go around line 270.
The bug: filepath.Join(absYakPath, taskSlug, "assigned-to") uses
the flat task name, but tasks can be nested (e.g.
.yaks/release-yakthang/yak-box/native-spawn-bug/).
Fix: search the .yaks/ tree to find the actual directory matching
the task name, then write assigned-to there.
Definition of Done:
- assigned-to files are written to the correct nested path
- go test ./... passes
- manual test: spawn a worker with --yaks for a nested task,
verify .yaks/<full-path>/assigned-to exists' | yx context fix assigned-to path
Once you've discovered blockers and identified leaf nodes:
Present the map and ask:
Mapping complete! Ready-to-implement leaf yaks:
- [list leaf nodes with their parent context]
Next steps:
1. Spawn workers for independent leaves (parallel)
2. You choose which yaks to start with
3. Review the map first
Which would you like?
When spawning workers for leaves, remember:
--cwd scoped to the right repo--runtime sandbox for interactive Claude Code sessions# WRONG: Planning all components upfront
yx add event logging --under sync
yx add git storage --under sync
yx add replay algorithm --under sync
# You haven't approached anything yet!
# RIGHT: What would we try first?
yx add sync
yx ls
# "If we approached sync, we'd need to write events"
yx add write events --under sync
yx ls
# "If we approached that, we'd need a log command"
yx add implement log --under write events
yx ls
Adding 5 yaks without showing structure between each.
Add one, show map, add context, add next, show map.
Writing detailed implementation plans before discovering blockers.
Goal + done criteria + key decisions. Details emerge when you work on it.
# WRONG: CI is not blocked by local setup
yx add local lint --under ci workflow
# RIGHT: CI workflow is blocked BY local lint setup
yx add local lint --under ci workflow
# (same structure, but the REASONING matters — ask "what blocks this?")
| Action | Command |
|---|---|
| Add goal | yx add my goal |
| Add blocker | yx add blocker --under my goal |
| Show map | yx ls |
| Add context | echo "..." | yx context my task |
| Read context | yx context --show my task |
| Mark done | yx done my task |
| Check syntax | yx add --help |
yx ls between themIf you catch yourself doing these, stop and restart with approach-first.