Skip to content

Restructure gather menu for model legibility - #265

Draft
nahiyankhan wants to merge 1 commit into
mainfrom
gather-menu-model-legibility
Draft

Restructure gather menu for model legibility#265
nahiyankhan wants to merge 1 commit into
mainfrom
gather-menu-model-legibility

Conversation

@nahiyankhan

Copy link
Copy Markdown
Collaborator

Category: improvement
User Impact: ghost gather output is easier for a host agent to read and act on correctly — fewer ambiguous instructions, no duplicated wording, grouped by kind instead of alphabetical, and a clearer rule about when a wrong-context node is worse than a skipped one.
Problem: The gather menu buried its own selection contract after the cover and coverage line, described itself instead of instructing, repeated the same label and jargon on every node/section, and referenced an undefined "cover silence posture." Nodes were listed alphabetically by id, splitting each kind's legend from the nodes it governs.
Solution: Single-source the selection contract text between the markdown and JSON emitters (previously duplicated and already drifting), lead with it, and make it an instruction rather than a description. Group nodes by glossary kind order with each kind's legend inline above its group, numbered continuously. State repeated labels ("applies when", "unranked") once instead of per line/section. Rewrite the silence line to point at the cover's own missing-guidance rule instead of an unexplained term. Document a first-paragraph-is-selection-semantics convention for glossary kinds in schema.md and apply it to the starter glossary.

Validation:

  • pnpm build: pass
  • pnpm test: pass (211/211, all packages)
  • pnpm check: pass (biome, typecheck, terminology, packed-package, file-sizes, install-bundle, release-tarball, release-workflows, vessel-light)
  • Manually verified gather output (with and without an ask) against a real initialized package and against a scratch copy of the Block brand fingerprint package (field-renamed locally only, to run on this branch's CLI; no source-of-truth package was modified).

Changeset: added (.changeset/gather-menu-model-legibility.md, patch)

ghost Review:

  • ghost check / ghost review: not applicable — this repo builds ghost itself, not a package that consumes it.
File changes

packages/ghost/src/embed/gather.ts
Single-sourced the selection contract (GATHER_SELECTION_INSTRUCTION, GATHER_NO_ASK_INSTRUCTION) so markdown and JSON stop drifting apart. Added the context.* uncertainty carve-out (wrong-situation context nodes are contamination, so "when uncertain, pull" doesn't apply there). Added groupMenuByKind to order/group entries by the glossary's declared kind order. Rewrote the silence line to reference the cover's own missing-guidance rule instead of an undefined "cover silence posture." Made noAsk optional on the contract type.

packages/ghost/src/commands/gather-command.ts
Restructured markdown output: selection contract leads, then the cover (plain node-id header, one line saying it's not part of the menu), then "Available guidance" with a compressed coverage line and kind-grouped, continuously numbered nodes. Removed the per-node _(kind)_ tag (grouping already encodes it), removed the duplicate payloads: materials line, removed the repeated "Applies when" label per node in favor of one line stated above the whole list.

packages/ghost/src/embed/types.ts
GhostGatherContract.noAsk is now optional, matching the emitter only setting it when no ask was supplied.

packages/ghost/src/init-payloads/skeleton/glossary.md
Rewrote the foundation and context kind legends so the first paragraph (the part gather actually surfaces) states selection semantics; moved anatomy/rationale to a second paragraph.

packages/ghost/src/skill-bundle/references/schema.md
Documented that gather renders only a kind's first glossary paragraph as its menu legend, and that authors should write that paragraph as selection semantics, not anatomy or history.

packages/ghost/src/skill-bundle/references/ground.md
Removed the standalone "when uncertain, pull" sentence now that the fuller, context-aware version lives in the emitted contract; pointed the coverage-line guidance at the new wording.

packages/ghost/test/cli.test.ts
Updated assertions to match the restructured markdown output (cover header, coverage line, kind-grouped legend, silence line).

.changeset/gather-menu-model-legibility.md
Patch changeset describing the user-facing CLI output change.

Screenshots/Demos: N/A — CLI text output; before/after samples were reviewed interactively during development.

- Single-source the selection contract between markdown and JSON emitters,
  leading with an instruction and adding a context-aware uncertainty rule
  (context.* wrong-situation pulls are contamination, not mild dilution).
- Group menu nodes by glossary kind order with the kind's legend inline
  above each group; number nodes continuously across groups.
- Drop the cover's 'do not pull again' ceremony down to a plain node
  header plus one line; state 'each bullet applies when' once above the
  list instead of repeating the label per node.
- Compress the coverage line (drop zero-count noise and the 'carry
  payloads' jargon); rewrite the silence line to point at the cover's
  own missing-guidance rule instead of an undefined 'silence posture'.
- Update the starter glossary's foundation/context legends to lead with
  selection semantics, per a documented schema.md convention.

Co-authored-by: Goose <opensource@block.xyz>
Ai-assisted: true
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