From one idea to a merged stack.
People keep asking what Monkeypuzzle actually does. So here's the whole loop, one piece at a time, from the first branch to the cleanup after the merge. Scroll, and watch it play out.
Start one small idea.
Every unit of work is a piece: a branch in its own git worktree. Cut one and Monkeypuzzle creates the branch and the worktree, then runs your create hook inside it.
mp create --name auth-schema, or leave the name off and get one generated.on-piece-create.shcan install dependencies or copy your.env.- Your other work never moves: no stashing, no dirty tree.
Build features in layers.
Real features are more than one idea. Stack the next piece on top of
the last with mp stack append: schema, then API, then UI, each a
clean, reviewable layer built on the one below.
mp stack status draws the whole tree, so you always know what sits on what.
Switch without losing your place.
Every piece stays checked out, so moving between them is a cd.
mp switch takes a piece or branch name and prints its worktree;
mp open hands the worktree to your editor or a new terminal.
- Add
eval "$(mp shell-init zsh)"to your shell config and your shell followsmp switch,mp createandmp done. - No wrapper?
cd "$(mp switch auth-api)"works anywhere. - Set
open_commandonce, e.g.code {path}orzed {path}, andmp openuses it. - Live in tmux or herdr? Give each piece a session.
Change one piece, fix the whole tree.
Edit a piece low in the stack and everything above it is now stale.
mp stack sync merges each parent down into its children, in
order, and stops cleanly the moment a conflict needs you.
- It previews the sync first and asks before it changes anything.
- On a conflict, resolve it in the named worktree, commit, and run
mp stack syncagain. - Prefer rebase?
--strategy rebase, thenmp stack continueafter a conflict. mp stack undorestores every branch to the pre-sync snapshot.
One idea per pull request.
Ship the stack. mp pr create pushes the piece and opens a PR
based on the piece below it, so each PR is a single idea and
reviewers never wade through the whole feature at once.
- The base is the piece's parent, picked for you.
--baseoverrides it. --draftopens it as a draft;mp pr readyflips it when it's time for eyes.before-pr-create.shruns first: lint, test, or write the PR body.
Land it, clean up after.
When the bottom piece is approved, mp merge squash-merges it into
main and re-homes the pieces above it onto main. mp done then
removes the finished piece's worktree, and with shell-init your shell lands
back in the main checkout.
- Refuses to merge when main has moved on. Run
mp updatefirst; no surprise overwrites. - Merged on GitHub or GitLab instead?
mp donecleans up the same way.
Cut. Stack. Restack. Submit. Merge.
Each step is one command, and each one runs your hooks.