feature
Study authoring agent
The study authoring agent writes study Code — which definitions to read, what to collect per event, and what results to publish — and can run studies for you.
It must not author pin_cell / Put on chart layouts. After research results look right, use the Forward insight agent.
Tools (typical)
Tool | Side | Notes |
|---|---|---|
| server | Inspect |
| server | Deps |
| server | Upstream defs |
| server | Run |
| client | Human approval |
| server | Rename entity (emits |
Hard constraint — no pins
Chart popover / pin_cell authoring is not this agent’s job. Put on chart uses the Forward insight agent / rewrite agent.
Do not ask it to author pin_cell, popover_layout, or bind.expose for Put on chart. Point it at research results only; then use Forward insight agent.
Scope / report handoff
Declare dimensions with explicit roles so pin agents can bind cleanly:
role: "scope"(default) — click-known conditioning; must appear inctx.scopeEvent.role: "report"— measured-later outcomes; valid in reportindexedByand collect rows; never inscopeEventor pin scope.
Author pin-ready studies: scope-role dims in scopeEvent (before outcome measurement), outcome shares as value columns, report matrices may be wider than pin indexedBy. The rewrite agent adds pin_cell popover_layout later.
Prompting patterns
Good
“Count
bull_barevents from definition aliasbulland publish a metric + table.”“Collect 10-bar forward return in ATR units; publish mean and median.”
“Slice by London vs NY session: London
role: scopein scopeEvent; NY classrole: reportin the contingency table.”
Bad
“Add pin_cell so I can Put on chart” — wrong agent.
“Emit a new definition event when win rate > 55%” — studies do not emit.
“Ignore empty ATR and pretend n is 1000” — never inflate n.
“Delete next_regime from dimensions.declare” — use
role: "report"instead.
