Design the integration API for email and forecast processing

This commit is contained in:
2026-11-25 13:56:30 +00:00
parent a7dd841219
commit 345067b81e

View File

@@ -23,6 +23,11 @@ producer and reconciliation facilities. **Integrations** means Notarius artifact
families and their stage modules, validators, codecs, and domain behavior. It does families and their stage modules, validators, codecs, and domain behavior. It does
not mean replacing the adopted kits' APIs with another abstraction. not mean replacing the adopted kits' APIs with another abstraction.
The API is intended for multiple domains. The next anticipated integrations are
an email processor and an NWS Forecast Discussion text processor. Existing D&D
modules supply migration evidence, not the definition of what an integration or
chunk must be.
## Current Baseline ## Current Baseline
Reviewed baseline: `f0ba5cce843182e0f5f3eaa6577110a087cf1422`. Reviewed baseline: `f0ba5cce843182e0f5f3eaa6577110a087cf1422`.
@@ -56,6 +61,42 @@ inventory during implementation rather than treating these counts as invariants.
## Targeted End State ## Targeted End State
### Domain-Neutral Operations And Chunks
Core contracts describe sources, source units, chunks, typed artifacts, and
operation outcomes. A scene is a D&D interpretation of a chunk, not a core chunk
type that other integrations must imitate. Transcript speakers/timestamps, combat
annotations, entity registries, and D&D identity rules belong to integrations
where applicable; ordinary core operations do not require those concepts.
The existing [source types](../../internal/core/source/source.go) already carry
generic units, ranges, content, and metadata. Evaluate their fit through the new
API rather than introducing a parallel source model preemptively. Source parsing,
unit selection, chunk meaning, and domain metadata remain integration concerns;
core owns generic plan materialization and orchestration. Neither a particular
D&D chunk prompt nor scene-specific annotations define the authoring contract.
Use these anticipated scenarios alongside production D&D callers when evaluating
the API shape:
| Scenario | Design question |
| --- | --- |
| Email processing | Can an integration prepare message content and its domain metadata, choose useful processing units/chunks, and produce typed results without transcript or scene conventions? |
| NWS Forecast Discussion text processing | Can an integration process document text using its own meaningful sections or other chunk boundaries and domain-specific findings, without entity-registry reconciliation being required? |
These are design scenarios, not settled input formats, extraction schemas, or
chunking policies. A section/paragraph or whole-document chunk can illustrate an
API walkthrough without prescribing either integration's final behavior. Support
deterministic and model-assisted preparation where appropriate through the same
core lifecycle; specialized reconciliation remains optional.
Develop small API sketches or synthetic fixtures to expose domain assumptions.
Implementing the email and NWS processors, network ingestion, or their complete
domain contracts is not part of this migration. If a walkthrough exposes a real
source/chunk contract mismatch, identify and resolve that specific boundary rather
than forcing the integration into scene terminology or promising arbitrary source
topologies without evidence.
### Ownership ### Ownership
| Responsibility | Target owner | | Responsibility | Target owner |
@@ -177,6 +218,10 @@ producer correction lifecycle.
- Resolve Open Decisions 1–3 with concrete API sketches for spell extraction, - Resolve Open Decisions 1–3 with concrete API sketches for spell extraction,
registry normalization, and a no-model branch. Include scene-plan interpretation registry normalization, and a no-model branch. Include scene-plan interpretation
that requests correction before a candidate can be materialized. that requests correction before a candidate can be materialized.
- Exercise those same choices with email and NWS Forecast Discussion processing
sketches. Check source/chunk inputs, domain metadata, result interpretation,
correction guidance, and optional reconciliation for D&D assumptions before
settling the API. Keep format-specific decisions with the future integrations.
- Specify which inputs are operation-owned or borrowed, which implementations - Specify which inputs are operation-owned or borrowed, which implementations
are reused concurrently, and the lifetime of optional evidence hooks. Document are reused concurrently, and the lifetime of optional evidence hooks. Document
actual behavior without promising arbitrary collaborator thread safety or actual behavior without promising arbitrary collaborator thread safety or
@@ -230,7 +275,9 @@ requirement to create a large specification before trying representative callers
- Supply one minimal working integration example and point to a richer registry - Supply one minimal working integration example and point to a richer registry
example. Explain required/optional capabilities, no-model completion, domain example. Explain required/optional capabilities, no-model completion, domain
guidance versus operational errors, fallback, concurrency, and evidence ownership. guidance versus operational errors, fallback, concurrency, and evidence ownership.
Reuse a production example or small maintained fixture rather than a new demo app. Prefer a small domain-neutral fixture for the introductory example, with D&D
as the richer example, so learning the API does not require learning scene or
registry semantics. No new demo application is needed.
- Verify that the example can be understood without reading the core producer. - Verify that the example can be understood without reading the core producer.
Test actual registration/execution of the example where useful; do not add a Test actual registration/execution of the example where useful; do not add a
subjective readability gate or a required external-author study. subjective readability gate or a required external-author study.
@@ -262,6 +309,10 @@ Cover the distinct risks introduced by moving ownership:
- Registered typed extraction, scene planning, reconciliation, and no-model paths - Registered typed extraction, scene planning, reconciliation, and no-model paths
reach core execution without integration-owned assessment/disposition plumbing. reach core execution without integration-owned assessment/disposition plumbing.
- A small non-D&D example exercises generic source/chunk handling and typed
production without scene/combat fields or mandatory registry reconciliation.
Email/NWS walkthroughs inform that example; complete processors are not required
as verification dependencies.
- Every usable revised candidate receives complete assessment; interpretation-only - Every usable revised candidate receives complete assessment; interpretation-only
guidance can request correction; native failed checks retain details and do not guidance can request correction; native failed checks retain details and do not
become semantic approval or an extra structural-repair loop. become semantic approval or an extra structural-repair loop.
@@ -291,7 +342,9 @@ run those implementation checks.
The roadmap is complete when affected production integrations use the selected The roadmap is complete when affected production integrations use the selected
API, ordinary authors no longer compose the shared lifecycle, obsolete paths are API, ordinary authors no longer compose the shared lifecycle, obsolete paths are
removed, behavior is verified, author guidance matches the implementation, and removed, behavior is verified, author guidance matches the implementation, and
the catalog is reassessed. A clearer private `RunProducer` alone is insufficient. the catalog is reassessed. The design has also been exercised against email and
NWS processing scenarios without making their domain behavior a core requirement.
A clearer private `RunProducer` alone is insufficient.
## Relationship To The Audit ## Relationship To The Audit
@@ -312,6 +365,11 @@ tests. Catalog IDs are evidence references, not a mandate to close every entry.
## Open Decisions ## Open Decisions
Evaluate each choice against both existing D&D callers and the anticipated email
and NWS scenarios above. Domain neutrality is selected direction, not an open
choice; the particular future formats, outputs, and chunking policies remain with
those integrations.
### D1. How Integrations Hand An Operation To Core ### D1. How Integrations Hand An Operation To Core
**Recommendation:** Prefer a small typed operation definition returned by the **Recommendation:** Prefer a small typed operation definition returned by the