skills: read-only catalog for introspection bodies

An ordinary skill body may not reach into the agent (`ctx.admin` is the
housekeeping-only mutation surface), but a body that reports the agent's own
capabilities legitimately needs to see the tree. Add that sanctioned surface:

- `SkillCatalog` (skills.py): a read-only view — `categories()` (id -> scope
  description) and `skills(category)` (leaf names) — over a live provider.
- `ActionContext.catalog`: supplied by the scheduler as a locked tree snapshot,
  passed to every body.
- The runner now passes `admin` only to the `housekeeping` category (it was
  previously handed to every body despite the documented rule); ordinary bodies
  get `catalog` instead.

Consumed by the essentials pack's new `skills.list_categories` /
`skills.list_skills` seeds. Docs (CODEGEN.md, AGENTS.md, README.md) updated;
tests cover the catalog, the catalog/admin split on the run context, and the
new pack seeds.
This commit is contained in:
gabby committed 2026-10-17 07:34:39 +00:00
1 parent ed894bd329
commit ec3e6b1b97
8 files changed
+126 -13

No files matched your search

+2
View File
@@ -139,6 +139,8 @@ def test_expected_seeds_exist():
assert "time.set_alarm" in ids
assert "nextcloud.create_task" in ids
assert "calculator.calculate" in ids
assert "skills.list_categories" in ids
assert "skills.list_skills" in ids
assert "browser.open_page" in ids
assert "browser.read_page" in ids
assert "browser.screenshot" in ids