Declare embedded prompts profiles and schemas with native kit resources

This commit is contained in:
2026-11-21 22:52:46 +00:00
parent 87d362e2d7
commit a0274e154b
21 changed files with 813 additions and 619 deletions

View File

@@ -1,7 +1,6 @@
prompts: prompts:
dnd.combat_turns: - id: dnd.combat_turns
v1: default_profile: notarius/dnd-extraction
default_profile: dnd-extraction
inputs: inputs:
- name: transcript - name: transcript
required: true required: true
@@ -20,21 +19,21 @@ prompts:
content_type: application/json content_type: application/json
messages: messages:
- role: system - role: system
content_file: ./sharedassets/common-dnd-system.md content_file: ../../shared/prompts/common-dnd-system.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-identity.md content_file: ../../shared/prompts/common-dnd-identity.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-references.md content_file: ../../shared/prompts/common-dnd-references.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/common-dnd-transcript-chunk.md content_file: ../../shared/prompts/common-dnd-transcript-chunk.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/common-dnd-extraction-evidence.md content_file: ../../shared/prompts/common-dnd-extraction-evidence.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-npc-registry.md content_file: ../../shared/prompts/common-dnd-npc-registry.md
- role: user - role: user
content_file: ./instructions.md content_file: ./instructions.md
cache_control: cache_control:
@@ -42,5 +41,4 @@ prompts:
output: output:
format: json format: json
validation_mode: json_schema validation_mode: json_schema
schema_path: dnd_combat_turns_llm.v1.json schema_path: dnd/combat-turns/schemas/dnd_combat_turns_llm.v1.json
repair_attempts: 1

View File

@@ -1,7 +1,6 @@
prompts: prompts:
dnd.enemy_events: - id: dnd.enemy_events
v1: default_profile: notarius/dnd-extraction
default_profile: dnd-extraction
inputs: inputs:
- name: transcript - name: transcript
required: true required: true
@@ -26,21 +25,21 @@ prompts:
content_type: application/json content_type: application/json
messages: messages:
- role: system - role: system
content_file: ./sharedassets/common-dnd-system.md content_file: ../../shared/prompts/common-dnd-system.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-identity.md content_file: ../../shared/prompts/common-dnd-identity.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-references.md content_file: ../../shared/prompts/common-dnd-references.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/common-dnd-transcript-chunk.md content_file: ../../shared/prompts/common-dnd-transcript-chunk.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/common-dnd-extraction-evidence.md content_file: ../../shared/prompts/common-dnd-extraction-evidence.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-npc-registry.md content_file: ../../shared/prompts/common-dnd-npc-registry.md
- role: user - role: user
content_file: ./combat-grounding.md content_file: ./combat-grounding.md
- role: user - role: user
@@ -50,5 +49,4 @@ prompts:
output: output:
format: json format: json
validation_mode: json_schema validation_mode: json_schema
schema_path: dnd_enemy_events_llm.v1.json schema_path: dnd/enemy-events/schemas/dnd_enemy_events_llm.v1.json
repair_attempts: 1

View File

@@ -1,7 +1,6 @@
prompts: prompts:
dnd.item_occurrences: - id: dnd.item_occurrences
v1: default_profile: notarius/dnd-extraction
default_profile: dnd-extraction
inputs: inputs:
- name: transcript - name: transcript
required: true required: true
@@ -20,19 +19,19 @@ prompts:
content_type: application/json content_type: application/json
messages: messages:
- role: system - role: system
content_file: ./sharedassets/common-dnd-system.md content_file: ../../shared/prompts/common-dnd-system.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-identity.md content_file: ../../shared/prompts/common-dnd-identity.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-references.md content_file: ../../shared/prompts/common-dnd-references.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/common-dnd-transcript-chunk.md content_file: ../../shared/prompts/common-dnd-transcript-chunk.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/common-dnd-extraction-evidence.md content_file: ../../shared/prompts/common-dnd-extraction-evidence.md
- role: user - role: user
content_file: ./item-registry.md content_file: ./item-registry.md
- role: user - role: user
@@ -42,5 +41,4 @@ prompts:
output: output:
format: json format: json
validation_mode: json_schema validation_mode: json_schema
schema_path: dnd_item_occurrences_llm.v1.json schema_path: dnd/item-occurrences/schemas/dnd_item_occurrences_llm.v1.json
repair_attempts: 1

View File

@@ -1,7 +1,6 @@
prompts: prompts:
dnd.item_registry: - id: dnd.item_registry
v1: default_profile: notarius/dnd-extraction
default_profile: dnd-extraction
inputs: inputs:
- name: transcript - name: transcript
required: true required: true
@@ -17,19 +16,19 @@ prompts:
content_type: text/plain content_type: text/plain
messages: messages:
- role: system - role: system
content_file: ./sharedassets/common-dnd-system.md content_file: ../../../shared/prompts/common-dnd-system.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-identity.md content_file: ../../../shared/prompts/common-dnd-identity.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-references.md content_file: ../../../shared/prompts/common-dnd-references.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/common-dnd-transcript-chunk.md content_file: ../../../shared/prompts/common-dnd-transcript-chunk.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/common-dnd-extraction-evidence.md content_file: ../../../shared/prompts/common-dnd-extraction-evidence.md
- role: user - role: user
content_file: ./instructions.md content_file: ./instructions.md
cache_control: cache_control:
@@ -37,5 +36,4 @@ prompts:
output: output:
format: json format: json
validation_mode: json_schema validation_mode: json_schema
schema_path: dnd_item_registry_llm.v1.json schema_path: dnd/item-registry/extract/schemas/dnd_item_registry_llm.v1.json
repair_attempts: 1

View File

@@ -1,7 +1,6 @@
prompts: prompts:
dnd.item_registry.normalize: - id: dnd.item_registry.normalize
v1: default_profile: notarius/dnd-extraction
default_profile: dnd-extraction
inputs: inputs:
- name: candidates - name: candidates
required: true required: true
@@ -11,21 +10,20 @@ prompts:
content_type: application/json content_type: application/json
messages: messages:
- role: system - role: system
content_file: ./sharedassets/common-dnd-system.md content_file: ../../../shared/prompts/common-dnd-system.md
- role: user - role: user
content_file: ./sharedassets/protocol.md content_file: ../../../../generic/normalize/deduplication/prompts/protocol.md
- role: user - role: user
content_file: ./instructions.md content_file: ./instructions.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/candidates.md content_file: ../../../../generic/normalize/deduplication/prompts/candidates.md
- role: user - role: user
content_file: ./sharedassets/transcript-windows.md content_file: ../../../../generic/normalize/deduplication/prompts/transcript-windows.md
cache_control: cache_control:
type: ephemeral type: ephemeral
output: output:
format: json format: json
validation_mode: json_schema validation_mode: json_schema
schema_path: semantic_reconciliation_llm.v1.json schema_path: generic/normalize/deduplication/schemas/semantic_reconciliation_llm.v1.json
repair_attempts: 1

View File

@@ -1,7 +1,6 @@
prompts: prompts:
dnd.location_occurrences: - id: dnd.location_occurrences
v1: default_profile: notarius/dnd-extraction
default_profile: dnd-extraction
inputs: inputs:
- name: transcript - name: transcript
required: true required: true
@@ -20,19 +19,19 @@ prompts:
content_type: application/json content_type: application/json
messages: messages:
- role: system - role: system
content_file: ./sharedassets/common-dnd-system.md content_file: ../../shared/prompts/common-dnd-system.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-identity.md content_file: ../../shared/prompts/common-dnd-identity.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-references.md content_file: ../../shared/prompts/common-dnd-references.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/common-dnd-transcript-chunk.md content_file: ../../shared/prompts/common-dnd-transcript-chunk.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/common-dnd-extraction-evidence.md content_file: ../../shared/prompts/common-dnd-extraction-evidence.md
- role: user - role: user
content_file: ./location-registry.md content_file: ./location-registry.md
- role: user - role: user
@@ -42,5 +41,4 @@ prompts:
output: output:
format: json format: json
validation_mode: json_schema validation_mode: json_schema
schema_path: dnd_location_occurrences_llm.v1.json schema_path: dnd/location-occurrences/schemas/dnd_location_occurrences_llm.v1.json
repair_attempts: 1

View File

@@ -1,7 +1,6 @@
prompts: prompts:
dnd.location_registry: - id: dnd.location_registry
v1: default_profile: notarius/dnd-extraction
default_profile: dnd-extraction
inputs: inputs:
- name: transcript - name: transcript
required: true required: true
@@ -17,19 +16,19 @@ prompts:
content_type: text/plain content_type: text/plain
messages: messages:
- role: system - role: system
content_file: ./sharedassets/common-dnd-system.md content_file: ../../../shared/prompts/common-dnd-system.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-identity.md content_file: ../../../shared/prompts/common-dnd-identity.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-references.md content_file: ../../../shared/prompts/common-dnd-references.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/common-dnd-transcript-chunk.md content_file: ../../../shared/prompts/common-dnd-transcript-chunk.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/common-dnd-extraction-evidence.md content_file: ../../../shared/prompts/common-dnd-extraction-evidence.md
- role: user - role: user
content_file: ./instructions.md content_file: ./instructions.md
cache_control: cache_control:
@@ -37,5 +36,4 @@ prompts:
output: output:
format: json format: json
validation_mode: json_schema validation_mode: json_schema
schema_path: dnd_location_registry_llm.v1.json schema_path: dnd/location-registry/extract/schemas/dnd_location_registry_llm.v1.json
repair_attempts: 1

View File

@@ -1,7 +1,6 @@
prompts: prompts:
dnd.location_registry.normalize: - id: dnd.location_registry.normalize
v1: default_profile: notarius/dnd-extraction
default_profile: dnd-extraction
inputs: inputs:
- name: candidates - name: candidates
required: true required: true
@@ -11,21 +10,20 @@ prompts:
content_type: application/json content_type: application/json
messages: messages:
- role: system - role: system
content_file: ./sharedassets/common-dnd-system.md content_file: ../../../shared/prompts/common-dnd-system.md
- role: user - role: user
content_file: ./sharedassets/protocol.md content_file: ../../../../generic/normalize/deduplication/prompts/protocol.md
- role: user - role: user
content_file: ./instructions.md content_file: ./instructions.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/candidates.md content_file: ../../../../generic/normalize/deduplication/prompts/candidates.md
- role: user - role: user
content_file: ./sharedassets/transcript-windows.md content_file: ../../../../generic/normalize/deduplication/prompts/transcript-windows.md
cache_control: cache_control:
type: ephemeral type: ephemeral
output: output:
format: json format: json
validation_mode: json_schema validation_mode: json_schema
schema_path: semantic_reconciliation_llm.v1.json schema_path: generic/normalize/deduplication/schemas/semantic_reconciliation_llm.v1.json
repair_attempts: 1

View File

@@ -1,7 +1,6 @@
prompts: prompts:
dnd.npc_occurrences: - id: dnd.npc_occurrences
v1: default_profile: notarius/dnd-extraction
default_profile: dnd-extraction
inputs: inputs:
- name: transcript - name: transcript
required: true required: true
@@ -20,21 +19,21 @@ prompts:
content_type: application/json content_type: application/json
messages: messages:
- role: system - role: system
content_file: ./sharedassets/common-dnd-system.md content_file: ../../shared/prompts/common-dnd-system.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-identity.md content_file: ../../shared/prompts/common-dnd-identity.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-references.md content_file: ../../shared/prompts/common-dnd-references.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/common-dnd-transcript-chunk.md content_file: ../../shared/prompts/common-dnd-transcript-chunk.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/common-dnd-extraction-evidence.md content_file: ../../shared/prompts/common-dnd-extraction-evidence.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-npc-registry.md content_file: ../../shared/prompts/common-dnd-npc-registry.md
- role: user - role: user
content_file: ./instructions.md content_file: ./instructions.md
cache_control: cache_control:
@@ -42,5 +41,4 @@ prompts:
output: output:
format: json format: json
validation_mode: json_schema validation_mode: json_schema
schema_path: dnd_npc_occurrences_llm.v1.json schema_path: dnd/npc-occurrences/schemas/dnd_npc_occurrences_llm.v1.json
repair_attempts: 1

View File

@@ -1,7 +1,6 @@
prompts: prompts:
dnd.npc_registry: - id: dnd.npc_registry
v1: default_profile: notarius/dnd-extraction
default_profile: dnd-extraction
inputs: inputs:
- name: transcript - name: transcript
required: true required: true
@@ -17,19 +16,19 @@ prompts:
content_type: text/plain content_type: text/plain
messages: messages:
- role: system - role: system
content_file: ./sharedassets/common-dnd-system.md content_file: ../../../shared/prompts/common-dnd-system.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-identity.md content_file: ../../../shared/prompts/common-dnd-identity.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-references.md content_file: ../../../shared/prompts/common-dnd-references.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/common-dnd-transcript-chunk.md content_file: ../../../shared/prompts/common-dnd-transcript-chunk.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/common-dnd-extraction-evidence.md content_file: ../../../shared/prompts/common-dnd-extraction-evidence.md
- role: user - role: user
content_file: ./instructions.md content_file: ./instructions.md
cache_control: cache_control:
@@ -37,5 +36,4 @@ prompts:
output: output:
format: json format: json
validation_mode: json_schema validation_mode: json_schema
schema_path: dnd_npc_registry_llm.v1.json schema_path: dnd/npc-registry/extract/schemas/dnd_npc_registry_llm.v1.json
repair_attempts: 1

View File

@@ -1,7 +1,6 @@
prompts: prompts:
dnd.npc_registry.normalize: - id: dnd.npc_registry.normalize
v1: default_profile: notarius/dnd-extraction
default_profile: dnd-extraction
inputs: inputs:
- name: candidates - name: candidates
required: true required: true
@@ -11,21 +10,20 @@ prompts:
content_type: application/json content_type: application/json
messages: messages:
- role: system - role: system
content_file: ./sharedassets/common-dnd-system.md content_file: ../../../shared/prompts/common-dnd-system.md
- role: user - role: user
content_file: ./sharedassets/protocol.md content_file: ../../../../generic/normalize/deduplication/prompts/protocol.md
- role: user - role: user
content_file: ./instructions.md content_file: ./instructions.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/candidates.md content_file: ../../../../generic/normalize/deduplication/prompts/candidates.md
- role: user - role: user
content_file: ./sharedassets/transcript-windows.md content_file: ../../../../generic/normalize/deduplication/prompts/transcript-windows.md
cache_control: cache_control:
type: ephemeral type: ephemeral
output: output:
format: json format: json
validation_mode: json_schema validation_mode: json_schema
schema_path: semantic_reconciliation_llm.v1.json schema_path: generic/normalize/deduplication/schemas/semantic_reconciliation_llm.v1.json
repair_attempts: 1

View File

@@ -1,5 +1,5 @@
profiles: profiles:
dnd-extraction: - id: dnd-extraction
backend: openrouter backend: openrouter
model: openai/gpt-5.6-luna model: openai/gpt-5.6-luna
timeout_seconds: 240 timeout_seconds: 240

View File

@@ -1,7 +1,6 @@
prompts: prompts:
dnd.scene_descriptions: - id: dnd.scene_descriptions
v1: default_profile: notarius/dnd-extraction
default_profile: dnd-extraction
inputs: inputs:
- name: transcript - name: transcript
required: true required: true
@@ -17,19 +16,19 @@ prompts:
content_type: text/plain content_type: text/plain
messages: messages:
- role: system - role: system
content_file: ./sharedassets/common-dnd-system.md content_file: ../../shared/prompts/common-dnd-system.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-identity.md content_file: ../../shared/prompts/common-dnd-identity.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-references.md content_file: ../../shared/prompts/common-dnd-references.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/common-dnd-transcript-chunk.md content_file: ../../shared/prompts/common-dnd-transcript-chunk.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/common-dnd-scene-combat-policy.md content_file: ../../shared/prompts/common-dnd-scene-combat-policy.md
- role: user - role: user
content_file: ./instructions.md content_file: ./instructions.md
cache_control: cache_control:
@@ -37,5 +36,4 @@ prompts:
output: output:
format: json format: json
validation_mode: json_schema validation_mode: json_schema
schema_path: dnd_scene_descriptions_llm.v1.json schema_path: dnd/scene-descriptions/schemas/dnd_scene_descriptions_llm.v1.json
repair_attempts: 1

View File

@@ -1,24 +1,22 @@
prompts: prompts:
dnd.scene_descriptions.validate_combat: - id: dnd.scene_descriptions.validate_combat
v1: default_profile: notarius/dnd-extraction
default_profile: dnd-extraction
inputs: inputs:
- name: transcript - name: transcript
required: true required: true
content_type: application/json content_type: application/json
messages: messages:
- role: system - role: system
content_file: ./sharedassets/common-dnd-system.md content_file: ../../../../shared/prompts/common-dnd-system.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-scene-combat-policy.md content_file: ../../../../shared/prompts/common-dnd-scene-combat-policy.md
- role: user - role: user
content_file: ./instructions.md content_file: ./instructions.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-transcript-chunk.md content_file: ../../../../shared/prompts/common-dnd-transcript-chunk.md
cache_control: cache_control:
type: ephemeral type: ephemeral
output: output:
format: json format: json
validation_mode: json_schema validation_mode: json_schema
schema_path: dnd_scene_combat_semantics_llm.v1.json schema_path: dnd/scene-descriptions/validate/combat-semantics/schemas/dnd_scene_combat_semantics_llm.v1.json
repair_attempts: 1

View File

@@ -1,7 +1,6 @@
prompts: prompts:
dnd.scenes: - id: dnd.scenes
v1: default_profile: notarius/dnd-extraction
default_profile: dnd-extraction
inputs: inputs:
- name: transcript - name: transcript
required: true required: true
@@ -17,19 +16,18 @@ prompts:
content_type: text/plain content_type: text/plain
messages: messages:
- role: system - role: system
content_file: ./sharedassets/common-dnd-system.md content_file: ../../shared/prompts/common-dnd-system.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-references.md content_file: ../../shared/prompts/common-dnd-references.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./instructions.md content_file: ./instructions.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-transcript-full.md content_file: ../../shared/prompts/common-dnd-transcript-full.md
cache_control: cache_control:
type: ephemeral type: ephemeral
output: output:
format: json format: json
validation_mode: json_schema validation_mode: json_schema
schema_path: dnd_scenes_llm.v1.json schema_path: dnd/scenes/schemas/dnd_scenes_llm.v1.json
repair_attempts: 1

View File

@@ -1,7 +1,6 @@
prompts: prompts:
dnd.spells: - id: dnd.spells
v1: default_profile: notarius/dnd-extraction
default_profile: dnd-extraction
inputs: inputs:
- name: transcript - name: transcript
required: true required: true
@@ -23,21 +22,21 @@ prompts:
content_type: application/json content_type: application/json
messages: messages:
- role: system - role: system
content_file: ./sharedassets/common-dnd-system.md content_file: ../../shared/prompts/common-dnd-system.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-identity.md content_file: ../../shared/prompts/common-dnd-identity.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-references.md content_file: ../../shared/prompts/common-dnd-references.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/common-dnd-transcript-chunk.md content_file: ../../shared/prompts/common-dnd-transcript-chunk.md
cache_control: cache_control:
type: ephemeral type: ephemeral
- role: user - role: user
content_file: ./sharedassets/common-dnd-extraction-evidence.md content_file: ../../shared/prompts/common-dnd-extraction-evidence.md
- role: user - role: user
content_file: ./sharedassets/common-dnd-npc-registry.md content_file: ../../shared/prompts/common-dnd-npc-registry.md
- role: user - role: user
content_file: ./spell-catalog.md content_file: ./spell-catalog.md
- role: user - role: user
@@ -47,5 +46,4 @@ prompts:
output: output:
format: json format: json
validation_mode: json_schema validation_mode: json_schema
schema_path: dnd_spells_llm.v1.json schema_path: dnd/spells/schemas/dnd_spells_llm.v1.json
repair_attempts: 1

View File

@@ -1,6 +1,5 @@
prompts: prompts:
generic.semantic_reconciliation: - id: generic.semantic_reconciliation
v1:
inputs: inputs:
- name: candidates - name: candidates
required: true required: true
@@ -24,5 +23,4 @@ prompts:
output: output:
format: json format: json
validation_mode: json_schema validation_mode: json_schema
schema_path: semantic_reconciliation_llm.v1.json schema_path: generic/normalize/deduplication/schemas/semantic_reconciliation_llm.v1.json
repair_attempts: 1

57
assets/notarius.yml Normal file
View File

@@ -0,0 +1,57 @@
config:
imports:
- path: dnd/combat-turns/prompts/prompt.yaml
destination: [promptkit, collections, notarius]
required: true
- path: dnd/enemy-events/prompts/prompt.yaml
destination: [promptkit, collections, notarius]
required: true
- path: dnd/item-occurrences/prompts/prompt.yaml
destination: [promptkit, collections, notarius]
required: true
- path: dnd/item-registry/extract/prompts/prompt.yaml
destination: [promptkit, collections, notarius]
required: true
- path: dnd/item-registry/normalize/prompts/prompt.yaml
destination: [promptkit, collections, notarius]
required: true
- path: dnd/location-occurrences/prompts/prompt.yaml
destination: [promptkit, collections, notarius]
required: true
- path: dnd/location-registry/extract/prompts/prompt.yaml
destination: [promptkit, collections, notarius]
required: true
- path: dnd/location-registry/normalize/prompts/prompt.yaml
destination: [promptkit, collections, notarius]
required: true
- path: dnd/npc-occurrences/prompts/prompt.yaml
destination: [promptkit, collections, notarius]
required: true
- path: dnd/npc-registry/extract/prompts/prompt.yaml
destination: [promptkit, collections, notarius]
required: true
- path: dnd/npc-registry/normalize/prompts/prompt.yaml
destination: [promptkit, collections, notarius]
required: true
- path: dnd/scene-descriptions/prompts/prompt.yaml
destination: [promptkit, collections, notarius]
required: true
- path: dnd/scene-descriptions/validate/combat-semantics/prompts/prompt.yaml
destination: [promptkit, collections, notarius]
required: true
- path: dnd/scenes/prompts/prompt.yaml
destination: [promptkit, collections, notarius]
required: true
- path: dnd/spells/prompts/prompt.yaml
destination: [promptkit, collections, notarius]
required: true
- path: generic/normalize/deduplication/prompts/prompt.yaml
destination: [promptkit, collections, notarius]
required: true
- path: dnd/profiles/dnd-extraction.yaml
destination: [promptkit, collections, notarius]
required: true
promptkit:
collections:
notarius:
schema_root: .

View File

@@ -6,7 +6,7 @@ import (
"io/fs" "io/fs"
) )
//go:embed dnd generic //go:embed notarius.yml dnd generic
var embedded embed.FS var embedded embed.FS
// FS returns the embedded read-only asset filesystem. // FS returns the embedded read-only asset filesystem.

159
assets/package_test.go Normal file
View File

@@ -0,0 +1,159 @@
package assets_test
import (
"context"
"encoding/json"
"errors"
"fmt"
"io/fs"
"path"
"reflect"
"strings"
"testing"
"gitea.maximumdirect.net/eric/notarius/assets"
"go.maximumdirect.net/configkit"
"go.maximumdirect.net/promptkit"
"go.yaml.in/yaml/v4"
)
type assetSettings struct {
PromptKit promptkit.Settings `yaml:"promptkit"`
}
type noGeneration struct{ t *testing.T }
func (client noGeneration) Generate(context.Context, promptkit.GenerateRequest) (*promptkit.GenerateResponse, error) {
client.t.Error("resource preparation unexpectedly invoked generation")
return nil, fmt.Errorf("unexpected generation")
}
func loadNativeAssets(t *testing.T) (*configkit.Result[assetSettings], *promptkit.Engine) {
t.Helper()
filesystem := configkit.NewFilesystem("Notarius assets", assets.FS())
definition := promptkit.Configure(configkit.Definition[assetSettings]{}, func(value *assetSettings) *promptkit.Settings { return &value.PromptKit })
result, err := configkit.LoadLayered(configkit.Input{Source: configkit.NoSource()}, configkit.LayeredOptions[assetSettings]{
Definition: definition,
Underlays: []configkit.Underlay{
promptkit.BundledOpenRouterUnderlay(),
{Inputs: []configkit.Input{{
Source: filesystem.File("notarius.yml"), Imports: true,
Filesystem: &configkit.FilesystemContext{FS: &filesystem, Root: "."},
}}},
},
})
if err != nil {
var loadError *configkit.LoadError
if errors.As(err, &loadError) {
for _, diagnostic := range loadError.Diagnostics() {
t.Logf("%+v", diagnostic)
}
}
t.Fatal(err)
}
engine, err := promptkit.NewFromConfig(result, promptkit.RuntimeConfig{}, promptkit.WithLLMClient(noGeneration{t}))
if err != nil {
t.Fatal(err)
}
return result, engine
}
func TestEmbeddedPromptsPrepareWithNativeContracts(t *testing.T) {
t.Parallel()
_, engine := loadNativeAssets(t)
// Discover the actual declarations as well as the composed inventory, so an
// accidentally omitted import cannot silently remove a module's coverage.
err := fs.WalkDir(assets.FS(), ".", func(file string, entry fs.DirEntry, err error) error {
if err != nil {
return err
}
if entry.IsDir() || path.Base(file) != "prompt.yaml" {
return nil
}
data, err := fs.ReadFile(assets.FS(), file)
if err != nil {
return err
}
var declared struct {
Prompts []promptkit.PromptSettings `yaml:"prompts"`
}
if err := yaml.Unmarshal(data, &declared); err != nil {
return err
}
if len(declared.Prompts) == 0 {
return fmt.Errorf("%s has no native prompts", file)
}
for _, prompt := range declared.Prompts {
t.Run(prompt.ID, func(t *testing.T) {
inputs := make(map[string]promptkit.ArtifactRef)
for _, input := range prompt.Inputs {
inputs[input.Name] = promptkit.Inline(input.Name + "-fixture")
}
request := promptkit.RunRequest{PromptID: "notarius/" + prompt.ID, Inputs: inputs, APIKey: "fixture-key"}
if prompt.DefaultProfile == nil {
request.ProfileID = "notarius/dnd-extraction"
}
prepared, err := engine.PrepareExecution(context.Background(), request)
if err != nil {
t.Fatal(err)
}
defer prepared.Discard()
details := prepared.Details()
if details.OutputContract.Format != promptkit.FormatJSON || details.OutputContract.ValidationMode != promptkit.ValidationJSONSchema || details.StructuredOutput == nil || details.StructuredOutput.JSONSchema == nil {
t.Fatalf("missing native schema contract: %#v", details.OutputContract)
}
// Preparation must load the real self-contained schema, not merely retain
// a filename or use a separate application schema registry.
schemaBytes, err := fs.ReadFile(assets.FS(), details.OutputContract.SchemaPath)
if err != nil {
t.Fatal(err)
}
var expected any
if err := json.Unmarshal(schemaBytes, &expected); err != nil {
t.Fatal(err)
}
actualBytes, err := json.Marshal(details.StructuredOutput.JSONSchema.Schema)
if err != nil {
t.Fatal(err)
}
var actual any
if err := json.Unmarshal(actualBytes, &actual); err != nil {
t.Fatal(err)
}
if !reflect.DeepEqual(actual, expected) {
t.Fatal("prepared schema differs from the owned asset")
}
first := prompt.Messages[0]
if first.ContentFile == nil {
t.Fatal("expected a source-relative initial message")
}
content, err := fs.ReadFile(assets.FS(), path.Join(path.Dir(file), *first.ContentFile))
if err != nil {
t.Fatal(err)
}
if len(details.Messages) == 0 || details.Messages[0].Role != "system" || strings.TrimSpace(details.Messages[0].Content) != strings.TrimSpace(string(content)) {
t.Fatal("shared initial system context was not preserved")
}
})
}
return nil
})
if err != nil {
t.Fatal(err)
}
}
func TestEmbeddedProfileRetainsSelectedExecutionDefaults(t *testing.T) {
t.Parallel()
_, engine := loadNativeAssets(t)
profile, err := engine.InspectProfile(context.Background(), "notarius/dnd-extraction")
if err != nil {
t.Fatal(err)
}
if profile.Backend == nil || *profile.Backend != "openrouter" ||
profile.Model == nil || *profile.Model != "openai/gpt-5.6-luna" ||
profile.TimeoutSeconds == nil || *profile.TimeoutSeconds != 240 ||
profile.ServiceTier == nil || *profile.ServiceTier != "flex" || profile.ReasoningEffort != nil {
t.Fatalf("changed extraction defaults: %#v", profile)
}
}

View File

@@ -214,6 +214,16 @@ worker positivity, and explicit-empty path behavior.
## Stage 4: Convert Embedded Initial Resources And Schema Declarations ## Stage 4: Convert Embedded Initial Resources And Schema Declarations
**Status:** Complete. Converted all 16 initial/validator/reconciliation prompt
declarations and the extraction profile to native identified lists. The embedded
`assets/notarius.yml` imports them into the `notarius` collection with its own
filesystem-rooted schemas. Real shared-file paths replace virtual mounts; schema
bytes, prose, message order, and cache hints are unchanged. Native offline loading
and preparation of every declaration pass in `GOWORK=off go test ./assets`,
including exact loaded-schema comparisons and selected profile defaults.
`git diff --check` passed. Module caller/manifest migration remains in its assigned
later stages; no intermediate whole-tree compilation claim is made.
**Goal:** native declarations become the only default prompt/schema assembly. **Goal:** native declarations become the only default prompt/schema assembly.
**Inspect/change:** existing `assets/**/prompts/prompt.yaml`, **Inspect/change:** existing `assets/**/prompts/prompt.yaml`,