Finalize library adoption decisions and native repair defaults
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
# ConfigKit, PromptKit, and CommandKit Upgrade
|
# ConfigKit, PromptKit, and CommandKit Upgrade
|
||||||
|
|
||||||
**Status:** Proposed adoption; implementation has not begun.
|
**Status:** Adoption decisions agreed; ready for implementation planning.
|
||||||
|
Implementation has not begun.
|
||||||
|
|
||||||
**Reviewed:** 2026-11-23, against Audita commit
|
**Reviewed:** 2026-11-23, against Audita commit
|
||||||
`da5b8913d1206a8e8f0a784b2322760385548a60` (v4.0.0).
|
`da5b8913d1206a8e8f0a784b2322760385548a60` (v4.0.0).
|
||||||
@@ -12,16 +13,17 @@ PromptKit's application-owned configuration handoff and CommandKit's native
|
|||||||
invocation usage reporting. Include ConfigKit's configured secrets bootstrap
|
invocation usage reporting. Include ConfigKit's configured secrets bootstrap
|
||||||
to keep startup consistent with other ConfigKit consumers. This reduces
|
to keep startup consistent with other ConfigKit consumers. This reduces
|
||||||
Audita's configuration assembly and reporting responsibilities while retaining
|
Audita's configuration assembly and reporting responsibilities while retaining
|
||||||
its correction, validation, repair, and output contracts.
|
its domain correction and validation behavior, semantic repair, and ordinary
|
||||||
|
output handling. Structural-repair defaults, debug representation, and startup
|
||||||
|
failure classification change as specified below.
|
||||||
|
|
||||||
Keeping separate loads through `NewEngine` is a viable smaller adaptation,
|
Use the shared-load approach because it removes filesystem-context
|
||||||
provided the new input and schema APIs are handled. The shared-load approach is
|
reconstruction and gives application settings, PromptKit settings, and overlays
|
||||||
recommended because it removes filesystem-context reconstruction and gives
|
one provenance model.
|
||||||
application settings, PromptKit settings, and overlays one provenance model.
|
|
||||||
The tradeoff is broader configuration validation and inspection, described below.
|
The tradeoff is broader configuration validation and inspection, described below.
|
||||||
|
|
||||||
This document records recommendations and the desired outcome. A subsequent
|
This document records agreed adoption choices and the desired outcome.
|
||||||
implementation plan can divide the work into bounded units.
|
A subsequent implementation plan can divide the work into bounded units.
|
||||||
|
|
||||||
## Reviewed Releases
|
## Reviewed Releases
|
||||||
|
|
||||||
@@ -86,12 +88,13 @@ let a library capture its typed settings and focused inspection from an
|
|||||||
application-owned result. The latter is directly useful to Audita's PromptKit
|
application-owned result. The latter is directly useful to Audita's PromptKit
|
||||||
adoption. See the [component handoff guide](https://forge.maximumdirect.net/base-layer/configkit/src/tag/v1.4.0/docs/consumers/README.md#component-handoff).
|
adoption. See the [component handoff guide](https://forge.maximumdirect.net/base-layer/configkit/src/tag/v1.4.0/docs/consumers/README.md#component-handoff).
|
||||||
|
|
||||||
### Recommended end state
|
### Target end state
|
||||||
|
|
||||||
The application configuration includes native `promptkit.Settings` under
|
The application configuration includes native `promptkit.Settings` under
|
||||||
`yaml:"promptkit"`. Compose Audita's ConfigKit definition with
|
`yaml:"promptkit"`. Compose Audita's ConfigKit definition with
|
||||||
`promptkit.Configure`, preserving Audita's defaults, application version rule,
|
`promptkit.Configure`, preserving Audita's application version rule, recorded
|
||||||
recorded domain resolution, glossary identities, and validation. Pass the whole
|
domain resolution, glossary identities, and validation. Retain application
|
||||||
|
defaults except for the structural-repair default changed below. Pass the whole
|
||||||
successful result to `promptkit.NewFromConfig` with the runtime HTTP client.
|
successful result to `promptkit.NewFromConfig` with the runtime HTTP client.
|
||||||
|
|
||||||
Compose the bundled OpenRouter catalog, embedded prompts, schema-root input,
|
Compose the bundled OpenRouter catalog, embedded prompts, schema-root input,
|
||||||
@@ -233,18 +236,32 @@ also supports inline and source-relative `schema_file` definitions; adopt those
|
|||||||
where an operator actually needs them.
|
where an operator actually needs them.
|
||||||
|
|
||||||
For processing requests, construct `OutputContractInput` with the canonical
|
For processing requests, construct `OutputContractInput` with the canonical
|
||||||
registry schema as inline JSON and an explicit pointer to the resolved Audita
|
registry schema as inline JSON and an optional structural-repair budget.
|
||||||
repair budget. Runtime replacements replace the whole output contract. Passing
|
Runtime replacements replace the whole output contract. Passing the schema
|
||||||
the schema inline keeps Audita's domain response contract independent of an
|
inline keeps Audita's domain response contract independent of an
|
||||||
operator's schema-root selection. Keep one embedded schema source of truth.
|
operator's schema-root selection. Keep one embedded schema source of truth.
|
||||||
|
|
||||||
Preserve configurable structural budgets and explicit zero. Whether processing
|
**Agreed decision:** Adopt PromptKit's native structural-repair default, currently
|
||||||
retains Audita's current default of two or adopts PromptKit's default of one is
|
one additional generation for enabled validation. Remove Audita's default of two;
|
||||||
[open decision 3](#3-structural-repair-default). Native requests using a prompt's
|
leave `OutputContractInput.RepairAttempts` nil when no effective override is
|
||||||
own output definition retain upstream budget resolution. Keep transient retries
|
selected so PromptKit resolves the default. Do not replace the old local default
|
||||||
and semantic correction repair distinct, with their existing operation deadlines
|
with a hard-coded copy of the upstream value.
|
||||||
and partial-success behavior. Update ordinary and coordinated request
|
|
||||||
construction together after selecting the processing default.
|
Preserve root and stage overrides, stage inheritance, and explicit zero to
|
||||||
|
disable structural repair. Carry the optional selection through configuration
|
||||||
|
and request construction without converting an unspecified value to zero.
|
||||||
|
ConfigKit continues to own presence, composition, and clearing; PromptKit resolves
|
||||||
|
an unspecified budget at its boundary. A processing request's replacement output
|
||||||
|
contract resolves independently of the prompt's configured output budget. Native
|
||||||
|
requests using a prompt's own output definition retain upstream budget resolution.
|
||||||
|
|
||||||
|
Keep transient retries and semantic correction repair distinct, with their
|
||||||
|
existing operation deadlines and partial-success behavior. This decision changes
|
||||||
|
the default recovery opportunity, not schema enforcement or the handling of an
|
||||||
|
operation that exhausts its repairs. Update ordinary and coordinated requests
|
||||||
|
together. Document the changed default and the explicit override for workloads
|
||||||
|
that benefit from two repairs; future workload evidence can justify revisiting
|
||||||
|
the default locally or upstream.
|
||||||
|
|
||||||
Link to the upstream schema reference for external prompt definitions and file
|
Link to the upstream schema reference for external prompt definitions and file
|
||||||
resolution. Audita's documentation should identify its shipped schema selection
|
resolution. Audita's documentation should identify its shipped schema selection
|
||||||
@@ -390,16 +407,18 @@ The implementation should cover the following outcomes:
|
|||||||
- Bootstrap configured secrets through the upstream helper before loading,
|
- Bootstrap configured secrets through the upstream helper before loading,
|
||||||
reuse its prepared main, and retain its safe report and native failure facts.
|
reuse its prepared main, and retain its safe report and native failure facts.
|
||||||
- Adapt embedded-schema installation and explicit request contracts, preserving
|
- Adapt embedded-schema installation and explicit request contracts, preserving
|
||||||
canonical domain schemas and existing configured budgets.
|
canonical domain schemas and explicit configured budgets. Carry unspecified
|
||||||
|
structural budgets to PromptKit for native default resolution, preserving
|
||||||
|
stage inheritance and explicit zero.
|
||||||
- Adopt native usage reporting and retain useful new metadata in optional debug
|
- Adopt native usage reporting and retain useful new metadata in optional debug
|
||||||
evidence. Preserve cancellation causes, recoverable timeouts, and joined work.
|
evidence. Preserve cancellation causes, recoverable timeouts, and joined work.
|
||||||
- Remove superseded source assembly, filesystem-context reconstruction, YAML
|
- Remove superseded source assembly, filesystem-context reconstruction, YAML
|
||||||
encode/decode round trips, the embedded-only diagnostic engine construction,
|
encode/decode round trips, the embedded-only diagnostic engine construction,
|
||||||
and redundant accounting projections as their replacements land. Adopt the
|
and redundant accounting projections as their replacements land. Adopt the
|
||||||
agreed diagnostic envelope and native evidence representation. Remove or
|
agreed diagnostic envelope and native evidence representation. Remove or
|
||||||
consolidate tests that only protect those retired
|
consolidate tests that only protect those retired mechanisms; retain
|
||||||
mechanisms; retain behavioral coverage for the application contracts they
|
behavioral coverage for the application contracts they served. Cleanup is a
|
||||||
served. Cleanup is a completion outcome of this upgrade.
|
completion outcome of this upgrade.
|
||||||
- Update canonical configuration, CLI, operations, LLM integration, and internal
|
- Update canonical configuration, CLI, operations, LLM integration, and internal
|
||||||
documentation plus maintained examples under the ownership and consolidation
|
documentation plus maintained examples under the ownership and consolidation
|
||||||
direction above. Replace duplicated library guidance with canonical upstream
|
direction above. Replace duplicated library guidance with canonical upstream
|
||||||
@@ -413,7 +432,8 @@ The implementation should cover the following outcomes:
|
|||||||
Use focused offline tests at Audita's integration boundaries: representative
|
Use focused offline tests at Audita's integration boundaries: representative
|
||||||
source selection and mounting with relative resources; shared configuration
|
source selection and mounting with relative resources; shared configuration
|
||||||
handoff; secrets bootstrap with prepared-source reuse and startup failure
|
handoff; secrets bootstrap with prepared-source reuse and startup failure
|
||||||
reporting; canonical schema and configured repair-budget handoff; inspection
|
reporting; canonical schema and optional repair-budget handoff, including omitted
|
||||||
|
values, root/stage inheritance, and explicit zero/nonzero overrides; inspection
|
||||||
scopes and comparison acquisitions; context propagation and failure
|
scopes and comparison acquisitions; context propagation and failure
|
||||||
classification; and domain attribution across proposal, validation, and repair.
|
classification; and domain attribution across proposal, validation, and repair.
|
||||||
Check transcript/diagnostic stream separation, quiet/help behavior, and
|
Check transcript/diagnostic stream separation, quiet/help behavior, and
|
||||||
@@ -454,25 +474,3 @@ implementation intentionally requires configuration conversion or breaks an
|
|||||||
Audita integration contract, document it and select a major release under the
|
Audita integration contract, document it and select a major release under the
|
||||||
[release policy](../policy/release.md#versioning-and-compatibility). A compatible
|
[release policy](../policy/release.md#versioning-and-compatibility). A compatible
|
||||||
adoption with the added CLI capability is suitable for a minor release.
|
adoption with the added CLI capability is suitable for a minor release.
|
||||||
|
|
||||||
## Open Decisions
|
|
||||||
|
|
||||||
The remaining recommendation is pending discussion; it is not an approved
|
|
||||||
implementation choice.
|
|
||||||
|
|
||||||
### 3. Structural-repair default
|
|
||||||
|
|
||||||
Should processing retain Audita's default of two structural repairs or adopt
|
|
||||||
PromptKit's default of one?
|
|
||||||
|
|
||||||
**Recommendation:** Adopt the native default unless Audita workload experience
|
|
||||||
provides a reason for two. This reduces an application-specific policy difference;
|
|
||||||
the existing value alone is not a reason to preserve it. Select the simplest
|
|
||||||
budget handoff consistent with the chosen default and recorded configuration.
|
|
||||||
This is a behavior decision requiring discussion, not a mechanical API migration.
|
|
||||||
|
|
||||||
**Alternative:** Retain two as an explicit Audita default if representative
|
|
||||||
workloads benefit from the additional structural-repair opportunity. That may
|
|
||||||
improve successful completion, but can add latency and provider work and keeps
|
|
||||||
the default distinct from native requests. Preserve explicit zero, operator
|
|
||||||
overrides, and the separate semantic correction-repair budget under either choice.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user