Skip to main content

Module code_skills

Module code_skills 

Source
Expand description

Code skills: procedural memory as tested Python (port of ultron/code-skills.ts).

A code skill is a Python module under <dir>/<name>/. Every proposal becomes a numbered version in .versions/<n>/ (skill.py, test_skill.py, SKILL.md); its test runs in a fresh kernel that refuses every host request, and only a passing version becomes active. The active version is copied to the skill directory’s top level (Pi’s skill loader lists its SKILL.md) and skills_api.py makes it importable as from code_skills import <name> in every kernel, verified against the recorded sha256. States: proposed → active | rejected; an activation supersedes the previous active version and remembers it; only the active version can be rolled back, which restores the version it superseded (or leaves none active). .history.json is written as JSON.stringify(history, null, "\t"), so either implementation reads the other’s.

Structs§

CodeSkills
CodeSkillsOptions

Enums§

CodeSkillKind

Constants§

CODE_SKILL_TEST_TIMEOUT_MS_ENV
DEFAULT_TEST_TIMEOUT_MS

Functions§

valid_code_skill_name
validCodeSkillName: a lowercase Python identifier of at most 64 characters that is not a keyword.