You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First we should confirm that hierarchy and relationships are both optional , supporting flat or non-hierarchical spaces.
With both optional there is then no way to specify matchers. Matchers are also similar to aliases and the difference isn't fully explicit.
To support flat structures as well as type inference consider a refactor of metadata to extract type configuration (ie matchers) such that it's not (only?) expressed inside relationship or hierarchy config.
Related to #44 (parsing hints in space config) and #73 (type inference from folder structure).
After setting up two knowledge wiki spaces against the same knowledge_wiki schema, a concrete pattern is emerging: both spaces would benefit from folder-to-type mappings at the space config level rather than relying solely on schema-level aliases and matchers.
Example: if a space had a structure like:
sources/ → type: source
concepts/ → type: concept
syntheses/ → type: synthesis
notes/ → type: note
...the schema wouldn't need to know about those folders at all. The space config provides the mapping. A different space using the same schema could use completely different folder conventions.
This connects to the metadata refactor: extracting matchers from relationships makes the schema more composable, but the space config hints in #44 might be the better home for folder-to-type mapping specifically, keeping the schema focused on type definitions and relationships.
Matchers at hierarchy and relationship level have specific meaning so need to be supported there still. They imply a type match and a specific relationship connection.
Aliases are for taking a (currently explicit) type value and mapping it to a schema defined type.
Type inference could work by bending aliases to handle inferred types too:
a config option that says aliases can be used to infer types from folders, on by default. Since folders are a plug-in level construct this should be a plugin level option and operation.
a config option allowing to provide additional aliases, combined with the schema defined ones. This is space level, not plugin level.
This overloads aliases but feels like a reasonable compromise vs complicating the config. Chances are the use of aliases for both inference and remapping would be uncommon, the likelihood of a genuine conflict where separate aliases would be needed is extremely unlikely, and the decision can be revisited if it's a problem in practice.
Resolved through design review: the existing $metadata layout is sufficient and was not changed. Type information for inference is sourced from oneOf branches in the schema (not metadata); aliases remain schema-only via $metadata.aliases. No new metadata fields were needed.
Activity
mindsocket commentedon Apr 6, 2026
Related to #44 (parsing hints in space config) and #73 (type inference from folder structure).
After setting up two knowledge wiki spaces against the same knowledge_wiki schema, a concrete pattern is emerging: both spaces would benefit from folder-to-type mappings at the space config level rather than relying solely on schema-level aliases and matchers.
Example: if a space had a structure like:
sources/→ type: sourceconcepts/→ type: conceptsyntheses/→ type: synthesisnotes/→ type: note...the schema wouldn't need to know about those folders at all. The space config provides the mapping. A different space using the same schema could use completely different folder conventions.
This connects to the metadata refactor: extracting matchers from relationships makes the schema more composable, but the space config hints in #44 might be the better home for folder-to-type mapping specifically, keeping the schema focused on type definitions and relationships.
mindsocket commentedon Apr 6, 2026
Matchers at hierarchy and relationship level have specific meaning so need to be supported there still. They imply a type match and a specific relationship connection.
Aliases are for taking a (currently explicit) type value and mapping it to a schema defined type.
Type inference could work by bending aliases to handle inferred types too:
This overloads aliases but feels like a reasonable compromise vs complicating the config. Chances are the use of aliases for both inference and remapping would be uncommon, the likelihood of a genuine conflict where separate aliases would be needed is extremely unlikely, and the decision can be revisited if it's a problem in practice.
Net result is no change to metadata layout.
mindsocket commentedon Apr 7, 2026
Resolved through design review: the existing
$metadatalayout is sufficient and was not changed. Type information for inference is sourced fromoneOfbranches in the schema (not metadata); aliases remain schema-only via$metadata.aliases. No new metadata fields were needed.