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

@@ -55,13 +55,12 @@ a separate composition check, not request execution or module construction.
## Typed Operations And Assessment
[Typed contracts](../../internal/framework/contracts/typed_pipeline.go) carry
a `ProducerOperation[T]` with resolved controls, one assessor, native execution
options, incoming reuse eligibility, and an optional typed cache binding.
[Runner operation completion](../../internal/framework/pipeline/runner_operation.go)
assesses deterministic production directly. Model modules use
[RunProducer](../../internal/framework/pipeline/producer.go); the runner consumes
its acceptance/fallback outcome without assessing it again.
[Typed stage contracts](../../internal/framework/contracts/typed_pipeline.go)
expose preparation. The runner binds resolved controls, assessment, native
execution, reuse eligibility, and cache in a private execution context.
[The core executor](../../internal/framework/pipeline/operation.go) invokes
preparation and handles deterministic and model operations alike; modules do
not select execution collaborators or claim acceptance.
[Candidate assessment](../../internal/framework/pipeline/candidate_assessment.go)
invokes each applicable validator once in configured order. It continues after
@@ -83,13 +82,13 @@ on the shared engine and do not own another semantic loop.
## Native Continuation And Terminal Handling
For executed model work, `RunProducer` checks native errors and structural
For executed model work, the [native executor](../../internal/framework/pipeline/operation_native.go) checks native errors and structural
validation status before interpretation, including a failed result with no Go
error. Module interpretation produces a usable typed candidate and any actionable
domain guidance. The assessor runs the complete chain on every delivered usable
candidate, including unchanged revisions and the final allowed response.
When correction is possible, the helper starts native `Coordinate` from the
When correction is possible, core starts native `Coordinate` from the
captured exchange. Its first callback reuses already-collected initial findings.
Native coordination owns turn iteration and growing history; the module builds
only new correction material from fixed operation inputs. Successful native
@@ -105,7 +104,7 @@ recover an earlier candidate; caller cancellation and undelivered responses
produce no acceptance/fallback. Native operational timeouts retain typed causes
rather than becoming caller cancellation solely by error spelling.
Deterministic work produces once, then uses direct assessment and any supported
Deterministic work produces once, then uses core assessment and any supported
module fallback. An operation/parse/materialization/encoding error remains an
error, not a generic rerun or permissive recovery mechanism.