Finalize D&D prompt integration and documentation
This commit is contained in:
@@ -98,30 +98,36 @@ D&D prompt content. `internal/framework/promptfs` provides the domain-neutral
|
||||
filesystem composition helper used to combine module-owned files with shared
|
||||
domain prompt fragments.
|
||||
|
||||
The D&D spell, NPC, and combat-turn extractors each declare an ordered prompt
|
||||
asset manifest. The manifest lists the package-owned YAML and Markdown files,
|
||||
then the exact shared fragments rendered by that prompt; the same ordered list
|
||||
drives both filesystem mounting and the prompt fingerprint. Shared extraction
|
||||
evidence and in-world identity messages precede the cacheable transcript and
|
||||
campaign-reference messages. Spell and combat prompts then render immediate
|
||||
resolution and the cacheable NPC registry before their lane-specific material;
|
||||
the NPC prompt renders its task and instructions instead. The identity,
|
||||
transcript, and campaign-reference messages are ephemeral in all three prompts,
|
||||
and the NPC registry is ephemeral where it is used by spell and combat prompts.
|
||||
Unused shared assets are neither mounted nor fingerprinted.
|
||||
The D&D scene chunker and spell, NPC, and combat-turn extractors each declare an
|
||||
ordered prompt asset manifest. The manifest lists the package-owned YAML and
|
||||
Markdown files, then the exact shared fragments rendered by that prompt; the
|
||||
same ordered list drives both filesystem mounting and the prompt fingerprint.
|
||||
The three extraction prompts share system, extraction evidence, in-world
|
||||
identity, transcript, and campaign-reference messages. Spell and combat prompts
|
||||
then render immediate resolution and the ephemeral NPC registry before their
|
||||
lane-specific material; the NPC prompt renders its task and instructions
|
||||
instead. The scene prompt uses system, transcript, and campaign-reference
|
||||
messages before its task and instructions. Identity, transcript, and
|
||||
campaign-reference messages are ephemeral in the extraction prompts; the scene
|
||||
prompt marks transcript and campaign references ephemeral, and the NPC registry
|
||||
is ephemeral where spell and combat prompts use it. Unused shared assets are
|
||||
neither mounted nor fingerprinted.
|
||||
|
||||
Schema helpers load embedded JSON Schema with identity and digest metadata,
|
||||
return defensive copies, and expose a diagnostics map that omits schema bytes.
|
||||
The small framework registry contains only generic test schemas; production
|
||||
schemas remain package-owned.
|
||||
|
||||
The spell and combat extractors' package-owned prompts declare their structured
|
||||
JSON inputs and private response schemas. The combat private schema owns the
|
||||
transport envelope—required fields, JSON types, nullability, and unknown-field
|
||||
rejection—while its deterministic validators own semantic constraints such as
|
||||
enum membership, non-empty values and collections, and positive numbers. The
|
||||
spell extractor's prompt declares a required `application/json` `spell_catalog`
|
||||
input and an optional `application/json` `npcs` input. The extractor generates
|
||||
The spell, NPC, and combat extractors' package-owned prompts declare their
|
||||
structured JSON inputs and private response schemas. Each private response
|
||||
schema remains separate from its durable artifact codec schema; this work does
|
||||
not use shared schema fragments or schema generation. The combat private schema
|
||||
owns the transport envelope—required fields, JSON types, nullability, and
|
||||
unknown-field rejection—while its deterministic validators own semantic
|
||||
constraints such as enum membership, non-empty values and collections, and
|
||||
positive numbers. The spell extractor's prompt declares a required
|
||||
`application/json` `spell_catalog` input and an optional `application/json`
|
||||
`npcs` input. The extractor generates
|
||||
the catalog input from its prepared
|
||||
effective catalog as `{"spell_names":[...]}` using sorted canonical names only.
|
||||
The shared D&D prompt assets include a generic NPC grounding fragment directly
|
||||
|
||||
Reference in New Issue
Block a user