Record the agreed usage summary fields

This commit is contained in:
2026-11-22 19:34:45 +00:00
parent d8f2f67671
commit 78e9c75dfe

View File

@@ -1,7 +1,7 @@
# Automatic PromptKit Usage Reporting # Automatic PromptKit Usage Reporting
Status: adoption goal agreed; upstream v0.25.0 reviewed and available; 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 ## Goal
@@ -206,10 +206,9 @@ including the new vLLM adapter, through the current smoke command.
## Decisions ## Decisions
OD-1 through OD-5 are selected below. Recommendations under OD-6 OD-1 through OD-6 are selected below. Prepare a concrete implementation plan
remain proposals, not selected contracts. Resolve the remaining choices before against these decisions so implementation can proceed through that plan without
writing a concrete implementation plan; implementation should then be able to intermediate design gates.
proceed through that plan without intermediate design gates.
### OD-1: Flag name and selection — selected ### 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 an empty group uses the same standard zero summary. Active quiet mode suppresses
the summary as selected under OD-3. 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, Present aggregate prompt, completion, reasoning, total, cached, and cache-write
completion, reasoning, total, cached, and cache-write tokens; available USD cost token counts. Present reasoning and cache figures as details, not additions to
with its source; and clear availability/completeness and terminal-coverage total tokens. Clearly identify unknown values, incomplete subtotals, and
indicators. Include cost automatically when the native summary provides it, incomplete terminal coverage; preserve known zeros.
without a separate accounting opt-in, including explicit configured-zero evidence.
Recommend exposing the native `Usage.CacheHitRatio()` when available, using For execution counts, present the total number of prompts, using the native
aggregate counts rather than averaging per-run ratios. Decide its text format group's observed run count. Show repair calls as a detail beneath that total only
and whether it also appears in smoke reports; do not derive it independently. when nonzero. Do not separately display attempt or transient-retry counts, or
Reasoning and cache values must be presented as details, not added to total tokens. count those attempts as additional prompts.
Decide whether run, attempt, retry, and repair counts belong in the concise
summary. Recommend deferring per-model breakdowns, event traces, and persistent Include available USD cost automatically with its native source, including
history; the native group summary is sufficient for the initial invocation-total configured-zero evidence, without a separate accounting opt-in. Display cost
task. These remain CommandKit presentation decisions despite the released upstream with six significant digits; preserve the unrounded upstream value during
availability of the evidence. 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 ## Delivery Sequence
1. Resolve OD-6 against the reviewed PromptKit v0.25.0 API. Upstream 1. Prepare the implementation plan from the selected OD-1 through OD-6 decisions
implementation and release are complete; no upstream feature work remains a and reviewed PromptKit v0.25.0 API. Upstream implementation and release are
prerequisite. complete; no upstream feature work remains a prerequisite.
2. Implement and verify the neutral core installation, flag, context, and 2. Implement and verify the neutral core installation, flag, context, and
finalization support. Preserve existing reporting and assembly contracts. finalization support. Preserve existing reporting and assembly contracts.
3. Adopt PromptKit v0.25.0 in ckprompt and attach observation and summary 3. Adopt PromptKit v0.25.0 in ckprompt and attach observation and summary