Use native ConfigKit loading for shared references
This commit is contained in:
@@ -42,30 +42,42 @@ Reviewed against Notarius commit
|
||||
- The maintained [complete example](../../examples/dnd-complete/config.yml)
|
||||
supplies text party/glossary references and a separately authored spell overlay.
|
||||
The [D&D subprocess guide](../consumers/dnd-pipeline.md) reflects those inputs.
|
||||
- The repository already imports `go.yaml.in/yaml/v4` and
|
||||
`github.com/santhosh-tekuri/jsonschema/v6`. No new parser or schema-engine
|
||||
dependency is expected solely for this adoption.
|
||||
- The repository already imports ConfigKit `v1.4.0` and
|
||||
`github.com/santhosh-tekuri/jsonschema/v6`. Their public APIs supply native
|
||||
loading and external JSON Schema validation; no new parser dependency is needed.
|
||||
|
||||
## Selected Upstream Baseline
|
||||
## Upstream Baseline And Adoption Prerequisite
|
||||
|
||||
Use the shared schemas source distribution
|
||||
The reviewed shared schemas source distribution is
|
||||
[`2026.11.0`](https://forge.maximumdirect.net/eric/schemas/src/tag/2026.11.0),
|
||||
whose published remote tag resolves to commit
|
||||
`1b8430bdcbf04eb98c8d45c98a1cb986a9e6d477`. Its
|
||||
[catalog](https://forge.maximumdirect.net/eric/schemas/src/tag/2026.11.0/catalog.json)
|
||||
contains the following independently versioned contracts:
|
||||
|
||||
| Contract | Version | Document identifier | Adoption scope |
|
||||
| Contract | Reviewed version | Document identifier | Intended adoption scope |
|
||||
| --- | --- | --- | --- |
|
||||
| General glossary | `0.1.0` | `maximumdirect.glossary.v1` | Structured vocabulary and spell recognition. |
|
||||
| RPG party | `0.1.0` | `maximumdirect.rpg.party.v1` | Structured character roster and player relationships. |
|
||||
| RPG campaign | `0.1.0` | `maximumdirect.rpg.campaign.v1` | Reviewed; no new structured consumer in this work set. |
|
||||
|
||||
Adopt the glossary and party schemas together with their adjacent semantics and
|
||||
the selected distribution's
|
||||
[validation profile](https://forge.maximumdirect.net/eric/schemas/src/tag/2026.11.0/docs/validation.md)
|
||||
and
|
||||
[compatibility guidance](https://forge.maximumdirect.net/eric/schemas/src/tag/2026.11.0/docs/compatibility.md).
|
||||
That release's `0.1.0` contracts predate the upstream ConfigKit-alignment work
|
||||
and are not the implementation target. As of this revision, `2026.11.0` is the
|
||||
only published source tag verified. Select the published ConfigKit-aligned
|
||||
glossary and party versions when available, together with their adjacent
|
||||
semantics. Record the distribution, full source commit, exact schema versions,
|
||||
canonical IDs, and document markers before implementing their readers. Do not
|
||||
adapt the old contracts locally or treat unpublished schema work as released.
|
||||
|
||||
The adoption prerequisite is a published aligned schema distribution; no further
|
||||
product decision is needed to keep loading native. Preparation can proceed, but
|
||||
schema-dependent implementation must use the verified new definitions. Keep
|
||||
older source/version details above as review evidence, not accepted legacy input.
|
||||
|
||||
Use the existing ConfigKit `v1.4.0`
|
||||
[consumer guide](https://forge.maximumdirect.net/base-layer/configkit/src/tag/v1.4.0/docs/consumers/README.md)
|
||||
and [native contract](https://forge.maximumdirect.net/base-layer/configkit/src/tag/v1.4.0/docs/config.md)
|
||||
for loading semantics; the aligned schema release must fit that boundary.
|
||||
Repository CalVer, individual schema SemVer, document generation markers, and
|
||||
canonical schema IDs remain distinct. Record exact selected versions and source
|
||||
revision; do not discover support from mutable `main` or live URL availability.
|
||||
@@ -125,26 +137,38 @@ modules. Internal transport details belong in the implementation plan.
|
||||
|
||||
### Shared Conformance And Task Suitability
|
||||
|
||||
Provide one reusable decoding/validation boundary for adopted shared documents,
|
||||
with small task-specific projections. Ordinary validation is offline, using
|
||||
Provide one small shared-reference loading/validation integration, with
|
||||
task-specific projections. Ordinary validation is offline, using
|
||||
bundled exact-version schemas registered under their canonical IDs. Bundle the
|
||||
adopted schema directories and semantics without importing the schema
|
||||
adopted schema files and adjacent semantics without importing the schema
|
||||
repository's internal Go validation harness or creating a runtime catalog client.
|
||||
|
||||
Adopt the shared domain structure and semantics without promising the full
|
||||
upstream YAML decoding profile. ConfigKit accepts a narrower YAML value language;
|
||||
do not widen it or build a compatibility bridge for shared-schema YAML forms.
|
||||
Use existing parser capabilities and straightforward decoding for supported
|
||||
documents. Operators can use supported plain YAML or equivalent JSON rather than
|
||||
requiring Notarius-specific scalar, alias, tag, or arbitrary-precision machinery.
|
||||
Document the serialization boundary separately from shared-schema validity.
|
||||
Load already-materialized reference bytes through ConfigKit's public
|
||||
`Load[map[string]any]` and `Bytes` APIs. YAML and JSON use the same native loading
|
||||
path. A standard JSON syntax check may enforce the JSON media convention, but
|
||||
does not provide an alternate decoder. Pass `Result.Config` directly to the
|
||||
existing JSON Schema engine, then apply shared semantic checks and D&D task
|
||||
selection. ConfigKit owns parsing, duplicate-key checks, scalar binding,
|
||||
structural resolution, native limits, and native diagnostic details.
|
||||
|
||||
Reference documents remain completed domain data, not another application
|
||||
configuration load. Avoid routing them through configuration imports/directives
|
||||
merely to reuse a parser. Preserve supported decoded values and extensions when
|
||||
forwarding; do not claim lossless handling of every upstream YAML value.
|
||||
Use a single-source load without enabling import traversal, selecting overlays,
|
||||
or supplying application defaults, custom resolvers, overrides, or secrets
|
||||
bootstrap. Native structural behavior still applies: `extends` is structural
|
||||
input and source-root `config` has native control semantics even when imports
|
||||
are off. Do not suppress or reinterpret these controls with a pre-parser.
|
||||
Nested ordinary `config` data follows upstream behavior. This shared-reference
|
||||
load is separate from the one application-owned configuration result and does
|
||||
not reconstruct Notarius's application configuration or its engine.
|
||||
|
||||
Validate the complete shared document before projecting selected collections.
|
||||
Keep the resolved mapping as the document representation and build only the
|
||||
small projections consumers need. No separate raw/typed document SDK, generic
|
||||
subtree converter, serialization round trip, or forwarding API is needed.
|
||||
Existing reference transport can retain original bytes; resolved values need
|
||||
not preserve authored spelling, numeric precision, or consumed controls. If a
|
||||
shared document is forwarded, use its supported resolved values and extensions.
|
||||
JSON is subject to the same native limits; it is not a universal escape hatch.
|
||||
|
||||
Validate the complete resolved document before projecting selected collections.
|
||||
Enforce the upstream semantic rule that glossary entry IDs are unique within
|
||||
each collection using exact comparison. Reuse of an ID in another collection is
|
||||
valid. Do not require globally unique names, aliases, player names, or IDs, or
|
||||
@@ -156,10 +180,10 @@ supported, while null is not interchangeable with omission for every optional
|
||||
field. Shared authored-input schemas are not private LLM response schemas and
|
||||
do not inherit provider-specific restrictions on optional response properties.
|
||||
|
||||
Accept permitted extensions and preserve them when forwarding a shared document.
|
||||
Task-specific projections may intentionally omit irrelevant fields. An extension
|
||||
named `instruction` has no instruction or configuration semantics. Supported
|
||||
domain interpretation must be deliberate rather than inferred from field names.
|
||||
Accept permitted extensions within the native resolved-value boundary.
|
||||
Task-specific projections may omit irrelevant fields. An ordinary extension
|
||||
named `instruction` does not become model guidance. Native reserved controls keep
|
||||
their upstream meaning; additional domain interpretation must be deliberate.
|
||||
|
||||
Keep shared conformance separate from task suitability. A valid document may
|
||||
still lack a selected collection or contain spell-recognition ambiguities.
|
||||
@@ -167,11 +191,10 @@ Report those as task requirements with reference/collection/field context where
|
||||
practical, rather than redefining the upstream schema. A selected empty spell
|
||||
collection adds no vocabulary to the embedded catalog; it is not malformed.
|
||||
|
||||
ConfigKit retains ownership of configuration loading and composition. Shared
|
||||
reference readers consume completed domain documents; they do not add imports,
|
||||
overlays, or another authoring merge language. Roster, glossary, and provenance
|
||||
content remain auxiliary context. The current transcript remains the sole source
|
||||
of event evidence and durable source ranges.
|
||||
ConfigKit retains ownership of loading and composition. Notarius does not add
|
||||
another authoring merge language or a compatibility parser. Roster, glossary,
|
||||
and provenance content remain auxiliary context. The current transcript remains
|
||||
the sole source of event evidence and durable source ranges.
|
||||
|
||||
### Spell Recognition
|
||||
|
||||
@@ -274,7 +297,7 @@ are input/preparation errors, not model-quality failures to repair with retries.
|
||||
| Area | Work needed |
|
||||
| --- | --- |
|
||||
| Shared contract assets | Bundle exact adopted schemas and adjacent semantics, source/version identification, and applicable license material in the content-only asset tree. Keep validation logic outside `assets`. |
|
||||
| Shared input integration | Implement reusable offline decoding, schema validation, and glossary semantic checks. Preserve full documents separately from task projections. |
|
||||
| Shared input integration | Use one native ConfigKit byte-source load, validate the resolved mapping against bundled schemas, and apply glossary semantic checks. Build only the task projections needed by consumers. |
|
||||
| Reference binding | Add binding-level `collections` selection and carry it through normal configuration/CLI override resolution without implementing a new composition system. Update reference declarations and accepted media types for affected consumers. |
|
||||
| Spell family | Replace private overlay parsing in `internal/modules/dnd/spells/catalog`; adapt effective-catalog composition, prompt projection, and useful input diagnostics. Exercise extraction, normalization, and catalog-validator constructors together. |
|
||||
| D&D context consumers | Update `internal/modules/dnd/shared`, applicable chunk/extract constructors, shared reference prompt content, and any direct reference presentations bypassing those helpers. Derive player context from the roster without requiring duplicate authored data. |
|
||||
@@ -292,7 +315,10 @@ Create a focused integration document for Notarius's shared-input support. It
|
||||
owns exact supported versions, accepted serializations, consumer roles,
|
||||
collection selection, recognition adaptations, and task suitability. Link to
|
||||
the selected upstream semantics and validation documentation for the shared
|
||||
formats rather than maintaining a competing format specification.
|
||||
formats rather than maintaining a competing format specification. Link native
|
||||
loading behavior to ConfigKit; do not copy its parser manual or maintain a local
|
||||
compatibility matrix. Bundle essential schema/semantic content, not copies of
|
||||
upstream validation manuals or example archives.
|
||||
|
||||
Replace or retire `docs/integrations/dnd-spell-catalog-overlays.md` when its reader
|
||||
is removed, updating inbound links. Update `docs/config.md` for binding fields and
|
||||
@@ -327,9 +353,10 @@ The implemented feature should demonstrate:
|
||||
3. One shared roster supplies character aliases and player relationships to the
|
||||
maintained pipeline without duplicate player/party-vocabulary authoring.
|
||||
Optional attributes and duplicate display labels follow the shared contract.
|
||||
4. Equivalent supported YAML and JSON inputs produce equivalent task material.
|
||||
Focused tests cover ordinary supported values and native decoding failures,
|
||||
without requiring full upstream YAML-profile parity or a custom bridge.
|
||||
4. Equivalent native-supported YAML and JSON inputs produce equivalent task
|
||||
material through the same ConfigKit load. A few public-API integration tests
|
||||
cover successful handoff and representative native failures, without copying
|
||||
ConfigKit's parser suite or adding precision/serialization guarantees.
|
||||
Structural and semantic tests cover omission/null/empty behavior,
|
||||
extensions, per-collection ID uniqueness, and incompatible markers.
|
||||
5. Recognition tests preserve embedded vocabulary, canonical display, same-spell
|
||||
@@ -339,8 +366,9 @@ The implemented feature should demonstrate:
|
||||
before domain inference. Fake provider boundaries prove valid projections
|
||||
reach their intended tasks and reference-only entries do not create events.
|
||||
7. Bundled schema validation requires no network, schema-repository installation,
|
||||
or credentials. Full-document forwarding retains extensions; model-facing
|
||||
projections omit opaque IDs and do not promote extensions to instructions.
|
||||
or credentials. The native resolved mapping retains supported domain
|
||||
extensions; model-facing projections omit opaque IDs and do not promote
|
||||
ordinary extensions to instructions or override native reserved controls.
|
||||
8. Existing output artifact contracts, generated handoffs, input-based session
|
||||
identity, native report shape, and cache policy remain intact. Updated prompt
|
||||
material participates in existing native cache identity; add no separate
|
||||
|
||||
Reference in New Issue
Block a user