You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Request]: Per-method function bindings and auto-declared path parameters in the long form #255
Tried: map GET/POST/PUT/PATCH/DELETE on /api/todos/{id} to distinct logic. Expected: per-method handlers, and path parameters auto-declared regardless of form. Got: one function per route; both runs branch on request.method inside the function and split by path with named exports. Using export: forces the long form, where the path id parameter and args must be re-declared by hand (the short form auto-binds them). Nothing in the docs states this trade-off. Suggestion:methods: {GET: {function: ...}, POST: {...}}, and auto-declare/auto-bind path parameters in the long form (or document the rule next to export:). Evidence: an A/B benchmark on URLCode 0.4.1 with Sonnet 5 agents building the same Todo app from the repo docs. Run 1 (benchmark Agent B, no authoring skill, no browser check) and run 2 (session "Todo application with URLCode", authoring skill loaded, tightened prompt) hit this independently. n=1 each; single small app, so treat frequency as anecdotal. The Agent A control (no URLCode) needed 2 shell calls and 0 dependencies for the same app.
Auto-adding args to the long form would change hashes, audit output and revision-pinned grants for existing projects, and an omitted args may be deliberate.
If the friction persists, add an opt-in (function: {source, export, autoArgs: true}) or accept export: in the short form (function: {source: x.mjs, export: get}), so auto-binding is kept.
methods: {GET: {function}, POST: {function}} is a separate decision; revisit it with evidence beyond the one Todo app (n=1 per run).
Long-form binding rule documented in #275. Decision recorded: keep the long form explicit (no auto-added args/parameters). A per-method methods: map is not planned; reopen if benchmark evidence shows repeated friction.
Activity
Document long-form function binding rule and record per-method decisi…
Document long-form function binding rule and record per-method decisi…
jimhoyd commentedon Sep 20, 2026
Decision: keep the long form explicit and defer per-method bindings.
{param}path parameters andargs) is now documented in the specification (Document long-form function binding; record per-method bindings decision (refs #255) #275).argsto the long form would change hashes, audit output and revision-pinned grants for existing projects, and an omittedargsmay be deliberate.function: {source, export, autoArgs: true}) or acceptexport:in the short form (function: {source: x.mjs, export: get}), so auto-binding is kept.methods: {GET: {function}, POST: {function}}is a separate decision; revisit it with evidence beyond the one Todo app (n=1 per run).jimhoyd commentedon Sep 20, 2026
Long-form binding rule documented in #275. Decision recorded: keep the long form explicit (no auto-added args/parameters). A per-method
methods:map is not planned; reopen if benchmark evidence shows repeated friction.Record decisions for eight benchmark-driven authoring requests (#297)