docs(loader): document structural vocabulary in Loader moduledoc#115
Merged
Conversation
Adds a "Structural Vocabulary" section to the Loader @moduledoc listing every concept metadata key the library reads at runtime. This is the canonical reference for system authors and the foundation for adding load-time validation. The section covers: reserved concept type IDs ("roll", "character_progression"), keys on progression concepts (required_count, available_when, effect_target, roll_reference, filter and its subkeys), keys on roll concepts (target_type, dice, bonus_field), keys on selectable concepts (level, requires), starting_equipment, the choices map and its subkeys (type, options, grants_to, name, contributes_field, contributes_value), and the CLI-only "hidden" key. This audit revealed that "roll" and "character_progression" are structural type IDs hardcoded in the library — they belong in this vocabulary section, not in config. It also surfaced that the filter subkey "active_in" carries its own "field"/"type" subkeys, which was previously implicit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
## Structural Vocabularysection toLoader's@moduledoc— the canonical reference for every concept metadata key the library reads at runtimefilterandchoicesnested schemas, and"hidden"(CLI-only, noted separately)Why
The library reads ~20 specific metadata keys (e.g.
"required_count","available_when","target_type") that were previously undocumented — a system author had to read library source to know what keys are meaningful. This makes the implicit schema explicit and owned.Part of the configurability cleanup identified in the architectural review.
Related
Summary by Bito