mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
fix(skills): correct invalid picoschema enum YAML in memory skills
The Task schema in memory-tasks/SKILL.md and the enum examples in
memory-schema/SKILL.md used a bare YAML flow sequence followed by a
trailing description:
status?(enum): [active, blocked, done, abandoned], current state
A flow sequence ([...]) cannot be followed by ', current state' —
python-frontmatter/PyYAML raises a ParserError. In schema_router.py,
_schema_frontmatter_from_file catches that error and silently falls
back to DB metadata, so the schema's enum constraints never load.
Per the picoschema parser docstring, enum descriptions belong inside
the parens:
status?(enum, current state): [active, blocked, done, abandoned]
Fixes 4 lines (1 in memory-tasks, 3 in memory-schema). The
memory-literary-analysis schemas use the quoted-string form
("role(enum)": "[...], desc"), which is valid YAML handled by
_parse_enum_string, so they were left unchanged.
Verified: all yaml schema blocks now parse via parse_schema_note,
and just package-check-skills passes (10 skills validated).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: phernandez <paul@basicmachines.co>
This commit is contained in:
committed by
Paul Hernandez
parent
354e1642b2
commit
4e7a217fa7
@@ -47,14 +47,14 @@ Use `(enum)` with a list of allowed values:
|
||||
|
||||
```yaml
|
||||
schema:
|
||||
status(enum): [active, blocked, done, abandoned], current state
|
||||
status(enum, current state): [active, blocked, done, abandoned]
|
||||
```
|
||||
|
||||
Optional enum:
|
||||
|
||||
```yaml
|
||||
schema:
|
||||
priority?(enum): [low, medium, high, critical], task priority
|
||||
priority?(enum, task priority): [low, medium, high, critical]
|
||||
```
|
||||
|
||||
### Arrays
|
||||
@@ -100,7 +100,7 @@ schema:
|
||||
attendees?(array): Person, who attended
|
||||
decisions?(array): string, decisions made
|
||||
action_items?(array): string, follow-up tasks
|
||||
status?(enum): [scheduled, completed, cancelled], meeting state
|
||||
status?(enum, meeting state): [scheduled, completed, cancelled]
|
||||
settings:
|
||||
validation: warn
|
||||
---
|
||||
|
||||
@@ -26,7 +26,7 @@ entity: Task
|
||||
version: 1
|
||||
schema:
|
||||
description: string, what needs to be done
|
||||
status?(enum): [active, blocked, done, abandoned], current state
|
||||
status?(enum, current state): [active, blocked, done, abandoned]
|
||||
assigned_to?: string, who is working on this
|
||||
steps?(array): string, ordered steps to complete
|
||||
current_step?: integer, which step number we're on (1-indexed)
|
||||
|
||||
Reference in New Issue
Block a user