Skip to content

Emit SVG materials as inspect pointers - #300

Merged
nahiyankhan merged 2 commits into
block:mainfrom
laznuzzi:codex-svg-material-inspect-pointers
Sep 22, 2026
Merged

nahiyankhan merged 2 commits into
block:mainfrom
laznuzzi:codex-svg-material-inspect-pointers

Conversation

@laznuzzi

Copy link
Copy Markdown
Contributor

Why

Ghost currently treats SVG files as inlineable text during pull. That sends the complete SVG source and path data into the generation context, where an agent can truncate, transcribe, or reconstruct the artwork instead of reusing the approved file. This is especially visible with logo assets: Square and Cash App both supply complete SVG marks, but the transport contract makes their path data look like source to reproduce.

Raster images already travel as inspect pointers. SVGs should follow the same visual-asset path so every harness receives the exact reusable file rather than a textual approximation opportunity.

What

  • Classify SVG and other recognized image materials as image inspect pointers during pull
  • Keep SVG path data out of Markdown and JSON pull payloads
  • Emit an explicit inspect path and agent-facing action for visual assets
  • Tell agents to copy or reference the complete inspected asset rather than transcribing its path data
  • Add focused Square- and Cash App-style SVG logo regression coverage
  • Add a patch changeset for @design-intelligence/ghost

How

Material transport now checks the inferred content kind before text inlining. Recognized image MIME types return image inspect-pointer; other binary assets retain binary inspect-pointer, and eligible text materials continue to inline as untrusted reference data.

The pull formatter handles both pointer reasons, using the inferred material kind to distinguish viewable images from other available assets. The installed skill guidance and material references describe the same delivery contract.

Risk

Low to moderate. This intentionally changes SVG pull behavior from inline source to an inspect pointer. Consumers that relied on SVG source appearing directly in a pull packet will need to inspect the supplied path instead. Text materials and non-image binary assets keep their existing behavior.

Testing

  • pnpm build — passed
  • pnpm test — 332 passed, 1 skipped
  • pnpm check — passed
  • Commit hooks (check, format, sadscan, test) — passed
  • Push hooks (check-push-org, ci) — passed
  • Real Square foundation.logo assets — 4/4 SVGs delivered as inspect pointers with no path payloads
  • Real Cash App foundation.identity assets — 7/7 SVGs delivered as inspect pointers with no path payloads

Generated with Codex

nahiyankhan
nahiyankhan previously approved these changes Sep 18, 2026
@nahiyankhan
nahiyankhan self-requested a review September 18, 2026 20:05
Comment thread packages/ghost/test/cli.test.ts Outdated
@nahiyankhan
nahiyankhan merged commit 537379b into block:main Sep 22, 2026
6 checks passed
@github-actions github-actions Bot mentioned this pull request Sep 11, 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