Command config schema and loader that parses markdown command definitions from disk.

Members

(static, constant) Info

Schema for a user-defined command (template plus optional description, agent, model, subtask flag).

Methods

(static) load(dir) → {Promise.<Object>}

Load all command definitions under a directory by scanning {command,commands}/**\/*.md, parsing each markdown file's frontmatter and body (the body becomes the command template), and validating against the command schema. Markdown parse failures are logged and published as a session error event and skipped; a file that parses but fails schema validation throws an InvalidError.

Parameters:
NameTypeDescription
dirstring

The base directory to scan for command markdown files.

Returns:

A map of command name to its validated config.

Type: 
Promise.<Object>