Document the library migration and update examples
This commit is contained in:
64
docs/migrations/v4.1.md
Normal file
64
docs/migrations/v4.1.md
Normal file
@@ -0,0 +1,64 @@
|
||||
# Migrating to Audita v4.1
|
||||
|
||||
Audita v4.1 keeps application configuration version `3` and accepts existing
|
||||
wrapperless `prompts.yml` and `prompts/` companions. It changes how structural
|
||||
output contracts, configuration loading, inspection, and debug evidence work.
|
||||
Review the following changes before upgrading scripts or operator prompts.
|
||||
|
||||
## Move structural-repair budgets to prompts
|
||||
|
||||
Remove `llm.repair_attempts` from the root and every pipeline entry. Audita no
|
||||
longer accepts that setting or supplies an output contract at each call. The
|
||||
selected PromptKit prompt now owns its `output` format, validation mode, schema,
|
||||
and structural-repair budget. Shipped definitions omit `output.repair_attempts`;
|
||||
the PromptKit v0.25.0 default for enabled validation is one additional generation,
|
||||
where Audita previously defaulted to two. Set an explicit budget in a complete
|
||||
replacement prompt when needed; zero disables structural repair for that prompt.
|
||||
This is separate from Audita's `llm.correction_repair_attempts`, which controls
|
||||
semantic correction repair, and from transient retries.
|
||||
|
||||
For a working replacement with `output.repair_attempts: 2`, see
|
||||
[`examples/prompt-edit/prompts.yml`](../../examples/prompt-edit/prompts.yml).
|
||||
The example retains the complete grammar proposal definition, including its
|
||||
messages, format, validation mode, and schema path. A same-ID replacement is a
|
||||
whole record, not a field patch. Former per-entry budgets have no automatic
|
||||
one-to-one conversion: select or define prompts with budgets appropriate to each
|
||||
use. See the [PromptKit format reference](https://forge.maximumdirect.net/base-layer/promptkit/src/tag/v0.25.0/docs/formats.md)
|
||||
for prompt contracts and the [Audita prompt guide](../internal/prompts.md) for
|
||||
required request variables and response shapes.
|
||||
|
||||
Audita no longer replaces an operator prompt's output contract with its own
|
||||
schema. Make operator proposal, validator, and repair prompts produce the
|
||||
appropriate Audita response shapes. Responses that pass a weaker contract but
|
||||
cannot be decoded into the expected JSON types become recoverable invalid-output
|
||||
failures for that operation; domain validation still applies.
|
||||
|
||||
## Update inspection and diagnostics consumers
|
||||
|
||||
The shared application configuration includes native settings under `/promptkit`.
|
||||
Use these paths when inspecting the application scope; the separate PromptKit
|
||||
scope remains available. Existing wrapperless companions are mounted at that
|
||||
path, while main files and overlays can use a `promptkit` section. Configuration
|
||||
inspection now validates the shared result and may run configured secrets
|
||||
bootstrap. See [configuration](../config.md#loading-and-composition).
|
||||
|
||||
Debug `llm-execution.json` retains `summary`, `calls`, and `events`, with native
|
||||
PromptKit evidence nested under `promptkit`. Prepared interaction request payloads
|
||||
also include native contract, schema, and message-hash evidence under that key.
|
||||
Update scripts that read the former projected metric fields; native field names
|
||||
and duration representations differ. Ordinary reports retain their schemas.
|
||||
Native smoke reports now default to text; scripts consuming structured output
|
||||
should request `--format yaml` or `--format json`. See the
|
||||
[CLI reference](../cli.md#inspection-and-outcomes) and
|
||||
[debug output contract](../integrations/output-files.md#debug-only-files).
|
||||
|
||||
## Review startup failures
|
||||
|
||||
Application and PromptKit resources now share configuration loading and
|
||||
validation. Invalid native configuration can be reported during application
|
||||
inspection as well as processing; native configuration usage errors are
|
||||
classified as status `2`, while bootstrap failures are status `1`. A failed
|
||||
bootstrap occurs before transcript and output preparation. Help, version, and
|
||||
other help-only paths do not perform the load. See [subprocess integration](../integrations/subprocess.md)
|
||||
for handling results and [ConfigKit bootstrap documentation](https://forge.maximumdirect.net/base-layer/configkit/src/tag/v1.4.0/docs/config.md)
|
||||
for the native controls.
|
||||
Reference in New Issue
Block a user