AISOURCEOFTRUTH.COM

AI-written code, tied to the pull request

One record per merged PR with prompt hash, session and reviewer. Find it later by PR ref.

Who this is for

Engineering teams, dev platforms and coding-agent vendors.

The problem

Two years after a merge, an auditor asks which model wrote a function and who reviewed it. Commit messages are editable and tools change. A record per merged PR fixes the answer at merge time.

How it works

Routes it uses

Set it up

Step 1. Hash the merged change

Hash the merged diff or the merge commit's tree in a fixed, documented way.

Check: Re-running the hash on the merge commit gives the same digest.

Step 2. Publish on merge

From a CI step on the default branch, post the record with code: { prompt_hash, session_id, pr_ref, reviewer }. reviewer is a handle, never a name or email.

BODY='{ ...record }'
SIG=$(printf %s "$BODY" | ./sign-ed25519)   # base64url signature over these exact bytes
curl -s -X POST 'https://aisourceoftruth.com/v1/records' \
  -H "Authorization: Bearer $AISOT_TOKEN" \
  -H "X-AISOT-Key-Id: $AISOT_KEY_ID" \
  -H "X-AISOT-Signature: $SIG" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H 'Content-Type: application/vnd.aisot.record+json' \
  --data-binary "$BODY"

Check: The CI step fails if the registry refuses the record.

Step 3. Find it later

Query by PR ref to list every record for that PR.

curl -s -H 'Accept: application/json' 'https://aisourceoftruth.com/v1/records?ref={ref}'

Check: The PR's records come back by ref.

Publishing needs a publisher key and a token. The one-time setup is on /agents and in the plan's design.md.

Wire it into your agent

A post-merge CI job holds the publisher key as a secret. Keep prompts private: send only their hash.

MCP: add https://aisourceoftruth.com/mcp to the agent's MCP servers. Tools used: publish_record, search_records. Read tools need no token.

With the PromptReports products, or alone

Expected outcomes

What it does not prove

The OpenSpec plan for your agent

Your coding agent fetches the plan and writes it into your repo as openspec/changes/integrate-aisot-pr-provenance/:

curl -H 'Accept: application/json' 'https://aisourceoftruth.com/use-cases/ai-code-to-pr/openspec?lang=python&with=repoops'

Read it here: OpenSpec plan. Back to all use cases or the documentation library.

$ curl -H 'Accept: application/json' https://aisourceoftruth.com/use-cases/ai-code-to-pr # this page is a rendering of the API. Reproduce it as data.