Can an SDODS agent commit the feature it wrote, or does a person always have to accept?
Asked 12,480 views3 answers
31votes
We want to run sdods agent generate nightly against the new endpoints and have the features land on a branch by morning. Right now every run leaves something in proposals/ that somebody has to pick up.
Is there an --apply or an auto-accept mode? Or is the proposal step deliberate?
Deliberate, and it is the one thing about the agent roles that will not be made optional. Agents never write to the working tree. Every role output is a directory under proposals/<id>/ with a manifest, the files and a diff, and the only thing that applies it is a person running:
bash
sdods proposals accept <id> --branch sdods/<id>
accept copies the files in, optionally onto a new git branch, and runs sdods lint unless you pass --no-lint. So the branch you wanted does exist — it is one command, run by a human, after reading the diff.
The reason is not distrust of a model. It is that a proposal that is wrong costs you a review, and a merged feature that is wrong costs you a week of a suite everyone stops believing.
Practical version of the nightly job: let the agent run unattended, and have the job finish at proposals list.
bash
sdods agent generate -p demo-shop --goal "the new /invoices endpoints"
sdods proposals list --status pending
Then the morning ritual is sdods proposals show <id> and one accept per proposal you like. That is about two minutes per proposal, which is roughly what a code review of the same diff would cost you anyway.
We tried to get clever about this and wrapped accept in CI so the branch appeared automatically. It worked, and it was a mistake — nobody read the diffs any more, they read the PR, and a PR full of generated Gherkin gets rubber-stamped.
Went back to accepting by hand. Reject rate is about one in four, which is exactly the number that tells you the review is doing something.