Kjeks AI Reviewer
Suggests a category and metadata for each unreviewed tracker using WordPress 7's core AI client. Advisory only — you confirm every suggestion.
101 Getting started
Reviewing a large tracker inventory by hand is slow. The AI Reviewer proposes a category and metadata for each unreviewed tracker so triage becomes a quick yes/no instead of research.
Requirements
- WordPress 7.0+ — it uses the core AI client (
wp_ai_client_prompt). - The Kjeks core plugin, active. Without it the add-on only shows an admin notice.
Install & activate
Download the latest
kjeks-ai-reviewer.zip
and upload it under Plugins → Add New → Upload Plugin, then activate it
(network-activate on multisite). It adds no menu of its own — instead it appears as
a tab on the existing Cookie Consent screen. Updates arrive
automatically from GitHub releases via
plugin-update-checker.
Run a review
- Open Cookie Consent and switch to the AI Reviewer tab.
- Trigger a suggestion pass for the unreviewed trackers.
- For each suggestion, read the rationale and confidence, then Accept or Reject.
reviewed and applies the
category. Nothing is changed until you confirm it.
201 How suggestions work
Database first, AI second
The reviewer first looks the tracker up in a bundled copy of the Open Cookie Database. A confident, complete match avoids an AI call entirely. Only when that misses does it prompt the AI model.
What each suggestion contains
| Field | Notes |
|---|---|
category | One of necessary, preferences, analytics, marketing. |
party | first or third. |
provider, purpose, retention | Enriched metadata for the cookie declaration. |
documentation_url | Reference link, when known. |
confidence | How sure the model is. |
rationale | Short explanation you can sanity-check. |
model, grounded_by, generated_at | Provenance: which model, what it was grounded on, and when. |
How the category is chosen
The reviewer is deliberately conservative: it picks
necessary only when an item is clearly essential (session, auth,
security), and prefers marketing when unsure. Any
label it can't map to a Kjeks category also falls back to marketing —
never necessary. So genuinely third-party resources (e.g. Google
Fonts, Gravatar) usually land on marketing — a safe default for a
consent tool, not a bug.
You keep the final say: Accept takes an optional category override, so you can reclassify a suggestion (or self-host the resource to make it first-party) before confirming.
reviewed on their own — an administrator accepts each one.
301 REST, cron & internals
The AI call
The reviewer asks the core client for a strict JSON answer with a small token budget:
wp_ai_client_prompt( $prompt )
->using_max_tokens( 400 )
->generate_text();
REST API
All routes live under kjeks-ai/v1 and require manage_network
on multisite, or manage_options on a single site.
| Method & route | Body |
|---|---|
GET /state | Current pending trackers and their suggestions. |
POST /suggest | Optional boolean force to regenerate. |
POST /settings | Required boolean cron_enabled. |
POST /accept | Required id, optional category override. |
POST /reject | Required id. |
POST /wp-json/kjeks-ai/v1/accept
{
"id": "_ga",
"category": "analytics" // optional override of the suggestion
}
Weekly cron (opt-in)
A scheduled job, kjeks_ai_weekly_suggest, can pre-generate suggestions
for new trackers. It is disabled by default — enable it by posting
cron_enabled: true to /settings (stored in
kjeks_ai_settings).
Options
| Option | Holds |
|---|---|
kjeks_ai_suggestions | Suggestions keyed by tracker ID. |
kjeks_ai_settings | Add-on settings (currently cron_enabled). |
Admin integration
The tab is injected client-side: the add-on enqueues on
toplevel_page_kjeks-network and registers itself through the
kjeks.networkAdminTabs JavaScript filter — no separate admin page.