feat(ghost-drift): add describe verb for selective fingerprint reads#51
Merged
nahiyankhan merged 2 commits intomainfrom Apr 23, 2026
Merged
feat(ghost-drift): add describe verb for selective fingerprint reads#51nahiyankhan merged 2 commits intomainfrom
nahiyankhan merged 2 commits intomainfrom
Conversation
`ghost-drift describe` prints a section map of fingerprint.md (frontmatter range, body sections, per-dimension decision blocks) with line ranges and token estimates. Lets host agents load only the sections they need instead of the whole file — typical fingerprints run 3–5k tokens with 60–80% inside # Decisions, and most reviews don't need every dimension. Review and generate skill recipes now open with `describe` and teach a recall safety rule: when uncertain which decisions are relevant, load the whole `# Decisions` block — cheaper than missing a constraint. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
ghost-drift describeprints a section map offingerprint.md(frontmatter range, body sections, per-dimension decision blocks) with line ranges and token estimates, so host agents can selectively load only the sections they need instead of loading the whole file.review.md,generate.md) now open withdescribeand teach a recall safety rule: when uncertain which decisions are relevant, load the entire# Decisionsblock — typically 2–4k tokens, cheaper than missing a constraint.layoutFingerprint,formatLayout,FingerprintLayout,FingerprintLayoutSection.Why
Typical fingerprints run 3–5k tokens, and the
# Decisionsblock alone is usually 60–80% of that. Most agent reads (a PR review, a single-component generation) don't need every dimension.describeis the deterministic answer to "what's in this file and where" — line ranges are 1-indexed and inclusive, dropping straight into a Read tool'soffset/limit = end - start + 1.A deliberate non-decision: no
[partition]hints next to decision sections. A heuristic dimension→partition mapping that looks authoritative would cause agents to skip relevant decisions; the recall safety rule in the recipe is the right place for that judgement, not the deterministic primitive.Sample output
Run against
packages/ghost-ui/fingerprint.md:Test plan
pnpm exec vitest run packages/ghost-drift— 182 tests pass (7 new intest/fingerprint/layout.test.ts)pnpm check— biome + typecheck + file-size + docs-frontmatter + cli-manifest all cleanjust build-ui— docs site builds; newInspection — describesection renders with<CliHelp command="describe" />from auto-generated manifestpackages/ghost-ui/fingerprint.md(cli + json formats)review.md/generate.mdis appropriate for the recipe's tone