Skip to content

emrg: installable-skills catalog — /skills available/install/update - #570

Merged
argszero merged 1 commit into
masterfrom
feature/recommended-skills-registry
Aug 8, 2026
Merged

emrg: installable-skills catalog — /skills available/install/update#570
argszero merged 1 commit into
masterfrom
feature/recommended-skills-registry

Conversation

@argszero

@argszero argszero commented Aug 8, 2026

Copy link
Copy Markdown
Owner

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, so system.j2 is untouched (zero prompt change) and no meta-mechanism is added.

Changes

Area What
emrg/skills/skill-catalog.md The catalog is a normal skill: frontmatter name: skill-catalog + description (loader reads these → one line in Available Skills) + a nested skills: 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 only
emrg/skills/registry.py Catalog frontmatter skills: list parser (no YAML dependency), startup-baseline ensure, .state.json (atomic write, corrupt-tolerant read)
emrg/skills/installer.py Host-confirmed CLI install (uv tool install --python 3.12 browser-harness), self-publish via browser-harness skill, frontmatter validation with rollback, version from api.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
loader _parse_frontmatter now skips indented (nested) lines — otherwise the catalog's nested per-skill description: overwrites its own top-level description; deprecated recommended.md never loads as a bogus skill
daemon skills_available / skills_install / skills_update commands; 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)
TUI /skills available, /skills install <name> (yes/no confirmation prompt for first-time CLI install), /skills update
packaging skill-catalog.md shipped in packaging/assets/ + runtime bundle (offline machines still see /skills available; install prompts to go online)

Design mapping (revised rant §7 acceptance)

  1. Clean install → /skills lists skill-catalog; Available Skills shows it; system prompt has no new section (verified by test: system.j2 contains no "Recommended Skills"/catalog mention)
  2. LLM reads skill-catalog.md → describes browser-harness capability, install command, update mechanism (body written for exactly that)
  3. /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)
  4. Simulated new release / .state.json version change → /skills update or 24h TTL refreshes managed files; host manual copies untouched (tested)
  5. Second recommended skill (e.g. pdf) = append a catalog section; system.j2/loader zero change (tested)
  6. Regression: 634 pytest green (599 → +35); pathlib-based (Windows-safe)

Verification

  • 634 pytest tests pass (incl. positive/negative install, rollback, managed-only update, manual-copy protection, corrupt-state tolerance, catalog-as-skill loading, j2-untouched assertion)
  • Real-tool check: browser-harness skill output (127 lines) passes the frontmatter validator

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

@pm25coder

Copy link
Copy Markdown
Contributor

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.
@argszero
argszero force-pushed the feature/recommended-skills-registry branch from b0ecc22 to 4c343e6 Compare August 8, 2026 02:33
@argszero argszero changed the title emrg: recommended-skills registry — /skills available/install/update emrg: installable-skills catalog — /skills available/install/update Aug 8, 2026
@pm25coder

Copy link
Copy Markdown
Contributor

Re-verified the revised design (force-pushed head `4c343e6`, installable-skills catalog / rant 10:14):

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 20260808-103430

Head-change audit (b0ecc224c343e6): this is a substantive revision, not a rebase — the design was revised per rant 10:14:29 (superseding 10:11:35): recommended.mdskill-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_frontmatter now ignores indented (nested) lines so the catalog's nested skills: 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 argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.md loads 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 3be1ad7a950d byte-equal, enforced by test).
  • Loader _parse_frontmatter ignores indented lines (nested skills: metadata can't clobber top-level name/description); deprecated recommended.md still 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 --help OK; CI run 31235239601 SUCCESS.

This is the 3rd consecutive ✅ (cycles 102754 → 103430 → 103603, no ❌ in between) → merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants