Friction (dogfooding, hourly loop)
While implementing+using rivet modify --where '<s-expr>' (#380) I reached for the obvious-looking filter (status "draft") and got:
error: invalid --where filter: offset 0: unknown form 'status'
note: unknown head symbol; see docs/getting-started.md for the supported forms
(!=/</<=/=/>/>=/and/contains/count/excludes/exists/…/matches/not/or/…)
The error is honest and lists every head form — but for the single most common query an agent writes ("field X equals value Y") it doesn't show the shape. The correct form is (= status "draft") (head is =, not the field name). I only found that by grepping rivet-cli/tests/sexpr_filter_integration.rs.
What finally helped
grep -rE '\(= [^)]+\)' rivet-cli/tests/sexpr_filter_integration.rs → saw (= type "requirement") / (= status "passed") and corrected to (= status "draft").
Suggested fix (small, agent-UX)
- Add one concrete example to the parse error itself, e.g.:
note: e.g. (= status "draft"), (and (= type "requirement") (has-tag "safety"))
- Mirror that example in the
--help for the commands that take an s-expr (query, list --filter, export --filter, and now modify --where). The modify --where after_help already includes (and (type "requirement") (status "draft")) — note even that example I first wrote used the wrong (type …)/(status …) shorthand; canonicalizing on (= field "value") everywhere would prevent the same mistake.
This is pure discoverability — the engine itself is fine. It just costs every first-time (human or agent) author one failed round-trip + a grep through tests. Will track the product side as a REQ.
(Filed while landing #380, which adds modify --where.)
Friction (dogfooding, hourly loop)
While implementing+using
rivet modify --where '<s-expr>'(#380) I reached for the obvious-looking filter(status "draft")and got:The error is honest and lists every head form — but for the single most common query an agent writes ("field X equals value Y") it doesn't show the shape. The correct form is
(= status "draft")(head is=, not the field name). I only found that by greppingrivet-cli/tests/sexpr_filter_integration.rs.What finally helped
grep -rE '\(= [^)]+\)' rivet-cli/tests/sexpr_filter_integration.rs→ saw(= type "requirement")/(= status "passed")and corrected to(= status "draft").Suggested fix (small, agent-UX)
note: e.g. (= status "draft"), (and (= type "requirement") (has-tag "safety"))--helpfor the commands that take an s-expr (query,list --filter,export --filter, and nowmodify --where). Themodify --whereafter_help already includes(and (type "requirement") (status "draft"))— note even that example I first wrote used the wrong(type …)/(status …)shorthand; canonicalizing on(= field "value")everywhere would prevent the same mistake.This is pure discoverability — the engine itself is fine. It just costs every first-time (human or agent) author one failed round-trip + a grep through tests. Will track the product side as a REQ.
(Filed while landing #380, which adds
modify --where.)