Extend composed consumer with request validation

This commit is contained in:
2026-10-12 22:22:51 +00:00
parent 9e6431be63
commit be8bd9c1ea
6 changed files with 156 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
# PromptKit request validation implementation plan
Status: Stages 1–6 complete; implementation is ongoing.
Status: Stages 1–7 complete; implementation is ongoing.
## Authority, scope, and baseline
@@ -411,6 +411,17 @@ making the intentionally failing example a failed completion check.
**Complete when:** the maintained consumer demonstrates the accepted feature,
typed selection, shared state, and application-owned defaults without execution.
**Completed:** 2026-10-12. Composed `WithRequestValidation` with the existing
engine loader, campaign selector, input/state factories, and invocation cache.
The typed builder loads the selected campaign through that cache and defaults
only absent `topic` and `mode` variables, preserving explicit empty values and
operator bindings. Added offline topic and notes fixtures and extended the
consumer README with both successful file-backed commands and the intentional
missing-topic failure. Composed tests passed with
`GOTOOLCHAIN=local go test -count=1 .`; both successful README commands emitted
the expected two-field YAML confirmation, and the missing-topic command exited
with status 1 for the native required-artifact error.
## Stage 8: Update canonical documentation for implemented behavior
**Primary files:** GoDoc, `docs/cli.md`, `docs/consumers/guide.md`, README,