Prompt library
Each prompt reads credentials by environment-variable name only (POLICYGRAIN_API_KEY), forbids touching .env or committing secrets, states an explicit step order and requires owner confirmation before final publication.
1. Scan and prepare a site with PolicyGrain
Ask before scanning, run checkmydpdp <url> --json, inspect the repository for trackers and forms, propose answers marked agent_inferred via POST /v1/profiles, pause for owner confirmation, generate documents via POST /v1/generations and install the banner snippet.
2. Regenerate after a change
Patch the changed answers via PATCH /v1/profiles/{id}, trigger POST /v1/generations, poll GET /v1/generations/{id}, and update published pages with PUT /v1/documents/{id}/publication once the owner confirms.
3. Install the banner
Verify the domain via POST /v1/sites/{id}/domains/{domain}/verify, create and publish a banner config via POST /v1/sites/{id}/configs and POST /v1/sites/{id}/configs/{n}/publish (n is the numeric version POST /v1/sites/{id}/configs returned), and add the https://cdn.policygrain.com/b/v1/loader.js script to the root layout without blocking strictly necessary scripts.
4. Verify my install
Call POST /v1/sites/{id}/verifications, poll GET /v1/verifications/{id}, and report each signal (seen, not_seen or couldnt_check) with its observed evidence.
5. Export evidence
Select the site and date range, call POST /v1/sites/{id}/evidence-packs, poll GET /v1/evidence-packs/{id}, and save the downloaded archive without logging tokens.
6. Rotate a key
Create a replacement key with the same scopes via POST /v1/keys, switch the deployment secret to it, confirm GET /v1/account succeeds, and revoke the old key with DELETE /v1/keys/{id}.