857 Commits

Author SHA1 Message Date
e8d3ad35af Remove completed kit upgrade plans 2026-11-23 03:58:08 +00:00
06f8fcb66f Record completed observability upgrade and final verification 2026-11-23 02:59:05 +00:00
aace4e98e9 Refresh operator guidance and selected native kit links 2026-11-23 02:52:11 +00:00
9825ee75fd Document consumer-owned execution observation and its architecture decision 2026-11-23 02:48:37 +00:00
00fc11360e Verify native provider accounting and smoke reports with local HTTP 2026-11-23 02:46:25 +00:00
63beae814b Verify native usage reporting across recovery and delivery boundaries 2026-11-23 02:43:43 +00:00
7aa4f2ec4d Use native contexts for execution observation 2026-11-23 02:38:21 +00:00
88ebdbd819 Move native debug accounting into the CLI capture lifecycle 2026-11-23 02:35:19 +00:00
051a91e397 Upgrade native kits and refresh their source notices 2026-11-23 02:33:40 +00:00
176052a244 Plan the native kit observability upgrade 2026-11-23 02:29:37 +00:00
1483e8e0d1 Plan architecture alignment for native observation 2026-11-23 02:21:58 +00:00
5d3a3b5956 Simplify observability upgrade ownership and implementation plan 2026-11-23 02:16:57 +00:00
447110a939 Adopt upstream documentation ownership guidance 2026-11-23 02:05:15 +00:00
5f03a6f469 Link upstream documentation for adopted kit features 2026-11-23 00:54:35 +00:00
6fbfee8bdf Plan native kit observability upgrades 2026-11-23 00:48:41 +00:00
7faa4a0506 Remove completed planning documents 2026-11-22 09:51:45 +00:00
f069a10c78 Assemble lane results in chunk order without sorting 2026-11-22 09:49:08 +00:00
c8250089b1 Index debug sensitivity paths once per capture 2026-11-22 09:43:22 +00:00
80148ef7e4 Share a lazy source index across cache hits 2026-11-22 09:42:06 +00:00
2429f0ae6a Index source positions during chunk plan validation 2026-11-22 09:40:42 +00:00
7ee7b997f0 Remove unused legacy LLM error definitions 2026-11-22 09:39:50 +00:00
dd25838589 Keep long fallback reasons from invalidating warnings 2026-11-22 09:38:24 +00:00
9074547e33 Keep cached scene identities aligned with the current plan 2026-11-22 09:37:16 +00:00
8ea96dc7a4 Clarify validation behavior when chains are replaced 2026-11-22 09:32:32 +00:00
581229cd1f Preserve operational timeouts when selecting run failures 2026-11-22 09:32:16 +00:00
e823baf3af Record algorithmic scaling opportunities 2026-11-22 09:28:59 +00:00
fdaf39162b Record native migration integration gaps 2026-11-22 09:00:55 +00:00
fd134e85e5 Record the native migration review findings 2026-11-22 08:15:09 +00:00
75444b8ef3 Verify the native cutover and complete the implementation roadmap 2026-11-22 07:11:50 +00:00
633ebd282f Refresh native workflow orientation and planning status 2026-11-22 06:57:27 +00:00
b76d511571 Document native kit integration contracts and ownership 2026-11-22 06:52:56 +00:00
aa4ce04683 Refresh typed module and D&D contributor recipes 2026-11-22 06:48:55 +00:00
41f6079040 Refresh pipeline execution and run state internal guides 2026-11-22 06:45:28 +00:00
5db09d0203 Refresh native configuration, CLI, and LLM internal guides 2026-11-22 06:41:22 +00:00
2c27695df9 Update native operations, consumer migration, and version checks 2026-11-22 06:32:22 +00:00
5e58327032 Rewrite configuration and CLI references for native commands 2026-11-22 06:20:54 +00:00
3cf389db78 Record native architecture decisions and align ownership policy 2026-11-22 06:11:57 +00:00
5b6854e975 Verify native recovery, fallback reuse boundaries, and operator schemas 2026-11-22 06:00:52 +00:00
854d23b91e Migrate maintained D&D examples to native configuration 2026-11-22 05:45:31 +00:00
3ef55f4668 Finish native migration cleanup and restore whole-tree compilation 2026-11-22 05:37:15 +00:00
4fa437aee8 Migrate ordered enemy event contracts to native providers 2026-11-22 05:29:48 +00:00
936fc1e72a Migrate run state and reference contracts to native execution 2026-11-22 05:24:30 +00:00
5cfcf10a8b Migrate configuration and command tests to native inspection 2026-11-22 05:16:24 +00:00
21bcb4eb3b Migrate assembled spell and catalog contracts to native correction 2026-11-22 05:07:00 +00:00
5e68b74469 Exercise production CLI contracts through native loaders and providers 2026-11-22 05:01:09 +00:00
572b267c5d Migrate combat and grounded pipeline integration tests to native execution 2026-11-22 04:54:27 +00:00
562dfad5cd Migrate ordered NPC and location handoff tests to native execution 2026-11-22 04:45:39 +00:00
0ad73ff575 Exercise spell and NPC integration through native providers and published artifacts 2026-11-22 04:39:55 +00:00
20c0975d9d Move cross-family runner contracts into module integration tests 2026-11-22 04:33:28 +00:00
93d94fdd0a Migrate framework tests to native producer and artifact contracts 2026-11-22 04:28:48 +00:00
0b46f2d37c Remove retired runtime wrappers and persistent cache machinery 2026-11-22 04:19:23 +00:00
a8d256f676 Report completed runs through native presentation and preserve failure outcomes 2026-11-22 04:05:44 +00:00
0cbc2b39cb Wire native pipeline run commands and invocation-wide overrides 2026-11-22 03:51:08 +00:00
2a9c5a6075 Add offline pipeline inspection and shared native resource preflight 2026-11-22 03:32:31 +00:00
9f66421f4f Capture native execution facts and complete scoped debug evidence 2026-11-22 03:19:43 +00:00
8680060400 Record debug evidence in one run-scoped capture session 2026-11-22 02:49:48 +00:00
584b041e57 Publish domain artifacts without reporting sidecars 2026-11-22 02:34:40 +00:00
3b1b4c9bcf Unify chunk-plan caching and remove checkpoint execution paths 2026-11-22 02:24:45 +00:00
36906cb3d1 Cache final typed producer artifacts under the initial native request hash 2026-11-22 02:10:05 +00:00
3ef55b1cf0 Add a best-effort accepted-artifact filesystem cache 2026-11-22 01:52:21 +00:00
37e0753472 Format migrated worker fields in integration fixtures 2026-11-22 01:45:48 +00:00
9a527b77c4 Unify ready pipeline jobs under one worker pool and remove the global LLM scheduler 2026-11-22 01:45:31 +00:00
b47208bd57 Make production registration asset-free and verify direct deterministic execution 2026-11-22 01:35:23 +00:00
433ed420f8 Migrate scene descriptions to native correction with invariant-preserving final fallbacks 2026-11-22 01:26:49 +00:00
3fa593362d Migrate enemy events to native correction with fixed multi-artifact grounding 2026-11-22 01:20:46 +00:00
bb3153c1ad Migrate combat turns to native correction and retain deterministic scene gating 2026-11-22 01:13:57 +00:00
1fe231b6fb Migrate item occurrences to native correction while preserving holder semantics 2026-11-22 01:08:02 +00:00
2c1d727232 Migrate NPC and location occurrences to native correction and explicit empty fallbacks 2026-11-22 01:03:06 +00:00
303d6589c5 Migrate registry extraction to native correction and explicit empty fallbacks 2026-11-22 00:50:54 +00:00
5d3696d4a0 Migrate combat semantics validation to native execution and unavailable assessments 2026-11-22 00:42:20 +00:00
52a1c96327 Migrate scene planning to native continuation and whole-source fallback 2026-11-22 00:34:33 +00:00
4f82d01534 Migrate NPC and location normalization to native correction and explicit fallback handling 2026-11-22 00:27:34 +00:00
772b8619c1 Migrate item normalization to native correction and explicit fallback handling 2026-11-22 00:17:58 +00:00
2348730820 Separate reconciliation preparation and proposal assessment from native execution 2026-11-22 00:07:05 +00:00
92c2382806 Migrate spell extraction to native execution and semantic continuation 2026-11-22 00:02:13 +00:00
923cbe594f Bind runner assessment and propagate fallback reuse eligibility 2026-11-21 23:48:51 +00:00
44e4fb92c2 Run typed producers through native continuation and assessment 2026-11-21 23:30:45 +00:00
c56c7d7ee9 Centralize candidate assessment and explicit producer fallback handling 2026-11-21 23:20:17 +00:00
797320b4da Define typed producer assessment and native execution dependencies 2026-11-21 23:12:01 +00:00
b899ee32a6 Install native PromptKit diagnostics and reusable execution overrides 2026-11-21 23:02:57 +00:00
91869ba191 Compose native application commands and shared configuration scopes 2026-11-21 22:59:46 +00:00
a1c888d2cd Share one native application configuration load and captured engine 2026-11-21 22:56:14 +00:00
a0274e154b Declare embedded prompts profiles and schemas with native kit resources 2026-11-21 22:52:46 +00:00
87d362e2d7 Validate pipeline controls in the typed validation callback 2026-11-21 22:49:53 +00:00
40fbcc61b1 Resolve producer modes turn allowances cache controls and shared workers 2026-11-21 22:49:41 +00:00
cc14a7a5cc Load native PromptKit settings through application configuration version six 2026-11-21 22:42:35 +00:00
bd30e86c0d Select native kit releases and update dependency attribution 2026-11-21 22:39:39 +00:00
c480ad68a1 Plan the native PromptKit and CommandKit migration 2026-11-21 22:24:16 +00:00
b3664d5879 Clarify roadmap consistency before native implementation 2026-11-21 21:58:06 +00:00
3f51764f1e Update native migration roadmap for reviewed upstream releases 2026-11-21 21:51:23 +00:00
5359cba98d Resolve completion reporting and publication contracts 2026-11-21 02:36:14 +00:00
058703abe5 Resolve unified cache configuration and legacy migration 2026-11-20 18:59:02 +00:00
254401e5f6 Resolve shared worker pool and native admission policy 2026-11-20 17:32:50 +00:00
1292ed8c4b Resolve mode precedence and whole-transcript fallback 2026-11-20 16:19:23 +00:00
baec913ef5 Select strict mode as the universal pipeline default 2026-11-20 16:13:27 +00:00
89a5398771 Define strict and permissive outcomes with module fallbacks 2026-11-20 16:07:55 +00:00
498f468f4f Resolve removal of generic non-LLM retries 2026-11-20 15:38:21 +00:00
e737167730 Set semantic turn defaults and delegate structural repair upstream 2026-11-20 15:34:05 +00:00
b904021138 Resolve native correction prompts and validator guidance ownership 2026-11-20 14:42:26 +00:00
2d69c26813 Consolidate migration planning into the master roadmap 2026-11-20 13:06:52 +00:00
f883316d7a Resolve native module execution and pipeline assessment design 2026-11-20 12:57:33 +00:00
0833450c71 Resolve native prompt asset and schema design 2026-11-20 12:45:00 +00:00
2eaea2b1fd Consolidate the native migration roadmap and simplified cache design 2026-11-20 03:42:51 +00:00
c03d0bb987 Simplify the planned artifact output and completion report 2026-11-20 03:28:14 +00:00
305a88e8f4 Replace checkpoint proposals with accepted-artifact caching 2026-11-20 03:10:16 +00:00
98ba7e1f55 Define empty debug directory as disabling capture 2026-11-20 01:10:58 +00:00
1601b535ff Settle debug capture inventory and depth 2026-11-20 00:56:29 +00:00
cbf3d1acc2 Clarify settled CommandKit decisions and remaining choices 2026-11-20 00:51:58 +00:00
3c73ccfad0 Record CommandKit verification and migration plan 2026-11-20 00:48:29 +00:00
d9e1d1e4a7 Prioritize convenient debug representations 2026-11-19 19:07:57 +00:00
5618adea8e Record debug bundle organization and latest symlink 2026-11-19 18:55:24 +00:00
9c4c2fc88d Select temporary debug directory default 2026-11-19 18:47:12 +00:00
d11d379bd4 Clarify debug defaults and operator data handling 2026-11-19 18:38:43 +00:00
a299869fcc Record conditional debug capture and diagnostic design 2026-11-19 18:27:51 +00:00
27081bc0af Record native reporting machine output and outcomes 2026-11-19 18:13:08 +00:00
6fa520f8f3 Record native composition loaders and preflight design 2026-11-19 18:05:41 +00:00
5cdbc5400f Record native run alias for pipeline execution 2026-11-19 17:47:40 +00:00
b038cc1a59 Record native pipeline commands and input conventions 2026-11-19 16:19:48 +00:00
93dd406459 Record CommandKit versions and standard capability scope 2026-11-19 16:04:23 +00:00
b04fe98c9e Record full CommandKit-native CLI cutover direction 2026-11-19 15:55:46 +00:00
8feece01db Start CommandKit migration discussion notepad 2026-11-19 15:51:31 +00:00
d17d261d62 Rewrite roadmap for PromptKit-native architecture 2026-11-19 15:27:08 +00:00
12eeb6369e Record simpler PromptKit-native application design 2026-11-19 15:17:38 +00:00
3fb8cb7392 Record inspection and execution bookkeeping ownership 2026-11-19 14:59:56 +00:00
3e1abc7fbb Record simpler checkpoint reuse policy 2026-11-19 14:49:36 +00:00
40cd4fe97d Record agreement to retire the global LLM scheduler 2026-11-18 20:04:48 +00:00
ae8e3ec698 Record agreement on native continuation and retry ownership 2026-11-18 19:54:55 +00:00
8fb21b7dae Record native continuation direction and retry simplifications 2026-11-18 19:48:00 +00:00
5a527c789d Record Audita PromptKit workflow review and architectural implications 2026-11-18 19:10:53 +00:00
abecb349e4 Record agreement on native prompt assembly and deferred schema decisions 2026-11-18 19:04:45 +00:00
defe123955 Outline native PromptKit asset assembly for discussion 2026-11-18 19:00:55 +00:00
69c4054eea Record the PromptKit-native architectural direction 2026-11-18 18:58:21 +00:00
af250eb72f Add PromptKit architecture discussion notepad 2026-11-18 18:52:49 +00:00
0ef079610e Defer operator diagnostics to CommandKit 2026-11-18 18:38:34 +00:00
d1d2394729 Define the offline preflight boundary 2026-11-18 15:28:38 +00:00
63e26dc203 Use PromptKit companion files and namespaced defaults 2026-11-18 15:21:56 +00:00
fe44b12073 Draft the PromptKit upgrade roadmap 2026-11-18 15:09:05 +00:00
65b8e8f0a2 Retire the completed ConfigKit upgrade plans 2026-11-18 14:31:30 +00:00
76364a7b7e Cache source directories during configuration normalization 2026-11-18 00:36:26 +00:00
1c93aa0947 Verify record inheritance through pipeline resolution 2026-11-18 00:32:13 +00:00
1febd2edfa Clarify native imported step ordering 2026-11-18 00:31:11 +00:00
5e269f9760 Distinguish mapping and record inheritance syntax 2026-11-18 00:30:57 +00:00
fb58aef8c2 Restore the accepted workload profile decision text 2026-11-18 00:30:41 +00:00
3f9727d5e8 Clarify PromptKit capture and preparation behavior 2026-11-18 00:30:24 +00:00
0663fe566a Validate explanation pointers before loading configuration 2026-11-18 00:29:56 +00:00
347ef05b41 Compose application assets in one strict group 2026-11-18 00:28:45 +00:00
068a4b1b5a Record ConfigKit source lookup scaling opportunity 2026-11-18 00:25:26 +00:00
b396581d21 Record ConfigKit inheritance integration findings 2026-11-17 23:52:27 +00:00
6f0a75e7cf Record ConfigKit upgrade review findings 2026-11-17 22:05:49 +00:00
d88a01cec0 Clarify native ConfigKit discovery in the roadmap 2026-11-17 21:59:54 +00:00
c9744ad2e6 Complete ConfigKit upgrade verification 2026-11-17 21:00:27 +00:00
74e0f454e9 Document ConfigKit integration and dependency attribution 2026-11-17 20:58:22 +00:00
244f258413 Document native configuration and toolchain requirements 2026-11-17 20:56:06 +00:00
5bab35f096 Compose the complete example from native step fragments 2026-11-17 20:54:47 +00:00
8136b4814f Verify configuration discovery and provenance 2026-11-17 20:53:07 +00:00
349ace0528 Delegate configuration discovery to ConfigKit 2026-11-17 20:51:06 +00:00
716bc62991 Update configuration fixtures for native composition 2026-11-17 20:50:07 +00:00
61ceab786c Compose pipeline steps using native identities 2026-11-17 20:48:05 +00:00
2d1fa57d9b Preserve source paths during field normalization 2026-11-17 20:44:07 +00:00
6da4d070e5 Migrate application configuration to the new ConfigKit API 2026-11-17 20:42:25 +00:00
ae0e410875 Select the ConfigKit upgrade toolchain and dependencies 2026-11-17 20:39:48 +00:00
79088a3546 Plan the ConfigKit native configuration upgrade 2026-11-17 20:35:04 +00:00
2c8b63187c Adopt native configuration search precedence in the roadmap 2026-11-17 20:27:56 +00:00
2b278c4074 Settle the ConfigKit upgrade scope and decisions 2026-11-17 20:25:26 +00:00
db32d31708 Plan adoption of current ConfigKit configuration semantics 2026-11-17 20:19:32 +00:00
b9899ea3cc Update adopted policies to the current upstream standard 2026-11-17 20:09:48 +00:00
66fa5585c1 Clarify ConfigKit configuration ownership 2026-10-04 18:58:10 +00:00
e690cae24f Record PromptKit migration review findings 2026-10-04 15:24:35 +00:00
6700ed2188 Complete PromptKit migration verification 2026-10-04 14:17:30 +00:00
4aba4f5672 Document PromptKit configuration ownership and capture 2026-10-04 14:12:11 +00:00
169a94f7ea Document PromptKit source composition and deployment 2026-10-04 14:04:32 +00:00
db8acbea43 Add resolved PromptKit profile inspection 2026-10-04 13:54:17 +00:00
79154882b8 Add scoped PromptKit configuration reports 2026-10-04 13:47:00 +00:00
c848befb53 Expose provider-neutral PromptKit inspection 2026-10-04 13:26:54 +00:00
a904e4d841 Verify PromptKit content origins and capture lifetime 2026-10-04 13:15:40 +00:00
7ea9fe12b9 Protect captured PromptKit checkpoint identity 2026-10-04 13:08:56 +00:00
deaa3560bc Capture immutable PromptKit configuration identity 2026-10-04 12:59:29 +00:00
ef504eabb2 Test native PromptKit source composition and credential policy 2026-10-04 12:46:23 +00:00
ec2ac3369b Migrate CLI and module tests to keyed PromptKit sources 2026-10-04 12:29:55 +00:00
8a8ca6d83c Migrate LLM fixtures to keyed PromptKit sources 2026-10-04 12:15:26 +00:00
30509f9d33 Use unified PromptKit sources for execution and preflight 2026-10-04 12:00:15 +00:00
28aab5e9a4 Upgrade PromptKit and assemble native configuration sources 2026-10-04 11:57:31 +00:00
ea403c8094 Migrate PromptKit definition assets to keyed format 2026-10-04 11:48:45 +00:00
f5b066beee Plan the PromptKit upgrade and configuration inspection 2026-10-04 11:38:01 +00:00
aae01a59ce Add operator-facing PromptKit inspection to the roadmap 2026-10-04 11:13:33 +00:00
71cf084e8b Adopt native PromptKit configuration capabilities in the roadmap 2026-10-04 11:11:40 +00:00
e327a5eef7 Plan the PromptKit configuration upgrade 2026-10-04 00:34:43 +00:00
af62b3bacc Include transcript input in the development command example 2026-10-04 00:24:04 +00:00
e1097cc7a5 Make inherited path tests distinguish source directories 2026-10-04 00:22:13 +00:00
3f226c91d0 Record ConfigKit inheritance review findings 2026-10-04 00:18:32 +00:00
64509947df Complete ConfigKit inheritance implementation 2026-10-03 18:17:28 +00:00
29c7c165a5 Add development pipeline inheritance example 2026-10-03 18:15:12 +00:00
4ef69314e1 Exercise inherited pipeline CLI behavior 2026-10-03 18:08:07 +00:00
1d1434b118 Retain inherited configuration inspection provenance 2026-10-03 18:03:40 +00:00
f4779fede9 Preserve inherited reference path origins 2026-10-03 17:58:48 +00:00
01c08ec8e4 Preserve inherited presence and validation 2026-10-03 17:55:58 +00:00
d7ea0fd32d Add pipeline inheritance coverage and guidance 2026-10-03 17:49:28 +00:00
ec99d48619 Upgrade ConfigKit to v0.5.0 2026-10-03 17:44:58 +00:00
9e74df0b6e Plan the ConfigKit inheritance upgrade 2026-10-03 17:33:13 +00:00
6e5e277426 Plan ConfigKit inheritance support 2026-10-03 17:16:41 +00:00
9790579b51 Prepare Notarius v0.8.1 source release 2026-09-28 03:04:04 +00:00
122f36bc68 Update ConfigKit and PromptKit to their latest patches 2026-09-28 02:31:31 +00:00
90c68dd725 Verify policy adoption and refine notice scope 2026-09-28 01:47:00 +00:00
b0085a1c3b Complete dependency notices and attribution links 2026-09-28 01:43:24 +00:00
eff69683d2 Attribute selected kits and backend catalogs 2026-09-28 01:38:01 +00:00
d4feccc456 Align architecture and source release policies 2026-09-28 01:35:01 +00:00
21c07d4ef0 Align general policies and contributor guidance 2026-09-28 01:32:50 +00:00
d9f8ff8179 Establish policy provenance and licensing notices 2026-09-28 01:31:08 +00:00
f6d7c7cef4 Plan the policy alignment work 2026-09-28 01:13:52 +00:00
ff9b05077c Update the policy alignment roadmap 2026-09-28 01:10:25 +00:00
1301c445bb Update kit dependencies and licensing references 2026-09-26 22:02:41 +00:00
7a7f12142f Plan licensing policy and attribution updates 2026-09-26 20:47:11 +00:00
658de79e96 Fix license name typos in COPYRIGHT 2026-09-26 20:38:50 +00:00
fc752b5860 Update COPYRIGHT and LICENSE contents to align with the house standard 2026-09-26 15:02:11 -05:00
44eba766d6 Prepare version 0.8.0 release 2026-09-26 01:36:32 +00:00
f1566d557c Verify retry accounting and execution summary propagation 2026-09-26 01:07:31 +00:00
1d29b321dd Record remaining kit upgrade verification work 2026-09-25 23:59:43 +00:00
7ac9d94f10 Verify ConfigKit and PromptKit upgrades 2026-09-25 22:04:55 +00:00
227c05b154 Document retry composition and preserve error summaries 2026-09-25 22:03:50 +00:00
b09ce47d4a Record execution summaries in debug artifacts 2026-09-25 22:02:56 +00:00
6b8a4408c1 Add LLM execution summaries 2026-09-25 22:01:16 +00:00
bd83255a8e Preserve LLM generation failure metadata 2026-09-25 21:59:15 +00:00
10ac29d149 Configure PromptKit transient retries 2026-09-25 21:56:29 +00:00
d29a5cecd3 Upgrade PromptKit runtime baseline 2026-09-25 21:49:44 +00:00
31b48d2d5e Rename configuration selection to overlays 2026-09-25 21:46:35 +00:00
8c0e93143f Plan the ConfigKit and PromptKit upgrade implementation 2026-09-25 21:05:02 +00:00
f0abc5d220 Plan ConfigKit and PromptKit upgrades 2026-09-25 20:56:46 +00:00
acec6dc15e Simplify source releases with one guarded publication command 2026-09-25 20:33:19 +00:00
cee254651f Align architecture documentation and testing policies with current standards 2026-09-25 20:26:34 +00:00
cc51b8470a Establish a dedicated agent policy 2026-09-25 20:25:36 +00:00
53d9284f0b Upgrade PromptKit and prepare version 0.7.1 2026-09-22 14:31:55 +00:00
4e77725b24 Prepare version 0.7.0 and retire completed configuration plans 2026-09-14 00:54:22 +00:00
c02eec74dd Update the validator example for version 5 configuration 2026-09-14 00:42:35 +00:00
6107adb140 Identify configuration source files in load errors 2026-09-14 00:41:41 +00:00
9c5e19c225 Preserve explicit worker counts when normalizing keys 2026-09-14 00:40:40 +00:00
04da64fe32 Validate explicit configuration branches before conversion 2026-09-14 00:39:47 +00:00
5f7923c758 Record configuration normalization at sequence boundaries 2026-09-14 00:38:50 +00:00
3010a918dc Finalize ConfigKit architecture documentation 2026-09-13 17:26:57 +00:00
19f1979bac Add composed development configuration example 2026-09-13 17:24:55 +00:00
339908c1e4 Remove legacy configuration machinery 2026-09-13 17:23:00 +00:00
467bbba3e1 Add configuration inspection commands 2026-09-13 17:16:06 +00:00
92a6a4985a Switch commands to ConfigKit configuration 2026-09-13 17:12:56 +00:00
d809085406 Prepare ConfigKit validation and listing commands 2026-09-13 16:51:46 +00:00
bb922f19d9 Prepare CLI loading for ConfigKit configuration 2026-09-13 16:50:40 +00:00
320de32a61 Resolve ConfigKit paths from declaration origins 2026-09-13 16:48:44 +00:00
69295d72c9 Publish redacted ConfigKit effective configuration 2026-09-13 16:43:32 +00:00
d770e19c17 Accept ConfigKit integers in module options 2026-09-13 16:41:14 +00:00
cf17dd7bd0 Convert ConfigKit documents to runtime configuration 2026-09-13 16:39:33 +00:00
9c247cf3a2 Validate ConfigKit pipeline documents 2026-09-13 16:35:46 +00:00
b1cd919605 Apply ConfigKit operational configuration defaults 2026-09-13 16:26:18 +00:00
b822e7f510 Add ConfigKit version 5 document boundary 2026-09-13 16:18:30 +00:00
c403a38b50 Update ConfigKit adoption plan for version 0.3.0 2026-09-13 15:49:26 +00:00
00972e8d48 Plan ConfigKit adoption and clarify implementation policy 2026-09-12 02:39:03 +00:00
946fa10764 Verify deployment-managed cache permissions 2026-09-11 15:06:29 +00:00
d2afa9dbd2 Document deployment-managed cache permissions 2026-09-11 15:04:54 +00:00
7498fda030 Apply deployment permissions to checkpoints 2026-09-11 15:03:39 +00:00
ea503acd42 Respect deployment permissions for chunk plans 2026-09-11 15:01:01 +00:00
153b1e4689 Add deployment-managed cache writer 2026-09-11 14:59:27 +00:00
7d9adc77ee Plan deployment-managed cache permissions 2026-09-11 14:24:51 +00:00
77ae132e56 Prepare the v0.6.0 release 2026-08-29 12:46:18 +00:00
deebc89255 Make command line references pipeline scoped 2026-08-29 12:34:31 +00:00
f208dbe954 Make combat scene validation more reliable 2026-08-29 11:39:02 +00:00
7e626753bf Clarify semantic reconciliation candidate numbers 2026-08-29 03:16:24 +00:00
917d150279 Improve D&D validation reliability 2026-08-29 01:24:45 +00:00
4da9360d74 Improve semantic reconciliation retries 2026-08-28 18:25:00 +00:00
5cab4e512e Improve item occurrence holder corrections 2026-08-28 14:37:22 +00:00
b178f1c684 Repair reversed D&D evidence ranges 2026-08-28 13:45:21 +00:00
a2610757cd Polish combat scene validation 2026-08-28 02:26:14 +00:00
3ad34956c5 Complete combat semantics validator verification 2026-08-28 00:24:35 +00:00
22e6caa2a0 Document combat semantics validator evaluation 2026-08-28 00:23:50 +00:00
9cb7462800 Test combat semantics correction flow 2026-08-28 00:22:56 +00:00
87385b7e14 Register optional combat semantics validator 2026-08-28 00:20:59 +00:00
0ae5ea7637 Implement combat semantics validator 2026-08-28 00:19:49 +00:00
6bc883dfb6 Add combat semantics validator prompt assets 2026-08-28 00:16:23 +00:00
fcfff3ad15 Extract shared D&D combat policy 2026-08-28 00:13:44 +00:00
0f2b23dce1 Plan combat scene validation 2026-08-27 23:26:59 +00:00
61436d7c18 Prepare the v0.5.0 release 2026-08-27 19:05:13 +00:00
079d5af337 Harden diagnostic handling and warning presentation 2026-08-27 18:41:59 +00:00
1025001f20 Complete diagnostic migration verification 2026-08-27 16:54:05 +00:00
da14924a02 Document diagnostic ownership and classification 2026-08-27 16:52:58 +00:00
2065a8288b Align debug summaries with diagnostics 2026-08-27 16:51:56 +00:00
af0119cc1d Add diagnostic counts to run receipts 2026-08-27 16:50:32 +00:00
54de2b816a Publish grouped warning and diagnostic files 2026-08-27 16:43:09 +00:00
4dbbf68051 Finalize structured diagnostic aggregation 2026-08-27 16:40:17 +00:00
480680b257 Classify remaining D&D producer diagnostics 2026-08-27 16:04:32 +00:00
6a1fd7bdb6 Classify registry normalization diagnostics 2026-08-27 15:57:29 +00:00
ccba2ce3f9 Classify source relatedness as data-quality advisories 2026-08-27 15:49:53 +00:00
1f1967c8d2 Persist diagnostics in reusable pipeline state 2026-08-27 15:40:45 +00:00
5175cb0722 Classify framework process diagnostics 2026-08-27 15:33:13 +00:00
ba569594a1 Transport structured diagnostics through the pipeline 2026-08-27 15:29:10 +00:00
acb04954eb Add diagnostic contract primitives 2026-08-27 15:19:56 +00:00
610dd3d7c3 Plan warning and diagnostic reform 2026-08-27 15:06:43 +00:00
e92bcfa74c Prepare the v0.4.0 release 2026-08-27 13:30:24 +00:00
e6b2ae88d2 Strengthen validation retries and checkpoint safety 2026-08-27 11:50:37 +00:00
b2e83bd6e7 Document feedback-aware validation retries 2026-08-27 01:35:23 +00:00
7f01c3e79e Add durable validation provenance 2026-08-27 01:27:25 +00:00
7b5f4ebd42 Apply validation retries to merge and normalize 2026-08-27 01:13:32 +00:00
4bb4582695 Integrate extraction validation retries 2026-08-27 01:06:17 +00:00
7d3434e5f6 Expose typed validation reports 2026-08-27 00:37:20 +00:00
29872b2e28 Integrate chunk validation retries 2026-08-27 00:35:37 +00:00
b487d93186 Add producer attempt state machine 2026-08-27 00:27:27 +00:00
8dd7a4324d Execute complete validator chains 2026-08-27 00:18:16 +00:00
04ba87e174 Enable correction-aware semantic reconciliation 2026-08-27 00:08:05 +00:00
a26d6ed042 Enable correction-aware downstream D&D extractors 2026-08-26 23:59:05 +00:00
759d32403f Enable correction-aware foundational D&D producers 2026-08-26 23:55:23 +00:00
1a7b20c766 Adapt corrections through PromptKit 2026-08-26 23:50:24 +00:00
85a5b52be7 Declare producer correction capability 2026-08-26 23:42:11 +00:00
9d0faabf61 Add validation policy configuration 2026-08-26 23:34:06 +00:00
1c3da3e869 Add feedback-aware correction contracts 2026-08-26 23:24:20 +00:00
9abd93502f Upgrade PromptKit to v0.9.0 2026-08-26 23:12:16 +00:00
c8a29a5fa2 Plan feedback-aware validation retries 2026-08-26 18:51:36 +00:00
916d9210fd Preserve structured repair settings across pipeline boundaries 2026-08-25 23:46:52 +00:00
3d3f16db4a Enable structural output repair by default 2026-08-25 20:04:56 +00:00
63c397d86a Resolve structured output repair configuration 2026-08-25 19:55:39 +00:00
9a92212632 Add structured output repair configuration 2026-08-25 19:47:42 +00:00
0ef8931697 Forward repair policy from D&D modules 2026-08-25 19:40:44 +00:00
e00cc45c6b Propagate structured repair requests 2026-08-25 19:39:04 +00:00
ab9b743df6 Add structured output repair support 2026-08-25 19:35:27 +00:00
3bd3c7ebf7 Classify PromptKit generation errors safely 2026-08-25 19:34:27 +00:00
75a3f51cee Support inherited PromptKit profiles 2026-08-25 19:31:00 +00:00
2be999ebd3 Verify PromptKit compatibility boundaries 2026-08-25 19:27:34 +00:00
32fe7c5b98 Upgrade PromptKit to v0.8.0 2026-08-25 19:25:57 +00:00
55247c47ab Plan the PromptKit 0.8 upgrade 2026-08-25 19:11:30 +00:00
5e5c69bf9d Document future validation and retry work 2026-08-25 14:29:00 +00:00
b4a81f8b09 Validate release versions before tagging 2026-08-25 02:21:46 +00:00
adfed22e1a Complete source release system verification 2026-08-25 02:05:17 +00:00
75b1e2f68b Document source release deployment 2026-08-25 02:03:11 +00:00
4473363d9f Document source release procedure 2026-08-25 02:01:52 +00:00
6eb45e0003 Add release tag validation workflow 2026-08-25 01:58:29 +00:00
0585ad76dc Add source release candidate checks 2026-08-25 01:57:10 +00:00
56145c3b7e Add build version reporting 2026-08-25 01:55:09 +00:00
a478fd86c5 Plan source-only releases 2026-08-25 01:48:16 +00:00
916532100d Add D&D consumer documentation 2026-08-09 20:57:28 +00:00
bef8ca263b Tighten evidence context source excerpts 2026-08-09 20:04:46 +00:00
f6d037b613 Document evidence context source unit excerpts 2026-08-09 19:47:27 +00:00
449b506804 Update evidence context output coverage 2026-08-09 19:45:21 +00:00
071a78ae22 Replace evidence context with source unit excerpts 2026-08-09 19:42:33 +00:00
ad1cba41c2 Fix OpenAI reconciliation schema 2026-08-09 18:49:29 +00:00
67338798aa Complete the semantic reconciliation roadmap 2026-08-09 18:30:32 +00:00
e95e2f2220 Finalize semantic reconciliation documentation 2026-08-09 17:05:17 +00:00
628b8d1800 Remove legacy reconciliation path 2026-08-09 16:57:44 +00:00
d24d4609b6 Migrate location reconciliation to shared engine 2026-08-09 16:51:29 +00:00
c7f79fb38e Migrate item reconciliation to shared engine 2026-08-09 16:46:43 +00:00
8c071800cf Migrate NPC reconciliation to shared engine 2026-08-09 16:38:43 +00:00
569e12c6f4 Add generic reconciliation plan application 2026-08-09 16:27:36 +00:00
5b6eb591b2 Add shared semantic reconciliation engine 2026-08-09 16:19:54 +00:00
b630384aa0 Add generic semantic reconciliation prompt assets 2026-08-09 16:08:53 +00:00
297d58f090 Add semantic reconciliation proposal validation 2026-08-09 16:00:01 +00:00
ee71dc4937 Add bounded semantic candidate preparation 2026-08-09 15:52:55 +00:00
65e5d65d14 Record semantic reconciliation architecture decision 2026-08-09 15:43:05 +00:00
b40b40aaf3 Plan semantic reconciliation improvements 2026-08-09 15:38:10 +00:00
f120be1cb4 Add proposed changes to shared LLM prompts 2026-08-09 09:18:36 -05:00
17673d74ea Archive the completed codebase audit 2026-08-09 13:24:12 +00:00
ef19a03cbf Reconcile remediation documentation 2026-08-09 02:45:22 +00:00
0546f6eb4f Simplify module cleanup paths 2026-08-09 02:40:25 +00:00
d28d1062e0 Reuse canonical item occurrence evidence 2026-08-09 02:36:53 +00:00
b3ebfcef37 Index enemy event duplicate identities 2026-08-09 02:31:28 +00:00
b70d9f77e3 Improve D&D registry normalization efficiency 2026-08-09 02:26:49 +00:00
2a75f40871 Bound D&D normalization diagnostics 2026-08-09 02:22:23 +00:00
a705ba74a1 Project spell aliases into extraction prompts 2026-08-09 02:17:15 +00:00
8d9c9e7c87 Align item occurrence evidence fields 2026-08-09 02:11:27 +00:00
0b5cc4f251 Require chunk-local extraction evidence 2026-08-09 02:08:11 +00:00
82ffe85f2d Enforce durable enemy event validation 2026-08-09 02:03:27 +00:00
b3644abc0e Enforce durable D&D evidence ranges 2026-08-09 01:54:43 +00:00
d653bf1b90 Share immutable in-memory filesystems 2026-08-09 01:47:44 +00:00
3e66127b94 Write durable outputs through confined file writer 2026-08-09 01:41:37 +00:00
5d086c13ca Cache compiled JSON schemas per validator 2026-08-09 01:38:42 +00:00
d36d4e7689 Avoid redundant decoded graph clones 2026-08-09 01:34:26 +00:00
1456aa51cc Index generated reference handoffs 2026-08-09 01:30:10 +00:00
ffc179c822 Centralize builder request cloning 2026-08-09 01:27:28 +00:00
8e669a1f14 Preserve terminal rejection warnings 2026-08-09 01:19:55 +00:00
14bfae216d Isolate typed validator candidates 2026-08-09 01:11:03 +00:00
5a58d87995 Require candidate decoders for artifact codecs 2026-08-09 01:03:50 +00:00
557809f364 Add candidate artifact codec decoding 2026-08-09 00:57:03 +00:00
ee600975f0 Prevent scheduler callbacks after cancellation 2026-08-09 00:52:31 +00:00
0d8017e23f Gate runner dispatches on cancellation 2026-08-09 00:50:02 +00:00
37b18edf3d Contain provider errors at the LLM adapter 2026-08-09 00:44:38 +00:00
cda7a61b47 Encode checkpoint and debug path identities 2026-08-09 00:41:28 +00:00
2ad9283148 Bound external reference reads and fingerprints 2026-08-09 00:33:33 +00:00
41a8a80dda Reject ambiguous configuration and reference bindings 2026-08-09 00:29:04 +00:00
90c7fa6381 Finalize codebase audit synthesis 2026-08-08 23:00:28 +00:00
e3839f8620 Audit combat and enemy event processing 2026-08-08 22:54:00 +00:00
0fc2f9ee01 Audit spell and scene processing 2026-08-08 22:42:49 +00:00
5d6305f21a Audit NPC item and location occurrences 2026-08-08 22:30:23 +00:00
551e4daea2 Audit NPC item and location registries 2026-08-08 22:18:29 +00:00
3589d33468 Audit shared D&D family conventions 2026-08-08 22:08:24 +00:00
a22c1a7f59 Audit generic and Seriatim modules 2026-08-08 21:59:06 +00:00
ad85d71b0f Audit LLM runtime and prompt assets 2026-08-08 21:47:51 +00:00
f3506240c2 Audit state persistence and file safety 2026-08-08 21:37:57 +00:00
70c199aa31 Audit runtime execution and concurrency 2026-08-08 21:27:37 +00:00
e2b82746ab Audit reference materialization and ordered handoffs 2026-08-08 21:16:30 +00:00
4235507f7b Audit pipeline composition and typed registries 2026-08-08 21:06:28 +00:00
b346670cc7 Audit configuration and CLI composition 2026-08-08 20:56:50 +00:00
7868c26be7 Establish codebase audit baseline 2026-08-08 20:50:15 +00:00
92e89076a2 Add an audit plan and staged audit sequence to identify opportunities for code quality improvement 2026-08-08 20:42:35 +00:00
d9b87347b8 Simplify contextual entity grounding 2026-08-08 15:47:41 +00:00
20397ef710 Document deterministic entity identity resolution 2026-08-08 15:08:57 +00:00
fc449863f2 Use contextual descriptors for entity reconciliation 2026-08-08 15:05:35 +00:00
51d62de1f3 Ground location occurrences with contextual selectors 2026-08-08 14:56:43 +00:00
fc76805075 Add contextual location grounding 2026-08-08 14:49:08 +00:00
8e680cf96e Ground item occurrences by canonical names 2026-08-08 14:43:04 +00:00
ece1bca460 Ground NPC occurrences by canonical names 2026-08-08 14:37:54 +00:00
516af12916 Finish D&D entity contract cleanup 2026-08-08 13:14:42 +00:00
1015d61b2d Clarify NPC mention eligibility 2026-08-06 13:40:42 +00:00
4192aa8584 Harden item occurrence grounding 2026-08-06 13:37:21 +00:00
8cf03a2a44 Reject unsafe currency reconciliation proposals 2026-08-06 13:31:15 +00:00
2ee6b495e1 Consolidate duplicate item registry records 2026-08-06 13:28:12 +00:00
f1b120b590 Complete D&D entity contract audit 2026-08-05 20:17:20 +00:00
2ec17f5b4f Consolidate D&D entity documentation 2026-08-05 20:12:16 +00:00
6de470d541 Verify complete D&D entity handoffs 2026-08-05 20:07:31 +00:00
a6e176e160 Move item occurrences to canonical namespace 2026-08-05 20:00:20 +00:00
3dfefd0e14 Adopt registry-backed item occurrences 2026-08-05 19:55:34 +00:00
f91237e9c0 Register item registry normalization 2026-08-05 19:39:06 +00:00
ad9ee076b5 Add item registry extraction and validation 2026-08-05 19:27:49 +00:00
ce04387dbc Add item registry domain foundation 2026-08-05 19:19:58 +00:00
e8965ebbbb Move location registry modules to canonical namespace 2026-08-05 19:13:37 +00:00
c006b163d5 Adopt location registry durable contract 2026-08-05 19:05:42 +00:00
2f61118e78 Move NPC occurrences to their canonical namespace 2026-08-05 19:00:55 +00:00
5e2ccffc0f Adopt registry-backed NPC occurrence artifacts 2026-08-05 18:55:58 +00:00
3f4a1f2647 Move NPC registry to canonical namespace 2026-08-05 18:38:22 +00:00
9653e06297 Migrate NPC registry durable contract 2026-08-05 18:25:04 +00:00
916a32195b Plan canonical D&D entity registries and occurrences 2026-08-05 18:16:37 +00:00
299c110267 Tighten D&D prompt contracts and tests 2026-08-05 17:38:51 +00:00
4093ff2e8b Document D&D prompt conventions and verification 2026-08-05 15:05:24 +00:00
39563f3ea0 Normalize private D&D response schema identities 2026-08-05 14:59:03 +00:00
4b52cace76 Consolidate grounded event extraction instructions 2026-08-05 14:55:40 +00:00
16d1b29b14 Consolidate spell and combat turn instructions 2026-08-05 14:52:26 +00:00
856b26b718 Consolidate NPC location and item event instructions 2026-08-05 14:48:55 +00:00
ab70347c5d Consolidate scene and normalization prompt instructions 2026-08-05 14:42:54 +00:00
8ed99ceaee Standardize D&D prompt asset filenames 2026-08-05 14:37:18 +00:00
257bca0dc2 Define D&D prompt transcript scopes 2026-08-05 14:33:00 +00:00
bad5db3ef3 Plan the D&D prompt asset cleanup 2026-08-05 14:28:05 +00:00
406ad1d362 Retire the completed asset migration roadmaps 2026-08-05 13:23:00 +00:00
5f207b2ab1 Document centralized LLM asset ownership 2026-08-05 00:49:15 +00:00
c613b306ae Centralize item and enemy event assets 2026-08-05 00:45:04 +00:00
1c7291e17d Centralize spell and combat-turn assets 2026-08-05 00:43:39 +00:00
2345da106a Centralize location LLM assets 2026-08-05 00:42:22 +00:00
03761c97dd Centralize NPC LLM assets 2026-08-05 00:40:47 +00:00
9cb9ee48a7 Centralize scene planning and description assets 2026-08-05 00:38:55 +00:00
08954f17e2 Centralize shared D&D LLM assets 2026-08-05 00:37:19 +00:00
a57f83e30d Centralize generic LLM schema assets 2026-08-05 00:34:56 +00:00
f4c05c34ef Make item event responses compatible with strict schemas 2026-08-04 19:52:47 +00:00
29fcad6e9b Improve D&D registry caching and retire the completed roadmap 2026-08-04 18:29:17 +00:00
f5fd115046 Migrate location registry to shared resolver 2026-08-04 13:30:12 +00:00
7f28899730 Migrate NPC registry to shared resolver 2026-08-04 13:26:06 +00:00
84c0758455 Add shared D&D registry resolver 2026-08-04 13:20:20 +00:00
5002864e88 Narrow location occurrence normalizer references 2026-08-04 13:12:46 +00:00
55b188fd84 Clarify hypothetical location occurrence classification 2026-08-04 13:09:30 +00:00
d1f43df88e Restore NPC canonical name selection 2026-08-04 13:08:00 +00:00
d52387c1f7 Document D&D location tracking contracts 2026-08-04 00:51:43 +00:00
9c5e3cff14 Add D&D location tracking to complete example 2026-08-04 00:45:50 +00:00
811d5b8bd9 Compose D&D location tracking modules 2026-08-04 00:39:00 +00:00
a168c13b85 Add D&D location occurrence validators 2026-08-04 00:33:39 +00:00
dd61a4efda Add D&D location validators 2026-08-04 00:26:50 +00:00
228cc6ee83 Add D&D location occurrence normalizer 2026-08-04 00:22:25 +00:00
06170e1f65 Add D&D location occurrence extractor 2026-08-04 00:18:16 +00:00
7715baa1f6 Add immutable D&D location registry 2026-08-04 00:11:31 +00:00
98506db1a9 Add D&D location normalizer 2026-08-04 00:07:47 +00:00
bb4855f0c6 Add D&D location extractor 2026-08-04 00:02:18 +00:00
c51934d5c6 Migrate NPC normalization to shared reconciliation 2026-08-03 23:56:48 +00:00
c3513da880 Add shared D&D entity reconciliation support 2026-08-03 23:47:42 +00:00
c7d853ea52 Add D&D location artifact codecs 2026-08-03 23:40:35 +00:00
da7fcdaffd Add D&D location identity contracts 2026-08-03 23:35:50 +00:00
b6aad4fa98 Plan D&D location tracking 2026-08-03 23:29:32 +00:00
9c6af28d02 Finish the enemy engagement cleanup 2026-08-03 23:11:44 +00:00
04eabdfcb9 Complete enemy event reference documentation 2026-08-03 23:00:09 +00:00
a8a99c1037 Make enemy event prompt tests resilient to refactoring 2026-08-03 22:57:17 +00:00
e15007fffb Simplify enemy event grounding ownership 2026-08-03 22:54:11 +00:00
e6b7c61f45 Enforce unique enemy engagements per scene 2026-08-03 22:50:41 +00:00
42973215fa Document D&D enemy event artifacts 2026-08-03 21:14:52 +00:00
ba1d112d1f Add D&D enemy event pipeline example 2026-08-03 21:10:21 +00:00
b722131d57 Compose D&D enemy event production family 2026-08-03 21:01:23 +00:00
a92d2c0885 Add D&D enemy event validators 2026-08-03 20:56:36 +00:00
02ec10d66b Add D&D enemy event normalizer 2026-08-03 20:49:32 +00:00
9dd57dbfa4 Add D&D enemy event extractor 2026-08-03 20:44:44 +00:00
c164a3fc69 Prepare D&D enemy event grounding references 2026-08-03 20:37:35 +00:00
8834df617f Add D&D enemy event artifact contract 2026-08-03 20:32:20 +00:00
db2adb52da Preserve prompt sessions and retire completed roadmaps 2026-08-03 19:45:27 +00:00
fc3c128171 Document prompt sessions and concurrency defaults 2026-08-03 19:16:18 +00:00
8a15b083a0 Raise default LLM concurrency 2026-08-03 19:12:19 +00:00
d9dae2b639 Record effective sessions in debug provenance 2026-08-03 19:09:49 +00:00
7a4fd7be7a Derive stable prompt sessions for CLI runs 2026-08-03 19:05:49 +00:00
39388e96d4 Make PromptKit profile handling safer and more consistent 2026-08-03 18:35:40 +00:00
12ac25bd63 Sanitize PromptKit profile fingerprint errors 2026-08-03 17:25:44 +00:00
394278e1f2 Document workload-oriented LLM profile deployment 2026-08-03 17:21:42 +00:00
5cd7f8e737 Expose pipeline LLM profile defaults 2026-08-03 17:15:07 +00:00
bf3fadf9ae Resolve pipeline LLM profile defaults 2026-08-03 17:09:16 +00:00
58815aaf33 Require explicit module execution classes 2026-08-03 17:00:08 +00:00
ce857966f1 Add execution metadata to module specifications 2026-08-03 16:49:51 +00:00
a3bd0c1867 Add D&D extraction fallback profile 2026-08-03 16:39:45 +00:00
b05634ee86 Add fallback PromptKit profile assets 2026-08-03 16:34:48 +00:00
4829f94157 Inspect PromptKit profiles during preflight 2026-08-03 16:26:15 +00:00
67b315099d Execute PromptKit requests from prepared snapshots 2026-08-03 16:17:40 +00:00
b5c86de4d7 Upgrade PromptKit to version 0.5.0 2026-08-03 16:12:29 +00:00
2eeca2ed5a Plan the PromptKit upgrade and profile workflow 2026-08-03 16:07:37 +00:00
b5aaeb1c78 Update future roadmap document with ideas for new feature developments 2026-07-30 16:27:36 +00:00
9171b66a41 Clarify PromptKit configuration and retire the completed plan 2026-07-30 15:38:31 +00:00
b4363b3b73 Document local PromptKit backend support 2026-07-30 05:22:41 +00:00
241e9d2a89 Include local backend target in checkpoint identity 2026-07-30 05:17:39 +00:00
715fff7b72 Register configured local PromptKit backend 2026-07-30 05:14:22 +00:00
d627b91b4f Add local PromptKit backend configuration 2026-07-30 05:09:54 +00:00
a67b3aa76d Upgrade PromptKit to version 0.3.0 2026-07-30 05:06:32 +00:00
a16dcdfa52 Clean up the PromptKit upgrade 2026-07-30 02:58:25 +00:00
46e4466d28 Translate LLM backend capacity failures 2026-07-30 02:23:51 +00:00
71a004bfc8 Publish effective LLM backend provenance 2026-07-30 02:18:14 +00:00
f8333f2c15 Expose run-wide reasoning effort controls 2026-07-30 02:11:35 +00:00
f603f7ac64 Support internal reasoning effort overrides 2026-07-30 02:03:04 +00:00
7a00e7049c Forward sessions through PromptKit requests 2026-07-30 01:58:40 +00:00
2a9db9a957 Upgrade PromptKit to version 0.2.0 2026-07-30 01:54:47 +00:00
de046a8f13 Keep checkpoints aligned with PromptKit profiles 2026-07-28 13:36:01 -05:00
f1a6574013 Document the PromptKit integration 2026-07-28 16:52:49 +00:00
4bca6d3103 Align run provenance with PromptKit 2026-07-28 16:47:07 +00:00
7c569a3d8c Make D&D prompt assets provider neutral 2026-07-28 16:42:41 +00:00
8e04ef9e2b Introduce version 4 PromptKit configuration 2026-07-28 16:38:05 +00:00
53a330587b Replace the Scriptorium adapter with PromptKit 2026-07-28 16:31:36 +00:00
7cfab8ada0 Add a staged implementation plan for migration to the promptkit LLM library 2026-07-28 11:20:31 -05:00
5c82b62856 Retire completed roadmap documents and add ideas for future feature work 2026-07-27 20:20:00 -05:00
de8ed41b34 Document D&D prompt cache ordering 2026-07-27 20:16:11 +00:00
d1eaec4dad Consolidate D&D prompt ordering tests 2026-07-27 20:14:57 +00:00
c0ec068f53 Reorder D&D scene and normalization prompts 2026-07-27 20:08:09 +00:00
5cbd9e56e4 Reorder D&D extraction prompt prefixes 2026-07-27 20:07:09 +00:00
53490cdb59 Add a new feature roadmap and implementation plan for D&D prompt ordering to improve LLM provider caching 2026-07-27 15:04:32 -05:00
7c94b5eeed Clarify evidence context and test lane filtering 2026-07-27 14:03:23 -05:00
4f2864fc96 Stop tracking generated codebase memory files 2026-07-27 13:56:04 -05:00
893b03fccf Document published evidence context 2026-07-27 18:28:02 +00:00
256cc98ddb Publish evidence context in JSON output bundles 2026-07-27 18:23:48 +00:00
e61e522662 Build evidence context for output encoders 2026-07-27 18:17:54 +00:00
a4c7eca87b Add evidence context artifact builder 2026-07-27 18:11:49 +00:00
224a8292c4 Add evidence context policy preparation 2026-07-27 18:04:12 +00:00
64d461fc18 Add a feature roadmap and implementation plan for a context evidence artifact 2026-07-27 12:09:14 -05:00
fb1134e591 Address code review findings from the subprocess enhancements 2026-07-26 18:52:37 -05:00
1da29e6788 Document subprocess run results 2026-07-26 17:22:27 +00:00
0d947549fb Test JSON run result behavior 2026-07-26 17:17:35 +00:00
950fba17ce Add JSON run result mode 2026-07-26 17:14:16 +00:00
678d2c6099 Add run result wire model 2026-07-26 17:12:57 +00:00
db8db5ffc5 Add a plan to implement improved documentation and support for running notarius as a subprocess 2026-07-26 12:08:53 -05:00
94b3eafb1a Finish the documentation refresh 2026-07-26 13:53:38 +00:00
f6981e2264 Harmonize D&D artifact contracts 2026-07-26 13:43:45 +00:00
2f506f4985 Harmonize foundational integration contracts 2026-07-26 13:38:55 +00:00
fdf8c4afd4 Rewrite LLM runtime documentation 2026-07-26 13:33:45 +00:00
74c793e6a1 Document D&D module conventions 2026-07-26 13:30:36 +00:00
b5835fbc37 Rewrite pipeline and component overview documentation 2026-07-26 13:26:20 +00:00
fd3f7b85cc Rewrite operations and state documentation 2026-07-26 13:24:02 +00:00
d86b74f485 Document configuration and CLI internals 2026-07-26 13:20:18 +00:00
59cbf1eb27 Rewrite configuration reference 2026-07-26 13:16:06 +00:00
ee43add75c Rewrite CLI orientation and reference 2026-07-26 13:11:40 +00:00
46761706a2 Add complete D&D example transcript 2026-07-26 13:07:59 +00:00
5a968b64eb Clean up completed roadmap work 2026-07-25 21:50:39 -05:00
7b077c269d Clarify normalize fallback ownership 2026-07-26 02:44:29 +00:00
80ec939383 Validate normalize retry diagnostics 2026-07-26 02:43:28 +00:00
d3c4d6f133 Simplify NPC normalization prompt guidance 2026-07-26 02:40:08 +00:00
5ad661f95f Redact NPC normalization context errors 2026-07-26 02:38:03 +00:00
d63e5c6852 Plan NPC normalization follow-up fixes 2026-07-25 21:34:42 -05:00
fbb8e0d241 Document NPC semantic normalization 2026-07-26 01:46:23 +00:00
8d9a496935 Integrate NPC semantic normalization 2026-07-26 01:41:35 +00:00
d1c48db4bc Add LLM-assisted NPC normalization 2026-07-26 01:36:32 +00:00
6bd781d344 Add NPC normalization prompt context 2026-07-26 01:27:34 +00:00
8a12c56971 Add retryable normalization fallbacks 2026-07-26 01:20:28 +00:00
26bd59a5a2 Plan LLM-assisted NPC normalization 2026-07-25 20:13:12 -05:00
927a7beb88 Clarify and streamline D&D item events 2026-07-25 23:59:56 +00:00
f7059607af Document D&D item event support 2026-07-25 22:16:29 +00:00
63de44c347 Add D&D item event integration coverage 2026-07-25 22:10:53 +00:00
f0ede9dacc Register D&D item event pipeline 2026-07-25 22:05:52 +00:00
5711f8b9e3 Add D&D item event normalization 2026-07-25 22:00:32 +00:00
da83510234 Add D&D item event validators 2026-07-25 21:52:59 +00:00
f51b22bea7 Add D&D item event extractor 2026-07-25 21:49:24 +00:00
f320c2fcee Add D&D item event artifact contract 2026-07-25 21:41:17 +00:00
4ba1e50a89 Plan D&D item event tracking 2026-07-25 21:33:43 +00:00
2a7e025251 Improve scene-aware combat gating 2026-07-25 21:08:24 +00:00
3da20e9d6a Document scene-aware combat extraction 2026-07-25 19:34:33 +00:00
b1c0faa748 Test scene-aware combat handoff behavior 2026-07-25 19:29:15 +00:00
989f2c220b Gate combat extraction on scene descriptions 2026-07-25 19:23:19 +00:00
7e35915b3e Add scene eligibility registry 2026-07-25 19:15:33 +00:00
24238d249e Plan scene-aware combat extraction 2026-07-25 18:59:57 +00:00
9614469b45 Consolidate the D&D configuration examples 2026-07-25 15:48:48 +00:00
29ee68824d Finish the D&D module cleanup 2026-07-25 13:30:23 +00:00
aeaaf44ae0 Remove unused NPC registry and identity aliases 2026-07-25 13:06:40 +00:00
d752c51aec Centralize D&D candidate JSON codecs 2026-07-25 13:05:02 +00:00
8199d95dc1 Reuse document indexes in D&D normalization 2026-07-25 13:01:31 +00:00
97cdb01357 Reuse document indexes in D&D validators 2026-07-25 12:57:31 +00:00
7a66095912 Reuse indexes for D&D citation validation 2026-07-25 12:53:48 +00:00
9d1356a20e Add D&D refactoring plan and isolate merger results 2026-07-25 12:51:36 +00:00
e4471fc300 Fix D&D extraction issues and retire the completed audit 2026-07-25 12:30:42 +00:00
84a2854b5e Close D&D extraction audit documentation 2026-07-24 14:48:13 +00:00
a1b76093ce Document D&D extractor contract 2026-07-24 14:46:19 +00:00
1aa30a73db Protect D&D citation prompt ordering 2026-07-24 14:44:10 +00:00
dc7c0e2f9e Move scene semantics to deterministic validation 2026-07-24 14:40:54 +00:00
e2cb0d901a Centralize D&D extraction request preparation 2026-07-24 14:38:42 +00:00
8e0b029f5f Order combat and NPC interaction extraction by document position 2026-07-24 14:33:34 +00:00
9bbf2535dd Order spell and NPC extraction by document position 2026-07-24 14:29:19 +00:00
83fde83a58 Preserve literal ordering for foreign source references 2026-07-24 14:25:02 +00:00
bef3d1359d Fingerprint D&D extractor mapping policies 2026-07-24 14:23:35 +00:00
1ff449435f Centralize D&D source reference ordering 2026-07-24 14:20:10 +00:00
6e21c83fd8 Add D&D module code audit implementation plan 2026-07-24 14:08:36 +00:00
6dc9d522b1 Audit the D&D modules 2026-07-24 13:43:53 +00:00
8adcf6840d Clean up completed D&D scene chunking work 2026-07-24 03:14:34 +00:00
f5ed30e455 Retire annotated D&D scene plans 2026-07-24 00:40:53 +00:00
cacf3f24e7 Simplify D&D scene chunking responses 2026-07-24 00:35:10 +00:00
f08ca4ddfa Plan simpler D&D scene chunking 2026-07-24 00:29:46 +00:00
e1c2f3c202 Harden D&D scene description extraction 2026-07-23 23:03:37 +00:00
9614eb540d Format shared D&D prompt assets 2026-07-23 20:30:47 +00:00
1b46596a39 Document D&D scene description artifacts 2026-07-23 20:29:01 +00:00
e043d61a99 Register D&D scene description pipeline 2026-07-23 20:22:05 +00:00
ad89782c9b Add D&D scene description validation 2026-07-23 20:17:18 +00:00
cd29265d5d Add D&D scene description extractor 2026-07-23 20:09:59 +00:00
2f36b7c3b6 Add D&D scene description codec 2026-07-23 20:02:37 +00:00
b8b3f3abfa Plan D&D scene description extraction 2026-07-23 18:59:34 +00:00
b490297cde Harden chunk map export and retire completed plans 2026-07-23 17:38:04 +00:00
06148074a2 Document accepted chunk map export 2026-07-23 15:06:33 +00:00
16a998055c Add opt-in JSON chunk map export 2026-07-23 15:02:01 +00:00
97c9a8e5ce Carry accepted chunk maps through the runner 2026-07-23 14:58:14 +00:00
66415fd1fa Add accepted chunk map contract 2026-07-23 14:52:25 +00:00
bfe25609a7 Tighten NPC interaction validation and consistency 2026-07-23 14:25:32 +00:00
36e0512454 Complete D&D NPC interaction integration 2026-07-23 13:59:02 +00:00
b02f667107 Register NPC interaction production lane 2026-07-23 13:49:34 +00:00
ed2b6f4580 Add NPC interaction normalization 2026-07-23 13:42:37 +00:00
cb7f145c76 Add NPC interaction validators 2026-07-23 13:35:15 +00:00
2b9d2eaeaa Add grounded NPC interaction extractor 2026-07-23 13:26:27 +00:00
61016671ab Add D&D NPC interaction artifact codec 2026-07-23 13:18:38 +00:00
b2c076946b Plan chunk map exports and scene descriptions 2026-07-23 04:33:18 +00:00
250c5c22b8 Align the spell response schema 2026-07-23 03:57:55 +00:00
4b0b166143 Complete minimal D&D extraction cutover 2026-07-22 19:23:10 +00:00
90481a0e4b Simplify D&D combat turn extraction contract 2026-07-22 19:14:14 +00:00
2cbaf20e55 Minimize D&D spell extraction contracts 2026-07-22 19:01:58 +00:00
a263a0840c Minimize D&D NPC extraction contracts 2026-07-22 18:51:26 +00:00
14991cf58b Plan simpler D&D extraction contracts 2026-07-22 18:35:25 +00:00
ab0b4e350c Relax private D&D response schemas 2026-07-22 14:38:35 +00:00
7b2fb0880d Align D&D validator ordering 2026-07-22 14:30:20 +00:00
748e02db80 Harden checkpoint reuse and combat validation 2026-07-22 14:24:03 +00:00
23c55f8925 Add implementation roadmap to clean up D&D extract module validation issues 2026-07-22 09:19:13 -05:00
906d97b391 Reconcile ordered pipeline documentation 2026-07-22 02:40:36 +00:00
f15fd4f9c1 Add recompute recovery acceptance coverage 2026-07-22 02:35:44 +00:00
7aadb088a6 Hydrate accepted producer checkpoints 2026-07-22 02:27:19 +00:00
9de399432e Add stable checkpoint decision diagnostics 2026-07-22 02:13:50 +00:00
5bdd56cfb1 Decompose pipeline runner orchestration 2026-07-22 02:03:27 +00:00
64ea23c21f Audit the implementation and add a roadmap with cleanup items and bugfixes 2026-07-22 01:30:17 +00:00
7071102ab7 Document ordered pipeline operations and retire sequential examples 2026-07-21 22:25:11 +00:00
9184072839 Implement operation-time D&D NPC artifact handoff 2026-07-21 22:12:01 +00:00
c437682407 Implement selective checkpoint recomputation 2026-07-21 21:59:48 +00:00
22d4f29670 Implement generated artifact handoff and provenance 2026-07-21 21:39:23 +00:00
afb7ed3cf1 Execute ordered pipeline steps with barriers 2026-07-21 21:19:00 +00:00
f846f252c0 Implement ordered pipeline step resolution 2026-07-21 21:05:28 +00:00
f5618d1f0c Plan the ordered pipeline steps implementation 2026-07-21 20:28:04 +00:00
f94ab0a6bf Remove completed roadmap documentation and add future work to the long-term roadmap 2026-07-21 20:01:46 +00:00
41b52aae74 Put stable D&D prompt content before transcripts 2026-07-21 18:59:59 +00:00
ed36f7d7fd Finish the D&D audit fixes 2026-07-21 16:08:28 +00:00
3ba2bfd7f6 Finalize D&D prompt integration and documentation 2026-07-21 14:58:26 +00:00
b344d16dc1 Clarify D&D registration composition 2026-07-21 14:48:05 +00:00
6e12c09952 Align D&D validator policies and diagnostics 2026-07-21 14:43:20 +00:00
07460341e3 Share D&D cited source traversal 2026-07-21 14:37:12 +00:00
732b13669f Centralize D&D chunk prompt material preparation 2026-07-21 14:27:39 +00:00
3a8a82ebc9 Reorder shared D&D extraction prompt messages 2026-07-21 14:22:46 +00:00
1c9819f08e Make D&D prompt asset manifests exact 2026-07-21 14:13:11 +00:00
447c4f73f9 Protect deterministic D&D prompt inputs 2026-07-21 14:04:52 +00:00
e01b8d1b6d Use shared assets instead of prompt prefix change detectors 2026-07-21 13:59:28 +00:00
3d70920f3d Add the D&D harmonization roadmap and implementation plan 2026-07-21 13:53:04 +00:00
110593ece1 Close out the D&D combat turn extraction roadmap 2026-07-21 07:49:57 -05:00
a1f5dce405 Compose production D&D combat pipeline 2026-07-21 05:42:33 +00:00
50aa60e0b8 Add combat turn normalization and invariants 2026-07-21 05:22:12 +00:00
2fbb3813aa Add standalone D&D combat turn extraction 2026-07-21 05:08:02 +00:00
6dd695611c Add durable D&D combat turn artifacts 2026-07-21 04:48:55 +00:00
92acb45775 Share the D&D NPC registry and prompt grounding 2026-07-21 04:34:56 +00:00
d3e171aa82 Add feature roadmap and implementation plan for a D&D combat turn extraction module 2026-07-20 23:22:03 -05:00
c6f330eb06 Implement NPC extraction follow-up fixes 2026-07-20 23:10:25 -05:00
20cfbfd311 Add NPC registry grounding for spell extraction 2026-07-21 03:12:03 +00:00
fb043325e1 Add production NPC pipeline composition 2026-07-21 02:50:37 +00:00
06c0259788 Add NPC normalization and identity validation 2026-07-21 02:36:59 +00:00
3d5fd9dc05 Add D&D NPC extraction and validation 2026-07-21 02:24:26 +00:00
3ba2c62cc1 Add D&D NPC artifact contract and identity codec 2026-07-21 02:08:46 +00:00
e2ab01f9d2 Add feature roadmap and implementation plan for a D&D NPC extraction module 2026-07-20 20:58:29 -05:00
5186e061a8 Minor additional improvements to the D&D spell extraction prompt. 2026-07-20 20:34:59 -05:00
c4c907d421 Hardened D&D spell extraction prompts 2026-07-20 20:25:23 -05:00
fa5076f5f1 Updated .gitignore to ignore local workspace for testing 2026-07-20 20:25:14 -05:00
8b5a4e0efd Apply spell normalization follow-up fixes 2026-07-20 19:45:00 -05:00
3eb68baca6 Document D&D spell normalization behavior 2026-07-20 21:25:02 +00:00
ae97adb8b0 Add assembled spell pipeline and checkpoint coverage 2026-07-20 21:16:08 +00:00
79b9fffcaf Register the D&D spell normalizer defaults 2026-07-20 21:06:30 +00:00
be22852daa Collapse duplicate D&D spell casts during normalization 2026-07-20 21:00:22 +00:00
f5107045c3 Add deterministic D&D spell normalizer foundation 2026-07-20 20:52:27 +00:00
2c98763b9b Add feature roadmap and implementation plan for D&D spell normalization module 2026-07-20 15:43:42 -05:00
d2eb763b9b Add feature roadmap and implementation plan for D&D spell normalization module 2026-07-20 15:31:57 -05:00
0f25e7339f Add a framework mechanism for prepared modules and validators to contribute checkpoint identity fingerprints 2026-07-20 15:14:41 -05:00
87c57681f6 Document completed spell catalog baseline 2026-07-20 19:44:31 +00:00
3d0d79360e Verify spell catalog provenance and checkpoint identity 2026-07-20 19:38:57 +00:00
f08b407b72 Enforce spell catalog validation in the D&D pipeline 2026-07-20 19:30:17 +00:00
4ff2c7795f Ground spell extraction with the effective catalog 2026-07-20 19:20:56 +00:00
3bfe05ab56 Add spell catalog overlay resolution 2026-07-20 19:10:44 +00:00
7806dba509 Deliver target references during pipeline preparation 2026-07-20 18:57:44 +00:00
ac53f83ac8 Add feature roadmap and implementation plan for D&D spell extraction and validation upgrades 2026-07-20 13:47:43 -05:00
385e4593f4 Implement ADR-0007 2026-07-19 10:15:28 -05:00
f64bb7c883 Update to upstream scriptorium v0.11.1 2026-07-19 08:40:15 -05:00
9d3175d36a Complete the test suite review documentation 2026-07-19 00:32:17 +00:00
4f96abf42c Make composition and boundary tests extension-friendly 2026-07-18 23:50:24 +00:00
d88bcb6070 Rewrite brittle validation and schema tests 2026-07-18 23:44:27 +00:00
0cca3b1f5d Consolidate configuration and resolver tests 2026-07-18 23:38:59 +00:00
bbc83ab042 Remove obsolete and misleading tests 2026-07-18 23:32:26 +00:00
2cba6d4512 Add filesystem checkpoint compatibility tests 2026-07-18 23:27:36 +00:00
e70450c401 Add testing policy documentation 2026-07-18 17:06:04 -05:00
4d3351c774 Implement finalized test suite for the CLI and configuration code 2026-07-18 12:14:46 -05:00
a586257d5e Harden CLI and configuration contract coverage 2026-07-18 16:14:24 +00:00
b8163091cc Add production and example composition contract tests 2026-07-18 16:09:58 +00:00
c7b3af82b4 Add CLI cache and resume contract tests 2026-07-18 15:59:57 +00:00
a42b06ba20 Add CLI reference selector contract tests 2026-07-18 15:51:57 +00:00
8d62973627 Add run control contract tests 2026-07-18 15:46:19 +00:00
8cdefc72a1 Add CLI command contract tests 2026-07-18 15:35:58 +00:00
d3a8dc7930 Add configuration validation and resolution contracts 2026-07-18 15:31:05 +00:00
86ebb62f84 Add version 3 configuration contract tests 2026-07-18 15:18:37 +00:00
50191ee694 Add implementation plan for CLI and configuration test coverage 2026-07-18 10:14:02 -05:00
3c35124db4 Complete run state hardening audit 2026-07-18 14:36:47 +00:00
e4ec521bed Write terminal debug reports for failed runs 2026-07-18 14:31:46 +00:00
2111e01142 Make run identities collision-resistant and outputs exclusive 2026-07-18 14:21:26 +00:00
a39eea7ed6 Enforce redaction for resolved pipeline summaries 2026-07-18 14:13:27 +00:00
7bcce9953e Harden debug bundle filesystem collaborators 2026-07-18 14:07:14 +00:00
9746a42e04 Reject backslashes in confined file paths 2026-07-18 14:07:14 +00:00
47bacc7abb Add an implementation plan to address gaps and fixes for the ADR-0006 refactor 2026-07-18 08:33:02 -05:00
8824948910 Document output cache and debug state model 2026-07-18 13:08:27 +00:00
8cb11e60e4 Harden output cache and debug state integration 2026-07-18 13:00:04 +00:00
26142f0e05 Remove legacy workspace and diagnostics implementation 2026-07-18 12:48:21 +00:00
1542a12497 Cut configuration and CLI over to output cache and debug surfaces 2026-07-18 12:42:10 +00:00
a9250206d5 Add internal debug bundle collaborators 2026-07-18 04:57:50 +00:00
5bd0ba7a72 Decouple checkpoint storage from workspace state 2026-07-18 04:55:33 +00:00
286fb9dce7 Add ADR, roadmap, and staged implementation plan for filesystem surface refactoring 2026-07-17 23:48:14 -05:00
9fa9154dda Implement final fixes and close out the implemetation roadmap 2026-07-17 23:16:16 -05:00
604c7a7945 Mark chunk plan implementation complete 2026-07-18 02:16:20 +00:00
a0f5e6e2b9 Document chunk plan remediation 2026-07-18 02:12:28 +00:00
561d65a505 Deep-clone source metadata during chunk materialization 2026-07-18 02:10:05 +00:00
205e2a9908 Confine chunk plan storage to its cache root 2026-07-18 02:03:58 +00:00
8c59b6af14 Redact invalid chunk plan lookup diagnostics 2026-07-18 01:59:10 +00:00
b3328b93e5 Update implementation plan to incorporate follow-up fixes 2026-07-17 20:55:39 -05:00
96a49bb7cd Document chunk plan caching and provenance 2026-07-18 00:57:51 +00:00
6d0a19c94c Harden chunk plan cache storage and reuse 2026-07-18 00:49:50 +00:00
6fc6ce0adb Expose chunk plan provenance and safe diagnostics 2026-07-18 00:45:01 +00:00
8ba5228c01 Wire persistent chunk plan caching into the CLI 2026-07-18 00:31:53 +00:00
51a36efb6b Integrate chunk plan caching into the runner 2026-07-18 00:20:56 +00:00
ebd449d847 Add chunk plan cache configuration and storage 2026-07-18 00:07:53 +00:00
7844c0a93f Generate and materialize canonical chunk plans 2026-07-17 23:57:59 +00:00
3bfac14397 Add canonical chunk plan source model 2026-07-17 23:47:22 +00:00
1c13e1d64a Add ADR, roadmap, and staged implementation plan for input chunk caching 2026-07-17 18:38:08 -05:00
60b86dc40c Finish the domain pipeline cleanup 2026-07-17 11:29:52 -05:00
68481804a7 Enforce production module import boundaries 2026-07-17 15:27:17 +00:00
236ccc62ad Record every retry attempt outcome 2026-07-17 15:23:27 +00:00
35bffdf336 Validate artifact candidates before final encoding 2026-07-17 15:13:19 +00:00
3772b308e9 Update implementation plan to address additional clean-up items 2026-07-17 10:06:18 -05:00
ef6926322d Remove obsolete sequential extraction path 2026-07-17 14:05:21 +00:00
2df7084d5d Enforce module family import boundaries 2026-07-17 13:58:50 +00:00
3d3cc0c08e Make typed module spec lookup artifact-aware 2026-07-17 13:53:55 +00:00
fbc3d9add6 Add retry-scoped merge and normalize debugging 2026-07-17 13:43:25 +00:00
35e45f0914 Include validator policy in pipeline identity 2026-07-17 13:33:16 +00:00
3e4fa923eb Update implementation plan to address remaining clean-up items 2026-07-17 08:28:18 -05:00
3013ee044d Finalize bounded typed pipeline implementation 2026-07-17 08:49:08 +00:00
adfd3bd052 Add bounded concurrent pipeline execution 2026-07-17 08:37:52 +00:00
4023c66508 Add extract worker configuration controls 2026-07-17 08:21:24 +00:00
adfe3825ee Remove legacy raw pipeline contracts 2026-07-17 08:13:08 +00:00
814fcdc6ba Serialize typed artifacts at durable boundaries 2026-07-17 07:33:49 +00:00
66de1a5520 Run D&D spell lanes through typed artifacts 2026-07-17 07:19:58 +00:00
52e6b31408 Add typed spell validation strategies 2026-07-17 07:02:30 +00:00
142ba36695 Introduce typed D&D spell artifacts 2026-07-17 06:50:08 +00:00
b949e9bbc0 Construct universal modules with decoded options 2026-07-17 06:30:56 +00:00
ce3a07512f Prepare pipelines before source execution 2026-07-17 06:18:46 +00:00
1c84d19e5f Add type-safe artifact lane resolution 2026-07-17 05:57:31 +00:00
fc1b57bde2 Add typed artifact codec foundation 2026-07-17 05:41:20 +00:00
075888c97f Move chunks into the canonical source model 2026-07-17 05:32:11 +00:00
40709e4ad8 Add canonical source unit provenance 2026-07-17 05:19:57 +00:00
15c369c509 Organize D&D extensions by domain 2026-07-17 05:05:48 +00:00
a81b9f1e1f Organize generic and Seriatim modules by domain 2026-07-17 04:57:47 +00:00
0327659355 Compose production modules through family registrars 2026-07-17 04:53:09 +00:00
c99bad19ae Add domain pipeline compatibility baselines 2026-07-17 04:45:01 +00:00
35f9446ed8 Add documentation and roadmap for a significant refactor around domain-focused module packages 2026-07-16 23:36:46 -05:00
21888d625f Minor documentation cleanup 2026-07-16 22:31:14 -05:00
feb03c3f8e Remove completed roadmap documentation 2026-07-16 22:25:39 -05:00
3b07b64a0f Consolidate documentation ownership 2026-07-17 03:12:35 +00:00
6e6375521d Refocus developer and internal documentation 2026-07-17 03:06:23 +00:00
b1fe9dc5a7 Reorganize user and operator documentation 2026-07-17 02:56:31 +00:00
6db2dc8d2a Refactor and clean up documentation 2026-07-16 21:42:24 -05:00
98b03a4629 Refactor the D&D spells module to apply deterministic fields where appropriate 2026-07-08 10:43:39 -05:00
610bdb4fea Enhance debug output to include response content files and update related metadata handling 2026-07-08 08:52:19 -05:00
68ec69f2e4 Rewrite the debug path to provide raw LLM prompt and response artifacts 2026-07-08 08:37:26 -05:00
451f6c0bb9 Stop base64 encoding LLM responses in debug output 2026-07-07 23:14:17 -05:00
3011dd91ca Update the debug workflow to provide raw LLM output 2026-07-07 23:08:14 -05:00
ae65b95374 Document completed workspace behavior 2026-07-08 03:18:50 +00:00
a5bbfea9b9 Write workspace debug artifacts during runs 2026-07-08 03:14:59 +00:00
ae9c2e1d5e Reuse valid workspace checkpoints on request 2026-07-08 03:02:50 +00:00
1d3a444df8 Write workspace checkpoints during runs 2026-07-08 02:46:38 +00:00
f044c00a7c Add checkpoint identity and manifest types 2026-07-08 02:31:07 +00:00
7d89c2702b Route diagnostics through workspace settings 2026-07-08 02:25:58 +00:00
93653cccb8 Add workspace filesystem helpers 2026-07-08 02:23:20 +00:00
a024492dbf Add workspace configuration support 2026-07-08 02:18:59 +00:00
304c68f9fc Add a planning roadmap and a staged implementation plan for the workspace configuration 2026-07-07 21:08:52 -05:00
c5f2b14ff4 Cleanup and complete the validator refactor 2026-07-07 19:36:48 -05:00
fc8e03f98c Document validation defaults and cleanup roadmap 2026-07-07 21:48:19 +00:00
16de4b6437 Register production validators and defaults 2026-07-07 21:43:32 +00:00
0f30888b00 Add D&D spell raw output validators 2026-07-07 21:37:58 +00:00
3e67be6ac3 Add generic raw output validators 2026-07-07 21:32:56 +00:00
5ef027b6f0 Wire resolved validator chains into runner 2026-07-07 21:27:28 +00:00
666b4bf801 Add validator chain config overrides 2026-07-07 21:21:12 +00:00
d593bfee0a Add validator chain provenance 2026-07-07 21:10:29 +00:00
b7ad66f0e0 Replace validator contracts with raw output validation 2026-07-07 20:55:49 +00:00
249e49c928 Update planning roadmap and add a staged imnplementation plan for the validator registry 2026-07-07 15:50:00 -05:00
e54e74ed88 Remove completed pipeline refactoring roadmap docs 2026-07-07 15:32:56 -05:00
582c5dceed Cleanup and complete the pipeline refactor 2026-07-07 15:32:35 -05:00
a9d8505cdb Document raw pipeline completion 2026-07-07 19:32:15 +00:00
7c95791e94 Update raw output files and manifests 2026-07-07 19:27:28 +00:00
aa14faa3cb Migrate production modules to raw outputs 2026-07-07 19:23:35 +00:00
cc6b050367 Implement runner retries and raw validation 2026-07-07 19:19:04 +00:00
bcedf19a08 Add merge references and retry config 2026-07-07 19:10:55 +00:00
c05ecb58d8 Implement raw module output contracts 2026-07-07 18:58:23 +00:00
9e3f8809b3 Implement integer source units and chunk payloads 2026-07-07 18:34:23 +00:00
4f057b99ac Add planning roadmaps for large-scale refactors of the pipleine and the validator registry, and add a staged imnplementation plan for the pipeline refactor 2026-07-07 13:20:10 -05:00
aec807fcb0 Update D&D schemas to require integer unit_id values 2026-07-06 14:41:24 -05:00
79a585d17e Remove a duplicated helper function 2026-07-06 14:26:40 -05:00
671ff6d132 Document completed DnD shared helper refactor 2026-07-06 17:26:38 +00:00
9b2d0297b7 Clean up DnD shared prompt asset tests 2026-07-06 17:24:15 +00:00
f91e643932 Use shared DnD prompt helpers in modules 2026-07-06 17:22:21 +00:00
35fe405448 Add DnD reference prompt helpers 2026-07-06 17:18:38 +00:00
524f2ffb8e Move DnD shared prompt assets into helper package 2026-07-06 17:15:27 +00:00
68b426cdb0 Make shared prompt filesystem composition generic 2026-07-06 17:10:59 +00:00
223f3751e8 Add reference slot clone helper 2026-07-06 17:06:24 +00:00
7861d040df Add a feature roadmap and staged implementation plan to refactor shared D&D module assets 2026-07-06 12:03:49 -05:00
47cf7e76ec Adjust the prompt FS layout and test strategy 2026-07-06 11:26:21 -05:00
8cafa64174 Added shared helper for module prompt FS 2026-07-06 07:29:41 -05:00
ecba0ad725 Add production prompt registry coverage 2026-07-06 01:36:55 +00:00
b3757dcf7b Remove legacy shared prompt package and update docs 2026-07-06 01:34:04 +00:00
3e456ec4d4 Update D&D prompt definitions to shallow asset paths 2026-07-06 01:32:27 +00:00
5b1efc89f6 Flatten D&D module prompt asset trees 2026-07-06 01:27:02 +00:00
aee48d011e Add shared D&D prompt assets package 2026-07-06 01:17:13 +00:00
3217bb3e12 Add a roadmap to refactor prompt assets 2026-07-05 20:13:26 -05:00
3df686f474 Bugfix in the built-in prompt references definition 2026-07-05 18:48:45 -05:00
7d4c027d09 Finish implementation of the scriptorium migration 2026-07-05 18:26:31 -05:00
31d70a2dd7 Finish Scriptorium runtime documentation 2026-07-05 18:34:21 +00:00
c9fbb331e2 Cut modules over to Scriptorium prompts 2026-07-05 18:27:07 +00:00
f6224dcbee Add Scriptorium-backed LLM runtime 2026-07-05 18:21:37 +00:00
de6689bc1d Add Scriptorium prompt assets 2026-07-05 18:13:10 +00:00
0fc740470f Switch config to Scriptorium profiles 2026-07-05 18:03:23 +00:00
49d94cc2e9 Add prompt input materials and session IDs 2026-07-05 17:51:36 +00:00
291298cf7b Add Scriptorium API grounding 2026-07-05 17:46:05 +00:00
9532ae8121 Add a feature roadmap and implementation plan to import the scriptorium LLM library 2026-07-05 12:42:15 -05:00
7601731a2c Clean up completed reference roadmap docs 2026-07-05 11:51:36 -05:00
3aa88ab9d3 Document completed LLM and reference expansion 2026-07-05 16:42:15 +00:00
c1ba94192d Cover reference prompts for chunk and normalize usage 2026-07-05 16:39:41 +00:00
22032dfd6d Deliver references to eligible runtime targets 2026-07-05 16:38:17 +00:00
4cafde2502 Materialize references for all eligible targets 2026-07-05 16:35:24 +00:00
8c623b7ad8 Support target-aware reference selectors 2026-07-05 16:31:23 +00:00
43dc954440 Resolve references across eligible pipeline targets 2026-07-05 16:24:49 +00:00
51053d390d Add stage-local reference config bindings 2026-07-05 16:18:00 +00:00
9278797aa9 Introduce target-aware resolved reference storage 2026-07-05 16:12:38 +00:00
39e49d7f77 Expand module contracts for references and normalizer LLM access 2026-07-05 16:06:47 +00:00
84c4c06712 Add a staged implementation plan to extend first-class LLM access and reference support across all chunk, extract, and normalize stages 2026-07-05 11:01:32 -05:00
eab640aa21 Update .gitignore to ignore build and testing output artifacts 2026-07-05 10:54:16 -05:00
a516944086 Finish the references implementation for the extraction module and update roadmap documentation 2026-07-05 10:53:16 -05:00
be6803ffa1 Document extraction reference support 2026-07-05 14:52:52 +00:00
ef4bdd4f9f Use references in D&D spell extraction 2026-07-05 14:49:17 +00:00
2f97895732 Record reference provenance in manifests 2026-07-05 14:44:44 +00:00
9e89b88efc Add prompt reference template functions 2026-07-05 14:37:39 +00:00
a57c6397e3 Materialize extraction reference files 2026-07-05 14:32:35 +00:00
39e071f5ca Add CLI reference binding flags 2026-07-05 14:27:23 +00:00
70d733edaf Resolve extraction reference bindings from config 2026-07-05 14:21:36 +00:00
1c31f56af1 Add reference contracts to extractor metadata 2026-07-05 14:13:48 +00:00
865 changed files with 107454 additions and 21228 deletions

8
.gitignore vendored
View File

@@ -1,5 +1,8 @@
# build artifacts
./notarius
# build and testing artifacts
notarius
notarius-output
workspace/
.codebase-memory/
# ---> Go
# If you prefer the allow list template instead of the deny list, see community template:
@@ -71,4 +74,3 @@ Icon
Network Trash Folder
Temporary Items
.apdisk

9
.woodpecker/release.yml Normal file
View File

@@ -0,0 +1,9 @@
# Advisory validation after source publication, never a release-completion gate.
when:
- event: tag
steps:
- name: validate-release
image: golang:1.27.0
commands:
- ./scripts/check-release-source.sh "$CI_COMMIT_TAG"

View File

@@ -1,6 +1,6 @@
Please review `docs/internal/overview.md` for initial orientation in this repository.
Start with `docs/development.md` for orientation and use its policy reading guide
to select the policies applicable to the task. Do not read the entire suite by
default.
Additionally, please carefully review the relevant documents in `docs/policy` before making any changes to this repository.
- `development.md` defines the contributor workflow for this application.
- `architecture.md` provides the canonical high-level architecture policy for this repository, and should be reviewed before writing or changing any code.
- `documentation.md` provides the canonical documentation policy for this repository, and should be reviewed before writing or changing any documentation.
Read and follow `docs/policy/agents.md` before recommending, planning, or
implementing repository changes.

23
COPYRIGHT Normal file
View File

@@ -0,0 +1,23 @@
Notarius
Copyright (C) 2026 Eric Rakestraw
SPDX-License-Identifier: GPL-3.0-or-later
Notarius is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The GNU General Public License version 3 is provided in LICENSE.
Policy material copied or adapted from Standard Repository Policies remains
licensed under CC-BY-SA-4.0. See docs/oss/attribution.md for the affected
portions, upstream credit, and license links.
Notarius is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Third-party code and assets are subject to their respective license terms.

646
LICENSE
View File

@@ -1,232 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for software and other kinds of works.
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and modification follow.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
“This License” refers to version 3 of the GNU General Public License.
"This License" refers to version 3 of the GNU General Public License.
“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A “covered work” means either the unmodified Program or a work based on the Program.
A "covered work" means either the unmodified Program or a work based
on the Program.
To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source for a work in source code form is that same work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
go-application-template
Copyright (C) 2026 eric
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
go-application-template Copyright (C) 2026 eric
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <https://www.gnu.org/licenses/>.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <https://www.gnu.org/philosophy/why-not-lgpl.html>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@@ -1,36 +1,75 @@
# Notarius
Notarius is a Go CLI for extracting structured artifacts from source material
with explicit, configurable pipeline modules.
Notarius is a Go CLI for turning source material into structured artifacts with
configured extraction pipelines. The implemented D&D workflow reads Seriatim
transcript JSON and can produce NPC, location, and item registries; their
source-grounded occurrences; scene descriptions, combat turns, enemy events,
and spell casts.
The current implementation reads Seriatim transcript JSON, chunks the source
units, extracts D&D spell-cast artifacts with an OpenAI-compatible LLM, and
writes JSON output plus diagnostics for each run.
## Quickstart
```sh
NOTARIUS_LLM_DEFAULT_BASE_URL=http://127.0.0.1:8080/v1 \
NOTARIUS_LLM_DEFAULT_MODEL=your-model \
Set `OPENROUTER_API_KEY` in your environment, then run the maintained
[minimal example](examples/dnd-minimal/config.yml) with its synthetic transcript:
~~~
go run ./cmd/notarius run dnd-session \
--config examples/dnd-spells.config.yml \
--input examples/seriatim-minimal-transcript.json
```
--config examples/dnd-minimal/config.yml \
--input-file examples/dnd-minimal/transcript.json
~~~
If the provider requires authentication, set
`NOTARIUS_LLM_DEFAULT_API_KEY` in the environment before running the command.
Outputs are written under `./notarius-output/<run-id>/` unless `--output-dir`
is provided.
This makes model calls and publishes domain JSON artifacts. Command syntax and exit
behavior are documented in the [CLI reference](docs/cli.md); configuration,
credentials, and module selection are owned by the
[configuration reference](docs/config.md).
Useful references:
For the complete ordered D&D workflow, use
[the complete configuration](examples/dnd-complete/config.yml) with
[its synthetic transcript](examples/dnd-complete/transcript.json). It
demonstrates all implemented D&D lanes, ordered generated references, native
resource customization, and optional source auxiliaries. See the
[complete workflow](docs/consumers/dnd-pipeline.md) for invocation and discovery.
- [CLI reference](docs/cli.md)
- [Configuration reference](docs/config.md)
- [Operations](docs/operations.md)
- [Troubleshooting](docs/troubleshooting.md)
- [Seriatim input contract](docs/integrations/seriatim.md)
- [OpenAI-compatible provider contract](docs/integrations/openai-compatible.md)
- [JSON output contract](docs/integrations/json-output.md)
- [D&D spell artifact contract](docs/integrations/dnd-spell-artifacts.md)
- [Developer workflow](docs/policy/development.md)
- [Internal architecture docs](docs/internal/overview.md)
- [Maintained example config](examples/dnd-spells.config.yml)
- [Maintained example input](examples/seriatim-minimal-transcript.json)
## Install A Source Release
Source builds require Go at or above the consumer minimum declared in
[`go.mod`](go.mod). Go 1.27.0 is required by the selected ConfigKit
dependency.
Install a pinned source release with Go:
~~~
GOWORK=off go install \
gitea.maximumdirect.net/eric/notarius/cmd/notarius@<tag>
~~~
Replace `<tag>` with a stable release tag such as `vMAJOR.MINOR.PATCH`. The
installed command's diagnostic version is described in the [CLI
reference](docs/cli.md); maintainers preparing a release should follow [Source
Releases](docs/release.md).
## Documentation
- [CLI reference](docs/cli.md) — commands, flags, output streams, and exits.
- [Configuration reference](docs/config.md) — configuration files, profiles,
validation, and module selection.
- [Operations](docs/operations.md) — output, state, recovery, and debug
handling.
- [Integration contracts](docs/integrations/) — Seriatim input, domain artifacts,
and native [ConfigKit](docs/integrations/pkg-configkit.md),
[PromptKit](docs/integrations/pkg-promptkit.md), and
[CommandKit](docs/integrations/pkg-commandkit.md) boundaries.
- [Subprocess consumer guide](docs/consumers/subprocess.md) — invoke Notarius
from an orchestrator and consume a published result.
- [Complete D&D consumer guide](docs/consumers/dnd-pipeline.md) — run the full
D&D pipeline as a subprocess and discover its structured artifacts.
- [Internal overview](docs/internal/overview.md) — implemented component map
for maintainers.
- [Developer guide](docs/development.md) — contributor orientation and
validation guidance.
- [Native migration guide](docs/consumers/native-migration.md) — move existing
configurations, invocations, and consumers to the native surface.
- [Future work](docs/roadmap/future.md) — separate backlog of ideas and priorities.
Notarius is licensed under the [GPL v3.0 or later](COPYRIGHT).
[Open Source attribution notices](docs/oss/attribution.md) are available.

View File

@@ -0,0 +1,102 @@
package assets_test
import (
"bytes"
"context"
"encoding/json"
"gitea.maximumdirect.net/eric/notarius/assets"
"io/fs"
"strings"
"testing"
"go.maximumdirect.net/promptkit"
"github.com/santhosh-tekuri/jsonschema/v6"
)
func TestCombatSemanticsPromptKeepsItsSceneLocalPolicyAndInput(t *testing.T) {
_, engine := loadNativeAssets(t)
const transcript = `{"sentinel":"combat-semantics-transcript"}`
handle, err := engine.PrepareExecution(context.Background(), promptkit.RunRequest{
PromptID: "notarius/dnd.scene_descriptions.validate_combat", APIKey: "test-only",
Inputs: map[string]promptkit.ArtifactRef{"transcript": promptkit.Inline(transcript)},
})
if err != nil {
t.Fatal(err)
}
defer handle.Discard()
details := handle.Details()
if details.SelectedProfileID != "notarius/dnd-extraction" || details.StructuredOutput == nil {
t.Fatal("native validator defaults/output contract lost")
}
var all string
for _, message := range details.Messages {
all += message.Content
if strings.Contains(message.Content, transcript) && (message.CacheControl == nil || message.CacheControl.Type != promptkit.CacheControlEphemeral) {
t.Fatal("chunk transcript native cache hint lost")
}
}
for _, content := range []string{"substantive active combat materially organizes the", "Do not judge the scene title", transcript} {
if strings.Count(all, content) != 1 {
t.Fatalf("scene-local context not rendered once: %q", content)
}
}
if _, err := engine.PrepareExecution(context.Background(), promptkit.RunRequest{PromptID: "notarius/dnd.scene_descriptions.validate_combat", APIKey: "test-only"}); err == nil {
t.Fatal("native validator accepted missing transcript")
}
}
func TestCombatSemanticsResponseSchemaRetainsClassificationAndExplanationRules(t *testing.T) {
schema, err := fs.ReadFile(assets.FS(), "dnd/scene-descriptions/validate/combat-semantics/schemas/dnd_scene_combat_semantics_llm.v1.json")
if err != nil {
t.Fatalf("loadResponseSchema() error = %v, want nil", err)
}
for _, classification := range []string{"combat", "non_combat"} {
if err := validateCombatSemanticsSchema(map[string]any{"classification": classification, "explanation": "The chunk contains sustained attack exchanges."}, schema); err != nil {
t.Fatalf("valid %q classification rejected: %v", classification, err)
}
}
for _, test := range []struct {
name string
response map[string]any
}{
{name: "missing explanation", response: map[string]any{"classification": "combat"}},
{name: "missing classification", response: map[string]any{"explanation": "The chunk contains active combat."}},
{name: "unknown property", response: map[string]any{"classification": "combat", "explanation": "The chunk contains active combat.", "confidence": 1}},
{name: "wrong classification type", response: map[string]any{"classification": 1, "explanation": "The chunk contains active combat."}},
{name: "wrong explanation type", response: map[string]any{"classification": "combat", "explanation": 1}},
{name: "unsupported classification", response: map[string]any{"classification": "uncertain", "explanation": "The classification is uncertain."}},
{name: "blank explanation", response: map[string]any{"classification": "combat", "explanation": ""}},
{name: "oversized explanation", response: map[string]any{"classification": "combat", "explanation": strings.Repeat("a", 513)}},
} {
t.Run(test.name, func(t *testing.T) {
if err := validateCombatSemanticsSchema(test.response, schema); err == nil {
t.Fatal("invalid private response accepted")
}
})
}
}
func validateCombatSemanticsSchema(instance map[string]any, schemaContent []byte) error {
instanceContent, err := json.Marshal(instance)
if err != nil {
return err
}
parsedInstance, err := jsonschema.UnmarshalJSON(bytes.NewReader(instanceContent))
if err != nil {
return err
}
parsedSchema, err := jsonschema.UnmarshalJSON(bytes.NewReader(schemaContent))
if err != nil {
return err
}
compiler := jsonschema.NewCompiler()
if err := compiler.AddResource("schema.json", parsedSchema); err != nil {
return err
}
compiled, err := compiler.Compile("schema.json")
if err != nil {
return err
}
return compiled.Validate(parsedInstance)
}

176
assets/combat_turns_test.go Normal file
View File

@@ -0,0 +1,176 @@
package assets_test
import (
"context"
"encoding/json"
"io/fs"
"reflect"
"strings"
"testing"
"gitea.maximumdirect.net/eric/notarius/assets"
"go.maximumdirect.net/promptkit"
)
func TestCombatPromptPairPreservesNativeContractAndFixedGrounding(t *testing.T) {
_, engine := loadNativeAssets(t)
initial, err := engine.PrepareExecution(context.Background(), promptkit.RunRequest{
PromptID: "notarius/dnd.combat_turns", APIKey: "test-only",
Inputs: map[string]promptkit.ArtifactRef{
"transcript": promptkit.Inline(`{"units":[{"text":"combat-transcript-marker"}]}`),
"npc_registry": promptkit.Inline(`{"npcs":[{"name":"combat-npc-marker"}]}`),
"party": promptkit.Inline("combat-party-marker"),
"players": promptkit.Inline(" "),
"glossary": promptkit.Inline(" "),
},
})
if err != nil {
t.Fatal(err)
}
defer initial.Discard()
correction, err := engine.PrepareExecution(context.Background(), promptkit.RunRequest{
PromptID: "notarius/dnd.combat_turns.repair", APIKey: "test-only",
Inputs: map[string]promptkit.ArtifactRef{"guidance": promptkit.Inline("Fix the actor citation.")},
})
if err != nil {
t.Fatal(err)
}
defer correction.Discard()
first, next := initial.Details(), correction.Details()
if first.SelectedProfileID != "notarius/dnd-extraction" || first.SelectedProfileID != next.SelectedProfileID || first.StructuredOutput == nil || !reflect.DeepEqual(first.OutputContract, next.OutputContract) {
t.Fatal("combat native pair lost its schema/default profile")
}
var system, all string
for _, message := range first.Messages {
all += message.Content
if message.Role == "system" {
system += message.Content
}
}
for _, principle := range []string{"Unmatched actors remain permitted.", "Exclude initiative setup without a turn", "Transcript units are the only evidence", "legendary_action", "lair_action"} {
if !strings.Contains(strings.Join(strings.Fields(system), " "), principle) {
t.Fatalf("missing enduring rule %q", principle)
}
}
for _, marker := range []string{"combat-transcript-marker", "combat-npc-marker", "combat-party-marker"} {
if strings.Count(all, marker) != 1 {
t.Fatalf("fixed input repeated: %q", marker)
}
}
if len(next.Messages) != 1 || next.Messages[0].Role != "user" || !strings.Contains(next.Messages[0].Content, "Fix the actor citation.") || strings.Contains(next.Messages[0].Content, "combat-transcript-marker") {
t.Fatal("correction did not contain only findings and a replacement assignment")
}
}
func TestCombatResponseSchemaUsesPrivateShape(t *testing.T) {
schema, err := fs.ReadFile(assets.FS(), "dnd/combat-turns/schemas/dnd_combat_turns_llm.v1.json")
if err != nil {
t.Fatal(err)
}
valid := validCombatResponse()
content, err := json.Marshal(valid)
if err != nil {
t.Fatal(err)
}
if err := validateJSONSchema(content, schema); err != nil {
t.Fatalf("valid combat response rejected: %v", err)
}
withSourceID := validCombatResponse()
withSourceID["combat_turns"].([]any)[0].(map[string]any)["source_refs"].([]any)[0].(map[string]any)["source_id"] = "session-alpha"
content, err = json.Marshal(withSourceID)
if err != nil {
t.Fatal(err)
}
if err := validateJSONSchema(content, schema); err == nil {
t.Fatal("response schema accepted source_id, want private source-reference shape")
}
}
func TestCombatResponseSchemaLeavesNonCategoricalSemanticsToValidators(t *testing.T) {
schema, err := fs.ReadFile(assets.FS(), "dnd/combat-turns/schemas/dnd_combat_turns_llm.v1.json")
if err != nil {
t.Fatal(err)
}
semanticCandidate := validCombatResponse()
turn := semanticCandidate["combat_turns"].([]any)[0].(map[string]any)
turn["actor"] = ""
ref := turn["source_refs"].([]any)[0].(map[string]any)
ref["start_unit_id"] = 0
ref["end_unit_id"] = -1
content, err := json.Marshal(semanticCandidate)
if err != nil {
t.Fatal(err)
}
if err := validateJSONSchema(content, schema); err != nil {
t.Fatalf("private schema rejected non-categorical validator-owned semantics: %v", err)
}
turn["source_refs"] = []any{}
content, err = json.Marshal(semanticCandidate)
if err != nil {
t.Fatal(err)
}
if err := validateJSONSchema(content, schema); err != nil {
t.Fatalf("private schema rejected empty validator-owned collections: %v", err)
}
}
func TestCombatResponseSchemaRetainsStructuralBoundary(t *testing.T) {
schema, err := fs.ReadFile(assets.FS(), "dnd/combat-turns/schemas/dnd_combat_turns_llm.v1.json")
if err != nil {
t.Fatal(err)
}
for _, test := range []struct {
name string
mutate func(map[string]any)
}{
{name: "missing actor", mutate: func(turn map[string]any) { delete(turn, "actor") }},
{name: "wrong actor type", mutate: func(turn map[string]any) { turn["actor"] = 1 }},
{name: "unknown field", mutate: func(turn map[string]any) { turn["unexpected"] = true }},
{name: "missing source refs", mutate: func(turn map[string]any) { delete(turn, "source_refs") }},
{name: "unsupported turn kind", mutate: func(turn map[string]any) { turn["turn_kind"] = "unsupported" }},
} {
t.Run(test.name, func(t *testing.T) {
candidate := validCombatResponse()
test.mutate(candidate["combat_turns"].([]any)[0].(map[string]any))
content, err := json.Marshal(candidate)
if err != nil {
t.Fatal(err)
}
if err := validateJSONSchema(content, schema); err == nil {
t.Fatal("private schema accepted structurally invalid response")
}
})
}
}
func TestCombatResponseSchemaAcceptsEverySupportedTurnKind(t *testing.T) {
schema, err := fs.ReadFile(assets.FS(), "dnd/combat-turns/schemas/dnd_combat_turns_llm.v1.json")
if err != nil {
t.Fatal(err)
}
for _, kind := range []string{"turn", "reaction", "legendary_action", "lair_action", "other"} {
candidate := validCombatResponse()
candidate["combat_turns"].([]any)[0].(map[string]any)["turn_kind"] = kind
content, err := json.Marshal(candidate)
if err != nil {
t.Fatal(err)
}
if err := validateJSONSchema(content, schema); err != nil {
t.Fatalf("supported turn kind %q was rejected: %v", kind, err)
}
}
}
func validCombatResponse() map[string]any {
return map[string]any{
"combat_turns": []any{
map[string]any{
"actor": "Aria",
"turn_kind": "reaction",
"source_refs": []any{map[string]any{"start_unit_id": 1, "end_unit_id": 2}},
},
},
}
}

View File

@@ -0,0 +1,7 @@
Revise the previous combat-turn list using these findings:
{{ input "guidance" }}
Return the complete replacement list using the original transcript and actor
grounding. Preserve transcript chronology and include only established combat
events. Return only JSON matching the original response contract.

View File

@@ -0,0 +1,18 @@
Extract Dungeons & Dragons combat-turn artifacts from the supplied transcript.
Include a record only when the transcript establishes that an in-world
participant takes a combat turn or performs a discrete interrupting combat
event. Keep events in transcript chronology; place an interrupting event where
it occurs.
Exclude initiative setup without a turn or combat event, tactical planning,
table talk, rules lookup, hypothetical events, abandoned intentions, recaps
outside the current passage, and downstream consequences. Do not infer combat
events from Dungeons & Dragons rules knowledge. Preserve the session as played
and attribute relevant nonstandard rulings to the GM or table. Unmatched actors
remain permitted.
Treat each record as one turn-level event and keep its supporting transcript
evidence together. Use `turn` for a regular combat turn, `reaction` for an
off-turn reaction, `legendary_action` for a legendary action,
`lair_action` for a lair action, and `other` for another discrete combat
event that does not fit those categories.

View File

@@ -0,0 +1,58 @@
prompts:
- id: dnd.combat_turns
default_profile: notarius/dnd-extraction
inputs:
- name: transcript
required: true
content_type: application/json
- name: players
required: false
content_type: text/plain
- name: party
required: false
content_type: text/plain
- name: glossary
required: false
content_type: text/plain
- name: npc_registry
required: false
content_type: application/json
messages:
- role: system
content_file: ../../shared/prompts/common-dnd-system.md
- role: system
content_file: ../../shared/prompts/common-dnd-identity.md
- role: user
content_file: ../../shared/prompts/common-dnd-references.md
cache_control:
type: ephemeral
- role: user
content_file: ../../shared/prompts/common-dnd-transcript-chunk.md
cache_control:
type: ephemeral
- role: system
content_file: ../../shared/prompts/common-dnd-extraction-evidence.md
- role: user
content_file: ../../shared/prompts/common-dnd-npc-registry.md
- role: system
content_file: ./instructions.md
cache_control:
type: ephemeral
output:
format: json
validation_mode: json_schema
schema_path: dnd/combat-turns/schemas/dnd_combat_turns_llm.v1.json
- id: dnd.combat_turns.repair
default_profile: notarius/dnd-extraction
inputs:
- name: guidance
required: true
content_type: text/plain
messages:
- role: user
content_file: ./correction.md
output:
format: json
validation_mode: json_schema
schema_path: dnd/combat-turns/schemas/dnd_combat_turns_llm.v1.json

View File

@@ -0,0 +1,42 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "notarius.dnd.combat_turns.llm",
"type": "object",
"additionalProperties": false,
"required": ["combat_turns"],
"properties": {
"combat_turns": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["actor", "turn_kind", "source_refs"],
"properties": {
"actor": {
"type": "string"
},
"turn_kind": {
"type": "string",
"enum": ["turn", "reaction", "legendary_action", "lair_action", "other"]
},
"source_refs": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["start_unit_id", "end_unit_id"],
"properties": {
"start_unit_id": {
"type": "integer"
},
"end_unit_id": {
"type": "integer"
}
}
}
}
}
}
}
}
}

View File

@@ -0,0 +1,12 @@
Compact combat grounding is supplied below. It can guide attention and
disambiguation, but it is not evidence. Do not derive an event, subject,
outcome, or source range from either list. The current transcript alone must
directly establish every returned event.
Combat-turn grounding:
{{ input "combat_turns" }}
Named combat-opponent grounding:
{{ input "npc_occurrences" }}

View File

@@ -0,0 +1,8 @@
Revise the previous enemy-event list using these findings:
{{ input "guidance" }}
Return the complete replacement event list using the original combat transcript
and fixed contextual grounding. Include only directly established engagements and
outcomes, retaining their source evidence and chronology. Return only JSON
matching the original response contract.

View File

@@ -0,0 +1,25 @@
Extract Dungeons & Dragons enemy events from the supplied combat transcript.
An `engaged` event requires direct establishment that a subject is actively
opposing the party in combat. A `killed`, `fled`, `captured`, or
`incapacitated` event requires explicit establishment of that outcome. An
outcome may share evidence with an engagement, and a later engagement or
outcome for the same subject remains a separate observation. Emit at most one
`engaged` observation for the same subject in this combat scene.
For `killed`, direct death or killing is required. For `fled`, the subject
must explicitly escape, retreat, or leave combat to avoid continued engagement.
For `captured`, the subject must be explicitly taken prisoner or secured
under the party's control. For `incapacitated`, the subject must be explicitly
unable to continue acting without being established as killed or captured.
When the transcript identifies a named NPC, use its normalized registry
spelling. A hostile creature without a registry entry is allowed. For unnamed
individuals or groups, use only the narrowest transcript-grounded label, such
as `Orcs`, `One orc`, or `Remaining orcs`; never invent member names, IDs,
or quantities.
Exclude party members, allies, neutral observers, mentioned-but-absent enemies,
hazards, traps, environmental effects, uncertain allegiance, table talk,
planning, hypotheses, recaps outside this passage, and downstream inference.
Do not infer an engagement or outcome from initiative, turn absence, damage,
defeat, movement, or a scene ending.

View File

@@ -0,0 +1,66 @@
prompts:
- id: dnd.enemy_events
default_profile: notarius/dnd-extraction
inputs:
- name: transcript
required: true
content_type: application/json
- name: players
required: false
content_type: text/plain
- name: party
required: false
content_type: text/plain
- name: glossary
required: false
content_type: text/plain
- name: npc_registry
required: true
content_type: application/json
- name: combat_turns
required: true
content_type: application/json
- name: npc_occurrences
required: true
content_type: application/json
messages:
- role: system
content_file: ../../shared/prompts/common-dnd-system.md
- role: system
content_file: ../../shared/prompts/common-dnd-identity.md
- role: user
content_file: ../../shared/prompts/common-dnd-references.md
cache_control:
type: ephemeral
- role: user
content_file: ../../shared/prompts/common-dnd-transcript-chunk.md
cache_control:
type: ephemeral
- role: system
content_file: ../../shared/prompts/common-dnd-extraction-evidence.md
- role: user
content_file: ../../shared/prompts/common-dnd-npc-registry.md
- role: user
content_file: ./combat-grounding.md
- role: system
content_file: ./instructions.md
cache_control:
type: ephemeral
output:
format: json
validation_mode: json_schema
schema_path: dnd/enemy-events/schemas/dnd_enemy_events_llm.v1.json
- id: dnd.enemy_events.repair
default_profile: notarius/dnd-extraction
inputs:
- name: guidance
required: true
content_type: text/plain
messages:
- role: user
content_file: ./correction.md
output:
format: json
validation_mode: json_schema
schema_path: dnd/enemy-events/schemas/dnd_enemy_events_llm.v1.json

View File

@@ -0,0 +1,36 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "notarius.dnd.enemy_events.llm",
"type": "object",
"additionalProperties": false,
"required": ["events"],
"properties": {
"events": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["name", "kind", "source_refs"],
"properties": {
"name": {"type": "string"},
"kind": {
"type": "string",
"enum": ["engaged", "killed", "fled", "captured", "incapacitated"]
},
"source_refs": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["start_unit_id", "end_unit_id"],
"properties": {
"start_unit_id": {"type": "integer"},
"end_unit_id": {"type": "integer"}
}
}
}
}
}
}
}
}

View File

@@ -0,0 +1,7 @@
Revise the previous item occurrence list using these findings:
{{ input "guidance" }}
Return the complete replacement list using the original transcript and registry
context. Preserve stated quantities and possession changes without inventing an
item or holder. Return only JSON matching the original response contract.

View File

@@ -0,0 +1,38 @@
Extract meaningful Dungeons & Dragons item and currency occurrences: discoveries and changes
in party possession established by the transcript. This is an occurrence history,
not an inventory or ledger: do not calculate balances, resolve item identity
across records, or infer ownership that the transcript does not establish.
For every occurrence, use the supplied canonical item `name`. Record a stated
quantity as an integer and leave it null when the transcript does not state
one. Preserve the stated currency denomination through the selected canonical
registry name.
Use `discovered` when the party learns of or encounters an item without
establishing possession. Use `acquired` when the party or a party member gains
possession. Use `lost` when party possession ends through a gift, sale, payment,
theft, abandonment, or destruction not caused by intended use. Use `consumed`
when intended use depletes an expendable item. Monetary spending, purchases, and
payments are always `lost`, not `consumed`. Classify currency as `consumed` only
when the transcript explicitly describes it being physically destroyed or
expended as a non-payment component. Use `transferred` only when possession
moves between two distinct named party members.
Return both `from` and `to` for every occurrence. Use JSON `null`, not an empty
string, whenever a holder does not apply. Follow this holder matrix exactly:
| `kind` | required `from` | required `to` |
| --- | --- | --- |
| `discovered` | `null` | `null` |
| `acquired` | `null` | `party` or the named party member gaining possession |
| `lost` | `party` or the named party member losing possession | `null` |
| `consumed` | `party` or the named party member consuming the item | `null` |
| `transferred` | one named party member | a different named party member |
Use `party` only for collective or unresolved party possession, never for
either side of a transfer. Do not emit a transfer for a gift, sale, or payment
outside the party.
Ordinary non-depleting use is not an occurrence. Do not infer acquisition from a
discovery, or discovery from an acquisition: emit both only when each is
independently established.

View File

@@ -0,0 +1,6 @@
Use the supplied item registry only to ground each occurrence. Every record
must use one registry item's canonical `name`; do not invent, rename, merge,
or infer registry items. The registry is not transcript evidence: cite only the
current transcript chunk in `source_refs`.
{{ input "item_registry" }}

View File

@@ -0,0 +1,58 @@
prompts:
- id: dnd.item_occurrences
default_profile: notarius/dnd-extraction
inputs:
- name: transcript
required: true
content_type: application/json
- name: players
required: false
content_type: text/plain
- name: party
required: false
content_type: text/plain
- name: glossary
required: false
content_type: text/plain
- name: item_registry
required: true
content_type: application/json
messages:
- role: system
content_file: ../../shared/prompts/common-dnd-system.md
- role: system
content_file: ../../shared/prompts/common-dnd-identity.md
- role: user
content_file: ../../shared/prompts/common-dnd-references.md
cache_control:
type: ephemeral
- role: user
content_file: ../../shared/prompts/common-dnd-transcript-chunk.md
cache_control:
type: ephemeral
- role: system
content_file: ../../shared/prompts/common-dnd-extraction-evidence.md
- role: user
content_file: ./item-registry.md
- role: system
content_file: ./instructions.md
cache_control:
type: ephemeral
output:
format: json
validation_mode: json_schema
schema_path: dnd/item-occurrences/schemas/dnd_item_occurrences_llm.v1.json
- id: dnd.item_occurrences.repair
default_profile: notarius/dnd-extraction
inputs:
- name: guidance
required: true
content_type: text/plain
messages:
- role: user
content_file: ./correction.md
output:
format: json
validation_mode: json_schema
schema_path: dnd/item-occurrences/schemas/dnd_item_occurrences_llm.v1.json

View File

@@ -0,0 +1,39 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "notarius.dnd.item_occurrences.llm",
"type": "object",
"additionalProperties": false,
"required": ["occurrences"],
"properties": {
"occurrences": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["name", "kind", "quantity", "from", "to", "source_refs"],
"properties": {
"name": {"type": "string"},
"kind": {
"type": "string",
"enum": ["discovered", "acquired", "lost", "consumed", "transferred"]
},
"quantity": {"type": ["integer", "null"]},
"from": {"type": ["string", "null"]},
"to": {"type": ["string", "null"]},
"source_refs": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["start_unit_id", "end_unit_id"],
"properties": {
"start_unit_id": {"type": "integer"},
"end_unit_id": {"type": "integer"}
}
}
}
}
}
}
}
}

View File

@@ -0,0 +1,7 @@
Revise the previous item registry using these findings:
{{ input "guidance" }}
Return the complete replacement registry, not only the changed records. Keep the
original transcript and reference context and return only JSON matching the
original response contract.

View File

@@ -0,0 +1,12 @@
Extract only items established by the provided Dungeons & Dragons transcript.
Include named unique items, concrete reusable item types, and stable unique
designations. Record each currency denomination separately when it is
established, such as copper pieces, silver pieces, gold pieces, or platinum
pieces. Do not use capitalization as an eligibility test. Keep distinct names
and designations as separate candidates; do not merge aliases or invent
qualifiers.
Do not record vague categories such as "loot", "treasure", or "some gear";
generic weapons; inferred properties; quantities; or inferred uniqueness. Omit
uncertain or unsupported items.

View File

@@ -0,0 +1,53 @@
prompts:
- id: dnd.item_registry
default_profile: notarius/dnd-extraction
inputs:
- name: transcript
required: true
content_type: application/json
- name: players
required: false
content_type: text/plain
- name: party
required: false
content_type: text/plain
- name: glossary
required: false
content_type: text/plain
messages:
- role: system
content_file: ../../../shared/prompts/common-dnd-system.md
- role: system
content_file: ../../../shared/prompts/common-dnd-identity.md
- role: user
content_file: ../../../shared/prompts/common-dnd-references.md
cache_control:
type: ephemeral
- role: user
content_file: ../../../shared/prompts/common-dnd-transcript-chunk.md
cache_control:
type: ephemeral
- role: system
content_file: ../../../shared/prompts/common-dnd-extraction-evidence.md
- role: system
content_file: ./instructions.md
cache_control:
type: ephemeral
output:
format: json
validation_mode: json_schema
schema_path: dnd/item-registry/extract/schemas/dnd_item_registry_llm.v1.json
- id: dnd.item_registry.repair
default_profile: notarius/dnd-extraction
inputs:
- name: guidance
required: true
content_type: text/plain
messages:
- role: user
content_file: ./correction.md
output:
format: json
validation_mode: json_schema
schema_path: dnd/item-registry/extract/schemas/dnd_item_registry_llm.v1.json

View File

@@ -0,0 +1,32 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "notarius.dnd.item_registry.llm",
"type": "object",
"additionalProperties": false,
"required": ["items"],
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["name", "source_refs"],
"properties": {
"name": {"type": "string"},
"source_refs": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["start_unit_id", "end_unit_id"],
"properties": {
"start_unit_id": {"type": "integer"},
"end_unit_id": {"type": "integer"}
}
}
}
}
}
}
}
}

View File

@@ -0,0 +1,9 @@
Determine whether candidates identify the same item type or unique designation
using their contextual labels and cited transcript windows. Do not treat nearby
evidence, similar objects, or a shared owner as sufficient.
Keep currency denominations and materially different item types separate. Keep
uncertain aliases separate. Do not infer an item property or uniqueness.
Set `canonical_candidate_number` to the supplied candidate number whose label
is the clearest established designation.

View File

@@ -0,0 +1,43 @@
prompts:
- id: dnd.item_registry.normalize
default_profile: notarius/dnd-extraction
inputs:
- name: candidates
required: true
content_type: application/json
- name: transcript
required: true
content_type: application/json
messages:
- role: system
content_file: ../../../shared/prompts/common-dnd-system.md
- role: system
content_file: ../../../../generic/normalize/deduplication/prompts/protocol.md
- role: system
content_file: ./instructions.md
cache_control:
type: ephemeral
- role: user
content_file: ../../../../generic/normalize/deduplication/prompts/candidates.md
- role: user
content_file: ../../../../generic/normalize/deduplication/prompts/transcript-windows.md
cache_control:
type: ephemeral
output:
format: json
validation_mode: json_schema
schema_path: generic/normalize/deduplication/schemas/semantic_reconciliation_llm.v1.json
- id: dnd.item_registry.normalize.repair
default_profile: notarius/dnd-extraction
inputs:
- name: guidance
required: true
content_type: text/plain
messages:
- role: user
content_file: ../../../../generic/normalize/deduplication/prompts/correction.md
output:
format: json
validation_mode: json_schema
schema_path: generic/normalize/deduplication/schemas/semantic_reconciliation_llm.v1.json

View File

@@ -0,0 +1,7 @@
Revise the previous location occurrence list using these findings:
{{ input "guidance" }}
Return a complete replacement occurrence list using the original transcript and
registry context. Keep identity-grounding context separate from current-transcript
evidence, and return only JSON matching the original response contract.

View File

@@ -0,0 +1,34 @@
Extract Dungeons & Dragons location occurrences from the supplied transcript.
Include an occurrence only when the transcript establishes one supplied
location, one occurrence kind, and a coherent passage supporting both.
Use exactly one kind per occurrence:
- visited: party members are physically present, arrive, remain, or depart;
- planned: the party explicitly proposes, intends, or agrees to future travel;
- recalled: the transcript explicitly recounts an earlier party visit; or
- mentioned: the location is explicitly referenced without stronger support,
including non-actionable speculation or a mere hypothetical reference.
A mere hypothetical or speculative reference is not planned unless the
transcript also establishes an actual proposal, intention, or agreement to
travel. When the hypothetical explicitly names a supplied location, it may be
mentioned.
A generic phrase in the current chunk may refer to a supplied named registry
location only when the chunk's context supports that coreference. It must not
create a registry location, and registry content or provenance must never
replace current-chunk evidence.
For every occurrence, return the exact selector from the location registry:
the canonical `name`, plus an empty `registry_refs` array for a unique name or
the complete ordered `registry_refs` array for a repeated name. Registry ranges
and context identify the location only; they are not occurrence evidence.
For overlapping support, visited outranks planned, recalled, and mentioned;
planned outranks recalled and mentioned; recalled outranks mentioned. A passage
may produce multiple records when it independently establishes separate facts,
such as recalling an earlier visit while planning a return. Omit inferred,
unstated, uncertain, or unsupported places and occurrences. Do not infer a
location or occurrence from surrounding events when the transcript does not
state it. Do not summarize location descriptions.

View File

@@ -0,0 +1,11 @@
A contextual location registry is provided below for identity grounding. It may
be empty. Every record supplies a canonical display name. A name that appears
once is selected with that name and an empty `registry_refs` array. A repeated
name is selected only by copying both its name and its complete, ordered
`registry_refs` array exactly as supplied.
Registry content is context, not occurrence evidence. Do not derive an
occurrence or `source_refs` range from the registry. Do not invent a location
or selector that is absent from it.
{{ input "location_registry" }}

View File

@@ -0,0 +1,58 @@
prompts:
- id: dnd.location_occurrences
default_profile: notarius/dnd-extraction
inputs:
- name: transcript
required: true
content_type: application/json
- name: players
required: false
content_type: text/plain
- name: party
required: false
content_type: text/plain
- name: glossary
required: false
content_type: text/plain
- name: location_registry
required: true
content_type: application/json
messages:
- role: system
content_file: ../../shared/prompts/common-dnd-system.md
- role: system
content_file: ../../shared/prompts/common-dnd-identity.md
- role: user
content_file: ../../shared/prompts/common-dnd-references.md
cache_control:
type: ephemeral
- role: user
content_file: ../../shared/prompts/common-dnd-transcript-chunk.md
cache_control:
type: ephemeral
- role: system
content_file: ../../shared/prompts/common-dnd-extraction-evidence.md
- role: user
content_file: ./location-registry.md
- role: system
content_file: ./instructions.md
cache_control:
type: ephemeral
output:
format: json
validation_mode: json_schema
schema_path: dnd/location-occurrences/schemas/dnd_location_occurrences_llm.v1.json
- id: dnd.location_occurrences.repair
default_profile: notarius/dnd-extraction
inputs:
- name: guidance
required: true
content_type: text/plain
messages:
- role: user
content_file: ./correction.md
output:
format: json
validation_mode: json_schema
schema_path: dnd/location-occurrences/schemas/dnd_location_occurrences_llm.v1.json

View File

@@ -0,0 +1,45 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "notarius.dnd.location_occurrences.llm",
"type": "object",
"additionalProperties": false,
"required": ["occurrences"],
"properties": {
"occurrences": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["name", "registry_refs", "kind", "source_refs"],
"properties": {
"name": {"type": "string"},
"registry_refs": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["start_unit_id", "end_unit_id"],
"properties": {
"start_unit_id": {"type": "integer", "minimum": 1},
"end_unit_id": {"type": "integer", "minimum": 1}
}
}
},
"kind": {"enum": ["visited", "planned", "recalled", "mentioned"]},
"source_refs": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["start_unit_id", "end_unit_id"],
"properties": {
"start_unit_id": {"type": "integer"},
"end_unit_id": {"type": "integer"}
}
}
}
}
}
}
}
}

View File

@@ -0,0 +1,7 @@
Revise the previous location registry using these findings:
{{ input "guidance" }}
Return the complete replacement registry, not only the changed records. Keep the
original transcript and reference context and return only JSON matching the
original response contract.

View File

@@ -0,0 +1,13 @@
Extract only physical places established by the provided Dungeons & Dragons
transcript that have a stable proper name or unique in-world designation. This
includes named planes, regions, settlements, districts, buildings, rooms,
landmarks, routes, and geographic features.
Do not create a registry location for generic, temporary, relative, or merely
descriptive phrases, including "the room", "the bar", "the hallway",
"outside", and "upstairs". Do not use capitalization as an eligibility test.
Keep aliases and nested places when the transcript identifies them; do not merge
or invent qualifiers for similarly named places.
Exclude people, creatures, objects, organizations, abstract concepts, and
places merely inferred from an event. Omit uncertain or unsupported places.

View File

@@ -0,0 +1,53 @@
prompts:
- id: dnd.location_registry
default_profile: notarius/dnd-extraction
inputs:
- name: transcript
required: true
content_type: application/json
- name: players
required: false
content_type: text/plain
- name: party
required: false
content_type: text/plain
- name: glossary
required: false
content_type: text/plain
messages:
- role: system
content_file: ../../../shared/prompts/common-dnd-system.md
- role: system
content_file: ../../../shared/prompts/common-dnd-identity.md
- role: user
content_file: ../../../shared/prompts/common-dnd-references.md
cache_control:
type: ephemeral
- role: user
content_file: ../../../shared/prompts/common-dnd-transcript-chunk.md
cache_control:
type: ephemeral
- role: system
content_file: ../../../shared/prompts/common-dnd-extraction-evidence.md
- role: system
content_file: ./instructions.md
cache_control:
type: ephemeral
output:
format: json
validation_mode: json_schema
schema_path: dnd/location-registry/extract/schemas/dnd_location_registry_llm.v1.json
- id: dnd.location_registry.repair
default_profile: notarius/dnd-extraction
inputs:
- name: guidance
required: true
content_type: text/plain
messages:
- role: user
content_file: ./correction.md
output:
format: json
validation_mode: json_schema
schema_path: dnd/location-registry/extract/schemas/dnd_location_registry_llm.v1.json

View File

@@ -0,0 +1,32 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "notarius.dnd.location_registry.llm",
"type": "object",
"additionalProperties": false,
"required": ["locations"],
"properties": {
"locations": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["name", "source_refs"],
"properties": {
"name": {"type": "string"},
"source_refs": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["start_unit_id", "end_unit_id"],
"properties": {
"start_unit_id": {"type": "integer"},
"end_unit_id": {"type": "integer"}
}
}
}
}
}
}
}
}

View File

@@ -0,0 +1,9 @@
Determine whether candidates identify the same physical place using their
contextual labels and cited transcript windows. Do not treat matching names,
nearby evidence, nested places, or generic labels as sufficient.
Keep parent and child places separate, as well as similarly named places and
uncertain aliases.
Set `canonical_candidate_number` to the supplied candidate number whose label
is the clearest established name.

View File

@@ -0,0 +1,43 @@
prompts:
- id: dnd.location_registry.normalize
default_profile: notarius/dnd-extraction
inputs:
- name: candidates
required: true
content_type: application/json
- name: transcript
required: true
content_type: application/json
messages:
- role: system
content_file: ../../../shared/prompts/common-dnd-system.md
- role: system
content_file: ../../../../generic/normalize/deduplication/prompts/protocol.md
- role: system
content_file: ./instructions.md
cache_control:
type: ephemeral
- role: user
content_file: ../../../../generic/normalize/deduplication/prompts/candidates.md
- role: user
content_file: ../../../../generic/normalize/deduplication/prompts/transcript-windows.md
cache_control:
type: ephemeral
output:
format: json
validation_mode: json_schema
schema_path: generic/normalize/deduplication/schemas/semantic_reconciliation_llm.v1.json
- id: dnd.location_registry.normalize.repair
default_profile: notarius/dnd-extraction
inputs:
- name: guidance
required: true
content_type: text/plain
messages:
- role: user
content_file: ../../../../generic/normalize/deduplication/prompts/correction.md
output:
format: json
validation_mode: json_schema
schema_path: generic/normalize/deduplication/schemas/semantic_reconciliation_llm.v1.json

View File

@@ -0,0 +1,7 @@
Revise the previous NPC occurrence list using these findings:
{{ input "guidance" }}
Return a complete replacement occurrence list using the original transcript and
registry context. Keep identity-grounding context separate from current-transcript
evidence, and return only JSON matching the original response contract.

View File

@@ -0,0 +1,26 @@
Extract Dungeons & Dragons NPC occurrences from the supplied
transcript. Include an occurrence only when the transcript establishes one
supplied NPC, one occurrence kind, and a coherent passage supporting both.
Use the supplied canonical NPC `name`; never invent or substitute a similar
name. Cite current-transcript evidence for every occurrence.
Do not summarize, infer relationships, sentiment, factions, motives, aliases,
or persistent state. Do not identify player characters, anonymous groups, or
invented NPCs. Split records when an NPC's occurrence kind changes, when
combat alignment changes, or when an NPC is first mentioned and later becomes
present.
Use exactly one kind per occurrence:
- mentioned: the NPC is referred to but is not established as present or communicating;
- noncombat_presence: the NPC is present and relevant but does not meaningfully participate in dialogue or combat;
- dialogue: the NPC speaks, responds, or is directly engaged in a meaningful non-combat exchange;
- combat_ally: the NPC actively participates in combat on the party's side;
- combat_opponent: the NPC actively participates in combat against the party; or
- other: the transcript clearly establishes a direct NPC occurrence that fits none of the preceding kinds.
When activities overlap, active combat participation outranks dialogue,
presence, and mention; dialogue outranks noncombat presence and mention; and
noncombat presence outranks mention. Other is only for directly evidenced
activity outside those categories. Split an occurrence rather than assigning
both combat alignments.

View File

@@ -0,0 +1,58 @@
prompts:
- id: dnd.npc_occurrences
default_profile: notarius/dnd-extraction
inputs:
- name: transcript
required: true
content_type: application/json
- name: players
required: false
content_type: text/plain
- name: party
required: false
content_type: text/plain
- name: glossary
required: false
content_type: text/plain
- name: npc_registry
required: true
content_type: application/json
messages:
- role: system
content_file: ../../shared/prompts/common-dnd-system.md
- role: system
content_file: ../../shared/prompts/common-dnd-identity.md
- role: user
content_file: ../../shared/prompts/common-dnd-references.md
cache_control:
type: ephemeral
- role: user
content_file: ../../shared/prompts/common-dnd-transcript-chunk.md
cache_control:
type: ephemeral
- role: system
content_file: ../../shared/prompts/common-dnd-extraction-evidence.md
- role: user
content_file: ../../shared/prompts/common-dnd-npc-registry.md
- role: system
content_file: ./instructions.md
cache_control:
type: ephemeral
output:
format: json
validation_mode: json_schema
schema_path: dnd/npc-occurrences/schemas/dnd_npc_occurrences_llm.v1.json
- id: dnd.npc_occurrences.repair
default_profile: notarius/dnd-extraction
inputs:
- name: guidance
required: true
content_type: text/plain
messages:
- role: user
content_file: ./correction.md
output:
format: json
validation_mode: json_schema
schema_path: dnd/npc-occurrences/schemas/dnd_npc_occurrences_llm.v1.json

View File

@@ -0,0 +1,42 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "notarius.dnd.npc_occurrences.llm",
"type": "object",
"additionalProperties": false,
"required": ["occurrences"],
"properties": {
"occurrences": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["name", "kind", "source_refs"],
"properties": {
"name": {
"type": "string"
},
"kind": {
"type": "string",
"enum": ["mentioned", "noncombat_presence", "dialogue", "combat_ally", "combat_opponent", "other"]
},
"source_refs": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["start_unit_id", "end_unit_id"],
"properties": {
"start_unit_id": {
"type": "integer"
},
"end_unit_id": {
"type": "integer"
}
}
}
}
}
}
}
}
}

View File

@@ -0,0 +1,7 @@
Revise the previous NPC registry using these findings:
{{ input "guidance" }}
Return the complete replacement registry, not only the changed records. Keep the
original transcript and reference context and return only JSON matching the
original response contract.

View File

@@ -0,0 +1,19 @@
Extract the individually identifiable Dungeons & Dragons non-player characters
established by the provided transcript.
Include an in-world non-PC only when the transcript factually establishes a
proper name or a stable, individually distinguishing title or alias. A factual
third-party mention establishes that identity even when the NPC is not
physically present, does not speak, and takes no direct action in this chunk.
Record only the NPC identity and the transcript evidence that establishes it;
do not infer or classify a separate occurrence.
Exclude human players, transcript speakers, and the GM as out-of-world people;
player characters identified by the player or party references; names used only
in hypothetical, speculative, or imagined examples; corrected transcription
mistakes; anonymous or generic roles; indistinguishable crowds or groups;
invented descriptive labels; and temporary summoned creatures or spell effects
without a persistent individual identity.
Preserve observed display spelling. Do not invent a label for an anonymous
creature, crowd, or generic role.

View File

@@ -0,0 +1,53 @@
prompts:
- id: dnd.npc_registry
default_profile: notarius/dnd-extraction
inputs:
- name: transcript
required: true
content_type: application/json
- name: players
required: false
content_type: text/plain
- name: party
required: false
content_type: text/plain
- name: glossary
required: false
content_type: text/plain
messages:
- role: system
content_file: ../../../shared/prompts/common-dnd-system.md
- role: system
content_file: ../../../shared/prompts/common-dnd-identity.md
- role: user
content_file: ../../../shared/prompts/common-dnd-references.md
cache_control:
type: ephemeral
- role: user
content_file: ../../../shared/prompts/common-dnd-transcript-chunk.md
cache_control:
type: ephemeral
- role: system
content_file: ../../../shared/prompts/common-dnd-extraction-evidence.md
- role: system
content_file: ./instructions.md
cache_control:
type: ephemeral
output:
format: json
validation_mode: json_schema
schema_path: dnd/npc-registry/extract/schemas/dnd_npc_registry_llm.v1.json
- id: dnd.npc_registry.repair
default_profile: notarius/dnd-extraction
inputs:
- name: guidance
required: true
content_type: text/plain
messages:
- role: user
content_file: ./correction.md
output:
format: json
validation_mode: json_schema
schema_path: dnd/npc-registry/extract/schemas/dnd_npc_registry_llm.v1.json

View File

@@ -0,0 +1,41 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "notarius.dnd.npc_registry.llm",
"type": "object",
"additionalProperties": false,
"required": ["npcs"],
"properties": {
"npcs": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"name",
"source_refs"
],
"properties": {
"name": {
"type": "string"
},
"source_refs": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["start_unit_id", "end_unit_id"],
"properties": {
"start_unit_id": {
"type": "integer"
},
"end_unit_id": {
"type": "integer"
}
}
}
}
}
}
}
}
}

View File

@@ -0,0 +1,12 @@
Determine whether candidates refer to the same individual using their
contextual labels and cited transcript windows. Preserve distinct individuals
even when their names are similar or their contextual descriptions are
identical.
Set `canonical_candidate_number` to the supplied candidate number whose label
is the preferred canonical display name. Prefer a complete, stable proper name
over an abbreviation. Prefer an unadorned proper name over that name plus a
contextual class, role, title, or relationship descriptor unless the transcript
establishes the descriptor as part of the person's name. A longer display name
is not inherently more canonical; for example, do not prefer `Captain Aria`
over `Aria` solely because it includes the contextual title `Captain`.

View File

@@ -0,0 +1,43 @@
prompts:
- id: dnd.npc_registry.normalize
default_profile: notarius/dnd-extraction
inputs:
- name: candidates
required: true
content_type: application/json
- name: transcript
required: true
content_type: application/json
messages:
- role: system
content_file: ../../../shared/prompts/common-dnd-system.md
- role: system
content_file: ../../../../generic/normalize/deduplication/prompts/protocol.md
- role: system
content_file: ./instructions.md
cache_control:
type: ephemeral
- role: user
content_file: ../../../../generic/normalize/deduplication/prompts/candidates.md
- role: user
content_file: ../../../../generic/normalize/deduplication/prompts/transcript-windows.md
cache_control:
type: ephemeral
output:
format: json
validation_mode: json_schema
schema_path: generic/normalize/deduplication/schemas/semantic_reconciliation_llm.v1.json
- id: dnd.npc_registry.normalize.repair
default_profile: notarius/dnd-extraction
inputs:
- name: guidance
required: true
content_type: text/plain
messages:
- role: user
content_file: ../../../../generic/normalize/deduplication/prompts/correction.md
output:
format: json
validation_mode: json_schema
schema_path: generic/normalize/deduplication/schemas/semantic_reconciliation_llm.v1.json

View File

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

View File

@@ -0,0 +1,7 @@
Revise the previous scene description using these findings:
{{ input "guidance" }}
Return one complete replacement kind, title, and summary for the original
transcript chunk. Do not change its boundary or invent details to justify a
classification. Return only JSON matching the original response contract.

View File

@@ -0,0 +1,41 @@
Describe exactly one accepted Dungeons & Dragons scene from the supplied
transcript chunk. The complete chunk is the evidence boundary: do not split it
into multiple scenes or use facts that are not supported by it.
Return one kind, one concise title, and one concise summary. Choose exactly one
kind:
- combat: a scene classified as combat under the shared combat policy.
- narrative: current-session in-world play that is not principally active
combat, a prior-session recap, or sustained out-of-character session
discussion. This includes exploration, travel, dialogue, investigation,
in-character planning, and aftermath.
- recap: the scene's organizing purpose is to recount events from a previous
session for the table. An in-world character recounting history during
current play remains narrative.
- meta: the scene's organizing purpose is sustained out-of-character
discussion about the game or session rather than advancing current in-world
play.
Narrative is the default for actual current-session gameplay that does not meet
another definition. When the accepted chunk has no substantive active combat:
1. use recap when recounting a previous session is the chunk's
primary table purpose;
2. otherwise use meta when sustained out-of-character session discussion is
primary and in-world progression is no more than incidental; and
3. use narrative for all remaining current-session in-world play.
Brief table talk, dice resolution, rules clarification, jokes, or
administrative comments do not make a gameplay scene meta. A short recollection
used to orient current action does not make a scene recap.
The title must be a short, distinguishing phrase rather than a sentence,
chapter number, or generic label such as "Scene." It may use names and places
established by the transcript or disambiguated by campaign references, but it
must not invent a proper noun.
The summary must briefly state the main activity and material transition or
outcome established within the accepted chunk. Do not add analysis, inferred
motives, hidden state, future consequences, relationship claims, or facts from
outside the chunk.

View File

@@ -0,0 +1,53 @@
prompts:
- id: dnd.scene_descriptions
default_profile: notarius/dnd-extraction
inputs:
- name: transcript
required: true
content_type: application/json
- name: players
required: false
content_type: text/plain
- name: party
required: false
content_type: text/plain
- name: glossary
required: false
content_type: text/plain
messages:
- role: system
content_file: ../../shared/prompts/common-dnd-system.md
- role: system
content_file: ../../shared/prompts/common-dnd-identity.md
- role: user
content_file: ../../shared/prompts/common-dnd-references.md
cache_control:
type: ephemeral
- role: user
content_file: ../../shared/prompts/common-dnd-transcript-chunk.md
cache_control:
type: ephemeral
- role: system
content_file: ../../shared/prompts/common-dnd-scene-combat-policy.md
- role: system
content_file: ./instructions.md
cache_control:
type: ephemeral
output:
format: json
validation_mode: json_schema
schema_path: dnd/scene-descriptions/schemas/dnd_scene_descriptions_llm.v1.json
- id: dnd.scene_descriptions.repair
default_profile: notarius/dnd-extraction
inputs:
- name: guidance
required: true
content_type: text/plain
messages:
- role: user
content_file: ./correction.md
output:
format: json
validation_mode: json_schema
schema_path: dnd/scene-descriptions/schemas/dnd_scene_descriptions_llm.v1.json

View File

@@ -0,0 +1,19 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "notarius.dnd.scene_descriptions.llm",
"type": "object",
"additionalProperties": false,
"required": ["kind", "title", "summary"],
"properties": {
"kind": {
"type": "string",
"enum": ["combat", "narrative", "recap", "meta"]
},
"title": {
"type": "string"
},
"summary": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,8 @@
Classify only whether substantive active combat occurs in the supplied
transcript chunk under the shared combat policy. Do not judge the scene title,
summary, non-combat subtype, scene boundary, or any other aspect of a scene
description.
Return `combat` when the chunk contains substantive active combat and
`non_combat` otherwise. Give a concise, transcript-grounded explanation for
the classification.

View File

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

View File

@@ -0,0 +1,18 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "notarius.dnd.scene_descriptions.combat_semantics.llm",
"type": "object",
"additionalProperties": false,
"required": ["classification", "explanation"],
"properties": {
"classification": {
"type": "string",
"enum": ["combat", "non_combat"]
},
"explanation": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
}
}

View File

@@ -0,0 +1,8 @@
Revise the previous scene-boundary plan using these findings:
{{ input "guidance" }}
Return a complete replacement scene plan for the original full transcript, not
only the changed ranges. Keep the original source-unit IDs and cover every unit
in document order without gaps or overlaps. Return only JSON matching the original
response contract.

View File

@@ -0,0 +1,19 @@
Divide the complete provided transcript into coherent Dungeons & Dragons scenes
for the `dnd/scenes` chunk module.
A scene is a coherent unit of play. Start a new scene when the transcript
establishes a meaningful change in location, objective, threat, activity,
encounter, or mode of play. Good reasons include a material move, beginning or
ending combat, a substantially different encounter phase, a shift between
combat, exploration, social interaction, planning, travel, rest, or downtime,
a change in the central NPC, faction, threat, or objective, or a sustained
table-level interruption that materially changes the activity.
Do not split a scene merely because a speaker or combat round changes, a
routine turn occurs, or the table briefly digresses. Prefer fewer coherent
scenes over speculative or fine-grained boundaries.
Cover the complete transcript from its first source unit to its last. Return
scenes in source-unit order with no gaps or overlaps. Use only positive integer
source-unit IDs from the transcript, and give every scene one inclusive
`start_unit_id` and one inclusive `end_unit_id`.

View File

@@ -0,0 +1,47 @@
prompts:
- id: dnd.scenes
default_profile: notarius/dnd-extraction
inputs:
- name: transcript
required: true
content_type: application/json
- name: players
required: false
content_type: text/plain
- name: party
required: false
content_type: text/plain
- name: glossary
required: false
content_type: text/plain
messages:
- role: system
content_file: ../../shared/prompts/common-dnd-system.md
- role: user
content_file: ../../shared/prompts/common-dnd-references.md
cache_control:
type: ephemeral
- role: system
content_file: ./instructions.md
- role: user
content_file: ../../shared/prompts/common-dnd-transcript-full.md
cache_control:
type: ephemeral
output:
format: json
validation_mode: json_schema
schema_path: dnd/scenes/schemas/dnd_scenes_llm.v1.json
- id: dnd.scenes.repair
default_profile: notarius/dnd-extraction
inputs:
- name: guidance
required: true
content_type: text/plain
messages:
- role: user
content_file: ./correction.md
output:
format: json
validation_mode: json_schema
schema_path: dnd/scenes/schemas/dnd_scenes_llm.v1.json

View File

@@ -0,0 +1,28 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "notarius.dnd.scenes.llm",
"type": "object",
"additionalProperties": false,
"required": ["scenes"],
"properties": {
"scenes": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["start_unit_id", "end_unit_id"],
"properties": {
"start_unit_id": {
"type": "integer",
"minimum": 1
},
"end_unit_id": {
"type": "integer",
"minimum": 1
}
}
}
}
}
}

View File

@@ -0,0 +1,8 @@
Transcript units are the only evidence for extracted events and factual claims.
Every reported factual claim must be supported by cited transcript units. Use
integer `start_unit_id` and `end_unit_id` values from the transcript.
Within each range, `start_unit_id` must identify the earlier transcript unit and
`end_unit_id` the same or a later unit according to transcript order.
When supporting evidence is non-contiguous, use multiple narrow ranges rather
than a broad range that bridges unrelated conversation.

View File

@@ -0,0 +1,7 @@
Use the most specific supported in-world character or creature identity for
each actor or participant. Do not identify a human player, transcript speaker,
or the GM as an out-of-world person when an in-world identity is supported.
Player, party, glossary, campaign, and NPC registry references may disambiguate
an identity, but a reference alone cannot establish that the identity
participated in the transcript.

View File

@@ -0,0 +1,10 @@
A normalized Dungeons & Dragons NPC registry is provided below as grounding
material. It may be empty. Use it only to prefer exact canonical participant
names when the transcript identifies a participant.
Registry content is context, not event evidence. Do not extract events,
participants, effects, or source references from the registry. Registry source
references describe registry provenance and may belong to another session; they
are never evidence for the current transcript.
{{ input "npc_registry" }}

View File

@@ -0,0 +1,12 @@
Optional reference material for this Dungeons & Dragons campaign is provided
below. Use it only to disambiguate names, aliases, speakers, campaign terms, or
spell names already present in the transcript.
Player list reference:
{{ input "players" }}
Party roster reference:
{{ input "party" }}
Glossary reference:
{{ input "glossary" }}

View File

@@ -0,0 +1,13 @@
Use `combat` only when substantive active combat materially organizes the
scene. Active combat includes initiative or turn exchanges, attacks, combat
spells, damage, saves, movement, or similarly sustained hostile action.
Do not use `combat` for planning or preparing for a possible fight; threats,
hostile dialogue, or a tense confrontation; immediate aftermath, looting,
healing, or discussion of a completed fight; a recap or in-world recollection
of earlier combat; or out-of-character rules discussion without active
encounter play.
When a chunk contains substantive active combat alongside brief setup, rules
clarification, interruption, phase transition, or immediate aftermath, classify
it as `combat`.

View File

@@ -0,0 +1,5 @@
You process Dungeons & Dragons gameplay transcripts.
As input, you will receive one or more portions of a transcript. The transcript may contain transcription errors, repeated lines, incomplete sentences, and misheard proper nouns.
Return exactly one JSON object that conforms to the configured response schema, with no explanatory prose.

View File

@@ -0,0 +1,3 @@
One extraction chunk from a Dungeons & Dragons gameplay transcript is provided below. Report and infer only what is within this chunk. Its unit IDs retain their source-wide meaning.
{{ input "transcript" }}

View File

@@ -0,0 +1,3 @@
The complete ordered transcript of this Dungeons & Dragons gameplay session is provided below.
{{ input "transcript" }}

View File

@@ -0,0 +1,5 @@
Revise the previous spell-cast list using these findings:
{{ input "guidance" }}
Return the complete replacement spell-cast list under the same output contract.

View File

@@ -0,0 +1 @@
Extract the spell casts established by the provided transcript chunk. Return the complete spell-cast list, or an empty list when no casting event is supported.

View File

@@ -0,0 +1,18 @@
Extract Dungeons & Dragons spell-cast artifacts from transcript evidence.
Include an actual casting event or an unambiguous declared casting attempt.
Exclude spell mentions, hypothetical plans, rules discussion, and catalog
matches that do not establish a casting event in the transcript.
For every extracted cast, the transcript evidence must collectively support the
in-world caster, the spell, and the fact that the cast or declared attempt
occurred.
Attribute every cast to its in-world caster. Map first-person player speech to
the associated player character, and attribute a spell narrated by the GM to
the in-world creature that casts it. If the caster cannot be resolved, use only
the most specific in-world identity supported by the transcript; do not invent
a name.
The spell catalog lists each spell's canonical_name and recognized aliases.
If the transcript uses an alias, select that entry's canonical_name. Return the
canonical spelling exactly; never return an alias as a spell name.

View File

@@ -0,0 +1,65 @@
prompts:
- id: dnd.spells
default_profile: notarius/dnd-extraction
inputs:
- name: transcript
required: true
content_type: application/json
- name: spell_catalog
required: true
content_type: application/json
- name: players
required: false
content_type: text/plain
- name: party
required: false
content_type: text/plain
- name: glossary
required: false
content_type: text/plain
- name: npc_registry
required: false
content_type: application/json
messages:
- role: system
content_file: ../../shared/prompts/common-dnd-system.md
- role: system
content_file: ../../shared/prompts/common-dnd-identity.md
- role: system
content_file: ./principles.md
- role: user
content_file: ../../shared/prompts/common-dnd-references.md
cache_control:
type: ephemeral
- role: user
content_file: ../../shared/prompts/common-dnd-transcript-chunk.md
cache_control:
type: ephemeral
- role: system
content_file: ../../shared/prompts/common-dnd-extraction-evidence.md
- role: user
content_file: ../../shared/prompts/common-dnd-npc-registry.md
- role: user
content_file: ./spell-catalog.md
- role: user
content_file: ./instructions.md
cache_control:
type: ephemeral
output:
format: json
validation_mode: json_schema
schema_path: dnd/spells/schemas/dnd_spells_llm.v1.json
- id: dnd.spells.repair
default_profile: notarius/dnd-extraction
inputs:
- name: guidance
required: true
content_type: text/plain
messages:
- role: user
content_file: ./correction.md
output:
format: json
validation_mode: json_schema
schema_path: dnd/spells/schemas/dnd_spells_llm.v1.json

View File

@@ -0,0 +1,3 @@
The spell recognition catalog for this operation:
{{ input "spell_catalog" }}

View File

@@ -0,0 +1,48 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "notarius.dnd.spells.llm",
"type": "object",
"additionalProperties": false,
"required": ["spell_casts"],
"properties": {
"spell_casts": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"caster",
"spell",
"source_refs"
],
"properties": {
"caster": {
"type": "string",
"description": "Canonical in-world character or creature that casts the spell, never the human player, transcript speaker, or GM when the in-world caster can be identified."
},
"spell": {
"type": "string",
"description": "Canonical spell name from the provided spell-name catalog."
},
"source_refs": {
"type": "array",
"description": "Transcript ranges offered as evidence for the caster, spell name, and casting event in this spell-cast object.",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["start_unit_id", "end_unit_id"],
"properties": {
"start_unit_id": {
"type": "integer"
},
"end_unit_id": {
"type": "integer"
}
}
}
}
}
}
}
}
}

151
assets/enemy_events_test.go Normal file
View File

@@ -0,0 +1,151 @@
package assets_test
import (
"context"
"encoding/json"
"io/fs"
"reflect"
"strings"
"testing"
"gitea.maximumdirect.net/eric/notarius/assets"
"go.maximumdirect.net/promptkit"
)
func TestEnemyResponseSchemaDefinesPrivateStructuralBoundary(t *testing.T) {
schema, err := fs.ReadFile(assets.FS(), "dnd/enemy-events/schemas/dnd_enemy_events_llm.v1.json")
if err != nil {
t.Fatal(err)
}
valid := validEnemyResponse()
content, err := json.Marshal(valid)
if err != nil {
t.Fatal(err)
}
if err := validateJSONSchema(content, schema); err != nil {
t.Fatalf("valid response rejected: %v", err)
}
semantic := validEnemyResponse()
event := semantic["events"].([]any)[0].(map[string]any)
event["name"] = ""
ref := event["source_refs"].([]any)[0].(map[string]any)
ref["start_unit_id"] = 0
ref["end_unit_id"] = -1
content, err = json.Marshal(semantic)
if err != nil || validateJSONSchema(content, schema) != nil {
t.Fatalf("non-categorical validator-owned semantics were rejected: %v", err)
}
}
func TestEnemyResponseSchemaRejectsInvalidStructure(t *testing.T) {
schema, err := fs.ReadFile(assets.FS(), "dnd/enemy-events/schemas/dnd_enemy_events_llm.v1.json")
if err != nil {
t.Fatal(err)
}
for _, mutate := range []func(map[string]any){
func(event map[string]any) { delete(event, "name") },
func(event map[string]any) { event["kind"] = 1 },
func(event map[string]any) { event["kind"] = "unsupported" },
func(event map[string]any) { event["unexpected"] = true },
func(event map[string]any) { event["source_refs"].([]any)[0].(map[string]any)["source_id"] = "session" },
} {
candidate := validEnemyResponse()
mutate(candidate["events"].([]any)[0].(map[string]any))
content, err := json.Marshal(candidate)
if err != nil {
t.Fatal(err)
}
if err := validateJSONSchema(content, schema); err == nil {
t.Fatal("private schema accepted structurally invalid response")
}
}
}
func TestEnemyResponseSchemaAcceptsEverySupportedKind(t *testing.T) {
schema, err := fs.ReadFile(assets.FS(), "dnd/enemy-events/schemas/dnd_enemy_events_llm.v1.json")
if err != nil {
t.Fatal(err)
}
for _, kind := range []string{"engaged", "killed", "fled", "captured", "incapacitated"} {
candidate := validEnemyResponse()
candidate["events"].([]any)[0].(map[string]any)["kind"] = kind
content, err := json.Marshal(candidate)
if err != nil {
t.Fatal(err)
}
if err := validateJSONSchema(content, schema); err != nil {
t.Fatalf("supported enemy-event kind %q was rejected: %v", kind, err)
}
}
}
func validEnemyResponse() map[string]any {
return map[string]any{"events": []any{map[string]any{
"name": "Ashfang", "kind": "engaged", "source_refs": []any{map[string]any{"start_unit_id": 1, "end_unit_id": 1}},
}}}
}
func TestEnemyPromptPairRetainsRequiredGroundingAndNativeDefaults(t *testing.T) {
_, engine := loadNativeAssets(t)
initial, err := engine.PrepareExecution(context.Background(), promptkit.RunRequest{PromptID: "notarius/dnd.enemy_events", APIKey: "test-only", Inputs: enemyEventPromptInputs()})
if err != nil {
t.Fatal(err)
}
defer initial.Discard()
correction, err := engine.PrepareExecution(context.Background(), promptkit.RunRequest{
PromptID: "notarius/dnd.enemy_events.repair", APIKey: "test-only",
Inputs: map[string]promptkit.ArtifactRef{"guidance": promptkit.Inline("Combine the duplicate engagement evidence.")},
})
if err != nil {
t.Fatal(err)
}
defer correction.Discard()
first, next := initial.Details(), correction.Details()
if first.SelectedProfileID != "notarius/dnd-extraction" || first.SelectedProfileID != next.SelectedProfileID || first.StructuredOutput == nil || !reflect.DeepEqual(first.OutputContract, next.OutputContract) {
t.Fatal("enemy-event prompt pair lost schema/defaults")
}
var system, all string
for _, message := range first.Messages {
all += message.Content
if message.Role == "system" {
system += message.Content
}
}
for _, rule := range []string{"Emit at most one", "A hostile creature without a registry entry is allowed.", "Do not infer an engagement or outcome", "Transcript units are the only evidence"} {
if !strings.Contains(strings.Join(strings.Fields(system), " "), rule) {
t.Fatalf("missing enduring rule %q", rule)
}
}
for _, marker := range []string{"enemy-transcript", "enemy-player", "enemy-party", "enemy-glossary", "enemy-npc", "enemy-turn", "enemy-opponent"} {
if strings.Count(all, marker) != 1 {
t.Fatalf("fixed grounding repeated: %q", marker)
}
}
if len(next.Messages) != 1 || next.Messages[0].Role != "user" || !strings.Contains(next.Messages[0].Content, "Combine the duplicate engagement evidence.") || strings.Contains(next.Messages[0].Content, "enemy-transcript") {
t.Fatal("correction repeated fixed inputs or omitted findings")
}
for _, name := range []string{"npc_registry", "combat_turns", "npc_occurrences"} {
missing := enemyEventPromptInputs()
delete(missing, name)
handle, err := engine.PrepareExecution(context.Background(), promptkit.RunRequest{PromptID: "notarius/dnd.enemy_events", APIKey: "test-only", Inputs: missing})
if handle != nil {
handle.Discard()
}
if err == nil || !strings.Contains(err.Error(), name) {
t.Fatalf("missing %s input=%v", name, err)
}
}
}
func enemyEventPromptInputs() map[string]promptkit.ArtifactRef {
return map[string]promptkit.ArtifactRef{
"transcript": promptkit.Inline(`{"value":"enemy-transcript"}`),
"players": promptkit.Inline("enemy-player"),
"party": promptkit.Inline("enemy-party"),
"glossary": promptkit.Inline("enemy-glossary"),
"npc_registry": promptkit.Inline(`{"npcs":[{"name":"enemy-npc"}]}`),
"combat_turns": promptkit.Inline(`{"combat_turns":[{"actor":"enemy-turn","turn_kind":"turn"}]}`),
"npc_occurrences": promptkit.Inline(`{"npc_occurrences":[{"name":"enemy-opponent","kind":"combat_opponent"}]}`),
}
}

View File

@@ -0,0 +1,3 @@
Candidate material, including the exact valid candidate-number range:
{{ input "candidates" }}

View File

@@ -0,0 +1,6 @@
Revise the previous duplicate-entity proposal using these findings:
{{ input "guidance" }}
Return one complete replacement proposal under the original output contract.
Do not return a patch or commentary.

View File

@@ -0,0 +1,5 @@
Identify only high-confidence duplicate entities among the supplied candidates.
Preserve distinct entities even when their names are similar. Treat contextual descriptions and transcript evidence as supporting material, not as permission to merge ambiguous records.
When several records are duplicates, choose as canonical the candidate with the clearest stable identity. Prefer a complete proper name over an abbreviation, and prefer an unadorned proper name over one with incidental descriptors unless the evidence establishes those descriptors as part of the name. A longer name is not inherently more canonical.

View File

@@ -0,0 +1,39 @@
prompts:
- id: generic.semantic_reconciliation
inputs:
- name: candidates
required: true
content_type: application/json
- name: transcript
required: true
content_type: application/json
messages:
- role: system
content_file: ./system.md
- role: system
content_file: ./protocol.md
- role: system
content_file: ./instructions.md
cache_control:
type: ephemeral
- role: user
content_file: ./candidates.md
- role: user
content_file: ./transcript-windows.md
output:
format: json
validation_mode: json_schema
schema_path: generic/normalize/deduplication/schemas/semantic_reconciliation_llm.v1.json
- id: generic.semantic_reconciliation.repair
inputs:
- name: guidance
required: true
content_type: text/plain
messages:
- role: user
content_file: ./correction.md
output:
format: json
validation_mode: json_schema
schema_path: generic/normalize/deduplication/schemas/semantic_reconciliation_llm.v1.json

View File

@@ -0,0 +1,9 @@
Use only the positive integer `candidate_number` values supplied in the candidate material. Valid candidate numbers are exactly the inclusive `first` through `last` values declared in `candidate_number_range`; use the explicit number attached to each candidate.
Transcript unit `id` values and evidence `start_unit_id` and `end_unit_id` values identify source positions. They are not candidate numbers and must never be used in `candidate_numbers` or `canonical_candidate_number`.
Return a duplicate group only when the evidence supports that every selected candidate describes the same underlying entity. Each group must contain at least two distinct candidate numbers, and its `canonical_candidate_number` must be one of those numbers. A candidate may appear in at most one group.
Omit uncertain matches and candidates that should remain distinct. Do not invent candidates or infer a number that is not explicitly supplied. An empty `duplicate_groups` array is valid.
The response must conform exactly to the selected JSON schema. Return candidate numbers only: do not copy candidate names, evidence, transcript text, source identifiers, or source ranges into the response.

View File

@@ -0,0 +1,2 @@
You reconcile structured records that may describe the same underlying entity.
Follow the supplied protocol and return only the requested structured result.

View File

@@ -0,0 +1,3 @@
Transcript evidence windows:
{{ input "transcript" }}

View File

@@ -0,0 +1,32 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "notarius.generic.semantic_reconciliation.llm",
"title": "notarius_semantic_reconciliation_llm_v1",
"type": "object",
"additionalProperties": false,
"required": ["duplicate_groups"],
"properties": {
"duplicate_groups": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["candidate_numbers", "canonical_candidate_number"],
"properties": {
"candidate_numbers": {
"type": "array",
"minItems": 2,
"items": {
"type": "integer",
"minimum": 1
}
},
"canonical_candidate_number": {
"type": "integer",
"minimum": 1
}
}
}
}
}
}

View File

@@ -0,0 +1,79 @@
package assets_test
import (
"encoding/json"
"io/fs"
"testing"
"gitea.maximumdirect.net/eric/notarius/assets"
)
func TestItemOccurrenceSchemaIsStrictlyStructuralAndPrivate(t *testing.T) {
schema, err := fs.ReadFile(assets.FS(), "dnd/item-occurrences/schemas/dnd_item_occurrences_llm.v1.json")
if err != nil {
t.Fatal(err)
}
valid := map[string]any{"occurrences": []any{
map[string]any{
"name": "", "kind": "transferred", "quantity": 0, "from": "party", "to": "Party",
"source_refs": []any{map[string]any{"start_unit_id": 0, "end_unit_id": -1}},
},
map[string]any{
"name": "Hidden Cache", "kind": "discovered", "quantity": nil, "from": nil, "to": nil,
"source_refs": []any{map[string]any{"start_unit_id": 1, "end_unit_id": 1}},
},
}}
content, err := json.Marshal(valid)
if err != nil {
t.Fatal(err)
}
if err := validateJSONSchema(content, schema); err != nil {
t.Fatalf("private schema rejected validator-owned values: %v", err)
}
for _, test := range []struct {
name string
value map[string]any
}{
{"missing occurrences", map[string]any{}},
{"missing occurrence name", map[string]any{"occurrences": []any{itemOccurrenceWithoutField(itemOccurrenceRecord(), "name")}}},
{"missing nullable field", map[string]any{"occurrences": []any{itemOccurrenceWithoutField(itemOccurrenceRecord(), "quantity")}}},
{"missing from", map[string]any{"occurrences": []any{itemOccurrenceWithoutField(itemOccurrenceRecord(), "from")}}},
{"missing to", map[string]any{"occurrences": []any{itemOccurrenceWithoutField(itemOccurrenceRecord(), "to")}}},
{"noninteger quantity", map[string]any{"occurrences": []any{itemOccurrenceWithField(itemOccurrenceRecord(), "quantity", 1.5)}}},
{"unsupported kind", map[string]any{"occurrences": []any{itemOccurrenceWithField(itemOccurrenceRecord(), "kind", "unsupported")}}},
{"opaque item identifier", map[string]any{"occurrences": []any{itemOccurrenceWithField(itemOccurrenceRecord(), "item_id", "item:sha256:opaque")}}},
{"unknown occurrence field", map[string]any{"occurrences": []any{itemOccurrenceWithField(itemOccurrenceRecord(), "extra", true)}}},
{"segment-named range", map[string]any{"occurrences": []any{itemOccurrenceWithField(itemOccurrenceRecord(), "source_refs", []any{map[string]any{"start_segment": 1, "end_segment": 1}})}}},
{"opaque source identifier", map[string]any{"occurrences": []any{itemOccurrenceWithField(itemOccurrenceRecord(), "source_refs", []any{map[string]any{"start_unit_id": 1, "end_unit_id": 1, "source_id": "session-alpha"}})}}},
{"unknown reference field", map[string]any{"occurrences": []any{itemOccurrenceWithField(itemOccurrenceRecord(), "source_refs", []any{map[string]any{"start_unit_id": 1, "end_unit_id": 1, "extra": true}})}}},
{"noninteger range", map[string]any{"occurrences": []any{itemOccurrenceWithField(itemOccurrenceRecord(), "source_refs", []any{map[string]any{"start_unit_id": 1.5, "end_unit_id": 1}})}}},
} {
t.Run(test.name, func(t *testing.T) {
content, err := json.Marshal(test.value)
if err != nil {
t.Fatal(err)
}
if err := validateJSONSchema(content, schema); err == nil {
t.Fatal("private schema accepted invalid structure")
}
})
}
}
func itemOccurrenceRecord() map[string]any {
return map[string]any{
"name": "Ring", "kind": "acquired", "quantity": nil, "from": nil, "to": "party", "source_refs": []any{},
}
}
func itemOccurrenceWithoutField(value map[string]any, name string) map[string]any {
delete(value, name)
return value
}
func itemOccurrenceWithField(value map[string]any, name string, fieldValue any) map[string]any {
value[name] = fieldValue
return value
}

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

@@ -0,0 +1,149 @@
package assets_test
import (
"context"
"encoding/json"
"io/fs"
"reflect"
"strings"
"testing"
"gitea.maximumdirect.net/eric/notarius/assets"
"go.maximumdirect.net/promptkit"
)
func TestOccurrencePromptPairsPreserveRegistryAndTranscriptBoundaries(t *testing.T) {
_, engine := loadNativeAssets(t)
for _, test := range []struct {
family, registry string
rules []string
}{
{"item", `{"items":[{"name":"occurrence-registry-name"}]}`, []string{
"Return both `from` and `to` for every occurrence.",
"| `discovered` | `null` | `null` |",
"| `acquired` | `null` | `party` or the named party member gaining possession |",
"| `lost` | `party` or the named party member losing possession | `null` |",
"| `consumed` | `party` or the named party member consuming the item | `null` |",
"| `transferred` | one named party member | a different named party member |",
"payments are always `lost`, not `consumed`.",
}},
{"npc", `{"npcs":[{"name":"occurrence-registry-name"}]}`, []string{"Use the supplied canonical NPC", "noncombat_presence", "combat_opponent"}},
{"location", `{"locations":[{"name":"occurrence-registry-name","registry_refs":[{"start_unit_id":7,"end_unit_id":7}],"context":[{"unit_id":7,"text":"registry-context"}]}]}`,
[]string{"context supports that coreference", "must not create a registry location", "provenance must never replace current-chunk evidence", "complete ordered"}},
} {
t.Run(test.family, func(t *testing.T) {
id := "notarius/dnd." + test.family + "_occurrences"
initial, err := engine.PrepareExecution(context.Background(), promptkit.RunRequest{
PromptID: id, APIKey: "test-only",
Inputs: map[string]promptkit.ArtifactRef{
"transcript": promptkit.Inline(`{"units":[{"sentinel":"occurrence-transcript"}]}`),
test.family + "_registry": promptkit.Inline(test.registry),
"players": promptkit.Inline("occurrence-players"), "party": promptkit.Inline("occurrence-party"), "glossary": promptkit.Inline("occurrence-glossary"),
},
})
if err != nil {
t.Fatal(err)
}
defer initial.Discard()
correction, err := engine.PrepareExecution(context.Background(), promptkit.RunRequest{
PromptID: id + ".repair", APIKey: "test-only",
Inputs: map[string]promptkit.ArtifactRef{"guidance": promptkit.Inline("Correct the unsupported occurrence.")},
})
if err != nil {
t.Fatal(err)
}
defer correction.Discard()
first, next := initial.Details(), correction.Details()
if first.SelectedProfileID != "notarius/dnd-extraction" || first.SelectedProfileID != next.SelectedProfileID ||
first.StructuredOutput == nil || next.StructuredOutput == nil || !reflect.DeepEqual(first.OutputContract, next.OutputContract) {
t.Fatal("occurrence native pair lost schema/defaults")
}
var system, all string
for _, message := range first.Messages {
all += message.Content
if message.Role == "system" {
system += message.Content
}
}
for _, rule := range append(test.rules, "Transcript units are the only evidence") {
if !strings.Contains(strings.Join(strings.Fields(system), " "), rule) {
t.Fatalf("missing enduring rule %q", rule)
}
}
for _, content := range []string{"occurrence-registry-name", "occurrence-transcript", "occurrence-players", "occurrence-party", "occurrence-glossary"} {
if strings.Count(all, content) != 1 {
t.Fatalf("input not rendered once: %q", content)
}
}
if len(next.Messages) != 1 || next.Messages[0].Role != "user" || !strings.Contains(next.Messages[0].Content, "Correct the unsupported occurrence.") ||
strings.Contains(next.Messages[0].Content, "occurrence-registry-name") {
t.Fatal("correction repeated fixed inputs")
}
})
}
}
func TestOccurrenceSchemasRetainSupportedKindsAndPrivateSelectors(t *testing.T) {
for _, test := range []struct {
family string
kinds []string
}{
{"npc", []string{"mentioned", "noncombat_presence", "dialogue", "combat_ally", "combat_opponent", "other"}},
{"location", []string{"visited", "planned", "recalled", "mentioned"}},
} {
t.Run(test.family, func(t *testing.T) {
schema, err := fs.ReadFile(assets.FS(), "dnd/"+test.family+"-occurrences/schemas/dnd_"+test.family+"_occurrences_llm.v1.json")
if err != nil {
t.Fatal(err)
}
record := func() map[string]any {
value := map[string]any{"name": "Canonical Name", "kind": test.kinds[0], "source_refs": []any{map[string]any{"start_unit_id": 1, "end_unit_id": 2}}}
if test.family == "location" {
value["registry_refs"] = []any{map[string]any{"start_unit_id": 1, "end_unit_id": 2}}
}
return value
}
check := func(value map[string]any, valid bool) {
t.Helper()
content, err := json.Marshal(map[string]any{"occurrences": []any{value}})
if err != nil {
t.Fatal(err)
}
if err := validateJSONSchema(content, schema); (err == nil) != valid {
t.Fatalf("valid=%t response=%s error=%v", valid, content, err)
}
}
for _, kind := range test.kinds {
value := record()
value["kind"] = kind
check(value, true)
}
semantic := record()
semantic["name"] = ""
semantic["source_refs"] = []any{map[string]any{"start_unit_id": 0, "end_unit_id": -1}}
check(semantic, true)
for _, mutate := range []func(map[string]any){
func(value map[string]any) { delete(value, "name") },
func(value map[string]any) { value["kind"] = 1 },
func(value map[string]any) { value["kind"] = "unsupported" },
func(value map[string]any) { value[test.family+"_id"] = "assigned-later" },
func(value map[string]any) { value["unexpected"] = true },
func(value map[string]any) {
value["source_refs"].([]any)[0].(map[string]any)["source_id"] = "assigned-later"
},
} {
value := record()
mutate(value)
check(value, false)
}
if test.family == "location" {
value := record()
delete(value, "registry_refs")
check(value, false)
value = record()
value["registry_refs"].([]any)[0].(map[string]any)["start_unit_id"] = 0
check(value, false)
}
})
}
}

15
assets/package.go Normal file
View File

@@ -0,0 +1,15 @@
// Package assets exposes embedded LLM-facing content.
package assets
import (
"embed"
"io/fs"
)
//go:embed notarius.yml dnd generic
var embedded embed.FS
// FS returns the embedded read-only asset filesystem.
func FS() fs.FS {
return embedded
}

214
assets/package_test.go Normal file
View File

@@ -0,0 +1,214 @@
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 first.Role == nil || len(details.Messages) == 0 || details.Messages[0].Role != *first.Role {
t.Fatal("declared message role was not preserved")
}
if !strings.Contains(string(content), "{{") && strings.TrimSpace(details.Messages[0].Content) != strings.TrimSpace(string(content)) {
t.Fatal("source-relative message content was not preserved")
}
})
}
return nil
})
if err != nil {
t.Fatal(err)
}
}
func TestRegistryNormalizationPromptPairsRetainTheirNativeContracts(t *testing.T) {
_, engine := loadNativeAssets(t)
for _, test := range []struct {
id string
guidance string
rules []string
}{
{"notarius/dnd.npc_registry.normalize", "Preserve distinct individuals.", []string{"same individual", "unadorned proper name"}},
{"notarius/dnd.location_registry.normalize", "Keep parent and child places separate.", []string{"same physical place", "parent and child places"}},
} {
t.Run(test.id, func(t *testing.T) {
initial, err := engine.PrepareExecution(context.Background(), promptkit.RunRequest{
PromptID: test.id, APIKey: "test-only", Inputs: map[string]promptkit.ArtifactRef{
"candidates": promptkit.Inline(`{"candidate_number_range":{"first":1,"last":2},"candidates":[]}`),
"transcript": promptkit.Inline(`{"windows":[]}`),
},
})
if err != nil {
t.Fatal(err)
}
defer initial.Discard()
correction, err := engine.PrepareExecution(context.Background(), promptkit.RunRequest{
PromptID: test.id + ".repair", APIKey: "test-only",
Inputs: map[string]promptkit.ArtifactRef{"guidance": promptkit.Inline(test.guidance)},
})
if err != nil {
t.Fatal(err)
}
defer correction.Discard()
first, next := initial.Details(), correction.Details()
if first.SelectedProfileID != "notarius/dnd-extraction" || next.SelectedProfileID != first.SelectedProfileID ||
first.StructuredOutput == nil || next.StructuredOutput == nil || !reflect.DeepEqual(first.OutputContract, next.OutputContract) {
t.Fatal("normalization pair lost its shared native defaults/output contract")
}
var system string
for _, message := range first.Messages {
if message.Role == "system" {
system += message.Content
}
}
for _, rule := range append(test.rules, "candidate_number_range", "start_unit_id", "canonical_candidate_number") {
if !strings.Contains(system, rule) {
t.Fatalf("missing enduring system principle %q", rule)
}
}
if len(next.Messages) != 1 || next.Messages[0].Role != "user" || !strings.Contains(next.Messages[0].Content, test.guidance) {
t.Fatal("correction did not supply only the findings and replacement assignment")
}
})
}
}
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

@@ -0,0 +1,177 @@
package assets_test
import (
"context"
"strings"
"testing"
"go.maximumdirect.net/promptkit"
)
func TestExtractionPromptComposition(t *testing.T) {
const (
transcriptSentinel = "shared-transcript-sentinel"
playersSentinel = "shared-players-sentinel"
partySentinel = "shared-party-sentinel"
glossarySentinel = "shared-glossary-sentinel"
npcSentinel = "npc-registry-sentinel"
catalogSentinel = "spell-catalog-sentinel"
evidenceSentinel = "Transcript units are the only evidence"
endpointOrderSentinel = "according to transcript order"
combatPolicySentinel = "substantive active combat materially organizes the"
)
_, engine := loadNativeAssets(t)
commonInputs := map[string]promptkit.ArtifactRef{
"transcript": promptkit.InlineWithURI("file:///session.json", `{"sentinel":"`+transcriptSentinel+`"}`),
"players": promptkit.Inline(playersSentinel),
"party": promptkit.Inline(partySentinel),
"glossary": promptkit.Inline(glossarySentinel),
}
cases := []struct {
name string
promptID string
inputs map[string]promptkit.ArtifactRef
suffixGroups [][]string
middleSentinel string
}{
{name: "npcs", promptID: "notarius/dnd.npc_registry", inputs: commonInputs, suffixGroups: [][]string{{evidenceSentinel, endpointOrderSentinel}}},
{name: "locations", promptID: "notarius/dnd.location_registry", inputs: commonInputs, suffixGroups: [][]string{{evidenceSentinel, endpointOrderSentinel}}},
{name: "item occurrences", promptID: "notarius/dnd.item_occurrences", inputs: withPromptInputs(commonInputs, map[string]promptkit.ArtifactRef{
"item_registry": promptkit.Inline(`{"items":[{"id":"item-registry-sentinel","name":"Torch"}]}`),
}), suffixGroups: [][]string{{evidenceSentinel, endpointOrderSentinel}, {"item-registry-sentinel"}}},
{name: "item registry", promptID: "notarius/dnd.item_registry", inputs: commonInputs, suffixGroups: [][]string{{evidenceSentinel, endpointOrderSentinel}}},
{name: "scene descriptions", promptID: "notarius/dnd.scene_descriptions", inputs: commonInputs, middleSentinel: combatPolicySentinel},
{
name: "combat turns",
promptID: "notarius/dnd.combat_turns",
inputs: withPromptInputs(commonInputs, map[string]promptkit.ArtifactRef{
"npc_registry": promptkit.Inline(`{"sentinel":"` + npcSentinel + `"}`),
}),
suffixGroups: [][]string{{evidenceSentinel, endpointOrderSentinel}, {npcSentinel}},
},
{
name: "enemy events",
promptID: "notarius/dnd.enemy_events",
inputs: withPromptInputs(commonInputs, map[string]promptkit.ArtifactRef{
"npc_registry": promptkit.Inline(`{"sentinel":"` + npcSentinel + `"}`),
"combat_turns": promptkit.Inline(`{"sentinel":"combat-turns-sentinel"}`),
"npc_occurrences": promptkit.Inline(`{"sentinel":"npc-occurrences-sentinel"}`),
}),
suffixGroups: [][]string{
{evidenceSentinel, endpointOrderSentinel},
{npcSentinel},
{"combat-turns-sentinel", "npc-occurrences-sentinel"},
},
},
{
name: "npc occurrences",
promptID: "notarius/dnd.npc_occurrences",
inputs: withPromptInputs(commonInputs, map[string]promptkit.ArtifactRef{
"npc_registry": promptkit.Inline(`{"sentinel":"` + npcSentinel + `"}`),
}),
suffixGroups: [][]string{{evidenceSentinel, endpointOrderSentinel}, {npcSentinel}},
},
{
name: "location occurrences",
promptID: "notarius/dnd.location_occurrences",
inputs: withPromptInputs(commonInputs, map[string]promptkit.ArtifactRef{
"location_registry": promptkit.Inline(`{"sentinel":"location-registry-sentinel"}`),
}),
suffixGroups: [][]string{{evidenceSentinel, endpointOrderSentinel}, {"location-registry-sentinel"}},
},
{
name: "spells",
promptID: "notarius/dnd.spells",
inputs: withPromptInputs(commonInputs, map[string]promptkit.ArtifactRef{
"npc_registry": promptkit.Inline(`{"sentinel":"` + npcSentinel + `"}`),
"spell_catalog": promptkit.Inline(`{"sentinel":"` + catalogSentinel + `"}`),
}),
suffixGroups: [][]string{{evidenceSentinel, endpointOrderSentinel}, {npcSentinel}, {catalogSentinel}},
},
}
for _, testCase := range cases {
t.Run(testCase.name, func(t *testing.T) {
handle, err := engine.PrepareExecution(context.Background(), promptkit.RunRequest{
PromptID: testCase.promptID,
APIKey: "test-only",
ProfileID: "notarius/dnd-extraction",
Inputs: testCase.inputs,
})
if err != nil {
t.Fatalf("PrepareExecution() error = %v", err)
}
defer handle.Discard()
prepared := handle.Details()
transcriptIndex := renderedInputMessageIndex(t, prepared.Messages, transcriptSentinel)
referenceIndex := renderedInputMessageIndex(t, prepared.Messages, playersSentinel)
if referenceIndex >= transcriptIndex {
t.Fatalf("campaign references rendered at message %d, want before transcript message %d", referenceIndex, transcriptIndex)
}
assertEphemeralCache(t, prepared.Messages, referenceIndex)
assertEphemeralCache(t, prepared.Messages, transcriptIndex)
previousIndex := transcriptIndex
for _, group := range testCase.suffixGroups {
groupIndex := -1
for _, sentinel := range group {
inputIndex := renderedInputMessageIndex(t, prepared.Messages, sentinel)
if groupIndex < 0 {
groupIndex = inputIndex
} else if inputIndex != groupIndex {
t.Fatalf("input sentinel %q rendered at message %d, want grouped at message %d", sentinel, inputIndex, groupIndex)
}
}
if groupIndex <= previousIndex {
t.Fatalf("prompt suffix group rendered at message %d, want after message %d", groupIndex, previousIndex)
}
previousIndex = groupIndex
}
instructionIndex := len(prepared.Messages) - 1
if testCase.middleSentinel != "" {
policyIndex := renderedInputMessageIndex(t, prepared.Messages, testCase.middleSentinel)
if policyIndex <= transcriptIndex || policyIndex >= instructionIndex {
t.Fatalf("combat policy rendered at message %d, want after transcript message %d and before instructions message %d", policyIndex, transcriptIndex, instructionIndex)
}
}
if instructionIndex <= previousIndex {
t.Fatalf("instructions rendered at message %d, want after lane input message %d", instructionIndex, previousIndex)
}
assertEphemeralCache(t, prepared.Messages, instructionIndex)
})
}
}
func withPromptInputs(inputs, extras map[string]promptkit.ArtifactRef) map[string]promptkit.ArtifactRef {
merged := make(map[string]promptkit.ArtifactRef, len(inputs)+len(extras))
for name, input := range inputs {
merged[name] = input
}
for name, input := range extras {
merged[name] = input
}
return merged
}
func assertEphemeralCache(t *testing.T, messages []promptkit.RenderedMessage, index int) {
t.Helper()
if cache := messages[index].CacheControl; cache == nil || cache.Type != promptkit.CacheControlEphemeral {
t.Fatalf("message %d cache control = %#v, want ephemeral", index, cache)
}
}
func renderedInputMessageIndex(t *testing.T, messages []promptkit.RenderedMessage, sentinel string) int {
t.Helper()
index := -1
occurrences := 0
for messageIndex, message := range messages {
count := strings.Count(message.Content, sentinel)
if count > 0 {
index = messageIndex
occurrences += count
}
}
if occurrences != 1 {
t.Fatalf("input sentinel %q rendered %d times, want exactly once", sentinel, occurrences)
}
return index
}

View File

@@ -0,0 +1,120 @@
package assets_test
import (
"context"
"encoding/json"
"io/fs"
"reflect"
"strings"
"testing"
"gitea.maximumdirect.net/eric/notarius/assets"
"go.maximumdirect.net/promptkit"
)
func TestRegistryExtractionPromptPairsRetainDomainRulesAndContracts(t *testing.T) {
_, engine := loadNativeAssets(t)
for _, test := range []struct {
family, instruction string
rules []string
}{
{"npc", "Revise the NPC citations.", []string{"proper name or a stable, individually distinguishing", "factual third-party mention", "Exclude human players"}},
{"item", "Revise the item citations.", []string{"named unique items", "concrete reusable item types", "currency denomination", "generic weapons", "Do not use capitalization as an eligibility test"}},
{"location", "Revise the location citations.", []string{"stable proper name or unique in-world designation", "the room", "Do not use capitalization as an eligibility test"}},
} {
t.Run(test.family, func(t *testing.T) {
id := "notarius/dnd." + test.family + "_registry"
initial, err := engine.PrepareExecution(context.Background(), promptkit.RunRequest{
PromptID: id, APIKey: "test-only",
Inputs: map[string]promptkit.ArtifactRef{
"transcript": promptkit.Inline(`{"units":[{"sentinel":"registry-transcript"}]}`),
"players": promptkit.Inline("registry-players"), "party": promptkit.Inline("registry-party"), "glossary": promptkit.Inline("registry-glossary"),
},
})
if err != nil {
t.Fatal(err)
}
defer initial.Discard()
next, err := engine.PrepareExecution(context.Background(), promptkit.RunRequest{
PromptID: id + ".repair", APIKey: "test-only", Inputs: map[string]promptkit.ArtifactRef{"guidance": promptkit.Inline(test.instruction)},
})
if err != nil {
t.Fatal(err)
}
defer next.Discard()
first, correction := initial.Details(), next.Details()
if first.SelectedProfileID != "notarius/dnd-extraction" || correction.SelectedProfileID != first.SelectedProfileID ||
first.StructuredOutput == nil || correction.StructuredOutput == nil || !reflect.DeepEqual(first.OutputContract, correction.OutputContract) {
t.Fatal("registry prompt pair lost native schema/defaults")
}
var system, all string
for _, message := range first.Messages {
all += message.Content
if message.Role == "system" {
system += message.Content
}
if strings.Contains(message.Content, "registry-transcript") || strings.Contains(message.Content, "registry-players") {
if message.CacheControl == nil || message.CacheControl.Type != promptkit.CacheControlEphemeral {
t.Fatal("fixed input cache hint lost")
}
}
}
for _, rule := range append(test.rules, "Transcript units are the only evidence", "Use the most specific supported in-world") {
if !strings.Contains(strings.Join(strings.Fields(system), " "), rule) {
t.Fatalf("missing enduring domain rule %q", rule)
}
}
for _, input := range []string{"registry-transcript", "registry-players", "registry-party", "registry-glossary"} {
if strings.Count(all, input) != 1 {
t.Fatalf("fixed input not rendered once: %q", input)
}
}
if len(correction.Messages) != 1 || correction.Messages[0].Role != "user" || !strings.Contains(correction.Messages[0].Content, test.instruction) ||
strings.Contains(correction.Messages[0].Content, "registry-transcript") {
t.Fatal("correction repeated fixed inputs instead of supplying findings/assignment")
}
})
}
}
func TestRegistryResponseSchemasSeparateStructureFromSemanticValidity(t *testing.T) {
for _, test := range []struct{ family, field string }{
{"npc", "npcs"}, {"item", "items"}, {"location", "locations"},
} {
t.Run(test.family, func(t *testing.T) {
schema, err := fs.ReadFile(assets.FS(), "dnd/"+test.family+"-registry/extract/schemas/dnd_"+test.family+"_registry_llm.v1.json")
if err != nil {
t.Fatal(err)
}
for _, value := range []struct {
name, record string
valid bool
}{
{"grounded record", `{"name":"Canonical Name","source_refs":[{"start_unit_id":1,"end_unit_id":2}]}`, true},
{"blank name and empty evidence", `{"name":"","source_refs":[]}`, true},
{"nonpositive source candidate", `{"name":"Canonical Name","source_refs":[{"start_unit_id":0,"end_unit_id":-1}]}`, true},
{"missing name", `{"source_refs":[]}`, false},
{"opaque ID", `{"name":"Canonical Name","source_refs":[],"id":"assigned-later"}`, false},
{"wrong name type", `{"name":7,"source_refs":[]}`, false},
{"noninteger source identifier", `{"name":"Canonical Name","source_refs":[{"start_unit_id":1.5,"end_unit_id":2}]}`, false},
} {
t.Run(value.name, func(t *testing.T) {
content := []byte(`{"` + test.field + `":[` + value.record + `]}`)
if err := validateJSONSchema(content, schema); (err == nil) != value.valid {
t.Fatalf("schema validity=%t, error=%v", value.valid, err)
}
})
}
for _, content := range []string{`{"` + test.field + `":[]}`, `{"` + test.field + `":null}`, `{}`} {
var value map[string]any
if err := json.Unmarshal([]byte(content), &value); err != nil {
t.Fatal(err)
}
_, isArray := value[test.field].([]any)
if err := validateJSONSchema([]byte(content), schema); (err == nil) != isArray {
t.Fatalf("collection shape %s: %v", content, err)
}
}
})
}
}

View File

@@ -0,0 +1,120 @@
package assets_test
import (
"context"
"encoding/json"
"io/fs"
"reflect"
"strings"
"testing"
"gitea.maximumdirect.net/eric/notarius/assets"
"go.maximumdirect.net/promptkit"
)
func TestSceneResponseSchemaUsesStrictPrivateContract(t *testing.T) {
schema, err := fs.ReadFile(assets.FS(), "dnd/scene-descriptions/schemas/dnd_scene_descriptions_llm.v1.json")
if err != nil {
t.Fatal(err)
}
valid := map[string]any{"kind": "narrative", "title": "Arrival", "summary": "The party enters the tower."}
if err := validateSceneResponse(t, valid, schema); err != nil {
t.Fatalf("valid private response rejected: %v", err)
}
for _, test := range []struct {
name string
response map[string]any
valid bool
}{
{name: "missing required field", response: map[string]any{"kind": "combat", "title": "Ambush"}},
{name: "unknown framework field", response: map[string]any{"kind": "combat", "title": "Ambush", "summary": "Bandits strike.", "id": "assigned-later"}},
{name: "unknown application field", response: map[string]any{"kind": "combat", "title": "Ambush", "summary": "Bandits strike.", "source_ref": map[string]any{}}},
{name: "collection is not allowed", response: map[string]any{"kind": "combat", "title": "Ambush", "summary": "Bandits strike.", "scenes": []any{}}},
{name: "unsupported kind", response: map[string]any{"kind": "interlude", "title": "Ambush", "summary": "Bandits strike."}},
{name: "empty title", response: map[string]any{"kind": "combat", "title": "", "summary": "Bandits strike."}, valid: true},
{name: "empty summary", response: map[string]any{"kind": "combat", "title": "Ambush", "summary": ""}, valid: true},
{name: "wrong kind type", response: map[string]any{"kind": 7, "title": "Ambush", "summary": "Bandits strike."}},
{name: "wrong title type", response: map[string]any{"kind": "combat", "title": 7, "summary": "Bandits strike."}},
{name: "wrong summary type", response: map[string]any{"kind": "combat", "title": "Ambush", "summary": 7}},
} {
t.Run(test.name, func(t *testing.T) {
err := validateSceneResponse(t, test.response, schema)
if (err == nil) != test.valid {
t.Fatalf("validateJSONSchema() error = %v, want valid=%t", err, test.valid)
}
})
}
if err := validateJSONSchema([]byte(`{"kind":`), schema); err == nil {
t.Fatal("validateJSONSchema() error = nil, want malformed JSON rejected")
}
}
func TestSceneResponseSchemaAcceptsEverySupportedKind(t *testing.T) {
schema, err := fs.ReadFile(assets.FS(), "dnd/scene-descriptions/schemas/dnd_scene_descriptions_llm.v1.json")
if err != nil {
t.Fatal(err)
}
for _, kind := range []string{"combat", "narrative", "recap", "meta"} {
response := map[string]any{"kind": kind, "title": "Title", "summary": "Summary"}
if err := validateSceneResponse(t, response, schema); err != nil {
t.Fatalf("supported scene kind %q was rejected: %v", kind, err)
}
}
}
func validateSceneResponse(t *testing.T, instance map[string]any, schemaContent []byte) error {
t.Helper()
content, err := json.Marshal(instance)
if err != nil {
t.Fatal(err)
}
return validateJSONSchema(content, schemaContent)
}
func TestSceneDescriptionPromptPairRetainsPolicyAndFixedInputs(t *testing.T) {
_, engine := loadNativeAssets(t)
initial, err := engine.PrepareExecution(context.Background(), promptkit.RunRequest{
PromptID: "notarius/dnd.scene_descriptions", APIKey: "test-only",
Inputs: map[string]promptkit.ArtifactRef{
"transcript": promptkit.Inline(`{"units":[{"text":"scene-description-transcript"}]}`),
"players": promptkit.Inline("scene-description-player"), "party": promptkit.Inline(" "), "glossary": promptkit.Inline(" "),
},
})
if err != nil {
t.Fatal(err)
}
defer initial.Discard()
correction, err := engine.PrepareExecution(context.Background(), promptkit.RunRequest{
PromptID: "notarius/dnd.scene_descriptions.repair", APIKey: "test-only",
Inputs: map[string]promptkit.ArtifactRef{"guidance": promptkit.Inline("Return kind: combat for this scene.")},
})
if err != nil {
t.Fatal(err)
}
defer correction.Discard()
first, next := initial.Details(), correction.Details()
if first.SelectedProfileID != "notarius/dnd-extraction" || first.SelectedProfileID != next.SelectedProfileID || first.StructuredOutput == nil || !reflect.DeepEqual(first.OutputContract, next.OutputContract) {
t.Fatal("scene pair lost schema/defaults")
}
var system, all string
for _, message := range first.Messages {
all += message.Content
if message.Role == "system" {
system += message.Content
}
}
for _, rule := range []string{"complete chunk is the evidence boundary", "substantive active combat materially organizes the", "must not invent a proper noun"} {
if !strings.Contains(strings.Join(strings.Fields(system), " "), rule) {
t.Fatalf("missing enduring rule %q", rule)
}
}
for _, material := range []string{"scene-description-transcript", "scene-description-player", "substantive active combat materially organizes the"} {
if strings.Count(all, material) != 1 {
t.Fatalf("fixed input/policy repeated: %q", material)
}
}
if len(next.Messages) != 1 || next.Messages[0].Role != "user" || !strings.Contains(next.Messages[0].Content, "Return kind: combat for this scene.") || strings.Contains(next.Messages[0].Content, "scene-description-transcript") {
t.Fatal("correction assignment lost findings or repeated source")
}
}

184
assets/scenes_test.go Normal file
View File

@@ -0,0 +1,184 @@
package assets_test
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io/fs"
"reflect"
"strings"
"testing"
"gitea.maximumdirect.net/eric/notarius/assets"
"github.com/santhosh-tekuri/jsonschema/v6"
"go.maximumdirect.net/promptkit"
)
func TestScenePromptPairPreservesFullTranscriptAndContext(t *testing.T) {
_, engine := loadNativeAssets(t)
const transcript = `{"sentinel":"scene-transcript"}`
initial, err := engine.PrepareExecution(context.Background(), promptkit.RunRequest{
PromptID: "notarius/dnd.scenes", APIKey: "test-only",
Inputs: map[string]promptkit.ArtifactRef{
"transcript": promptkit.Inline(transcript),
"players": promptkit.Inline("scene-players"),
"party": promptkit.Inline("scene-party"),
"glossary": promptkit.Inline("scene-glossary"),
},
})
if err != nil {
t.Fatal(err)
}
defer initial.Discard()
correction, err := engine.PrepareExecution(context.Background(), promptkit.RunRequest{
PromptID: "notarius/dnd.scenes.repair", APIKey: "test-only",
Inputs: map[string]promptkit.ArtifactRef{"guidance": promptkit.Inline("Keep the encounter together.")},
})
if err != nil {
t.Fatal(err)
}
defer correction.Discard()
first, next := initial.Details(), correction.Details()
if first.SelectedProfileID != "notarius/dnd-extraction" || next.SelectedProfileID != first.SelectedProfileID ||
first.StructuredOutput == nil || next.StructuredOutput == nil || !reflect.DeepEqual(first.OutputContract, next.OutputContract) {
t.Fatal("scene correction pair lost its shared native defaults/output contract")
}
var system, all string
transcriptIndex := -1
for i, message := range first.Messages {
all += message.Content
if message.Role == "system" {
system += message.Content
}
if strings.Contains(message.Content, transcript) {
transcriptIndex = i
}
if strings.Contains(message.Content, transcript) || strings.Contains(message.Content, "scene-players") {
if message.CacheControl == nil || message.CacheControl.Type != promptkit.CacheControlEphemeral {
t.Fatal("reference/full-transcript native cache hint lost")
}
}
}
if transcriptIndex != len(first.Messages)-1 || !strings.Contains(system, "no gaps or overlaps") || !strings.Contains(system, "coherent unit of play") {
t.Fatal("scene principles or complete final transcript lost")
}
for _, content := range []string{transcript, "scene-players", "scene-party", "scene-glossary"} {
if strings.Count(all, content) != 1 {
t.Fatalf("fixed context not rendered once: %q", content)
}
}
if len(next.Messages) != 1 || next.Messages[0].Role != "user" || !strings.Contains(next.Messages[0].Content, "Keep the encounter together.") ||
strings.Contains(next.Messages[0].Content, "scene-transcript") {
t.Fatal("correction should supply findings and a replacement assignment only")
}
}
func TestResponseSchemaValidatesMinimalSceneResponses(t *testing.T) {
schema, err := fs.ReadFile(assets.FS(), "dnd/scenes/schemas/dnd_scenes_llm.v1.json")
if err != nil {
t.Fatalf("loadResponseSchema() error = %v, want nil", err)
}
valid := validSceneSchemaResponse()
validJSON, err := json.Marshal(valid)
if err != nil {
t.Fatalf("Marshal(validSceneSchemaResponse()) error = %v, want nil", err)
}
if err := validateJSONSchema(validJSON, schema); err != nil {
t.Fatalf("valid scene response rejected: %v", err)
}
tests := []struct {
name string
mutate func(map[string]any)
}{
{
name: "missing scenes",
mutate: func(response map[string]any) {
delete(response, "scenes")
},
},
{
name: "empty scenes",
mutate: func(response map[string]any) {
response["scenes"] = []any{}
},
},
{
name: "non-positive start unit",
mutate: func(response map[string]any) {
response["scenes"].([]any)[0].(map[string]any)["start_unit_id"] = 0
},
},
{
name: "non-positive end unit",
mutate: func(response map[string]any) {
response["scenes"].([]any)[0].(map[string]any)["end_unit_id"] = 0
},
},
{
name: "non-integer endpoint",
mutate: func(response map[string]any) {
response["scenes"].([]any)[0].(map[string]any)["start_unit_id"] = 1.5
},
},
{
name: "unknown top-level field",
mutate: func(response map[string]any) {
response["boundary_caveats"] = []any{}
},
},
{
name: "unknown scene field",
mutate: func(response map[string]any) {
response["scenes"].([]any)[0].(map[string]any)["short_title"] = "Old contract"
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
response := validSceneSchemaResponse()
tt.mutate(response)
content, err := json.Marshal(response)
if err != nil {
t.Fatalf("Marshal() error = %v, want nil", err)
}
if err := validateJSONSchema(content, schema); err == nil {
t.Fatal("validateJSONSchema() error = nil, want rejected response")
}
})
}
}
func validSceneSchemaResponse() map[string]any {
return map[string]any{
"scenes": []any{
map[string]any{
"start_unit_id": 1,
"end_unit_id": 3,
},
},
}
}
func validateJSONSchema(instanceContent, schemaContent []byte) error {
instance, err := jsonschema.UnmarshalJSON(bytes.NewReader(instanceContent))
if err != nil {
return fmt.Errorf("parse instance: %w", err)
}
schemaDocument, err := jsonschema.UnmarshalJSON(bytes.NewReader(schemaContent))
if err != nil {
return fmt.Errorf("parse schema: %w", err)
}
compiler := jsonschema.NewCompiler()
if err := compiler.AddResource("schema.json", schemaDocument); err != nil {
return fmt.Errorf("load schema: %w", err)
}
schema, err := compiler.Compile("schema.json")
if err != nil {
return fmt.Errorf("compile schema: %w", err)
}
return schema.Validate(instance)
}

View File

@@ -0,0 +1,78 @@
package assets_test
import (
"encoding/json"
"io/fs"
"sort"
"strconv"
"strings"
"testing"
"gitea.maximumdirect.net/eric/notarius/assets"
)
func TestModelResponseSchemasRequireEveryObjectProperty(t *testing.T) {
schemaFS := assets.FS()
count := 0
err := fs.WalkDir(schemaFS, ".", func(path string, entry fs.DirEntry, walkErr error) error {
if walkErr != nil {
return walkErr
}
if entry.IsDir() || !strings.HasSuffix(path, "_llm.v1.json") {
return nil
}
content, err := fs.ReadFile(schemaFS, path)
if err != nil {
return err
}
var schema any
if err := json.Unmarshal(content, &schema); err != nil {
t.Errorf("decode response schema %q: %v", path, err)
return nil
}
count++
assertRequiredObjectProperties(t, path, "$", schema)
return nil
})
if err != nil {
t.Fatal(err)
}
if count == 0 {
t.Fatal("no model response schemas found")
}
}
func assertRequiredObjectProperties(t *testing.T, schemaPath, nodePath string, value any) {
t.Helper()
switch node := value.(type) {
case map[string]any:
if properties, ok := node["properties"].(map[string]any); ok {
required := make(map[string]struct{})
if values, ok := node["required"].([]any); ok {
for _, value := range values {
if name, ok := value.(string); ok {
required[name] = struct{}{}
}
}
}
propertyNames := make([]string, 0, len(properties))
for name := range properties {
propertyNames = append(propertyNames, name)
}
sort.Strings(propertyNames)
for _, name := range propertyNames {
if _, ok := required[name]; !ok {
t.Errorf("response schema %q object %s declares property %q without requiring it", schemaPath, nodePath, name)
}
}
}
for name, child := range node {
assertRequiredObjectProperties(t, schemaPath, nodePath+"."+name, child)
}
case []any:
for index, child := range node {
assertRequiredObjectProperties(t, schemaPath, nodePath+"["+strconv.Itoa(index)+"]", child)
}
}
}

View File

@@ -1,11 +1,26 @@
package main
import (
"context"
"fmt"
"os"
"gitea.maximumdirect.net/eric/notarius/internal/buildinfo"
"gitea.maximumdirect.net/eric/notarius/internal/cli"
"go.maximumdirect.net/commandkit"
)
func main() {
os.Exit(cli.Run(os.Args[1:], os.Stdout, os.Stderr))
version, err := buildinfo.Version()
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
app, err := cli.NewApplication(version, cli.Options{})
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
outcome := app.Execute(context.Background(), os.Args[1:], commandkit.Streams{Out: os.Stdout, Err: os.Stderr})
os.Exit(outcome.Status)
}

View File

@@ -0,0 +1,23 @@
# ADR-0001: Record architecture decisions as ADRs
**Status:** Accepted
**Date:** 2026-07-13
## Context
Architectural reasoning made during design (pattern choices, rejected
alternatives, trigger conditions for revisiting) is lost if only the final
state is documented.
## Decision
We keep a living overview in docs/policy/architecture.md describing current
intended state, and immutable, numbered ADRs (Nygard format) in docs/adr/
recording each significant decision, its alternatives, and its consequences.
Changed decisions get a new ADR that marks the old one Superseded.
## Alternatives considered
- Overview doc only: loses the "why" and the rejected options.
- arc42 / RFC-style design docs: heavier than warranted for a solo repo.
## Consequences
Small ongoing writing cost; durable reasoning trail; cheap onboarding for
future contributors (including future-us).

View File

@@ -0,0 +1,51 @@
# ADR-0002: Linear pipes-and-filters pipeline, not a general DAG
**Status:** Accepted
**Date:** 2026-07-13
## Context
Notarius processes source material through one known workflow:
```text
input -> chunk -> extract -> merge -> normalize -> output
```
Input and chunking apply to the source as a whole. Each selected artifact lane
then performs extract, merge, and normalize, after which output aggregates the
lane outcomes. Chunk extraction has a natural scatter-gather shape, but no
current use case requires arbitrary branches, joins, or user-defined stage
topology.
## Decision
Notarius implements a fixed six-stage pipes-and-filters pipeline. Configuration
selects implementations for these stages but cannot add stages, reorder them,
or define an arbitrary graph.
The framework owns stage sequencing and the scatter-gather boundary between
chunk, extract, and merge. Extract results are handed to merge in deterministic
source-chunk order regardless of execution strategy. Each artifact lane remains
logically linear. Output runs after every selected lane has either produced an
accepted normalized artifact or reached a recorded rejection. A framework
execution failure aborts the pipeline.
The runner's concrete internal representation and stage-specific scheduling
policies are implementation details. Concurrency must preserve the pipeline's
deterministic handoffs, validation behavior, and provenance, and all execution
strategies must continue to honor context cancellation.
## Alternatives considered
- Build a general DAG engine now. This would support hypothetical branching
topologies, but would add scheduling, topology validation, configuration, and
state-management complexity without a current consumer. Revisit this choice
only when a concrete workflow requires a topology the fixed pipeline cannot
express.
## Consequences
The runner, configuration model, and operator mental model remain small. Stage
ownership stays visible, and general chunking, merging, or normalization cannot
be hidden inside extractors. A future DAG requirement will require an explicit
architectural change rather than incremental exceptions to the fixed pipeline.

View File

@@ -0,0 +1,119 @@
# ADR-0003: Strongly typed stage interfaces with a two-zone data model
**Status:** Accepted
**Date:** 2026-07-13
## Context
Pipeline stages must exchange source data and extracted artifacts. Universal
source data has one engine-wide meaning, while extracted artifacts have
domain-specific shapes. Passing opaque bytes or `any` between all stages would
make invalid wiring and merge behavior runtime concerns. Requiring JSON at
every handoff would preserve interoperability but discard useful Go type safety
while all modules are in-process.
The framework must also support multiple configured artifact domains, durable
checkpoints, diagnostics, and output encoders without making those consumers
depend on every domain's Go types.
## Decision
Notarius uses two typed data zones followed by one serialized boundary.
### Source zone
Input and chunk stages use conservative, engine-owned document, segment, chunk,
and source-reference types. Their exact Go names are implementation details.
Every segment carries engine-owned source provenance identifying the source
location from which it was produced. Chunks preserve the ordered provenance of
their segments.
Source-format-specific fields remain in input modules or explicitly namespaced
metadata; they do not become framework contracts.
### Domain artifact zone
Each artifact lane has one domain-owned Go artifact type `T`. Its extract,
merge, normalize, and domain-aware validation implementations use generic,
strongly typed contracts over the same `T`. Raw JSON, opaque bytes, and `any`
are not stage-handoff contracts within a lane.
Each registered domain artifact type supplies a codec for `T`. The codec owns:
- stable schema identity and an explicit schema version;
- JSON serialization and deserialization;
- the media type and schema metadata required at serialized boundaries; and
- rejection of data that cannot be represented by the declared artifact
schema.
An artifact type's JSON representation is a maintained domain contract.
Changing it incompatibly requires a new schema version.
Extract, merge, and normalize may change the contents of `T`, but they do not
change the lane's canonical Go artifact type or artifact schema identity. An
extractor maps any provider- or prompt-specific response type into `T` before
returning. A future lane that requires different artifact types at different
stages requires a new architectural decision.
### Serialized boundary
After normalization, each typed artifact is converted into an engine-owned
serialized artifact containing bytes, media type, and schema metadata. Output
aggregation and output encoders consume this type-erased form. Intermediate
checkpoint and debug encodings do not become stage-handoff contracts.
LLM transport, checkpoints, and opt-in debug recording are also explicit
serialization boundaries. They may encode or decode a typed artifact through
its domain codec, but they do not change the in-memory type used between
extract, merge, normalize, and typed validators. Checkpoint reuse requires a
compatible schema identity and version.
An LLM structured-response schema is a module transport contract and may differ
from the domain artifact schema. The calling module owns the response type and
maps it into the canonical `T`; the artifact codec remains authoritative for
artifact checkpoints and output serialization.
The framework may use private type-erased adapters to store heterogeneous lane
registrations and execute configured domains. Such an adapter must assemble a
type-consistent lane before execution and must not expose `any` or raw payloads
as module-facing handoffs inside the domain artifact zone.
### Construction and dependencies
Every module operation accepts `context.Context`. Modules receive stable runtime
collaborators through an injected dependency set at construction time. In
particular, LLM-using modules receive the application-provided structured LLM
client and do not construct provider clients or bypass shared scheduling.
The application boundary enforces one configurable global upper bound on
in-flight LLM calls across all stages, lanes, retries, and validators.
Configuration options are parsed and validated while a module is constructed,
before that module executes. Per-run data such as source material, references,
session identity, and lane identity remains operation input rather than a
construction dependency.
## Alternatives considered
- Pass raw bytes between stages. This maximizes decoupling but moves wiring,
parsing, and merge errors to runtime and prevents domain types from being the
canonical in-process contract.
- Require JSON plus schemas at every stage boundary. This is appropriate for an
out-of-process boundary, but adds serialization and parsing inside the current
in-process pipeline. The stable codec contract preserves this upgrade path if
remote plugins are introduced.
- Use a uniform `Process(any) (any, error)` contract. This simplifies a fully
dynamic engine but turns incompatible module composition into type assertions
and runtime failures. The fixed topology does not require that tradeoff.
## Consequences
Domain pipelines gain compile-time handoff safety and explicit merge semantics.
Serialization, schema compatibility, checkpoint decoding, and output erasure
have named owners. Dynamic registration requires a small erased adapter around
each typed lane, and generic stage implementations must be instantiated for a
specific artifact type or behavior rather than manipulating arbitrary JSON.
The engine-owned source model becomes a long-lived contract and must evolve
conservatively. Domain authors must maintain a codec and versioned schema in
addition to their Go artifact type.

Some files were not shown because too many files have changed in this diff Show More