Document core operation authoring with a working example

This commit is contained in:
2026-11-25 16:24:26 +00:00
parent 514f5a9692
commit 3826dce93b
8 changed files with 295 additions and 86 deletions

View File

@@ -29,8 +29,7 @@ operation invokes a model.
## Requests And Fixed Operation Inputs
Model modules receive the shared engine during typed preparation. A module
prepares transcript, references, contextual identity projections, and any
Core owns the shared engine. A model module prepares transcript, references, contextual identity projections, and any
normalization candidate mapping once. It constructs a `promptkit.RunRequest`
with its selected prompt, profile/session, native artifact inputs, and variables.
Response interpretation consumes `*promptkit.RunResult` and produces the
@@ -49,14 +48,14 @@ acquire authority over durable IDs, citation meaning, or typed artifact shape.
recipes.
Native request overrides preserve supplied values without rewriting configured
profiles. The producer helper's request composition preserves operation-owned
profiles. Core request composition preserves operation-owned
prompt/input/capture fields and existing callbacks; validators pass native
execution options explicitly on their own requests.
## Native Production And Application Assessment
[RunProducer](../../internal/framework/pipeline/producer.go) connects ordinary
module interpretation/correction/fallback functions to the pipeline assessor.
[Core native execution](../../internal/framework/pipeline/operation_native.go)
connects prepared interpretation/correction/fallback functions to the pipeline assessor.
It uses native `Run`, or retained prepared execution on the cache path, then
checks errors and public validation status before interpretation. Failed native
validation can accompany nil Go error and is not a usable semantic candidate.
@@ -124,7 +123,7 @@ counter around native coordination.
## Prepared Execution And Reuse
For eligible cacheable producers, the helper prepares the initial request once,
For eligible cacheable operations, core prepares the initial request once,
retains its details and opaque message-content hash, and either discards the
handle on a usable hit or executes that same handle with `RunPrepared`.
Unused handles are discarded on exits. Continuation retains the initial key.