=== Pre-Trip Compliance ===
Contributors: kesey
Tags: compliance, marketing, healthcare, editor, regulated
Requires at least: 5.3
Tested up to: 7.0
Requires PHP: 7.2
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Screen a post against Pre-Trip's source-cited compliance rulesets for regulated health marketing, in the editor, before you publish.

== Description ==

Pre-Trip Compliance puts a compliance check in your WordPress editor. Write your
post, pick the state and vertical you are marketing into, and run the check. You
get a pass, or a fix list where each flag quotes the exact sentence, names the
rule, and says what to change, with the statute cited.

It is built for marketing agencies and in-house teams shipping into regulated
health verticals (ketamine, psilocybin, cannabis, addiction treatment, and
more). The rulesets are curated and source-cited, and a ruleset that is pending
review, past its review clock, or covering a jurisdiction with no adopted rules
fails closed: it flags rather than passing, and the result says why.

**Your draft is scanned, not stored.** The plugin sends the copy to the Pre-Trip
API to run the check and nothing about it is retained. The only thing recorded
is aggregate metadata (the verdict shape and the rule ids), tied to your API key
for your own usage view. Never the copy itself.

**Your API key stays on your server.** The plugin holds the key in WordPress and
proxies every scan through your site, so the key is never exposed to the
browser.

This plugin requires a Pre-Trip account and an API key. Pre-Trip is a screen,
not legal advice. Counsel decides; this helps you arrive prepared.

== Installation ==

1. Upload the `pretrip-compliance` folder to `/wp-content/plugins/`, or install
   the zip through Plugins, Add New, Upload Plugin.
2. Activate the plugin.
3. Create an API key in your Pre-Trip account at https://scan.kesey.agency under
   API keys.
4. Go to Settings, Pre-Trip Compliance, and paste your API key. Optionally set a
   default state, vertical, and asset type.
5. Open any post or page. In the Pre-Trip compliance box, confirm the state and
   vertical and click Run Pre-Trip check.

== Frequently Asked Questions ==

= Do I need a Pre-Trip account? =

Yes. Create one at https://scan.kesey.agency and generate an API key under API
keys. Keyed scans spend your account's Bus Pass or token balance.

= Is my post content stored anywhere? =

No. The copy is processed in memory to run the check and is not stored by
Pre-Trip. See https://kesey.agency/trust.

= Where does my API key live? =

In your WordPress database, read only by the server when it calls the API. It is
never sent to the browser or embedded in any page.

= Does a pass mean my post is legally compliant? =

No. A pass means the copy cleared the rulesets that ran, at that time. It is a
screen, not legal advice or a certification. You and your counsel remain
responsible for what you publish.

== Privacy ==

This plugin relies on the Pre-Trip service, operated by Gulf Ice Solutions LLC
(doing business as Kesey Agency). To run a check, the plugin sends the post copy
you choose to check, plus the state, vertical, asset type, and covered-entity
flag, to the Pre-Trip API at the base URL you configure
(https://scan.kesey.agency/api/v1 by default). The copy is not stored by
Pre-Trip. Aggregate scan metadata is recorded against your API key for usage and
billing.

Your use of the Pre-Trip service through this plugin is subject to the Pre-Trip
Terms of Service (https://kesey.agency/terms) and Privacy Policy
(https://kesey.agency/privacy). A plain-language overview of how data is handled
is at https://kesey.agency/trust.

== Screenshots ==

1. The compliance check in the post editor: a flagged verdict, with each finding quoting the exact line, naming the rule, and citing the statute.
2. Settings: paste your API key and set a default state, vertical, and asset type. The key is stored on your server, never sent to the browser.

== Changelog ==

= 1.0.0 =
* First release: editor compliance check via the Pre-Trip API, server-side key
  proxy, verdict and cited fix list, block and classic editor support.
