docs(claude): distinguish domain vs. structural vocabulary in boundary rule#114
Merged
Merged
Conversation
…y rule The old rule — "never hardcode concept IDs, type IDs, or field names" — was correct for domain vocabulary (system-specific names like "fireball" or "character_level") but was being applied too broadly to structural vocabulary: the keys the library itself defines to interpret concept metadata (e.g. "required_count", "preparation_mode", "always_prepared"). This caused two problems: 1. Structural keys were treated as if they should come from config, leading to thin indirection layers (mode_field, cap_field, etc.) that add failure modes without adding real flexibility. 2. The library accumulated ~20 metadata keys it silently depends on without documenting or validating them, because the rule implied owning those names was a violation. The revised rule splits the boundary into two categories and adds a concrete heuristic: if no realistic second rule system would need a different value for this name, it is structural vocabulary and the library owns it. This makes the obligation to document and validate structural keys explicit, rather than treating them as a grey area.
|
Bito Automatic Review Skipped - Files Excluded |
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
Why
The old rule was correct in intent but over-broad in application. It was being interpreted as "never hardcode any name in library source," which led to thin indirection layers (e.g.
mode_field,cap_field) that added silent failure modes without adding real flexibility — and left ~20 metadata keys the library silently depends on undocumented and unvalidated.The real distinction is:
"fireball"is domain vocabulary (belongs in config);"required_count"is the library's own language for expressing a concept (belongs in library source, documented and validated).