Skip to content

gws-skills: nest verb-helpers + author trigger-optimized descriptions#27

Open
ak2k wants to merge 3 commits into
mainfrom
feat/gws-nest-verb-helpers
Open

gws-skills: nest verb-helpers + author trigger-optimized descriptions#27
ak2k wants to merge 3 commits into
mainfrom
feat/gws-nest-verb-helpers

Conversation

@ak2k

@ak2k ak2k commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Two-commit change improving how the gws bundle is exposed to Claude Code, without growing the always-loaded skill-description floor.

1. Nest verb-helpers under their service parent

googleworkspace/cli emits each verb as its own top-level skill (gws-gmail-reply, gws-gmail-send, …). Registering all ~93 bloats the always-loaded description floor, so the consumer selected only the service parents and dropped the verb-helpers — leaving each parent's SKILL.md link table pointing at 14 now-absent pages.

gws-skills/default.nix adds a derivation that restructures the flat tree: each gws-<svc>-<verb>/SKILL.md becomes gws-<svc>/references/<verb>.md, linked from the parent and loaded on demand (progressive disclosure — the same shape atlassian-cli already uses). Helper text rides along at zero idle cost; the 14 dead links are gone.

  • nix/gws.nix — single source of truth for which names stay top-level (gws-workflow-* stay top-level as compound entry points; gws-admin-reports has no parent so it stays standalone).
  • transform.py asserts no relative link is left dead — fails the build otherwise.
  • registry.nix sources the transformed tree; lib.bundles.gws exposes the top-level set.

2. Author trigger-optimized service descriptions

Upstream descriptions are terse "what" strings ("Gmail: Send, read, and manage email") with no trigger phrasing, so verb-specific requests ("forward this email", "delete my 3pm meeting") may not auto-invoke the skill — and nesting collapsed the verb keywords out of the floor too.

gws-skills/generate-descriptions.py (a dev-time tool, not run in the build; ported from ce-lite's refine-keyword-rules.py) calls claude -p headlessly to author one tight, third-person what + when description per service — covering the real CRUD surface mined from each SKILL.md and disambiguated from sibling services. Output is committed to overrides/gws-descriptions.json.

transform.py applies the overrides at build time and asserts verb coverage: every nested verb must be covered by its description (proven by the verb_coverage map), so a dropped trigger fails the build.

Deployed-13 idle floor stays well within budget (~1k tokens vs the ~2k@200k / ~10k@1M description budget).

Verification

nix flake check -L passes (build + treefmt/ruff + all checks).

ak2k added 3 commits June 8, 2026 17:21
The googleworkspace/cli skills tree ships each verb as its own top-level
skill (gws-gmail-reply, gws-gmail-send, ...). Registering all ~93 bloats the
always-loaded skill-description floor, so the consumer was selecting only the
service parents and dropping the verb-helpers -- which left the parents'
SKILL.md link tables pointing at 14 now-absent pages.

Add a gws-skills derivation that restructures the flat tree: each
gws-<svc>-<verb>/SKILL.md becomes gws-<svc>/references/<verb>.md, linked from
the parent and loaded on demand, so the helper text rides along at zero idle
cost. nix/gws.nix is the single source of truth for which names stay
top-level; the transform asserts no relative link is left dead. registry.nix
sources the transformed tree; lib.bundles.gws exposes the top-level set.

gws-workflow-* stay top-level (compound entry points); gws-admin-reports has
no parent so it stays standalone.
The upstream descriptions are terse "what" strings (e.g. "Gmail: Send, read,
and manage email") with no trigger phrasing, so verb-specific requests like
"forward this email" or "delete my 3pm meeting" may not auto-invoke the
service skill -- and nesting the verb-helpers collapsed their trigger
keywords out of the always-loaded floor.

Add generate-descriptions.py, a dev-time tool (ported from ce-lite's
refine-keyword-rules.py) that calls `claude -p` headlessly to author one
tight, third-person "what + when" description per service, covering the real
CRUD surface mined from each SKILL.md and disambiguated from sibling
services. Output is committed to overrides/gws-descriptions.json.

transform.py applies the overrides at build time and asserts verb coverage:
every nested verb must be covered by its description, proven by the
verb_coverage map, so a missing trigger fails the build. Deployed-13 idle
floor stays well within budget (~1k tokens).
Two non-obvious caveats as code comments: check_verb_coverage proves only the
helper verbs are present (not broader-API/CRUD under-coverage), and the
committed descriptions are opus-authored while the generator default is sonnet
(a naive regen downgrades them).
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.

1 participant