emrg: installable-skills catalog — /skills available/install/update - #570
Conversation
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260808-102754
Verified locally on the branch (13 files, +970/−40):
- Full suite: 634 passed (599 + 35 new in tests/test_skills_registry.py) — matches the PR claim exactly; README.md / Agent.md / README.cn.md all bumped 599→634 (#511 doc-count gate consistent).
- Embedded==shipped invariant: sha256 of BASELINE_RECOMMENDED_MD == emrg/skills/recommended.md == packaging/assets/recommended.md (byte-identical, enforced by test).
- Registry parser: dependency-free frontmatter parse, skips malformed entries, corrupt/missing file → empty list (no crash). Atomic .state.json writes + corrupt-tolerant reads (consistent with the #569 pattern).
- Installer: host-confirm gate for first-time CLI install (MANIFESTO §10), rollback on frontmatter validation failure, version from api.github.com (network-block-safe choice), update path only touches managed=true files and never installs a CLI silently.
- Daemon: skills_available/skills_install/skills_update handlers + 24h TTL background loop (deterministic, no LLM); skills reloaded after install/update. Loader skips recommended.md.
- system.j2: constant-length pointer section — adding a skill changes zero prompt bytes (tested).
- Import/CLI checks: from emrg.client.app import run_client OK; emrg --help OK.
- CI: run 31235006813 SUCCESS.
The two live end-to-end acceptance items (real uv tool install on a clean machine) are correctly deferred to host verification on v0.2.13 — consistent with the host-blocked-verification pattern.
|
Tested this PR locally (checked out feature/recommended-skills-registry on Windows): |
…rant 10:14) Host rant 2026-08-08T10:14:29 (revised design, supersedes the 10:11:35 registry draft): the recommended-skills list IS a skill. Implemented as specified — zero system.j2 change: - emrg/skills/skill-catalog.md — the catalog itself is a normal skill (frontmatter name/description for the loader + nested skills: list with the 5 metadata fields for the installer); loader picks it up via the existing mechanism → one line in Available Skills. - loader._parse_frontmatter — skip indented (nested) lines so the catalog's nested per-skill description cannot overwrite its own top-level description; deprecated recommended.md never loads as a skill. - emrg/skills/registry.py — catalog parse/ensure + .state.json (atomic, corrupt-tolerant). - emrg/skills/installer.py — host-confirmed CLI install (uv tool install --python 3.12 browser-harness), self-publish via '<cli> skill', frontmatter validation with rollback, version from api.github.com releases/latest; update refreshes only managed=true files, never installs a CLI silently, never touches host-modified copies. - daemon — skills_available / skills_install / skills_update commands; background 24h TTL update loop (startup + every 24h, deterministic, no LLM); skill reload after install/update; startup fallback writes the catalog baseline if missing (upgrades/user deletion). - TUI /skills — available / install <name> (yes/no confirm) / update. - packaging — baseline shipped in assets + build-runtime (offline machines still see /skills available). - tests: +35 (634 total); docs test counts + /skills docs synced.
b0ecc22 to
4c343e6
Compare
|
Re-verified the revised design (force-pushed head `4c343e6`, installable-skills catalog / rant 10:14): |
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260808-103430
Head-change audit (b0ecc22 → 4c343e6): this is a substantive revision, not a rebase — the design was revised per rant 10:14:29 (superseding 10:11:35): recommended.md → skill-catalog.md (now a normal skill file loaded by the existing loader, so its name/description surface in Available Skills and the LLM reads the body — the system.j2 pointer section is removed entirely). Per audit discipline I re-reviewed the full new head rather than carrying the prior vote.
Re-verification on 4c343e6 (all green):
- Full suite 634 passed (35 in tests/test_skills_registry.py) — docs README/Agent.md/README.cn.md all at 634 (#511 consistent).
- embedded BASELINE_CATALOG_MD == emrg/skills/skill-catalog.md == packaging/assets/skill-catalog.md (sha256 byte-equal); old recommended.md fully removed.
- Loader:
_parse_frontmatternow ignores indented (nested) lines so the catalog's nestedskills:metadata doesn't clobber top-level name/description; deprecated recommended.md still skipped defensively. - Catalog parses: 1 entry (browser-harness), all 6 required fields present.
- Installer: find_catalog_skill, host-confirm CLI install, rollback on validation failure, managed-only 24h update, never silent CLI install — unchanged safety properties.
- import + emrg --help OK.
- CI run 31235239601 SUCCESS.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260808-103603
Independent re-verification of head 4c343e6 (installable-skills catalog, rant 10:14 revised design):
- Full suite 634 passed (35 in tests/test_skills_registry.py) — matches docs (README/Agent.md/README.cn.md at 634, #511 gate consistent).
emrg/skills/skill-catalog.mdloads as a normal skill via the existing loader (name=skill-catalog, correct description) — the design's core claim verified directly.- Embedded baseline == shipped file == packaging asset (sha256
3be1ad7a950dbyte-equal, enforced by test). - Loader
_parse_frontmatterignores indented lines (nestedskills:metadata can't clobber top-level name/description); deprecatedrecommended.mdstill skipped. - Installer safety properties intact: host-confirm CLI gate (MANIFESTO §10), rollback on validation failure, managed-only 24h update via api.github.com, never silent CLI install.
- import +
emrg --helpOK; CI run 31235239601 SUCCESS.
This is the 3rd consecutive ✅ (cycles 102754 → 103430 → 103603, no ❌ in between) → merging.
Summary
Implements the host-reviewed installable-skills catalog design (rant 2026-08-08T10:14:29, revised — supersedes the 10:11:35 registry draft). Core insight: the recommended-skills list is itself a skill (
skill-catalog.md) — the existing skill mechanism is the pointer, sosystem.j2is untouched (zero prompt change) and no meta-mechanism is added.Changes
emrg/skills/skill-catalog.mdname: skill-catalog+description(loader reads these → one line in Available Skills) + a nestedskills:list (name/description/repo/install/dest/check — the installer's metadata). Body gives the LLM install/update guidance. Adding a new recommended skill = append a section to this file onlyemrg/skills/registry.pyskills:list parser (no YAML dependency), startup-baseline ensure,.state.json(atomic write, corrupt-tolerant read)emrg/skills/installer.pyuv tool install --python 3.12 browser-harness), self-publish viabrowser-harness skill, frontmatter validation with rollback, version fromapi.github.com/repos/{repo}/releases/latest(api.github.com — raw.githubusercontent/github.com:443 blocked on this host); update check refreshes only managed=true files, never installs a CLI silently, never touches host-modified copies_parse_frontmatternow skips indented (nested) lines — otherwise the catalog's nested per-skilldescription:overwrites its own top-level description; deprecatedrecommended.mdnever loads as a bogus skillskills_available/skills_install/skills_updatecommands; background 24h TTL update loop (startup + every 24h, deterministic — no LLM); reloads skills after install/update (next session's Available Skills includes it); writes the catalog baseline at startup when missing (upgrades / user deletion)/skills available,/skills install <name>(yes/no confirmation prompt for first-time CLI install),/skills updateskill-catalog.mdshipped inpackaging/assets/+ runtime bundle (offline machines still see/skills available; install prompts to go online)Design mapping (revised rant §7 acceptance)
/skillslistsskill-catalog; Available Skills shows it; system prompt has no new section (verified by test:system.j2contains no "Recommended Skills"/catalog mention)skill-catalog.md→ describes browser-harness capability, install command, update mechanism (body written for exactly that)/skills install browser-harness: host confirm → CLI → self-publish → validated → next session shows it (live end-to-end needs host verification on v0.2.13).state.jsonversion change →/skills updateor 24h TTL refreshes managed files; host manual copies untouched (tested)Verification
browser-harness skilloutput (127 lines) passes the frontmatter validator