Skip to main content

check

Function check 

Source
pub fn check(pack: &Pack, against: &Against) -> Vec<Problem>
Expand description

Every problem of pack, checked against against, in order of skill and file:

  1. its frontmatter reads, with its folder’s name (lowercase letters, digits and single -), a description that says when to use it (Use …) and when not (Not …), and a metadata.version (1.0);
  2. every shuyi <command> in the code of its Markdown files is a command of shuyi;
  3. every relative link of its Markdown files names a file of the pack, and none names the engine’s repository on main (a skill sends an agent to the project’s AGENTS.md, which names the engine’s docs at the version the game builds with);
  4. its name, description, compatibility and SKILL.md are within the format’s lengths (MAX_NAME, MAX_DESCRIPTION, MAX_COMPATIBILITY, MAX_LINES);
  5. every id in its waits_for is an open ticket (when they are known), and a skill of the engine’s pack (Pack::embedded, by name) that waits for nothing has a worked example. A project’s own skill, one the embedded pack doesn’t have, needs none: it teaches the project’s own workflow, with nothing for a new game to run;
  6. every problem code (SH2003) in its files is a row of the table (shuyi explain) that isn’t retired.

A folder of the pack with no SKILL.md is a problem too.