From 78e9c75dfeefb13eb85e6c574289c099521493f1 Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Sun, 22 Nov 2026 19:34:45 +0000 Subject: [PATCH] Record the agreed usage summary fields --- docs/roadmap/automatic-usage-reporting.md | 53 +++++++++++++---------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/docs/roadmap/automatic-usage-reporting.md b/docs/roadmap/automatic-usage-reporting.md index 971d406..7cd29d0 100644 --- a/docs/roadmap/automatic-usage-reporting.md +++ b/docs/roadmap/automatic-usage-reporting.md @@ -1,7 +1,7 @@ # Automatic PromptKit Usage Reporting Status: adoption goal agreed; upstream v0.25.0 reviewed and available; -OD-1 through OD-5 selected; OD-6 open; implementation not started. +OD-1 through OD-6 selected; implementation not started. ## Goal @@ -206,10 +206,9 @@ including the new vLLM adapter, through the current smoke command. ## Decisions -OD-1 through OD-5 are selected below. Recommendations under OD-6 -remain proposals, not selected contracts. Resolve the remaining choices before -writing a concrete implementation plan; implementation should then be able to -proceed through that plan without intermediate design gates. +OD-1 through OD-6 are selected below. Prepare a concrete implementation plan +against these decisions so implementation can proceed through that plan without +intermediate design gates. ### OD-1: Flag name and selection — selected @@ -288,29 +287,37 @@ After returned errors or cancellation, report the native group's observed data; an empty group uses the same standard zero summary. Active quiet mode suppresses the summary as selected under OD-3. -### OD-6: Initial summary detail +### OD-6: Initial summary detail — selected -Choose the initial report fields and text precision. Recommend aggregate prompt, -completion, reasoning, total, cached, and cache-write tokens; available USD cost -with its source; and clear availability/completeness and terminal-coverage -indicators. Include cost automatically when the native summary provides it, -without a separate accounting opt-in, including explicit configured-zero evidence. +Present aggregate prompt, completion, reasoning, total, cached, and cache-write +token counts. Present reasoning and cache figures as details, not additions to +total tokens. Clearly identify unknown values, incomplete subtotals, and +incomplete terminal coverage; preserve known zeros. -Recommend exposing the native `Usage.CacheHitRatio()` when available, using -aggregate counts rather than averaging per-run ratios. Decide its text format -and whether it also appears in smoke reports; do not derive it independently. -Reasoning and cache values must be presented as details, not added to total tokens. -Decide whether run, attempt, retry, and repair counts belong in the concise -summary. Recommend deferring per-model breakdowns, event traces, and persistent -history; the native group summary is sufficient for the initial invocation-total -task. These remain CommandKit presentation decisions despite the released upstream -availability of the evidence. +For execution counts, present the total number of prompts, using the native +group's observed run count. Show repair calls as a detail beneath that total only +when nonzero. Do not separately display attempt or transient-retry counts, or +count those attempts as additional prompts. + +Include available USD cost automatically with its native source, including +configured-zero evidence, without a separate accounting opt-in. Display cost +with six significant digits; preserve the unrounded upstream value during +adaptation. + +Use native `Usage.CacheHitRatio()` when available, displaying it as a percentage +with one decimal place in both invocation summaries and smoke reports. Use the +native aggregate helper rather than averaging per-run ratios or independently +deriving the value. + +Defer per-model breakdowns, event traces, and persistent history. The native +group summary supplies the initial invocation totals; PromptKit retains +ownership of accounting and interpretation. ## Delivery Sequence -1. Resolve OD-6 against the reviewed PromptKit v0.25.0 API. Upstream - implementation and release are complete; no upstream feature work remains a - prerequisite. +1. Prepare the implementation plan from the selected OD-1 through OD-6 decisions + and reviewed PromptKit v0.25.0 API. Upstream implementation and release are + complete; no upstream feature work remains a prerequisite. 2. Implement and verify the neutral core installation, flag, context, and finalization support. Preserve existing reporting and assembly contracts. 3. Adopt PromptKit v0.25.0 in ckprompt and attach observation and summary