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
Part of the Agentic UX spec series. See sibling issues for related buckets.
Motivation
The single biggest token cost in agentic workflows is the round-trip chain: list → filter → get → summarize. Every step round-trips through the agent's context window. The fix is to give agents purpose-built endpoints that answer the question directly, and to embed common aggregates in list responses so they don't need a second call to know "how many" or "what's worst."
This is the single highest-impact UX shift in this series, but it depends on #9 (output format) and #12 (error contract) being settled first.
Spec
Inline aggregates on list operations
Every list returns a top-level envelope with pre-computed aggregates:
Motivation
The single biggest token cost in agentic workflows is the round-trip chain:
list → filter → get → summarize. Every step round-trips through the agent's context window. The fix is to give agents purpose-built endpoints that answer the question directly, and to embed common aggregates in list responses so they don't need a second call to know "how many" or "what's worst."This is the single highest-impact UX shift in this series, but it depends on #9 (output format) and #12 (error contract) being settled first.
Spec
Inline aggregates on list operations
Every
listreturns a top-level envelope with pre-computed aggregates:{ "count": 142, "truncated": false, "aggregates": { "by_severity": {...}, "total_cost_usd": 12345.67 }, "results": [...] }This kills the "call list, then call count, then call sum" chain.
Question-shaped subcommands
Concrete examples to seed the conversation — exact verbs TBD with product:
dci anomalies recent— anomalies since last invocation/window, rankeddci anomalies explain <id>— one call returns context + likely cause + linked resourcesdci budgets at-risk— budgets projected to breach in the next N daysdci costs explain --service X --window 7d— what changed and whydci ask "..."— natural-language frontend that dispatches to the right verb (stretch goal; depends on DCI API capability)Each verb collapses what would today be 3–5 separate calls into one.
Principles
--explain/--verboseto opt into detailsReferences
Open questions
--aggregate by:severity) or always-on?Dependencies
Acceptance criteria
count,truncated, and at least one domain-relevantaggregatesblockanomalies recent,budgets at-risk,costs explain)