[codex] Add Relay gather and scan boundary cleanup#144
Merged
Conversation
chailandau
previously approved these changes
Jun 12, 2026
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.
Why
Ghost has been carrying two related but different jobs under the same mental shape:
scanwas supposed to answer "what is the current fingerprint/package readiness and source-signal state?"Those are different boundaries. Keeping them tangled made
scanfeel like the place for bundle generation, fingerprint package operations, and agent handoff material, even though the original meaning of scan was codebase/fingerprint discovery and readiness. This PR separates those responsibilities soscancan stay small and deterministic, while Relay becomes the explicit route for agent context.What Relay Is For
Relay is the pre-generation context router for Ghost.
The goal is to let a host agent ask one focused question before it edits UI:
Relay resolves the relevant fingerprint stack for that target, selects the most applicable prose, inventory, composition, memory, and active checks, and emits a compact brief with provenance and suggested reads. It is not trying to replace the fingerprint files or become an LLM step. It is the deterministic router that gets the right Ghost context into the agent's hands before the work begins.
In practice, Relay should help agents:
What Changed
ghost scanto readiness, source-signal, and stack-discovery responsibilities.context-bundleemit route soghost emitstays focused on review-command artifacts.ghost relay gatheras the generation-time context route.@anarchitecture/ghost/relaywithgatherRelayContextandformatRelayBrief.Validation
pnpm buildpnpm dump:cli-helppnpm testpnpm check