Skip to content

Make the hey skill discovery-first - #579

Open
robzolkos wants to merge 8 commits into
mainfrom
skill-discovery-first
Open

robzolkos wants to merge 8 commits into
mainfrom
skill-discovery-first

Conversation

@robzolkos

@robzolkos robzolkos commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Why

The hey skill was 79 KB, loaded whole on every /hey, and three quarters of it was a hand-kept copy of what hey <command> --help already serves. This does #408 the way the issue's maintainer comment settled it, modelled on basecamp/basecamp-cli#835: no references/ directory, the binary's help is the reference.

What changed

  • skills/hey/SKILL.md drops from 78,931 to 15,018 bytes. Agents read hey <group> <subcommand> --agent --help before a command they have not used. The skill keeps only what spans commands: ID kinds, output shapes, send outcomes, the read-then-write recipes and the authentication rules.
  • Every fact the skill held that no command's help stated now sits in that command's agent_notes. About 60 commands gained text.
  • scripts/skill-coverage/check.py proves nothing was dropped (below). A test holds the skill under 16 KiB, teaching leaf help before root help, with no catalog sections.

Scope

  • Covers every sentence, table row and code line of the old skill, 702 facts in all.
  • Leaves out a skill-eval harness like basecamp-cli's. Nothing here measures whether agents follow the --agent --help pointer, which the issue names as the trigger for the references/ fallback.
  • The coverage script and ledger are a one-off audit, committed so a reviewer can rerun them. They can be deleted after merge.

Tradeoffs

  • Facts went into agent_notes, not a references/commands.md, because that would be a second copy of --help and would need the installer and refresh path to carry a directory.
  • The ledger cites quoted text, so the script proves each quote exists in the help or the skill. Whether the quote states the fact is a reviewer's judgment. The ledger keeps fact and quote side by side for that read.

Blast Radius

Agents using the skill now make one extra local --help call per new command. Help text changed for about 60 commands, with no flag or behavior change. The audit found five help texts that were wrong or contradicted the skill, and they are corrected:

  • hey auth told agents to check status first and to log in with --token.
  • hey box view and hey bundle view said a bundle row has no topic_id.
  • hey collection view pointed at the wrong ID kind.
  • hey timetrack stop and edit said a blank category is ignored. It is refused.
  • hey draft send contradicted itself on retrying.

The old skill also called contact notes private. On HEY for Domains everyone at the account sees them, and the help now says so.

Verification

  • python3 -I scripts/skill-coverage/check.py: 702 facts, 523 in help and 179 uncovered before; 640 in help, 62 in the skill and 0 uncovered after, exit 0.
  • make test, make lint and make check exit 0. Each commit builds and passes go test ./skills ./internal/cmd.
  • Spot-checked 24 sampled fact/quote pairs by hand. One quote was too loose and now cites the precise sentence.
Coverage before (current binary, nothing deleted)
SKILL.md at 76ea03f: 702 facts. New SKILL.md: 78931 bytes.
section                                    facts  help skill uncov
intro                                          1     1     0     0
agent-invariants                              10     2     0     8
output-filtering                              14     5     0     9
quick-reference                              125   122     0     3
reading-email                                 31    30     0     1
sending-email                                 25    24     0     1
managing-todos                                 6     6     0     0
email-boxes                                   25     9     0    16
email-labels                                  10     8     0     2
email-collections                             10     8     0     2
email-set-aside-groups                        13     9     0     4
email-workflows-clips-and-snippets            15    14     0     1
email-search                                  13     9     0     4
contacts                                      55    36     0    19
email-threads                                 25    15     0    10
email-attachments                              9     5     0     4
email-reply-forward-compose                   29    21     0     8
email-the-screener                            20    18     0     2
email-bulk-reply                               8     4     0     4
email-seen-unseen                              5     5     0     0
email-moving-threads                          11     9     0     2
email-bubble-up                               15    13     0     2
email-trash-and-spam                           8     6     0     2
email-ignoring-threads                         8     7     0     1
email-watching-for-changes                    25    17     0     8
drafts                                        15    13     0     2
calendars                                      8     3     0     5
events                                        65    42     0    23
todos                                          8     5     0     3
habits                                        13    10     0     3
time-tracking                                 23    21     0     2
journal                                       20    11     0     9
authentication                                28    11     0    17
sender-selection                               6     4     0     2
total                                        702   523     0   179
Coverage after
SKILL.md at 76ea03f: 702 facts. New SKILL.md: 15018 bytes.
section                                      facts    help   skill retired uncover
intro                                            1       1       0       0       0
agent-invariants                                10       4       6       0       0
output-filtering                                14       5       9       0       0
quick-reference                                125     125       0       0       0
reading-email                                   31      31       0       0       0
sending-email                                   25      25       0       0       0
managing-todos                                   6       6       0       0       0
email-boxes                                     25      18       7       0       0
email-labels                                    10      10       0       0       0
email-collections                               10      10       0       0       0
email-set-aside-groups                          13      13       0       0       0
email-workflows-clips-and-snippets              15      15       0       0       0
email-search                                    13      13       0       0       0
contacts                                        55      49       6       0       0
email-threads                                   25      20       5       0       0
email-attachments                                9       9       0       0       0
email-reply-forward-compose                     29      26       3       0       0
email-the-screener                              20      19       1       0       0
email-bulk-reply                                 8       8       0       0       0
email-seen-unseen                                5       5       0       0       0
email-moving-threads                            11      11       0       0       0
email-bubble-up                                 15      14       1       0       0
email-trash-and-spam                             8       7       1       0       0
email-ignoring-threads                           8       7       1       0       0
email-watching-for-changes                      25      25       0       0       0
drafts                                          15      14       1       0       0
calendars                                        8       6       2       0       0
events                                          65      65       0       0       0
todos                                            8       8       0       0       0
habits                                          13      13       0       0       0
time-tracking                                   23      23       0       0       0
journal                                         20      14       6       0       0
authentication                                  28      15      13       0       0
sender-selection                                 6       6       0       0       0
total                                          702     640      62       0       0

Summary by cubic

Makes the hey skill discovery-first: SKILL.md drops from 79 KB to 15 KB, and agents are pointed to hey <command> --agent --help for anything command-specific. The binary's own help is now the reference instead of a hand‑kept copy.

  • Moves the old skill's 702 facts into command help and new agent_notes annotations, so nothing is lost.
  • Adds scripts/skill-coverage/ — a one‑off audit ledger plus check.py that proves each fact still appears in the new skill or in --help output. It can be deleted after merge.
  • Corrects seven help texts that were wrong or contradicted the old skill: hey auth's login advice, bundle row IDs, blank time‑track categories, contact-note privacy on HEY for Domains, and where a capped listing (e.g. hey search) names its next page.
  • The only behavioral effect: agents now make one extra local --help call per new command. No flags or mail‑handling behavior changed.

Written for commit 1fa62f9. Summary will update on new commits.

View guided diff Turn on auto-fix

Box, bundle, thread, search, label, collection, Set Aside, attachment and
watch help now carry the facts the skill's Resource Reference held for
them. A bundle row's topic_id and the IDs collection add and remove take
were stated wrongly and are corrected.
Move, trash, spam, bubble, screener, bulk-reply, draft, reply and compose
help now carry the skill's facts for them. draft send no longer
contradicts itself about retrying a refused send.
hey auth no longer tells agents to check status before every command or
to log in with --token unattended, which the skill forbids. A contact
note is the account's, so on HEY for Domains everyone there sees it.
Event, calendar, todo, journal, habit and timetrack help now carry the
skill's facts for them. A blank time track category is refused with a
usage error; the help and docs said it was ignored.
SKILL.md drops its command catalog (79 KB to 15 KB) and sends agents to
hey <group> <subcommand> --agent --help, keeping only what spans
commands: ID kinds, output shapes, send outcomes, read-then-write
recipes and the authentication rules. A test holds it under 16 KiB,
leaf help before root help, with no catalog sections.

Closes #408
scripts/skill-coverage splits the skill as it stood at 76ea03f into 702
facts and checks each against a ledger naming where it lives now: a
command's --agent --help output or the new SKILL.md. Each ledger line
quotes the text, and the check fails when the quote is not there.
@robzolkos
robzolkos requested a review from a team as a code owner October 17, 2026 04:36
Copilot AI balanced review requested due to automatic review settings October 17, 2026 04:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The discovery guidance can hide shared-note visibility and cause agents to mistake capped listings for complete results.

2 open issues
What changed in this PR

Makes the HEY skill discovery-first by moving command details into the CLI’s help while retaining shared safety guidance.

Changes:

  • Replaces the large command catalog with leaf-help discovery.
  • Expands command help and corrects existing documentation.
  • Adds a coverage ledger and discovery-focused tests.

[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

File Description
skills/​embed_test.go Enforces skill size and discovery guidance.
scripts/​skill-coverage/​ledger/​f-journal-auth.tsv Maps journal and authentication facts.
scripts/​skill-coverage/​ledger/​e-calendar-time.tsv Maps calendar and time-tracking facts.
scripts/​skill-coverage/​ledger/​d-mail-actions.tsv Maps mail-action facts.
scripts/​skill-coverage/​ledger/​c-contacts-threads.tsv Maps contact and thread facts.
scripts/​skill-coverage/​ledger/​b-mail-reading.tsv Maps mail-reading facts.
scripts/​skill-coverage/​ledger/​a-head.tsv Maps shared rules and command references.
scripts/​skill-coverage/​check.py Checks quoted coverage evidence.
scripts/​skill-coverage/​apply.py Applies ledger corrections.
internal/​cmd/​watch.go Documents watch output and script execution.
internal/​cmd/​tui.go Adds agent-facing TUI guidance.
internal/​cmd/​trash.go Clarifies bundle handling.
internal/​cmd/​topic.go Expands thread-reading guidance.
internal/​cmd/​todo.go Documents date windows and validation.
internal/​cmd/​timetrack.go Corrects category and export guidance.
internal/​cmd/​spam.go Clarifies bundle handling.
internal/​cmd/​skill_commands_test.go Supports discovery placeholders and help flags.
internal/​cmd/​setup.go Documents setup side effects.
internal/​cmd/​set_aside.go Explains group lifecycle and pagination.
internal/​cmd/​search.go Documents filtering and pagination limits.
internal/​cmd/​screener.go Explains the Screener’s purpose.
internal/​cmd/​reply.go Expands reply and dry-run guidance.
internal/​cmd/​recording_filter.go Shares date-window help text.
internal/​cmd/​omarchy.go Explains explicit agent installation.
internal/​cmd/​move.go Clarifies Reply Later behavior.
internal/​cmd/​label.go Documents pagination and duplicate names.
internal/​cmd/​journal.go Clarifies empty entries and safe writes.
internal/​cmd/​help_test.go Allows literal wire-field terminology.
internal/​cmd/​habit.go Documents defaults and editing semantics.
internal/​cmd/​events.go Expands event and occurrence guidance.
internal/​cmd/​events_period.go Documents occurrence and countdown output.
internal/​cmd/​drafts.go Explains scheduled draft visibility.
internal/​cmd/​draft.go Clarifies scheduling and send retries.
internal/​cmd/​contacts_update.go Documents contact-edit restrictions.
internal/​cmd/​contacts_show.go Explains filtering embedded threads.
internal/​cmd/​contacts_list.go Documents listing scope and lookup.
internal/​cmd/​contacts_hide.go Explains hiding instead of deleting.
internal/​cmd/​contacts_deliver.go Clarifies blocking terminology.
internal/​cmd/​contacts_deliver_test.go Updates expected routing guidance.
internal/​cmd/​contact_note.go Adds account-visibility guidance.
internal/​cmd/​contact_note_set.go Documents replacement and write constraints.
internal/​cmd/​contact_note_delete.go Documents deletion restrictions.
internal/​cmd/​compose.go Clarifies sender and body-input behavior.
internal/​cmd/​collection.go Corrects ID guidance and documents pagination.
internal/​cmd/​calendars.go Describes calendar output fields.
internal/​cmd/​bundle.go Corrects bundle thread-ID guidance.
internal/​cmd/​bulk_reply.go Documents validation and delivery results.
internal/​cmd/​bubble_list.go Describes automatic scheduling output.
internal/​cmd/​box.go Expands box, bundle, and pagination guidance.
internal/​cmd/​auth.go Replaces login preflight advice.
internal/​cmd/​attachments.go Explains attachment identifiers.
internal/​cmd/​attachments_save.go Clarifies destination-path handling.
docs/​cli.md Corrects blank-category documentation.

Review effort: Balanced

Comment thread internal/cmd/contact_note_set.go Outdated
Comment thread skills/hey/SKILL.md Outdated
Agents now read leaf help, and hey contact note set's help called the
note private without the HEY for Domains warning its parent carries.
hey search and hey contact list number their pages and name the next
one in notice, not next_page, so the skill no longer says every listing
pages by cursor.
@robzolkos

Copy link
Copy Markdown
Contributor Author

Review status at 1fa62f9:

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The 702-fact migration needs human semantic validation because quotation checks establish text presence, not preservation of meaning.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants