diff --git a/docs/roadmap/library-upgrades.md b/docs/roadmap/library-upgrades.md index 6c395d4..77dccb0 100644 --- a/docs/roadmap/library-upgrades.md +++ b/docs/roadmap/library-upgrades.md @@ -243,15 +243,35 @@ from known zero and an incomplete subtotal. PromptKit owns attempt aggregation, reasoning-token interpretation, cache-hit ratios, cost sources, and terminal coverage. Costs are observations, not a billing guarantee or budget control. +### Debug execution data and format compatibility + +**Agreed decision:** Use an Audita-owned diagnostic envelope containing native +PromptKit execution facts. Audita supplies stage, module, role, logical-call, +and relevant correction or validation-batch attribution. Place native evidence +in a clearly named nested field, using PromptKit's public types wherever +practical. Remove redundant local metric structures and mappings; concentrate +any necessary serialization adaptation at the diagnostic-output boundary. +Native execution types belong in the integration and diagnostic machinery; +modules and validators continue using their application contracts. + Carry `MessageContentHash` into prepared debug metadata where useful, and retain -reasoning tokens, native cost facts, and cache-hit information in optional debug -evidence. Whether to use native facts within an Audita envelope or extend local -projections is [open decision 1](#1-debug-execution-data-and-format-compatibility). -Preserve their availability/completeness semantics in both per-call and -aggregate paths. Avoid recomputing upstream -metrics or summing overlapping attempt, terminal, and group totals. These facts -belong in optional diagnostics; ordinary errors/recoveries documents continue -to describe processing outcomes. +reasoning tokens, native cost facts, and cache-hit information with their native +availability/completeness semantics. Audita may select execution membership for +a stage or logical call; PromptKit owns aggregation. Avoid recomputing metrics +or summing overlapping attempt, terminal, and group totals. These facts belong +in optional diagnostics; ordinary errors/recoveries documents continue to +describe processing outcomes. + +Accept a deliberate change to the debug artifact format. Native evidence may +evolve with the imported PromptKit version; keep one serializer for the selected +format rather than maintaining an old-format compatibility path. Assess existing +published compatibility commitments and affected consumers, document this +transition and any required script updates, and choose the release version +accordingly. Retaining the current debug field layout is not a requirement. + +Tests should protect correct attribution, inclusion of native evidence, and any +necessary serialization conversion. Avoid snapshots that freeze the complete +upstream execution structure or repeat PromptKit's accounting checks. ## CommandKit: Adopt Native Invocation Reporting @@ -352,8 +372,9 @@ The implementation should cover the following outcomes: evidence. Preserve cancellation causes, recoverable timeouts, and joined work. - Remove superseded source assembly, filesystem-context reconstruction, YAML encode/decode round trips, and redundant accounting projections as their - replacements land, subject to the debug-data decision. Remove or consolidate - tests that only protect those retired mechanisms; retain behavioral coverage + replacements land. Adopt the agreed diagnostic envelope and native evidence + representation. Remove or consolidate tests that only protect those retired + mechanisms; retain behavioral coverage for the application contracts they served. Cleanup is a completion outcome of this upgrade. - Update canonical configuration, CLI, operations, LLM integration, and internal @@ -396,8 +417,9 @@ adoption; additional custom inspection scopes remain an optional future choice. Compatibility is a consideration, not an absolute constraint on the target design. Retain wrapperless companion inputs through native mounting, but avoid compatibility branches whose only purpose is preserving incidental inspection -formatting, debug representations, or old loading mechanisms. Debug format and -failure-classification changes remain subject to the open decisions below. +formatting, debug representations, or old loading mechanisms. The agreed debug +format change follows the compatibility assessment described above; +failure-classification changes remain subject to open decision 2 below. Choose the desired application contract first, then assess migration and release impact; a smaller release number is not a reason to retain avoidable complexity. @@ -415,24 +437,6 @@ adoption with the added CLI capability is suitable for a minor release. The following recommendations remain pending discussion; they are not approved implementation choices. -### 1. Debug execution data and format compatibility - -Should optional debug artifacts retain Audita's existing usage projections or -carry native PromptKit execution facts within an Audita-owned envelope? - -**Recommendation:** Keep Audita's stage, role, logical-call, and correction -attribution in the envelope, and use native execution facts wherever practical. -Concentrate any necessary serialization adaptation at one boundary. This reduces -duplicated metric structures and repeated changes when PromptKit adds evidence. -Accept a deliberate debug-format change if it materially simplifies the result; -assess affected consumers and document the migration before implementation. - -**Alternative:** Extend the existing projections and preserve their field layout. -This minimizes disruption to diagnostic consumers and insulates them from native -type changes. It also leaves Audita maintaining parallel representations and -mapping new upstream fields. Determine whether actual compatibility needs justify -that continuing cost. - ### 2. Runtime classification of bundled asset failures Should Audita retain the embedded-only engine construction used by