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]: Reusable request/response blocks across routes (YAML anchors are rejected) #257
Tried: share one request.body block, sandboxReason and response.headers across three routes. Expected: reuse. Got: YAML anchors are rejected (documented, and run 2 tripped on it anyway); the blocks are copied verbatim on each route (65 YAML lines in run 1, largely repetition). Suggestion: a profiles-style reuse mechanism for request, response.headers and route defaults, consistent with existing policy reuse. 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.
Shape (from the existing policies.profile pattern): an optional top-level map of named request and response.headers blocks that a route selects by name (use: <name>). YAML anchors, aliases and merge keys stay rejected.
To settle in the design before building:
Merge rule: a route's own key wins as a whole block, with no deep merge.
Resolution happens at load time, so the route hash, audit and routes output show the resolved result and a reviewer can see what actually applies.
Behavior for an unknown name (fail validation) and for a block that touches reserved headers.
Whether sandboxReason and other route defaults are included, or only request and response.headers first.
Update the specification, schema (npm run docs:reference) and an executable example in the same PR. Note for the record: the evidence is n=1 per run on one small Todo app, and the project's evidence test would normally wait for more repetition; this is an explicit maintainer decision to proceed.
Implemented in #301: top-level shared blocks (request and response.headers) selected with use: , resolved at load time; anchors stay rejected. sandboxReason and other route defaults are deliberately left out of the first version.
Activity
Record recommendation for reusable request/response blocks (#257)
Record recommendation for reusable request/response blocks (#257) (#274)
jimhoyd commentedon Sep 20, 2026
Decision: build reusable blocks.
Shape (from the existing
policies.profilepattern): an optional top-level map of namedrequestandresponse.headersblocks that a route selects by name (use: <name>). YAML anchors, aliases and merge keys stay rejected.To settle in the design before building:
auditandroutesoutput show the resolved result and a reviewer can see what actually applies.sandboxReasonand other route defaults are included, or onlyrequestandresponse.headersfirst.Update the specification, schema (
npm run docs:reference) and an executable example in the same PR. Note for the record: the evidence is n=1 per run on one small Todo app, and the project's evidence test would normally wait for more repetition; this is an explicit maintainer decision to proceed.jimhoyd commentedon Sep 20, 2026
Progress: implementation started by an agent against the maintainer decision on this issue; a PR will be linked here when it opens.
Record decisions for eight benchmark-driven authoring requests (#297)
jimhoyd commentedon Sep 20, 2026
Progress: PR #301 opened: top-level
sharedblocks selected withuse: <name>forrequestandresponse.headers.Add shared request and response.headers blocks selected with use (#257)
Add shared request and response.headers blocks selected with use (#257)…
jimhoyd commentedon Sep 20, 2026
Implemented in #301: top-level shared blocks (request and response.headers) selected with use: , resolved at load time; anchors stay rejected. sandboxReason and other route defaults are deliberately left out of the first version.