Skip to content

[codex] Add Relay gather and scan boundary cleanup#144

Merged
nahiyankhan merged 4 commits into
mainfrom
codex/scan-boundary-relay-gather
Jun 12, 2026
Merged

[codex] Add Relay gather and scan boundary cleanup#144
nahiyankhan merged 4 commits into
mainfrom
codex/scan-boundary-relay-gather

Conversation

@nahiyankhan

@nahiyankhan nahiyankhan commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Why

Ghost has been carrying two related but different jobs under the same mental shape:

  • scan was supposed to answer "what is the current fingerprint/package readiness and source-signal state?"
  • generation-time handoff needed to answer "what product-surface context should an agent carry into this specific target?"

Those are different boundaries. Keeping them tangled made scan feel 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 so scan can 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:

ghost relay gather apps/checkout/review/page.tsx

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:

  • start from product-surface intent rather than post-hoc review feedback
  • avoid reading the entire fingerprint package when a narrower target is enough
  • preserve provenance across root and nested fingerprint stacks
  • understand which refs and checks are selected, and which files to read next if the task widens
  • keep generated/cache source signals subordinate to the canonical fingerprint layers

What Changed

  • Restores ghost scan to readiness, source-signal, and stack-discovery responsibilities.
  • Moves fingerprint package operations onto the fingerprint public surface.
  • Removes the old context-bundle emit route so ghost emit stays focused on review-command artifacts.
  • Adds ghost relay gather as the generation-time context route.
  • Adds @anarchitecture/ghost/relay with gatherRelayContext and formatRelayBrief.
  • Updates docs, skill guidance, generated CLI manifest, and tests around the new public shape.

Validation

  • pnpm build
  • pnpm dump:cli-help
  • pnpm test
  • pnpm check
  • pre-push hook: build, check, test

@nahiyankhan nahiyankhan requested a review from chailandau June 12, 2026 19:37
chailandau
chailandau previously approved these changes Jun 12, 2026
@nahiyankhan nahiyankhan marked this pull request as ready for review June 12, 2026 20:05
@nahiyankhan nahiyankhan merged commit bb8ddd5 into main Jun 12, 2026
6 checks passed
@github-actions github-actions Bot mentioned this pull request Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants