Reads the document
The fence, then a strict YAML header, then the Markdown an agent would read. name: 42 is the name forty-two; a document that is not a skill document at all is refused. A field that is merely wrong is left for the next entry.
The reading side of an agent’s shortlist.
Skills are cheap because nobody reads all of them. A client puts the name and description of every skill it has in front of a model, opens the body of the one the model picked, and reads the files that body points at only when the work reaches them.
This library is the reading side of that arrangement. It parses the header strictly, reports every rule a document breaks in one pass, walks a tree of skills through a source you implement, and produces the block a model chooses from. It has no opinion about which agent is reading, and it opens no file by itself.
this is the first thing a model sees
The fence, then a strict YAML header, then the Markdown an agent would read. name: 42 is the name forty-two; a document that is not a skill document at all is refused. A field that is merely wrong is left for the next entry.
The three length limits, the character rules, the directory name, the fields that may appear — and the whole list at once, because a person fixing a document wants the list rather than the first line.
A tree is walked through Source. A directory reader is included; a tarball, a database or an HTTP cache is a source you write, and everything above the trait stays as it is.
The first tier as an <available_skills> block: name, description and location per skill, escaped so a description that quotes markup stays text.
Any number of directories, one line each, a non-zero exit when anything failed. --json prints the same verdicts for a program to read.
Each tier is read only when the one above it has been paid for. The indent is the order.
Skill::resolve joins the skill root and refuses a path that climbs out of it, so a document can point at its own files and nowhere else.
Paste a résumé. The desk below is the library, compiled to JavaScript — it parses and validates as you type, and every tag and sentence in the margin is the one the MoonBit side produces.
The directory name matters: the specification wants it to equal name, so a document that is perfect on its own can still be wrong in the folder it sits in.