Add explicit guidance selection to review - #297
Merged
Merged
Conversation
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.
Stack: Depends on #292. Base is
fix/preserve-guidance-outputso this diff contains only explicit-guidance review. Land #292 first, then retarget/rebase this PR ontomain.Category: new-feature
User Impact: Review can consider the brand guidance used to build a new surface even when its referenced components or materials did not change.
Problem: Diff-based material matching can miss an unchanged button's guidance when a new checkout uses that button. The host knows which guidance governed the work, but could not supply it to review.
Solution: Add repeatable
ghost review --node <id>to include exact, host-selected guidance and offer referencing checks alongside existing material matches and always-offered checks. Preserve full guidance, material declarations, and selection provenance; unknown IDs fail before reading the diff, and no-flag behavior stays unchanged.No receipts, import scanning, truncation, new dependencies, or starter changes. Explicit selection adds review context; it does not prove applicability, create file matches, or suppress coverage gaps.
Validation:
pnpm run quality:all: passed, repeated by the pre-push hook. 264 tests across 21 files, including 32 new tests, plus builds, typecheck, packed-consumer installation/imports, release checks, workspace checks, and package validation.ghost manifest --format json: exposes repeatable--node <id>; help/manifest behavior covered by tests.pnpm check:terminologyand merge-base diff checks: passed.Changeset: minor added for the new flag and additive packet fields. Existing review JSON/Markdown behavior is unchanged without explicit IDs.
ghost Review:
node packages/ghost/dist/bin.js review --package apps/docs/.ghost --base origin/fix/preserve-guidance-output --format json: packet assembled; no docs-material matches or offered checks. All 12 changed files are outside that package's material coverage, so this is a coverage gap, not a passing grade.File changes (12 files)
.changeset/explicit-review-guidance.mdpackages/ghost/README.mdpackages/ghost/src/commands/command-discovery.tspackages/ghost/src/commands/review-command.tspackages/ghost/src/review/resolve.tspackages/ghost/src/review/review-packet.tspackages/ghost/src/skill-bundle/SKILL.mdpackages/ghost/src/skill-bundle/references/making.mdpackages/ghost/src/skill-bundle/references/schema.mdpackages/ghost/test/review-explicit-packet.test.tspackages/ghost/test/review-node-cli.test.tspackages/ghost/test/review-selection.test.tsScreenshots/Demos: N/A; no visual changes.