Restructure gather menu for model legibility - #265
Draft
nahiyankhan wants to merge 1 commit into
Draft
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Category: improvement
User Impact:
ghost gatheroutput 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.mdand apply it to the starter glossary.Validation:
pnpm build: passpnpm test: pass (211/211, all packages)pnpm check: pass (biome, typecheck, terminology, packed-package, file-sizes, install-bundle, release-tarball, release-workflows, vessel-light)gatheroutput (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 thecontext.*uncertainty carve-out (wrong-situation context nodes are contamination, so "when uncertain, pull" doesn't apply there). AddedgroupMenuByKindto 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." MadenoAskoptional 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 duplicatepayloads: materialsline, 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.noAskis now optional, matching the emitter only setting it when no ask was supplied.packages/ghost/src/init-payloads/skeleton/glossary.md
Rewrote the
foundationandcontextkind legends so the first paragraph (the partgatheractually surfaces) states selection semantics; moved anatomy/rationale to a second paragraph.packages/ghost/src/skill-bundle/references/schema.md
Documented that
gatherrenders 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.