Rename node retrieval frontmatter field to for - #262
Merged
Conversation
Co-authored-by: Goose <opensource@block.xyz> Ai-assisted: true
Co-authored-by: Goose <opensource@block.xyz> Ai-assisted: true
nahiyankhan
marked this pull request as ready for review
August 19, 2026 00:01
The team converged on `for` over both `description` and `context`: it reads as the situation or activity the guidance is for, and the corpus values already complete that sentence naturally. Both prior names are rejected at validation with rename messages. Coverage field is `withoutFor`; lint rule is `node-for-missing`. Check frontmatter keeps its own `description` field (established .agents/checks format).
The context and description rejections now point to `for` without narrating field history.
chailandau
reviewed
Aug 19, 2026
Co-authored-by: Chai Landau <112015853+chailandau@users.noreply.github.com>
chailandau
approved these changes
Aug 19, 2026
Merged
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 package nodes declare their retrieval payload with a
for:frontmatter field: the situation or activity the guidance is for. Near-miss keys (context,description) are rejected with a pointer tofor.Problem: #252 renamed the node retrieval field from
descriptiontocontext, butcontextreads as the mechanism (what ends up in the model's context) rather than the payload itself, and it collides with the everyday "context" vocabulary used throughout ghost's own prose.descriptionwas semantically loose in the other direction: the field's content never describes the node, it names when the node applies. The team converged onfor.Solution: A forward rename to
forrather than a revert. Every value in the corpora already completes the sentence "this guidance is for ___" (for: Choosing or applying color.,for: Any view containing text or actions.), so the field teaches itself from its own values.foris canonical across the schema, catalog, embed API, CLI output, lint rules, corpora, and docs. Authoringcontext:ordescription:fails validation with a pointer to the right key ("descriptionis not a node key; usefor"), mirroring the existingrelatesrejection pattern; without the explicit rejection, the passthrough schema would let an old key ride along silently and leave the node invisible to gather. Check frontmatter keeps its owndescriptionfield: that is the established.agents/checksformat, not the node schema. The skill prose adds the one guardrailforneeds: it names a situation or activity, never an audience.Validation:
pnpm build: passpnpm test: 211/211 pass (adds rejection tests for both near-miss keys)pnpm check: pass (biome, typecheck, terminology, package checks)ghost init(skeleton and vessel-light bodies) validates clean and emitsfor:; nodes authored withcontext:ordescription:fail validation with the pointer tofor; all three in-repo corpora (apps/docs,vessel-light,vessel-react) validate with no new findings.Changeset: added (
minor) — public CLI/embed output shape and validation behavior change.ghost Review:
ghost review: not run — no root.ghost/checks/directory in this repo.File changes
.changeset/rename-retrieval-field-to-for.md
New minor changeset describing the field and the rejection behavior.
packages/ghost/src/ghost-core/node/schema.ts, types.ts, serialize.ts
foris the canonical frontmatter field.contextanddescriptionare rejected keys that point tofor. Key order isfor, materials.packages/ghost/src/ghost-core/catalog/types.ts, menu.ts, assemble.ts, closest.ts
Catalog nodes and menu entries carry
for.packages/ghost/src/embed/types.ts, gather.ts, pull.ts
Embed API emits
for; coverage field iswithoutFor; gather selection instruction updated.packages/ghost/src/commands/gather-command.ts, pull-command.ts
CLI markdown/JSON output uses
for; coverage line says "N lackforpayloads".packages/ghost/src/review/baseline.ts, review-packet.ts
Review packet and baseline prose carry
for.packages/ghost/src/scan/fingerprint-package-lint.ts
Lint rule is
node-for-missing.packages/ghost/src/skill-bundle/ (SKILL.md, references/schema.md, nodes.md, making.md, ground.md, steering-audit.md)
Skill prose teaches
foras the retrieval payload: the situation or activity the guidance is for, never an audience.packages/ghost/src/init-payloads/ (median, skeleton)
Scaffolded nodes author
for:. The median-tells check keeps its check-formatdescriptionfield.packages/ghost/test/ (cli.test.ts, cli-exit.test.ts, embed.test.ts, fingerprint-package.test.ts, ghost-core/node-schema.test.ts)
Node fixtures author
for:; rejection tests cover both near-miss keys. Check fixtures keepdescription(check format).apps/docs/.ghost/ (9 nodes), packages/vessel-light/.ghost/ (18 nodes), packages/vessel-react/.ghost/ + fingerprint/ (25 nodes)
Mechanical frontmatter rename to
for:.apps/docs/src/components/docs/gather-demo.tsx, apps/docs/src/pages/index.astro
Demo menu data and landing-page examples use
for.packages/context-control/README.md, lib/model.mjs, ui/index.html
Bench consumes the renamed menu field; coverage line reads
withoutFor.README.md, CLAUDE.md, docs/purposes.md
Docs describe
foras the retrieval payload.Screenshots/Demos: N/A