How Inspect Works

Inspect is how PerfectDocRoot lets you verify what was sent to the modelwithout exposing prompts, system instructions, or chain-of-thought.

Think of Inspect as a receipt, not a transcript.

It provides cryptographic proof of execution inputs while keeping sensitive content private.

What Inspect Shows

Inspect provides:

  • Where messages came from (client vs server)
  • How many messages were used
  • A cryptographic hash that uniquely represents those messages

What Inspect Does NOT Show

Inspect does not include:

  • Prompt text
  • System instructions
  • Chain-of-thought
  • Model reasoning or hidden context

This separation is intentional and fundamental to PerfectDocRoot’s governance model.

Why Inspect Exists

Inspect solves a hard problem in AI systems:

How can you verify execution inputs without revealing sensitive prompts?

By hashing the exact message structure, Inspect allows developers to:

  • Prove reproducibility
  • Detect execution drift
  • Compare runs safely
  • Audit behavior without leakage

When Inspect Appears

Inspect appears only when it is explicitly safe and intentional.

Guided workflows

  • Inspect appears only when messages are built server-side
  • Client-provided message paths do not emit Inspect metadata

Developer execution (/turns/run)

  • Inspect may appear during dry-run execution
  • Inspect may appear when message inspection is explicitly requested

If Inspect is not present, it means the system did not enter an inspectable execution path.

Example Inspect Metadata

{
  "inspect": {
    "messages_source": "server",
    "messages_count": 7,
    "messages_hash": "1542b2edac22ee9e1acb45aed95bca78a77ffa34c3a3b4550c476f160195db1c"
  }
}

This hash uniquely represents the messages sent to the model — without revealing their contents.

How the Hash Is Computed

Inspect uses a deterministic, reproducible rule:

  1. Messages are encoded as canonical JSON
  2. The JSON string is hashed using SHA-256

If two executions produce the same hash, they used the same messages.

Reproducing the Hash

PHP Example

This example matches the implementation used by PerfectDocRoot.

$json = wp_json_encode(
  $messages,
  JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE
);

$hash = hash('sha256', $json ?: '[]');

WP-CLI Example

You can also verify Inspect hashes using the built-in CLI tooling:

wp pdr gc-test-prompts --user=1

Example output:

turn1_messages_hash=1542b2edac22ee9e1acb45aed95bca78a77ffa34c3a3b4550c476f160195db1c

What Inspect Will Never Do

Inspect will never:

  • Reveal hidden prompts
  • Expose chain-of-thought
  • Log private content without consent

Inspect exists to build trust through verification, not surveillance.

Summary

Inspect gives you:

  • Transparency without leakage
  • Reproducibility without exposure
  • Governance without fragility

That’s why Inspect is metadata — and why it matters.