Skip to content

mark transported materials as untrusted data - #288

Merged
nahiyankhan merged 1 commit into
mainfrom
improve/material-trust-boundary
Sep 6, 2026
Merged

mark transported materials as untrusted data#288
nahiyankhan merged 1 commit into
mainfrom
improve/material-trust-boundary

Conversation

@nahiyankhan

Copy link
Copy Markdown
Collaborator

Category: improvement
User Impact: Agents and embedded hosts can reliably distinguish Ghost guidance from supporting material that must be treated only as source data.
Problem: Ghost transported bundled, repository, and inspected materials with inconsistent trust treatment. Machine-facing consumers could receive material content without a type-level trust guarantee.
Solution: Mark every included or inspected material body as untrusted: true, require that marker whenever transported content is present, and give agent-facing Markdown one compact data-not-instructions warning. Embedded-host documentation now recommends a data or tool-result channel, and inspection uses the same UTF-8 text treatment as pull transport.

Validation:

  • pnpm run quality:all: passed, 226 tests
  • pre-push pnpm run quality:all: passed

Changeset: added as a patch for @design-intelligence/ghost.

ghost Review:

  • ghost check --base origin/main: not available in the current CLI
  • ghost review --base origin/main: not applicable because this repository has no root .ghost/checks/ package
File changes

.changeset/mark-materials-untrusted.md
Records the public package fix.

packages/ghost/README.md
Documents trust metadata and host channel expectations.

packages/ghost/src/commands/pull-command.ts
Applies the data-not-instructions warning to every inlined material.

packages/ghost/src/embed/inspect.ts
Marks successful inspections untrusted and aligns unknown-extension UTF-8 handling with pull transport.

packages/ghost/src/embed/pull.ts
Keeps deduplicated material pointers consistent with the typed transport states.

packages/ghost/src/embed/types.ts
Adds trust metadata to successful inspection results.

packages/ghost/src/ghost-core/material-transport.ts
Requires untrusted: true whenever transported material contains an inlined body.

packages/ghost/src/skill-bundle/SKILL.md
Teaches agents that all material bodies are source data, regardless of origin.

packages/ghost/src/skill-bundle/references/schema.md
Documents the updated pull contract.

packages/ghost/test/cli.test.ts
Covers bundled, referenced, cover, deduplicated, and JSON trust behavior.

packages/ghost/test/embed.test.ts
Covers embedded pull and inspection trust behavior, including unknown file extensions.

Screenshots/Demos: N/A

@nahiyankhan
nahiyankhan marked this pull request as ready for review September 6, 2026 21:48
@nahiyankhan
nahiyankhan merged commit c717031 into main Sep 6, 2026
6 checks passed
@nahiyankhan
nahiyankhan deleted the improve/material-trust-boundary branch September 6, 2026 21:48
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.

1 participant