Class: Cadenya::Models::MemoryLayers::MemoryEntrySpec
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Cadenya::Models::MemoryLayers::MemoryEntrySpec
- Defined in:
- lib/cadenya/models/memory_layers/memory_entry_spec.rb
Instance Attribute Summary collapse
-
#description ⇒ String?
One-line “when to use this” hint shown in the frontmatter manifest for skills entries.
-
#key ⇒ String
The lookup key for this entry within its layer.
Instance Method Summary collapse
-
#initialize(key:, description: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see MemoryEntrySpec for more details.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(key:, description: nil) ⇒ Object
Some parameter documentations has been truncated, see Cadenya::Models::MemoryLayers::MemoryEntrySpec for more details.
MemoryEntrySpec is the metadata portion of an entry — the fields that identify and describe it, without the body. It appears on both the summary (MemoryEntry) and detail (MemoryEntryDetail) views.
|
|
# File 'lib/cadenya/models/memory_layers/memory_entry_spec.rb', line 37
|
Instance Attribute Details
#description ⇒ String?
One-line “when to use this” hint shown in the frontmatter manifest for skills entries. The model uses this to decide whether to load the body, so it should be written for the model as the audience. Ignored for layer types that do not advertise frontmatter.
35 |
# File 'lib/cadenya/models/memory_layers/memory_entry_spec.rb', line 35 optional :description, String |
#key ⇒ String
The lookup key for this entry within its layer. Must conform to the S3 object key safe-characters spec: ASCII alphanumerics and the special characters !, -, _, ., *, ‘, (, ), and /. Forward slashes may be used to suggest hierarchy (e.g., “skills/postmortem/write”), but lookups are flat — the key is a single opaque string, not a path.
Additional rules enforced by the service:
-
May not begin or end with /
-
May not contain consecutive slashes (//)
-
May not begin with reserved prefixes (cadenya/, system/)
-
Case-sensitive
-
Unique within the parent layer
For skills entries, this key is also the id the model passes to memory_load_skill when it decides to load the entry’s content.
26 |
# File 'lib/cadenya/models/memory_layers/memory_entry_spec.rb', line 26 required :key, String |