Finalize the ConfigKit and PromptKit implementation plan

This commit is contained in:
2026-09-24 01:23:32 +00:00
parent 116648fa78
commit 1ad2119283
5 changed files with 642 additions and 659 deletions

View File

@@ -311,51 +311,23 @@ claims of completion for the prototype.
The new profile/credential/capacity and deadline choices are explicit above; no
unresolved upstream requirement prevents starting the ConfigKit implementation
plan. Production report field names and final runtime wiring follow the outcome
and observation contract here. The coordinated refactor targets both libraries
directly; intermediate commits do not require a working legacy runtime.
plan. Production report field names and final runtime wiring are selected in the
[implementation plan](implementation.md), following the outcome and observation
contract here. The coordinated refactor targets both libraries directly; intermediate commits do not require a working legacy runtime.
### Component-Level Next Unit
### Production Implementation Reference
Implement ConfigKit adoption first, against this target model:
The [implementation plan](implementation.md) owns ordered production work,
component changes, tests, and acceptance criteria. The [combined roadmap](library-adoption.md)
and [configuration roadmap](configkit.md) own the final target. This evidence does
not require an interim runtime bridge or separately runnable configuration migration.
| Component | Migration action |
| --- | --- |
| `internal/core/config` | Replace file/env merge and custom duration parsing with ConfigKit definitions, presence-aware resolution, domain validation, and explicit override paths. Retain domain defaults and validation rules identified in the inventory. |
| `internal/cli` | Separate invocation paths from persistent settings; select one file; parse only supplied setting flags into overrides; remove legacy LLM/role-budget/direct-key flags and all environment overlays. Assemble/inspect selected profiles for validation. |
| CLI config inspection and diagnostics snapshot | Use ConfigKit redacted output plus Audita-owned selected-profile summary; update command tests and diagnostic snapshot consumers. |
| Configuration tests/examples | Replace v1 discovery/overlay/alias expectations with v2 presence, inheritance, secret, profile, and override contracts; preserve domain validation tests. Add actual production discovery and CLI tests not exercised by this prototype. |
The PromptKit portion of the refactor replaces `internal/framework/llm` provider execution
and scheduler composition, `internal/prompts` parsing/rendering, and duplicated
structural-output validation. Keep a small Audita adapter behind the existing
structured-call boundary where that contract remains sufficient; revise its return
metadata only as needed for repair and observation outcomes. Avoid library types
in module proposals, domain validators, transcript schemas, and correction ledgers.
Retain `internal/core/schema`, normalization/chunking/output encoding,
`internal/framework/proposals`, deterministic validators, module identity/order,
LLM-validator domain batching and cardinality, runner ordering/apply logic, report
assembly, and artifact lifecycle. Update their integration wiring rather than
rewriting those algorithms. Move all nine prompt definitions and schema references,
checking each module/validator's variables and helpers; this prototype proves only
one pair. Migrate actual diagnostic redaction and error classification, then remove
the old transport/schedulers/prompt loader. No temporary runtime bridge is needed.
Documentation work during the respective implementation stages: update
`docs/config.md`, `docs/cli.md`, examples, README prerequisites, internal config/prompt/
LLM/runner guidance, and output/LLM/subprocess integration contracts. Create one v2
migration guide covering file shape, duration/empty-list changes, removed environment
and CLI inputs, backend/profile/secret setup, effective inspection, retry/repair
behavior, and changed usage/concurrency diagnostics. Revise architecture policy's
existing scheduler language when production uses PromptKit; the current policy
continues to describe the current runtime. Retention and timestamp fixes remain
separate roadmap work.
The combined release remains last, with no intermediate publication. Raise the
production Go minimum when dependencies land; review CI/build images and supported
Linux amd64/arm64 builds then. Prototype execution on Linux amd64 is not proof of
arm64 release readiness or live model output quality.
Retained domain scope includes transcript/glossary schemas, normalization/chunking,
output encoding, proposals and apply-time checks, deterministic validators, ordered
modules, LLM-validator batching/cardinality, ledger ordering, and artifact lifecycle.
The production integration replaces loading, provider execution, prompt rendering,
and scheduler composition while preserving those responsibilities. Retention and
timestamp changes remain separate work.
### Distribution Follow-Up
@@ -416,5 +388,5 @@ The tests use a controlled built-in HTTP transport and synthetic credentials;
there were no live provider calls. The prototype still covers one representative
proposal/assessment pair, not all production modules, prompts, CLI paths, or
diagnostic artifacts. Root `go test ./...` does not run this nested module. No
upstream API gap appeared in this extension. The [ordered production handoff](configkit.md#ordered-production-migration-handoff)
upstream API gap appeared in this extension. The [production implementation plan](implementation.md)
keeps implementation and release pending.