=== Siteskyline - WP AI Assistant ===
Contributors: Siteskyline
Plugin URI: https://siteskyline.com/siteskyline-ai-assistant
Tags: ai assistant, wordpress ai, chatbot, content management, openai, gpt, claude, gemini, wp cli, ai agent, automation
Requires at least: 5.6
Tested up to: 7.0
Stable tag: 1.0.0
Requires PHP: 7.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

AI-powered WordPress assistant with OpenAI, Claude, and Gemini support. Search, create, edit, and manage WordPress content using natural language.

== Description ==

**Siteskyline - WP AI Assistant** brings a powerful autonomous AI agent directly into your WordPress admin dashboard. Manage your entire WordPress site through simple conversational instructions — search content, create posts, edit pages, update metadata, manage media, and more with support for multiple AI providers.

### Key Features

* **Multi-Provider AI Support** — Choose from OpenAI (GPT-4o, GPT-4), Anthropic Claude (Claude 3.5 Sonnet), or Google Gemini (Gemini 2.0 Flash). Bring your own API key and model.
* **Natural Language Content Management** — Create, edit, search, and delete posts, pages, and custom post types by simply describing what you want.
* **Smart Search & Replace** — Make targeted edits to post content without rewriting entire pages. Supports both plain text and regex patterns.
* **Visual Diff Previews** — See exactly what changes the AI proposes with GitHub-style unified diffs before approving them.
* **Approval Workflow** — Require explicit approval for all write/delete operations. Auto-approve mode available for trusted environments.
* **Read-Only Mode** — Disable all write and delete operations with a single toggle for safer experimentation.
* **Media Library Management** — Browse, upload, and manage media files via chat. Set featured images with natural language.
* **Custom Post Types & Taxonomies** — Full support for custom post types, custom fields (meta), categories, tags, and custom taxonomies.
* **Session Management** — Save, load, and organize multiple chat sessions for different tasks.
* **WordPress Native AI Fallback** — Automatically uses WordPress's built-in AI connector when no external API key is configured.

### How It Works

The plugin uses a ReAct (Reasoning + Acting) agent loop. When you give an instruction, the AI determines which WordPress operations to perform, executes them through secure server-side AJAX endpoints, and reports back with the results. All dangerous operations (create, update, delete) require your explicit approval by default.

### Supported AI Providers

| Provider | Default Model | API Format |
|---|---|---|
| OpenAI | gpt-4o | Chat Completions API |
| Anthropic Claude | claude-3-5-sonnet-20241022 | Messages API |
| Google Gemini | gemini-2.0-flash | Generate Content API |

You can also use any OpenAI-compatible endpoint (Azure OpenAI, Groq, Together AI, Ollama, OpenRouter, etc.) by entering a custom API Base URL.

== Installation ==

1. Upload the `siteskyline-ai-assistant` folder to `/wp-content/plugins/`.
2. Activate the plugin via the WordPress Plugins screen.
3. Go to the **Siteskyline - WP AI Assistant** menu item in your admin sidebar.
4. Open **Settings** and select your AI provider (OpenAI, Claude, or Gemini).
5. Enter your **API Key** and choose a **Model**.
6. Start chatting with your AI assistant!

== Frequently Asked Questions ==

= Which AI providers are supported? =

OpenAI (GPT-4o, GPT-4, GPT-3.5), Anthropic Claude (Claude 3.5 Sonnet, Claude 3 Opus), and Google Gemini (Gemini 2.0 Flash, Gemini 1.5 Pro). You can also use any OpenAI-compatible API endpoint.

= Is my API key stored securely? =

Your API key is stored as a WordPress option and is only used for server-to-server communication with your chosen AI provider. It is never exposed to the frontend or shared with third parties.

= Can the AI delete my content? =

Only if you explicitly approve it. All write and delete operations require admin approval by default. You can also disable all write/delete operations entirely in Settings for read-only mode.

= Do I need coding skills to use this plugin? =

No. The entire plugin is designed to be used through natural language conversation. Just describe what you want to do in plain English.

= Can I use my own API endpoint? =

Yes. Select "OpenAI" provider and enter any OpenAI-compatible API Base URL. This works with Azure OpenAI, Groq, Together AI, OpenRouter, Ollama, and more.

== External Services ==

This plugin connects to third-party AI API endpoints to generate responses and execute content management tasks. The API provider is selected by you in the plugin settings.

Data sent to the API endpoint includes:
- Your chat messages and instructions
- WordPress content data (post titles, content, metadata) as needed
- Site structure information (post types, taxonomies, counts)

Data is processed by your chosen provider according to their terms of service and privacy policy. We recommend reviewing your provider's data handling practices.

== Changelog ==

= 1.0.0 =
* Initial release with multi-provider AI support (OpenAI, Claude, Gemini)
* Approval workflow with visual diff previews
* Read-only mode toggle for safe experimentation
* Session management for organizing conversations
* Full WordPress CRUD operations via natural language
