=== KineticCopy™ ===
Contributors: kineticbrain
Tags: ai, copywriting, content generator, ai writing, seo, ai content, content marketing, writing assistant, content calendar, editorial calendar, blog, marketing
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 2.6.56
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

KineticCopy™ - AI copywriting Studio for WordPress. Generate posts, pages, emails and more with the Anthropic Claude API, tone blending and brand voice.

== Description ==

KineticCopy™ connects the Anthropic Claude API to your WordPress admin (bring your own API key). The Copywriting Studio creates high-quality content in 43 formats: blog posts, landing pages, sales pages, product descriptions, email sequences, social posts, FAQs, testimonials, and more. KineticCopy is an independent plugin and is not affiliated with, endorsed by, or sponsored by Anthropic.

Key features:

* **Tone blending** - Combine up to 4 tones (Professional, Conversational, Bold, etc.) for unique voice combinations
* **Brand voice profiling** - One scan builds a writing DNA profile: sentence patterns, vocabulary, emotional register, humor style, formatting habits
* **Persona targeting** - Detailed reader profiles shape how your copy speaks and what objections it addresses
* **Web research** - Optional research integration via Google, Bing, Brave, or Perplexity APIs
* **Fact-checking mode** - All claims verified and cited with sources
* **AI Search Optimization** - Content optimized for Google AI Overviews, ChatGPT, Perplexity with E-E-A-T signals and schema markup
* **Content Library** - Save and organize prompts and generated content
* **Built-in AI chat** - "Brain" assistant critiques drafts, suggests improvements, and answers questions about your site
* **Calendar integration** - Sync with KineticLaunch for campaign planning and content scheduling

Free forever tier includes 10 content types and 5 Writing DNA generations per month. Upgrade for all 43 formats, unlimited DNA generations, and advanced features.

Bring Your Own Key (BYOK) bypasses all credit costs - or use the credit system for convenience.

== External services ==

This plugin relies on third-party services. It does not contact any of them until you actively use the feature that needs it. Nothing is sent in the background.

**Anthropic Claude API (api.anthropic.com)**
Used to generate content whenever you run the Copywriting Studio, the Brain chat assistant, or a Writing DNA / Site Intelligence scan. The data sent is the prompt you write plus the brand, persona, and tone context you have configured in the plugin, and (for a Site Intelligence scan) the text of the posts you choose to analyze. This requires your own Anthropic API key (BYOK). Requests are sent only when you click generate, chat, or scan.
Terms: https://www.anthropic.com/legal/consumer-terms - Privacy: https://www.anthropic.com/legal/privacy

**Optional web-research providers**
Contacted ONLY if you turn on web research in Settings and supply that provider's own API key. When enabled, the search query you provide is sent to the provider you selected so it can return results that inform the generated content. You choose one of:
* Google Programmable Search (Custom Search JSON API, www.googleapis.com) - Terms: https://policies.google.com/terms - Privacy: https://policies.google.com/privacy
* Bing Web Search (api.bing.microsoft.com) - Terms: https://www.microsoft.com/servicesagreement - Privacy: https://privacy.microsoft.com/privacystatement
* Brave Search API (api.search.brave.com) - Terms: https://brave.com/terms-of-use/ - Privacy: https://brave.com/privacy/browser/
* Serper (google.serper.dev) - Terms: https://serper.dev/terms - Privacy: https://serper.dev/privacy-policy
* Perplexity Sonar (api.perplexity.ai) - Terms: https://www.perplexity.ai/hub/legal/terms-of-service - Privacy: https://www.perplexity.ai/hub/legal/privacy-policy
* DuckDuckGo (duckduckgo.com) - used as a keyless fallback for basic lookups - Terms: https://duckduckgo.com/terms - Privacy: https://duckduckgo.com/privacy

**KineticBrain backend (copy.kineticbrain.ai and launch.kineticbrain.ai)**
Used to (a) validate your KineticCopy license key, (b) check your credit balance and route generation through the credit proxy if you use credits instead of BYOK, and (c) optionally sync brand strategy and calendar content from a connected KineticLaunch account when you trigger a sync or calendar push. The data sent is your license key, your site URL, and - for credit generation or content sync - the prompt or content involved. This is contacted on license activation, credit checks, and manual sync/push actions.
Terms: https://copy.kineticbrain.ai/terms - Privacy: https://copy.kineticbrain.ai/privacy - https://kineticbrain.ai/privacy

== Installation ==

1. Upload the `kineticcopy` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Go to Settings > KineticCopy to configure your AI provider (Anthropic, KiloCode, or OpenRouter)
4. Save your API key (keys are encrypted with AES-256 before storage)
5. Start generating content in Copywriting Studio

For detailed setup, see the in-plugin Manual tab under Settings.

== Frequently Asked Questions ==

= Do I need an API key? =

Yes. KineticCopy is bring-your-own-key (BYOK): you supply your own Anthropic Claude API key, which is encrypted with AES-256 before storage and used to call the Claude API directly. Alternatively you can use the optional credit system, which routes generation through the KineticBrain proxy so you do not need your own key. Either way, an Anthropic key or KineticCopy credits are required to generate content.

= Does this send my content to third parties? =

Only the services you actively use, and only when you use them. See the "External services" section above for the full list: the Anthropic Claude API for generation and chat, optional web-research providers (only if you enable research and add a key), and the KineticBrain backend for license validation, credits, and optional KineticLaunch sync. Nothing is sent in the background.

= Does it cost money to generate content? =

KineticCopy is free forever. The free tier includes 10 content types and 5 Writing DNA generations per month. You can either:

* Bring Your Own API Key (BYOK) - connect your own Claude API key, pay Anthropic directly
* Use credits - purchase credit bundles that are consumed per generation

No trial, no subscription required. Upgrades unlock all 43 formats and unlimited DNA generations.

= What data does the plugin send, and where? =

KineticCopy sends data to external services only when you actively use its features:

**Content Generation (every request):**
* BYOK users: Your prompt and settings are sent directly to Anthropic's Claude API (api.anthropic.com)
* Credit users: Your prompt and settings go to the KineticCopy proxy at launch.kineticbrain.ai, which forwards to Anthropic and deducts credits

**Site Intelligence Scan (manual trigger):**
Your existing post content (up to 20 posts by default) is sent to build your brand voice profile. BYOK goes direct to Anthropic; credits route through launch.kineticbrain.ai.

**Web Research (optional, when enabled):**
Research queries go to your chosen provider: Google Custom Search, Bing Search, Brave Search, Perplexity Sonar, Serper, or DuckDuckGo as fallback.

**Brand Sync (manual trigger):**
Pulls brand strategy from KineticLaunch when you initiate a sync.

**Calendar Push/Webhook:**
Drafts are POSTed back to KineticLaunch webhook URLs you configure.

**Brain Chat (when used):**
Messages are sent to the Claude API. If Perplexity fact-checking is enabled, queries are also sent to Perplexity.ai.

Privacy policy: https://kineticbrain.ai/privacy

= Which content types are free? =

Free tier: Blog Post, Social Post, Email Body, LinkedIn Post, SEO Blog Post, Email Sequence, How-To Guide, About Page, Product Description, and one custom snippet type.

Upgrade unlocks all 43 formats including Sales Pages, White Papers, Case Studies, Landing Pages, Press Releases, and more.

= Does it work with my page builder? =

Full integration with Breakdance (premium). Standard WordPress editors (Gutenberg, Classic) are supported for all users. Generated content works in any theme.

= What models are supported? =

Claude 3.5 Sonnet (default), Claude 3.7 Sonnet, Claude 4 Sonnet, and Claude 4 Opus. Haiku is used for short-form content and greetings. Model selection is automatic based on content type, or override manually.

= How does brand voice work? =

The Site Intelligence scan reads your existing content to build a writing DNA profile: voice fingerprint, sentence patterns, vocabulary preferences, formatting habits, and more. This profile is injected into every generation request.

== Screenshots ==

1. Copywriting Studio - Generate AI content with tone blending and research options
2. Brain Chat - AI assistant that critiques drafts and suggests improvements
3. Content Calendar - Visual calendar for tracking and scheduling generated posts

== Changelog ==

= 2.6.56 =
- Fixed: "Push All to Copy" from KineticLaunch™ no longer returns 400 error for calendar entries that have a brief but no generated content yet. KC now accepts entries without content_body and uses the brief for AI generation inside WordPress.
- Fixed: KineticLaunch™ calendar push now sends the entry brief (description) as the generation prompt when no content has been generated yet, so KC's auto-generate works correctly on first push.

= 2.6.55 =
- Fixed: Calendar entries pushed from KineticLaunch now land on their correct scheduled dates instead of all piling up on today. Both standalone entries and campaign entries now have their date set properly.

= 2.6.54 =
- Fixed: Calendar Push (Launch → KineticCopy) no longer creates duplicate posts — entries are matched by their KineticLaunch ID and updated in place.
- Fixed: "Sync from Launch" no longer reports a false conflict for posts imported via Push.
- Fixed: "Sync from Copy" (formerly KC Sync) now returns only KineticLaunch-imported entries, preventing pile-up on the first calendar day.
- UI: Both calendar sync buttons are now icon-only with tooltips.

= 2.6.53 =
- Fixed: Calendar entries synced from KineticLaunch now show the Prompt / Brief (previously only the Image Prompt appeared). Re-sync from Launch to backfill existing entries.
- Added: Manual now includes a "Calendar Sync with KineticLaunch" guide (Settings → Manual) with the per-project secret setup steps.

= 2.6.52 =
- Changed: KineticLaunch settings unified — merged Sync, Calendar Sync, and Calendar Push into one card under Settings → Integrations. Calendar subsection only visible to Calendar-tier users.

= 2.6.51 =
- Fix: Test Connection button no longer fails after page reload when the secret field shows placeholder dots. Now shows a clear "re-enter secret to re-test" message.
- Improved: Connected Platforms status pills are now green (connected) or red (disconnected) outlined pills instead of solid yellow badges.

= 2.6.50 =
- Fix: Calendar push to KineticLaunch now correctly reads the configured project ID (was reading a legacy option key that the settings UI no longer writes, causing pushes to send an empty project_id). Pull header standardised to x-webhook-secret.

= 2.6.49 =
- Improved: Brain chat panel now uses a soft shadow only (no border) for a cleaner edge.

= 2.6.47 =
- Improved: Brain chat now mirrors the KineticBrain design - ink header and bubble, the animated Brain Orb identity (in red), near-white chat area, non-italic greeting, your messages in dark red on white, rounded corners, and a defined panel border.

= 2.6.43 =
- Change: Substack publishing (send to draft by email) is temporarily disabled while we build a more reliable publishing method. Writing and generating Substack content is unaffected. The Substack settings section and the Substack button in the Library are hidden for now.

= 2.6.42 =
- Fix: Settings page tabs (License, Upgrade, Manual, etc.) would not switch, and the lower part of the Settings page could be missing. Two separate issues were resolved: a fatal error in the Upgrade tab (an inline-SVG helper was not always available) that cut the page short, and a name collision in the admin script that stopped the tab handler from loading. Settings now renders fully and every tab switches correctly.

= 2.6.41 =
- New: Social and Hooks craft module. Four new content types - Hook Pack, Instagram caption, X/Twitter thread, and TikTok/Reels script - plus a 10-pattern hook taxonomy, a give-first method, platform-native structures, and an honesty-first marketing guard (no fake scarcity, no fabricated proof).
- Fix: social and LinkedIn posts now correctly receive social-channel calibration. They previously fell through to the prose path.

= 2.6.40 =
- Compliance: full output escaping and i18n pass (WordPress Plugin Check clean), readiness for the WordPress.org plugin directory.
- Privacy: background license/credit/scan tasks are now gated so a fresh install makes no external calls until you add a key, license, or enable a feature.
- Bundled FullCalendar and fonts locally (no external CDN).

= 2.6.39 =
- New: delete calendar entries and campaigns directly from the Content Calendar; Next 7 Days cards now open the quick-edit slideout.
- New: deleting a campaign can optionally move all its posts to Trash.
- Fix: KineticLaunch-synced campaigns can now be deleted.

= 2.6.38 =
- Change: bundled FullCalendar and fonts locally (no external CDN).
- Docs: added external-services disclosure for wordpress.org. (no functional change to generation)

= 2.6.37 =
- Change: Upgrade tab auto-unlock notice now says 'Lifetime Deal owner' / 'Launch T2+ LTD includes KineticCopy Premium' (was 'subscriber').

= 2.6.36 =
- New: Delete campaigns from the calendar Manage Campaigns panel.
- Change: Upgrade tab now shows Solo, Studio, and Agency plans (Enterprise available on request).

= 2.6.35 =
- Fix: Settings page tabs after API Keys (Research, Permissions, Security, License, Upgrade, Connect Claude, Manual) rendered blank due to an unclosed div in the API Keys panel. All tabs now display correctly.

= 2.6.34 =
- Fixed: hardened the Settings > Upgrade plan cards so the license-manager lookups (get_license_id / get_license_email) can never halt page rendering. The two static calls are now guarded with method_exists and an explicit string cast, so on a mixed-version or opcache-stale deploy the Upgrade buttons degrade gracefully to the direct Stripe payment links instead of throwing a fatal that blanks the tabs after API Keys. Preserves the upgrade-checkout flow (POST to /api/copy/checkout with tier, billing, license_id, email) and all other tab content unchanged

= 2.6.33 =
- UX: Content Library upgrade screen for free users now matches the Content Calendar upgrade screen. It shows a frosted, see-through backdrop over a hinted snippet-library mockup, with a white upgrade card that has a soft shadow and no left-border accent (identical frost and card styling to the Calendar lock overlay)

= 2.6.28 =
- Fixed: posts imported via Sync from Launch now appear in all FullCalendar views (monthly/weekly/list), not just the week strip. Root cause: sync_entry_from_launch was setting _kc_launch_source but not _kc_source; the FullCalendar feed filters on _kc_source EXISTS in KineticCopy-only mode, so imported posts were invisible (FC 71684466)
- UX: Sync from Launch button moved from the filter bar into the calendar page header, next to + New Entry and Campaigns
- Settings > Integrations: renamed Calendar Push card to Calendar Push (from Launch, webhook) with clearer description; renamed Sync card to Calendar Sync (from Launch) with explaining sentence; reordered so Calendar Sync appears before Calendar Push; integration cards now laid out in a responsive CSS grid (2 col desktop, 3 col wide, 1 col mobile)
- Settings > Integrations: Test Connection error message now explains that the test hits this site's own REST endpoint (not KineticLaunch), and gives actionable guidance for the common causes of failure (security plugin blocking REST, permalink mismatch)

= 2.6.27 =
- Added: conflict detection on Sync from Launch - if Launch has new data AND the local WP draft was edited after the last sync, the overwrite is blocked and the user is asked to confirm before the draft is replaced (FC 71684466)
- Added: _kc_launch_updated_at post meta (Launch entry timestamp, null-safe) and _kc_launch_synced_at (timestamp of the last successful import) written on every create/update
- Added: skipped_unchanged count in sync response - entries where Launch has not changed since the last pull are skipped without a write
- Added: force_ids param on kc_sync_from_launch AJAX action - allows the JS confirm dialog to re-POST with the user-consented entry ids and overwrite only those posts

= 2.6.26 =
- Added: campaign linking on Sync from Launch - when a pulled entry carries launch_campaign_id, the matching kc_campaigns record is found (by id first, name fallback) or created automatically, and the post is linked to it exactly as manually-created entries are (FC 71684466 + FC 71605892 JOB 1 receiver half)
- Added: push receiver now stores _kc_launch_entry_id on pushed posts (same dedupe key as the pull path), so a post created via push is recognised as the same entry if later re-imported via pull
- Added: push receiver campaign upsert now matches by launch_campaign_id first (name fallback) using the shared upsert helper, eliminating the name-only match that could create duplicates when a campaign is renamed in Launch

= 2.6.25 =
- Added: Sync from Launch - pull AI-generated calendar entries from KineticLaunch into WordPress as draft posts, pre-loaded with generation prompts and image prompts (FC 71684466)
- Added: KineticLaunch URL and Project ID fields in Settings > Integrations > Sync from Launch
- Added: deduplication on sync - entries matched by Launch entry ID update the existing draft instead of creating duplicates

= 2.6.24 =
- Fixed: calendar entries no longer appear one day later than their actual date for browsers ahead of the site timezone (events are now placed by date only, with no timezone conversion)

= 2.6.23 =
- Fixed: dragging a calendar entry to a future date now sticks (WordPress was silently resetting unscheduled drafts back to today while reporting success)
- Fixed: the action buttons under generated Studio content now wrap inside their card instead of overflowing it

= 2.6.22 =
- Added: manual Research panel in Studio - tick Enable web research, type a query, click Search the web, and check real sources (titles, snippets, links) before you write; shows a friendly setup hint when no search provider is configured
- Improved: drafts created through the agent REST endpoint and the MCP connector based on an existing post are now tagged as rewrite siblings, so they appear in the publish-time archive offer and the 30-day cleanup nudge just like Studio drafts

= 2.6.21 =
- Fixed: research and fact-checking now actually fetch real web sources and cite them (before, citations were requested with no sources behind them)
- Added: no-fabrication safety - with no sources available, the AI is told not to invent citations, statistics, or URLs
- Security: web research is sanitized and treated as untrusted reference data, hardened against hidden prompt-injection and malicious content from the internet

= 2.6.20 =
- Fixed: the Create New Persona button in Studio now opens its modal (it was wired to IDs that did not exist)
- Fixed: the View all snippets button in Studio now opens the snippets library (same dead-control cause)

= 2.6.19 =
- Added: Brain Planning mode - toggle the calendar icon in Brain chat and Brain reads your content calendar, proposes a dated content plan as a table, and adds the rows you select as calendar drafts (always drafts, never published, nothing generates automatically)
- Added: Fix It - when Brain critiques the post you are editing, an Apply as draft button creates a sibling draft with the rewrites applied (your original is never changed)
- Added: cleanup offers for rewrite drafts - after publishing one version you can archive the others, and unused 30-day-old rewrite drafts get a bulk archive nudge (archive = trash, always your click)
- Added: Library channel tabs (All / Blog / Email / Social / Web copy / Other) to filter your saved content by channel
- Added: Create Post and Create Page buttons in the Library preview, turning any saved copy into a draft of the right type
- Improved: Studio shows a clean, simple form - persona, audience, keywords, length, fact-checking, AI search and model now live in one Advanced options section (everything still works the same)
- Fixed: the Studio web research checkbox and Must Include Keywords field were not being read by the generator (form IDs did not match the script)

= 2.6.18 =
- Added: featured image picker in the calendar slideout (choose from the media library, set on save)
- Added: Publish now and Schedule buttons in the slideout (explicit confirm; schedule uses the entry's calendar date)

= 2.6.17 =
- Added: calendar entry slideout - click any entry to edit title, topic, prompt, image prompt, notes, date and campaign without leaving the calendar
- Added: Send to Studio - hand a calendar entry's prompt to the Studio; generating and saving there updates the same calendar entry instead of creating a new post
- Added: copy button for the image prompt (synced from KineticLaunch when available)
- Added: drag-and-drop rescheduling in the Next 7 Days strip, matching the month grid
- Added: calendar edits are recorded in the audit log

= 2.6.16 =
- Added: a Refine box in Studio - type what to change and re-run on the current draft plus your feedback, keeping the same settings

= 2.6.15 =
- Fixed: settings no longer reset when you update the plugin (the activator now merges instead of overwriting)
- Added: a manual Clear button for generated content in Studio
- Added: restored content scrolls into view with a hint to Clear before starting fresh
- Added: Save as Page in Studio, as a tick box and a button, alongside Save as Draft Post

= 2.6.14 =
- Improved: strategic calibration step (awareness stage, market sophistication, single action, one promise) for persuasion-heavy content types
- Improved: universal specificity-and-proof standard - concrete details replace vague claims, real proof placeholders replace fabricated stats
- Improved: per-type anti-patterns added to sales pages, product descriptions, emails, CTAs, ads, landing pages and more
- No extra generation cost; same single call with sharper prompts

= 2.6.13 =
- Security: schema markup output is now JSON-validated and tag-escaped (closes a stored-XSS vector)
- Security: the content calendar premium gate is now enforced server-side on all calendar endpoints
- Security: added direct-access guards to 26 files and capability checks to 11 AJAX handlers
- Security: HTTPS for REST and MCP is waived only via an explicit dev constant, never under WP_DEBUG
- Security: generated content in the page builder and third-party research results are now escaped
- Reliability: the weekly site rescan now actually runs, audit log is pruned daily, all crons clear on deactivation
- Reliability: proxy generation timeout scales with job size, fixing false network errors on long jobs
- Maintenance: cleaner uninstall, removed dead code, i18n fixes

= 2.6.12 =
- Fixed: Brain greets you on every new conversation, not just the first one per browser session
- Fixed: Copy Schema JSON-LD button no longer disappears while schema content is still on screen
- Changed: Generation prompts now forbid stapling raw keyword strings into prose
- Changed: Calls to action must lead with time-to-value

= 2.6.11 =
- Fixed: Brain truly reads the full post (up to 24,000 characters)
- Fixed: Long generations no longer timeout - session extends to 10 minutes

= 2.6.10 =
- Fixed: Schema no longer lands in post content
- Fixed: Editor metabox no longer claims "Awaiting generation" on posts with content
- Added: Drafts get an automatic excerpt

= 2.6.9 =
- Fixed: Draft post titles now come from the content's own headline
- Added: "Save as draft post when done" checkbox in Studio
- Added: Tone Templates ungated to free tier

= 2.6.8 =
- Fixed: Studio layout no longer "bleeds off the screen"
- Fixed: Double line spacing in generated output removed

= 2.6.7 =
- Added: "Save as draft post when done" checkbox
- Added: Brain chat "Save as draft post" button
- Added: Shared markdown engine for consistent rendering

= 2.6.0 =
- Added: Craft layer for writing quality standards
- Added: Universal vocabulary blacklist
- Added: Zero em-dash lint for all generated output
- Added: Humanize, Tighten, and Refresh rewrite modes

= 2.3.0 =
- Added: Hybrid credit system with proxy routing
- Added: Site Intelligence weekly auto-rescan
- Added: Writing DNA free tier cap (5/month)

= 1.7.0 =
- Added: License Manager with tier mapping
- Added: Calendar Push Sync and Import Receiver
- Added: REST API Phase 1 (6 routes)
- Added: MCP endpoint for Claude Code integration

== Upgrade Notice ==

= 2.6.40 =
WordPress.org readiness release: full Plugin Check compliance (output escaping, i18n, privacy gating). No functional changes to content generation. Safe to update.

= 2.6.39 =
You can now delete calendar entries and campaigns straight from the Content Calendar, optionally trashing all of a campaign's posts, and the Next 7 Days cards open the quick-edit slideout. Safe to update.

= 2.6.38 =
FullCalendar and fonts are now bundled with the plugin instead of loaded from a CDN, and an external-services disclosure was added. No change to content generation; safe to update.