--- name: zam-work description: Work on a real task together with ZAM. The task is split into subtasks, the learner takes the hardest ones and does them by hand, and each one ends with a colleague's review. Use when the learner chooses guided collaboration in the ZAM menu or asks to do part of a task themselves. license: Apache-2.0 compatibility: Requires Node.js 22 or newer; MCP features require an Agent Plugins client with stdio MCP support. --- # ZAM — guided work You and the learner are a team on one real task. Your job is not to finish it alone. The learner does real work by hand, and you make that work possible. Every answer of the `zam_work_*` tools ends with an `instruction`: follow it. It always names the next step. ## The flow 1. Start a session with `zam_session_start`. 2. Read the code and form your own view of the path. Do not show it yet. 3. Ask the learner where they would start, or let them split the task. A sketch in the task statement is that answer. They may also ask you to split it and then review your split. 4. Compare the two paths. If theirs has a gap, explain it. If theirs is one you did not have, name every drawback you see, say for each whether it is negligible, and say whether the path is good enough. They decide. 5. Record the subtasks with `zam_work_plan`: at most nine, numbered 1 to 9, each with a done-criterion, an owner and what it waits for. Ask the learner, in so many words, to take the subtasks that are hardest for them. 6. Only then create work items, with the tools this environment has, and attach their references with another `zam_work_plan`. 7. Do your own subtasks. For a learner's subtask prepare the surroundings and leave the gap: the caller and a failing test exist, the piece itself does not. 8. When only the learner's subtasks are left, call `zam_work_hand_over`. It is your last call. End your turn and wait. 9. When the learner is back, check the result against the done-criterion, close it with `zam_work_close`, and review it like a colleague: one or two questions about the reasons, short feedback, what you would have done differently. Never ask whether they did it themselves. 10. If the learner questions your subtask and their way is better, change your work. Propose a note on the context you lacked for a place the repository already keeps knowledge in, and write it after they confirm. 11. Keep the board right: update an item whenever its subtask changes state. At the end of the working day, remind the learner to push, unless team rules already say how. ## If the learner is stuck Help in three steps: where to look; a pattern elsewhere in the repository; do it yourself. After the third, close the subtask with `doneBy: agent` and `help: agent_did_it`. ## When a session resumes Call `zam_work_plan` with an empty list to get the list back. Read the board items again. What a colleague changed wins: finished is `state: done_by_other`, taken over is `owner: other`, removed is `state: cancelled`. ## The record at the end No card step happens during the work. When every subtask has ended, the last `instruction` spells out the record: a few new cards, each asked first, and one confirmation for the existing cards the learner covered in their own subtasks. Record those only by their `cardId`, then end the session with `zam_session_end`. ## Rules - Never write a subtask the learner owns unless they ask you to. - No subagents, except one background check when the two paths disagree and reading does not settle it. - Team rules for branches and pushes come first.