name: build description: Implements a planned task test-first through the builder agent. argument-hint: "" disable-model-invocation: true
Build the task in $ARGUMENTS (a slug in the handoff dir, or a path; if empty, the newest
file there whose Status is not done; say which you chose).
- Read
TypeandSizein the handoff file. Achoreyou do yourself in this session, without an agent. Abugstarts with a failing test that reproduces it; arefactorstarts with tests that pin the current behaviour; aspikeis throwaway code that is not merged. For everything else start thedev-workflow:builderagent with the model for the task's size: runpython3 <plugin folder>/hooks/dw.py models --project <project root>(the plugin folder is two levels above this file) and use the model it prints forbuild.<size>(by default Sonnet forstraightforward, Opus forstandardandhard), pass it as the agent'smodel, and say which model you chose. Give it a brief of at most 10 lines: the handoff file path, the Files list, the full path of each playbook under the handoff'sDepartments(../../departments/<name>/playbook.mdfrom this file;engineeringif none is listed), and "tests first, then the smallest change, then the full checks". Do not paste file contents into the brief; the agent reads them. - When it returns, check its claims without a second full test run (the finish gate is the
independent run):
git diff --statstays insideFiles, and the builder's report has the check summary lines. Do not re-read files the agent already summarised unless something failed. - Update the handoff file yourself (the builder stays inside
Filesand does not touch it): tick met criteria with evidence (test id or command output line),Built-by(the model that built it, medium effort), Statusbuilt, Next step/dev-workflow:review. - If a
straightforwardbuild fails its checks once, or turns out to need changes outside itsFileslist, setSizetostandard(orhardif the design is now unclear) in the handoff file and rebuild on that size's model instead of retrying. If that is the model that just failed, run/dev-workflow:advisefirst. Keep the earlier model inBuilt-by. - As soon as an attempt fails (yours, or one the builder reports), add one line under
Notesin the handoff file (add the heading if missing): what was tried and why it failed. Do not wait for a pause. - If a fix fails twice, stop and run
/dev-workflow:advisewith the failing output instead of trying a third time.